Commit 02b986e0 by Azhan Hannan

flow approval by bod & pd

parent 2924cdde
......@@ -3,30 +3,30 @@
@section('content')
<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>
<form action="{{ route('timesheet::dashboard.approval') }}" method="POST" class="ui form">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{ data_get($profile,'tmid') }}">
<input type="hidden" name="tpid" value="{{ data_get($profile,'id') }}">
<div class="six wide field">
<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 class="three fields">
<div class="two wide field">
<label>Year</label>
<input type="text" readonly="readonly" value="{{ data_get($profile,'tm_year') }}">
<input type="text" readonly="readonly" value="{{ data_get($profile,'tp_year') }}">
</div>
<div class="two wide field">
<label>Month</label>
<input type="text" readonly="readonly" value="{{ data_get($profile,'tm_month') }}">
<input type="text" readonly="readonly" value="{{ data_get($profile,'tp_month') }}">
</div>
<div class="two wide field">
<label>Phase</label>
<input type="text" readonly="readonly" value="{{ data_get($profile,'tm_phase') }}">
<input type="text" readonly="readonly" value="{{ data_get($profile,'tp_phase') }}">
</div>
</div>
......
......@@ -28,9 +28,9 @@
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject) <i class="green check icon"></i> Verified by PM
@elseif($status == 2) <i class="red attention icon"></i> Submitted
@elseif($status == 4) <i class="green check icon"></i>Verified by BOD
@elseif($status == 5) <i class="red attention icon"></i>Dissaproved by BOD
@elseif($status == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif($status == 4) <i class="green check icon"></i>Verified by PD
@elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif($status == 6) <i class="red attention icon"></i>Rejected by PM
@elseif($status == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</th>
......@@ -67,10 +67,10 @@
<td style="width: 13%" class="text-center">
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($detail, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU
@elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD
@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') == 3) <i class="green check icon"></i> Verified by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
......
......@@ -16,14 +16,11 @@ Route::group(
//dashboard
Route::get('home',['uses' => 'DashboardController@index', 'as' => 'dashboard.index']);
Route::get('vwviewer',['uses' => 'DashboardController@vwviewer', 'as' => 'dashboard.vwviewer']);
//timesheet
Route::get('timesheetApproval',['uses' => 'DashboardController@timesheetApproval', 'as' => 'dashboard.timesheetApproval']);
Route::get('timesheetReport',['uses' => 'DashboardController@timesheetReport', 'as' => 'dashboard.timesheetReport']);
Route::get('projectVerify',['uses' => 'DashboardController@projectVerify', 'as' => 'dashboard.projectVerify']);
Route::get('timesheetReview',['uses' => 'DashboardController@timesheetReview', 'as' => 'dashboard.timesheetReview']);
Route::get('timesheetViewer',['uses' => 'DashboardController@timesheetViewer', 'as' => 'dashboard.timesheetViewer']);
Route::get('filterProjectVerify',['uses' => 'DashboardController@filterProjectVerify', 'as' => 'dashboard.filterProjectVerify']);
......@@ -42,7 +39,6 @@ Route::group(
Route::post('approval', ['uses' => 'DashboardController@approval', 'as' => 'dashboard.approval']);
Route::post('verifyoverhead', ['uses' => 'DashboardController@verifyoverhead', 'as' => 'dashboard.verifyoverhead']);
//laporan
Route::get('ringkasanLaporan', ['uses' => 'ReportController@ringkasanLaporan', 'as' => 'report.ringkasanLaporan']);
Route::post('generateRingkasan', ['uses' => 'ReportController@generateRingkasan', 'as' => 'report.generateRingkasan']);
......
......@@ -240,7 +240,7 @@ class FormController extends Controller
$checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update();
$checkTimesheetDetail->save();
}
else
......@@ -279,7 +279,7 @@ class FormController extends Controller
if ($checktproject) {
$checktproject->tp_hours = $checkhours->sum('td_hours');
$checktproject->update();
$checktproject->save();
}
else
{
......@@ -315,7 +315,7 @@ class FormController extends Controller
$checktotalhours = Ts_master::where('id', $tmasterid)->first();
$checktotalhours->tm_chargeable_hrs = $sumdetailhour;
$checktotalhours->tm_chargeable_days = $sumdetailhour/8.0;
$checktotalhours->update();
$checktotalhours->save();
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
{
$checkTimesheetDetail->td_hours = $day;
$checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update();
$checkTimesheetDetail->save();
}
// dd($checkTimesheetDetail->td_hours);
}
......@@ -842,7 +842,7 @@ class FormController extends Controller
{
$checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update();
$checkTimesheetDetail->save();
$checkhours = Ts_detail::where('fk_tm_id', $tmasterid)
->where('fk_o_id', $projectid)
......@@ -855,7 +855,7 @@ class FormController extends Controller
if ($checktproject) {
$checktproject->tp_hours = $checkhours->sum('td_hours');
$checktproject->update();
$checktproject->save();
}
else
{
......@@ -916,7 +916,7 @@ class FormController extends Controller
if ($checktproject) {
$checktproject->tp_hours = $checkhours->sum('td_hours');
$checktproject->update();
$checktproject->save();
}
else
{
......@@ -1002,7 +1002,7 @@ class FormController extends Controller
$checkTimesheetDetail->td_overhead_note = $request->description;
$checkTimesheetDetail->td_timesheet_sts = 1;
$checkTimesheetDetail->updated_by = $userId;
$checkTimesheetDetail->update();
$checkTimesheetDetail->save();
} else {
$pname = Overhead::where('o_overhead_desc', $request->task)
......@@ -1150,7 +1150,7 @@ class FormController extends Controller
->first();
$data->td_overhead_note = $request->description;
$data->update();
$data->save();
} else {
......@@ -1180,7 +1180,7 @@ class FormController extends Controller
$data->td_overhead_note = $request->description;
$data->td_timesheet_sts = 1;
$data->update();
$data->save();
}
......
......@@ -389,7 +389,7 @@ class MaintenanceController extends Controller
$team->updated_by = $userId;
// letak query utk update role
// $team->pt_role = $request->role;
$team->update();
$team->save();
// $project = Pteam::where('fk_project_id',$request->pid)
// ->get();
......@@ -476,7 +476,7 @@ class MaintenanceController extends Controller
$data->status = $request->status;
$data->updated_by = $userId;
$data->update();
$data->save();
return redirect()->route('timesheet::maintenance.senaraiPeranan')
->with('success', 'Role Updated Successfully');
......
......@@ -23,7 +23,7 @@ class Tproject extends Model
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()
......
<?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');
}
}
......@@ -98,7 +98,7 @@ class ServiceProvider extends BaseServiceProvider
->data('icon', 'calendar alternate outline icon')
->active('timesheetReview/*')
->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')
->active('timesheetApproval/*')
->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