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
20814cee
Commit
20814cee
authored
Apr 15, 2024
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing timesheet date chargeable form & overhead
parent
370e76f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
29 deletions
+130
-29
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+76
-19
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+54
-10
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
20814cee
...
@@ -250,21 +250,50 @@ input[type=number] {
...
@@ -250,21 +250,50 @@ input[type=number] {
</tr>
</tr>
<tr>
<tr>
@if(count(
$lat
) > 0)
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
@if(
$phase
== 1)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
@for(
$i
= 0;
$i
< 15 ;
$i
++)
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
</th>
@php
@else
$filteredData
=
$lat->filter
(function (
$item
) use (
$i
) {
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
return date('d', strtotime(
$item['DATE']
)) ==
$i
+1;
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
});
</
th
>
@endphp
@
endif
@
endforeach
@if(
$filteredData->isEmpty
())
@
if
(
$phase
==
1
)
<th class="
center
aligned
">
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
{{
$i
+1 }}
</th>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
</th>
@else
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
</
th
>
@
endif
@
endforeach
@
endif
@
endfor
{{
--
@
foreach
(
$lat
as
$key
=>
$date
)
@
if
(
data_get
(
$date
,
'attendance_status'
)
==
1
)
<
th
class
="
center
aligned
">
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
</th>
@else
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
</
th
>
@
endif
@
endforeach
--
}}
{{
--
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
<
th
class
="
center
aligned
">
{
{$i+1}
}
</th>
<
th
class
="
center
aligned
">
{
{$i+1}
}
</th>
@endfor
@endfor
--}}
@else
@else
@for(
$i
= 15+count(
$lat
);
$i
<
$daymonth
;
$i
++)
@for(
$i
= 15+count(
$lat
);
$i
<
$daymonth
;
$i
++)
<th class="
center
aligned
">
{
{$i+1}
}
</th>
<th class="
center
aligned
">
{
{$i+1}
}
</th>
...
@@ -286,7 +315,8 @@ input[type=number] {
...
@@ -286,7 +315,8 @@ input[type=number] {
<th class="">Project Code</th>
<th class="">Project Code</th>
<th class="">Project Name</th>
<th class="">Project Name</th>
@if(count(
$lat
) > 0)
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
{{-- @foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
<th class="
center
aligned
">
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
...
@@ -296,11 +326,38 @@ input[type=number] {
...
@@ -296,11 +326,38 @@ input[type=number] {
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
</
th
>
@
endif
@
endif
@
endforeach
@
endforeach
--
}}
@
if
(
$phase
==
1
)
@
if
(
$phase
==
1
)
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
@
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
@endfor
@
php
$filteredData
=
$lat
->
filter
(
function
(
$item
)
use
(
$i
)
{
return
date
(
'd'
,
strtotime
(
$item
[
'DATE'
]))
==
$i
+
1
;
});
@
endphp
@
if
(
$filteredData
->
isEmpty
())
<
th
class
="
center
aligned
">
{{
$strdays[$i]
}}
</th>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
</th>
@else
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
@
endif
@
endforeach
@
endif
@
endfor
@
else
@
else
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
20814cee
...
@@ -263,7 +263,7 @@ input[type=number] {
...
@@ -263,7 +263,7 @@ input[type=number] {
</tr>
</tr>
<tr>
<tr>
@if(count(
$lat
) > 0)
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
{{--
@foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
<th class="
center
aligned
">
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
...
@@ -273,11 +273,33 @@ input[type=number] {
...
@@ -273,11 +273,33 @@ input[type=number] {
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
</
th
>
</
th
>
@
endif
@
endif
@
endforeach
@
endforeach
--
}}
@
if
(
$phase
==
1
)
@
if
(
$phase
==
1
)
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
@
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
<
th
class
="
center
aligned
">
{
{$i+1}
}
</th>
@
php
@endfor
$filteredData
=
$lat
->
filter
(
function
(
$item
)
use
(
$i
)
{
return
date
(
'd'
,
strtotime
(
$item
[
'DATE'
]))
==
$i
+
1
;
});
@
endphp
@
if
(
$filteredData
->
isEmpty
())
<
th
class
="
center
aligned
">
{{
$i
+1 }}
</th>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
{{ date_parse_from_format('Y-m-d', data_get(
$date
,'DATE'))['day'] }}
</th>
@else
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
{{
date_parse_from_format
(
'Y-m-d'
,
data_get
(
$date
,
'DATE'
))[
'day'
]
}}
</
th
>
@
endif
@
endforeach
@
endif
@
endfor
@
else
@
else
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
<
th
class
="
center
aligned
">
{
{$i+1}
}
</th>
<
th
class
="
center
aligned
">
{
{$i+1}
}
</th>
...
@@ -297,7 +319,7 @@ input[type=number] {
...
@@ -297,7 +319,7 @@ input[type=number] {
</tr>
</tr>
<tr>
<tr>
@if(count(
$lat
) > 0)
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$date
)
{{--
@foreach(
$lat
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
<th class="
center
aligned
">
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
...
@@ -307,11 +329,33 @@ input[type=number] {
...
@@ -307,11 +329,33 @@ input[type=number] {
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
</
th
>
@
endif
@
endif
@
endforeach
@
endforeach
--
}}
@
if
(
$phase
==
1
)
@
if
(
$phase
==
1
)
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
@
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
@
php
@endfor
$filteredData
=
$lat
->
filter
(
function
(
$item
)
use
(
$i
)
{
return
date
(
'd'
,
strtotime
(
$item
[
'DATE'
]))
==
$i
+
1
;
});
@
endphp
@
if
(
$filteredData
->
isEmpty
())
<
th
class
="
center
aligned
">
{{
$strdays[$i]
}}
</th>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<th class="
center
aligned
">
{{ date('D', strtotime(data_get(
$date
,'DATE')) ) }}
</th>
@else
<th class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
{{
date
(
'D'
,
strtotime
(
data_get
(
$date
,
'DATE'
))
)
}}
</
th
>
@
endif
@
endforeach
@
endif
@
endfor
@
else
@
else
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
...
...
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