diff --git a/app/Http/Controllers/Admin/BerandaController.php b/app/Http/Controllers/Admin/BerandaController.php index a19ee06..bd8aae1 100644 --- a/app/Http/Controllers/Admin/BerandaController.php +++ b/app/Http/Controllers/Admin/BerandaController.php @@ -29,8 +29,8 @@ public function index() $currMasuk = TransaksiBuket::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->count() + BookingFoto::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->count(); - $currSelesai = TransaksiBuket::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_transaksi', 'diterima')->count() + - BookingFoto::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_booking', 'diterima')->count(); + $currSelesai = TransaksiBuket::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_transaksi', 'selesai')->count() + + BookingFoto::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_booking', 'selesai')->count(); $currBatal = TransaksiBuket::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_transaksi', 'ditolak')->count() + BookingFoto::whereMonth('created_at', $now->month)->whereYear('created_at', $now->year)->where('status_booking', 'ditolak')->count(); @@ -42,8 +42,8 @@ public function index() $prevMasuk = TransaksiBuket::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->count() + BookingFoto::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->count(); - $prevSelesai = TransaksiBuket::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_transaksi', 'diterima')->count() + - BookingFoto::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_booking', 'diterima')->count(); + $prevSelesai = TransaksiBuket::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_transaksi', 'selesai')->count() + + BookingFoto::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_booking', 'selesai')->count(); $prevBatal = TransaksiBuket::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_transaksi', 'ditolak')->count() + BookingFoto::whereMonth('created_at', $lastMonth->month)->whereYear('created_at', $lastMonth->year)->where('status_booking', 'ditolak')->count(); @@ -63,13 +63,13 @@ public function index() 'batal_grow' => $getGrowth($currBatal, $prevBatal), ]; - // --- 4. JADWAL & PENDING (Sudah Benar) --- + // --- 4. JADWAL & PENDING --- $buketToday = TransaksiBuket::with(['pelanggan', 'buket'])->whereDate('tgl_ambil', $today)->where('status_transaksi', 'diterima')->get(); $fotoToday = BookingFoto::with(['pelanggan', 'paketFoto'])->whereDate('tgl_booking', $today)->where('status_booking', 'diterima')->orderBy('jam_mulai', 'asc')->get(); - $riwayatBuket = TransaksiBuket::with(['pelanggan', 'buket'])->where('status_transaksi', 'menunggu_verifikasi')->latest()->get(); - $riwayatFoto = BookingFoto::with(['pelanggan', 'paketFoto'])->where('status_booking', 'menunggu_verifikasi')->latest()->get(); + $pesananBuket = TransaksiBuket::with(['pelanggan', 'buket'])->where('status_transaksi', 'menunggu_verifikasi')->latest()->get(); + $pesananFoto = BookingFoto::with(['pelanggan', 'paketFoto'])->where('status_booking', 'menunggu_verifikasi')->latest()->get(); - return view('admin.beranda.index', compact('stat', 'buketToday', 'fotoToday', 'riwayatBuket', 'riwayatFoto')); + return view('admin.beranda.index', compact('stat', 'buketToday', 'fotoToday', 'pesananBuket', 'pesananFoto')); } } diff --git a/app/Http/Controllers/Admin/HistoriPesananController.php b/app/Http/Controllers/Admin/HistoriPesananController.php index 53ea3c0..7240d4b 100644 --- a/app/Http/Controllers/Admin/HistoriPesananController.php +++ b/app/Http/Controllers/Admin/HistoriPesananController.php @@ -11,16 +11,11 @@ class HistoriPesananController extends Controller { public function index() { - $riwayatBuket = TransaksiBuket::with(['pelanggan', 'buket']) - ->where('status_transaksi', '!=', 'menunggu_verifikasi') - ->latest() - ->get(); + $riwayatBuket = TransaksiBuket::whereIn('status_transaksi', ['selesai', 'ditolak']) + ->latest()->get(); - // Ambil riwayat foto (selain status menunggu) - $riwayatFoto = BookingFoto::with(['pelanggan', 'paketFoto']) - ->where('status_booking', '!=', 'menunggu_verifikasi') - ->latest() - ->get(); + $riwayatFoto = BookingFoto::whereIn('status_booking', ['selesai', 'ditolak']) + ->latest()->get(); return view('admin.pesanan.riwayat', compact('riwayatBuket', 'riwayatFoto')); } diff --git a/app/Http/Controllers/Admin/PesananBuketController.php b/app/Http/Controllers/Admin/PesananBuketController.php index 28c5a66..2a36416 100644 --- a/app/Http/Controllers/Admin/PesananBuketController.php +++ b/app/Http/Controllers/Admin/PesananBuketController.php @@ -10,9 +10,8 @@ class PesananBuketController extends Controller { public function index() { - $pesanan = TransaksiBuket::with(['pelanggan']) - ->where('status_transaksi', 'menunggu_verifikasi') - ->latest() + $pesanan = TransaksiBuket::whereIn('status_transaksi', ['menunggu_verifikasi', 'diterima']) + ->orderBy('created_at', 'ASC') ->get(); return view('admin.pesanan.buket', compact('pesanan')); @@ -27,10 +26,13 @@ public function updateStatus(Request $request, $id) // 2. Tentukan status & session flash sekaligus agar tidak dobel if ($request->jenis === 'terima') { $status = 'diterima'; - session()->flash('success', "Pesanan #{$pesanan->no_invoice} telah diterima!"); // Alert Hijau + session()->flash('success', "Pesanan {$pesanan->no_invoice} telah diterima!"); // Alert Hijau + } elseif ($request->jenis === 'selesai') { + $status = 'selesai'; + session()->flash('success', "Pesanan {$pesanan->no_invoice} berhasil diselesaikan!"); } else { $status = 'ditolak'; - session()->flash('error', "Pesanan #{$pesanan->no_invoice} telah ditolak!"); // Alert Merah + session()->flash('error', "Pesanan {$pesanan->no_invoice} telah ditolak!"); // Alert Merah } // 3. Update database @@ -49,9 +51,10 @@ public function updateStatus(Request $request, $id) $invoice = $pesanan->no_invoice; // 5. Susun Pesan berdasarkan kondisi + $msg = null; if ($status === 'diterima') { $msg = "Halo Kak *{$nama}*,\n\n" . - "Pesanan Anda dengan Nomor Invoice: *#{$invoice}* telah kami *TERIMA* dan masuk dalam daftar proses pengerjaan.\n\n" . + "Pesanan Anda dengan Nomor Invoice: *{$invoice}* telah kami *TERIMA* dan masuk dalam daftar proses pengerjaan.\n\n" . "*Rincian Pesanan:*\n" . "- *Produk:* {$produk}\n" . "- *Total Bayar:* Rp {$total}\n" . @@ -59,9 +62,9 @@ public function updateStatus(Request $request, $id) "- *Ucapan:* \"{$ucapan}\"\n" . "- *Waktu Pengambilan:* {$tanggal} pukul {$waktu} WIB\n\n" . "Mohon simpan rincian ini dan ditunggu info selanjutnya ya Kak. Terima kasih! ✨"; - } else { + } elseif ($status === 'ditolak') { $msg = "Halo Kak *{$nama}*,\n\n" . - "Mengenai pesanan Anda dengan Nomor Invoice: *#{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" . + "Mengenai pesanan Anda dengan Nomor Invoice: *{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" . "*[TULIS ALASAN DI SINI]*\n\n" . "*Rincian Pesanan:*\n" . "- *Produk:* {$produk}\n" . @@ -71,18 +74,24 @@ public function updateStatus(Request $request, $id) } // 6. Format Nomor WhatsApp - $no_wa = preg_replace('/[^0-9]/', '', $pesanan->pelanggan->no_wa); // Pastikan kolomnya 'no_wa' + $wa_url = null; - if (str_starts_with($no_wa, '0')) { - $no_wa = '62' . substr($no_wa, 1); - } elseif (str_starts_with($no_wa, '8')) { - $no_wa = '62' . $no_wa; + if ($msg) { + $no_wa = preg_replace('/[^0-9]/', '', $pesanan->pelanggan->no_wa); + + if (str_starts_with($no_wa, '0')) { + $no_wa = '62' . substr($no_wa, 1); + } elseif (str_starts_with($no_wa, '8')) { + $no_wa = '62' . $no_wa; + } + + $wa_url = "https://wa.me/{$no_wa}?text=" . urlencode($msg); } // 7. Kembalikan Response JSON return response()->json([ 'success' => true, - 'wa_url' => "https://wa.me/{$no_wa}?text=" . urlencode($msg) + 'wa_url' => $wa_url ]); } catch (\Exception $e) { return response()->json(['success' => false, 'message' => $e->getMessage()], 500); diff --git a/app/Http/Controllers/Admin/PesananFotoController.php b/app/Http/Controllers/Admin/PesananFotoController.php index a4d6bb7..1fe3426 100644 --- a/app/Http/Controllers/Admin/PesananFotoController.php +++ b/app/Http/Controllers/Admin/PesananFotoController.php @@ -11,11 +11,11 @@ class PesananFotoController extends Controller public function index() { $pesanan = BookingFoto::with([ - 'pelanggan', // Untuk ambil Nama & No HP - 'paketFoto', // Untuk ambil Nama Paket (misal: Paket Wisuda) - 'detailAdditional.additional' // Lanjut ambil Nama Additional (misal: Background, Orang Tambahan) + 'pelanggan', + 'paketFoto', + 'detailAdditional.additional' ]) - ->where('status_booking', 'menunggu_verifikasi') + ->whereIn('status_booking', ['menunggu_verifikasi', 'diterima']) ->latest() ->get(); @@ -31,10 +31,13 @@ public function updateStatus(Request $request, $id) // 2. Tentukan status & session flash if ($request->jenis === 'terima') { $status = 'diterima'; - session()->flash('success', "Booking #{$pesanan->no_invoice} telah diterima!"); + session()->flash('success', "Booking {$pesanan->no_invoice} telah diterima!"); + } elseif ($request->jenis === 'selesai') { + $status = 'selesai'; + session()->flash('success', "Booking {$pesanan->no_invoice} berhasil diselesaikan!"); } else { $status = 'ditolak'; - session()->flash('error', "Booking #{$pesanan->no_invoice} telah ditolak!"); + session()->flash('error', "Booking {$pesanan->no_invoice} telah ditolak!"); } // 3. Update database (Pastikan nama kolom status_booking sesuai migrasimu) @@ -60,45 +63,55 @@ public function updateStatus(Request $request, $id) $list_additional .= "- " . $item->additional->nama . " (x" . $item->qty . ")\n"; } } else { - $list_additional = "- Tidak ada tambahan\n"; + $list_additional = "- Tidak ada additional\n"; } // 6. Susun Pesan WA + $msg = null; if ($status === 'diterima') { $msg = "Halo Kak *{$nama}* ,\n\n" . - "Booking foto Anda dengan Invoice: *#{$invoice}* telah kami *TERIMA*. \n\n" . + "Booking foto Anda dengan Invoice: *{$invoice}* telah kami *TERIMA*. \n\n" . "*Rincian Booking:*\n" . "- *Paket:* {$paket}\n" . - "*Tambahan:*\n{$list_additional}" . + "*Additional:*\n{$list_additional}" . "- *Total Bayar:* Rp {$total}\n\n" . "*Jadwal Sesi Foto:*\n" . " Tanggal: {$tanggal}\n" . " Jam: {$jam_mulai} - {$jam_selesai} WIB\n\n" . "Mohon datang 15 menit sebelum jadwal dimulai ya Kak. Sampai jumpa di studio! "; - } else { + } elseif ($status === 'ditolak') { $msg = "Halo Kak *{$nama}*,\n\n" . - "Mohon maaf, booking foto Anda dengan Invoice *#{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" . + "Mohon maaf, booking foto Anda dengan Invoice *{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" . "*[TULIS ALASAN DI SINI]*\n\n" . "*Rincian Booking:*\n" . "- *Paket:* {$paket}\n" . - "*Tambahan:*\n{$list_additional}" . + "*Additional:*\n{$list_additional}" . "- *Total Bayar:* Rp {$total}\n" . - "- *Jadwal Sesi:* {$tanggal} ({$jam_mulai} - {$jam_selesai} WIB)\n\n" . + "*Jadwal Sesi Foto:*\n" . + " Tanggal: {$tanggal}\n" . + " Jam: {$jam_mulai} - {$jam_selesai} WIB\n\n" . "Admin kami akan segera menghubungi Kakak untuk info pengembalian dana atau penjadwalan ulang. Terima kasih. "; } // 7. Format Nomor WhatsApp (Sesuaikan kolom: no_hp / no_wa) - $no_wa = preg_replace('/[^0-9]/', '', $pesanan->pelanggan->no_wa); + $wa_url = null; - if (str_starts_with($no_wa, '0')) { - $no_wa = '62' . substr($no_wa, 1); - } elseif (str_starts_with($no_wa, '8')) { - $no_wa = '62' . $no_wa; + if ($msg) { + $no_wa = preg_replace('/[^0-9]/', '', $pesanan->pelanggan->no_wa); + + if (str_starts_with($no_wa, '0')) { + $no_wa = '62' . substr($no_wa, 1); + } elseif (str_starts_with($no_wa, '8')) { + $no_wa = '62' . $no_wa; + } + + $wa_url = "https://wa.me/{$no_wa}?text=" . urlencode($msg); } + return response()->json([ 'success' => true, - 'wa_url' => "https://wa.me/{$no_wa}?text=" . urlencode($msg) + 'wa_url' => $wa_url ]); } catch (\Exception $e) { return response()->json(['success' => false, 'message' => $e->getMessage()], 500); diff --git a/app/Http/Controllers/User/BookingFotoController.php b/app/Http/Controllers/User/BookingFotoController.php old mode 100644 new mode 100755 index 21389f7..1365543 --- a/app/Http/Controllers/User/BookingFotoController.php +++ b/app/Http/Controllers/User/BookingFotoController.php @@ -12,6 +12,8 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use Illuminate\Support\Facades\Storage; +use Illuminate\Support\Facades\Validator; + class BookingFotoController extends Controller { @@ -41,9 +43,6 @@ public function detail($id) public function loadCalendar(Request $request) { \Carbon\Carbon::setLocale('id'); - // Ambil bulan & tahun dari request AJAX, atau default sekarang - // $month = $request->month ?? date('m'); - // $year = $request->year ?? date('Y'); $month = $request->month ?? date('m'); $year = $request->year ?? date('Y'); $start = \Carbon\Carbon::createFromDate($year, $month, 1); @@ -51,8 +50,7 @@ public function loadCalendar(Request $request) // Data Navigasi $prevMonth = $start->copy()->subMonth(); $nextMonth = $start->copy()->addMonth(); - // translatedFormat akan mengikuti locale 'id' di config Anda - $currentMonthLabel = $start->isoFormat('MMMM YYYY'); // Return hanya potongan HTML (Partial), bukan halaman full + $currentMonthLabel = $start->isoFormat('MMMM YYYY'); $html = view('user.components.calendar-grid', compact( 'start', 'prevMonth', @@ -65,8 +63,7 @@ public function loadCalendar(Request $request) } public function cekSlot(Request $request) { - // Cari booking yang statusnya valid (bukan dibatalkan/ditolak) - // Sesuaikan status dengan logic bisnis kamu + $booked = BookingFoto::where('tgl_booking', $request->tanggal) ->whereIn('status_booking', ['menunggu_verifikasi', 'diterima', 'selesai']) ->get(['jam_mulai']); @@ -150,14 +147,30 @@ public function cancelBooking() } public function store(Request $request) { - // 1. Validasi Input menggunakan Format Validator - $validator = \Illuminate\Support\Facades\Validator::make($request->all(), [ + $validator = Validator::make($request->all(), [ 'id_paket' => 'required|exists:paket_fotos,id_paket', 'tgl_booking' => 'required|date|after_or_equal:today', 'jam_mulai' => 'required', 'nama' => 'required|string|min:3|max:100', 'no_wa' => 'required|numeric|digits_between:10,15', 'bukti_bayar' => 'required|image|mimes:jpeg,png,jpg|max:2048', + ], [ + // Detail Pesan Kustom + 'required' => 'Kolom :attribute wajib diisi.', + 'string' => 'Input :attribute harus berupa teks valid.', + 'min' => ':attribute terlalu pendek, minimal :min karakter.', + 'max' => ':attribute terlalu panjang, maksimal :max karakter.', + 'numeric' => ':attribute harus berupa angka.', + 'digits_between' => ':attribute harus antara :min sampai :max digit.', + 'date' => 'Format tanggal pada :attribute tidak valid.', + 'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.', + 'image' => ':attribute harus berupa file gambar.', + 'mimes' => 'Format :attribute harus jpeg, png, atau jpg.', + 'max.file' => 'Ukuran :attribute maksimal adalah 2MB.', + ], [ + 'nama' => 'nama pemesan', + 'no_wa' => 'nomor WhatsApp', + 'bukti_bayar' => 'bukti pembayaran', ]); DB::beginTransaction(); // Mulai Transaksi Database @@ -186,21 +199,11 @@ public function store(Request $request) ['no_wa' => $request->no_wa], ['nama' => $request->nama] ); - - // 5. Upload Bukti Bayar - $pathBukti = null; - if ($request->hasFile('bukti_bayar')) { - $file = $request->file('bukti_bayar'); - $namaFile = 'bukti_' . time() . '_' . Str::random(5) . '.' . $file->getClientOriginalExtension(); - $file->move(public_path('img/payment/foto'), $namaFile); - $pathBukti = $file->storeAs('img/payment/foto', $namaFile, 'public'); - } - // 6. Hitung Grand Total (Paket + Additional) // Kita hitung ulang di server agar aman dari manipulasi inspect element $grandTotal = $paket->harga; $listAdditional = []; - + $totalDurasi = $durasiMenit; if ($request->has('addons')) { foreach ($request->addons as $idAddon => $qty) { if ($qty > 0) { @@ -230,26 +233,25 @@ public function store(Request $request) // 3. Cek Slot Sekali Lagi (Mencegah Race Condition) $isTaken = \App\Models\BookingFoto::where('tgl_booking', $request->tgl_booking) ->where('jam_mulai', $request->jam_mulai) - ->whereIn('status_booking', ['menunggu_verifikasi', 'diterima', 'selesai']) + ->whereIn('status_booking', ['menunggu_verifikasi', 'diterima']) ->exists(); if ($isTaken) { return back()->with('error', 'Mohon maaf, slot waktu ini baru saja diambil orang lain.'); } - // 4. Simpan/Update Data Pelanggan - $pelanggan = \App\Models\Pelanggan::firstOrCreate( - ['no_wa' => $request->no_wa], - ['nama' => $request->nama] - ); + // 4. Simpan Data Pelanggan + $pelanggan = \App\Models\Pelanggan::create([ + 'nama' => $request->nama, + 'no_wa' => $request->no_wa + ]); // 5. Upload Bukti Bayar $pathBukti = null; if ($request->hasFile('bukti_bayar')) { $file = $request->file('bukti_bayar'); - $namaFile = 'bukti_' . time() . $file->getClientOriginalExtension(); - $file->move(public_path('img/payment'), $namaFile); - $pathBukti = 'img/payment/foto' . $namaFile; + $namaFile = 'bukti_' . time() . '.' . $file->getClientOriginalExtension(); + $pathBukti = $file->storeAs('img/payment/foto', $namaFile, 'public'); } // 6. Simpan Booking Utama @@ -286,19 +288,19 @@ public function store(Request $request) $txtAddons .= "\n"; // Kasih jarak baris } // 8. Redirect ke WhatsApp - $pesan = "Halo Admin Flo.do! Saya sudah melakukan pembayaran untuk invoice {$booking->no_invoice}:" . + $pesan = "Halo Admin Flo.do! Saya sudah melakukan pembayaran untuk invoice {$booking->no_invoice}:\n\n" . "*Data Pemesan:*\n" . - "Nama: {$pelanggan->nama}\n" . - "WA: {$pelanggan->no_wa}\n\n" . + "Nama: {$request->nama}\n" . + "WA: {$request->no_wa}\n\n" . "*Detail Booking:*\n" . - "Nama Paket: {$request->nama}\n" . + "Nama Paket: {$paket->nama}\n" . $txtAddons . "Tanggal: " . \Carbon\Carbon::parse($request->tgl_booking)->translatedFormat('l, d F Y') . "\n" . "Jam: {$request->jam_mulai} - {$jamSelesai->format('H:i')} WIB\n" . - "Total: Rp " . number_format($grandTotal, 0, ',', '.') . "\n" . + "Total: Rp " . number_format($grandTotal, 0, ',', '.') . "\n\n" . "Mohon segera diproses, ya! Terima kasih."; - $urlWA = "https://wa.me/6289673668516?text=" . urlencode($pesan); + $urlWA = "https://wa.me/6282337687878?text=" . urlencode($pesan); session()->forget('payment_deadline'); return redirect()->route('booking.foto')->with([ diff --git a/app/Http/Controllers/User/PesanBuketController.php b/app/Http/Controllers/User/PesanBuketController.php old mode 100644 new mode 100755 index 777a1e5..8e0c9b0 --- a/app/Http/Controllers/User/PesanBuketController.php +++ b/app/Http/Controllers/User/PesanBuketController.php @@ -114,9 +114,7 @@ public function store(Request $request) $namaFile = null; if ($request->hasFile('bukti_bayar')) { $file = $request->file('bukti_bayar'); - // Membuat nama file unik berdasarkan waktu agar tidak tertimpa - $namaFile = 'bukti_' . time() . $file->getClientOriginalExtension(); - // Pindahkan ke folder public/img/payment + $namaFile = 'bukti_' . time() . '.' . $file->getClientOriginalExtension(); $pathBukti = $file->storeAs('img/payment/buket', $namaFile, 'public'); } @@ -124,12 +122,12 @@ public function store(Request $request) 'id_pelanggan' => $pelanggan->id_pelanggan, 'id_buket' => $request->id_buket, 'tgl_ambil' => $request->tgl_ambil . ' ' . $request->waktu_ambil, - 'request' => $request->request_khusus, // Ubah dari request_khusus ke request + 'request' => $request->request_khusus, 'ucapan' => $request->ucapan, - 'bukti_bayar' => 'img/payment/buket' . $namaFile, - 'status_transaksi' => 'menunggu_verifikasi', // Ubah dari status ke status_transaksi - 'total_bayar' => $buket->harga, // Tambahkan ini karena total_bayar wajib di fillable - 'no_invoice' => 'INV-BUKET-' . strtoupper(\Illuminate\Support\Str::random(6)), // Tambahkan invoice sederhana + 'bukti_bayar' => $pathBukti, + 'status_transaksi' => 'menunggu_verifikasi', + 'total_bayar' => $buket->harga, + 'no_invoice' => 'INV-BUKET-' . strtoupper(\Illuminate\Support\Str::random(6)), ]); DB::commit(); @@ -144,7 +142,7 @@ public function store(Request $request) "Total: Rp " . number_format($transaksi->buket->harga, 0, ',', '.') . "\n\n" . "Mohon segera diproses, ya! Terima kasih."; - $urlWA = "https://wa.me/6289673668516?text=" . urlencode($pesan); + $urlWA = "https://wa.me/6282337687878?text=" . urlencode($pesan); return redirect()->route('pesan.buket')->with([ 'success' => 'Pesanan Berhasil Dibuat!', diff --git a/public/img/buket/1766817409_artificial flowers-1.jpg b/public/img/buket/1766817409_artificial flowers-1.jpg deleted file mode 100644 index eed0cda..0000000 Binary files a/public/img/buket/1766817409_artificial flowers-1.jpg and /dev/null differ diff --git a/public/img/buket/artificial-tulip.jpg b/public/img/buket/artificial-tulip.jpg deleted file mode 100644 index 2101a81..0000000 Binary files a/public/img/buket/artificial-tulip.jpg and /dev/null differ diff --git a/public/img/buket/babybreath.jpg b/public/img/buket/babybreath.jpg deleted file mode 100644 index ae7557c..0000000 Binary files a/public/img/buket/babybreath.jpg and /dev/null differ diff --git a/public/img/buket/buket2.jpg b/public/img/buket/buket2.jpg deleted file mode 100644 index 5afdb71..0000000 Binary files a/public/img/buket/buket2.jpg and /dev/null differ diff --git a/public/img/buket/buket3.jpg b/public/img/buket/buket3.jpg deleted file mode 100644 index 970cb6f..0000000 Binary files a/public/img/buket/buket3.jpg and /dev/null differ diff --git a/public/img/buket/garbera.jpg b/public/img/buket/garbera.jpg deleted file mode 100644 index 3e50d4a..0000000 Binary files a/public/img/buket/garbera.jpg and /dev/null differ diff --git a/public/img/buket/gran-buket.jpg b/public/img/buket/gran-buket.jpg deleted file mode 100644 index ff2e368..0000000 Binary files a/public/img/buket/gran-buket.jpg and /dev/null differ diff --git a/public/img/buket/hidraangea.jpg b/public/img/buket/hidraangea.jpg deleted file mode 100644 index fc3454e..0000000 Binary files a/public/img/buket/hidraangea.jpg and /dev/null differ diff --git a/public/img/buket/lavender.jpg b/public/img/buket/lavender.jpg deleted file mode 100644 index 30aa4c6..0000000 Binary files a/public/img/buket/lavender.jpg and /dev/null differ diff --git a/public/img/buket/mawar-merah-premium.jpg b/public/img/buket/mawar-merah-premium.jpg old mode 100644 new mode 100755 diff --git a/public/img/buket/pastel-peony.jpg b/public/img/buket/pastel-peony.jpg deleted file mode 100644 index 4eaec95..0000000 Binary files a/public/img/buket/pastel-peony.jpg and /dev/null differ diff --git a/public/img/buket/single-sunflower.jpg b/public/img/buket/single-sunflower.jpg deleted file mode 100644 index f620c33..0000000 Binary files a/public/img/buket/single-sunflower.jpg and /dev/null differ diff --git a/public/img/buket/sunflower.jpg b/public/img/buket/sunflower.jpg deleted file mode 100644 index 6fcb25a..0000000 Binary files a/public/img/buket/sunflower.jpg and /dev/null differ diff --git a/public/img/buket/white-lily.jpg b/public/img/buket/white-lily.jpg deleted file mode 100644 index 0cbe6e2..0000000 Binary files a/public/img/buket/white-lily.jpg and /dev/null differ diff --git a/public/img/foto/1766833654_latar biru 1.jpeg b/public/img/foto/1766833654_latar biru 1.jpeg deleted file mode 100644 index a8ec01a..0000000 Binary files a/public/img/foto/1766833654_latar biru 1.jpeg and /dev/null differ diff --git a/public/img/foto/1767368465_grup.jpeg b/public/img/foto/1767368465_grup.jpeg deleted file mode 100644 index eaed204..0000000 Binary files a/public/img/foto/1767368465_grup.jpeg and /dev/null differ diff --git a/public/img/foto/1767368482_couple.jpeg b/public/img/foto/1767368482_couple.jpeg deleted file mode 100644 index dd20386..0000000 Binary files a/public/img/foto/1767368482_couple.jpeg and /dev/null differ diff --git a/public/img/foto/1767368572_pas-foto.jpg b/public/img/foto/1767368572_pas-foto.jpg deleted file mode 100644 index 720d6cd..0000000 Binary files a/public/img/foto/1767368572_pas-foto.jpg and /dev/null differ diff --git a/public/img/foto/1767368582_pas-foto.jpg b/public/img/foto/1767368582_pas-foto.jpg deleted file mode 100644 index 720d6cd..0000000 Binary files a/public/img/foto/1767368582_pas-foto.jpg and /dev/null differ diff --git a/public/img/foto/1767368592_pas-foto.jpg b/public/img/foto/1767368592_pas-foto.jpg deleted file mode 100644 index 720d6cd..0000000 Binary files a/public/img/foto/1767368592_pas-foto.jpg and /dev/null differ diff --git a/public/img/foto/1767368604_pas-foto.jpg b/public/img/foto/1767368604_pas-foto.jpg deleted file mode 100644 index 720d6cd..0000000 Binary files a/public/img/foto/1767368604_pas-foto.jpg and /dev/null differ diff --git a/public/img/foto/couple.jpeg b/public/img/foto/couple.jpeg deleted file mode 100644 index dd20386..0000000 Binary files a/public/img/foto/couple.jpeg and /dev/null differ diff --git a/public/img/foto/download (1).jpeg b/public/img/foto/download (1).jpeg deleted file mode 100644 index 24dea2d..0000000 Binary files a/public/img/foto/download (1).jpeg and /dev/null differ diff --git a/public/img/foto/foto2.jpeg b/public/img/foto/foto2.jpeg deleted file mode 100644 index daa801a..0000000 Binary files a/public/img/foto/foto2.jpeg and /dev/null differ diff --git a/public/img/foto/latar-biru.jpeg b/public/img/foto/latar-biru.jpeg deleted file mode 100644 index de11bf7..0000000 Binary files a/public/img/foto/latar-biru.jpeg and /dev/null differ diff --git a/public/img/foto/single.jpeg b/public/img/foto/single.jpeg deleted file mode 100644 index 24dea2d..0000000 Binary files a/public/img/foto/single.jpeg and /dev/null differ diff --git a/public/img/payment/1766896351_bukti1.jpg b/public/img/payment/1766896351_bukti1.jpg deleted file mode 100644 index 9a7a824..0000000 Binary files a/public/img/payment/1766896351_bukti1.jpg and /dev/null differ diff --git a/public/img/payment/1766896525_bukti1.jpg b/public/img/payment/1766896525_bukti1.jpg deleted file mode 100644 index 9a7a824..0000000 Binary files a/public/img/payment/1766896525_bukti1.jpg and /dev/null differ diff --git a/public/img/payment/1766898607_bukti2.jpg b/public/img/payment/1766898607_bukti2.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/1766898607_bukti2.jpg and /dev/null differ diff --git a/public/img/payment/1766898689_bukti2.jpg b/public/img/payment/1766898689_bukti2.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/1766898689_bukti2.jpg and /dev/null differ diff --git a/public/img/payment/1766899285_bukti3.jpg b/public/img/payment/1766899285_bukti3.jpg deleted file mode 100644 index c6281a1..0000000 Binary files a/public/img/payment/1766899285_bukti3.jpg and /dev/null differ diff --git a/public/img/payment/1766899369_bukti3.jpg b/public/img/payment/1766899369_bukti3.jpg deleted file mode 100644 index c6281a1..0000000 Binary files a/public/img/payment/1766899369_bukti3.jpg and /dev/null differ diff --git a/public/img/payment/1766899417_bukti2.jpg b/public/img/payment/1766899417_bukti2.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/1766899417_bukti2.jpg and /dev/null differ diff --git a/public/img/payment/buket/bukti1.jpg b/public/img/payment/buket/bukti1.jpg deleted file mode 100644 index 9a7a824..0000000 Binary files a/public/img/payment/buket/bukti1.jpg and /dev/null differ diff --git a/public/img/payment/buket/bukti2.jpg b/public/img/payment/buket/bukti2.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/buket/bukti2.jpg and /dev/null differ diff --git a/public/img/payment/buket/bukti3.jpg b/public/img/payment/buket/bukti3.jpg deleted file mode 100644 index c6281a1..0000000 Binary files a/public/img/payment/buket/bukti3.jpg and /dev/null differ diff --git a/public/img/payment/bukti_1766905812.jpg b/public/img/payment/bukti_1766905812.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/bukti_1766905812.jpg and /dev/null differ diff --git a/public/img/payment/bukti_1766911106_uAh2b.jpg b/public/img/payment/bukti_1766911106_uAh2b.jpg deleted file mode 100644 index 8059864..0000000 Binary files a/public/img/payment/bukti_1766911106_uAh2b.jpg and /dev/null differ diff --git a/public/img/payment/bukti_1766911328_rU8TP.jpg b/public/img/payment/bukti_1766911328_rU8TP.jpg deleted file mode 100644 index 8059864..0000000 Binary files a/public/img/payment/bukti_1766911328_rU8TP.jpg and /dev/null differ diff --git a/public/img/payment/bukti_1766911584_7F6dk.jpg b/public/img/payment/bukti_1766911584_7F6dk.jpg deleted file mode 100644 index c6281a1..0000000 Binary files a/public/img/payment/bukti_1766911584_7F6dk.jpg and /dev/null differ diff --git a/public/img/payment/foto/bukti1.jpg b/public/img/payment/foto/bukti1.jpg deleted file mode 100644 index 9a7a824..0000000 Binary files a/public/img/payment/foto/bukti1.jpg and /dev/null differ diff --git a/public/img/payment/foto/bukti2.jpg b/public/img/payment/foto/bukti2.jpg deleted file mode 100644 index 576c67c..0000000 Binary files a/public/img/payment/foto/bukti2.jpg and /dev/null differ diff --git a/public/img/payment/foto/bukti3.jpg b/public/img/payment/foto/bukti3.jpg deleted file mode 100644 index c6281a1..0000000 Binary files a/public/img/payment/foto/bukti3.jpg and /dev/null differ diff --git a/resources/views/admin/beranda/admin.blade.php b/resources/views/admin/beranda/admin.blade.php deleted file mode 100644 index b1ea2d8..0000000 --- a/resources/views/admin/beranda/admin.blade.php +++ /dev/null @@ -1,203 +0,0 @@ -@extends('layouts.admin') - -@section('title', 'Beranda') - -@section('content') -
-
-
-
-
-
-

