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
918bd551
Commit
918bd551
authored
May 25, 2023
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ubah project under en fairuz ke verifier baru. (alter data dalam table)
parent
28f1e463
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
183 additions
and
2 deletions
+183
-2
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
+165
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+18
-2
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
View file @
918bd551
...
...
@@ -287,6 +287,171 @@
</div>
<!-- Staff Timesheet Section End -->
<!-- Project Verification Section Start -->
<?php
$others
=
null
;
foreach
(
$chargeprofile
as
$key
=>
$value
)
{
$others
=
$value
;
}
// dd($others);
?>
<div
class=
"ui segment"
>
<div
class=
"ui blue left ribbon label"
>
Project Verification
</div>
<br>
<br>
<div
class=
"ui styled fluid accordion"
>
<?php
$page
=
1
;
$project
=
$checksts
=
0
;
$notpms
=
$chargeprofile
->
where
(
'dept'
,
'<>'
,
4
);
?>
@if($others)
@foreach($notpms as $key => $staff)
<?php
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$approval
->
u_staffID
));
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$approval
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
?>
@endforeach
<!-- @if($project == $checksts)
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">All timesheet has been verified</th>
</tr>
</thead>
</table>
@endif -->
@foreach($notpms as $key => $staff)
<?php
// dd($notpms);
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$approval
->
u_staffID
));
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$approval
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
?>
@if($project == $checksts)
@else
<div
class=
"title"
>
<table
class=
"ui unstackable celled table"
>
<thead>
<tr>
<th
style=
"width: 40%;"
><i
class=
"dropdown icon"
></i>
{{ data_get($staff,'fullname') }}
</th>
<th
style=
"width: 20%"
class=
"text-center"
>
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th
style=
"width: 15%;"
class=
"center aligned"
>
<?php
// dd($notpms);
$status
=
$staff
->
status
;
$verified
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
$allproject
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
));
?>
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif($status == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif($status == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif($status == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@endif
</th>
<th
style=
"width: 13%"
class=
"text-center"
>
Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}
</th>
<th
style=
"width: 12%"
class=
"text-center"
>
<button
class=
"center aligned ui blue icon button"
>
View Details
</button>
</th>
</tr>
</thead>
</table>
</div>
<div
class=
"content"
style=
"padding-top: 0px;"
>
<form
class=
"ui form"
action=
"{{ route('timesheet::dashboard.selectverification') }}"
method=
"POST"
>
{{csrf_field()}}
<input
type=
"hidden"
name=
"tmid"
value=
"{{data_get($staff,'tmid')}}"
>
<input
type=
"hidden"
name=
"page"
value=
"{{$page}}"
>
<table
class=
"ui unstackable celled table"
>
<thead>
<tr>
<th
style=
"width: 10%;"
>
Project Code
</th>
<th
style=
"width: 15;"
>
Project Name
</th>
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Hours
</th>
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Days
</th>
<th
style=
"width: 30%"
>
Remarks
</th>
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
</tr>
</thead>
@php
$details = $chargedetails->where('tp_project_type', 1);
// dd($details);
@endphp
@foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr>
<td
style=
"width: 10%;"
class=
"single line"
>
@if(data_get($detail,'tp_timesheet_sts') == 2)
<div
class=
"ui toggle checkbox"
>
<input
type=
"checkbox"
name=
"pid[{{data_get($detail,'id')}}]"
value=
"{{data_get($detail,'id')}}"
>
</div>
@else
<div
class=
"ui toggle checkbox"
>
<input
type=
"checkbox"
disabled=
"disabled"
>
</div>
@endif
{{data_get($detail, 'project.p_project_code')}}
</td>
<td
style=
"width: 15;"
>
{{data_get($detail, 'project.p_project_description')}}
</td>
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($detail, 'tp_hours')}}
</td>
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
</td>
<td
style=
"width: 30%"
>
{{data_get($detail, 'verifier_remark')}}
</td>
<td
style=
"width: 13%"
class=
"text-center"
>
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($detail, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 3)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@endif
</td>
<td
style=
"width: 12%;"
class=
"text-center single line"
>
@if(data_get($detail, 'tp_timesheet_sts') == 2)
<button
class=
"center aligned ui green icon button"
onclick=
"window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year'), 'page' => $page]) }}';"
type=
"button"
>
Verify | Reject
</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a
class=
"center aligned ui blue icon button"
href=
"{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}"
target=
'_blank'
>
View
</a>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<button
type=
"submit"
class=
"center aligned ui green icon button"
>
Verify
</button>
<button
type=
"button"
class=
"center aligned ui green icon button"
onclick=
"window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';"
>
Verify All
</button>
</form>
</div>
@endif
@endforeach
@else
<table
class=
"ui unstackable celled table"
>
<thead>
<tr>
<th
class=
"text-center"
>
No pending verification
</th>
</tr>
</thead>
</table>
@endif
</div>
</div>
<!-- Project Verification Section End -->
<!-- Verification Section Start -->
@if(count($profile) > 0)
<div
class=
"ui segment"
>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
918bd551
...
...
@@ -38,7 +38,6 @@ use Auth;
class
DashboardController
extends
Controller
{
public
function
index
()
{
...
...
@@ -169,7 +168,24 @@ class DashboardController extends Controller
->
with
(
'attachement'
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardbod'
,
compact
(
'approval'
,
'profiles'
,
'detailsverification'
,
'checktd'
,
'profile'
,
'checkts'
,
'details'
));
$chargeprofile
=
VwChargeableVerification
::
select
(
'tmid'
,
'staff_id'
,
'year'
,
'month'
,
'phase'
,
'status'
,
'submission'
,
'fullname'
,
'pmstaffid'
,
'dept'
)
->
where
(
'pmstaffid'
,
$verifier
->
u_staffID
)
// ->where('status', '<>', 1)
->
whereIn
(
'status'
,
[
2
,
3
,
5
,
6
])
->
distinct
(
'staff_id'
)
->
orderby
(
'roleid'
)
->
with
(
'countchargeable'
)
->
with
(
'countoverhead'
)
// ->with('department')
->
get
();
$chargedetails
=
Tproject
::
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
// ->where('tp_timesheet_sts', 2)
->
with
(
'project'
)
->
with
(
'pm'
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardbod'
,
compact
(
'approval'
,
'profiles'
,
'detailsverification'
,
'checktd'
,
'profile'
,
'chargeprofile'
,
'chargedetails'
,
'checkts'
,
'details'
));
}
if
(
$roleid
==
'8'
)
{
...
...
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