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
b691ec19
Commit
b691ec19
authored
Oct 31, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
317a92fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
12 deletions
+57
-12
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+54
-11
packages/portal/timesheet/resources/views/maintenance/mandays.blade.php
+3
-1
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
b691ec19
...
...
@@ -66,6 +66,12 @@ input[type=number] {
</th>
</tr>
<tr>
<?php
$cday
= [];
for (
$i
=0;
$i
<
$daymonth
;
$i
++) {
$cday
[] = 0;
}
?>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
...
...
@@ -96,8 +102,13 @@ input[type=number] {
</tr>
</thead>
<tbody>
<?php
$all
= 0;
$lasttd
= count(
$projectlist
);
?>
@foreach(
$projectlist
as
$key
=>
$project
)
<?php
$total
= 0;
?>
<?php
$total
= 0;?>
<tr>
<td class="
single
line
">
{{
$project['td_project_code']
}}
...
...
@@ -126,8 +137,7 @@ input[type=number] {
?>
<td >
<input 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
']}}'
);
">
<input 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>
@endfor
@else
...
...
@@ -154,11 +164,35 @@ input[type=number] {
@endfor
@endif
<td>
<input
type="
text
" onkeypress="
onlynumber
(
event
)
" name="
total
-
{{
$project
[
'td_project'
]}}
" id="
total
-
{{
$project
[
'td_project'
]}}
" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
" readonly="
" value=
{
{$total}
}
>
<input
class="
center
aligned
" type="
text
" name="
total
-
{{
$project
[
'td_project'
]}}
" id="
total
-
{{
$key
+
1
}}
" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" readonly="
readonly
" value=
{
{$total}
}
>
</td>
</tr>
<?php
$all
+=
$total
; ?>
@endforeach
</tbody>
<!-- <tfoot>
<tr>
<th colspan="
2
">
Total Hours
</th>
@if(
$phase
== 1)
@for(
$i
= 0;
$i
< 15 ;
$i
++)
<th>
<input class="
center
aligned
" type="
text
" name="
thour
-
{{
$project
[
'td_project'
]}}
" id="
thours
[{{
$i
+
1
}}][{{
$key
+
1
}}]
" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" readonly="
readonly
" value="
{{
$cday
[
$i
]}}
">
</th>
@endfor
@else
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<th>
<input class="
center
aligned
" type="
text
" name="
thour
-
{{
$project
[
'td_project'
]}}
" id="
thours
[{{
$i
+
1
}}][{{
$key
+
1
}}]
" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" readonly="
readonly
" value="
{{
$cday
[
$i
]}}
">
</th>
@endfor
@endif
<th>
<input class="
center
aligned
" type="
text
" onkeypress="
onlynumber
(
event
)
" name="
all
" id="
all
" readonly="
readonly
" value="
{{
$all
}}
">
</th>
</tr>
</tfoot> -->
</table>
@if(
$projectlist
== [])
<button type="
submit
" class="
ui
right
floated
aligned
ui
blue
compact
labeled
icon
button
">
...
...
@@ -204,9 +238,10 @@ input[type=number] {
});
function limiter(input,pid) {
function limiter(input,pid
,lasttd,key
) {
var currenttotal = 0;
var all = 0;
if (input.value < 0) input.value = 0;
if (input.value > 24) input.value = 24;
...
...
@@ -221,24 +256,32 @@ input[type=number] {
hourValue = hourValue.value;
value = parseFloat(parseFloat(hourValue).toFixed(1));
console.log(isNaN(value));
//
console.log(isNaN(value));
if(isNaN(value)){
value = 0;
}
if(typeof value === 'number'){
// console.log(value);
currenttotal += value;
}
}
}
console.log("
currenttotal
-->
" + currenttotal);
// console.log("
currenttotal
-->
" + currenttotal);
document.getElementById('total-'+key).value = currenttotal;
var y = 0;
for(var j = 1; j < key+1; j++){
var allid = document.getElementById('total-'+j);
if (document.getElementById('total-'+j)) {
y = document.getElementById('total-'+j).value;
value = parseFloat(parseFloat(y).toFixed(1));
all += value;
}
}
console.log(all);
document.getElementById('all').value = all;
document.getElementById('total-'+pid).value = currenttotal;
}
</script>
...
...
packages/portal/timesheet/resources/views/maintenance/mandays.blade.php
View file @
b691ec19
...
...
@@ -17,7 +17,9 @@
</tr>
</thead>
<tbody>
<?php
$limit
= count(
$limitrole
); ?>
<?php
$limit
= count(
$limitrole
);
// dd(
$limitrole
);
?>
@foreach(
$role
as
$key
=>
$value
)
<tr>
...
...
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