ソースを参照

Fixed time billed on care months table

Samson Mutunga 1 年間 前
コミット
6addfb7388
1 ファイル変更28 行追加2 行削除
  1. 28 2
      resources/views/app/patient/care-months.blade.php

+ 28 - 2
resources/views/app/patient/care-months.blade.php

@@ -128,8 +128,34 @@
                             @endif
                         </a>
                     </td>
-			<td>{{ $careMonth->number_of_days_with_remote_measurements }}</td>
-                    <td>{{time_in_hrminsec($careMonth->rm_total_time_in_seconds)}}</td>
+			        <td>{{ $careMonth->number_of_days_with_remote_measurements }}</td>
+                    <td>
+                        <?php
+                            $minsBilled = 0;
+                            if($careMonth->mcp && $pro->id === $careMonth->mcp->id) {
+                                $minsBilled = $careMonth->rm_total_time_in_seconds_by_mcp;
+                            }
+                            elseif($careMonth->rmm && $pro->id === $careMonth->rmm->id) {
+                                $minsBilled = $careMonth->rm_total_time_in_seconds_by_rmm_pro;
+                            }
+                            elseif($careMonth->rme && $pro->id === $careMonth->rme->id) {
+                                $minsBilled = $careMonth->rm_total_time_in_seconds_by_rme_pro;
+                            }elseif($pro->pro_type == 'ADMIN') {
+                                $minsBilled = $careMonth->rm_total_time_in_seconds;
+                            }
+
+                            $minsBilled = floor($minsBilled / 60);
+                        ?>
+                        <b class="{{$minsBilled >= 20 ? 'text-success' : 'text-warning-mellow'}}">
+                            {{$minsBilled}}
+                            @if($minsBilled < 20)
+                                <i class="fa fa-exclamation-triangle"></i>
+                            @else
+                                <i class="fa fa-check"></i>
+                            @endif
+                            <span class="ml-1 text-secondary text-sm font-weight-normal">(20 needed)</span>
+                        </b>
+                    </td>
                     <td>
                         @if($careMonth->rmBill)
                             {{ $careMonth->rmBill->code }}