소스 검색

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