refactor: menyesuaikan per deskirpsian supaya lebih hidup

This commit is contained in:
Yoga Pangestu 2026-01-24 01:51:15 +07:00
parent 4ec293449c
commit 6f0cf547e6
11 changed files with 188 additions and 178 deletions

View File

@ -101,7 +101,7 @@ public function render(): View
return view('livewire.home.article.index', [
'pageTitle' => 'Artikel',
'pageDesc' => 'Baca tips profesional seputar perawatan wewangian, tren lifestyle, dan rekomendasi terbaik.',
'pageDesc' => 'Baca tips profesional seputar wewangian, lifestyle, dan rekomendasi terbaik cuma buat kamu! 📖✨',
'articles' => $articles,
]);
}

View File

@ -26,7 +26,7 @@ public function render(): View
return view('livewire.home.faqs', [
'pageTitle' => 'FAQs',
'pageDesc' => 'Daftar pertanyaan yang sering diajukan beserta jawabannya.',
'pageDesc' => 'Bingung? Cek pertanyaan populer di sini ya, siapa tau jawabannya udah ada! 🤔💡',
'faqs' => $faqs,
]);
}

View File

@ -151,7 +151,7 @@ public function render(): View
return view('livewire.home.product.index', [
'pageTitle' => 'Produk',
'pageDesc' => 'Temukan aroma yang mencerminkan kepribadian Anda, memadukan kemewahan parfum dan desain botol eksklusif.',
'pageDesc' => 'Temukan aroma yang mencerminkan kepribadianmu! 🌸✨ Dari kemewahan parfum sampai botol eksklusif, semua ada di sini.',
'products' => $products,
]);
}

View File

@ -72,6 +72,7 @@ public function claim(VoucherModel $voucher): void
if (! auth()->check()) {
$this->redirect(route('login'), navigate: true);
$this->toast('Ups, kamu harus login dulu nih buat klaim vouchernya! 🔐✨ Silakan masuk ke akunmu ya~', 'Waduh Belum Masuk', 'danger');
return;
}
@ -84,7 +85,7 @@ public function claim(VoucherModel $voucher): void
Carbon::parse($voucher->end_date)->lt(now())
)
) {
$this->toast('Voucher tidak tersedia atau sudah kadaluarsa.', 'Gagal', 'danger');
$this->toast('Yahh, sayang sekali vouchernya udah gak tersedia atau kadaluarsa nih 🥺💔 Coba cek voucher lainnya yuk!', 'Voucher Tidak Tersedia', 'danger');
return;
}
@ -99,7 +100,7 @@ public function claim(VoucherModel $voucher): void
$voucherTierIds->isNotEmpty() &&
(! $userTierId || ! $voucherTierIds->contains($userTierId))
) {
$this->toast('Voucher ini hanya tersedia untuk tier tertentu.', 'Gagal', 'danger');
$this->toast('Maaf ya, voucher ini spesial buat tier tertentu aja 🌟👑 Terus tingkatkan tiermu buat dapetin aksesnya!', 'Upgrade Tier Yuk', 'danger');
return;
}
@ -165,27 +166,27 @@ public function claim(VoucherModel $voucher): void
// Handle transaction results
if ($result === 'not_found') {
$this->toast('Voucher tidak ditemukan.', 'Gagal', 'danger');
$this->toast('Waduh, vouchernya gak ketemu nih 🕵️‍♂️❌ Mungkin udah dihapus atau ada kesalahan teknis.', 'Voucher Hilang', 'danger');
return;
}
if ($result === 'stock_empty') {
$this->toast('Klaim gagal! Kuota voucher sudah habis.', 'Gagal', 'danger');
$this->toast('Yahh, kamu telat! Kuota vouchernya udah ludes 😭💨 Jangan sedih, coba buruan klaim voucher yang lain ya!', 'Kehabisan Stok', 'danger');
return;
}
if ($result === 'limit_reached') {
$this->toast('Anda sudah mencapai batas maksimal klaim voucher ini.', 'Peringatan', 'warning');
$this->toast('Wow, semangat banget! Tapi kamu udah maksimal klaim voucher ini nih 🛑✋ Bagi-bagi kesempatan ke yang lain ya~', 'Batas Tercapai', 'warning');
return;
}
if ($result === 'success') {
$this->toast(
'Voucher berhasil diklaim! Silakan cek di menu Voucher di halaman dasbor.',
'Berhasil',
'Hore! 🎉 Voucher berhasil diklaim buat kamu! 🎁🎈 Jangan lupa cek menu Voucher di dashboard ya, selamat belanja!',
'Klaim Berhasil!',
'success'
);
}
@ -214,29 +215,22 @@ public function render(): View
default => $query->latest(),
};
}, fn ($query) => $query->latest())
->paginate(6);
->paginate(6)
->through(function (VoucherModel $voucher) {
$voucher->formatted_min_purchase = formatCurrencyNumber($voucher->min_purchase, 'Rp');
$voucher->formatted_end_date = formatDateLocalized($voucher->end_date);
$user = auth()->user();
$userTierId = $user?->membership?->tier_id;
return $voucher;
});
$voucherIds = $vouchers->pluck('id');
if ($this->selectedVoucher) {
$voucherIds->push($this->selectedVoucher->id);
$this->selectedVoucher->formatted_min_purchase = formatCurrencyNumber($this->selectedVoucher->min_purchase, 'Rp');
$this->selectedVoucher->formatted_end_date = formatDateLocalized($this->selectedVoucher->end_date);
}
$userClaimedCounts = $user
? DB::table('user_voucher')
->where('user_id', $user->id)
->whereIn('voucher_id', $voucherIds->unique())
->select('voucher_id', DB::raw('SUM(quantity) as total_quantity'))
->groupBy('voucher_id')
->pluck('total_quantity', 'voucher_id')
->toArray()
: [];
return view('livewire.home.vouchers', [
'pageTitle' => 'Voucher',
'pageDesc' => 'Nikmati berbagai voucher menarik untuk belanja lebih hemat dan menyenangkan.',
'pageDesc' => 'Nikmati berbagai voucher menarik biar belanja kamu makin hemat dan happy! 🛍️💸✨',
'vouchers' => $vouchers,
]);
}

