Merge branch 'baru' of https://git.abbauf.com/Magang-2025/Undangan into baru
This commit is contained in:
commit
82f74c3a3b
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import WeddingA from '~/components/templates/wedding/WeddingA.vue'
|
import WeddingA from '~/components/templates/wedding/weddingA.vue'
|
||||||
|
|
||||||
// Props dari parent (/p/[code].vue)
|
// Props dari parent (/p/[code].vue)
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -313,18 +313,7 @@ const konfirmasi = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirm = await Swal.fire({
|
|
||||||
title: 'Simpan Data?',
|
|
||||||
text: 'Pastikan data sudah benar sebelum dikirim.',
|
|
||||||
icon: 'question',
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonColor: '#2563eb',
|
|
||||||
cancelButtonColor: '#d33',
|
|
||||||
confirmButtonText: 'Ya, Simpan',
|
|
||||||
cancelButtonText: 'Batal'
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!confirm.isConfirmed) return
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = new FormData()
|
const data = new FormData()
|
||||||
@ -358,10 +347,19 @@ const konfirmasi = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await Swal.fire({
|
await Swal.fire({
|
||||||
title: 'Berhasil!',
|
title: '🎉 Berhasil!',
|
||||||
text: result.message || 'Data berhasil disimpan!',
|
text: result.message || 'Data undangan kamu berhasil disimpan.',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
confirmButtonColor: '#16a34a'
|
confirmButtonText: 'Lanjut ke WhatsApp',
|
||||||
|
confirmButtonColor: '#2563eb',
|
||||||
|
background: '#f9fafb',
|
||||||
|
color: '#111827',
|
||||||
|
showClass: {
|
||||||
|
popup: 'animate__animated animate__fadeInDown'
|
||||||
|
},
|
||||||
|
hideClass: {
|
||||||
|
popup: 'animate__animated animate__fadeOutUp'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// ✅ Kirim ke WhatsApp admin
|
// ✅ Kirim ke WhatsApp admin
|
||||||
|
|||||||
@ -212,6 +212,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
import Swal from 'sweetalert2'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@ -266,7 +267,7 @@ const form = ref({
|
|||||||
const showAlert = ref(false)
|
const showAlert = ref(false)
|
||||||
const alertTitle = ref('')
|
const alertTitle = ref('')
|
||||||
const alertMessage = ref('')
|
const alertMessage = ref('')
|
||||||
const alertType = ref('info') // success | error | warning | info
|
const alertType = ref('info')
|
||||||
|
|
||||||
const triggerAlert = (type, title, message) => {
|
const triggerAlert = (type, title, message) => {
|
||||||
alertType.value = type
|
alertType.value = type
|
||||||
@ -346,6 +347,24 @@ const konfirmasi = async () => {
|
|||||||
throw new Error(msg)
|
throw new Error(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 adminPhone = '62895333053398'
|
const adminPhone = '62895333053398'
|
||||||
const pesan = `
|
const pesan = `
|
||||||
Halo Admin 👋
|
Halo Admin 👋
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user