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