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
6bda12c8
Commit
6bda12c8
authored
Nov 22, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new section in filter viewer page -> list timesheet
parent
e2afcfa5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
2 deletions
+54
-2
packages/portal/timesheet/resources/views/dashboard/filterViewer.blade.php
+43
-0
packages/portal/timesheet/resources/views/layouts/filtermonthphase.blade.php
+2
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+9
-2
No files found.
packages/portal/timesheet/resources/views/dashboard/filterViewer.blade.php
View file @
6bda12c8
...
@@ -3,3 +3,45 @@
...
@@ -3,3 +3,45 @@
@
section
(
'action'
)
@
section
(
'action'
)
<
form
class
="
ui
form
" action="
{{
route
(
'timesheet::dashboard.viewerselectmonthphase'
)
}}
" method="
POST
">
<
form
class
="
ui
form
" action="
{{
route
(
'timesheet::dashboard.viewerselectmonthphase'
)
}}
" method="
POST
">
@endsection
@endsection
@section('listts')
<div class="
ui
segment
">
<a class="
ui
purple
left
ribbon
label
">List Timesheet</a>
<br>
<table class="
ui
unstackable
celled
table
">
<thead>
<th class="
text
-
center
" style="
width
:
4
%
;
">No</th>
<th class="
text
-
center
">Phase</th>
<th class="
text
-
center
">Month</th>
<th class="
text
-
center
">Year</th>
<th class="
text
-
center
">Date Submit</th>
<th class="
text
-
center
">Status</th>
<th class="
text
-
center
">Action</th>
</thead>
<tbody>
@foreach(
$timesheets
as
$key
=>
$timesheet
)
<tr>
<td>
{
{$key+1}
}
</td>
<td class="
text
-
center
">@if(data_get(
$timesheet
,'tm_phase') == 1)1st Halfmonth @else 2nd Halfmonth @endif</td>
<td class="
text
-
center
">{{ date('F', mktime(0, 0, 0, data_get(
$timesheet
,'tm_month'), 10)) }}</td>
<td class="
text
-
center
">{{ data_get(
$timesheet
,'tm_year') }}</td>
<td class="
text
-
center
">{{ date("
d
/
m
/
Y
", strtotime(data_get(
$timesheet
,'tm_submission_at'))) }}</td>
<td class="
text
-
center
">
@if(data_get(
$timesheet
,'tm_timesheet_master_sts') == 2) Submitted
@elseif(data_get(
$timesheet
,'tm_timesheet_master_sts') == 3) Verified by HOD/PM
@elseif(data_get(
$timesheet
,'tm_timesheet_master_sts') == 4) Verified by BOD/PD
@elseif(data_get(
$timesheet
,'tm_timesheet_master_sts') == 5) Rejected by BOD/PD
@elseif(data_get(
$timesheet
,'tm_timesheet_master_sts') == 6) Rejected by HOD/PM
@endif
</td>
<td class="
text
-
center
">
<a class="
ui
purple
compact
icon
button
" href="
{{
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'phase'
=>
data_get
(
$timesheet
,
'tm_phase'
),
'month'
=>
data_get
(
$timesheet
,
'tm_month'
)]
)
}}
" target="
_blank
">
<i class="
eye
icon
"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection
\ No newline at end of file
packages/portal/timesheet/resources/views/layouts/filtermonthphase.blade.php
View file @
6bda12c8
...
@@ -49,4 +49,5 @@
...
@@ -49,4 +49,5 @@
</div>
</div>
@yield('draft')
@yield('draft')
@yield('listts')
@endsection
@endsection
\ No newline at end of file
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
6bda12c8
...
@@ -222,14 +222,21 @@ class DashboardController extends Controller
...
@@ -222,14 +222,21 @@ class DashboardController extends Controller
{
{
$currmonth
=
date
(
'n'
);
$currmonth
=
date
(
'n'
);
$curryear
=
date
(
'Y'
);
$curryear
=
date
(
'Y'
);
$month
=
[];
$month
=
[];
for
(
$m
=
1
;
$m
<=
12
;
$m
++
)
{
for
(
$m
=
1
;
$m
<=
12
;
$m
++
)
{
$month
[]
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$m
,
1
,
date
(
'Y'
)));
$month
[]
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$m
,
1
,
date
(
'Y'
)));
}
}
return
view
(
'timesheet::dashboard.filterViewer'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
));
$user
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
first
();
$timesheets
=
Ts_master
::
where
(
'tm_staff_id'
,
data_get
(
$user
,
'staff_id'
))
->
where
(
'tm_timesheet_master_sts'
,
'<>'
,
1
)
->
orderby
(
'tm_year'
,
'desc'
)
->
orderby
(
'tm_phase'
,
'desc'
)
->
orderby
(
'tm_year'
,
'desc'
)
->
get
();
return
view
(
'timesheet::dashboard.filterViewer'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
,
'timesheets'
));
}
}
public
function
filterProjectVerify
()
public
function
filterProjectVerify
()
...
...
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