Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
37a1a6de
Commit
37a1a6de
authored
Nov 04, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter, hide save button if submitted, page chargeable overhead notelist
parent
8169db45
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
37 deletions
+57
-37
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+11
-11
packages/portal/timesheet/resources/views/form/notelist.blade.php
+35
-23
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+6
-0
packages/portal/timesheet/src/Http/Controllers/FormController.php
+5
-3
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
37a1a6de
...
...
@@ -50,7 +50,7 @@ input[type=number] {
<thead>
<tr>
<?php
// dd(
count(
$lat
));
// dd(
data_get(
$check
,'tm_timesheet_master_sts'
));
?>
<th colspan="
2
" rowspan="
2
" class="
center
aligned
">Chargeable</th>
<!-- <th colspan="
{{
count
(
$lat
)}}
" class="
center
aligned
">Date</th> -->
...
...
@@ -294,17 +294,17 @@ input[type=number] {
@endforeach
</tbody>
</table>
@if($projectlist == [])
<button
type=
"submit"
class=
"ui right floated aligned ui blue compact labeled icon button"
>
<i
class=
"save icon"
></i>
Save
</button>
@else
<button
type=
"submit"
class=
"ui right floated aligned ui blue compact labeled icon button"
>
<i
class=
"save icon"
></i>
Save as Draft
</button>
<?php
// dd(count($projectlist));
?>
@if(data_get($check,'tm_timesheet_master_sts') == 1 || data_get($check,'tm_timesheet_master_sts') == null)
@if(count($projectlist) > 0)
<button
type=
"submit"
class=
"ui right floated aligned ui blue compact labeled icon button"
>
<i
class=
"save icon"
></i>
Save as Draft
</button>
@endif
@endif
</form>
<br>
<br>
...
...
packages/portal/timesheet/resources/views/form/notelist.blade.php
View file @
37a1a6de
...
...
@@ -75,10 +75,10 @@
Back To Overhead Form
</button>
<
button type="
button
" class="
center
aligned
ui
pink
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetViewer
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<
a href="
{{
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'phase'
=>
$phase
,
'month'
=>
$month
,
'year'
=>
$year
])
}}
" type="
button
" class="
center
aligned
ui
pink
compact
right
labeled
icon
button
" target="
_blank
">
<i class="
angle
double
right
icon
"></i>
Timesheet Viewer
</
button
>
</
a
>
@endif
<table class="
ui
celled
structured
table
unstackable
">
...
...
@@ -91,26 +91,32 @@
</tr>
</thead>
<tbody>
@foreach(
$onotes
as
$key
=>
$value
)
@if(count(
$onotes
) > 0)
@foreach(
$onotes
as
$key
=>
$value
)
<tr>
<td>
{
{$key+1}
}
</td>
<td class="
single
line
">
<input type="
hidden
" name="
date
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'td_date'
)}}
">
{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
,'td_date'))) }}
</td>
<td class="
single
line
">
<input type="
hidden
" name="
oid
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'fk_o_id'
)}}
">
{
{data_get($value,'td_overhead_desc')}
}
</td>
<td class="
single
line
">
@if(data_get(
$value
,'td_overhead_note'))
<textarea rows="
3
" type="
text
" name="
note
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'td_overhead_note'
)}}
" required="
required
">
{
{data_get($value,'td_overhead_note')}
}
</textarea>
@else
<textarea rows="
3
" type="
text
" name="
note
[{{
$key
}}]
" placeholder="
Fill
in
the
description
for
your
task
" required="
required
"></textarea>
@endif
</td>
</tr>
@endforeach
@else
<tr>
<td>
{
{$key+1}
}
</td>
<td class="
single
line
">
<input type="
hidden
" name="
date
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'td_date'
)}}
">
{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
,'td_date'))) }}
</td>
<td class="
single
line
">
<input type="
hidden
" name="
oid
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'fk_o_id'
)}}
">
{
{data_get($value,'td_overhead_desc')}
}
</td>
<td class="
single
line
">
@if(data_get(
$value
,'td_overhead_note'))
<textarea rows="
3
" type="
text
" name="
note
[{{
$key
}}]
" value="
{{
data_get
(
$value
,
'td_overhead_note'
)}}
" required="
required
">
{
{data_get($value,'td_overhead_note')}
}
</textarea>
@else
<textarea rows="
3
" type="
text
" name="
note
[{{
$key
}}]
" placeholder="
Fill
in
the
description
for
your
task
" required="
required
"></textarea>
@endif
</td>
<td colspan="
4
" class="
center
aligned
">No overhead Selected</td>
</tr>
@end
foreach
@end
if
<!-- @foreach(
$notes
as
$key
=>
$value
)
<tr>
...
...
@@ -122,9 +128,15 @@
@endforeach -->
</tbody>
</table>
<button type="
submit
" class="
ui
right
floated
aligned
ui
orange
compact
button
">
Save
</button>
<?php
// dd(count(
$onotes
));
?>
@if(data_get(
$checknotelist
, 'tm_timesheet_master_sts') == 1 && count(
$onotes
) > 0)
<button type="
submit
" class="
ui
right
floated
aligned
ui
orange
compact
button
">
Save as Draft
</button>
@endif
</form>
<br>
<br>
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
37a1a6de
...
...
@@ -280,10 +280,16 @@ input[type=number] {
@endforeach
</tbody>
</table>
<?php
// dd(data_get($checkoverhead,'tm_timesheet_master_sts'));
?>
@if(data_get($checkoverhead,'tm_timesheet_master_sts') == 1 || data_get($checkoverhead,'tm_timesheet_master_sts') == null)
<button
type=
"submit"
class=
"ui right floated aligned ui blue compact labeled icon button"
>
<i
class=
"save icon"
></i>
Save as Draft
</button>
@endif
</form>
<br>
<br>
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
37a1a6de
...
...
@@ -170,6 +170,8 @@ class FormController extends Controller
->
where
(
'tm_phase'
,
$phase
)
->
first
();
// dd(data_get($check, 'tm_timesheet_master_sts'));
if
(
$check
)
{
$hour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
...
...
@@ -209,7 +211,7 @@ class FormController extends Controller
// dd(date_parse_from_format('Y-m-d', data_get($lat1,'DATE'))['day']);
// dd(date('d'));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
,
'lat'
));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
,
'lat'
,
'check'
));
}
public
function
savechargeablehours
(
Request
$request
)
...
...
@@ -1536,7 +1538,7 @@ class FormController extends Controller
->
where
(
'tm_phase'
,
$phase
)
->
first
();
// dd(
$checknotelist
);
// dd(
data_get($checknotelist, 'tm_timesheet_master_sts')
);
if
(
$checknotelist
)
{
...
...
@@ -1567,7 +1569,7 @@ class FormController extends Controller
// dd($list);
return
view
(
'timesheet::form.notelist'
,
compact
(
'notes'
,
'phase'
,
'month'
,
'year'
,
'fk_tm_id'
,
'staff'
,
'onotes'
,
'page'
,
'checktp'
));
return
view
(
'timesheet::form.notelist'
,
compact
(
'notes'
,
'phase'
,
'month'
,
'year'
,
'fk_tm_id'
,
'staff'
,
'onotes'
,
'page'
,
'checktp'
,
'checknotelist'
));
}
public
function
penambahannote
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment