Compare commits

..

No commits in common. "3c2ce3610f58a20246d9cb6eeff74326be597bc2" and "d8b33496dc563466b02e16c1cd37bf7b2e1445d9" have entirely different histories.

2 changed files with 14 additions and 47 deletions

View File

@ -745,45 +745,23 @@ function hitungTotalHarga(){
}
function copyNoRek() {
const text = document.getElementById('noRekText').innerText;
navigator.clipboard.writeText(text).then(() => {
Swal.fire({
icon: 'success',
title: 'Disalin!',
text: 'Nomor rekening berhasil disalin: ' + text,
showConfirmButton: false,
timer: 1500
});
}).catch(err => {
console.error('Gagal menyalin: ', err);
Swal.fire({
icon: 'warning',
text: 'Gagal menyalin teks: ' + text,
showConfirmButton: false,
timer: 2000
});
});
}
function copyNoRek() {
const text = document.getElementById('noRekText').innerText;
navigator.clipboard.writeText(text).then(() => {
alert("Nomor rekening berhasil disalin: " + text);
}).catch(err => {
console.error('Gagal menyalin: ', err);
alert("Gagal menyalin teks.");
});
}
function copyNoOrder() {
const text = document.getElementById('no_order_display').innerText;
navigator.clipboard.writeText(text).then(() => {
Swal.fire({
icon: 'success',
title: 'Disalin!',
text: 'Nomor order berhasil disalin: ' + text,
showConfirmButton: false,
timer: 1500
});
alert("Nomor order berhasil disalin: " + text);
}).catch(err => {
console.error('Gagal menyalin: ', err);
Swal.fire({
icon: 'warning',
text: 'Gagal menyalin teks: ' + text,
showConfirmButton: false,
timer: 2000
});
alert("Gagal menyalin teks.");
});
}

View File

@ -10,7 +10,7 @@
<p class="lead">Terima kasih atas pesanan Anda. Kami akan segera menyiapkannya dan menghubungi Anda jika diperlukan.</p>
<hr class="my-4">
<p class="text-muted">Simpan Nomor Order Anda untuk memantau status pesanan secara berkala. Hubungi kami jika ada pertanyaan.</p>
<p>No Order : <strong id="noOrderText">{{ $no_order }}</strong>
<p>No Order : <strong>{{ $no_order }}</strong>
<button class="btn btn-sm btn-outline-secondary ms-2" onclick="copyNoOrder()">
<i class="fa fa-copy"></i> Salin
</button>
@ -27,21 +27,10 @@
function copyNoOrder() {
const text = document.getElementById('noOrderText').innerText;
navigator.clipboard.writeText(text).then(() => {
Swal.fire({
icon: 'success',
title: 'Disalin!',
text: 'Nomor order berhasil disalin: ' + text,
showConfirmButton: false,
timer: 1500
});
alert("Nomor order berhasil disalin: " + text);
}).catch(err => {
console.error('Gagal menyalin: ', err);
Swal.fire({
icon: 'warning',
text: 'Gagal menyalin teks: ' + text,
showConfirmButton: false,
timer: 2000
});
alert("Gagal menyalin teks.");
});
}
</script>