View File

@ -17,7 +17,7 @@ class="w-full h-full object-cover">
{{-- Search Bar --}}
<div class="max-w-xl mx-auto relative group">
<input wire:model.live.debounce.500="search" type="search" placeholder="Cari artikel..."
<input wire:model.live.debounce.500="search" type="search" placeholder="Temukan artikel menarik... 📚✨"
aria-label="Cari artikel"
class="w-full py-4 pl-6 pr-14 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-home-primary focus:bg-white/20 transition-all shadow-lg text-lg">
<button
@ -39,10 +39,10 @@ class="absolute right-2 top-2 bottom-2 w-10 h-10 bg-home-primary rounded-full fl
<div class="relative w-full md:w-auto">
<select wire:model.live="sort" aria-label="Urutkan Artikel"
class="appearance-none px-6 py-3 pr-10 rounded-xl border border-home-foreground/10 bg-white text-home-foreground font-medium focus:outline-none focus:ring-2 focus:ring-home-primary focus:border-transparent transition cursor-pointer min-w-[160px] shadow-sm">
<option value="">Urutkan</option>
<option value="">Urutkan </option>
<option value="latest">Terbaru</option>
<option value="Alphabetic">Alfabet</option>
<option value="views">Terpopuler</option>
<option value="views">Terpopuler 🔥</option>
</select>
<svg class="absolute right-4 top-4 w-4 h-4 text-home-foreground/50 pointer-events-none"
fill="none" stroke="currentColor" viewBox="0 0 24 24">
@ -146,7 +146,7 @@ class="w-10 h-10 rounded-full bg-home-foreground/5 flex items-center justify-cen
<nav class="bg-white rounded-2xl border border-home-foreground/10 p-8 shadow-sm">
<h3 class="text-lg font-bold text-home-primary mb-6 border-b border-home-foreground/5 pb-4">
Kategori</h3>
Kategori Pilihan </h3>
<div class="space-y-1">
<button wire:click="setCategory(null)"
class="w-full text-left px-4 py-3 rounded-xl transition-all text-sm font-medium flex justify-between items-center group {{ !$categorySlug ? 'bg-home-primary/10 text-home-primary' : 'text-home-foreground/70 hover:bg-home-primary/5 hover:text-home-primary' }}">
@ -167,7 +167,7 @@ class="text-home-primary transition-all duration-300 {{ $categorySlug === $categ
<nav class="bg-white rounded-2xl border border-home-foreground/10 p-8 shadow-sm">
<h3 class="text-lg font-bold text-home-primary mb-6 border-b border-home-foreground/5 pb-4">
Populer</h3>
Lagi Rame Dibaca 🔥</h3>
<div class="space-y-5">
@foreach ($popularArticles as $popular)
<a href="{{ route('article.show', $popular['slug']) }}" class="block group">

