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
f9fe6c4b
Commit
f9fe6c4b
authored
Apr 15, 2024
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing timesheet overhead and chargeable phase 1 and phase 2
parent
12266a5c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
65 deletions
+43
-65
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+20
-32
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+23
-33
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
f9fe6c4b
...
...
@@ -400,7 +400,6 @@ input[type=number] {
@
endif
@
else
@
if
(
$phase
==
1
)
@
for
(
$i
=
0
;
$i
<
15
;
$i
++
)
<
th
class
="
center
aligned
">{{
$strdays[$i]
}}</th>
@endfor
...
...
@@ -431,14 +430,17 @@ input[type=number] {
</td>
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$value
)
<?php
// dd(
$value
);
$day
= date_parse_from_format('Y-m-d', data_get(
$value
,'DATE'))['day'];
// dd(
$day
);
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
@php
$filteredData
=
$lat->filter
(function (
$item
) use (
$i
) {
return date('d', strtotime(
$item['DATE']
)) ==
$i
+1;
});
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$day
);
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1
);
if(
$hour
)
{
...
...
@@ -449,40 +451,26 @@ input[type=number] {
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
@endphp
@if(data_get(
$value
,'attendance_status') == 1)
@if(
$filteredData->isEmpty
())
<td>
<input class="
center
aligned
" type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
</td>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<td class="
center
aligned
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$day
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$day
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
</td>
@else
<td class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
<
input
type
=
"text"
onkeypress
=
"onlynumber(event)"
id
=
"hour[
{
{$project['td_project']}}][{{$day}
}
]"
name
=
"hour[
{
{$project['td_project']}}][{{$day
}
}
]"
value
=
"@if(
$valuehour
)
{
{data_get($valuehour,'td_hours')}
}
@else @endif"
min
=
"0"
max
=
"24"
style
=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange
=
"limiter(this,'{{
$project['td_project']
}}');"
>
<
input
type
=
"text"
onkeypress
=
"onlynumber(event)"
id
=
"hour[
{
{$project['td_project']}}][{{$i+1}
}
]"
name
=
"hour[
{
{$project['td_project']}}][{{$i+1
}
}
]"
value
=
"@if(
$valuehour
)
{
{data_get($valuehour,'td_hours')}
}
@else @endif"
min
=
"0"
max
=
"24"
style
=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange
=
"limiter(this,'{{
$project['td_project']
}}');"
>
</
td
>
@
endif
@
endforeach
@
if
(
$phase
==
1
)
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
<?
php
$valuehour
=
''
;
$date
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
if
(
$hour
)
{
$valuehour
=
$hour
->
where
(
'td_date'
,
'='
,
$date
)
->
where
(
'td_project'
,
$project
[
'td_project'
])
->
where
(
'tm_phase'
,
$phase
)
->
first
();
$total
+=
data_get
(
$valuehour
,
'td_hours'
);
}
?>
@
endif
<td>
<input
class=
"center aligned"
type=
"text"
onkeypress=
"onlynumber(event)"
id=
"hour[{{$project['td_project']}}][{{$i+1}}]"
name=
"hour[{{$project['td_project']}}][{{$i+1}}]"
value=
"@if($valuehour){{$valuehour->td_hours}}@else @endif"
min=
"0"
max=
"24"
style=
"padding:2px;margin:unset"
onchange=
"limiter(this,'{{ $project['td_project'] }}');"
>
</td>
@
endfor
@
else
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
f9fe6c4b
...
...
@@ -438,43 +438,18 @@ input[type=number] {
</td>
@if(count(
$lat
) > 0)
@foreach(
$lat
as
$key
=>
$value
)
<?php
// dd(
$value
);
$day
= date_parse_from_format('Y-m-d', data_get(
$value
,'DATE'))['day'];
// dd(
$day
);
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$day
);
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
if(
$hour
)
{
$valuehour
=
$hour->where
('td_date','=',
$date
)
->where('fk_o_id',
$project['td_project']
)
->where('tm_phase',
$phase
)
->first();
@php
$filteredData
=
$lat->filter
(function (
$item
) use (
$i
) {
return date('d', strtotime(
$item['DATE']
)) ==
$i
+1;
});
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
@if(data_get(
$value
,'attendance_status') == 1)
<td style="
width
:
5
%
;
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$day
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$day
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
</td>
@else
<td style="
width
:
5
%
;
background
-
color
:
#DCDCDC;">
<
input
type
=
"text"
onkeypress
=
"onlynumber(event)"
id
=
"hour[
{
{$project['td_project']}}][{{$day}
}
]"
name
=
"hour[
{
{$project['td_project']}}][{{$day}
}
]"
value
=
"@if(
$valuehour
)
{
{data_get($valuehour,'td_hours')}
}
@else @endif"
min
=
"0"
max
=
"24"
style
=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange
=
"limiter(this,'{{
$project['td_project']
}}');"
>
</
td
>
@
endif
@
endforeach
@
if
(
$phase
==
1
)
@
for
(
$i
=
count
(
$lat
);
$i
<
15
;
$i
++
)
<?
php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
if(
$hour
)
{
...
...
@@ -485,10 +460,25 @@ input[type=number] {
$total
+= data_get(
$valuehour
,'td_hours');
}
?>
<td
>
@endphp
@if(
$filteredData->isEmpty
())
<td class="
center
aligned
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@else
@foreach(
$filteredData
as
$key
=>
$date
)
@if(data_get(
$date
,'attendance_status') == 1)
<td class="
center
aligned
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{ $project['
td_project
'] }}'
);
">
</td>
@else
<td class="
center
aligned
" style="
background
-
color
:
#DCDCDC;">
<
input
type
=
"text"
onkeypress
=
"onlynumber(event)"
id
=
"hour[
{
{$project['td_project']}}][{{$i+1}
}
]"
name
=
"hour[
{
{$project['td_project']}}][{{$i+1}
}
]"
value
=
"@if(
$valuehour
)
{
{data_get($valuehour,'td_hours')}
}
@else @endif"
min
=
"0"
max
=
"24"
style
=
"padding:2px;margin:unset;background-color: #DCDCDC;"
onchange
=
"limiter(this,'{{
$project['td_project']
}}');"
>
</
td
>
@
endif
@
endforeach
@
endif
@
endfor
@
else
@
for
(
$i
=
15
+
count
(
$lat
);
$i
<
$daymonth
;
$i
++
)
...
...
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