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
02b986e0
Commit
02b986e0
authored
Sep 28, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flow approval by bod & pd
parent
2924cdde
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
31 deletions
+71
-31
packages/portal/timesheet/resources/views/dashboard/approvalaction.blade.php
+6
-6
packages/portal/timesheet/resources/views/dashboard/projectVerify.blade.php
+7
-7
packages/portal/timesheet/resources/views/dashboard/timesheetApproval.blade.php
+0
-0
packages/portal/timesheet/routes/web.php
+0
-4
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+0
-0
packages/portal/timesheet/src/Http/Controllers/FormController.php
+10
-10
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+2
-2
packages/portal/timesheet/src/Model/Tproject.php
+1
-1
packages/portal/timesheet/src/Model/VwApprovalProfiles.php
+44
-0
packages/portal/timesheet/src/ServiceProvider.php
+1
-1
No files found.
packages/portal/timesheet/resources/views/dashboard/approvalaction.blade.php
View file @
02b986e0
...
@@ -3,30 +3,30 @@
...
@@ -3,30 +3,30 @@
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">
Staff Timesheet Approve / Reject
</a>
<a class="
ui
blue
left
ribbon
label
">
{
{data_get($profile,'tp_project_name')}
}
</a>
<br><br>
<br><br>
<form action="
{{
route
(
'timesheet::dashboard.approval'
)
}}
" method="
POST
" class="
ui
form
">
<form action="
{{
route
(
'timesheet::dashboard.approval'
)
}}
" method="
POST
" class="
ui
form
">
{
{csrf_field()}
}
{
{csrf_field()}
}
<input type="
hidden
" name="
t
mid
" value="
{{
data_get
(
$profile
,
'tm
id'
)
}}
">
<input type="
hidden
" name="
t
pid
" value="
{{
data_get
(
$profile
,
'
id'
)
}}
">
<div class="
six
wide
field
">
<div class="
six
wide
field
">
<label>Staff Name</label>
<label>Staff Name</label>
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'fullname'
)
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'
team.
fullname'
)
}}
">
</div>
</div>
<div class="
three
fields
">
<div class="
three
fields
">
<div class="
two
wide
field
">
<div class="
two
wide
field
">
<label>Year</label>
<label>Year</label>
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
m
_year'
)
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
p
_year'
)
}}
">
</div>
</div>
<div class="
two
wide
field
">
<div class="
two
wide
field
">
<label>Month</label>
<label>Month</label>
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
m
_month'
)
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
p
_month'
)
}}
">
</div>
</div>
<div class="
two
wide
field
">
<div class="
two
wide
field
">
<label>Phase</label>
<label>Phase</label>
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
m
_phase'
)
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
't
p
_phase'
)
}}
">
</div>
</div>
</div>
</div>
...
...
packages/portal/timesheet/resources/views/dashboard/projectVerify.blade.php
View file @
02b986e0
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
@if(
$status
== 1 ||
$status
== null) In Preparation
@if(
$status
== 1 ||
$status
== null) In Preparation
@elseif(
$verified
==
$allproject
) <i class="
green
check
icon
"></i> Verified by PM
@elseif(
$verified
==
$allproject
) <i class="
green
check
icon
"></i> Verified by PM
@elseif(
$status
== 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(
$status
== 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(
$status
== 4) <i class="
green
check
icon
"></i>Verified by
BO
D
@elseif(
$status
== 4) <i class="
green
check
icon
"></i>Verified by
P
D
@elseif(
$status
== 5) <i class="
red
attention
icon
"></i>Dissaproved by
BO
D
@elseif(
$status
== 5) <i class="
red
attention
icon
"></i>Dissaproved by
P
D
@elseif(
$status
== 6) <i class="
red
attention
icon
"></i>Rejected by
HOD/HOU
@elseif(
$status
== 6) <i class="
red
attention
icon
"></i>Rejected by
PM
@elseif(
$status
== 7) <i class="
red
attention
icon
"></i>Rejected by HR
@elseif(
$status
== 7) <i class="
red
attention
icon
"></i>Rejected by HR
@endif
@endif
</th>
</th>
...
@@ -67,10 +67,10 @@
...
@@ -67,10 +67,10 @@
<td style="
width
:
13
%
" class="
text
-
center
">
<td style="
width
:
13
%
" class="
text
-
center
">
@if(data_get(
$detail
, 'tp_timesheet_sts') == 1 || data_get(
$detail
, 'tp_timesheet_sts') == null) In Preparation
@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') == 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 3) <i class="
green
check
icon
"></i> Verified by
HOD/HOU
@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
BO
D
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 4) <i class="
green
check
icon
"></i>Verified by
P
D
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 5) <i class="
red
attention
icon
"></i>Dissaproved by
BO
D
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 5) <i class="
red
attention
icon
"></i>Dissaproved by
P
D
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 6) <i class="
red
attention
icon
"></i>Rejected by
HOD/HOU
@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
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 7) <i class="
red
attention
icon
"></i>Rejected by HR
@endif
@endif
</td>
</td>
...
...
packages/portal/timesheet/resources/views/dashboard/timesheetApproval.blade.php
View file @
02b986e0
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/routes/web.php
View file @
02b986e0
...
@@ -16,14 +16,11 @@ Route::group(
...
@@ -16,14 +16,11 @@ Route::group(
//dashboard
//dashboard
Route
::
get
(
'home'
,[
'uses'
=>
'DashboardController@index'
,
'as'
=>
'dashboard.index'
]);
Route
::
get
(
'home'
,[
'uses'
=>
'DashboardController@index'
,
'as'
=>
'dashboard.index'
]);
Route
::
get
(
'vwviewer'
,[
'uses'
=>
'DashboardController@vwviewer'
,
'as'
=>
'dashboard.vwviewer'
]);
Route
::
get
(
'vwviewer'
,[
'uses'
=>
'DashboardController@vwviewer'
,
'as'
=>
'dashboard.vwviewer'
]);
//timesheet
//timesheet
Route
::
get
(
'timesheetApproval'
,[
'uses'
=>
'DashboardController@timesheetApproval'
,
'as'
=>
'dashboard.timesheetApproval'
]);
Route
::
get
(
'timesheetApproval'
,[
'uses'
=>
'DashboardController@timesheetApproval'
,
'as'
=>
'dashboard.timesheetApproval'
]);
Route
::
get
(
'timesheetReport'
,[
'uses'
=>
'DashboardController@timesheetReport'
,
'as'
=>
'dashboard.timesheetReport'
]);
Route
::
get
(
'timesheetReport'
,[
'uses'
=>
'DashboardController@timesheetReport'
,
'as'
=>
'dashboard.timesheetReport'
]);
Route
::
get
(
'projectVerify'
,[
'uses'
=>
'DashboardController@projectVerify'
,
'as'
=>
'dashboard.projectVerify'
]);
Route
::
get
(
'projectVerify'
,[
'uses'
=>
'DashboardController@projectVerify'
,
'as'
=>
'dashboard.projectVerify'
]);
Route
::
get
(
'timesheetReview'
,[
'uses'
=>
'DashboardController@timesheetReview'
,
'as'
=>
'dashboard.timesheetReview'
]);
Route
::
get
(
'timesheetReview'
,[
'uses'
=>
'DashboardController@timesheetReview'
,
'as'
=>
'dashboard.timesheetReview'
]);
Route
::
get
(
'timesheetViewer'
,[
'uses'
=>
'DashboardController@timesheetViewer'
,
'as'
=>
'dashboard.timesheetViewer'
]);
Route
::
get
(
'timesheetViewer'
,[
'uses'
=>
'DashboardController@timesheetViewer'
,
'as'
=>
'dashboard.timesheetViewer'
]);
Route
::
get
(
'filterProjectVerify'
,[
'uses'
=>
'DashboardController@filterProjectVerify'
,
'as'
=>
'dashboard.filterProjectVerify'
]);
Route
::
get
(
'filterProjectVerify'
,[
'uses'
=>
'DashboardController@filterProjectVerify'
,
'as'
=>
'dashboard.filterProjectVerify'
]);
...
@@ -42,7 +39,6 @@ Route::group(
...
@@ -42,7 +39,6 @@ Route::group(
Route
::
post
(
'approval'
,
[
'uses'
=>
'DashboardController@approval'
,
'as'
=>
'dashboard.approval'
]);
Route
::
post
(
'approval'
,
[
'uses'
=>
'DashboardController@approval'
,
'as'
=>
'dashboard.approval'
]);
Route
::
post
(
'verifyoverhead'
,
[
'uses'
=>
'DashboardController@verifyoverhead'
,
'as'
=>
'dashboard.verifyoverhead'
]);
Route
::
post
(
'verifyoverhead'
,
[
'uses'
=>
'DashboardController@verifyoverhead'
,
'as'
=>
'dashboard.verifyoverhead'
]);
//laporan
//laporan
Route
::
get
(
'ringkasanLaporan'
,
[
'uses'
=>
'ReportController@ringkasanLaporan'
,
'as'
=>
'report.ringkasanLaporan'
]);
Route
::
get
(
'ringkasanLaporan'
,
[
'uses'
=>
'ReportController@ringkasanLaporan'
,
'as'
=>
'report.ringkasanLaporan'
]);
Route
::
post
(
'generateRingkasan'
,
[
'uses'
=>
'ReportController@generateRingkasan'
,
'as'
=>
'report.generateRingkasan'
]);
Route
::
post
(
'generateRingkasan'
,
[
'uses'
=>
'ReportController@generateRingkasan'
,
'as'
=>
'report.generateRingkasan'
]);
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
02b986e0
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
02b986e0
...
@@ -240,7 +240,7 @@ class FormController extends Controller
...
@@ -240,7 +240,7 @@ class FormController extends Controller
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updat
e
();
$checkTimesheetDetail
->
sav
e
();
}
}
else
else
...
@@ -279,7 +279,7 @@ class FormController extends Controller
...
@@ -279,7 +279,7 @@ class FormController extends Controller
if
(
$checktproject
)
{
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
updat
e
();
$checktproject
->
sav
e
();
}
}
else
else
{
{
...
@@ -315,7 +315,7 @@ class FormController extends Controller
...
@@ -315,7 +315,7 @@ class FormController extends Controller
$checktotalhours
=
Ts_master
::
where
(
'id'
,
$tmasterid
)
->
first
();
$checktotalhours
=
Ts_master
::
where
(
'id'
,
$tmasterid
)
->
first
();
$checktotalhours
->
tm_chargeable_hrs
=
$sumdetailhour
;
$checktotalhours
->
tm_chargeable_hrs
=
$sumdetailhour
;
$checktotalhours
->
tm_chargeable_days
=
$sumdetailhour
/
8.0
;
$checktotalhours
->
tm_chargeable_days
=
$sumdetailhour
/
8.0
;
$checktotalhours
->
updat
e
();
$checktotalhours
->
sav
e
();
return
redirect
()
->
route
(
'timesheet::form.chargeableForm'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
,
'year'
,
$request
->
year
])
->
with
(
'success'
,
'Timesheet Updated'
);
return
redirect
()
->
route
(
'timesheet::form.chargeableForm'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
,
'year'
,
$request
->
year
])
->
with
(
'success'
,
'Timesheet Updated'
);
}
}
...
@@ -812,7 +812,7 @@ class FormController extends Controller
...
@@ -812,7 +812,7 @@ class FormController extends Controller
{
{
$checkTimesheetDetail
->
td_hours
=
$day
;
$checkTimesheetDetail
->
td_hours
=
$day
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updat
e
();
$checkTimesheetDetail
->
sav
e
();
}
}
// dd($checkTimesheetDetail->td_hours);
// dd($checkTimesheetDetail->td_hours);
}
}
...
@@ -842,7 +842,7 @@ class FormController extends Controller
...
@@ -842,7 +842,7 @@ class FormController extends Controller
{
{
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updat
e
();
$checkTimesheetDetail
->
sav
e
();
$checkhours
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
$checkhours
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'fk_o_id'
,
$projectid
)
->
where
(
'fk_o_id'
,
$projectid
)
...
@@ -855,7 +855,7 @@ class FormController extends Controller
...
@@ -855,7 +855,7 @@ class FormController extends Controller
if
(
$checktproject
)
{
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
updat
e
();
$checktproject
->
sav
e
();
}
}
else
else
{
{
...
@@ -916,7 +916,7 @@ class FormController extends Controller
...
@@ -916,7 +916,7 @@ class FormController extends Controller
if
(
$checktproject
)
{
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
updat
e
();
$checktproject
->
sav
e
();
}
}
else
else
{
{
...
@@ -1002,7 +1002,7 @@ class FormController extends Controller
...
@@ -1002,7 +1002,7 @@ class FormController extends Controller
$checkTimesheetDetail
->
td_overhead_note
=
$request
->
description
;
$checkTimesheetDetail
->
td_overhead_note
=
$request
->
description
;
$checkTimesheetDetail
->
td_timesheet_sts
=
1
;
$checkTimesheetDetail
->
td_timesheet_sts
=
1
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
updat
e
();
$checkTimesheetDetail
->
sav
e
();
}
else
{
}
else
{
$pname
=
Overhead
::
where
(
'o_overhead_desc'
,
$request
->
task
)
$pname
=
Overhead
::
where
(
'o_overhead_desc'
,
$request
->
task
)
...
@@ -1150,7 +1150,7 @@ class FormController extends Controller
...
@@ -1150,7 +1150,7 @@ class FormController extends Controller
->
first
();
->
first
();
$data
->
td_overhead_note
=
$request
->
description
;
$data
->
td_overhead_note
=
$request
->
description
;
$data
->
updat
e
();
$data
->
sav
e
();
}
else
{
}
else
{
...
@@ -1180,7 +1180,7 @@ class FormController extends Controller
...
@@ -1180,7 +1180,7 @@ class FormController extends Controller
$data
->
td_overhead_note
=
$request
->
description
;
$data
->
td_overhead_note
=
$request
->
description
;
$data
->
td_timesheet_sts
=
1
;
$data
->
td_timesheet_sts
=
1
;
$data
->
updat
e
();
$data
->
sav
e
();
}
}
...
...
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
02b986e0
...
@@ -389,7 +389,7 @@ class MaintenanceController extends Controller
...
@@ -389,7 +389,7 @@ class MaintenanceController extends Controller
$team
->
updated_by
=
$userId
;
$team
->
updated_by
=
$userId
;
// letak query utk update role
// letak query utk update role
// $team->pt_role = $request->role;
// $team->pt_role = $request->role;
$team
->
updat
e
();
$team
->
sav
e
();
// $project = Pteam::where('fk_project_id',$request->pid)
// $project = Pteam::where('fk_project_id',$request->pid)
// ->get();
// ->get();
...
@@ -476,7 +476,7 @@ class MaintenanceController extends Controller
...
@@ -476,7 +476,7 @@ class MaintenanceController extends Controller
$data
->
status
=
$request
->
status
;
$data
->
status
=
$request
->
status
;
$data
->
updated_by
=
$userId
;
$data
->
updated_by
=
$userId
;
$data
->
updat
e
();
$data
->
sav
e
();
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiPeranan'
)
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiPeranan'
)
->
with
(
'success'
,
'Role Updated Successfully'
);
->
with
(
'success'
,
'Role Updated Successfully'
);
...
...
packages/portal/timesheet/src/Model/Tproject.php
View file @
02b986e0
...
@@ -23,7 +23,7 @@ class Tproject extends Model
...
@@ -23,7 +23,7 @@ class Tproject extends Model
public
function
project
()
public
function
project
()
{
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'td_project'
);
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'td_project'
)
->
with
(
'projectManager'
)
;
}
}
public
function
pm
()
public
function
pm
()
...
...
packages/portal/timesheet/src/Model/VwApprovalProfiles.php
0 → 100644
View file @
02b986e0
<?php
namespace
Portal\Timesheet\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Notifications\Notifiable
;
class
VwApprovalProfiles
extends
Model
{
use
Notifiable
;
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'vw_approval_profiles'
;
/**
* undocumented function
*
* @return void
* @author
**/
public
function
info
()
{
}
public
function
attachment
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\NotesAttachement'
,
'fk_timesheet_master'
,
'tmid'
);
}
public
function
team
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'staff_id'
,
'staffid'
);
}
public
function
tproject
()
{
return
$this
->
hasMany
(
'Portal\Timesheet\Model\Tproject'
,
'fk_tm_id'
,
'tmid'
);
}
}
packages/portal/timesheet/src/ServiceProvider.php
View file @
02b986e0
...
@@ -98,7 +98,7 @@ class ServiceProvider extends BaseServiceProvider
...
@@ -98,7 +98,7 @@ class ServiceProvider extends BaseServiceProvider
->
data
(
'icon'
,
'calendar alternate outline icon'
)
->
data
(
'icon'
,
'calendar alternate outline icon'
)
->
active
(
'timesheetReview/*'
)
->
active
(
'timesheetReview/*'
)
->
data
(
'permission'
,
Permission
::
kehadiran
);
->
data
(
'permission'
,
Permission
::
kehadiran
);
$form
->
add
(
__
(
'
Overhead
Approval'
),
route
(
'timesheet::dashboard.filterApproval'
))
$form
->
add
(
__
(
'
Timesheet
Approval'
),
route
(
'timesheet::dashboard.filterApproval'
))
->
data
(
'icon'
,
'calendar alternate outline icon'
)
->
data
(
'icon'
,
'calendar alternate outline icon'
)
->
active
(
'timesheetApproval/*'
)
->
active
(
'timesheetApproval/*'
)
->
data
(
'permission'
,
Permission
::
kehadiran
);
->
data
(
'permission'
,
Permission
::
kehadiran
);
...
...
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