瀏覽代碼

Pros with access - 1 row / pro for non-admins

Vijayakrishnan 3 年之前
父節點
當前提交
a78b3e39fc
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      resources/views/app/patient/pros.blade.php

+ 9 - 2
resources/views/app/patient/pros.blade.php

@@ -17,8 +17,15 @@
                 @php $prevPro = ''; @endphp
                 @foreach($prosWithAccess as $aPro)
                     <tr>
-                        <td class="px-2 {{ $aPro['pro'] !== $prevPro ? 'font-weight-bold' : 'text-secondary' }}">{{ $aPro['pro'] }}</td>
-                        <td class="px-2">{{ $aPro['association'] }}</td>
+                        @if($pro->pro_type === 'ADMIN')
+                            <td class="px-2 {{ $aPro['pro'] !== $prevPro ? 'font-weight-bold' : 'text-secondary' }}">{{ $aPro['pro'] }}</td>
+                            <td class="px-2">{{ $aPro['association'] }}</td>
+                        @else
+                            @if($aPro['pro'] !== $prevPro)
+                                <td class="px-2 {{ $aPro['pro'] !== $prevPro ? 'font-weight-bold' : 'text-secondary' }}">{{ $aPro['pro'] }}</td>
+                                <td class="px-2">{{ $aPro['association'] }}</td>
+                            @endif
+                        @endif
                         @php $prevPro = $aPro['pro']; @endphp
                     </tr>
                 @endforeach