Commit 20406395 by Azhan Hannan

checking null error for dashboard pmhod

parent 17a5877a
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<?php <?php
// $pms = $others =; $pms = $others = null;
foreach ($profile as $key => $value) { foreach ($profile as $key => $value) {
// dd($value); // dd($value);
if (data_get($value,'dept') == 4) { if (data_get($value,'dept') == 4) {
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
} }
?> ?>
@if($pms)
<div class="ui segment"> <div class="ui segment">
<div class="ui purple left ribbon label"> <div class="ui purple left ribbon label">
PMS PMS
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
$pmss = $profile->where('dept', 4); $pmss = $profile->where('dept', 4);
?> ?>
@if($pms)
@foreach($pmss as $key => $staff) @foreach($pmss as $key => $staff)
<?php <?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)); $project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
...@@ -206,11 +206,18 @@ ...@@ -206,11 +206,18 @@
</div> </div>
@endif @endif
@endforeach @endforeach
@else
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">No pending verification</th>
</tr>
</thead>
</table>
@endif
</div> </div>
</div> </div>
@endif
@if($others)
<div class="ui segment"> <div class="ui segment">
<div class="ui blue left ribbon label"> <div class="ui blue left ribbon label">
Other Departments Other Departments
...@@ -224,6 +231,7 @@ ...@@ -224,6 +231,7 @@
$notpms = $profile->where('dept', '<>',4); $notpms = $profile->where('dept', '<>',4);
?> ?>
@if($others)
@foreach($notpms as $key => $staff) @foreach($notpms as $key => $staff)
<?php <?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)); $project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
...@@ -400,9 +408,17 @@ ...@@ -400,9 +408,17 @@
</div> </div>
@endif @endif
@endforeach @endforeach
@else
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">No pending verification</th>
</tr>
</thead>
</table>
@endif
</div> </div>
</div> </div>
@endif
@endsection @endsection
......
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