84 lines
3.4 KiB
PHP
84 lines
3.4 KiB
PHP
@extends('layouts.user')
|
|
|
|
@section('title', 'Paket Foto - Florist dan Self Photo Studio Nganjuk')
|
|
|
|
@section('content')
|
|
<section class="section-bookingfoto">
|
|
<div class="container">
|
|
|
|
<div class="row justify-content-center mb-2">
|
|
<div class="col-lg-8 text-center">
|
|
<h2 class="bookingfoto-title mb-2">Pilihan Paket Foto</h2>
|
|
<p class="text-muted">Temukan beragam paket foto eksklusif dari Flo.do untuk momen terbaikmu</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12" style="max-width: 850px; margin: 0 auto;">
|
|
<div class="row row-cols-2 row-cols-md-3 row-cols-lg-4 justify-content-center">
|
|
@forelse ($foto as $f)
|
|
<div class="col">
|
|
<div class="bookingfoto-card position-relative">
|
|
<div class="img-wrapper mb-3">
|
|
<img src="{{ asset('storage/' . $f->foto) }}" class="img-fluid rounded-4"
|
|
alt="{{ $f->nama }}">
|
|
</div>
|
|
<div class="text-left">
|
|
<h6 class="bookingfoto-product-title">{{ $f->nama }}</h6>
|
|
<p class="bookingfoto-product-price">Rp {{ number_format($f->harga, 0, ',', '.') }}
|
|
</p>
|
|
</div>
|
|
<a href="{{ route('detail.foto', $f->id_paket . '-' . Str::slug($f->nama)) }}"
|
|
class="stretched-link"></a>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<div class="col-12 text-center py-5">
|
|
<p>Paket foto tidak ditemukan</p>
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
{{-- Cek session waUrl agar sama dengan pola buket --}}
|
|
@if (session('waUrl'))
|
|
{{-- Panggil library SweetAlert2 secara lokal di sini untuk memastikan ia ada --}}
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
|
|
<script>
|
|
// Gunakan pola yang sama dengan buket yang sudah terbukti jalan
|
|
Swal.fire({
|
|
title: 'Pesanan Berhasil!',
|
|
text: "{{ session('success') }}",
|
|
icon: 'success',
|
|
confirmButtonText: 'Konfirmasi WhatsApp',
|
|
confirmButtonColor: '#3B8181',
|
|
allowOutsideClick: false
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
// Buka WhatsApp di tab baru
|
|
window.open("{{ session('waUrl') }}", '_blank');
|
|
}
|
|
});
|
|
</script>
|
|
@endif
|
|
|
|
{{-- Pisahkan handler error --}}
|
|
@if (session('error'))
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<script>
|
|
Swal.fire({
|
|
title: 'Gagal!',
|
|
text: "{{ session('error') }}",
|
|
icon: 'error',
|
|
confirmButtonColor: '#dc3545'
|
|
});
|
|
</script>
|
|
@endif
|
|
@endsection
|