From ec192c588aa5f5cef7c54b304855082487b7d39e Mon Sep 17 00:00:00 2001 From: dhilanradya Date: Mon, 13 Oct 2025 13:34:07 +0700 Subject: [PATCH 1/6] [update] undangan ulang tahun premium --- .../form/undangan-ulang-tahun-premium.vue | 643 +++++++----------- 1 file changed, 228 insertions(+), 415 deletions(-) diff --git a/proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue b/proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue index 7cd94c9..345a659 100644 --- a/proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue +++ b/proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue @@ -1,434 +1,174 @@ + }, + foto: [] +}) - \ No newline at end of file + +const removeFile = (index) => { + form.value.foto.splice(index, 1) + previews.value.splice(index, 1) +} + +const konfirmasi = async () => { + try { + // Basic client-side validation + if (!form.value.nama_pemesan || !form.value.email) { + alert('Harap isi kolom wajib (Nama Pemesan, Email)!') + return + } + + const data = new FormData() + data.append('nama_pemesan', form.value.nama_pemesan) + data.append('email', form.value.email) + data.append('no_tlpn', form.value.no_tlpn) + data.append('template_slug', 'undangan-ulang-tahun-premium') + + // Append form fields individually to ensure Laravel receives them as an array + for (const [key, value] of Object.entries(form.value.form)) { + data.append(`form[${key}]`, value) + } + + form.value.foto.forEach((file, index) => { + data.append(`foto[${index}]`, file) + }) + + console.log([...data]) // untuk debugging + + const res = await fetch('http://localhost:8000/api/pelanggans', { + method: 'POST', + body: data + }) + + const result = await res.json() + + if (!res.ok) { + if (res.status === 422) { + const errors = result.errors || {} + const errorMessages = Object.values(errors).flat().join('\n') + throw new Error(errorMessages || result.message || 'Validasi gagal') + } + if (res.status === 404) { + throw new Error(result.message || 'Template tidak ditemukan') + } + throw new Error(result.message || 'Gagal mengirim data') + } + + alert(result.message || 'Data berhasil disimpan!') + router.push('/') + } catch (err) { + console.error(err) + alert('Terjadi kesalahan: ' + err.message) + } +} + +const batal = () => router.back() + \ No newline at end of file From 4c473379e3ec5d2ce0214d64717910d7c09438c9 Mon Sep 17 00:00:00 2001 From: timotiabbauftech Date: Mon, 13 Oct 2025 14:15:12 +0700 Subject: [PATCH 2/6] feat Undangan basic dan undangan starter --- .../landing-page/featuredtemplates.vue | 2 +- .../pages/form/undangan-pernikahan-basic.vue | 381 ++++++++++++++++++ .../form/undangan-pernikahan-starter.vue | 290 +++++++++++++ 3 files changed, 672 insertions(+), 1 deletion(-) create mode 100644 proyek-frontend/app/pages/form/undangan-pernikahan-basic.vue create mode 100644 proyek-frontend/app/pages/form/undangan-pernikahan-starter.vue diff --git a/proyek-frontend/app/components/landing-page/featuredtemplates.vue b/proyek-frontend/app/components/landing-page/featuredtemplates.vue index 0a5300a..0359fd6 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 = [1, 3, 4, 5, 6, 7, 8, 9] +const selectedIds = [1, 2, 3, 4, 5, 6, 7, 8, 9] // State dropdown const openDropdownId = ref(null) diff --git a/proyek-frontend/app/pages/form/undangan-pernikahan-basic.vue b/proyek-frontend/app/pages/form/undangan-pernikahan-basic.vue new file mode 100644 index 0000000..d0d6580 --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-pernikahan-basic.vue @@ -0,0 +1,381 @@ +```vue + + + +``` \ No newline at end of file diff --git a/proyek-frontend/app/pages/form/undangan-pernikahan-starter.vue b/proyek-frontend/app/pages/form/undangan-pernikahan-starter.vue new file mode 100644 index 0000000..3969e59 --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-pernikahan-starter.vue @@ -0,0 +1,290 @@ + + + \ No newline at end of file From 19189871872f205964e6ee989ae34e4c3615afae Mon Sep 17 00:00:00 2001 From: dhilanradya Date: Mon, 13 Oct 2025 15:24:48 +0700 Subject: [PATCH 3/6] [feet] undangan ulang tahun starter + basic --- .../pages/form/undangan-ulang-tahun-basic.vue | 252 ++++++++++++++++++ .../form/undangan-ulang-tahun-starter.vue | 221 +++++++++++++++ 2 files changed, 473 insertions(+) create mode 100644 proyek-frontend/app/pages/form/undangan-ulang-tahun-basic.vue create mode 100644 proyek-frontend/app/pages/form/undangan-ulang-tahun-starter.vue diff --git a/proyek-frontend/app/pages/form/undangan-ulang-tahun-basic.vue b/proyek-frontend/app/pages/form/undangan-ulang-tahun-basic.vue new file mode 100644 index 0000000..55f6d39 --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-ulang-tahun-basic.vue @@ -0,0 +1,252 @@ + + + \ No newline at end of file diff --git a/proyek-frontend/app/pages/form/undangan-ulang-tahun-starter.vue b/proyek-frontend/app/pages/form/undangan-ulang-tahun-starter.vue new file mode 100644 index 0000000..38164ab --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-ulang-tahun-starter.vue @@ -0,0 +1,221 @@ + + + \ No newline at end of file From eb2921017351546ec2e3999af0d5a969b8521573 Mon Sep 17 00:00:00 2001 From: MuzakkiABBAUF Date: Mon, 13 Oct 2025 15:24:54 +0700 Subject: [PATCH 4/6] khitan form --- .../app/pages/form/undangan-khitan-basic.vue | 311 ++++++++++++++++++ .../pages/form/undangan-khitan-starter.vue | 257 +++++++++++++++ 2 files changed, 568 insertions(+) create mode 100644 proyek-frontend/app/pages/form/undangan-khitan-basic.vue create mode 100644 proyek-frontend/app/pages/form/undangan-khitan-starter.vue diff --git a/proyek-frontend/app/pages/form/undangan-khitan-basic.vue b/proyek-frontend/app/pages/form/undangan-khitan-basic.vue new file mode 100644 index 0000000..b815114 --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-khitan-basic.vue @@ -0,0 +1,311 @@ + + + diff --git a/proyek-frontend/app/pages/form/undangan-khitan-starter.vue b/proyek-frontend/app/pages/form/undangan-khitan-starter.vue new file mode 100644 index 0000000..74e57eb --- /dev/null +++ b/proyek-frontend/app/pages/form/undangan-khitan-starter.vue @@ -0,0 +1,257 @@ + + + From 9be255c4d81e1f5bdb93a4ede79eb5cbba23b67b Mon Sep 17 00:00:00 2001 From: Farhaan4 <127176994+Farhaan4@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:41:26 +0700 Subject: [PATCH 5/6] tes design template --- .../template-page/CategorySelection.vue | 2 +- .../app/components/templates/Ultah/Event.vue | 206 ++++- .../components/templates/Ultah/Gallery.vue | 37 +- .../templates/Ultah/Introduction.vue | 6 +- .../components/templates/Ultah/ThankYou.vue | 70 +- .../app/components/templates/Ultah/UltahA.vue | 784 +----------------- .../wedding}/CountdownTimer.vue | 0 .../{shared => templates/wedding}/Gallery.vue | 0 .../wedding}/GuestBook.vue | 0 .../{shared => templates/wedding}/Maps.vue | 0 .../wedding}/MusicPlayer.vue | 0 .../{shared => templates/wedding}/RSVP.vue | 0 .../components/templates/wedding/WeddingA.vue | 15 +- .../undangan/undangan-khitan-premium.vue | 154 ++++ .../undangan/undangan-pernikahan-premium.vue | 69 ++ .../undangan/undangan-ulang-tahun-premium.vue | 108 +++ proyek-frontend/app/pages/p/[code].vue | 41 +- proyek-frontend/app/pages/preview/[id].vue | 2 +- .../app/pages/preview/wedding-a.vue | 2 +- 19 files changed, 673 insertions(+), 823 deletions(-) rename proyek-frontend/app/components/{shared => templates/wedding}/CountdownTimer.vue (100%) rename proyek-frontend/app/components/{shared => templates/wedding}/Gallery.vue (100%) rename proyek-frontend/app/components/{shared => templates/wedding}/GuestBook.vue (100%) rename proyek-frontend/app/components/{shared => templates/wedding}/Maps.vue (100%) rename proyek-frontend/app/components/{shared => templates/wedding}/MusicPlayer.vue (100%) rename proyek-frontend/app/components/{shared => templates/wedding}/RSVP.vue (100%) create mode 100644 proyek-frontend/app/components/undangan/undangan-khitan-premium.vue create mode 100644 proyek-frontend/app/components/undangan/undangan-pernikahan-premium.vue create mode 100644 proyek-frontend/app/components/undangan/undangan-ulang-tahun-premium.vue diff --git a/proyek-frontend/app/components/template-page/CategorySelection.vue b/proyek-frontend/app/components/template-page/CategorySelection.vue index 87db324..2aa5b7d 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 diff --git a/proyek-frontend/app/components/templates/Ultah/Event.vue b/proyek-frontend/app/components/templates/Ultah/Event.vue index 9d305bf..2a8e6f6 100644 --- a/proyek-frontend/app/components/templates/Ultah/Event.vue +++ b/proyek-frontend/app/components/templates/Ultah/Event.vue @@ -1,27 +1,191 @@ + + + + diff --git a/proyek-frontend/app/components/templates/Ultah/Gallery.vue b/proyek-frontend/app/components/templates/Ultah/Gallery.vue index 6e5b839..b8a8a76 100644 --- a/proyek-frontend/app/components/templates/Ultah/Gallery.vue +++ b/proyek-frontend/app/components/templates/Ultah/Gallery.vue @@ -1,15 +1,36 @@ + + + + diff --git a/proyek-frontend/app/components/templates/Ultah/Introduction.vue b/proyek-frontend/app/components/templates/Ultah/Introduction.vue index 65e5e2c..1adb315 100644 --- a/proyek-frontend/app/components/templates/Ultah/Introduction.vue +++ b/proyek-frontend/app/components/templates/Ultah/Introduction.vue @@ -28,10 +28,10 @@ diff --git a/proyek-frontend/app/components/templates/Ultah/ThankYou.vue b/proyek-frontend/app/components/templates/Ultah/ThankYou.vue index dbb8e4e..89d9f99 100644 --- a/proyek-frontend/app/components/templates/Ultah/ThankYou.vue +++ b/proyek-frontend/app/components/templates/Ultah/ThankYou.vue @@ -1,20 +1,68 @@ + + diff --git a/proyek-frontend/app/components/templates/Ultah/UltahA.vue b/proyek-frontend/app/components/templates/Ultah/UltahA.vue index 6b0d59a..85c494d 100644 --- a/proyek-frontend/app/components/templates/Ultah/UltahA.vue +++ b/proyek-frontend/app/components/templates/Ultah/UltahA.vue @@ -1,769 +1,31 @@ - - \ No newline at end of file diff --git a/proyek-frontend/app/components/shared/CountdownTimer.vue b/proyek-frontend/app/components/templates/wedding/CountdownTimer.vue similarity index 100% rename from proyek-frontend/app/components/shared/CountdownTimer.vue rename to proyek-frontend/app/components/templates/wedding/CountdownTimer.vue diff --git a/proyek-frontend/app/components/shared/Gallery.vue b/proyek-frontend/app/components/templates/wedding/Gallery.vue similarity index 100% rename from proyek-frontend/app/components/shared/Gallery.vue rename to proyek-frontend/app/components/templates/wedding/Gallery.vue diff --git a/proyek-frontend/app/components/shared/GuestBook.vue b/proyek-frontend/app/components/templates/wedding/GuestBook.vue similarity index 100% rename from proyek-frontend/app/components/shared/GuestBook.vue rename to proyek-frontend/app/components/templates/wedding/GuestBook.vue diff --git a/proyek-frontend/app/components/shared/Maps.vue b/proyek-frontend/app/components/templates/wedding/Maps.vue similarity index 100% rename from proyek-frontend/app/components/shared/Maps.vue rename to proyek-frontend/app/components/templates/wedding/Maps.vue diff --git a/proyek-frontend/app/components/shared/MusicPlayer.vue b/proyek-frontend/app/components/templates/wedding/MusicPlayer.vue similarity index 100% rename from proyek-frontend/app/components/shared/MusicPlayer.vue rename to proyek-frontend/app/components/templates/wedding/MusicPlayer.vue diff --git a/proyek-frontend/app/components/shared/RSVP.vue b/proyek-frontend/app/components/templates/wedding/RSVP.vue similarity index 100% rename from proyek-frontend/app/components/shared/RSVP.vue rename to proyek-frontend/app/components/templates/wedding/RSVP.vue diff --git a/proyek-frontend/app/components/templates/wedding/WeddingA.vue b/proyek-frontend/app/components/templates/wedding/WeddingA.vue index 8031e2d..b3f4c9e 100644 --- a/proyek-frontend/app/components/templates/wedding/WeddingA.vue +++ b/proyek-frontend/app/components/templates/wedding/WeddingA.vue @@ -8,8 +8,9 @@

The Wedding of

- {{ data.bride.nickname }} & {{ data.groom.nickname }} + {{ data.bride?.nickname || 'Bride' }} & {{ data.groom?.nickname || 'Groom' }}

+

{{ formatDate(data.eventDate) }}