commit
ddaca1ab98
|
|
@ -3,7 +3,6 @@
|
|||
@section('title', 'Paket Foto')
|
||||
|
||||
@section('content')
|
||||
{{-- ALERT SUKSES --}}
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
|
|
@ -11,7 +10,6 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ALERT ERROR UMUM (Jika ada error selain validasi modal) --}}
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
{{ session('error') }}
|
||||
|
|
@ -20,17 +18,30 @@
|
|||
@endif
|
||||
<section class="section">
|
||||
<div class="d-flex gap-2 pb-3">
|
||||
|
||||
@if (Auth::user()->role == 'admin_foto' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn-add-foto" data-bs-toggle="modal" data-bs-target="#createFoto">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Paket Foto
|
||||
</a>
|
||||
|
||||
@else
|
||||
<a href="javascript:void(0)" class="btn-add-foto disabled" style="opacity: 0.5; cursor: not-allowed;"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Paket Foto
|
||||
</a>
|
||||
@endif
|
||||
@if (Auth::user()->role == 'admin_foto' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn-add-additional" data-bs-toggle="modal" data-bs-target="#createAdd">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Additional
|
||||
</a>
|
||||
|
||||
@else
|
||||
<a href="javascript:void(0)" class="btn-add-additional disabled" style="opacity: 0.5; cursor: not-allowed;"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Additional
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
|
|
@ -80,21 +91,40 @@
|
|||
</td>
|
||||
<td class="col-auto text-center">
|
||||
<div class="d-flex flex-wrap justify-content-center gap-1">
|
||||
|
||||
<a href="#" class="btn icon btn-primary btn-action"
|
||||
data-bs-toggle="modal" data-bs-target="#foto{{ $f->id_paket }}">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
|
||||
@if (Auth::user()->role == 'admin_foto' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn icon btn-warning btn-action"
|
||||
data-bs-toggle="modal" data-bs-target="#editFoto{{ $f->id_paket }}">
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#editFoto{{ $f->id_paket }}">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
|
||||
<a href="#" class="btn icon btn-danger btn-action"
|
||||
data-bs-toggle="modal" data-bs-target="#deleteFoto{{ $f->id_paket }}">
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#deleteFoto{{ $f->id_paket }}">
|
||||
<i class="bi bi-trash"></i>
|
||||
</a>
|
||||
@else
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<button class="btn icon btn-warning btn-action disabled"
|
||||
style="opacity: 0.5;cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<button class="btn icon btn-danger btn-action disabled"
|
||||
style="opacity: 0.5;cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -110,7 +140,8 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab">
|
||||
<div class="tab-pane fade" id="v-pills-profile" role="tabpanel"
|
||||
aria-labelledby="v-pills-profile-tab">
|
||||
<table class="table table-striped" id="riwayat-foto">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -128,6 +159,7 @@
|
|||
<td>Rp {{ number_format($add->harga, 0, ',', '.') }}</td>
|
||||
<td class="col-auto text-center">
|
||||
<div class="d-flex flex-wrap justify-content-center gap-1">
|
||||
@if (Auth::user()->role == 'admin_foto' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn icon btn-warning btn-action"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#editAdd{{ $add->id_additional }}">
|
||||
|
|
@ -139,6 +171,24 @@
|
|||
data-bs-target="#deleteAdd{{ $add->id_additional }}">
|
||||
<i class="bi bi-trash"></i>
|
||||
</a>
|
||||
@else
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<button class="btn icon btn-warning btn-action disabled"
|
||||
style="opacity: 0.5;cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Foto dan Pemilik">
|
||||
<button class="btn icon btn-danger btn-action disabled"
|
||||
style="opacity: 0.5;cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -113,21 +113,48 @@ class="badge {{ $p->status_label->class }}">
|
|||
</div>
|
||||
<div class="modal-footer border-top-0 pt-2 px-2">
|
||||
<div class="d-flex w-100 gap-2">
|
||||
@php
|
||||
$hasAccess = Auth::user()->role == 'admin_buket' || Auth::user()->role == 'pemilik';
|
||||
@endphp
|
||||
@if ($p->status_transaksi == 'menunggu_verifikasi')
|
||||
@if ($hasAccess)
|
||||
<button type="button" class="btn btn-danger flex-fill tolak"
|
||||
onclick="prosesBuket(this, 'tolak', '{{ $p->id_transaksi }}', 'buket')">
|
||||
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 Buket dan Pemilik yang dapat menolak pesanan ini">
|
||||
Tolak Pesanan
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($hasAccess)
|
||||
<button type="button" class="btn btn-success flex-fill terima"
|
||||
onclick="prosesBuket(this, 'terima', '{{ $p->id_transaksi }}', 'buket')">
|
||||
Terima Pesanan
|
||||
</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-success flex-fill terima disabled"
|
||||
style="cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.5;"
|
||||
title="Hanya Admin Buket 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="prosesBuket(this, 'selesai', '{{ $p->id_transaksi }}', 'buket')">
|
||||
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 Buket dan Pemilik yang dapat menyelesaikan pesanan ini">
|
||||
Selesaikan Pesanan
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -108,21 +108,48 @@ class="badge {{ $p->status_label->class }}">
|
|||
</div>
|
||||
<div class="modal-footer border-top-0 pt-2 px-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 ($hasAccess)
|
||||
<button type="button" class="btn btn-danger flex-fill tolak"
|
||||
onclick="prosesFoto(this, 'tolak', '{{ $p->id_booking }}', 'foto')">
|
||||
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
|
||||
|
||||
@if ($hasAccess)
|
||||
<button type="button" class="btn btn-success flex-fill terima"
|
||||
onclick="prosesFoto(this, 'terima', '{{ $p->id_booking }}', 'foto')">
|
||||
Terima Pesanan
|
||||
</button>
|
||||
@elseif ($p->status_booking == 'diterima')
|
||||
@else
|
||||
<button type="button" class="btn btn-success flex-fill terima disabled"
|
||||
style="cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.5;"
|
||||
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
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,18 @@
|
|||
@endif
|
||||
<section class="section">
|
||||
<div class="buttons pb-3">
|
||||
@if (Auth::user()->role == 'admin_buket' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn-add-custom" data-bs-toggle="modal" data-bs-target="#create">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Produk Buket
|
||||
</a>
|
||||
@else
|
||||
<a href="javascript:void(0)" class="btn-add-custom disabled" style="opacity: 0.5; cursor: not-allowed;"
|
||||
title="Hanya dapat diakses oleh Admin Buket dan Pemilik">
|
||||
<i class="bi bi-plus fs-5"></i>
|
||||
Tambah Produk Buket
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
|
@ -56,6 +64,7 @@
|
|||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
|
||||
@if (Auth::user()->role == 'admin_buket' || Auth::user()->role == 'pemilik')
|
||||
<a href="#" class="btn icon btn-warning btn-action" data-bs-toggle="modal"
|
||||
data-bs-target="#edit{{ $b->id_buket }}">
|
||||
<i class="bi bi-pencil"></i>
|
||||
|
|
@ -65,6 +74,24 @@
|
|||
data-bs-target="#delete{{ $b->id_buket }}">
|
||||
<i class="bi bi-trash"></i>
|
||||
</a>
|
||||
@else
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Buket dan Pemilik">
|
||||
<button class="btn icon btn-warning btn-action disabled"
|
||||
style="opacity: 0.5; cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span class="d-inline-block" data-bs-toggle="tooltip"
|
||||
title="Hanya dapat diakses oleh Admin Buket dan Pemilik">
|
||||
<button class="btn icon btn-danger btn-action disabled"
|
||||
style="opacity: 0.5; cursor: not-allowed !important; pointer-events: auto !important;"
|
||||
type="button" disabled>
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@ class="sidebar-item {{ request()->is('admin/beranda', 'admin/beranda-pemilik') ?
|
|||
style="min-width: 150px;">
|
||||
<li class="dropdown-header text-center">
|
||||
<h6 class="mb-0 text-dark">{{ Auth::user()->username ?? 'Admin' }}</h6>
|
||||
<small class="text-muted">{{ ucfirst(Auth::user()->role ?? 'Administrator') }}</small>
|
||||
<span
|
||||
class="badge rounded-pill px-3 py-2 mt-2
|
||||
{{ Auth::user()->role == 'admin_buket' ? 'bg-success-subtle' : 'bg-warning-subtle' }}">
|
||||
{{ str_replace('_', ' ', Auth::user()->role) }}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<hr class="dropdown-divider mt-0">
|
||||
|
|
|
|||
Loading…
Reference in New Issue