Bunga Diambil Hari Ini

-
-
-
- - - - - - - - - - - - - - - - - -
WaktuNama PelangganNama BuketAksi
Si GantengKomentar dia...cb - - - -
-
-
-
-
- -
-
-
-

Jadwal Foto Hari Ini

-
-
-
- - - - - - - - - - - - - - - - - -
WaktuNama PelangganNama PaketAksi
Si KerenKomentar dia...cb - - - -
-
-
-
-
-
-
- -
-
-
-

Pesanan Pending

-
-
- - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - -
No.Nama PelangganNama BuketTanggal AmbilTotalStatusAksi
-

1

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
- Selesai - - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - -
No.Nama PelangganNama PaketTanggal BookingTotalStatusAksi
-

1

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
- Selesai - - - - -
-
-
- -
-
-
-
-
- @include('admin.beranda.partials.modal-buket') - @include('admin.beranda.partials.modal-foto') - @include('admin.beranda.partials.modal-riwayat') -@endsection diff --git a/resources/views/admin/beranda/index.blade.php b/resources/views/admin/beranda/index.blade.php old mode 100644 new mode 100755 index 4ff4751..126231f --- a/resources/views/admin/beranda/index.blade.php +++ b/resources/views/admin/beranda/index.blade.php @@ -3,6 +3,21 @@ @section('title', 'Beranda') @section('content') + {{-- ALERT SUKSES --}} + @if (session('success')) + + @endif + + {{-- ALERT ERROR UMUM (Jika ada error selain validasi modal) --}} + @if (session('error')) + + @endif
@@ -101,9 +116,9 @@ class="bi {{ $stat['selesai_grow'] >= 0 ? 'bi-arrow-up' : 'bi-arrow-down' }}">
-
Pesanan Dibatalkan
+
Pesanan Ditolak
+ title="Total pesanan buket dan foto yang ditolak dalam bulan ini">
@@ -148,20 +163,20 @@ class="bi {{ $stat['batal_grow'] >= 0 ? 'bi-arrow-up' : 'bi-arrow-down' }}"> - @forelse ($buketToday as $rb) + @forelse ($buketToday as $p) - {{ \Carbon\Carbon::parse($rb->tgl_ambil)->format('H:i') }} WIB - {{ $rb->pelanggan->nama }} - {{ $rb->buket->nama }} + {{ \Carbon\Carbon::parse($p->tgl_ambil)->format('H:i') }} WIB + {{ $p->pelanggan->nama }} + {{ $p->buket->nama }} + data-bs-target="#buket{{ $p->id_transaksi }}"> - @include('admin.pesanan.partials.modal-riwayat-buket') + @include('admin.pesanan.partials.modal-buket') @empty Tidak ada buket diambil @@ -192,21 +207,21 @@ class="bi {{ $stat['batal_grow'] >= 0 ? 'bi-arrow-up' : 'bi-arrow-down' }}"> - @forelse ($fotoToday as $rf) + @forelse ($fotoToday as $p) - {{ \Carbon\Carbon::parse($rf->jam_mulai)->format('H:i') }} - - {{ \Carbon\Carbon::parse($rf->jam_selesai)->format('H:i') }} - {{ $rf->pelanggan->nama }} - {{ $rf->paketFoto->nama }} + {{ \Carbon\Carbon::parse($p->jam_mulai)->format('H:i') }} - + {{ \Carbon\Carbon::parse($p->jam_selesai)->format('H:i') }} + {{ $p->pelanggan->nama }} + {{ $p->paketFoto->nama }} + data-bs-target="#foto{{ $p->id_booking }}"> - @include('admin.pesanan.partials.modal-riwayat-foto') + @include('admin.pesanan.partials.modal-foto') @empty Tidak ada jadwal foto @@ -251,36 +266,42 @@ class="bi {{ $stat['batal_grow'] >= 0 ? 'bi-arrow-up' : 'bi-arrow-down' }}"> Nama Pelanggan Nama Buket Tanggal Ambil + Jam Ambil Total Status Aksi - @forelse ($riwayatBuket as $rb) + @forelse ($pesananBuket as $p) - {{ $rb->no_invoice }} - {{ $rb->pelanggan->nama }} - {{ $rb->buket->nama }} - {{ \Carbon\Carbon::parse($rb->tgl_ambil)->translatedFormat('d M Y') }} - Rp {{ number_format($rb->total_bayar, 0, ',', '.') }} + {{ $p->no_invoice }} + {{ $p->pelanggan->nama }} + {{ $p->buket->nama }} - - {{ $rb->status_label->text }} + {{ \Carbon\Carbon::parse($p->tgl_ambil)->locale('id')->translatedFormat('d F Y') }} + + + {{ \Carbon\Carbon::parse($p->tgl_ambil)->format('H:i') }} WIB + + Rp {{ number_format($p->total_bayar, 0, ',', '.') }} + + + {{ $p->status_label->text }} - - + - @include('admin.pesanan.partials.modal-riwayat-buket') + @include('admin.pesanan.partials.modal-buket') @empty - Tidak ada riwayat buket. + Tidak ada pesanan buket yang + pending. @endforelse @@ -297,38 +318,43 @@ class="bi {{ $stat['batal_grow'] >= 0 ? 'bi-arrow-up' : 'bi-arrow-down' }}"> Nama Pelanggan Nama Paket Tanggal Booking + Waktu Total Status Aksi - @forelse ($riwayatFoto as $rf) + @forelse ($pesananFoto as $p) - {{ $rf->no_invoice }} - {{ $rf->pelanggan->nama }} - {{ $rf->paketFoto->nama }} - {{ \Carbon\Carbon::parse($rf->tgl_booking)->translatedFormat('d M Y') }} - - Rp {{ number_format($rf->total_bayar, 0, ',', '.') }} + {{ $p->no_invoice }} + {{ $p->pelanggan->nama }} + {{ $p->paketFoto->nama }} - - {{ $rf->status_label->text }} + {{ \Carbon\Carbon::parse($p->tgl_booking)->locale('id')->translatedFormat('d F Y') }} + + + {{ \Carbon\Carbon::parse($p->jam_mulai)->format('H:i') }} - + {{ \Carbon\Carbon::parse($p->jam_selesai)->format('H:i') }} + + Rp {{ number_format($p->total_bayar, 0, ',', '.') }} + + + {{ $p->status_label->text }} - - + - @include('admin.pesanan.partials.modal-riwayat-foto') + @include('admin.pesanan.partials.modal-foto') @empty - Tidak ada riwayat pesanan - foto. + Tidak ada pesanan + foto yang pending. @endforelse diff --git a/resources/views/admin/beranda/partials/modal-buket.blade.php b/resources/views/admin/beranda/partials/modal-buket.blade.php deleted file mode 100644 index 46455dd..0000000 --- a/resources/views/admin/beranda/partials/modal-buket.blade.php +++ /dev/null @@ -1,261 +0,0 @@ - - -{{-- MODAL GAMBAR --}} - - - -{{-- MODAL TOLAK --}} - - -{{-- MODAL TERIMA --}} - - diff --git a/resources/views/admin/beranda/partials/modal-foto.blade.php b/resources/views/admin/beranda/partials/modal-foto.blade.php deleted file mode 100644 index 3b23c70..0000000 --- a/resources/views/admin/beranda/partials/modal-foto.blade.php +++ /dev/null @@ -1,264 +0,0 @@ - - -{{-- MODAL GAMBAR --}} - - - -{{-- MODAL TOLAK --}} - - -{{-- MODAL TERIMA --}} - - diff --git a/resources/views/admin/beranda/partials/modal-riwayat.blade.php b/resources/views/admin/beranda/partials/modal-riwayat.blade.php deleted file mode 100644 index ab7e789..0000000 --- a/resources/views/admin/beranda/partials/modal-riwayat.blade.php +++ /dev/null @@ -1,194 +0,0 @@ -{{-- RIWAYAT BUKET --}} - - -{{-- RIWAYAT FOTO --}} - - -{{-- MODAL GAMBAR --}} - - - diff --git a/resources/views/admin/beranda/partials/modal-show.blade.php b/resources/views/admin/beranda/partials/modal-show.blade.php deleted file mode 100644 index 63d0c13..0000000 --- a/resources/views/admin/beranda/partials/modal-show.blade.php +++ /dev/null @@ -1,86 +0,0 @@ - diff --git a/resources/views/admin/beranda/pemilik.blade.php b/resources/views/admin/beranda/pemilik.blade.php deleted file mode 100644 index 053a759..0000000 --- a/resources/views/admin/beranda/pemilik.blade.php +++ /dev/null @@ -1,317 +0,0 @@ -@extends('layouts.admin') - -@section('title', 'Beranda') - -@section('content') -
-
-
-
-
-
- -
-
Pendapatan Bulan Ini
- -
- -
-
- -
-
-
Rp 1.000.000
- - 34.7% - - - dari bulan lalu -
-
-
-
-
- -
-
-
- -
-
Total Pesanan Masuk
- -
- -
-
- -
-
-
20 Pesanan
- - 34.7% - - - dari bulan lalu -
-
-
-
-
- -
-
-
- -
-
Pesanan Selesai
- -
- -
-
- -
-
-
20 Pesanan
- - 34.7% - - - dari bulan lalu -
-
-
-
-
- -
-
-
- -
-
Pesanan Dibatalkan
- -
- -
-
- -
-
-
20 Pesanan
- - 34.7% - - - dari bulan lalu -
-
-
-
-
- -
-
-
-
-
-
-
-

