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
9eba9eac
Commit
9eba9eac
authored
Oct 31, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
condition input hours. auto ceil/floors depends on input.
parent
1ba1c7d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+12
-0
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+12
-0
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
9eba9eac
...
...
@@ -246,6 +246,18 @@ input[type=number] {
if (input.value < 0) input.value = 0;
if (input.value > 24) input.value = 24;
if( (input.value%1) > 0 && (input.value%1) <= 0.2 ) {
input.value = Math.floor(input.value);
}
if( (input.value%1) > 0.2 && (input.value%1) <= 0.7 ) {
input.value = Math.floor(input.value) + 0.5;
}
if( (input.value%1) > 0.7) {
input.value = Math.ceil(input.value);
}
input.value = parseFloat(parseFloat(input.value).toFixed(1));
for(var i = 0; i < 32; i++){
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
9eba9eac
...
...
@@ -274,6 +274,18 @@ input[type=number] {
if
(
input
.
value
<
0
)
input
.
value
=
0
;
if
(
input
.
value
>
24
)
input
.
value
=
24
;
if
(
(
input
.
value
%
1
)
>
0
&&
(
input
.
value
%
1
)
<=
0.2
)
{
input
.
value
=
Math
.
floor
(
input
.
value
);
}
if
(
(
input
.
value
%
1
)
>
0.2
&&
(
input
.
value
%
1
)
<=
0.7
)
{
input
.
value
=
Math
.
floor
(
input
.
value
)
+
0.5
;
}
if
(
(
input
.
value
%
1
)
>
0.7
)
{
input
.
value
=
Math
.
ceil
(
input
.
value
);
}
input
.
value
=
parseFloat
(
parseFloat
(
input
.
value
)
.
toFixed
(
1
));
for
(
var
i
=
0
;
i
<
32
;
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