View File

@ -45,7 +45,7 @@ class="text-home-foreground">{{ $article->author?->employee?->full_name }}</stro
<article class="lg:col-span-8">
<div class="flex items-center gap-4 mb-8 pb-8 border-b border-home-foreground/10">
<span class="text-sm font-bold text-home-foreground">Bagikan:</span>
<span class="text-sm font-bold text-home-foreground">Bagikan ke temanmu! 📲</span>
{{-- WhatsApp --}}
<a href="https://wa.me/?text={{ urlencode($article->title . ' ' . url()->current()) }}"
@ -90,7 +90,8 @@ class="first-letter:text-6xl first-letter:font-bold first-letter:text-home-prima
<a href="{{ route('article.show', $previousArticle->slug) }}" wire:navigate
class="group block p-6 border border-home-foreground/10 rounded-2xl hover:border-home-primary/30 transition-all">
<span
class="text-xs text-home-foreground/40 font-bold uppercase mb-1 block group-hover:text-home-primary">Sebelumnya</span>
class="text-xs text-home-foreground/40 font-bold uppercase mb-1 block group-hover:text-home-primary">Baca
Sebelumnya 👈</span>
<h4
class="font-bold text-home-foreground line-clamp-2 group-hover:text-home-primary transition-colors">
{{ $previousArticle->title }}
@ -101,7 +102,8 @@ class="font-bold text-home-foreground line-clamp-2 group-hover:text-home-primary
<a href="{{ route('article.show', $nextArticle->slug) }}" wire:navigate
class="group block p-6 border border-home-foreground/10 rounded-2xl text-right hover:border-home-primary/30 transition-all">
<span
class="text-xs text-home-foreground/40 font-bold uppercase mb-1 block group-hover:text-home-primary">Selanjutnya</span>
class="text-xs text-home-foreground/40 font-bold uppercase mb-1 block group-hover:text-home-primary">Lanjut
Baca Ini 👉</span>
<h4
class="font-bold text-home-foreground line-clamp-2 group-hover:text-home-primary transition-colors">
{{ $nextArticle->title }}</h4>
@ -132,7 +134,7 @@ class="font-bold text-home-foreground line-clamp-2 group-hover:text-home-primary
<div>
<h3 class="text-lg font-bold text-home-primary mb-6 flex items-center gap-2">
<span class="w-1 h-6 bg-home-primary rounded-full"></span>
Artikel Terbaru
Artikel Terbaru
</h3>
<div class="space-y-6">
@foreach ($latestArticles as $latest)

View File

