From d59f1fb75e05c5a73a13f61fbc09c298703fd936 Mon Sep 17 00:00:00 2001 From: Stephen Gesityan Date: Wed, 4 Jun 2025 12:10:22 +0700 Subject: [PATCH] Checkpoint --- .../views/admin/bookings/index.blade.php | 4 +- resources/views/admin/dashboard.blade.php | 198 +++------- .../views/admin/revenues/detail.blade.php | 4 +- resources/views/layouts/admin.blade.php | 8 +- resources/views/layouts/super-admin.blade.php | 4 +- resources/views/pages/home.blade.php | 2 +- resources/views/pages/reschedule.blade.php | 233 +++++++----- resources/views/pages/venue.blade.php | 354 ++++++++++++++---- .../views/superadmin/venue/edit.blade.php | 338 +++++++++-------- .../views/superadmin/venue/index.blade.php | 155 +++++--- 10 files changed, 795 insertions(+), 505 deletions(-) diff --git a/resources/views/admin/bookings/index.blade.php b/resources/views/admin/bookings/index.blade.php index 50495ad..02cf085 100644 --- a/resources/views/admin/bookings/index.blade.php +++ b/resources/views/admin/bookings/index.blade.php @@ -11,9 +11,9 @@ Kembali - + {{-- Export Excel - + --}} diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 596aa3b..a21281b 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -15,8 +15,8 @@ - -
+ +
@@ -59,57 +59,71 @@ class="font-semibold text-amber-500">{{ $pendingBookings }}

class="font-semibold text-green-500">{{ $paidBookings }}

+
- + +
-
-
-

Total Meja

-

{{ $totalTables }}

-
+
+

🏆 Top 5 Pelanggan Loyal

+ d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
-
-

Tersedia: {{ $availableTables }}

-

Digunakan: {{ $usedTables }}

-
-
- -
-
-
-

Penggunaan Meja

-

- {{ $totalTables > 0 ? round(($usedTables / $totalTables) * 100) : 0 }}% -

+ @if(!empty($topUsers) && count($topUsers) > 0) +
+ @foreach($topUsers->take(5) as $index => $user) +
+
+ @if($index === 0) + 🥇 + @elseif($index === 1) + 🥈 + @else + 🥉 + @endif +
+
+

{{ Str::limit($user['user_name'], 12) }} +

+
+ Ranking #{{ $index + 1 }} +
+
+
+

{{ $user['booking_count'] }}

+

Booking

+
+
+ @endforeach
-
- - - + @else +
+
+ + + +
+

Belum ada data pelanggan loyal

-
-
-
-
+ @endif
- +
- +

Tren Pendapatan Bulanan

@@ -142,10 +156,11 @@ class="font-semibold text-red-500">{{ $usedTables }}

{{ $booking->user->name }}

{{ $booking->table->name }} - status === 'paid' ? 'bg-green-100 text-green-800' : ($booking->status === 'pending' ? 'bg-amber-100 text-amber-800' : 'bg-gray-100 text-gray-800') - }}"> + }}"> {{ ucfirst($booking->status) }}
@@ -169,7 +184,7 @@ class="font-semibold text-red-500">{{ $usedTables }}

- +

Performa Pendapatan per Meja (Bulan Ini)

@@ -177,14 +192,6 @@ class="font-semibold text-red-500">{{ $usedTables }}

- - -
-
-

Top 5 Pelanggan Loyal

-
-
-
@@ -192,7 +199,7 @@ class="font-semibold text-red-500">{{ $usedTables }}

@endpush diff --git a/resources/views/admin/revenues/detail.blade.php b/resources/views/admin/revenues/detail.blade.php index c615fc9..093489a 100644 --- a/resources/views/admin/revenues/detail.blade.php +++ b/resources/views/admin/revenues/detail.blade.php @@ -117,7 +117,7 @@ class="inline-flex items-center px-3 py-1.5 border border-transparent rounded-md
- + {{--
@@ -127,7 +127,7 @@ class="inline-flex items-center px-3 py-1.5 border border-transparent rounded-md
-
+
--}}
diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 9550bd1..c2ca03f 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -127,7 +127,7 @@ class="nav-item flex items-center px-3 py-2.5 rounded-lg {{ request()->routeIs(' -
Sistem
@@ -153,7 +153,7 @@ class="text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 mb-2 mt Pengaturan - + --}} @@ -179,8 +179,8 @@ class="ml-auto h-4 w-4 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="cu - + {{-- Profile Settings Account Settings - + --}}
$venue->name]) }}" class="flex flex-col h-full border border-gray-400 rounded-lg overflow-hidden"> - {{ $venue->name }} + {{ $venue->name }}

Venue

{{ $venue->name }}

diff --git a/resources/views/pages/reschedule.blade.php b/resources/views/pages/reschedule.blade.php index 2ea8bf3..333ad80 100644 --- a/resources/views/pages/reschedule.blade.php +++ b/resources/views/pages/reschedule.blade.php @@ -1,7 +1,11 @@ @extends('layouts.main') @section('content')
-

Reschedule Booking

+ +
+ +

Reschedule Booking

+

Detail Booking Saat Ini

@@ -26,83 +30,145 @@

{{ $duration }} Jam

