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
fba11573
Commit
fba11573
authored
Dec 22, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment Demo #10. Screen resubmit, display date → last updated date when click save button.
parent
7066d4b9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
7 deletions
+63
-7
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+11
-0
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+12
-0
packages/portal/timesheet/resources/views/form/rejected.blade.php
+10
-0
packages/portal/timesheet/resources/views/form/rejectedoverhead.blade.php
+10
-0
packages/portal/timesheet/src/Http/Controllers/FormController.php
+20
-7
No files found.
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
fba11573
...
@@ -25,6 +25,17 @@ input[type=number] {
...
@@ -25,6 +25,17 @@ input[type=number] {
<br>
<br>
<br>
<br>
@if(
$lastupdated
)
<div class="
ui
right
floated
center
compact
aligned
basic
right
button
">
<div class="
header
item
" style="
color
:
#000000;">
<
strong
>
Last
Updated
:
{{
date
(
'd/m/Y'
,
strtotime
(
data_get
(
$lastupdated
,
'updated_at'
)))
}}
</
strong
>
</
div
>
</
div
>
@
endif
<
div
class
="
ui
right
floated
center
compact
aligned
basic
right
button
">
<
div
class
="
ui
right
floated
center
compact
aligned
basic
right
button
">
<div class="
header
item
" style="
color
:
#000000;">
<div class="
header
item
" style="
color
:
#000000;">
<
strong
>
<
strong
>
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
fba11573
...
@@ -27,8 +27,20 @@ input[type=number] {
...
@@ -27,8 +27,20 @@ input[type=number] {
Overhead Form
Overhead Form
</h3>
</h3>
</a>
</a>
<br>
<br>
<br>
<br>
@if(
$lastupdated
)
<div class="
ui
right
floated
center
compact
aligned
basic
right
button
">
<div class="
header
item
" style="
color
:
#000000;">
<
strong
>
Last
Updated
:
{{
date
(
'd/m/Y'
,
strtotime
(
data_get
(
$lastupdated
,
'updated_at'
)))
}}
</
strong
>
</
div
>
</
div
>
@
endif
<
div
class
="
ui
right
floated
center
compact
aligned
basic
right
button
">
<
div
class
="
ui
right
floated
center
compact
aligned
basic
right
button
">
<div class="
header
item
" style="
color
:
#000000;">
<div class="
header
item
" style="
color
:
#000000;">
<
strong
>
<
strong
>
...
...
packages/portal/timesheet/resources/views/form/rejected.blade.php
View file @
fba11573
...
@@ -10,6 +10,16 @@
...
@@ -10,6 +10,16 @@
<a
class=
"ui right floated center compact aligned right orange button"
href=
"{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($profile,'staffid') ,'phase' => data_get($profile,'tp_phase'), 'month' => data_get($profile,'tp_month'), 'year' => data_get($profile,'tp_year')]) }}"
target=
"_blank"
>
View Timesheet
</a>
<a
class=
"ui right floated center compact aligned right orange button"
href=
"{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($profile,'staffid') ,'phase' => data_get($profile,'tp_phase'), 'month' => data_get($profile,'tp_month'), 'year' => data_get($profile,'tp_year')]) }}"
target=
"_blank"
>
View Timesheet
</a>
@if($profile)
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<strong>
Last Updated : {{ date('d/m/Y', strtotime(data_get($profile,'updated_at'))) }}
</strong>
</div>
</div>
@endif
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<strong>
<strong>
...
...
packages/portal/timesheet/resources/views/form/rejectedoverhead.blade.php
View file @
fba11573
...
@@ -14,6 +14,16 @@
...
@@ -14,6 +14,16 @@
<br>
<br>
<br>
<br>
@if($profile)
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<strong>
Last Updated : {{ date('d/m/Y', strtotime(data_get($profile,'updated_at'))) }}
</strong>
</div>
</div>
@endif
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"ui right floated center compact aligned basic right button"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<div
class=
"header item"
style=
"color: #000000;"
>
<strong>
<strong>
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
fba11573
...
@@ -151,15 +151,22 @@ class FormController extends Controller
...
@@ -151,15 +151,22 @@ class FormController extends Controller
$year
=
$request
->
year
;
$year
=
$request
->
year
;
}
}
$lastupdated
=
Tproject
::
where
(
'staffid'
,
$userId
)
->
where
(
'tp_project_type'
,
$chargeable
)
->
where
(
'tp_phase'
,
$phase
)
->
where
(
'tp_month'
,
$month
)
->
where
(
'tp_year'
,
$year
)
->
first
();
// dd($lastupdated);
$daymonth
=
cal_days_in_month
(
CAL_GREGORIAN
,
$month
,
$year
);
$daymonth
=
cal_days_in_month
(
CAL_GREGORIAN
,
$month
,
$year
);
// dd($daymonth);
$strdays
=
[];
$strdays
=
[];
for
(
$i
=
0
;
$i
<
$daymonth
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
$daymonth
;
$i
++
)
{
$tempdate
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
$tempdate
=
$year
.
'-'
.
sprintf
(
'%02d'
,
$month
)
.
'-'
.
sprintf
(
'%02d'
,
$i
+
1
);
$strday
=
Carbon
::
createFromFormat
(
'Y-m-d'
,
$tempdate
)
->
format
(
'l'
);
$strday
=
Carbon
::
createFromFormat
(
'Y-m-d'
,
$tempdate
)
->
format
(
'l'
);
// dd($strday);
$strdays
[
$i
]
=
substr
(
$strday
,
0
,
3
);
$strdays
[
$i
]
=
substr
(
$strday
,
0
,
3
);
}
}
...
@@ -170,8 +177,6 @@ class FormController extends Controller
...
@@ -170,8 +177,6 @@ class FormController extends Controller
->
where
(
'tm_phase'
,
$phase
)
->
where
(
'tm_phase'
,
$phase
)
->
first
();
->
first
();
// dd(data_get($check, 'tm_timesheet_master_sts'));
if
(
$check
)
if
(
$check
)
{
{
$hour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
$hour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
...
@@ -211,7 +216,7 @@ class FormController extends Controller
...
@@ -211,7 +216,7 @@ class FormController extends Controller
// dd(date_parse_from_format('Y-m-d', data_get($lat1,'DATE'))['day']);
// dd(date_parse_from_format('Y-m-d', data_get($lat1,'DATE'))['day']);
// dd(date('d'));
// dd(date('d'));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
,
'lat'
,
'check'
));
return
view
(
'timesheet::form.chargeableForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'strdays'
,
'lat'
,
'check'
,
'lastupdated'
));
}
}
public
function
savechargeablehours
(
Request
$request
)
public
function
savechargeablehours
(
Request
$request
)
...
@@ -817,6 +822,14 @@ class FormController extends Controller
...
@@ -817,6 +822,14 @@ class FormController extends Controller
$year
=
$request
->
year
;
$year
=
$request
->
year
;
}
}
$lastupdated
=
Tproject
::
where
(
'staffid'
,
$userId
)
->
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_phase'
,
$phase
)
->
where
(
'tp_month'
,
$month
)
->
where
(
'tp_year'
,
$year
)
->
first
();
// dd($lastupdated);
$daymonth
=
cal_days_in_month
(
CAL_GREGORIAN
,
$month
,
$year
);
$daymonth
=
cal_days_in_month
(
CAL_GREGORIAN
,
$month
,
$year
);
$strdays
=
[];
$strdays
=
[];
...
@@ -1463,7 +1476,7 @@ class FormController extends Controller
...
@@ -1463,7 +1476,7 @@ class FormController extends Controller
$fk_tm_id
=
null
;
$fk_tm_id
=
null
;
}
}
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'checkoverhead'
,
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
,
'lat'
));
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'checkoverhead'
,
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
,
'lat'
,
'lastupdated'
));
}
}
public
function
saveoverheadhours
(
Request
$request
)
public
function
saveoverheadhours
(
Request
$request
)
...
@@ -2082,7 +2095,7 @@ class FormController extends Controller
...
@@ -2082,7 +2095,7 @@ class FormController extends Controller
->
with
(
'project'
)
->
with
(
'project'
)
->
with
(
'overhead'
)
->
with
(
'overhead'
)
->
first
();
->
first
();
// dd($profile);
// dd($profile);
$month
=
data_get
(
$profile
,
'tp_month'
);
$month
=
data_get
(
$profile
,
'tp_month'
);
// dump($month);
// dump($month);
$year
=
data_get
(
$profile
,
'tp_year'
);
$year
=
data_get
(
$profile
,
'tp_year'
);
...
...
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