@ -57,7 +57,7 @@ class="w-10 h-10 rounded-full bg-white border-2 border-home-foreground/20 text-h
</div>
</div>
<h1 class="text-3xl font-bold text-home-primary mb-8">Keranjang Belanja <span
<h1 class="text-3xl font-bold text-home-primary mb-8">Keranjang Belanjamu 🛍️ <span
class="text-lg font-normal text-home-foreground/50 ml-2">(3 Item)</span></h1>
<div class="grid grid-cols-1 lg:grid-cols-12 gap-12 items-start">
@ -70,8 +70,8 @@ class="bg-home-foreground/5 rounded-xl p-4 flex items-center gap-3 text-sm text-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<p>Pembelian di atas <strong>Rp 500.000</strong> berhak mendapatkan <span
class="font-bold text-home-primary">Gratis Ongkir</span>.</p>
<p>Belanja min. <strong>Rp 500.000</strong> biar dapet <span
class="font-bold text-home-primary">Gratis Ongkir</span> lho! 🚚💨</p>
</div>
<div class="space-y-6">
@ -125,7 +125,7 @@ class="qty-btn w-8 h-8 flex items-center justify-center text-home-foreground hov
</div>
<div class="mt-8 pt-8 border-t border-home-foreground/10">
<h3 class="text-xl font-bold text-home-foreground mb-6">Mungkin Anda Suka</h3>
<h3 class="text-xl font-bold text-home-foreground mb-6">Pilihan Lain Buat Kamu </h3>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
@for ($i = 1; $i <= 4; $i++)
<div class="group cursor-pointer">
@ -152,7 +152,7 @@ class="absolute bottom-2 right-2 w-8 h-8 bg-white rounded-full flex items-center
<aside class="lg:col-span-4 relative">
<div
class="sticky top-32 bg-white rounded-3xl border border-home-foreground/10 p-8 shadow-xl shadow-home-foreground/5">
<h2 class="text-xl font-bold text-home-foreground mb-6">Ringkasan Pesanan</h2>
<h2 class="text-xl font-bold text-home-foreground mb-6">Ringkasan Pesananmu 🧾</h2>
<div class="space-y-4 mb-6">
<div class="flex justify-between text-home-foreground/70">
@ -174,10 +174,11 @@ class="sticky top-32 bg-white rounded-3xl border border-home-foreground/10 p-8 s
class="block text-xs font-bold text-home-foreground/50 uppercase tracking-wider mb-2">Kode
Voucher</label>
<div class="flex gap-2">
<input type="text" placeholder="Masukkan kode"
<input type="text" placeholder="Ketik kode hoki kamu... 🍀"
class="flex-1 px-4 py-2 rounded-lg border border-home-foreground/20 text-sm focus:outline-none focus:border-home-primary transition-colors">
<button
class="bg-home-foreground text-white px-4 py-2 rounded-lg text-sm font-bold hover:opacity-90 transition-opacity">Gunakan</button>
class="bg-home-foreground text-white px-4 py-2 rounded-lg text-sm font-bold hover:opacity-90 transition-opacity">Pakai
</button>
</div>
</div>
@ -191,7 +192,7 @@ class="bg-home-foreground text-white px-4 py-2 rounded-lg text-sm font-bold hove
<button
class="w-full bg-home-primary text-white font-bold py-4 rounded-xl hover:bg-home-secondary hover:text-home-primary transition-all duration-300 shadow-lg shadow-home-primary/20 flex items-center justify-center gap-2 group">
Checkout Sekarang
Checkout Sekarang 🚀
<svg class="w-5 h-5 group-hover:translate-x-1 transition-transform" fill="none"
stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"

View File

@ -17,8 +17,8 @@ class="w-full h-full object-cover">
{{-- Search Bar --}}
<div class="max-w-xl mx-auto relative group">
<input wire:model.live.debounce.500="search" type="search" placeholder="Cari pertanyaan..."
aria-label="Cari artikel"
<input wire:model.live.debounce.500="search" type="search"
placeholder="Cari pertanyaan kamu di sini... 🔍✨" aria-label="Cari artikel"
class="w-full py-4 pl-6 pr-14 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-home-primary focus:bg-white/20 transition-all shadow-lg text-lg">
<button
class="absolute right-2 top-2 bottom-2 w-10 h-10 bg-home-primary rounded-full flex items-center justify-center text-white hover:bg-white hover:text-home-primary transition-all duration-300">
@ -82,23 +82,23 @@ class="mt-16 bg-home-primary rounded-2xl p-10 text-center relative overflow-hidd
</div>
<div class="relative z-10">
<h3 class="text-2xl font-bold text-white mb-3">Masih ada pertanyaan?</h3>
<h3 class="text-2xl font-bold text-white mb-3">Masih Belum Ketemu Jawabannya? 🧐</h3>
<p class="text-white/80 mb-8 max-w-xl mx-auto">
Jika Anda tidak menemukan jawaban yang dicari, silakan hubungi kami dan kami siap membantu Anda
24/7.
Jangan khawatir! Tim kami siap bantuin kamu kapan aja, 24/7 lho! 💬👋
Yuk tanya langsung!
</p>
<div class="flex flex-col sm:flex-row gap-4 justify-center">
<!-- WhatsApp -->
<a href="https://wa.me/{{ formatToWhatsApp($contactSettings->phone_number) }}" target="_blank"
class="bg-white text-home-primary font-bold px-8 py-3 rounded-xl hover:bg-home-secondary hover:text-white transition-all shadow-lg text-center">
Chat WhatsApp
Chat WhatsApp 💬
</a>
<!-- Email -->
<a href="mailto:{{ $contactSettings->email }}"
class="bg-home-primary border border-white/20 text-white font-bold px-8 py-3 rounded-xl hover:bg-white/10 transition-all text-center">
Kirim Email
Kirim Email 📧
</a>
</div>
</div>

View File

@ -1,10 +1,11 @@
<div class="relative min-h-screen">
@include('livewire.home.partials.jumbotron')
@include('livewire.home.partials.brands')
@include('livewire.home.partials.why')
@include('livewire.home.partials.categories')
@include('livewire.home.partials.benefits')
@include('livewire.home.partials.cta')
<x-sections.ui.home.hero :$totalMembersCount :$formattedTotalMembersCount :$latestMembers :$testimonials
:$bestSellingPerfumes />
<x-sections.ui.home.brands :$brands />
<x-sections.ui.home.why :$whyChooseUs />
<x-sections.ui.home.categories :$categories />
<x-sections.ui.home.benefits :$perfumeFeatures />
<x-sections.ui.home.cta :$totalMembersCount :$formattedTotalMembersCount :$latestMembers />
</div>
@assets

View File

@ -12,14 +12,16 @@
{{-- Content --}}
<div class="relative z-10 container mx-auto px-6 text-center">
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-6">Temukan Outlet Terdekat</h1>
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-6">Temukan Outlet Terdekat Kami! 🏢✨
</h1>
<p class="text-white/80 text-lg md:text-xl max-w-2xl mx-auto mb-10">
Rasakan pengalaman langsung kemewahan aroma kami. Kunjungi outlet kami untuk konsultasi personal.
😉✨
</p>
{{-- Search Bar --}}
<div class="max-w-xl mx-auto relative group">
<input type="text" wire:model.live="search" placeholder="Masukkan kota atau nama area..."
<input type="text" wire:model.live="search" placeholder="Masukkan kota atau nama area... 🗺️"
class="w-full py-4 pl-6 pr-14 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-home-primary focus:bg-white/20 transition-all shadow-lg text-lg">
<button
class="absolute right-2 top-2 bottom-2 w-10 h-10 bg-home-primary rounded-full flex items-center justify-center text-white hover:bg-white hover:text-home-primary transition-all duration-300">
@ -32,132 +34,138 @@ class="absolute right-2 top-2 bottom-2 w-10 h-10 bg-home-primary rounded-full fl
</div>
</section>
<main class="flex-grow px-6 lg:px-32 xl:px-48 py-24">
<main class="flex-grow px-6 lg:px-32 xl:px-48 py-24 text-home-foreground">
@if ($outlets->isNotEmpty())
<section class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-24">
@foreach ($outlets as $outlet)
<article wire:click="showDetail({{ $outlet->id }})"
class="group bg-white rounded-3xl border border-home-foreground/10 overflow-hidden hover:shadow-2xl hover:shadow-home-primary/10 hover:-translate-y-2 transition-all duration-500 flex flex-col h-full cursor-pointer">
<section class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-24">
@foreach ($outlets as $outlet)
<article wire:click="showDetail({{ $outlet['id'] }})"
class="group bg-white rounded-3xl border border-home-foreground/10 overflow-hidden hover:shadow-2xl hover:shadow-home-primary/10 hover:-translate-y-2 transition-all duration-500 flex flex-col h-full cursor-pointer">
<div class="relative h-64 overflow-hidden">
<div
class="absolute inset-0 bg-home-primary/10 mix-blend-multiply opacity-0 group-hover:opacity-100 transition-opacity duration-500 z-10">
</div>
<img src="{{ $outlet->image ?: 'https://placehold.co/800x600/png?text=' . urlencode($outlet->name) }}"
alt="{{ $outlet->name }}"
class="w-full h-full object-cover transform group-hover:scale-110 transition-transform duration-700">
<div class="relative h-64 overflow-hidden">
<div
class="absolute inset-0 bg-home-primary/10 mix-blend-multiply opacity-0 group-hover:opacity-100 transition-opacity duration-500 z-10">
</div>
<img src="{{ $outlet['image'] ?: 'https://placehold.co/800x600/png?text=' . urlencode($outlet['name']) }}"
alt="{{ $outlet['name'] }}"
class="w-full h-full object-cover transform group-hover:scale-110 transition-transform duration-700">
<div class="absolute top-4 left-4 z-20">
<span
class="px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-wide backdrop-blur-md bg-white/90 shadow-sm
text-{{ $outlet['status_color'] }}-700">
{{ $outlet['status_label'] }}
</span>
</div>
</div>
<div class="p-8 flex flex-col flex-grow">
<div class="mb-4">
<h3
class="text-xl font-bold text-home-foreground mb-2 group-hover:text-home-primary transition-colors">
{{ $outlet['name'] }}</h3>
<p class="text-sm text-home-foreground/60 leading-relaxed">{{ $outlet['address'] }}</p>
</div>
<div class="flex flex-wrap gap-2 mb-6">
@foreach ($outlet['facilities'] as $facility)
<div class="absolute top-4 left-4 z-20">
<span
class="text-[10px] px-2 py-1 border border-home-foreground/10 rounded text-home-foreground/50">
{{ $facility['name'] }}
class="px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-wide backdrop-blur-md bg-white/90 shadow-sm
text-{{ $outlet->status_color }}-700">
{{ $outlet->status_label }}
</span>
@endforeach
</div>
</div>
<div class="mt-auto flex gap-3" x-on:click.stop>
@if ($outlet['maps_url'])
<a href="{{ $outlet['maps_url'] }}" target="_blank"
class="flex-1 py-3 rounded-xl bg-home-primary text-white text-sm font-bold hover:bg-home-secondary hover:text-home-primary transition-colors shadow-lg shadow-home-primary/20 flex items-center justify-center">
Petunjuk Arah
</a>
@endif
{{-- Share Menu --}}
<div class="relative" x-data="{ open: false }">
<button @click="open = !open" @click.outside="open = false"
class="w-12 h-12 rounded-xl border border-home-foreground/10 flex items-center justify-center text-home-foreground hover:border-home-primary hover:text-home-primary transition-all">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z">
</path>
</svg>
</button>
<div class="p-8 flex flex-col flex-grow">
<div class="mb-4">
<h3
class="text-xl font-bold text-home-foreground mb-2 group-hover:text-home-primary transition-colors">
{{ $outlet->name }}</h3>
<p class="text-sm text-home-foreground/60 leading-relaxed">{{ $outlet->address }}
</p>
</div>
{{-- Dropdown Menu --}}
<div x-show="open" x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0 scale-95 translate-y-2"
x-transition:enter-end="opacity-100 scale-100 translate-y-0"
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100 scale-100 translate-y-0"
x-transition:leave-end="opacity-0 scale-95 translate-y-2"
class="absolute bottom-full mb-3 w-48 bg-white rounded-2xl shadow-xl border border-home-foreground/5 py-2 z-30 {{ $outlet['maps_url'] ? 'right-0' : 'left-0' }}"
style="display: none;">
<div class="flex flex-wrap gap-2 mb-6">
@foreach ($outlet->facilities as $facility)
<span
class="text-[10px] px-2 py-1 border border-home-foreground/10 rounded text-home-foreground/50">
{{ $facility->name }}
</span>
@endforeach
</div>
<div
class="px-4 py-2 text-[10px] font-bold text-home-foreground/40 uppercase tracking-widest border-b border-home-foreground/5 mb-1">
Bagikan Ke
</div>
{{-- WhatsApp --}}
<a href="https://wa.me/?text={{ urlencode('Cek ' . $outlet['name'] . ' di Yadi Parfum: ' . ($outlet['maps_url'] ?: url()->current())) }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L0 24l6.335-1.662c1.72.94 3.659 1.437 5.634 1.437h.005c6.515 0 11.825-5.309 11.828-11.825a11.823 11.823 0 00-3.414-8.369" />
</svg>
WhatsApp
<div class="mt-auto flex gap-3" x-on:click.stop>
@if ($outlet->maps_url)
<a href="{{ $outlet->maps_url }}" target="_blank"
class="flex-1 py-3 rounded-xl bg-home-primary text-white text-sm font-bold hover:bg-home-secondary hover:text-home-primary transition-colors shadow-lg shadow-home-primary/20 flex items-center justify-center">
Petunjuk Arah 🗺️
</a>
{{-- Facebook --}}
<a href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode($outlet['maps_url'] ?: url()->current()) }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
</svg>
Facebook
</a>
{{-- X (Twitter) --}}
<a href="https://twitter.com/intent/tweet?url={{ urlencode($outlet['maps_url'] ?: url()->current()) }}&text={{ urlencode('Cek outlet ' . $outlet['name'] . ' di Pangestu Yadi Parfum') }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
</svg>
X (Twitter)
</a>
{{-- Copy Link --}}
<button
@click="navigator.clipboard.writeText('{{ $outlet['maps_url'] ?: url()->current() }}'); $dispatch('notify', { message: 'Link berhasil disalin!', type: 'success' }); open = false"
class="w-full flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors text-left">
<svg class="w-4 h-4" fill="none" stroke="currentColor"
@endif
{{-- Share Menu --}}
<div class="relative" x-data="{ open: false }">
<button @click="open = !open" @click.outside="open = false"
class="w-12 h-12 rounded-xl border border-home-foreground/10 flex items-center justify-center text-home-foreground hover:border-home-primary hover:text-home-primary transition-all">
<svg class="w-5 h-5" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3">
d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z">
</path>
</svg>
Salin Tautan
</button>
{{-- Dropdown Menu --}}
<div x-show="open" x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0 scale-95 translate-y-2"
x-transition:enter-end="opacity-100 scale-100 translate-y-0"
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100 scale-100 translate-y-0"
x-transition:leave-end="opacity-0 scale-95 translate-y-2"
class="absolute bottom-full mb-3 w-48 bg-white rounded-2xl shadow-xl border border-home-foreground/5 py-2 z-30 {{ $outlet->maps_url ? 'right-0' : 'left-0' }}"
style="display: none;">
<div
class="px-4 py-2 text-[10px] font-bold text-home-foreground/40 uppercase tracking-widest border-b border-home-foreground/5 mb-1">
Bagikan Ke Teman! 📲
</div>
{{-- WhatsApp --}}
<a href="https://wa.me/?text={{ urlencode('Cek ' . $outlet->name . ' di Yadi Parfum: ' . $outlet->maps_url ?: url()->current()) }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L0 24l6.335-1.662c1.72.94 3.659 1.437 5.634 1.437h.005c6.515 0 11.825-5.309 11.828-11.825a11.823 11.823 0 00-3.414-8.369" />
</svg>
WhatsApp
</a>
{{-- Facebook --}}
<a href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode($outlet->maps_url) ?: url()->current() }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
</svg>
Facebook
</a>
{{-- X (Twitter) --}}
<a href="https://twitter.com/intent/tweet?url={{ urlencode($outlet->maps_url) ?: url()->current() }}&text={{ urlencode('Cek outlet ' . $outlet->name . ' di Pangestu Yadi Parfum') }}"
target="_blank"
class="flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
</svg>
X (Twitter)
</a>
{{-- Copy Link --}}
<button
@click="navigator.clipboard.writeText('{{ $outlet->maps_url ?: url()->current() }}'); $dispatch('notify', { message: 'Link berhasil disalin!', type: 'success' }); open = false"
class="w-full flex items-center gap-3 px-4 py-2 text-sm text-home-foreground hover:bg-home-primary/5 hover:text-home-primary transition-colors text-left">
<svg class="w-4 h-4" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round"
stroke-width="2"
d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3">
</path>
</svg>
Salin Tautan
</button>
</div>
</div>
</div>
</div>
</div>
</article>
@endforeach
</section>
</article>
@endforeach
</section>
@else
@include('components.animations.lottie.boxing-cat')
@endif
<section class="relative rounded-3xl overflow-hidden shadow-2xl border border-home-foreground/10 group">
<div
@ -317,7 +325,7 @@ class="px-4 py-2 bg-home-foreground/5 rounded-xl text-sm text-home-foreground/70
@php
$todayEnum = now()->dayOfWeekIso === 7 ? 1 : now()->dayOfWeekIso + 1;
@endphp
@foreach ($selectedOutlet->openingHours->sortBy('day.value') as $hour)
@foreach ($selectedOutlet->openingHours as $hour)
<div
class="flex justify-between items-center p-3 rounded-xl border border-home-foreground/5 {{ $hour->day->value === $todayEnum ? 'bg-home-primary/5 border-home-primary/20' : '' }}">
<span
@ -325,8 +333,8 @@ class="text-xs font-medium {{ $hour->day->value === $todayEnum ? 'text-home-prim
{{ $hour->day->label() }}
</span>
<span class="text-xs font-bold text-home-foreground">
{{ \Carbon\Carbon::parse($hour->open_time)->format('H:i') }} -
{{ \Carbon\Carbon::parse($hour->close_time)->format('H:i') }}
{{ $hour->formatted_open_time }} -
{{ $hour->formatted_close_time }}
</span>
</div>
@endforeach
@ -351,7 +359,7 @@ class="flex-[1.5] py-4 rounded-2xl bg-home-primary text-white text-center font-b
d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7">
</path>
</svg>
Petunjuk Arah
Petunjuk Arah 🗺️
</a>
</div>
</div>
@ -360,3 +368,7 @@ class="flex-[1.5] py-4 rounded-2xl bg-home-primary text-white text-center font-b
</div>
@endif
</div>
@assets
<script src="https://unpkg.com/@lottiefiles/dotlottie-wc@0.8.5/dist/dotlottie-wc.js" type="module"></script>
@endassets

