Commit b96e2a42 by Azhan Hannan

update dashboard approval

parent 2fd63eca
...@@ -67,35 +67,36 @@ ...@@ -67,35 +67,36 @@
<th style="width: 10%;" class="center aligned">Action</th> <th style="width: 10%;" class="center aligned">Action</th>
</tr> </tr>
</thead> </thead>
@if($detail->where('tp_project_type', 1) && data_get($staff,'tmid') == data_get($chargeable,'fk_tm_id')) @if($detail->where('tp_project_type', 1))
@foreach($detail->where('tp_project_type', 1) as $key => $chargeable) @foreach($detail->where('tp_project_type', 1) as $key => $chargeable)
<tr> @if(data_get($staff,'tmid') == data_get($chargeable,'fk_tm_id'))
<td style="width: 10%;">{{ data_get($chargeable, 'project.p_project_code') }}</td> <tr>
<td style="width: 15%;">{{ data_get($chargeable, 'tp_project_name') }}</td> <td style="width: 10%;">{{ data_get($chargeable, 'project.p_project_code') }}</td>
<td style="width: 10%;" class="center aligned">{{ data_get($chargeable, 'tp_hours') }}</td> <td style="width: 15%;">{{ data_get($chargeable, 'tp_project_name') }}</td>
<td style="width: 10%;" class="center aligned">{{ number_format(data_get($chargeable, 'tp_hours')/8, 1, '.', '') }}</td> <td style="width: 10%;" class="center aligned">{{ data_get($chargeable, 'tp_hours') }}</td>
<td style="width: 15%;">{{data_get($chargeable, 'verifier_remark')}}</td> <td style="width: 10%;" class="center aligned">{{ number_format(data_get($chargeable, 'tp_hours')/8, 1, '.', '') }}</td>
<td style="width: 15%;">{{data_get($chargeable, 'approver_remark')}}</td> <td style="width: 15%;">{{data_get($chargeable, 'verifier_remark')}}</td>
<td style="width: 15%;" class="center aligned"> <td style="width: 15%;">{{data_get($chargeable, 'approver_remark')}}</td>
@if(data_get($chargeable, 'tp_timesheet_sts') == 1 || data_get($chargeable, 'tp_timesheet_sts') == null) In Preparation <td style="width: 15%;" class="center aligned">
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted @if(data_get($chargeable, 'tp_timesheet_sts') == 1 || data_get($chargeable, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 3) <i class="red attention icon"></i> Verified by PM @elseif(data_get($chargeable, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD @elseif(data_get($chargeable, 'tp_timesheet_sts') == 3) <i class="red attention icon"></i> Verified by PM
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD @elseif(data_get($chargeable, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM @elseif(data_get($chargeable, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($chargeable, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR @elseif(data_get($chargeable, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@endif @elseif(data_get($chargeable, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
</td> @endif
<td style="width: 10%;" class="text-center single line"> </td>
@if(data_get($chargeable, 'tp_timesheet_sts') == 3) <td style="width: 10%;" class="text-center single line">
<button class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button> @if(data_get($chargeable, 'tp_timesheet_sts') == 3)
@else <button class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
<button class="center aligned ui green icon button disabled">Approval</button> @else
@endif <button class="center aligned ui green icon button disabled">Approval</button>
</td> @endif
</tr> </td>
@endforeach </tr>
@endif
@endforeach
@endif @endif
</table> </table>
@endif @endif
......
...@@ -811,7 +811,6 @@ class DashboardController extends Controller ...@@ -811,7 +811,6 @@ class DashboardController extends Controller
->where('td_project', $pid) ->where('td_project', $pid)
->update([ 'td_timesheet_sts' => 5 ]); ->update([ 'td_timesheet_sts' => 5 ]);
} else { } else {
dd('sini');
Ts_detail::where('fk_tm_id', $tmid) Ts_detail::where('fk_tm_id', $tmid)
->where('fk_o_id', $oid) ->where('fk_o_id', $oid)
->update([ 'td_timesheet_sts' => 5 ]); ->update([ 'td_timesheet_sts' => 5 ]);
...@@ -829,7 +828,7 @@ class DashboardController extends Controller ...@@ -829,7 +828,7 @@ class DashboardController extends Controller
->update( ->update(
[ [
'tm_timesheet_master_sts' => 5, 'tm_timesheet_master_sts' => 5,
'hod_rejected_at' => $today, 'bod_rejected_at' => $today,
]); ]);
} }
......
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