form pernikahan prem
This commit is contained in:
parent
a89b5c2cb7
commit
3b42e905d3
@ -64,6 +64,7 @@ import GuestBook from '~/components/templates/Ultah/GuestBook.vue'
|
||||
import ThankYou from '~/components/templates/Ultah/ThankYou.vue'
|
||||
|
||||
|
||||
|
||||
// Props dari halaman /p/[code].vue
|
||||
const props = defineProps({
|
||||
data: { type: Object, required: true }
|
||||
|
||||
@ -8,136 +8,450 @@
|
||||
Isi semua data berikut dengan lengkap dan benar.
|
||||
</p>
|
||||
|
||||
<!-- Data Pemesan -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">📋 Data Pemesan</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<input v-model="form.nama_pemesan" type="text" placeholder="Nama Pemesan" required
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.email" type="email" placeholder="Email" required
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.no_tlpn" type="text" placeholder="No Telepon"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
|
||||
<!-- Nama Pemesan -->
|
||||
<div class="relative">
|
||||
<input v-model="form.nama_pemesan" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 top-0 text-gray-400 text-xs transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-gray-400 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Pemesan
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div class="relative">
|
||||
<input v-model="form.email" type="email" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 top-0 text-gray-400 text-xs transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-gray-400 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Email
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- No Telepon -->
|
||||
<div class="relative">
|
||||
<input v-model="form.no_tlpn" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 top-0 text-gray-400 text-xs transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-gray-400 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
No Telepon
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Data Mempelai -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">💍 Data Mempelai</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
|
||||
<!-- Mempelai Pria -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-2">Mempelai Pria</h3>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.nama_lengkap_pria" placeholder="Nama Lengkap"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_panggilan_pria" placeholder="Nama Panggilan"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_bapak_pria" placeholder="Nama Bapak"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_ibu_pria" placeholder="Nama Ibu"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.link_instagram_pria" placeholder="Link Instagram"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.link_facebook_pria" placeholder="Link Facebook"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.link_twitter_pria" placeholder="Link Twitter"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<div class="space-y-3">
|
||||
|
||||
<!-- Nama Lengkap -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_lengkap_pria" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Lengkap Pria
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Panggilan -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_panggilan_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Panggilan
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Bapak -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_bapak_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Bapak
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Ibu -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_ibu_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Ibu
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Instagram -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_instagram_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Instagram
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Facebook -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_facebook_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Facebook
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Twitter -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_twitter_pria" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-blue-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Twitter
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mempelai Wanita -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-2">Mempelai Wanita</h3>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.nama_lengkap_wanita" placeholder="Nama Lengkap"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_panggilan_wanita" placeholder="Nama Panggilan"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_bapak_wanita" placeholder="Nama Bapak"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_ibu_wanita" placeholder="Nama Ibu"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.link_instagram_wanita" placeholder="Link Instagram"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.link_facebook_wanita" placeholder="Link Facebook"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<input v-model="form.form.link_twitter_wanita" placeholder="Link Twitter"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<div class="space-y-3">
|
||||
|
||||
<!-- Nama Lengkap -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_lengkap_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Lengkap Wanita
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Panggilan -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_panggilan_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama pangilan
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Bapak -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_bapak_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Bapak
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Nama Ibu -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.nama_ibu_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Nama Ibu
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Instagram -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_instagram_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Instagram
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Facebook -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_facebook_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Facebook
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Twitter -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_twitter_wanita" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm focus:ring-2 focus:ring-pink-400 focus:border-pink-400 outline-none transition" />
|
||||
<label class="absolute left-1 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:left-2 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:left-1 peer-focus:text-pink-500 peer-focus:text-[10px]
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Twitter
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Detail Acara -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">📅 Detail Acara</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
|
||||
<!-- Akad -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-2">Akad</h3>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.hari_tanggal_akad" type="date" placeholder="Hari & Tanggal Akad"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.waktu_akad" type="time" placeholder="Waktu Akad"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<textarea v-model="form.form.alamat_akad" rows="3" placeholder="Alamat Akad"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition resize-none"></textarea>
|
||||
<input v-model="form.form.link_gmaps_akad" type="text" placeholder="Link Google Maps Akad"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<div class="space-y-3">
|
||||
|
||||
<!-- Hari & Tanggal -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.hari_tanggal_akad" type="date" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Hari & Tanggal Akad
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Waktu Akad -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.waktu_akad" type="time" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Waktu Akad
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Alamat -->
|
||||
<div class="relative">
|
||||
<textarea v-model="form.form.alamat_akad" rows="3" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-5 pb-1.5 text-sm resize-none
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition"></textarea>
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Alamat Akad
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link GMaps -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_gmaps_akad" type="text" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Google Maps Akad
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Resepsi -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-2">Resepsi</h3>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.hari_tanggal_resepsi" type="date" placeholder="Hari & Tanggal Resepsi"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.waktu_resepsi" type="time" placeholder="Waktu Resepsi"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<textarea v-model="form.form.alamat_resepsi" rows="3" placeholder="Alamat Resepsi"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition resize-none"></textarea>
|
||||
<input v-model="form.form.link_gmaps_resepsi" type="text" placeholder="Link Google Maps Resepsi"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<div class="space-y-3">
|
||||
|
||||
<!-- Hari & Tanggal -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.hari_tanggal_resepsi" type="date" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Hari & Tanggal Resepsi
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Waktu -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.waktu_resepsi" type="time" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Waktu Resepsi
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Alamat -->
|
||||
<div class="relative">
|
||||
<textarea v-model="form.form.alamat_resepsi" rows="3" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-5 pb-1.5 text-sm resize-none
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition"></textarea>
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Alamat Resepsi
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link GMaps -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_gmaps_resepsi" type="text" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Google Maps Resepsi
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Syukuran -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-2">Syukuran</h3>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.hari_tanggal_syukuran" type="date" placeholder="Hari & Tanggal Syukuran"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.waktu_syukuran" type="time" placeholder="Waktu Syukuran"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<textarea v-model="form.form.alamat_syukuran" rows="3" placeholder="Alamat Syukuran"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition resize-none"></textarea>
|
||||
<input v-model="form.form.link_gmaps_syukuran" type="text" placeholder="Link Google Maps Syukuran"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<div class="space-y-3">
|
||||
|
||||
<div class="relative">
|
||||
<input v-model="form.form.hari_tanggal_syukuran" type="date" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Hari & Tanggal Syukuran
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="relative">
|
||||
<input v-model="form.form.waktu_syukuran" type="time" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Waktu Syukuran
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="relative">
|
||||
<textarea v-model="form.form.alamat_syukuran" rows="3" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-5 pb-1.5 text-sm resize-none
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition"></textarea>
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Alamat Syukuran
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_gmaps_syukuran" type="text" placeholder=" " required class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Google Maps Syukuran
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hitung Mundur -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-3">Hitung Mundur</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<!-- Mulai -->
|
||||
<div>
|
||||
<label class="block text-gray-600 text-sm mb-1">Mulai dari</label>
|
||||
<input v-model="form.form.hitung_mundur_mulai" type="datetime-local"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
|
||||
<div class="relative">
|
||||
<input v-model="form.form.hitung_mundur_mulai" type="datetime-local" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Mulai Dari
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Sampai -->
|
||||
<div>
|
||||
<label class="block text-gray-600 text-sm mb-1">Sampai dengan</label>
|
||||
<input v-model="form.form.hitung_mundur_selesai" type="datetime-local"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<div class="relative">
|
||||
<input v-model="form.form.hitung_mundur_selesai" type="datetime-local" placeholder=" " class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:left-1 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Sampai Dengan
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Cerita Kita -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">💌 Cerita Kita</h2>
|
||||
@ -155,20 +469,81 @@
|
||||
<!-- Rekening & Musik -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">💳 Rekening & Musik</h2>
|
||||
<div class="grid md:grid-cols-3 gap-4">
|
||||
<input v-model="form.form.rekening_1" placeholder="Rekening 1"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.rekening_2" placeholder="Rekening 2"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.rekening_3" placeholder="Rekening 3"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
|
||||
<!-- Rekening -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
|
||||
<!-- Rekening 1 -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.rekening_1" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Rekening 1
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Rekening 2 -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.rekening_2" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Rekening 2
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Rekening 3 -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.rekening_3" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Rekening 3
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Musik & Live Streaming -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Link Music -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_music" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Music
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Link Live Streaming -->
|
||||
<div class="relative">
|
||||
<input v-model="form.form.link_live_streaming" type="text" placeholder=" " required
|
||||
class="peer w-full border border-gray-300 rounded-lg px-2.5 pt-4 pb-1.5 text-sm
|
||||
focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<label class="absolute left-2 text-gray-400 transition-all
|
||||
peer-placeholder-shown:top-4 peer-placeholder-shown:text-sm
|
||||
peer-focus:top-0 peer-focus:text-[10px] peer-focus:text-blue-500
|
||||
peer-valid:top-0 peer-valid:text-[10px] peer-valid:text-gray-500">
|
||||
Link Live Streaming
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input v-model="form.form.link_music" placeholder="Link Music (opsional)"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 mt-4 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.link_live_streaming" placeholder="Link Live Streaming (opsional)"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 mt-4 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!-- Foto Upload -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">🖼️ Galeri Foto</h2>
|
||||
@ -347,7 +722,7 @@ const konfirmasi = async () => {
|
||||
throw new Error(msg)
|
||||
}
|
||||
|
||||
await Swal.fire({
|
||||
await Swal.fire({
|
||||
title: '🎉 Berhasil!',
|
||||
text: result.message || 'Data undangan kamu berhasil disimpan.',
|
||||
icon: 'success',
|
||||
|
||||
356
proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue
Normal file
356
proyek-frontend/app/pages/form/undangan-ulang-tahun-premium.vue
Normal file
@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="min-h-screen bg-gray-50 py-10 px-6">
|
||||
<div class="max-w-5xl mx-auto bg-white rounded-2xl shadow-lg p-8">
|
||||
<h1 class="text-2xl font-bold text-center text-gray-800">
|
||||
Form Undangan Ulang Tahun Premium
|
||||
</h1>
|
||||
<p class="text-center text-gray-500 text-sm mb-8">
|
||||
Isi semua data berikut dengan lengkap dan benar.
|
||||
</p>
|
||||
|
||||
<!-- Data Pemesan -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">📋 Data Pemesan</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<input v-model="form.nama_pemesan" type="text" placeholder="Nama Pemesan"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.email" type="email" placeholder="Email"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.no_tlpn" type="text" placeholder="No Telepon"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Data Anak -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">🎉 Data Anak</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.nama_lengkap" placeholder="Nama Lengkap"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_panggilan" placeholder="Nama Panggilan"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_bapak" placeholder="Nama Bapak"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.nama_ibu" placeholder="Nama Ibu"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.umur_yang_dirayakan" type="number" placeholder="Umur Yang Dirayakan"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.anak_ke" type="number" placeholder="Anak Ke"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="grid gap-2">
|
||||
<input v-model="form.form.instagram" placeholder="Link Instagram"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.facebook" placeholder="Link Facebook"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.twitter" placeholder="Link Twitter"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Detail Acara -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">📅 Detail Acara</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<input v-model="form.form.hari_tanggal_acara" type="date" placeholder="Hari & Tanggal Acara"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.waktu" type="text" placeholder="Waktu"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<textarea v-model="form.form.alamat" rows="4" placeholder="Alamat"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition resize-none"></textarea>
|
||||
<input v-model="form.form.link_gmaps" type="text" placeholder="Link Gmaps"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<!-- Hitung Mundur -->
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-700 mb-3">Hitung Mundur</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<!-- Mulai -->
|
||||
<div>
|
||||
<label class="block text-gray-600 text-sm mb-1">Mulai dari</label>
|
||||
<input v-model="form.form.hitung_mundur_mulai" type="datetime-local"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
|
||||
<!-- Sampai -->
|
||||
<div>
|
||||
<label class="block text-gray-600 text-sm mb-1">Sampai dengan</label>
|
||||
<input v-model="form.form.hitung_mundur_selesai" type="datetime-local"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
<input v-model="form.form.link_live_streaming" type="text" placeholder="Link Live Streaming"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- Pesan & Rekening -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">💌 Pesan & Rekening</h2>
|
||||
<textarea v-model="form.form.say_something" rows="4" placeholder="Say Something..."
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition resize-none"></textarea>
|
||||
<div class="grid md:grid-cols-3 gap-4 mt-4">
|
||||
<input v-model="form.form.rekening_1" placeholder="Rekening 1"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.rekening_2" placeholder="Rekening 2"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
<input v-model="form.form.rekening_3" placeholder="Rekening 3"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</div>
|
||||
<input v-model="form.form.link_music" placeholder="Link Music (opsional)"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 mt-4 focus:ring-2 focus:ring-blue-400 focus:border-blue-400 outline-none transition" />
|
||||
</section>
|
||||
|
||||
<!-- Foto Upload -->
|
||||
<section class="mb-8">
|
||||
<h2 class="font-semibold text-blue-600 mb-3 border-b pb-1">🖼️ Galeri Foto</h2>
|
||||
<div
|
||||
class="border-2 border-dashed border-gray-300 rounded-xl p-8 flex flex-col justify-center items-center text-gray-400 hover:border-blue-400 hover:text-blue-500 transition"
|
||||
>
|
||||
<input
|
||||
id="gallery"
|
||||
type="file"
|
||||
multiple
|
||||
accept="image/*"
|
||||
class="hidden"
|
||||
@change="handleFileChange"
|
||||
/>
|
||||
<label v-if="!previews.length" for="gallery" class="cursor-pointer flex flex-col items-center">
|
||||
<span class="text-4xl font-bold">+</span>
|
||||
<span class="text-sm mt-2">Pilih Foto (maks. 8, JPEG/PNG, maks. 2MB)</span>
|
||||
</label>
|
||||
<div v-else class="grid grid-cols-3 sm:grid-cols-4 gap-4">
|
||||
<div
|
||||
v-for="(src, i) in previews"
|
||||
:key="i"
|
||||
class="relative group"
|
||||
>
|
||||
<img
|
||||
:src="src"
|
||||
class="w-24 h-24 object-cover rounded-lg border shadow"
|
||||
/>
|
||||
<button
|
||||
@click="removeFile(i)"
|
||||
class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs opacity-0 group-hover:opacity-100 transition"
|
||||
title="Hapus foto"
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
<label
|
||||
v-if="previews.length < 8"
|
||||
for="gallery"
|
||||
class="cursor-pointer flex flex-col items-center justify-center w-24 h-24 border-2 border-dashed border-gray-300 rounded-lg text-gray-400 hover:border-blue-400 hover:text-blue-500 transition"
|
||||
>
|
||||
<span class="text-3xl font-bold">+</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tombol -->
|
||||
<div class="text-end mt-6">
|
||||
<button @click="batal"
|
||||
class="bg-gray-600 text-white font-semibold px-6 py-2 rounded-lg transition mr-2">
|
||||
Batal
|
||||
</button>
|
||||
<button @click="konfirmasi"
|
||||
class="bg-blue-700 text-white font-semibold px-6 py-2 rounded-lg transition">
|
||||
Konfirmasi
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Swal from 'sweetalert2'
|
||||
|
||||
const router = useRouter()
|
||||
const ADMIN_WA = '62895333053398'
|
||||
|
||||
const form = ref({
|
||||
nama_pemesan: '',
|
||||
email: '',
|
||||
no_tlpn: '',
|
||||
form: {
|
||||
nama_lengkap: '',
|
||||
nama_panggilan: '',
|
||||
nama_bapak: '',
|
||||
nama_ibu: '',
|
||||
umur_yang_dirayakan: '',
|
||||
anak_ke: '',
|
||||
instagram: '',
|
||||
facebook: '',
|
||||
twitter: '',
|
||||
hari_tanggal_acara: '',
|
||||
waktu: '',
|
||||
alamat: '',
|
||||
link_gmaps: '',
|
||||
hitung_mundur_mulai: '',
|
||||
hitung_mundur_selesai: '',
|
||||
link_live_streaming: '',
|
||||
say_something: '',
|
||||
rekening_1: '',
|
||||
rekening_2: '',
|
||||
rekening_3: '',
|
||||
link_music: ''
|
||||
},
|
||||
foto: []
|
||||
})
|
||||
|
||||
const previews = ref([])
|
||||
|
||||
const handleFileChange = (e) => {
|
||||
const files = Array.from(e.target.files)
|
||||
const totalFiles = form.value.foto.length + files.length
|
||||
|
||||
if (totalFiles > 8) {
|
||||
alert('Maksimal 8 foto!')
|
||||
e.target.value = ''
|
||||
return
|
||||
}
|
||||
|
||||
files.forEach(file => {
|
||||
if (file.size > 2 * 1024 * 1024) {
|
||||
alert(`File ${file.name} terlalu besar! Maksimal 2MB.`)
|
||||
return
|
||||
}
|
||||
if (!['image/jpeg', 'image/png', 'image/jpg'].includes(file.type)) {
|
||||
alert(`File ${file.name} harus berupa JPEG atau PNG!`)
|
||||
return
|
||||
}
|
||||
form.value.foto.push(file)
|
||||
previews.value.push(URL.createObjectURL(file))
|
||||
})
|
||||
e.target.value = ''
|
||||
}
|
||||
|
||||
const removeFile = (index) => {
|
||||
form.value.foto.splice(index, 1)
|
||||
previews.value.splice(index, 1)
|
||||
}
|
||||
|
||||
const konfirmasi = async () => {
|
||||
try {
|
||||
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')
|
||||
|
||||
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)
|
||||
})
|
||||
|
||||
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')
|
||||
}
|
||||
|
||||
await Swal.fire({
|
||||
title: '🎉 Berhasil!',
|
||||
text: result.message || 'Data undangan kamu berhasil disimpan.',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'Lanjut ke WhatsApp',
|
||||
confirmButtonColor: '#2563eb',
|
||||
background: '#f9fafb',
|
||||
color: '#111827',
|
||||
showClass: {
|
||||
popup: 'animate__animated animate__fadeInDown'
|
||||
},
|
||||
hideClass: {
|
||||
popup: 'animate__animated animate__fadeOutUp'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const f = form.value
|
||||
const child = f.form
|
||||
|
||||
const message = `
|
||||
Halo Admin 👋,
|
||||
Saya ingin membuat *Undangan Ulang Tahun Premium* 🎂
|
||||
|
||||
📋 *Data Pemesan*
|
||||
- Nama: ${f.nama_pemesan}
|
||||
- Email: ${f.email}
|
||||
- No. Telepon: ${f.no_tlpn}
|
||||
|
||||
🎉 *Data Anak*
|
||||
- Nama Lengkap: ${child.nama_lengkap}
|
||||
- Nama Panggilan: ${child.nama_panggilan}
|
||||
- Umur: ${child.umur_yang_dirayakan} tahun
|
||||
- Anak ke: ${child.anak_ke}
|
||||
- Bapak: ${child.nama_bapak}
|
||||
- Ibu: ${child.nama_ibu}
|
||||
|
||||
📅 *Detail Acara*
|
||||
- Tanggal: ${child.hari_tanggal_acara}
|
||||
- Waktu: ${child.waktu}
|
||||
- Alamat: ${child.alamat}
|
||||
- Link Gmaps: ${child.link_gmaps || '-'}
|
||||
|
||||
💌 *Pesan Tambahan*
|
||||
${child.say_something || '-'}
|
||||
|
||||
Terima kasih 🙏
|
||||
`
|
||||
|
||||
const encodedMsg = encodeURIComponent(message)
|
||||
const waUrl = `https://wa.me/${ADMIN_WA}?text=${encodedMsg}`
|
||||
|
||||
Swal.fire({
|
||||
title: 'Membuka WhatsApp...',
|
||||
text: 'Mohon tunggu sebentar ⏳',
|
||||
timer: 1500,
|
||||
timerProgressBar: true,
|
||||
showConfirmButton: false,
|
||||
willClose: () => {
|
||||
window.open(waUrl, '_blank')
|
||||
router.push('/')
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
Swal.fire('❌ Gagal', err.message, 'error')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const batal = () => router.back()
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user