Bunga Diambil Hari Ini

-
-
-
- - - - - - - - - - - - - - - - - -
WaktuNama PelangganNama BuketAksi
Si GantengKomentar dia...cb - - - -
-
-
-
-
- -
-
-
-

Jadwal Foto Hari Ini

-
-
-
- - - - - - - - - - - - - - - - - -
WaktuNama PelangganNama PaketAksi
Si KerenKomentar dia...cb - - - -
-
-
-
-
-
-
- -
-
-
-

Pesanan Pending

-
-
- - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - -
No.Nama PelangganNama BuketTanggal AmbilTotalStatusAksi
-

1

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
- Selesai - - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - -
No.Nama PelangganNama PaketTanggal BookingTotalStatusAksi
-

1

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
-

Congratulations

-
- Selesai - - - - -
-
-
- -
-
-
-
-
- @include('admin.beranda.partials.modal-buket') - @include('admin.beranda.partials.modal-foto') - @include('admin.beranda.partials.modal-riwayat') -@endsection diff --git a/resources/views/admin/kelola-admin/index.blade.php b/resources/views/admin/kelola-admin/index.blade.php index a66f840..629d057 100644 --- a/resources/views/admin/kelola-admin/index.blade.php +++ b/resources/views/admin/kelola-admin/index.blade.php @@ -74,7 +74,7 @@ class="badge rounded-pill px-3 py-2 @include('admin.kelola-admin.partials.modal-delete') @empty - Belum ada data admin. + Belum ada data admin. @endforelse diff --git a/resources/views/admin/paket-foto/index.blade.php b/resources/views/admin/paket-foto/index.blade.php index 22ec7e6..e7fdb7e 100644 --- a/resources/views/admin/paket-foto/index.blade.php +++ b/resources/views/admin/paket-foto/index.blade.php @@ -100,7 +100,7 @@ @include('admin.paket-foto.partials.modal-delete-foto') @empty - Belum ada data paket foto. + Belum ada data paket foto. @endforelse diff --git a/resources/views/admin/paket-foto/partials/modal-show-foto.blade.php b/resources/views/admin/paket-foto/partials/modal-show-foto.blade.php index 03bad15..fbb3579 100644 --- a/resources/views/admin/paket-foto/partials/modal-show-foto.blade.php +++ b/resources/views/admin/paket-foto/partials/modal-show-foto.blade.php @@ -70,10 +70,13 @@ class="custom-img-box-foto d-flex align-items-center justify-content-center text
-