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
4dec45f3
Commit
4dec45f3
authored
Aug 13, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in timesheet
parent
3b2235dd
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
477 additions
and
377 deletions
+477
-377
database/migrations/2022_08_11_153258_add_tp_project_type_in_timesheet_prj.php
+32
-0
database/migrations/2022_08_11_170728_add_fk_o_id_in_timesheet_prj.php
+32
-0
database/migrations/2022_08_12_111110_add_staff_id_column_in_timesheet_prj.php
+32
-0
packages/portal/timesheet/resources/views/ajax/senarainotes.blade.php
+1
-1
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
+2
-2
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
+6
-6
packages/portal/timesheet/resources/views/dashboard/revaction.blade.php
+7
-7
packages/portal/timesheet/resources/views/dashboard/staff.blade.php
+5
-20
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
+45
-101
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+32
-43
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+2
-2
packages/portal/timesheet/resources/views/form/nonChargeableForm.blade.php
+2
-34
packages/portal/timesheet/resources/views/form/notelist.blade.php
+6
-3
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+4
-59
packages/portal/timesheet/resources/views/form/penambahannote.blade.php
+1
-1
packages/portal/timesheet/resources/views/maintenance/editPeranan.blade.php
+2
-2
packages/portal/timesheet/resources/views/maintenance/editProjectTeam.blade.php
+5
-5
packages/portal/timesheet/resources/views/maintenance/editoverhead.blade.php
+25
-0
packages/portal/timesheet/resources/views/maintenance/penambahanProject.blade.php
+10
-9
packages/portal/timesheet/resources/views/maintenance/penambahanProjectTeam.blade.php
+8
-18
packages/portal/timesheet/resources/views/maintenance/senaraiOverhead.blade.php
+10
-4
packages/portal/timesheet/resources/views/maintenance/senaraiPeranan.blade.php
+7
-7
packages/portal/timesheet/resources/views/maintenance/updateProject.blade.php
+5
-5
packages/portal/timesheet/routes/web.php
+2
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+19
-20
packages/portal/timesheet/src/Http/Controllers/FormController.php
+123
-26
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+20
-1
packages/portal/timesheet/src/Model/VwReviewDetails.php
+31
-0
packages/portal/timesheet/src/ServiceProvider.php
+1
-1
No files found.
database/migrations/2022_08_11_153258_add_tp_project_type_in_timesheet_prj.php
0 → 100644
View file @
4dec45f3
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
AddTpProjectTypeInTimesheetPrj
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'tp_project_type'
)
->
after
(
'fk_tm_id'
)
->
unsigned
()
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'tp_project_type'
);
});
}
}
database/migrations/2022_08_11_170728_add_fk_o_id_in_timesheet_prj.php
0 → 100644
View file @
4dec45f3
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
AddFkOIdInTimesheetPrj
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'fk_o_id'
)
->
after
(
'td_project'
)
->
unsigned
()
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'fk_o_id'
);
});
}
}
database/migrations/2022_08_12_111110_add_staff_id_column_in_timesheet_prj.php
0 → 100644
View file @
4dec45f3
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
AddStaffIdColumnInTimesheetPrj
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'staffid'
)
->
after
(
'id'
)
->
unsigned
()
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'tp_staffid'
);
});
}
}
packages/portal/timesheet/resources/views/ajax/senarainotes.blade.php
View file @
4dec45f3
...
...
@@ -9,7 +9,7 @@
[
'header'
=>
__
(
'action'
),
'raw'
=>
function
(
$list
)
{
return
"
$list->id
data_get(
$list
,'id')
<i class='bordered yellow pencil icon edit_button'>
"
;
}
...
...
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
View file @
4dec45f3
@
if
(
$staffs
)
@
foreach
(
$staffs
as
$key
=>
$staff
)
<
div
class
="
item
" data-value="
{{
$staff
->
id
}}
" data-text="
{{
$staff
->
fullname
}}
">
{
{
$staff->fullname
}
}
<
div
class
="
item
" data-value="
{{
data_get
(
$staff
,
'id'
)
}}
" data-text="
{{
data_get
(
$staff
,
'fullname'
)
}}
">
{{
data_get(
$staff
,'fullname')
}}
</div>
@endforeach
@else
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
View file @
4dec45f3
...
...
@@ -53,9 +53,9 @@
<tbody>
@foreach(
$timesheet
as
$key
=>
$value
)
<tr>
<td>{{
$value->tm_year
}}</td>
<td>{{
$value->tm_month
}}</td>
<td>{{
$value->tm_phase
}}</td>
<td>{{
data_get(
$value
,'tm_year')
}}</td>
<td>{{
data_get(
$value
,'tm_month')
}}</td>
<td>{{
data_get(
$value
,'tm_phase')
}}</td>
<td>
@if(
$value->tm_timesheet_master_sts
== 1) Draft
@elseif(
$value->tm_timesheet_master_sts
== 2) Submitted
...
...
@@ -78,9 +78,9 @@
@elseif(
$value->tm_timesheet_master_sts
== 8) Revised the timesheet
@endif
</td>
<td>{{
$value->tm_submission_at
}}</td>
<td>{{
$value->tm_verified_at
}}</td>
<td>{{
$value->tm_approval_at
}}</td>
<td>{{
data_get(
$value
,'tm_submission_at')
}}</td>
<td>{{
data_get(
$value
,'tm_verified_at')
}}</td>
<td>{{
data_get(
$value
,'tm_approval_at')
}}</td>
</tr>
@endforeach
</tbody>
...
...
packages/portal/timesheet/resources/views/dashboard/revaction.blade.php
View file @
4dec45f3
...
...
@@ -8,33 +8,33 @@
<form action="
{{
route
(
'timesheet::dashboard.verify'
)
}}
" method="
POST
" class="
ui
form
">
{
{csrf_field()}
}
<input type="
hidden
" name="
tmid
" value="
{{
$profile
->
tmid
}}
">
<input type="
hidden
" name="
tmid
" value="
{{
data_get
(
$profile
,
'tmid'
)
}}
">
<div class="
six
wide
field
">
<label>Staff Name</label>
<input type="
text
" readonly="
readonly
" value="
{{
$profile
->
fullname
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'fullname'
)
}}
">
</div>
<div class="
three
fields
">
<div class="
two
wide
field
">
<label>Year</label>
<input type="
text
" readonly="
readonly
" value="
{{
$profile
->
tm_year
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'tm_year'
)
}}
">
</div>
<div class="
two
wide
field
">
<label>Month</label>
<input type="
text
" readonly="
readonly
" value="
{{
$profile
->
tm_month
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'tm_month'
)
}}
">
</div>
<div class="
two
wide
field
">
<label>Phase</label>
<input type="
text
" readonly="
readonly
" value="
{{
$profile
->
tm_phase
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$profile
,
'tm_phase'
)
}}
">
</div>
</div>
<div class="
two
fields
">
<div class="
six
wide
field
">
<input type="
hidden
" name="
verifier
" value="
{{
$hod
->
id
}}
">
<input type="
hidden
" name="
verifier
" value="
{{
data_get
(
$hod
,
'id'
)
}}
">
<label>Head of Department</label>
<input type="
text
" readonly="
readonly
" value="
{{
$hod
->
name
}}
">
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$hod
,
'name'
)
}}
">
</div>
<div class="
three
wide
field
">
<label>Action</label>
...
...
packages/portal/timesheet/resources/views/dashboard/staff.blade.php
View file @
4dec45f3
...
...
@@ -52,9 +52,9 @@
<tbody>
@foreach(
$timesheet
as
$key
=>
$value
)
<tr>
<td>{{
$value->tm_year
}}</td>
<td>{{
$value->tm_month
}}</td>
<td>{{
$value->tm_phase
}}</td>
<td>{{
data_get(
$value
,'tm_year')
}}</td>
<td>{{
data_get(
$value
,'tm_month')
}}</td>
<td>{{
data_get(
$value
,'tm_phase')
}}</td>
<td>
@if(
$value->tm_timesheet_master_sts
== 1) Draft
@elseif(
$value->tm_timesheet_master_sts
== 2) Submitted
...
...
@@ -77,8 +77,8 @@
@elseif(
$value->tm_timesheet_master_sts
== 8) Revised the timesheet
@endif
</td>
<td>{{
$value->tm_year
}}</td>
<td>{{
$value->tm_year
}}</td>
<td>{{
data_get(
$value
,'tm_year')
}}</td>
<td>{{
data_get(
$value
,'tm_year')
}}</td>
</tr>
@endforeach
</tbody>
...
...
@@ -87,19 +87,4 @@
</div>
@endsection
<!-- <a class="
ui
blue
left
ribbon
label
">Pengguna</a>
<br>
<br>
{!!
Suitable::source(
$user
)
->title(__('Senarai Pengguna'))
->columns([
new \Laravolt\Suitable\Columns\Numbering(__('No')),
['header' => __('name'), 'field' => 'name', 'sortable' => true],
['header' => __('status'), 'field' => 'status', 'sortable' => true],
['header' => __('email'), 'field' => 'email']
])
->render()
!!}
<br> -->
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
View file @
4dec45f3
...
...
@@ -17,11 +17,11 @@
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th colspan="
3
" style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>
{
{
$staff->fullname
}
}
</th>
<th colspan="
3
" style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{
data_get(
$staff
,'fullname')
}}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(
$staff->status
== 1 ||
$staff->status
== null) In Preparation
@elseif(
$staff->status
== 2) Submitted
@elseif(
$staff->status
== 3) Verified by HOD
@elseif(
$staff->status
== 2)
<i class="
red
attention
icon
"></i>
Submitted
@elseif(
$staff->status
== 3)
<i class="
green
check
icon
"></i>
Verified by HOD
@elseif(
$staff->status
== 4) Verified by BOD
@endif
</th>
...
...
@@ -35,11 +35,11 @@
</th>
</tr>
<tr>
<td style="
width
:
20
%
;
">Chargeable (A) :
{
{
$staff->chargeable
}
}
</td>
<td style="
width
:
20
%
;
">Nonchargeable (B) :
{
{
$staff->nonchargeable
}
}
</td>
<td style="
width
:
20
%
;
">Overhead (C) :
{
{
$staff->overhead
}
}
</td>
<td style="
width
:
15
%
;
">Overtime:
{
{
$staff->overtime
}
}
</td>
<td class="
right
aligned
">Total Hours/Days: {{
$staff->totalhrs."
hours
/
".
$staff->totaldays
."
days
"
}}</td>
<td style="
width
:
20
%
;
">Chargeable (A) : {{
data_get(
$staff
,'chargeable')
}}</td>
<td style="
width
:
20
%
;
">Nonchargeable (B) : {{
data_get(
$staff
,'nonchargeable')
}}</td>
<td style="
width
:
20
%
;
">Overhead (C) : {{
data_get(
$staff
,'overhead')
}}</td>
<td style="
width
:
15
%
;
">Overtime: {{
data_get(
$staff
,'overtime')
}}</td>
<td class="
right
aligned
">Total Hours/Days: {{
data_get(
$staff
,'totalhrs')."
hours
/
".data_get(
$staff
,'totaldays')."
days
"
}}</td>
</tr>
</thead>
</table>
...
...
@@ -49,10 +49,8 @@
$cptype
= "
A
";
$ncptype
= "
B
";
$otype
= "
C
";
$pcode
=
$pname
=
$pm
="";
$td
=
$checktd->where
('tm_staff_id',
$staff->staff_id
);
$checkcpt
=
$cpt->where
('pt_staff_id',
$staff->staff_id
);
$checkncpt
=
$ncpt->where
('pt_staff_id',
$staff->staff_id
);
$td
=
$checktd->where
('tm_staff_id',
$staff->staff_id
);
$detail
=
$details->where
('staffid',
$staff->staff_id
);
?>
<div class="
content
" style="
padding
-
top
:
0
px
;
">
...
...
@@ -68,99 +66,45 @@
<th style="
width
:
25
%
;
" class="
center
aligned
">Remarks</th>
</tr>
</thead>
@if(
$checkcpt
)
@foreach (
$checkcpt
as
$key
=>
$cptval
)
@if(
$cptval->pt_staff_id
==
$staff->staff_id
)
<?php
$pname
=
$cptval->pt_project_description
; ?>
@endif
@foreach (
$cp
as
$key
=>
$cpvalue
)
@if(
$cpvalue->p_project_description
==
$pname
)
<?php
$pcode
=
$cpvalue->p_project_code
; ?>
@endif
@endforeach
@if(
$detail->where
('ptype', 1))
@foreach(
$detail->where
('ptype', 1) as
$key
=>
$chargeable
)
<tr>
<td style="
width
:
5
%
;
" class="
center
aligned
">{{
$cptype
}}</td>
<td style="
width
:
15
%
;
">{{
$pcode
}}</td>
<td style="
width
:
20
%
;
">{{
$pname
}}</td>
<td style="
width
:
20
%
;
">
@foreach (
$cp
as
$key
=>
$cpvalue
)
@if(
$cpvalue->p_project_description
==
$pname
)
@foreach (
$pmname
as
$key
=>
$pmvalue
)
@if(
$pmvalue->staff_id
==
$cpvalue->p_project_task_team
)
<?php
$pm
=
$pmvalue->fullname
; ?>
{{
$pm
}}
@endif
@endforeach
@endif
@endforeach
</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">
<?php
$totalc
=0; ?>
@foreach(
$td
as
$key
=>
$tdvalues
)
@if(
$cptval->fk_project_id
==
$tdvalues->td_project
)
<?php
$totalc
+=
$tdvalues->td_hours
;?>
@endif
@endforeach
{{
$totalc
}}
</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
$totalc
/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
">Remarks</td>
<td style="
width
:
15
%
;
">{{ data_get(
$chargeable
, 'pcode') }}</td>
<td style="
width
:
20
%
;
">{{ data_get(
$chargeable
, 'pname') }}</td>
<td style="
width
:
20
%
;
">{{ data_get(
$chargeable
, 'pmname') }}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{ data_get(
$chargeable
, 'hours') }}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{ data_get(
$chargeable
, 'hours')/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
"></td>
</tr>
@endforeach
@endif
@if(
$checkncpt
)
@foreach (
$checkncpt
as
$key
=>
$ncptval
)
<tr>
<td style="
width
:
5
%
;
" class="
center
aligned
">{{
$ncptype
}}</td>
<td style="
width
:
15
%
;
"> - </td>
<td style="
width
:
20
%
;
">{{
$ncptval->pt_project_description
}}</td>
<td style="
width
:
20
%
;
"> - </td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">
<?php
$totalnc
=0; ?>
@foreach(
$td
as
$key
=>
$tdval
)
@if(
$tdval->td_project
==
$ncptval->fk_project_id
)
<?php
$totalnc
+=
$tdval->td_hours
; ?>
@endif
@endforeach
{{
$totalnc
}}
</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
$totalnc
/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
">Remarks</td>
</tr>
@endforeach
@endif
<?php
$ovhd
=
$td->where
('td_project_type', 3); ?>
<?php
$overheadtemp[0]
=
$overheadtask[0]
= ""; ?>
@if(
$ovhd
)
@foreach(
$ovhd
as
$key
=>
$overhead
)
@endforeach
@endif
@if(
$detail->where
('ptype', 2))
@foreach(
$detail->where
('ptype', 2) as
$key
=>
$nonchargeable
)
<tr>
<td style="
width
:
5
%
;
" class="
center
aligned
">{{
$ncptype
}}</td>
<td style="
width
:
15
%
;
">{{ data_get(
$nonchargeable
, 'pcode') }}</td>
<td style="
width
:
20
%
;
">{{ data_get(
$nonchargeable
, 'pname') }}</td>
<td style="
width
:
20
%
;
">{{ data_get(
$nonchargeable
, 'pmname') }}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{ data_get(
$nonchargeable
, 'hours') }}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{ data_get(
$nonchargeable
, 'hours')/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
"></td>
</tr>
@endforeach
@endif
@if(
$detail->where
('ptype', 3))
@foreach(
$detail->where
('ptype', 3) as
$key
=>
$chargeable
)
<tr>
<td style="
width
:
5
%
;
" class="
center
aligned
">{{
$otype
}}</td>
<td style="
width
:
15
%
;
">
-
</td>
<td style="
width
:
20
%
;
">{{
$overhead->td_overhead_desc
}}</td>
<td style="
width
:
20
%
;
">
-
</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
$overhead->td_hours
}}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
$overhead->td_hours
/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
">
Remarks
</td>
<td style="
width
:
15
%
;
">
{{ data_get(
$chargeable
, 'pcode') }}
</td>
<td style="
width
:
20
%
;
">{{
data_get(
$chargeable
, 'pname')
}}</td>
<td style="
width
:
20
%
;
">
{{ data_get(
$chargeable
, 'pmname') }}
</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
data_get(
$chargeable
, 'hours')
}}</td>
<td style="
width
:
7.5
%
;
" class="
center
aligned
">{{
data_get(
$chargeable
, 'hours')
/8 }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
"></td>
</tr>
@endforeach
@endif
@endforeach
@endif
</table>
<table class="
ui
unstackable
celled
table
">
...
...
@@ -174,8 +118,8 @@
@foreach(
$td
as
$key
=>
$value
)
@if(
$value->td_overhead_note
)
<tr>
<td style="
width
:
15
%
" class="
center
aligned
">{{
$value->td_date
}}</td>
<td>{{
$value->td_overhead_note
}}</td>
<td style="
width
:
15
%
" class="
center
aligned
">{{
data_get(
$value
,'td_date')
}}</td>
<td>{{
data_get(
$value
,'td_overhead_note')
}}</td>
</tr>
@endif
@endforeach
...
...
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
4dec45f3
...
...
@@ -18,20 +18,20 @@
</td>
<td>Name</td>
<td>:</td>
<td>{{
$profile->STAFF_NAME
}}</td>
<td>{{
data_get(
$profile
,'STAFF_NAME')
}}</td>
<td rowspan="
3
"></td>
<td>Department</td>
<td>:</td>
<td>{{
$profile->DEPARTMENT
}}</td>
<td>{{
data_get(
$profile
,'DEPARTMENT')
}}</td>
<td rowspan="
3
"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>{{
$profile->STAFF_ID
}}</td>
<td>{{
data_get(
$profile
,'STAFF_ID')
}}</td>
<td>Reporting Manager</td>
<td>:</td>
<td>{{
$profile->HOD_NAME
}}</td>
<td>{{
data_get(
$profile
,'HOD_NAME')
}}</td>
</tr>
<tr>
<td>Month</td>
...
...
@@ -111,7 +111,7 @@
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">{{
$valchargehour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valchargehour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
...
...
@@ -136,7 +136,7 @@
?>
@if(
$valchargehour
)
<td style="
width
:
4
%
;
">{{
$valchargehour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valchargehour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
...
...
@@ -168,7 +168,7 @@
->where('tm_phase',
$phase
);
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+=
$value->td_hours
;
$totalcbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -184,7 +184,7 @@
->where('tm_phase',
$phase
);
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+=
$value->td_hours
;
$totalcbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -265,7 +265,7 @@
?>
@if(
$valnonchargehour
)
<td style="
width
:
4
%
;
">{{
$valnonchargehour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valnonchargehour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
...
...
@@ -291,7 +291,7 @@
?>
@if(
$valnonchargehour
)
<td style="
width
:
4
%
;
">{{
$valnonchargehour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valnonchargehour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
"></td>
@endif
...
...
@@ -322,7 +322,7 @@
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -338,7 +338,7 @@
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -416,7 +416,7 @@
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{
$valoverheadhour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valoverheadhour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
">0</td>
@endif
...
...
@@ -441,7 +441,7 @@
?>
@if(
$valoverheadhour
)
<td style="
width
:
4
%
;
">{{
$valoverheadhour->td_hours
}}</td>
<td style="
width
:
4
%
;
">{{
data_get(
$valoverheadhour
,'td_hours')
}}</td>
@else
<td style="
width
:
4
%
;
">0</td>
@endif
...
...
@@ -472,7 +472,7 @@
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -488,7 +488,7 @@
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
?>
...
...
@@ -516,8 +516,8 @@
@if(
$notes
)
@foreach(
$notes
as
$key
=>
$value
)
<tr>
<td>{{
$value->td_date
}}</td>
<td>{{
$value->td_overhead_note
}}</td>
<td>{{
data_get(
$value
,'td_date')
}}</td>
<td>{{
data_get(
$value
,'td_overhead_note')
}}</td>
</tr>
@endforeach
@endif
...
...
@@ -549,7 +549,7 @@
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -558,7 +558,7 @@
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -580,7 +580,7 @@
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -589,7 +589,7 @@
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -621,7 +621,7 @@
$valcbyday
=
$chargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+=
$value->td_hours
;
$totalcbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -629,7 +629,7 @@
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -637,7 +637,7 @@
$valoverheadbyday
=
$overheadhour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -668,7 +668,7 @@
$valcbyday
=
$chargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valcbyday
as
$key
=>
$value
) {
$totalcbyday
+=
$value->td_hours
;
$totalcbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -676,7 +676,7 @@
$valncbyday
=
$nonchargehour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valncbyday
as
$key
=>
$value
) {
$totalncbyday
+=
$value->td_hours
;
$totalncbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -684,7 +684,7 @@
$valoverheadbyday
=
$overheadhour->where
('td_date','=',
$date
)
->where('tm_phase',
$phase
);
foreach(
$valoverheadbyday
as
$key
=>
$value
) {
$totaloverheadbyday
+=
$value->td_hours
;
$totaloverheadbyday
+=
data_get(
$value
,'td_hours')
;
}
}
...
...
@@ -728,21 +728,10 @@
<tbody>
<tr>
<?php
$verifiername
=
$approvalname
= ""; ?>
<td class="
center
aligned
">@if(
$check
){{
$check->tm_submission_at
}}@endif</td>
<td class="
center
aligned
">@if(
$check
){{
$profile->HOD_NAME
}}@endif</td>
<td class="
center
aligned
">@if(
$check
){{
$check->tm_verified_at
}}@endif</td>
<td class="
center
aligned
">
@if(
$check
)
<?php
foreach (
$bod
as
$key
=>
$value
) {
if (
$check->tm_approved_by
==
$value->id
) {
$approvalname
=
$value->fullname
;
}
}
?>
{
{$approvalname}
}
@endif
</td>
<td class="
center
aligned
">@if(
$check
){{ data_get(
$check
,'tm_submission_at') }}@endif</td>
<td class="
center
aligned
">@if(
$check->tm_verified_by
){{ data_get(
$profile
,'HOD_NAME') }}@endif</td>
<td class="
center
aligned
">@if(
$check
){{ data_get(
$check
,'tm_verified_at') }}@endif</td>
<td class="
center
aligned
">@if(
$check->tm_approved_by
){{ data_get(
$profile
,'BOD_NAME') }}@endif</td>
<td class="
center
aligned
">@if(
$check
)
{
{$check->tm_approved_at}
}
@endif</td>
</tr>
</tbody>
...
...
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
4dec45f3
...
...
@@ -19,7 +19,7 @@ input[type=number] {
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Chargeable Form</a>
<br>
<br>
<
!-- <
br>
<form class="
ui
form
">
<div class="
field
">
<div class="
three
fields
">
...
...
@@ -37,7 +37,7 @@ input[type=number] {
</div>
</div>
</div>
</form>
</form>
-->
<br>
@if(
$phase
== 1)
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" id="
phase2
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => 2, '
month
' => $month, '
year
' => $year]) }}'
;
">
...
...
packages/portal/timesheet/resources/views/form/nonChargeableForm.blade.php
View file @
4dec45f3
...
...
@@ -34,10 +34,10 @@ input[type=number] {
<div class="
default
text
">Task</div>
<div class="
menu
">
@foreach(
$nonchargeables
as
$key
=>
$nonchargeable
)
<div class="
item
" data-value="
{{
$nonchargeable
->
id
}}
">
<div class="
item
" data-value="
{{
data_get
(
$nonchargeable
,
'id'
)
}}
">
@foreach(
$pcodes
as
$key
=>
$value
)
@if(
$value->p_project_description
==
$nonchargeable->p_project_description
)
{{
$value->p_project_code
}} -
{{
data_get(
$value
, 'p_project_code')
}} -
@endif
@endforeach
{{ data_get(
$nonchargeable
, 'p_project_description')}}
...
...
@@ -67,25 +67,6 @@ input[type=number] {
<a class="
ui
blue
left
ribbon
label
">Non-Chargeable Form</a>
<br>
<br>
<form class="
ui
form
">
<div class="
field
">
<div class="
three
fields
">
<div class="
one
wide
field
">
<label>Phase</label>
<input type="
text
" placeholder="
Year
" value="
{{
$phase
}}
" readonly="
readonly
">
</div>
<div class="
one
wide
field
">
<label>Month</label>
<input type="
text
" placeholder="
Month
" value="
{{
$month
}}
" readonly="
readonly
">
</div>
<div class="
two
wide
field
">
<label>Year</label>
<input type="
text
" placeholder="
Year
" value="
{{
$year
}}
" readonly="
readonly
">
</div>
</div>
</div>
</form>
<br>
@if(
$phase
== 1)
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" id="
phase2
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
nonChargeableForm
', ['
phase
' => 2, '
month
' => $month, '
year
' => $year]) }}'
;
">
...
...
@@ -314,19 +295,6 @@ input[type=number] {
console
.
log
(
"currenttotal --> "
+
currenttotal
);
// var currentTtotal = document.getElementById('total-'+pid).value;
// var total = document.getElementById('total-'+pid).value;
// if(total == null || total == 0){
// total = 0;
// }else{
// total = document.getElementById('total-'+pid).value;
// }
// if (input.value < 0) input.value = 0;
// if (input.value > 24) input.value = 24
// else total = Number(input.value)+Number(currentTtotal);
document
.
getElementById
(
'total-'
+
pid
)
.
value
=
currenttotal
;
}
</
script
>
...
...
packages/portal/timesheet/resources/views/form/notelist.blade.php
View file @
4dec45f3
...
...
@@ -4,8 +4,11 @@
<
div
class
="
ui
unstackable
segment
">
<a class="
ui
blue
left
ribbon
label
">Senarai Notes</a>
<a href="
{{
route
(
'timesheet::form.penambahannote'
)
}}
" class="
ui
right
floated
small
primary
labeled
icon
button
">
<i class="
plus
icon
"></i>Add New Project
<a href="
{{
route
(
'timesheet::form.penambahannote'
)
}}
" class="
ui
right
floated
small
yellow
labeled
icon
button
">
<i class="
plus
icon
"></i>Add New Notes
</a>
<a href="
{{
route
(
'timesheet::form.penambahannote'
)
}}
" class="
ui
right
floated
small
yellow
labeled
icon
button
">
<i class="
plus
icon
"></i>Add New Notes
</a><br>
<table class="
ui
celled
padded
table
">
...
...
@@ -30,7 +33,7 @@
</table>
<button class="
center
aligned
ui
teal
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
overheadForm
', ['
phase
' => $phase, '
month
' => $month]) }}'
;
">
<i class="
angle
double
left
icon
"></i>
Back
Overhead Form
</button>
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetViewer
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
4dec45f3
...
...
@@ -21,47 +21,10 @@ input[type=number] {
</div>
</div>
<!-- <div class="
ui
tiny
modal
description
">
<div class="
header
">
Overhead Description
</div>
<div class="
content
">
<form class="
ui
form
" action="
{{
route
(
'timesheet::form.addOverheadDescription'
)
}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
userId
" value="
{{
$userId
}}
">
<input type="
hidden
" name="
year
" value="
{{
$year
}}
">
<input type="
hidden
" name="
month
" value="
{{
$month
}}
">
<input type="
hidden
" name="
phase
" value="
{{
$phase
}}
">
<div class="
two
fields
">
<div class="
six
wide
field
">
<label>Task</label>
<select class="" name="
task
" required="
required
">
<option value="">Task</option>
@foreach(
$project
as
$key
=>
$value
)
<option value="
{{
$value
->
o_overhead_desc
}}
">
{
{$value->o_overhead_desc}
}
</option>
@endforeach
</select>
</div>
<div class="
five
wide
field
">
<label>Date</label>
<input type="
date
" name="
date
" required>
</div>
</div>
<div class="
field
">
<label>Description</label>
<textarea rows="
3
" name="
description
" required></textarea>
</div>
<button class="
ui
close
button
">Cancel</button>
<button class="
ui
blue
button
" type="
submit
">Submit</button>
</form>
</div>
</div> -->
<div class="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Overhead Form</a>
<br>
<br>
<form class="
ui
form
">
<!-- <form class="
ui
form
">
<div class="
field
">
<div class="
three
fields
">
<div class="
one
wide
field
">
...
...
@@ -78,13 +41,8 @@ input[type=number] {
</div>
</div>
</div>
</form>
</form>
-->
<br>
<!-- <button class="
center
aligned
ui
green
compact
labeled
icon
button
" id="
description
">
<i class="
plus
icon
"></i>
Description
</button> -->
@if(
$phase
== 1)
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" id="
phase2
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
overheadForm
', ['
phase
' => 2, '
month
' => $month, '
year
' => $year]) }}'
;
">
...
...
@@ -178,7 +136,7 @@ input[type=number] {
}
?>
<td >
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@endfor
...
...
@@ -201,7 +159,7 @@ input[type=number] {
}
?>
<td >
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
data_get
(
$valuehour
,
'td_hours'
)
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@endfor
...
...
@@ -357,19 +315,6 @@ input[type=number] {
console
.
log
(
"currenttotal --> "
+
currenttotal
);
// var currentTtotal = document.getElementById('total-'+pid).value;
// var total = document.getElementById('total-'+pid).value;
// if(total == null || total == 0){
// total = 0;
// }else{
// total = document.getElementById('total-'+pid).value;
// }
// if (input.value < 0) input.value = 0;
// if (input.value > 24) input.value = 24
// else total = Number(input.value)+Number(currentTtotal);
document
.
getElementById
(
'total-'
+
pid
)
.
value
=
currenttotal
;
}
</
script
>
...
...
packages/portal/timesheet/resources/views/form/penambahannote.blade.php
View file @
4dec45f3
...
...
@@ -15,7 +15,7 @@
<label>Task</label>
<select name="
task
" class="
ui
fluid
dropdown
">
@foreach(
$task
as
$key
=>
$value
)
<option value="
{{
$value
->
id
}}
">
{
{
$value->o_overhead_desc
}
}
</option>
<option value="
{{
$value
->
id
}}
">
{
{
data_get($value,'o_overhead_desc')
}
}
</option>
@endforeach
<option value="
0
">Others</option>
</select>
...
...
packages/portal/timesheet/resources/views/maintenance/editPeranan.blade.php
View file @
4dec45f3
...
...
@@ -6,10 +6,10 @@
<br><br>
<form class="
ui
form
" action="
{{
route
(
'timesheet::maintenance.updaterole'
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
id
" value="
{{
$role
->
id
}}
">
<input type="
hidden
" name="
id
" value="
{{
data_get
(
$role
,
'id'
)
}}
">
<div class="
field
">
<label>Role Description</label>
<input type="
text
" name="
role
" value="
{{
$role
->
role
}}
">
<input type="
text
" name="
role
" value="
{{
data_get
(
$role
,
'role'
)
}}
">
</div>
<div class="
field
">
<label>Role Status</label>
...
...
packages/portal/timesheet/resources/views/maintenance/editProjectTeam.blade.php
View file @
4dec45f3
...
...
@@ -7,18 +7,18 @@
<br><br>
<form class="
ui
form
" action="
{{
route
(
'timesheet::maintenance.updateprojectteam'
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
id
" value="
{{
$team
->
id
}}
">
<input type="
hidden
" name="
pid
" value="
{{
$team
->
fk_project_id
}}
">
<input type="
hidden
" name="
id
" value="
{{
data_get
(
$team
,
'id'
)
}}
">
<input type="
hidden
" name="
pid
" value="
{{
data_get
(
$team
,
'fk_project_id'
)
}}
">
<div class="
field
">
<label for="
projectteam
">Project Team</label>
<input type="
text
" name="
projectteam
" value="
{{
$team
->
pt_team
}}
" readonly="
readonly
">
<input type="
text
" name="
projectteam
" value="
{{
data_get
(
$team
,
'pt_team'
)
}}
" readonly="
readonly
">
</div>
<div class="
field
">
<label>Role</label>
<select name="
role
" class="
ui
fluid
dropdown
">
<option value="
{{
$team
->
role_id
}}
">
{
{$teamRole->role
}
}
</option>
<option value="
{{
data_get
(
$team
,
'role_id'
)}}
">
{
{data_get($teamRole,'role')
}
}
</option>
@foreach(
$role
as
$key
=>
$value
)
<option value="
{{
$value
->
id
}}
">
{
{$value->role
}
}
</option>
<option value="
{{
data_get
(
$value
,
'id'
)}}
">
{
{data_get($value,'role')
}
}
</option>
@endforeach
</select>
</div>
...
...
packages/portal/timesheet/resources/views/maintenance/editoverhead.blade.php
0 → 100644
View file @
4dec45f3
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Edit Overhead</a>
<br><br>
<form class="
ui
form
" action="
{{
route
(
'timesheet::maintenance.updateoverhead'
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
id
" value="
{{
data_get
(
$data
,
'id'
)}}
">
<div class="
field
">
<label>Overhead Description</label>
<input type="
text
" name="
description
" value="
{{
data_get
(
$data
,
'o_overhead_desc'
)
}}
">
</div>
<div class="
field
">
<label>Role Status</label>
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="
1
">Active</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
green
button
" type="
submit
">Update</button>
</form>
</div>
@endsection
\ No newline at end of file
packages/portal/timesheet/resources/views/maintenance/penambahanProject.blade.php
View file @
4dec45f3
...
...
@@ -6,27 +6,28 @@
<br><br>
<form class="
ui
form
" action="
{{
route
(
'timesheet::maintenance.addnewproject'
)}}
" method="
POST
">
{
{csrf_field()}
}
<div class="
field
">
<label>Project Code</label>
<input type="
text
" name="
projectcode
" placeholder="
Project
Code
">
</div>
<div class="
field
">
<label>Project Name</label>
<input type="
text
" name="
projectname
" placeholder="
Project
Name
">
<div class="
two
fields
">
<div class="
five
wide
field
">
<label>Project Code</label>
<input type="
text
" name="
projectcode
" placeholder="
Project
Code
">
</div>
<div class="
five
wide
field
">
<label>Project Name</label>
<input type="
text
" name="
projectname
" placeholder="
Project
Name
">
</div>
</div>
<div class="
field
">
<label>Project Manager</label>
<select name="
projectmanager
" class="
ui
fluid
dropdown
">
<option value="">Project Manager</option>
@foreach(
$pm
as
$key
=>
$value
)
<option value="
{{
$value
->
staff_id
}}
">
{
{$value->fullname
}
}
</option>
<option value="
{{
data_get
(
$value
,
'staff_id'
)}}
">
{
{data_get($value,'fullname')
}
}
</option>
@endforeach
</select>
</div>
<div class="
field
">
<label>Project Status</label>
<select name="
status
" class="
ui
fluid
dropdown
">
<!-- <option value="">Project Status</option> -->
<option value="
1
">Active</option>
<option value="
0
">Inactive</option>
</select>
...
...
packages/portal/timesheet/resources/views/maintenance/penambahanProjectTeam.blade.php
View file @
4dec45f3
...
...
@@ -7,18 +7,18 @@
<form class="
ui
form
" action="
{{
route
(
'timesheet::maintenance.addprojectteam'
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
pid
" value="
{{
$pid
}}
">
<input type="
hidden
" name="
pcode
" value="
{{
$project
->
p_project_code
}}
">
<input type="
hidden
" name="
pname
" value="
{{
$project
->
p_project_description
}}
">
<input type="
hidden
" name="
pcode
" value="
{{
data_get
(
$project
,
'p_project_code'
)
}}
">
<input type="
hidden
" name="
pname
" value="
{{
data_get
(
$project
,
'p_project_description'
)
}}
">
<div class="
field
">
<label>Project Code</label>
<input onselect="
myDepartment
()
" type="
text
" name="
projectcode
" placeholder="
Project
Code
" value="
{{
$project
->
p_project_code
}}
|
{{
$project
->
p_project_description
}}
" readonly="
readonly
">
<input onselect="
myDepartment
()
" type="
text
" name="
projectcode
" placeholder="
Project
Code
" value="
{{
data_get
(
$project
,
'p_project_code'
)
}}
|
{{
data_get
(
$project
,
'p_project_description'
)
}}
" readonly="
readonly
">
</div>
<div class="
field
">
<label>Department</label>
<select onchange="
selectDepartment
(
value
);
" name="
department
" id="
department
" class="
ui
fluid
dropdown
">
<option value="">Department</option>
@foreach(
$departments
as
$key
=>
$department
)
<option value="
{{
$department
->
id
}}
">
{
{$department->code}
}
|
{
{$department->description
}
}
</option>
<option value="
{{
data_get
(
$department
,
'id'
)}}
">
{
{data_get($department,'code')}
}
|
{
{data_get($department,'description')
}
}
</option>
@endforeach
</select>
</div>
...
...
@@ -30,8 +30,8 @@
<div class="
default
text
">Staff Name</div>
<div class="
menu
" id="
divstaff
" name="
divstaff
">
@foreach(
$staffs
as
$key
=>
$staff
)
<div class="
item
" data-value="
{{
$staff
->
id
}}
" data-text="
{{
$staff
->
fullname
}}
">
{
{
$staff->fullname
}
}
<div class="
item
" data-value="
{{
data_get
(
$staff
,
'id'
)}}
" data-text="
{{
data_get
(
$staff
,
'fullname'
)
}}
">
{
{
data_get($staff,'fullname')
}
}
</div>
@endforeach
</div>
...
...
@@ -42,7 +42,7 @@
<select name="
role
" class="
ui
fluid
dropdown
">
<option value="">Role</option>
@foreach(
$roles
as
$key
=>
$role
)
<option value="
{{
$role
->
id
}}
">
{
{$role->role
}
}
</option>
<option value="
{{
data_get
(
$role
,
'id'
)}}
">
{
{data_get($role,'role')
}
}
</option>
@endforeach
</select>
</div>
...
...
@@ -64,9 +64,7 @@
@push('script')
<script>
function myDepartment() {
alert('{{
$project->p_project_description
}}');
alert('{{ data_get(
$project
,'p_project_description') }}');
}
</script>
...
...
@@ -97,11 +95,4 @@ function myDepartment() {
}
</
script
>
<!--
<
script
>
function
selectedTeam
()
{
var
selectBox
=
document
.
getElementById
(
"selectBox"
);
var
selectedValue
=
selectBox
.
options
[
selectBox
.
selectedIndex
]
.
value
;
alert
(
selectedValue
);
}
</
script
>
-->
@
endpush
\ No newline at end of file
packages/portal/timesheet/resources/views/maintenance/senaraiOverhead.blade.php
View file @
4dec45f3
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Senarai Overhead</a>
<a href="
{{
route
(
'timesheet::maintenance.penambahanOverhead'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>Penambahan Lookup Overhead
...
...
@@ -9,17 +10,22 @@
<table class="
ui
celled
padded
table
">
<thead>
<tr>
<th>No</th>
<th
style="
width
:
5
%
" class="
center
aligned
"
>No</th>
<th>Overhead Lookup</th>
<th>Status</th>
<th style="
width
:
10
%
" class="
center
aligned
">Status</th>
<th style="
width
:
10
%
" class="
center
aligned
">Action</th>
</tr>
</thead>
<tbody>
@foreach(
$overheads
as
$key
=>
$overhead
)
<tr>
<td>
{
{$key+1}
}
</td>
<td
class="
center
aligned
"
>
{
{$key+1}
}
</td>
<td>
{
{$overhead['lkp_overhead']}
}
</td>
<td>
{
{$overhead['status']}
}
</td>
<td class="
center
aligned
">
{
{$overhead['status']}
}
</td>
<td class="
center
aligned
">
<a href="
{{
route
(
'timesheet::maintenance.editoverhead'
,
[
'id'
=>
data_get
(
$overhead
,
[
'id'
])])}}
" class="
ui
center
aligned
small
olive
button
"><i class="
edit
icon
"></i>Edit
</a>
</td>
</tr>
@endforeach
</tbody>
...
...
packages/portal/timesheet/resources/views/maintenance/senaraiPeranan.blade.php
View file @
4dec45f3
...
...
@@ -7,22 +7,22 @@
<a href="
{{
route
(
'timesheet::maintenance.penambahanPeranan'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>Add New Role
</a>
<br>
<table class="
ui
celled
padded
table
">
<table class="
ui
celled
padded
unstackable
table
">
<thead>
<tr>
<th>No</th>
<th
class="
center
aligned
" style="
width
:
4
%
;
"
>No</th>
<th>Role Description</th>
<th>Status</th>
<th>Action</th>
<th
class="
center
aligned
" style="
width
:
10
%
;
"
>Status</th>
<th
class="
center
aligned
" style="
width
:
10
%
;
"
>Action</th>
</tr>
</thead>
<tbody>
@foreach(
$roles
as
$key
=>
$role
)
<tr>
<td>
{
{$key+1}
}
</td>
<td
class="
center
aligned
"
>
{
{$key+1}
}
</td>
<td>
{
{$role['role']}
}
</td>
<td>
{
{$role['status']}
}
</td>
<td><a href="
{{
route
(
'timesheet::maintenance.editPeranan'
,
[
'id'
=>
$role
[
'id'
]])
}}
">Edit</a></td>
<td
class="
center
aligned
"
>
{
{$role['status']}
}
</td>
<td
class="
center
aligned
"
><a href="
{{
route
(
'timesheet::maintenance.editPeranan'
,
[
'id'
=>
$role
[
'id'
]])
}}
">Edit</a></td>
</tr>
@endforeach
</tbody>
...
...
packages/portal/timesheet/resources/views/maintenance/updateProject.blade.php
View file @
4dec45f3
...
...
@@ -9,22 +9,22 @@
<input type="
hidden
" name="
staffid
" value="
staffid
">
<div class="
field
">
<label>Project Code</label>
<input type="
text
" name="
projectcode
" value="
{{
$project
->
p_project_code
}}
" disabled="
disabled
">
<input type="
text
" name="
projectcode
" value="
{{
data_get
(
$project
,
'p_project_code'
)
}}
" disabled="
disabled
">
</div>
<div class="
field
">
<label>Project Name</label>
<input type="
text
" name="
projectname
" value="
{{
$project
->
p_project_description
}}
" disabled="
disabled
">
<input type="
text
" name="
projectname
" value="
{{
data_get
(
$project
,
'p_project_description'
)
}}
" disabled="
disabled
">
</div>
<div class="
field
">
<label>Project Manager</label>
<select name="
projectmanager
" class="
ui
fluid
dropdown
">
<option value="
{{
$project
->
p_project_task_team
}}
">
<option value="
{{
data_get
(
$project
,
'p_project_task_team'
)
}}
">
@foreach(
$pm
as
$key
=>
$value
)
@if(
$value->staff_id
==
$project->p_project_task_team
)
{
{
$value->fullname
}
}
@endif
@if(
$value->staff_id
==
$project->p_project_task_team
)
{
{
data_get($value,'fullname')
}
}
@endif
@endforeach
</option>
@foreach(
$pm
as
$key
=>
$value
)
<option value="
{{
$value
->
staff_id
}}
">
{
{$value->fullname
}
}
</option>
<option value="
{{
data_get
(
$value
,
'staff_id'
)}}
">
{
{data_get($value,'fullname')
}
}
</option>
@endforeach
</select>
</div>
...
...
packages/portal/timesheet/routes/web.php
View file @
4dec45f3
...
...
@@ -42,6 +42,8 @@ Route::group(
Route
::
get
(
'senaraiOverhead'
,[
'uses'
=>
'MaintenanceController@senaraiOverhead'
,
'as'
=>
'maintenance.senaraiOverhead'
]);
Route
::
get
(
'penambahanOverhead'
,[
'uses'
=>
'MaintenanceController@penambahanOverhead'
,
'as'
=>
'maintenance.penambahanOverhead'
]);
Route
::
post
(
'addoverheadlookup'
,[
'uses'
=>
'MaintenanceController@addoverheadlookup'
,
'as'
=>
'maintenance.addoverheadlookup'
]);
Route
::
get
(
'editoverhead'
,[
'uses'
=>
'MaintenanceController@editoverhead'
,
'as'
=>
'maintenance.editoverhead'
]);
Route
::
post
(
'updateoverhead'
,[
'uses'
=>
'MaintenanceController@updateoverhead'
,
'as'
=>
'maintenance.updateoverhead'
]);
Route
::
get
(
'senaraiPeranan'
,[
'uses'
=>
'MaintenanceController@senaraiPeranan'
,
'as'
=>
'maintenance.senaraiPeranan'
]);
Route
::
get
(
'penambahanPeranan'
,[
'uses'
=>
'MaintenanceController@penambahanPeranan'
,
'as'
=>
'maintenance.penambahanPeranan'
]);
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
4dec45f3
...
...
@@ -9,6 +9,7 @@ use Portal\Timesheet\Model\Users;
use
Portal\Timesheet\Model\Ts_master
;
use
Portal\Timesheet\Model\Ts_detail
;
use
Portal\Timesheet\Model\Project
;
use
Portal\Timesheet\Model\Tproject
;
use
Portal\Timesheet\Model\Department
;
use
Portal\Timesheet\Model\Pteam
;
use
Portal\Timesheet\Model\Staff_info
;
...
...
@@ -16,6 +17,7 @@ use Portal\Timesheet\Model\Overhead;
use
Portal\Timesheet\Model\Role
;
use
Portal\Timesheet\Model\VwViewer
;
use
Portal\Timesheet\Model\VwReviewProfile
;
use
Portal\Timesheet\Model\VwReviewDetails
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Input
;
use
File
;
...
...
@@ -160,6 +162,12 @@ class DashboardController extends Controller
->
where
(
'tm_phase'
,
$request
->
phase
)
->
get
()
;
$details
=
VwReviewDetails
::
where
(
'year'
,
$curryear
)
->
where
(
'month'
,
$request
->
month
)
->
where
(
'phase'
,
$request
->
phase
)
->
where
(
'verifier'
,
$hod
->
id
)
->
get
();
$checktd
=
Ts_detail
::
where
(
'tm_year'
,
$curryear
)
->
where
(
'tm_month'
,
$request
->
month
)
->
where
(
'tm_phase'
,
$request
->
phase
)
...
...
@@ -167,24 +175,7 @@ class DashboardController extends Controller
->
orwhereNotNull
(
'td_overhead_note'
)
->
get
();
$cpt
=
Pteam
::
where
(
'pt_project_type'
,
1
)
->
get
();
$ncpt
=
Pteam
::
where
(
'pt_project_type'
,
2
)
->
get
();
$cp
=
Project
::
where
(
'p_project_sts'
,
1
)
->
where
(
'p_project_type'
,
1
)
->
get
();
$ncp
=
Project
::
where
(
'p_project_sts'
,
1
)
->
where
(
'p_project_type'
,
2
)
->
get
();
$pmname
=
Staff_info
::
where
(
'fk_lkp_department'
,
4
)
->
get
();
return
view
(
'timesheet::dashboard.timesheetReview'
,
compact
(
'profile'
,
'staffs'
,
'checkts'
,
'checktd'
,
'cpt'
,
'ncpt'
,
'cp'
,
'ncp'
,
'pmname'
));
return
view
(
'timesheet::dashboard.timesheetReview'
,
compact
(
'profile'
,
'staffs'
,
'details'
,
'checkts'
,
'checktd'
));
}
public
function
revaction
(
Request
$request
)
...
...
@@ -214,7 +205,11 @@ class DashboardController extends Controller
]);
$td
=
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tmid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
->
update
([
'td_timesheet_sts'
=>
3
]);
$tp
=
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tmid
)
->
update
([
'tp_timesheet_sts'
=>
3
]);
}
else
{
dd
(
'rejected'
);
}
...
...
@@ -343,7 +338,7 @@ class DashboardController extends Controller
$overheadhour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
->
where
(
'td_project_type'
,
$overhead
)
//
->where('td_hours', '!=', 0)
->
where
(
'td_hours'
,
'!='
,
0
)
->
get
();
$tempOverhead
[
0
]
=
""
;
...
...
@@ -413,6 +408,7 @@ class DashboardController extends Controller
public
function
tsubmit
(
Request
$request
)
{
$today
=
Carbon
::
today
()
->
toDateString
();
$submit
=
2
;
...
...
@@ -429,6 +425,9 @@ class DashboardController extends Controller
$td
=
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
2
]);
$tp
=
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
2
]);
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Timesheet has been submitted!'
);
}
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
4dec45f3
...
...
@@ -9,6 +9,7 @@ use Portal\Timesheet\Model\Users;
use
Portal\Timesheet\Model\Ts_master
;
use
Portal\Timesheet\Model\Ts_detail
;
use
Portal\Timesheet\Model\Project
;
use
Portal\Timesheet\Model\Tproject
;
use
Portal\Timesheet\Model\Department
;
use
Portal\Timesheet\Model\Pteam
;
use
Portal\Timesheet\Model\Staff_info
;
...
...
@@ -179,7 +180,6 @@ class FormController extends Controller
public
function
savechargeablehours
(
Request
$request
)
{
$chargeable
=
1
;
$userId
=
users
::
find
(
Auth
::
id
())
...
...
@@ -213,9 +213,10 @@ class FormController extends Controller
foreach
(
$detail
as
$key
=>
$value
)
{
$projectid
=
$key
;
foreach
(
$value
as
$keyday
=>
$day
)
{
$projectid
=
$key
;
$date
=
$request
->
year
.
'-'
.
$request
->
month
.
'-'
.
sprintf
(
'%02d'
,
$keyday
);
$checkTimesheetDetail
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
...
...
@@ -226,6 +227,7 @@ class FormController extends Controller
->
first
();
$valuehour
=
$day
;
if
(
$valuehour
==
null
)
{
$valuehour
=
0
;
...
...
@@ -255,13 +257,48 @@ class FormController extends Controller
$project
=
Project
::
where
(
'id'
,
$projectid
)
->
first
();
$tmdetail
->
td_project_name
=
$project
->
p_project_description
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
updated_by
=
$userId
;
$tmdetail
->
td_project_name
=
$project
->
p_project_description
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
updated_by
=
$userId
;
$tmdetail
->
save
();
}
}
$checktproject
=
Tproject
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'td_project'
,
$projectid
)
->
first
();
$checkhours
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'td_project'
,
$projectid
)
->
where
(
'td_hours'
,
'!='
,
'0'
)
->
get
();
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
update
();
}
else
{
$tpdetail
=
new
Tproject
;
$tpdetail
->
td_project
=
$projectid
;
$tpdetail
->
staffid
=
$userId
;
$tpdetail
->
fk_tm_id
=
$tmasterid
;
$tpdetail
->
tp_project_type
=
1
;
$tpdetail
->
tp_year
=
$request
->
year
;
$tpdetail
->
tp_month
=
$request
->
month
;
$tpdetail
->
tp_phase
=
$request
->
phase
;
$project
=
Project
::
where
(
'id'
,
$projectid
)
->
first
();
$tpdetail
->
tp_project_name
=
$project
->
p_project_description
;
$tpdetail
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$tpdetail
->
tp_pm
=
$project
->
p_project_task_team
;
$tpdetail
->
tp_timesheet_sts
=
1
;
$tpdetail
->
updated_by
=
$userId
;
$tpdetail
->
save
();
}
}
...
...
@@ -282,8 +319,6 @@ class FormController extends Controller
public
function
nonChargeableForm
(
Request
$request
)
{
// dd($request);
$nonchargeable
=
2
;
$userId
=
users
::
find
(
Auth
::
id
())
...
...
@@ -494,6 +529,7 @@ class FormController extends Controller
public
function
savenonchargeablehours
(
Request
$request
)
{
// dd($request);
$nonchargeable
=
2
;
$userId
=
users
::
find
(
Auth
::
id
())
->
u_staffID
;
...
...
@@ -527,10 +563,11 @@ class FormController extends Controller
$detail
=
$request
->
hour
;
foreach
(
$detail
as
$key
=>
$value
)
{
$projectid
=
$key
;
foreach
(
$value
as
$keyday
=>
$day
)
{
$projectid
=
$key
;
// dd($projectid);
$date
=
$request
->
year
.
'-'
.
$request
->
month
.
'-'
.
sprintf
(
'%02d'
,
$keyday
);
$checkTimesheetDetail
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
...
...
@@ -550,7 +587,6 @@ class FormController extends Controller
{
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
td_timesheet_sts
=
1
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
update
();
...
...
@@ -571,14 +607,48 @@ class FormController extends Controller
$project
=
Project
::
where
(
'id'
,
$projectid
)
->
first
();
$tmdetail
->
td_project_name
=
$project
->
p_project_description
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
td_project_name
=
$project
->
p_project_description
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
updated_by
=
$userId
;
$tmdetail
->
updated_by
=
$userId
;
$tmdetail
->
save
();
}
}
$checktproject
=
Tproject
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'td_project'
,
$projectid
)
->
first
();
$checkhours
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'td_project'
,
$projectid
)
->
where
(
'td_hours'
,
'!='
,
'0'
)
->
get
();
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
update
();
}
else
{
$tpdetail
=
new
Tproject
;
$tpdetail
->
td_project
=
$projectid
;
$tpdetail
->
staffid
=
$userId
;
$tpdetail
->
fk_tm_id
=
$tmasterid
;
$tpdetail
->
tp_project_type
=
2
;
$tpdetail
->
tp_year
=
$request
->
year
;
$tpdetail
->
tp_month
=
$request
->
month
;
$tpdetail
->
tp_phase
=
$request
->
phase
;
$project
=
Project
::
where
(
'id'
,
$projectid
)
->
first
();
$tpdetail
->
tp_project_name
=
$project
->
p_project_description
;
$tpdetail
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$tpdetail
->
tp_pm
=
$project
->
p_project_task_team
;
$tpdetail
->
tp_timesheet_sts
=
1
;
$tpdetail
->
updated_by
=
$userId
;
$tpdetail
->
save
();
}
}
...
...
@@ -682,7 +752,6 @@ class FormController extends Controller
public
function
saveoverheadhours
(
Request
$request
)
{
// overhead, project type 3.
$overhead
=
3
;
$userId
=
users
::
find
(
Auth
::
id
())
...
...
@@ -717,13 +786,15 @@ class FormController extends Controller
foreach
(
$detail
as
$key
=>
$value
)
{
$projectid
=
$key
;
foreach
(
$value
as
$keyday
=>
$day
)
{
$projectid
=
$key
;
$date
=
$request
->
year
.
'-'
.
$request
->
month
.
'-'
.
sprintf
(
'%02d'
,
$keyday
);
$checkTimesheetDetail
=
Ts_detail
::
where
(
'fk_o_id'
,
$projectid
)
->
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'td_project_type'
,
$overhead
)
->
where
(
'td_date'
,
$date
)
->
where
(
'tm_phase'
,
$request
->
phase
)
->
first
();
...
...
@@ -738,7 +809,6 @@ class FormController extends Controller
{
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
td_timesheet_sts
=
1
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
update
();
...
...
@@ -754,8 +824,7 @@ class FormController extends Controller
$tmdetail
->
tm_month
=
$check
->
tm_month
;
$tmdetail
->
tm_year
=
$check
->
tm_year
;
$tmdetail
->
tm_phase
=
$check
->
tm_phase
;
$tmdetail
->
td_project_type
=
$overhead
;
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
td_project_type
=
3
;
$tmdetail
->
updated_by
=
$userId
;
$project
=
Overhead
::
where
(
'id'
,
$projectid
)
...
...
@@ -766,21 +835,49 @@ class FormController extends Controller
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
save
();
}
}
}
$checktproject
=
Tproject
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'fk_o_id'
,
$projectid
)
->
first
();
$checkhours
=
Ts_detail
::
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'fk_o_id'
,
$projectid
)
->
where
(
'td_hours'
,
'!='
,
'0'
)
->
get
();
if
(
$checktproject
)
{
$checktproject
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$checktproject
->
update
();
}
else
{
$tpdetail
=
new
Tproject
;
$tpdetail
->
fk_o_id
=
$projectid
;
$tpdetail
->
staffid
=
$userId
;
$tpdetail
->
fk_tm_id
=
$tmasterid
;
$tpdetail
->
tp_project_type
=
3
;
$tpdetail
->
tp_year
=
$request
->
year
;
$tpdetail
->
tp_month
=
$request
->
month
;
$tpdetail
->
tp_phase
=
$request
->
phase
;
$project
=
Overhead
::
where
(
'id'
,
$projectid
)
->
first
();
$tpdetail
->
tp_project_name
=
$project
->
o_overhead_desc
;
$tpdetail
->
tp_hours
=
$checkhours
->
sum
(
'td_hours'
);
$tpdetail
->
tp_timesheet_sts
=
1
;
$tpdetail
->
updated_by
=
$userId
;
$tpdetail
->
save
();
}
}
//update total ke master;
//buat query sum td_hours where condition :
$sumdetailhour
=
Ts_detail
::
where
(
'td_project_type'
,
$overhead
)
->
where
(
'fk_tm_id'
,
$tmasterid
)
->
where
(
'tm_phase'
,
$request
->
phase
)
->
sum
(
'td_hours'
);
// dd($sumdetailhour);
// checktotalhours
$checktotalhours
=
Ts_master
::
where
(
'id'
,
$tmasterid
)
->
first
();
$checktotalhours
->
tm_overhead_hrs
=
$sumdetailhour
;
...
...
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
4dec45f3
...
...
@@ -379,7 +379,8 @@ class MaintenanceController extends Controller
public
function
senaraiOverhead
()
{
$overhead
=
Overhead
::
all
();
$overhead
=
Overhead
::
where
(
'o_overhead_sts'
,
1
)
->
get
();
$overheads
=
[];
...
...
@@ -416,6 +417,24 @@ class MaintenanceController extends Controller
->
with
(
'success'
,
'Role Updated'
);
}
public
function
editoverhead
(
Request
$request
)
{
$data
=
Overhead
::
where
(
'id'
,
$request
->
id
)
->
first
();
return
view
(
'timesheet::maintenance.editoverhead'
,
compact
(
'data'
));
}
public
function
updateoverhead
(
Request
$request
)
{
$data
=
Overhead
::
where
(
'id'
,
$request
->
id
)
->
update
([
'o_overhead_desc'
=>
$request
->
description
,
'o_overhead_sts'
=>
$request
->
status
]);
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiOverhead'
);
}
public
function
loadstaff
(
$dept
)
{
$staffs
=
Staff_info
::
where
(
'fk_lkp_department'
,
$dept
)
...
...
packages/portal/timesheet/src/Model/VwReviewDetails.php
0 → 100644
View file @
4dec45f3
<?php
namespace
Portal\Timesheet\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Notifications\Notifiable
;
class
VwReviewDetails
extends
Model
{
use
Notifiable
;
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'vw_review_details'
;
/**
* undocumented function
*
* @return void
* @author
**/
public
function
info
()
{
}
}
packages/portal/timesheet/src/ServiceProvider.php
View file @
4dec45f3
...
...
@@ -55,7 +55,7 @@ class ServiceProvider extends BaseServiceProvider
->
data
(
'icon'
,
'tachometer alternate icon'
)
->
active
(
'home/*'
);
$dashboard
->
add
(
__
(
'
vwv
iewer'
),
url
(
'/vwviewer/'
))
$dashboard
->
add
(
__
(
'
VW V
iewer'
),
url
(
'/vwviewer/'
))
->
data
(
'icon'
,
'tachometer alternate icon'
)
->
active
(
'home/*'
);
// $dashboard->add(__('Timesheet Calendar'), route('timesheet::kalendar.kalendar'))
...
...
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