From 28d3155070d6848cbdc338dc82e8a2ffeb26b667 Mon Sep 17 00:00:00 2001
From: Farhaan4 <127176994+Farhaan4@users.noreply.github.com>
Date: Tue, 14 Oct 2025 10:23:15 +0700
Subject: [PATCH] fix landing page
---
.../Controllers/Api/TemplateApiController.php | 45 +-
.../landing-page/featuredtemplates.vue | 8 +-
.../template-page/CategorySelection.vue | 72 +-
.../components/template-page/TemplateGrid.vue | 6 +-
.../app/components/templates/Ultah/UltahA.vue | 784 +++++++++++++++++-
.../undangan/undangan-pernikahan-premium.vue | 2 +-
.../undangan/undangan-ulang-tahun-premium.vue | 4 +-
.../form/undangan-ulang-tahun-premium.vue | 53 +-
8 files changed, 886 insertions(+), 88 deletions(-)
diff --git a/backend-baru/app/Http/Controllers/Api/TemplateApiController.php b/backend-baru/app/Http/Controllers/Api/TemplateApiController.php
index bd3baae..822e96f 100644
--- a/backend-baru/app/Http/Controllers/Api/TemplateApiController.php
+++ b/backend-baru/app/Http/Controllers/Api/TemplateApiController.php
@@ -14,13 +14,13 @@ class TemplateApiController extends Controller
$transformedTemplates = $templates->map(function ($template) {
return [
- 'id' => $template->id,
+ 'id' => $template->id,
'nama_template' => $template->nama_template,
- 'slug' => $template->slug,
- 'harga' => $template->harga,
- 'paket' => $template->paket,
- 'kategori' => $template->kategori ? $template->kategori->nama : null,
- 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
+ 'slug' => $template->slug,
+ 'harga' => $template->harga,
+ 'paket' => $template->paket,
+ 'kategori' => $template->kategori ? $template->kategori->nama : null,
+ 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
];
});
@@ -34,14 +34,14 @@ class TemplateApiController extends Controller
$formData = $this->addDummyValues($template->form ?? []);
return response()->json([
- 'id' => $template->id,
+ 'id' => $template->id,
'nama_template' => $template->nama_template,
- 'slug' => $template->slug,
- 'harga' => $template->harga,
- 'paket' => $template->paket,
- 'kategori' => $template->kategori ? $template->kategori->nama : null,
- 'form' => $formData,
- 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
+ 'slug' => $template->slug,
+ 'harga' => $template->harga,
+ 'paket' => $template->paket,
+ 'kategori' => $template->kategori ? $template->kategori->nama : null,
+ 'form' => $formData,
+ 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
]);
}
@@ -74,22 +74,23 @@ class TemplateApiController extends Controller
public function getByCategory($id)
{
- $templates = Template::with('fiturs', 'kategori')
- ->where('kategori_id', $id)
- ->get();
+ $templates = Template::with('kategori')
+ ->where('kategori_id', $id)
+ ->get();
+
$transformed = $templates->map(function ($template) {
return [
- 'id' => $template->id,
+ 'id' => $template->id,
'nama_template' => $template->nama_template,
- 'harga' => $template->harga,
- 'paket' => $template->paket,
- 'kategori' => $template->kategori ? [
+ 'harga' => $template->harga,
+ 'paket' => $template->paket,
+ 'kategori' => $template->kategori ? [
'id' => $template->kategori->id,
'nama' => $template->kategori->nama
] : null,
- 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
- 'fiturs' => $template->fiturs ?? [],
+ 'foto' => $template->foto ? asset('storage/' . $template->foto) : null,
+ 'fiturs' => $template->fiturs ?? [],
];
});
diff --git a/proyek-frontend/app/components/landing-page/featuredtemplates.vue b/proyek-frontend/app/components/landing-page/featuredtemplates.vue
index 5df72f5..fc504b6 100644
--- a/proyek-frontend/app/components/landing-page/featuredtemplates.vue
+++ b/proyek-frontend/app/components/landing-page/featuredtemplates.vue
@@ -2,7 +2,7 @@
import { ref, computed } from 'vue'
// ID template yang mau ditampilkan
-const selectedIds = [3, 5, 7]
+const selectedIds = [3, 6, 9]
// State dropdown
const openDropdownId = ref(null)
@@ -88,6 +88,7 @@ const formMapping = {
// Fetch data template dari backend (nama_template, harga, kategori, foto)
const { data: templatesData, error } = await useFetch('http://localhost:8000/api/templates')
+console.log(templatesData.value)
// Mapping template: gabungkan backend + paket & fitur hardcode
const paketMapping = {
@@ -129,11 +130,12 @@ const templates = computed(() =>
-
+
-
+
+
diff --git a/proyek-frontend/app/components/template-page/CategorySelection.vue b/proyek-frontend/app/components/template-page/CategorySelection.vue
index 3bf9268..b142f4a 100644
--- a/proyek-frontend/app/components/template-page/CategorySelection.vue
+++ b/proyek-frontend/app/components/template-page/CategorySelection.vue
@@ -14,7 +14,7 @@
Kembali ke Beranda
-
+
Pilih Kategori Favoritmu
@@ -29,27 +29,38 @@
Gagal memuat kategori.
-
-
-
-
e.target.src = '/ABBAUF.png'">
-
-
-
{{ category.nama }}
-
- {{ category.deskripsi }}
-
-
-
+
+
+
+
+
+
+
+ {{ category.nama }}
+
+
+ {{ category.deskripsi }}
+
+
+
-
- Belum ada kategori.
-
+
+ Belum ada kategori.
+
@@ -67,12 +78,14 @@
Belum ada template tersedia.
-
+
-
e.target.src = '/logo1.png'" />
+
+
@@ -114,11 +127,12 @@
-
+
Preview
-
-
+
Order
@@ -206,7 +220,8 @@ const paketData = [
}
]
-// fetch kategori
+
+// Fetch kategori
const fetchCategories = async () => {
isLoading.value = true
error.value = null
@@ -243,7 +258,6 @@ const templatesWithFeatures = computed(() =>
(templatesRaw.value || []).map((t, index) => ({
id: t.id,
nama: t.nama_template,
- slug: t.slug,
harga: t.harga,
foto: t.foto || '/logo1.png',
kategori: t.kategori,
diff --git a/proyek-frontend/app/components/template-page/TemplateGrid.vue b/proyek-frontend/app/components/template-page/TemplateGrid.vue
index 3edf89c..6a95b0c 100644
--- a/proyek-frontend/app/components/template-page/TemplateGrid.vue
+++ b/proyek-frontend/app/components/template-page/TemplateGrid.vue
@@ -31,8 +31,10 @@
class="bg-white border rounded-lg overflow-hidden shadow-md hover:shadow-xl transition-shadow duration-300">
- e.target.src = '/logo2.png'" />
+
+
diff --git a/proyek-frontend/app/components/templates/Ultah/UltahA.vue b/proyek-frontend/app/components/templates/Ultah/UltahA.vue
index 85c494d..6b0d59a 100644
--- a/proyek-frontend/app/components/templates/Ultah/UltahA.vue
+++ b/proyek-frontend/app/components/templates/Ultah/UltahA.vue
@@ -1,31 +1,769 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Celebrate With Us
+
+
+ {{ childName }}
+
+
+ Birthday Party
+
+
+
+
Kepada Yth.
+
{{ guestName }}
+
+
+
+ Open Invitation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ulang Tahun Ke -{{ age }}
+
+
+ {{ childName }}
+
+
+
+ Anak Ke -{{ childOrder }}
+
+
+ {{ parentNames }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
📍 Location Map
+
Google Maps Integration
+
+
+
+
+ Direction
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BIRTHDAY PARTY
+
+
+
+
+
+ {{ eventDay }}
+ {{ eventDate }}
+ {{ eventTime }}
+
+
{{ eventLocation }}
+
+
+
+
+
+
{{ countdown.days }}
+
D
+
+
+
{{ countdown.hours }}
+
H
+
+
+
{{ countdown.minutes }}
+
M
+
+
+
{{ countdown.seconds }}
+
S
+
+
+
+
+
+ Add to Calendar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Galeri
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Say Something!
+
+
+
+
+
+
+
+
+
+
+
+
+ 💬
+ {{ messages.length.toString().padStart(2, '0') }}
+
+
+
+
+
+
+ {{ message.name }}
+
+ {{ message.attendance.charAt(0).toUpperCase() + message.attendance.slice(1) }}
+
+
+
{{ message.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Merupakan suatu kebahagiaan dan kehormatan bagi kami, apabila teman-teman,
+ berkenan hadir dan memberikan do'a.
+
+
+
+ Hormat Kami
+
+
+ {{ parentNames }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/proyek-frontend/app/components/undangan/undangan-pernikahan-premium.vue b/proyek-frontend/app/components/undangan/undangan-pernikahan-premium.vue
index 61415ab..af273a1 100644
--- a/proyek-frontend/app/components/undangan/undangan-pernikahan-premium.vue
+++ b/proyek-frontend/app/components/undangan/undangan-pernikahan-premium.vue
@@ -9,7 +9,7 @@
\ No newline at end of file
+