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
0afec7d0
Commit
0afec7d0
authored
Dec 01, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log Pia #131 -> BDD
parent
18ac43da
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
28 deletions
+114
-28
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
+2
-2
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
+19
-7
packages/portal/timesheet/resources/views/form/notelist.blade.php
+7
-7
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+75
-11
packages/portal/timesheet/src/Http/Controllers/FormController.php
+0
-0
packages/portal/timesheet/src/Model/Staff_info.php
+10
-0
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
View file @
0afec7d0
...
@@ -220,9 +220,9 @@
...
@@ -220,9 +220,9 @@
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td
style=
"width:
4%;"
>
</td>
<td
style=
"width:
15%;"
>
{{ data_get($staff,'attachment.filename') }}
</td>
<td>
<td>
<a
href=
"{{ asset(data_get($
value
,'attachment.path'))}}"
target=
"_blank"
>
<a
href=
"{{ asset(data_get($
staff
,'attachment.path'))}}"
target=
"_blank"
>
<button
class=
"ui active button"
>
<button
class=
"ui active button"
>
<i
class=
"download icon"
></i>
<i
class=
"download icon"
></i>
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
View file @
0afec7d0
...
@@ -255,7 +255,7 @@
...
@@ -255,7 +255,7 @@
@if(data_get(
$staff
, 'tmid') == data_get(
$tp
, 'fk_tm_id'))
@if(data_get(
$staff
, 'tmid') == data_get(
$tp
, 'fk_tm_id'))
<tr>
<tr>
<td style="
width
:
25
;
">{{data_get(
$tp
, 'tp_project_name')}}</td>
<td style="
width
:
25
%
;
">{{data_get(
$tp
, 'tp_project_name')}}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$tp
, 'tp_hours')}}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$tp
, 'tp_hours')}}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">
<td style="
width
:
10
%
;
" class="
center
aligned
">
{{ number_format(data_get(
$tp
, 'tp_hours')/8, 1, '.', '') }}
{{ number_format(data_get(
$tp
, 'tp_hours')/8, 1, '.', '') }}
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
View file @
0afec7d0
...
@@ -133,12 +133,18 @@
...
@@ -133,12 +133,18 @@
<table class="
ui
unstackable
celled
table
">
<table class="
ui
unstackable
celled
table
">
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
17
%
;
">Overhead</th>
@if( data_get(
$staffinfo
,'fk_lkp_department') == '7' && data_get(
$staffinfo
,'penyokong') == '0' )
<th style="
width
:
20
%
;
">Overhead</th>
<th style="
width
:
20
%
;
">Approver</th>
<th style="
width
:
35
%
;
">Bod Remarks</th>
@else
<th style="
width
:
17
%
;
">Overhead</th>
<th style="
width
:
15
%
;
">Verifier</th>
<th style="
width
:
15
%
;
">Verifier</th>
<!-- <th style="
width
:
5
%
;
" class="
center
aligned
">Total Hours</th>
<th style="
width
:
5
%
;
" class="
center
aligned
">Total Days</th> -->
<th style="
width
:
20
%
;
">Hod Remarks</th>
<th style="
width
:
20
%
;
">Hod Remarks</th>
<th style="
width
:
20
%
;
">Bod Remarks</th>
<th style="
width
:
20
%
;
">Bod Remarks</th>
@endif
<!-- <th style="
width
:
5
%
;
" class="
center
aligned
">Total Hours</th>
<th style="
width
:
5
%
;
" class="
center
aligned
">Total Days</th> -->
<th style="
width
:
13
%
;
" class="
text
-
center
">Status</th>
<th style="
width
:
13
%
;
" class="
text
-
center
">Status</th>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
</tr>
</tr>
...
@@ -150,12 +156,18 @@
...
@@ -150,12 +156,18 @@
@else
@else
@foreach(
$overhead
as
$key
=>
$tpoverhead
)
@foreach(
$overhead
as
$key
=>
$tpoverhead
)
<tr>
<tr>
<td style="
width
:
15
;
">
{
{data_get($tpoverhead,'tp_project_name')}
}
</td>
@if( data_get(
$staffinfo
,'fk_lkp_department') == '7' && data_get(
$staffinfo
,'penyokong') == '0' )
<td style="
width
:
15
;
" class="
single
line
">
{
{data_get($tpoverhead,'hod.fullname')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'tp_project_name')}
}
</td>
<!-- <td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')}
}
</td>
<td style="
width
:
20
%
;
" class="
single
line
">
{
{data_get($tpoverhead,'bod.fullname')}
}
</td>
<td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')/8}
}
</td> -->
<td style="
width
:
35
%
;
">
{
{data_get($tpoverhead,'approver_remark')}
}
</td>
@else
<td style="
width
:
15
%
;
">
{
{data_get($tpoverhead,'tp_project_name')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'verifier_remark')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'verifier_remark')}
}
</td>
<td style="
width
:
15
%
;
" class="
single
line
">
{
{data_get($tpoverhead,'hod.fullname')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'approver_remark')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'approver_remark')}
}
</td>
@endif
<!-- <td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')}
}
</td>
<td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')/8}
}
</td> -->
<td style="
width
:
13
%
;
" class="
text
-
center
">
<td style="
width
:
13
%
;
" class="
text
-
center
">
@if(data_get(
$tpoverhead
,'tp_timesheet_sts') == 1) Draft
@if(data_get(
$tpoverhead
,'tp_timesheet_sts') == 1) Draft
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 2) Submitted
...
...
packages/portal/timesheet/resources/views/form/notelist.blade.php
View file @
0afec7d0
...
@@ -32,13 +32,6 @@
...
@@ -32,13 +32,6 @@
<br>
<br>
@if(data_get(
$staff
,'fk_lkp_department') == 7)
<button type="
button
" class="
right
floated
aligned
ui
olive
compact
labeled
icon
button
" id="
uploadmodal
">
<i class="
file
icon
"></i>
Upload File
</button>
@endif
<form class="
ui
form
horizontal
" action="
{{
route
(
'timesheet::form.savenote'
)
}}
" method="
POST
">
<form class="
ui
form
horizontal
" action="
{{
route
(
'timesheet::form.savenote'
)
}}
" method="
POST
">
{
{csrf_field()}
}
{
{csrf_field()}
}
...
@@ -52,6 +45,13 @@
...
@@ -52,6 +45,13 @@
</a> -->
</a> -->
@if(data_get(
$staff
,'fk_lkp_department') == 7)
<button type="
button
" class="
right
floated
aligned
ui
olive
compact
labeled
icon
button
" id="
uploadmodal
">
<i class="
file
icon
"></i>
Upload Files
</button>
@endif
@if(
$page
)
@if(
$page
)
<input type="
hidden
" name="
page
" value="
{{
$page
}}
">
<input type="
hidden
" name="
page
" value="
{{
$page
}}
">
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
0afec7d0
...
@@ -193,6 +193,11 @@ class DashboardController extends Controller
...
@@ -193,6 +193,11 @@ class DashboardController extends Controller
if
((
$roleid
==
(
'5'
||
'6'
)))
{
if
((
$roleid
==
(
'5'
||
'6'
)))
{
$staffinfo
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
with
(
'pelulus'
)
->
first
();
// dd($staffinfo);
$staffid
=
Users
::
find
(
Auth
::
id
())
$staffid
=
Users
::
find
(
Auth
::
id
())
->
u_staffID
;
->
u_staffID
;
...
@@ -211,6 +216,7 @@ class DashboardController extends Controller
...
@@ -211,6 +216,7 @@ class DashboardController extends Controller
->
with
(
'project'
)
->
with
(
'project'
)
->
with
(
'overhead'
)
->
with
(
'overhead'
)
->
with
(
'hod'
)
->
with
(
'hod'
)
->
with
(
'bod'
)
->
get
();
->
get
();
// dd($projects);
// dd($projects);
...
@@ -221,7 +227,7 @@ class DashboardController extends Controller
...
@@ -221,7 +227,7 @@ class DashboardController extends Controller
}
}
)
->
paginate
(
15
);
)
->
paginate
(
15
);
return
view
(
'timesheet::dashboard.dashboardstaff'
,
compact
(
'user'
,
'timesheet'
,
'staffs'
,
'projects'
));
return
view
(
'timesheet::dashboard.dashboardstaff'
,
compact
(
'user'
,
'timesheet'
,
'staffs'
,
'projects'
,
'roleid'
,
'staffinfo'
));
}
if
(
$roleid
==
'3'
)
{
}
if
(
$roleid
==
'3'
)
{
...
@@ -1259,7 +1265,7 @@ class DashboardController extends Controller
...
@@ -1259,7 +1265,7 @@ class DashboardController extends Controller
->
update
(
->
update
(
[
[
'tm_timesheet_master_sts'
=>
5
,
'tm_timesheet_master_sts'
=>
5
,
'bod_
rejected_at'
=>
$today
,
'bod_
dissaproved_at'
=>
$today
,
]);
]);
}
}
...
@@ -1626,17 +1632,35 @@ class DashboardController extends Controller
...
@@ -1626,17 +1632,35 @@ class DashboardController extends Controller
if
(
$roleid
==
'9'
)
if
(
$roleid
==
'9'
)
{
{
Ts_master
::
where
(
'id'
,
$request
->
tid
)
$checkpmhod
=
Tproject
::
where
(
'tp_project_type'
,
1
)
->
update
([
'tm_timesheet_master_sts'
=>
3
]);
->
where
(
'fk_tm_id'
,
$request
->
tid
)
->
first
();
if
(
$checkpmhod
)
{
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
3
,
'verifier_remark'
=>
'Verified'
,
]
);
}
else
{
Ts_master
::
where
(
'id'
,
$request
->
tid
)
->
update
([
'tm_timesheet_master_sts'
=>
3
]);
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
->
update
([
'td_timesheet_sts'
=>
3
]);
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
->
update
([
'tp_timesheet_sts'
=>
3
,
'tp_timesheet_sts'
=>
3
,
'verifier_remark'
=>
'Verified'
,
'verifier_remark'
=>
'Verified'
,
]
);
]
);
}
}
}
if
(
(
$roleid
!=
(
'9'
||
'2'
||
'8'
))
&&
(
data_get
(
$user
,
'penyokong'
)
==
'0'
)
)
if
(
(
$roleid
!=
(
'9'
||
'2'
||
'8'
))
&&
(
data_get
(
$user
,
'penyokong'
)
==
'0'
)
)
...
@@ -1651,6 +1675,46 @@ class DashboardController extends Controller
...
@@ -1651,6 +1675,46 @@ class DashboardController extends Controller
->
update
([
'tp_timesheet_sts'
=>
3
]
);
->
update
([
'tp_timesheet_sts'
=>
3
]
);
}
}
if
(
(
data_get
(
$user
,
'penyokong'
)
==
'0'
)
&&
(
data_get
(
$user
,
'fk_lkp_department'
)
==
'7'
))
{
// dd('bdd & takde penyokong')
$checkbdd
=
Tproject
::
where
(
'tp_project_type'
,
1
)
->
where
(
'fk_tm_id'
,
$request
->
tid
)
->
first
();
if
(
$checkbdd
)
{
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
3
,
'tp_verified_at'
=>
today
()
->
toDateString
(),
'verifier_remark'
=>
'verified'
,
]);
}
else
{
Ts_master
::
where
(
'id'
,
$request
->
tid
)
->
update
([
'tm_timesheet_master_sts'
=>
3
,
'tm_verified_at'
=>
today
()
->
toDateString
(),
]);
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
3
,
'tp_verified_at'
=>
today
()
->
toDateString
(),
'verifier_remark'
=>
'verified'
,
]);
}
}
// dd($user->penyokong);
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Timesheet has been submitted!'
);
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Timesheet has been submitted!'
);
}
}
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
0afec7d0
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/src/Model/Staff_info.php
View file @
0afec7d0
...
@@ -33,6 +33,16 @@ class Staff_info extends Model
...
@@ -33,6 +33,16 @@ class Staff_info extends Model
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'id'
,
'penyokong'
);
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'id'
,
'penyokong'
);
}
}
public
function
penyokong
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'id'
,
'penyokong'
);
}
public
function
pelulus
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'id'
,
'pelulus'
);
}
// public function infopelulus()
// public function infopelulus()
// {
// {
// return $this->hasOne('Portal\Timesheet\Model\Staff_info','id','pelulus');
// return $this->hasOne('Portal\Timesheet\Model\Staff_info','id','pelulus');
...
...
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