Upload bukti pembayaran
This commit is contained in:
parent
0bb466573d
commit
cda7716cfa
|
@ -34,6 +34,7 @@
|
|||
use Filament\Forms\Components\BelongsToSelect;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Filament\Forms\Components\Modal;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
|
||||
class ReservasiiResource extends Resource
|
||||
{
|
||||
|
@ -69,7 +70,6 @@ public static function form(Form $form): Form
|
|||
->options([
|
||||
'tunai' => 'Tunai',
|
||||
'transfer' => 'Transfer Bank',
|
||||
'wallet' => 'E-Wallet',
|
||||
])
|
||||
->required(),
|
||||
Radio::make('tipe_pembayaran')
|
||||
|
@ -79,6 +79,25 @@ public static function form(Form $form): Form
|
|||
'dp' => 'DP',
|
||||
])
|
||||
->required(),
|
||||
Select::make('status_pembayaran')
|
||||
->label('Status Pembayaran')
|
||||
->options([
|
||||
'pending' => 'Pending',
|
||||
'approved' => 'Approved',
|
||||
'rejected' => 'Rejected',
|
||||
])
|
||||
->required()
|
||||
->default('pending'),
|
||||
FileUpload::make('bukti_pembayaran')
|
||||
->label('Bukti Pembayaran')
|
||||
->image()
|
||||
->directory('bukti-pembayaran')
|
||||
->visibility('public')
|
||||
->imageResizeMode('cover')
|
||||
->imageCropAspectRatio('16:9')
|
||||
->imageResizeTargetWidth('1920')
|
||||
->imageResizeTargetHeight('1080')
|
||||
->columnSpanFull(),
|
||||
])
|
||||
])->columnSpan(1),
|
||||
|
||||
|
@ -109,6 +128,9 @@ public static function form(Form $form): Form
|
|||
})->toArray()
|
||||
)
|
||||
->required()
|
||||
->disabled()
|
||||
->dehydrated()
|
||||
->default(fn ($record) => $record?->waktu),
|
||||
]),
|
||||
])->columnSpan(1),
|
||||
|
||||
|
@ -220,8 +242,19 @@ public static function table(Table $table): Table
|
|||
'dp' => 'danger',
|
||||
}),
|
||||
|
||||
Tables\Columns\TextColumn::make('metode_pembayaran')
|
||||
->badge(),
|
||||
Tables\Columns\TextColumn::make('status_pembayaran')
|
||||
->label('Status')
|
||||
->badge()
|
||||
->color(fn (string $state): string => match (strtolower($state)) {
|
||||
'pending' => 'warning',
|
||||
'approved' => 'success',
|
||||
'rejected' => 'danger',
|
||||
}),
|
||||
|
||||
Tables\Columns\ImageColumn::make('bukti_pembayaran')
|
||||
->label('Bukti Pembayaran')
|
||||
->size(100),
|
||||
|
||||
])
|
||||
->filters([
|
||||
Tables\Filters\Filter::make('tanggal')
|
||||
|
@ -234,6 +267,13 @@ public static function table(Table $table): Table
|
|||
fn (Builder $query, $date): Builder => $query->whereDate('tanggal', $date),
|
||||
);
|
||||
}),
|
||||
Tables\Filters\SelectFilter::make('status_pembayaran')
|
||||
->options([
|
||||
'pending' => 'Pending',
|
||||
'approved' => 'Approved',
|
||||
'rejected' => 'Rejected',
|
||||
])
|
||||
->label('Status Pembayaran'),
|
||||
])
|
||||
->actions([
|
||||
ActionGroup::make([
|
||||
|
@ -281,20 +321,20 @@ public static function getRelations(): array
|
|||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
// Hitung jumlah reservasi dengan tipe pembayaran 'dp'
|
||||
$dpCount = static::getModel()::where('tipe_pembayaran', 'dp')->count();
|
||||
// Hitung jumlah reservasi dengan status pending
|
||||
$pendingCount = static::getModel()::where('status_pembayaran', 'pending')->count();
|
||||
|
||||
// Kembalikan jumlah jika ada, null jika tidak ada
|
||||
return $dpCount > 0 ? (string) $dpCount : null;
|
||||
return $pendingCount > 0 ? (string) $pendingCount : null;
|
||||
}
|
||||
|
||||
public static function getNavigationBadgeColor(): ?string
|
||||
{
|
||||
// Hitung jumlah reservasi dengan tipe pembayaran 'dp'
|
||||
$dpCount = static::getModel()::where('tipe_pembayaran', 'dp')->count();
|
||||
// Hitung jumlah reservasi dengan status pending
|
||||
$pendingCount = static::getModel()::where('status_pembayaran', 'pending')->count();
|
||||
|
||||
// Kembalikan warna merah jika ada reservasi DP
|
||||
return $dpCount > 0 ? 'danger' : null;
|
||||
// Kembalikan warna warning jika ada reservasi pending
|
||||
return $pendingCount > 0 ? 'warning' : null;
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
|
|
|
@ -41,9 +41,6 @@ public function table(Table $table): Table
|
|||
'full' => 'succes',
|
||||
'DP' => 'danger'
|
||||
}),
|
||||
TextColumn::make('metode_pembayaran')
|
||||
->label('Metode Pembayaran')
|
||||
->badge(),
|
||||
TextColumn::make('created_at')
|
||||
->label('Waktu Reservasi')
|
||||
])
|
||||
|
|
|
@ -159,6 +159,7 @@ public function placeOrder()
|
|||
'total' => $this->totalPrice,
|
||||
'tipe_pembayaran' => $this->tipe_pembayaran,
|
||||
'metode_pembayaran' => 'transfer', // Default transfer, bisa diubah sesuai pilihan
|
||||
'status_pembayaran' => 'pending'
|
||||
]);
|
||||
|
||||
// Membuat detail reservasi
|
||||
|
@ -170,10 +171,9 @@ public function placeOrder()
|
|||
'total_harga' => $this->totalPrice,
|
||||
]);
|
||||
|
||||
// Tampilkan pesan sukses dan redirect
|
||||
session()->flash('message', 'Booking berhasil dibuat! Silahkan lakukan pembayaran sesuai metode yang dipilih.');
|
||||
session()->flash('booking_name', $this->nama);
|
||||
return redirect()->route('booking.success');
|
||||
// Tampilkan pesan sukses dan redirect ke halaman upload bukti pembayaran
|
||||
session()->flash('message', 'Booking berhasil dibuat! Silahkan upload bukti pembayaran.');
|
||||
return redirect()->route('upload.bukti.pembayaran', $reservasi->id);
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
|
|
@ -27,18 +27,16 @@ class PaketFotoPage extends Component
|
|||
|
||||
public function render()
|
||||
{
|
||||
$paketfotoQuery = PaketFoto::query()->where('status', 1);
|
||||
|
||||
if($this->sort == 'latest') {
|
||||
$paketfotoQuery->latest();
|
||||
}
|
||||
|
||||
if($this->sort == 'price') {
|
||||
$paketfotoQuery->orderBy('harga_paket_foto');
|
||||
}
|
||||
$paketfoto = PaketFoto::when($this->sort === 'price', function($query) {
|
||||
return $query->orderBy('harga_paket_foto', 'asc');
|
||||
})
|
||||
->when($this->sort === 'latest', function($query) {
|
||||
return $query->latest();
|
||||
})
|
||||
->paginate(6);
|
||||
|
||||
return view('livewire.paket-foto-page', [
|
||||
'paketfoto' => $paketfotoQuery->paginate(6),
|
||||
'paketfoto' => $paketfoto
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@ public function mount($id = null)
|
|||
return redirect()->route('home');
|
||||
}
|
||||
|
||||
// Jika status pending dan belum ada bukti pembayaran, redirect ke halaman upload
|
||||
if ($this->booking->status_pembayaran === 'pending' && !$this->booking->bukti_pembayaran) {
|
||||
return redirect()->route('upload.bukti.pembayaran', $this->booking->id);
|
||||
}
|
||||
|
||||
// Ambil nama dari session
|
||||
$this->bookingName = session('booking_name');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\Reservasii;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
use Livewire\Attributes\Title;
|
||||
|
||||
#[Title('Upload Bukti Pembayaran - SiKolaself')]
|
||||
class UploadBuktiPembayaran extends Component
|
||||
{
|
||||
use WithFileUploads;
|
||||
|
||||
public $booking;
|
||||
public $bukti_pembayaran;
|
||||
public $bookingId;
|
||||
|
||||
public function mount($id)
|
||||
{
|
||||
$this->bookingId = $id;
|
||||
$this->booking = Reservasii::with(['user', 'detail.paketFoto', 'promo'])
|
||||
->where('user_id', auth()->id())
|
||||
->where('id', $id)
|
||||
->first();
|
||||
|
||||
if (!$this->booking) {
|
||||
session()->flash('error', 'Data booking tidak ditemukan');
|
||||
return redirect()->route('histori');
|
||||
}
|
||||
|
||||
if ($this->booking->status_pembayaran === 'approved') {
|
||||
return redirect()->route('booking.success', $this->booking->id);
|
||||
}
|
||||
}
|
||||
|
||||
public function uploadBuktiPembayaran()
|
||||
{
|
||||
$this->validate([
|
||||
'bukti_pembayaran' => 'required|image|max:2048', // max 2MB
|
||||
], [
|
||||
'bukti_pembayaran.required' => 'Bukti pembayaran harus diupload',
|
||||
'bukti_pembayaran.image' => 'File harus berupa gambar',
|
||||
'bukti_pembayaran.max' => 'Ukuran file maksimal 2MB',
|
||||
]);
|
||||
|
||||
$path = $this->bukti_pembayaran->store('bukti-pembayaran', 'public');
|
||||
|
||||
$this->booking->update([
|
||||
'bukti_pembayaran' => $path,
|
||||
'status_pembayaran' => 'pending'
|
||||
]);
|
||||
|
||||
session()->flash('message', 'Bukti pembayaran berhasil diupload. Silahkan tunggu konfirmasi dari admin.');
|
||||
return redirect()->route('histori');
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.upload-bukti-pembayaran');
|
||||
}
|
||||
}
|
|
@ -17,7 +17,9 @@ class Reservasii extends Model
|
|||
'promo_id',
|
||||
'total',
|
||||
'tipe_pembayaran',
|
||||
'metode_pembayaran'
|
||||
'metode_pembayaran',
|
||||
'bukti_pembayaran',
|
||||
'status_pembayaran'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
|
|
@ -21,6 +21,8 @@ public function up(): void
|
|||
$table->decimal('total',10 , 2);
|
||||
$table->enum('tipe_pembayaran',['full','DP']);
|
||||
$table->string('metode_pembayaran');
|
||||
$table->string('bukti_pembayaran')->nullable();
|
||||
$table->enum('status_pembayaran', ['pending', 'approved', 'rejected'])->default('pending');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@livewireStyles
|
||||
@stack('scripts')
|
||||
</head>
|
||||
<body>
|
||||
<!-- ... existing content ... -->
|
||||
|
||||
@livewireScripts
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<!-- Email -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 mb-1 dark:text-white">Email address</label>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 mb-1 dark:text-white">Alamat Email</label>
|
||||
<input type="email" id="email" wire:model="email" class="py-3 px-4 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400 dark:focus:ring-gray-600">
|
||||
@error('email')
|
||||
<p class="text-xs text-red-600 mt-2" id="email-error">{{ $message }}</p>
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
<div class="w-full border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700">
|
||||
<div class="p-4 sm:p-7">
|
||||
<div class="text-center">
|
||||
<h1 class="block text-2xl font-bold text-gray-800 dark:text-white">Sign In</h1>
|
||||
<h1 class="block text-2xl font-bold text-gray-800 dark:text-white">Daftar</h1>
|
||||
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
Sudah punya akun?
|
||||
<a wire:navigate class="text-blue-600 decoration-2 hover:underline font-medium dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="/login">
|
||||
Log in disini
|
||||
Login
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
<!-- Field Email -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm mb-2 dark:text-white">Email address</label>
|
||||
<label for="email" class="block text-sm mb-2 dark:text-white">Alamat Email</label>
|
||||
<div class="relative">
|
||||
<input type="email" id="email" wire:model="email" class="py-3 px-4 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400 dark:focus:ring-gray-600" aria-describedby="email-error">
|
||||
@error('email')
|
||||
|
@ -82,7 +82,7 @@
|
|||
|
||||
<!-- Tombol -->
|
||||
<button type="submit" class="w-full py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-gray-600 text-white hover:bg-gray-700 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600">
|
||||
Sign Up
|
||||
Daftar
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="w-full max-w-[85rem] py-10 px-4 sm:px-6 lg:px-8 mx-auto">
|
||||
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-4">
|
||||
Booking
|
||||
Reservasi
|
||||
</h1>
|
||||
<form wire:submit.prevent="placeOrder">
|
||||
<div class="grid grid-cols-12 gap-4">
|
||||
|
@ -14,7 +14,7 @@
|
|||
</h2>
|
||||
<div class="mt-4">
|
||||
<label class="block text-gray-700 dark:text-white mb-1" for="nama">
|
||||
Nama Lengkap
|
||||
Nama
|
||||
</label>
|
||||
<input wire:model="nama" class="w-full rounded-lg border py-2 px-3
|
||||
dark:bg-gray-700 dark:text-white dark:border-none @error('nama') border-red-500 @enderror " id="nama" type="text">
|
||||
|
@ -120,7 +120,6 @@ class="{{ $isUnavailable ? 'text-gray-400 bg-gray-100' : '' }}"
|
|||
</h2>
|
||||
<!-- Pilih Tipe Pembayaran -->
|
||||
<div class="mt-4">
|
||||
<label class="block text-gray-700 dark:text-white mb-1">Tipe Pembayaran</label>
|
||||
<ul class="grid w-full gap-4 md:grid-cols-2">
|
||||
<li>
|
||||
<input wire:model="tipe_pembayaran" class="hidden peer" id="payment-dp" name="payment_type" type="radio" value="dp" required />
|
||||
|
@ -128,7 +127,7 @@ class="{{ $isUnavailable ? 'text-gray-400 bg-gray-100' : '' }}"
|
|||
hover:bg-gray-100 peer-checked:border-blue-600 peer-checked:text-blue-600 dark:bg-gray-800 dark:text-gray-400 dark:peer-checked:text-blue-500 dark:border-gray-700 dark:hover:bg-gray-700">
|
||||
<div class="block">
|
||||
<div class="text-lg font-semibold">Down Payment</div>
|
||||
<div class="text-sm">Bayar DP terlebih dahulu</div>
|
||||
<div class="text-sm">DP min. Rp 20.000</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
|
@ -182,7 +181,7 @@ class="{{ $isUnavailable ? 'text-gray-400 bg-gray-100' : '' }}"
|
|||
<hr class="bg-slate-400 my-4 h-1 rounded">
|
||||
<div class="flex justify-between mb-2 font-bold">
|
||||
<span>
|
||||
Grand Total
|
||||
Total Harga
|
||||
</span>
|
||||
<span>
|
||||
{{ Number::currency($this->totalPrice, 'IDR') }}
|
||||
|
@ -191,7 +190,7 @@ class="{{ $isUnavailable ? 'text-gray-400 bg-gray-100' : '' }}"
|
|||
</hr>
|
||||
</div>
|
||||
<button type="submit" class="bg-gray-500 mt-4 w-full p-3 rounded-lg text-lg text-white hover:bg-gray-600">
|
||||
Booking Sekarang
|
||||
Reservasi Sekarang
|
||||
</button>
|
||||
<div class="bg-white mt-4 rounded-xl shadow p-4 sm:p-7 dark:bg-slate-900">
|
||||
<div class="text-xl font-bold underline text-gray-700 dark:text-white mb-2">
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<div class="w-32 mb-8 ">
|
||||
<div class="flex flex-col items-start">
|
||||
<a href="{{ route('booking', ['id' => $paketfoto->id]) }}" class="px-6 py-3 bg-blue-500 rounded-md text-white hover:bg-blue-600 dark:bg-blue-500 dark:hover:bg-blue-700">
|
||||
Booking
|
||||
Reservasi
|
||||
</a>
|
||||
</div>
|
||||
{{-- <label for="" class="w-full pb-1 text-xl font-semibold text-gray-700 border-b border-blue-300 dark:border-gray-600 dark:text-gray-400">Quantity</label>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Tanggal</th>
|
||||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Waktu</th>
|
||||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Paket Foto</th>
|
||||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Tipe Pembayaran</th>
|
||||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Total</th>
|
||||
<th scope="col" class="px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase">Status</th>
|
||||
<th scope="col" class="px-6 py-3 text-end text-xs font-medium text-gray-500 uppercase">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -27,19 +27,30 @@
|
|||
<div>{{ $detail->paketFoto->nama_paket_foto }}</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-gray-200">
|
||||
<span class="bg-{{ $booking->tipe_pembayaran == 'full' ? 'green' : 'orange' }}-500 py-1 px-3 rounded text-white shadow">
|
||||
{{ ucfirst($booking->tipe_pembayaran) }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-gray-200">Rp {{ number_format($booking->total, 0, ',', '.') }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-gray-200">
|
||||
@if($booking->status_pembayaran === 'pending')
|
||||
<span class="bg-yellow-500 py-1 px-3 rounded text-white shadow">Menunggu</span>
|
||||
@elseif($booking->status_pembayaran === 'approved')
|
||||
<span class="bg-green-500 py-1 px-3 rounded text-white shadow">Disetujui</span>
|
||||
@elseif($booking->status_pembayaran === 'rejected')
|
||||
<span class="bg-red-500 py-1 px-3 rounded text-white shadow">Ditolak</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-end text-sm font-medium">
|
||||
<a href="{{ route('booking.success', $booking->id) }}" class="bg-slate-600 text-white py-2 px-4 rounded-md hover:bg-slate-500">View Details</a>
|
||||
@if($booking->status_pembayaran === 'pending' && !$booking->bukti_pembayaran)
|
||||
<a href="{{ route('upload.bukti.pembayaran', $booking->id) }}" class="bg-blue-500 text-white py-2 px-4 rounded-md hover:bg-blue-600">Upload Bukti</a>
|
||||
@elseif($booking->status_pembayaran === 'approved')
|
||||
<a href="{{ route('booking.success', $booking->id) }}" class="bg-slate-600 text-white py-2 px-4 rounded-md hover:bg-slate-500">Lihat Details</a>
|
||||
@else
|
||||
<a href="{{ route('booking.success', $booking->id) }}" class="bg-slate-600 text-white py-2 px-4 rounded-md hover:bg-slate-500">Lihat Details</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-6 py-4 text-center text-sm text-gray-500">Tidak ada data reservasi</td>
|
||||
<td colspan="8" class="px-6 py-4 text-center text-sm text-gray-500">Tidak ada data reservasi</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div class="max-w-xl mx-auto">
|
||||
<div class="text-center ">
|
||||
<div class="relative flex flex-col items-center">
|
||||
<h1 class="text-5xl font-bold dark:text-gray-200"> Paket Foto<span class="text-gray-500"> Populer
|
||||
<h1 class="text-5xl font-bold dark:text-gray-200"> Paket Foto<span class="text-gray-500"> Kami
|
||||
</span> </h1>
|
||||
<div class="flex w-40 mt-2 mb-6 overflow-hidden rounded">
|
||||
<div class="flex-1 h-2 bg-gray-300">
|
||||
|
@ -134,9 +134,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<p class="mb-12 text-base text-center text-gray-500">
|
||||
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Delectus magni eius eaque?
|
||||
Pariatur
|
||||
numquam, odio quod nobis ipsum ex cupiditate?
|
||||
Siap mengabadikan momen anda dengan berbagai
|
||||
Pilihan Paket Foto Terbaik
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,44 +7,13 @@
|
|||
</div>
|
||||
<!-- End Col -->
|
||||
|
||||
<div class="col-span-1">
|
||||
<h4 class="font-semibold text-gray-900">Product</h4>
|
||||
|
||||
<div class="mt-3 grid space-y-3">
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="/categories">Categories</a></p>
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="/products">All Products</a></p>
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="/products">Featured Products</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Col -->
|
||||
|
||||
<div class="col-span-1">
|
||||
<h4 class="font-semibold text-gray-900">Company</h4>
|
||||
|
||||
<div class="mt-3 grid space-y-3">
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="#">About us</a></p>
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="#">Blog</a></p>
|
||||
|
||||
<p><a class="inline-flex gap-x-2 text-gray-600 hover:text-gray-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="#">Customers</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Col -->
|
||||
|
||||
<div class="col-span-2">
|
||||
<h4 class="font-semibold text-gray-900">Stay up to date</h4>
|
||||
|
||||
<form>
|
||||
<div class="mt-4 flex flex-col items-center gap-2 sm:flex-row sm:gap-3 bg-gray-400 rounded-lg p-2 dark:bg-gray-800">
|
||||
<div class="w-full">
|
||||
<input type="text" id="hero-input" name="hero-input" class="py-3 px-4 block w-full border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-slate-900 dark:border-transparent dark:text-gray-400 dark:focus:ring-gray-600" placeholder="Enter your email">
|
||||
</div>
|
||||
<a class="w-full sm:w-auto whitespace-nowrap p-3 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="#">
|
||||
Subscribe
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- End Col -->
|
||||
</div>
|
||||
<!-- End Grid -->
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
<div class="justify-center flex-1 max-w-6xl px-4 py-4 mx-auto bg-white border rounded-md dark:border-gray-900 dark:bg-gray-900 md:py-10 md:px-10">
|
||||
<div>
|
||||
<h1 class="px-4 mb-8 text-2xl font-semibold tracking-wide text-gray-700 dark:text-gray-300 ">
|
||||
Terimakasih. Reservasi Berhasil. </h1>
|
||||
@if($booking->status_pembayaran === 'approved')
|
||||
Terimakasih. Reservasi Berhasil.
|
||||
@elseif($booking->status_pembayaran === 'pending')
|
||||
Menunggu Konfirmasi Pembayaran.
|
||||
@elseif($booking->status_pembayaran === 'rejected')
|
||||
Reservasi Ditolak.
|
||||
@endif
|
||||
</h1>
|
||||
<div class="flex border-b border-gray-200 dark:border-gray-700 items-stretch justify-start w-full h-full px-4 mb-8 md:flex-row xl:flex-col md:space-x-6 lg:space-x-8 xl:space-x-0">
|
||||
<div class="flex items-start justify-start flex-shrink-0">
|
||||
<div class="flex items-center justify-center w-full pb-6 space-x-4 md:justify-start">
|
||||
|
@ -51,7 +58,7 @@
|
|||
<div class="px-4 mb-10">
|
||||
<div class="flex flex-col items-stretch justify-center w-full space-y-4 md:flex-row md:space-y-0 md:space-x-8">
|
||||
<div class="flex flex-col w-full space-y-6 ">
|
||||
<h2 class="mb-2 text-xl font-semibold text-gray-700 dark:text-gray-400">Order details</h2>
|
||||
<h2 class="mb-2 text-xl font-semibold text-gray-700 dark:text-gray-400">Detail Reservasi</h2>
|
||||
<div class="flex flex-col items-center justify-center w-full pb-4 space-y-4 border-b border-gray-200 dark:border-gray-700">
|
||||
@foreach($booking->detail as $detail)
|
||||
<div class="flex justify-between w-full">
|
||||
|
@ -76,6 +83,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($booking->bukti_pembayaran)
|
||||
<div class="mt-8 px-4">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-400">Bukti Pembayaran</h2>
|
||||
<img src="{{ asset('storage/' . $booking->bukti_pembayaran) }}" alt="Bukti Pembayaran" class="max-w-md rounded-lg shadow-lg">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex items-center justify-start gap-4 px-4 mt-6 ">
|
||||
<a href="/paketfoto" class="w-full text-center px-4 py-2 text-blue-500 border border-blue-500 rounded-md md:w-auto hover:text-white hover:bg-blue-600 dark:border-gray-700 dark:hover:bg-gray-700 dark:text-gray-300">
|
||||
Kembali
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
<div class="w-full max-w-4xl py-6 px-4 sm:px-6 lg:px-8 mx-auto">
|
||||
<div class="flex items-center font-poppins">
|
||||
<div class="w-full px-4 py-4 mx-auto bg-white border rounded-lg shadow-sm">
|
||||
<div>
|
||||
<h1 class="mb-6 text-xl font-semibold text-gray-700">
|
||||
Upload Bukti Pembayaran
|
||||
</h1>
|
||||
|
||||
<!-- Informasi Pelanggan -->
|
||||
<div class="mb-6 p-4 bg-gray-50 rounded-lg">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Nama</p>
|
||||
<p class="font-medium">{{ $booking->nama }}</p>
|
||||
</div>
|
||||
@if($booking && $booking->user)
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Email</p>
|
||||
<p class="font-medium">{{ $booking->user->email }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Informasi Booking -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Order Number</p>
|
||||
<p class="font-medium">{{ $booking->id }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Tanggal</p>
|
||||
<p class="font-medium">{{ \Carbon\Carbon::parse($booking->tanggal)->format('d-m-Y') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Waktu</p>
|
||||
<p class="font-medium">{{ \Carbon\Carbon::parse($booking->waktu)->format('H:i') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Total</p>
|
||||
<p class="font-medium text-blue-600">Rp {{ number_format($booking->total, 0, ',', '.') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Detail Pembayaran -->
|
||||
<div class="mb-6 p-4 bg-gray-50 rounded-lg">
|
||||
<h2 class="text-lg font-semibold mb-3">Detail Pembayaran</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Metode Pembayaran</p>
|
||||
<p class="font-medium">{{ ucfirst($booking->metode_pembayaran) }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Tipe Pembayaran</p>
|
||||
<p class="font-medium">{{ strtoupper($booking->tipe_pembayaran) }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Total Harga</p>
|
||||
<p class="font-medium">Rp {{ number_format($booking->total, 0, ',', '.') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-gray-600">Jumlah yang Harus Dibayar</p>
|
||||
<p class="font-medium">
|
||||
@if($booking->tipe_pembayaran === 'dp')
|
||||
Rp {{ number_format(max(20000, $booking->total * 0.3), 0, ',', '.') }}
|
||||
<span class="text-xs text-gray-500 block">(Minimal 30% atau Rp 20.000)</span>
|
||||
@else
|
||||
Rp {{ number_format($booking->total, 0, ',', '.') }}
|
||||
<span class="text-xs text-gray-500 block">(Pembayaran Penuh)</span>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
@if($booking->metode_pembayaran === 'transfer')
|
||||
<div class="md:col-span-2">
|
||||
<p class="text-sm text-gray-600">Nomor Rekening</p>
|
||||
<p class="font-medium">1234567890 (Bank BCA)</p>
|
||||
<p class="text-xs text-gray-500">a.n. Nama Studio Foto</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Upload -->
|
||||
<form wire:submit="uploadBuktiPembayaran">
|
||||
<div class="flex items-start space-x-4">
|
||||
<div class="flex-1">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">Upload Bukti Pembayaran</label>
|
||||
<input type="file" wire:model="bukti_pembayaran" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
@error('bukti_pembayaran')
|
||||
<span class="text-sm text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex items-end space-x-4 pt-6">
|
||||
<button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
||||
Upload Bukti Pembayaran
|
||||
</button>
|
||||
<a href="{{ route('histori') }}" class="px-4 py-2 text-blue-500 border border-blue-500 rounded-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -12,6 +12,7 @@
|
|||
use App\Livewire\HomePage;
|
||||
use App\Livewire\PaketFotoPage;
|
||||
use App\Livewire\SuccesPage;
|
||||
use App\Livewire\UploadBuktiPembayaran;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', HomePage::class)->name('home');
|
||||
|
@ -39,8 +40,9 @@
|
|||
});
|
||||
Route::get('/booking', BookingPage::class);
|
||||
Route::get('/booking/{id}', BookingPage::class)->name('booking');
|
||||
Route::get('/histori', Histori::class);
|
||||
Route::get('/histori', Histori::class)->name('histori');
|
||||
Route::get('/cart', CartPage::class);
|
||||
Route::get('/success/{id?}', SuccesPage::class)->name('booking.success');
|
||||
Route::get('/cancel', CancelPage::class);
|
||||
Route::get('/upload-bukti-pembayaran/{id}', UploadBuktiPembayaran::class)->name('upload.bukti.pembayaran');
|
||||
});
|
Loading…
Reference in New Issue