Commit 41b6a554 by hannan

completion of overhead form

parent 5447aded
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<a class="ui blue left ribbon label">Add New Role</a>
<br><br>
<form class="ui form" action="{{ route('timesheet::dashboard.updaterole' )}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="id" value="{{$role->id}}">
<div class="field">
<label>Role Description</label>
<input type="text" name="role" value="{{$role->role}} ">
</div>
<div class="field">
<label>Role Status</label>
<select name="status" class="ui fluid dropdown">
<option value=""> {{$status}} </option>
<option value="1">Active</option>
<option value="2">Inactive</option>
</select>
</div>
<button class="ui button" type="submit">Update</button>
</form>
</div>
@endsection
\ No newline at end of file
......@@ -17,7 +17,7 @@ input[type=number] {
</style>
<div class="ui segment">
<a class="ui blue left ribbon label">Non Chargeable Form</a>
<a class="ui blue left ribbon label">Non-Chargeable Form</a>
<br>
<br>
<form class="ui form">
......@@ -48,7 +48,7 @@ input[type=number] {
<table class="ui celled structured table">
<thead>
<tr>
<th>Chargeable</th>
<th colspan="2">Chargeable</th>
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th>
<button type="submit" class="fluid center aligned ui blue compact labeled icon button">
......@@ -58,7 +58,8 @@ input[type=number] {
</th>
</tr>
<tr>
<th class="single line">Task</th>
<th class="single line">Project Code</th>
<th class="single line">Project Name</th>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
......@@ -82,6 +83,9 @@ input[type=number] {
<?php $total = 0; ?>
<tr>
<td class="single line">
{{$project['td_project_code']}}
</td>
<td class="single line">
{{$project['td_project_name']}}
</td>
@if($phase == 1)
......
@extends('ui::layouts.app')
@section('content')
<style>
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
</style>
<div class="ui segment">
<a class="ui blue left ribbon label">Overhead 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>
<form class="ui form" action="{{ route('timesheet::dashboard.saveoverheadhours' )}}" 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}}">
<table class="ui celled structured table">
<thead>
<tr>
<th>Overhead</th>
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th>
<button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
</th>
</tr>
<tr>
<th class="single line">Project Name</th>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th>{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th>{{$i+1}}</th>
@endfor
@endif
<th>Total Hours</th>
</tr>
<tr>
</tr>
</thead>
<tbody>
@foreach($projectlist as $key => $project)
<?php $total = 0; ?>
<tr>
<td class="single line">
{{$project['td_project_name']}}
</td>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<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:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<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:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
<td>
<input type="text" onkeypress="onlynumber(event)" name="total-{{$project['td_project']}}" id="total-{{$project['td_project']}}" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="" value={{$total}}>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
<br>
@if($phase == 1)
<button class="center aligned ui green compact right labeled icon button" id="phase2" onclick="window.location.href='{{ route('timesheet::dashboard.overheadForm', ['phase' => 2], ['month' => $month], ['year' => $year]) }}';">
<i class="angle double right icon"></i>
Phase 2
</button>
@else
<button class="center aligned ui green compact labeled icon button" id="phase1" onclick="window.location.href='{{ route('timesheet::dashboard.overheadForm', ['phase' => 1], ['month' => $month], ['year' => $year]) }}';">
<i class="angle double left icon"></i>
Phase 1
</button>
@endif
</div>
@endsection
@push('script')
<script>
function onlynumber(evt)
{
var theEvent = evt || window.event;
var key = theEvent.keyCode || theEvent.which;
key = String.fromCharCode(key);
var regex = /[0-9]|\./;
if( !regex.test(key) )
{
theEvent.returnValue = false;
if(theEvent.preventDefault) theEvent.preventDefault();
}
}
</script>
<script>
$().ready(function() {
});
function limiter(input,pid) {
var currenttotal = 0;
if (input.value < 0) input.value = 0;
if (input.value > 24) input.value = 24;
input.value = parseFloat(parseFloat(input.value).toFixed(1));
for(var i = 0; i < 32; i++){
var value = 0;
var hourValue = document.getElementById('hour['+pid+']['+i+']');
if(hourValue){
hourValue = hourValue.value;
value = parseFloat(parseFloat(hourValue).toFixed(1));
console.log(isNaN(value));
if(isNaN(value)){
value = 0;
}
if(typeof value === 'number'){
// console.log(value);
currenttotal += value;
}
}
}
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>
@endpush
\ No newline at end of file
......@@ -8,7 +8,7 @@
{{csrf_field()}}
<div class="field">
<label>Role Description</label>
<input type="text" name="overheadlookup" placeholder="Enter new role">
<input type="text" name="role" placeholder="Enter new role">
</div>
<div class="field">
<label>Role Status</label>
......
......@@ -3,7 +3,7 @@
@section('content')
<div class="ui segment">
<a class="ui blue left ribbon label">Senarai Project</a>
<a class="ui blue left ribbon label">Senarai Peranan</a>
<a href="{{ route('timesheet::dashboard.penambahanPeranan')}} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add New Role
</a>
<br>
......@@ -22,8 +22,7 @@
<td>{{$key+1}} </td>
<td>{{$role['role']}} </td>
<td>{{$role['status']}} </td>
<td><a href="">Edit</a></td>
<!-- <td><a href="{{ route('timesheet::dashboard.', ['id' => $project['id']]) }}">Edit</a></td> -->
<td><a href="{{ route('timesheet::dashboard.editPeranan', ['id' => $role['id']]) }}">Edit</a></td>
</tr>
@endforeach
</tbody>
......
......@@ -25,6 +25,8 @@ Route::group(
Route::get('senaraiPeranan',['uses' => 'DashboardController@senaraiPeranan', 'as' => 'dashboard.senaraiPeranan']);
Route::get('penambahanPeranan',['uses' => 'DashboardController@penambahanPeranan', 'as' => 'dashboard.penambahanPeranan']);
Route::post('addrole',['uses' => 'DashboardController@addrole', 'as' => 'dashboard.addrole']);
Route::get('editPeranan',['uses' => 'DashboardController@editPeranan', 'as' => 'dashboard.editPeranan']);
Route::post('updaterole',['uses' => 'DashboardController@updaterole', 'as' => 'dashboard.updaterole']);
Route::get('chargeableForm',['uses' => 'DashboardController@chargeableForm', 'as' => 'dashboard.chargeableForm']);
Route::get('nonChargeableForm',['uses' => 'DashboardController@nonChargeableForm', 'as' => 'dashboard.nonChargeableForm']);
......@@ -40,6 +42,7 @@ Route::group(
Route::get('timesheet_viewer',['uses' => 'DashboardController@timesheetViewer', 'as' => 'dashboard.timesheetViewer']);
Route::post('savechargeablehours',['uses' => 'DashboardController@savechargeablehours', 'as' => 'dashboard.savechargeablehours']);
Route::post('saveoverheadhours',['uses' => 'DashboardController@saveoverheadhours', 'as' => 'dashboard.saveoverheadhours']);
......
......@@ -108,17 +108,19 @@ class DashboardController extends Controller
public function addnewproject(Request $request)
{
$user = users::where('id', Auth::id())->first();
$userId = users::find(Auth::id())
->u_staffID;
$project = new Project;
$project->p_project_code = $request->projectcode;
$project->p_project_description = $request->projectname;
$project->p_project_task_team = $request->projectmanager;
$project->p_project_sts = $request->status;
$project->updated_by = $user->u_staffID;
$project->updated_by = $userId;
$project->save();
return redirect()->route('timesheet::dashboard.penambahanProject');
return redirect()->route('timesheet::dashboard.penambahanProject')
->with('success', 'New Project Added');
}
public function senaraiProjectTeam(Request $request)
......@@ -168,8 +170,8 @@ class DashboardController extends Controller
public function addprojectteam(Request $request)
{
$user = Users::where('id', Auth::id())
->first();
$userId = users::find(Auth::id())
->u_staffID;
$project = Project::where('p_project_code','=',$request->projectcode)
->first();
......@@ -187,18 +189,20 @@ class DashboardController extends Controller
$pt->pt_team = $staff->fullname;
$pt->pt_staff_id = $value;
$pt->pt_project_task_sts = $request->status;
$pt->updated_by = $user->id;
$pt->updated_by = $userId;
$pt->save();
}
return redirect()->route('timesheet::dashboard.penambahanProjectTeam');
return redirect()->route('timesheet::dashboard.penambahanProjectTeam')
->with('success', 'Project Team Added Successfully');
}
public function editprojectteam(Request $request)
{
$team = Pteam::where('id', $request->id)
->first();
$pid = $team->fk_project_id;
return view('timesheet::dashboard.editprojectteam', compact('team', 'pid'));
......@@ -207,16 +211,19 @@ class DashboardController extends Controller
public function updateprojectteam(Request $request)
{
$pid = $request->pid;
$user = Users::where('id', Auth::id())
->first();
$userId = users::find(Auth::id())
->u_staffID;
$team = Pteam::where('id', $request->id)->first();
$team->pt_project_task_sts = $request->status;
$team->updated_by = $userId;
// letak query utk update role
// $team->pt_role = $request->role;
$team->update();
$project = Pteam::where('fk_project_id',$request->pid)->get();
$project = Pteam::where('fk_project_id',$request->pid)
->get();
$projectlist = [];
foreach ($project as $key => $value) {
......@@ -259,10 +266,52 @@ class DashboardController extends Controller
public function addrole(Request $request)
{
dd($request);
return redirect()->route('timesheet::dashboard.senaraiPeranan');
find($id)->column_name;
$userId = users::find(Auth::id())
->u_staffID;
$data = new Role;
$data->role = $request->role;
$data->status = $request->status;
$data->updated_by = $userId;
$data->save();
return redirect()->route('timesheet::dashboard.senaraiPeranan')
->with('success', 'Role Added Successfully');
}
public function editPeranan(Request $request)
{
$role = Role::where('id', $request->id)
->first();
if ($role->status == 1) {
$status = 'Active';
} else {
$status = 'Inactive';
}
return view('timesheet::dashboard.editPeranan', compact('role', 'status'));
}
public function updaterole(Request $request)
{
$userId = users::find(Auth::id())
->u_staffID;
$data = Role::where('id', $request->id)
->first();
$data->role = $request->role;
$data->status = $request->status;
$data->updated_by = $userId;
$data->update();
return redirect()->route('timesheet::dashboard.senaraiPeranan')
->with('success', 'Role Updated Successfully');
}
public function perkhidmatan()
{
......@@ -271,12 +320,12 @@ class DashboardController extends Controller
public function chargeableForm(Request $request)
{
$userId = Auth::id();
$user = users::where('id', Auth::id())->first();
$project = Pteam::where('pt_staff_id',$user->u_staffID)->get();
// dd($project);
$userId = users::find(Auth::id())
->u_staffID;
$project = Pteam::where('pt_staff_id',$userId)
->get();
// dd($project);
$projectlist = [];
// nanti project code query dari table project:
......@@ -319,18 +368,14 @@ class DashboardController extends Controller
//check dlam db, kalau dah ada detail hours, kuar form edit, kalau belum, kuar form create
$user = users::where('id', Auth::id())->first();
// check timesheet master
$check = Ts_master::where('tm_staff_id', $user->u_staffID)
$check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $year)
->where('tm_month', $month)
->where('tm_phase', $phase)
->first();
// dd($check);
//kalau ada, dia gi ke edit
if($check)
{
......@@ -347,11 +392,13 @@ class DashboardController extends Controller
return view('timesheet::dashboard.chargeableForm', compact('projectlist','userId','month','phase','daymonth','year','day','hour'));
}
public function nonChargeableForm(Request $request)
public function nonchargeableForm(Request $request)
{
$userId = Auth::id();
$user = users::where('id', Auth::id())->first();
$project = Pteam::where('pt_staff_id',$user->u_staffID)->get();
$userId = users::find(Auth::id())
->u_staffID;
$project = Pteam::where('pt_staff_id',$userId)
->get();
$projectlist = [];
......@@ -369,7 +416,9 @@ class DashboardController extends Controller
}
$phase = 2;
//sample dulu
$phase = 1;
$month = date('n');
$year = date('Y');
$day = date('j');
......@@ -393,17 +442,85 @@ class DashboardController extends Controller
//check dlam db, kalau dah ada detail hours, kuar form edit, kalau belum, kuar form create
$user = users::where('id', Auth::id())->first();
// check timesheet master
$check = Ts_master::where('tm_staff_id', $user->u_staffID)
$check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $year)
->where('tm_month', $month)
->where('tm_phase', $phase)
->first();
// dd($check);
//kalau ada, dia gi ke edit
if($check)
{
$hour = Ts_detail::where('fk_tm_id',$check->id)
// ->with('project:p_project_code')
->get();
// dd($hour);
}
//klu xde g create.php
else
{
$hour = null;
}
return view('timesheet::dashboard.nonchargeableForm', compact('projectlist','userId','month','phase','daymonth','year','day','hour'));
}
public function overheadForm(Request $request)
{
$userId = users::find(Auth::id())
->u_staffID;
$project = Overhead::where('o_overhead_sts',1)
->get();
$projectlist = [];
// nanti project code query dari table project:
foreach ($project as $key => $value) {
$projectlist[] = [
'td_project' => $value->id,
'td_project_name' => $value->o_overhead_desc,
];
}
//sample dulu
$phase = 1;
$month = date('n');
$year = date('Y');
$day = date('j');
if(isset($request->phase))
{
$phase = $request->phase;
}
if(isset($request->month))
{
$month = $request->month;
}
if(isset($request->year))
{
$year = $request->year;
}
$daymonth=cal_days_in_month(CAL_GREGORIAN,$month,$year);
//check dlam db, kalau dah ada detail hours, kuar form edit, kalau belum, kuar form create
// check timesheet master
$check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $year)
->where('tm_month', $month)
->where('tm_phase', $phase)
->first();
//kalau ada, dia gi ke edit
if($check)
......@@ -418,10 +535,11 @@ class DashboardController extends Controller
{
$hour = null;
}
return view('timesheet::dashboard.nonChargeableForm', compact('projectlist','userId','month','phase','daymonth','year','day','hour'));
return view('timesheet::dashboard.overheadForm', compact('projectlist','userId','month','phase','daymonth','year','day','hour'));
}
public function kalendarCharge()
{
return view('timesheet::dashboard.kalendarCharge');
......@@ -441,13 +559,12 @@ class DashboardController extends Controller
{
// chargeable, project type 1.
$chargeable = 1;
$nonchargeable = 2;
$overhead = 3;
$user = users::where('id', Auth::id())->first();
$userId = users::find(Auth::id())
->u_staffID;
// check table master. untuk total chargeable hours.
$check = Ts_master::where('tm_staff_id', $user->u_staffID)
$check = Ts_master::where('tm_staff_id', $userId)
->where('tm_year', $request->year)
->where('tm_month', $request->month)
->where('tm_phase', $request->phase)
......@@ -465,7 +582,7 @@ class DashboardController extends Controller
else
{
$check = new Ts_master;
$check->tm_staff_id = $user->u_staffID;
$check->tm_staff_id = $userId;
$check->tm_year = $request->year;
$check->tm_month = $request->month;
$check->tm_phase = $request->phase;
......@@ -506,9 +623,10 @@ class DashboardController extends Controller
//update hours to null
$checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userI;
$checkTimesheetDetail->update();
}//kalau takde, isi semua.
} //kalau takde, isi semua.
else
{
//isi semua
......@@ -516,16 +634,18 @@ class DashboardController extends Controller
$tmdetail->td_date = $date;
$tmdetail->td_project = $projectid;
$tmdetail->fk_tm_id = $tmasterid;
$tmdetail->tm_staff_id = $user->u_staffID;
$tmdetail->tm_staff_id = $userI;
$tmdetail->tm_month = $check->tm_month;
$tmdetail->tm_year = $check->tm_year;
$tmdetail->tm_phase = $check->tm_phase;
$tmdetail->td_project_type = $chargeable;
$project = Project::where('id', $projectid)->first();
$tmdetail->td_project_name = $project->p_project_description;
$project = Project::where('id', $projectid)
->first();
$tmdetail->td_project_name = $project->p_project_description;
$tmdetail->td_hours = $valuehour;
$tmdetail->updated_by = $userI;
$tmdetail->save();
//$tmdetail -> kjhdiwhdf;
......@@ -548,12 +668,134 @@ class DashboardController extends Controller
$checktotalhours = Ts_master::where('id', $tmasterid)->first();
$checktotalhours->tm_chargeable_hrs = $sumdetailhour;
$checktotalhours->tm_chargeable_days = $sumdetailhour/8.0;
$checktotalhours->update();
// return redirect::to('mobile/profile');
return redirect()->route('timesheet::dashboard.chargeableForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated');
}
public function saveoverheadhours(Request $request)
{
// overhead, project type 3.
$overhead = 3;
$userId = users::find(Auth::id())
->u_staffID;
// check table master. untuk total chargeable hours.
$check = Ts_master::where('tm_staff_id', $userI)
->where('tm_year', $request->year)
->where('tm_month', $request->month)
->where('tm_phase', $request->phase)
->first();
//kalau ada, update().
//staff kena edit bila timesheet kena reject.
//kalau ada, biar dlu.
if($check)
{
}
// kalau takda, save() baru.
else
{
$check = new Ts_master;
$check->tm_staff_id = $userI;
$check->tm_year = $request->year;
$check->tm_month = $request->month;
$check->tm_phase = $request->phase;
$check->updated_by = $userI;
// $check ->tm_chargeable_hrs = ;
$check->save();
}
$tmasterid = $check->id;
// semak detail dari form
// untuk project type : 1 = chargeable, 2 = nonchargeable, 3 = overhead;
// . . .
$detail = $request->hour;
foreach ($detail as $key => $value)
{
foreach ($value as $keyday => $day)
{
$projectid = $key;
$date = $request->year.'-'.$request->month.'-'.sprintf('%02d', $keyday);
$checkTimesheetDetail = Ts_detail::where('fk_o_id', $projectid)
// ->where('td_project_type', $project_type)
->where('td_date', $date)
->where('tm_phase', $request->phase)
->first();
$valuehour = $day;
if($valuehour == null)
{
$valuehour = 0;
}
if($checkTimesheetDetail)
{
//update hours to null
$checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userI;
$checkTimesheetDetail->update();
} //kalau takde, isi semua.
else
{
//isi semua
$tmdetail = new Ts_detail;
$tmdetail->td_date = $date;
$tmdetail->fk_o_id = $projectid;
$tmdetail->fk_tm_id = $tmasterid;
$tmdetail->tm_staff_id = $userI;
$tmdetail->tm_month = $check->tm_month;
$tmdetail->tm_year = $check->tm_year;
$tmdetail->tm_phase = $check->tm_phase;
$tmdetail->td_project_type = $overhead;
$tmdetail->updated_by = $userI;
$project = Overhead::where('id', $projectid)
->first();
$tmdetail->td_overhead_desc = $project->o_overhead_desc;
$tmdetail->td_hours = $valuehour;
$tmdetail->save();
//error kat sini -> done : typo nama column td_overhead_description
//$tmdetail -> kjhdiwhdf;
//project = Project::where('id','project')->first();
//
// /lepas save ();
}
}
}
//update total ke master;
//buat query sum td_hours where condition :
$sumdetailhour = Ts_detail::where('td_project_type', $overhead)
->where('tm_phase', $request->phase)
->sum('td_hours');
// checktotalhours
$checktotalhours = Ts_master::where('id', $tmasterid)->first();
$checktotalhours->tm_overhead_hrs = $sumdetailhour;
$checktotalhours->tm_overhead_days = $sumdetailhour/8.0;
$checktotalhours->update();
// return redirect::to('mobile/profile');
return redirect()->route('timesheet::dashboard.overheadForm', ['phase' => $request->phase, 'month' =>$request->month,'year',$request->year])->with('success', 'Timesheet Updated');
}
public function senaraiOverhead()
......@@ -582,16 +824,17 @@ class DashboardController extends Controller
public function addoverheadlookup(Request $request)
{
$user = Users::where('id', Auth::id())
->first();
$userId = users::find(Auth::id())
->u_staffID;
$data = new Overhead;
$data->o_overhead_desc = $request->overheadlookup;
$data->o_overhead_sts = $request->status;
$data->updated_by = $user->u_staffID;
$data->updated_by = $userI;
$data->save();
return redirect()->route('timesheet::dashboard.senaraiOverhead');
return redirect()->route('timesheet::dashboard.senaraiOverhead')
->with('success', 'Role Updated');
}
public function timesheetApproval()
......
......@@ -104,6 +104,10 @@ class ServiceProvider extends BaseServiceProvider
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Penambahan Peranan'), route('timesheet::dashboard.penambahanPeranan'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$calendar = $this->app['laravolt.menu']->add(__('Kalendar'))->data('icon', 'calendar alternate');
$calendar->add(__('Kalendar'), route('timesheet::dashboard.kalendar'))
......@@ -132,7 +136,7 @@ class ServiceProvider extends BaseServiceProvider
->active('nonChargeableForm/*')
->data('permission', Permission::kehadiran);
$form->add(__('Overhead'), route('timesheet::dashboard.overheadForm'))
$form->add(__('Borang Overhead'), route('timesheet::dashboard.overheadForm'))
->data('icon', 'circle outline')
->active('overheadForm/*')
->data('permission', Permission::kehadiran);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment