fix: enhance button accessibility for non-admin users in modal foto
This commit is contained in:
parent
8608a7f4fa
commit
706064056a
|
|
@ -108,21 +108,48 @@ class="badge {{ $p->status_label->class }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer border-top-0 pt-2 px-2">
|
<div class="modal-footer border-top-0 pt-2 px-2">
|
||||||
<div class="d-flex w-100 gap-2">
|
<div class="d-flex w-100 gap-2">
|
||||||
|
@php
|
||||||
|
$hasAccess = Auth::user()->role == 'admin_foto' || Auth::user()->role == 'pemilik';
|
||||||
|
@endphp
|
||||||
@if ($p->status_booking == 'menunggu_verifikasi')
|
@if ($p->status_booking == 'menunggu_verifikasi')
|
||||||
<button type="button" class="btn btn-danger flex-fill tolak"
|
@if ($hasAccess)
|
||||||
onclick="prosesFoto(this, 'tolak', '{{ $p->id_booking }}', 'foto')">
|
<button type="button" class="btn btn-danger flex-fill tolak"
|
||||||
Tolak Pesanan
|
onclick="prosesFoto(this, 'tolak', '{{ $p->id_booking }}', 'foto')">
|
||||||
</button>
|
Tolak Pesanan
|
||||||
|
</button>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-danger flex-fill tolak disabled"
|
||||||
|
style="cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.5;"
|
||||||
|
title="Hanya Admin Foto dan Pemilik yang dapat menolak pesanan ini">
|
||||||
|
Tolak Pesanan
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
|
||||||
<button type="button" class="btn btn-success flex-fill terima"
|
@if ($hasAccess)
|
||||||
onclick="prosesFoto(this, 'terima', '{{ $p->id_booking }}', 'foto')">
|
<button type="button" class="btn btn-success flex-fill terima"
|
||||||
Terima Pesanan
|
onclick="prosesFoto(this, 'terima', '{{ $p->id_booking }}', 'foto')">
|
||||||
</button>
|
Terima Pesanan
|
||||||
@elseif ($p->status_booking == 'diterima')
|
</button>
|
||||||
<button type="button" class="btn btn-primary flex-fill terima"
|
@else
|
||||||
onclick="prosesFoto(this, 'selesai', '{{ $p->id_booking }}', 'foto')">
|
<button type="button" class="btn btn-success flex-fill terima disabled"
|
||||||
Selesaikan Pesanan
|
style="cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.5;"
|
||||||
</button>
|
title="Hanya Admin Foto dan Pemilik yang dapat menerima pesanan ini">
|
||||||
|
Terima Pesanan
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@elseif ($p->status_transaksi == 'diterima')
|
||||||
|
@if ($hasAccess)
|
||||||
|
<button type="button" class="btn btn-primary flex-fill terima"
|
||||||
|
onclick="prosesFoto(this, 'selesai', '{{ $p->id_booking }}', 'foto')">
|
||||||
|
Selesaikan Pesanan
|
||||||
|
</button>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-primary flex-fill terima disabled"
|
||||||
|
style="cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.5;"
|
||||||
|
title="Hanya Admin Foto dan Pemilik yang dapat menyelesaikan pesanan ini">
|
||||||
|
Selesaikan Pesanan
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue