diff --git a/app/Livewire/Home/Article/Index.php b/app/Livewire/Home/Article/Index.php index 7af5ca8..66527aa 100644 --- a/app/Livewire/Home/Article/Index.php +++ b/app/Livewire/Home/Article/Index.php @@ -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, ]); } diff --git a/app/Livewire/Home/Faq.php b/app/Livewire/Home/Faq.php index ba51ad1..a7c8e41 100644 --- a/app/Livewire/Home/Faq.php +++ b/app/Livewire/Home/Faq.php @@ -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, ]); } diff --git a/app/Livewire/Home/Product/Index.php b/app/Livewire/Home/Product/Index.php index f399eea..351cbf5 100644 --- a/app/Livewire/Home/Product/Index.php +++ b/app/Livewire/Home/Product/Index.php @@ -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, ]); } diff --git a/app/Livewire/Home/Voucher.php b/app/Livewire/Home/Voucher.php index 2c5ed04..9a1d8b2 100644 --- a/app/Livewire/Home/Voucher.php +++ b/app/Livewire/Home/Voucher.php @@ -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, ]); } diff --git a/resources/views/livewire/home/article/index.blade.php b/resources/views/livewire/home/article/index.blade.php index 1126858..1b4a0e7 100644 --- a/resources/views/livewire/home/article/index.blade.php +++ b/resources/views/livewire/home/article/index.blade.php @@ -17,7 +17,7 @@ class="w-full h-full object-cover"> {{-- Search Bar --}}
- + class="bg-home-foreground text-white px-4 py-2 rounded-lg text-sm font-bold hover:opacity-90 transition-opacity">Pakai + ✨
@@ -191,7 +192,7 @@ class="bg-home-foreground text-white px-4 py-2 rounded-lg text-sm font-bold hove +
+
+

+ {{ $outlet->name }}

+

{{ $outlet->address }} +

+
- {{-- Dropdown Menu --}} -
- - - @endforeach - + + @endforeach + + @else + @include('components.animations.lottie.boxing-cat') + @endif
day->value === $todayEnum ? 'bg-home-primary/5 border-home-primary/20' : '' }}"> - {{ \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 }}
@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"> - Petunjuk Arah + Petunjuk Arah πŸ—ΊοΈ @@ -360,3 +368,7 @@ class="flex-[1.5] py-4 rounded-2xl bg-home-primary text-white text-center font-b @endif + +@assets + +@endassets diff --git a/resources/views/livewire/home/vouchers.blade.php b/resources/views/livewire/home/vouchers.blade.php index 23fe67a..909f85b 100644 --- a/resources/views/livewire/home/vouchers.blade.php +++ b/resources/views/livewire/home/vouchers.blade.php @@ -17,7 +17,7 @@ class="w-full h-full object-cover"> {{-- Search Bar --}}
-
@@ -156,8 +156,8 @@ class="flex justify-between items-center text-sm border-b border-home-foreground Berlaku Hingga - +
@@ -243,7 +243,7 @@ class="w-8 h-8 rounded-lg bg-home-primary/5 flex items-center justify-center tex

Minimum Pembelian

- {{ formatCurrencyNumber($selectedVoucher->min_purchase, 'Rp') }}

+ {{ $selectedVoucher->formatted_min_purchase }}

@@ -259,7 +259,7 @@ class="w-8 h-8 rounded-lg bg-home-primary/5 flex items-center justify-center tex

Masa Berlaku

Hingga - {{ formatDateLocalized($selectedVoucher->end_date) }}

+ {{ $selectedVoucher->formatted_end_date }}

@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 - Dapat digunakan di semua outlet + Bisa dipakai di semua outlet lho! πŸͺ✨ @endforelse