Эх сурвалжийг харах

hide new patient if pro is not admin

Josh 4 жил өмнө
parent
commit
e8cb97a1f0

+ 1 - 1
resources/views/app/new-patient.blade.php

@@ -20,7 +20,7 @@
                             <div class="alert alert-danger">{{ session('message') }}</div>
                         @endif
                         <div class='form-group mb-3'>
-                            <label class='control-label'>How is the quarantine treating you?</label>
+                            <label class='control-label'>How is quarantine treating you?</label>
                             <textarea class='form-control' type='text' name='howIsQuarantine'></textarea>
                         </div>
                         <div class='form-group mb-3'>

+ 2 - 0
resources/views/layouts/template.blade.php

@@ -61,7 +61,9 @@
             <ul class="navbar-nav mr-auto">
                 <li class="nav-item"><a class="nav-link" href="{{ route('dashboard') }}"><i class="mr-1 fas fa-tachometer-alt"></i> Dashboard</a> </li>
                 <li class="nav-item"><a class="nav-link" href="{{ route('patients') }}"><i class="mr-1 fas fa-user-injured"></i> Patients</a> </li>
+                @if($pro && $pro->pro_type == 'ADMIN')
                 <li class="nav-item"><a class="nav-link" href="{{ route('new-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Patient</a> </li>
+                @endif
                 <li class="nav-item dropdown">
                     <a class="nav-link dropdown-toggle" href="#" id="practice-management" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="mr-1 fas fa-tasks"></i> Practice</a>
                     <div class="dropdown-menu" aria-labelledby="practice-management">