View File

@ -17,7 +17,7 @@ class="w-full h-full object-cover">
{{-- Search Bar --}}
<div class="max-w-xl mx-auto relative group">
<input wire:model.live.debounce.500="search" type="search" placeholder="Cari voucher..."
<input wire:model.live.debounce.500="search" type="search" placeholder="Cari voucher impianmu... 🔍✨"
aria-label="Cari artikel"
class="w-full py-4 pl-6 pr-14 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-home-primary focus:bg-white/20 transition-all shadow-lg text-lg">
<button
@ -144,7 +144,7 @@ class="flex justify-between items-center text-sm border-b border-home-foreground
Min. Pembelian
</span>
<span
class="font-bold text-home-foreground">{{ formatCurrencyNumber($voucher->min_purchase, 'Rp') }}</span>
class="font-bold text-home-foreground">{{ $voucher->formatted_min_purchase }}</span>
</div>
<div
class="flex justify-between items-center text-sm border-b border-home-foreground/5 pb-3">
@ -156,8 +156,8 @@ class="flex justify-between items-center text-sm border-b border-home-foreground
</svg>
Berlaku Hingga
</span>
<time datetime="{{ formatDateLocalized($voucher->end_date) }}"
class="font-bold text-home-foreground">{{ formatDateLocalized($voucher->end_date) }}</time>
<time datetime="{{ $voucher->formatted_end_date }}"
class="font-bold text-home-foreground">{{ $voucher->formatted_end_date }}</time>
</div>
<div class="flex justify-between items-center text-sm">
<span class="text-home-foreground/50 flex items-center gap-2">
@ -243,7 +243,7 @@ class="w-8 h-8 rounded-lg bg-home-primary/5 flex items-center justify-center tex
<div>
<p class="text-sm font-medium text-home-foreground/50">Minimum Pembelian</p>
<p class="font-bold text-home-foreground">
{{ formatCurrencyNumber($selectedVoucher->min_purchase, 'Rp') }}</p>
{{ $selectedVoucher->formatted_min_purchase }}</p>
</div>
</div>
<div class="flex items-start gap-3">
@ -259,7 +259,7 @@ class="w-8 h-8 rounded-lg bg-home-primary/5 flex items-center justify-center tex
<div>
<p class="text-sm font-medium text-home-foreground/50">Masa Berlaku</p>
<p class="font-bold text-home-foreground">Hingga
{{ formatDateLocalized($selectedVoucher->end_date) }}</p>
{{ $selectedVoucher->formatted_end_date }}</p>
</div>
</div>
@if ($selectedVoucher->limit_per_user)
@ -306,7 +306,7 @@ class="px-4 py-2 bg-home-primary/5 border border-home-primary/10 rounded-xl text
@empty
<span
class="px-4 py-2 bg-home-foreground/5 border border-home-foreground/10 rounded-xl text-sm font-semibold text-home-foreground/50">
Dapat digunakan di semua outlet
Bisa dipakai di semua outlet lho! 🏪✨
</span>
@endforelse
</div>