-
@endsection \ No newline at end of file diff --git a/resources/views/superadmin/venue/edit.blade.php b/resources/views/superadmin/venue/edit.blade.php index d5a385f..fad4379 100644 --- a/resources/views/superadmin/venue/edit.blade.php +++ b/resources/views/superadmin/venue/edit.blade.php @@ -1,168 +1,200 @@ @extends('layouts.super-admin') @section('content') -
-
-
-
-
{{ __('Edit Venue') }}
+
+
+
+
+

+ {{ __('Edit Venue') }} +

-
- @if ($errors->any()) -
-
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
+ @if ($errors->any()) +
+
    + @foreach ($errors->all() as $error) +
  • + + + + {{ $error }} +
  • + @endforeach +
+
+ @endif + + + @csrf + @method('PUT') + +
+ {{-- Nama Venue --}} +
+ +
- @endif - - @csrf - @method('PUT') + {{-- Nomor Telepon --}} +
+ + +
+
-
- -
- - @error('name') - - {{ $message }} - - @enderror + {{-- Alamat --}} +
+ + +
+ + {{-- Deskripsi --}} +
+ + +
+ + {{-- Jam Operasional --}} +
+
+ + +
+
+ + +
+
+ + {{-- Status --}} +
+ + +
+ + {{-- Upload Gambar --}} +
+ + + {{-- Preview gambar existing --}} + @if($venue->image) +
+
{{ __('Gambar saat ini:') }}
+ {{ $venue->name }} +
+ @endif + +
+
+ +
+ +

{{ __('atau seret dan lepas') }}

+
+

+ {{ __('PNG, JPG, GIF hingga 2MB') }} +

+

+ {{ __('Biarkan kosong jika tidak ingin mengubah gambar') }} +

+

+
-
- -
- - @error('address') - - {{ $message }} - - @enderror -
-
- -
- -
- - @error('phone') - - {{ $message }} - - @enderror -
-
- -
- -
- - @error('description') - - {{ $message }} - - @enderror -
-
- -
- -
- - @error('open_time') - - {{ $message }} - - @enderror -
-
- -
- -
- - @error('close_time') - - {{ $message }} - - @enderror -
-
- -
- -
- @if($venue->image) -
- {{ $venue->name }} -
- @endif - - Format: JPG, PNG, GIF. Ukuran maksimal: 2MB. Biarkan - kosong jika tidak ingin mengubah gambar. - @error('image') - - {{ $message }} - - @enderror -
-
- -
- -
- - @error('status') - - {{ $message }} - - @enderror -
-
- -
-
- - - {{ __('Batal') }} - -
-
- -
+ {{-- Tombol Aksi --}} +
+ + {{ __('Batal') }} + + +
+
+ + @push('scripts') + + + @endpush @endsection \ No newline at end of file diff --git a/resources/views/superadmin/venue/index.blade.php b/resources/views/superadmin/venue/index.blade.php index 6ff0e08..7fa2cc7 100644 --- a/resources/views/superadmin/venue/index.blade.php +++ b/resources/views/superadmin/venue/index.blade.php @@ -68,15 +68,41 @@ class="px-4 py-2 border border-gray-300 rounded-md bg-white hover:bg-gray-50 tex @forelse($venues as $venue)
- {{ $venue->name }} + @php + // Tentukan path gambar yang akan ditampilkan + $imagePath = null; + + if ($venue->image) { + // Cek apakah file gambar ada di storage + if (Storage::disk('public')->exists($venue->image)) { + $imagePath = asset('storage/' . $venue->image); + } + // Cek apakah file gambar ada di public folder + elseif (file_exists(public_path($venue->image))) { + $imagePath = asset($venue->image); + } + // Cek jika path sudah lengkap dengan storage/ + elseif (file_exists(public_path('storage/' . $venue->image))) { + $imagePath = asset('storage/' . $venue->image); + } + } + + // Fallback ke placeholder jika gambar tidak ditemukan + if (!$imagePath) { + $imagePath = asset('images/venue-placeholder.jpg'); + } + @endphp + + {{ $venue->name }} +
+ class="p-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200">
@@ -84,25 +110,39 @@ class="p-2 bg-red-600 text-white rounded-lg hover:bg-red-700">

{{ $venue->name }}

- - {{ $venue->address }} + + {{ $venue->address }}
{{ $venue->phone }}
-
- - {{ $venue->status == 'active' ? 'Aktif' : 'Tidak Aktif' }} +
+ + + {{ $venue->open_time ?? '00:00' }} - {{ $venue->close_time ?? '23:59' }} +
+
+ + + {{ $venue->status == 'active' ? 'Aktif' : 'Tidak Aktif' }} + +
+ + @if($venue->description) +
+

{{ Str::limit($venue->description, 100) }}

+
+ @endif +
{{ $venue->created_at->format('d M Y') }}
+ class="text-green-600 hover:text-green-800 flex items-center text-sm transition-colors duration-200"> Detail @@ -111,55 +151,66 @@ class="text-green-600 hover:text-green-800 flex items-center text-sm">
@empty -
- -

Belum ada venue

-

Mulai tambahkan venue baru untuk mengelola bisnis Anda

- - - Tambah Venue - +
+
+ +

Belum ada venue

+

Mulai tambahkan venue baru untuk mengelola bisnis Anda dengan lebih baik

+ + + Tambah Venue Pertama + +
@endforelse
@if($venues->hasPages()) -
- {{ $venues->links() }} +
+
+ {{ $venues->appends(request()->query())->links() }} +
@endif