Skip to content

Commit

Permalink
fix: appointment with column
Browse files Browse the repository at this point in the history
  • Loading branch information
itsemon245 committed Jul 29, 2024
1 parent ec19d10 commit 3955939
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resources/views/backend/map/showMaps.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class="w-100 rounded-top rounded-left rounded-right shadow-top shadow-start shad
</p>
@canany('update map')
<x-backend.ui.button class="btn-success btn-sm" type='custom'
href="{{ route('user-appointments.index', ['map_id' => $map->id]) }}">Appoinments</x-backend.ui.button>
href="{{ auth()->user()->role_name == 'expert' ? route('user-appointments.index', ['map_id' => $map->id, 'type' => 'consultation']) : route('user-appointments.index', ['map_id' => $map->id]) }}">Appoinments</x-backend.ui.button>
@endcanany
@can('update map')
<x-backend.ui.button class="btn-sm" type='edit'
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/user/appointments.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr>
<th>#</th>
<th>User Info</th>
@if ($appointments->first() && method_exists($appointments->first(), 'expertProfile'))
@if (request('type') == 'consultation')
<th>Appointment With</th>
@endif
<th>Date & Time</th>
Expand Down Expand Up @@ -59,7 +59,7 @@
</p>
</div>
</td>
@if ($appointment->expertProfile)
@if(request('type') == 'consultation')
<td>
<p class="mb-1">
<strong>Expert Name:</strong> <span>{{ $appointment->expertProfile?->name }}</span>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/user/appointmentsApproved.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr>
<th>#</th>
<th>User Info</th>
@if ($appointments->first() && method_exists($appointments->first(), 'expertProfile'))
@if (request('type') == 'consultation')
<th>Appointment With</th>
@endif
<th>Date & Time</th>
Expand Down Expand Up @@ -60,7 +60,7 @@
</p>
</div>
</td>
@if ($appointment->expertProfile)
@if(request('type') == 'consultation')
<td>
<p class="mb-1">
<strong>Expert Name:</strong> <span>{{ $appointment->expertProfile?->name }}</span>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/user/appointmentsCompleted.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr>
<th>#</th>
<th>User Info</th>
@if ($appointments->first() && method_exists($appointments->first(), 'expertProfile'))
@if (request('type') == 'consultation')
<th>Appointment With</th>
@endif
<th>Date & Time</th>
Expand Down Expand Up @@ -59,7 +59,7 @@
</p>
</div>
</td>
@if ($appointment->expertProfile)
@if(request('type') == 'consultation')
<td>
<p class="mb-1">
<strong>Expert Name:</strong> <span>{{ $appointment->expertProfile?->name }}</span>
Expand Down

0 comments on commit 3955939

Please sign in to comment.