commit
8869d87ebb
|
|
@ -61,7 +61,7 @@ public function updateStatus(Request $request, $id)
|
||||||
"- *Request:* {$req}\n" .
|
"- *Request:* {$req}\n" .
|
||||||
"- *Ucapan:* \"{$ucapan}\"\n" .
|
"- *Ucapan:* \"{$ucapan}\"\n" .
|
||||||
"- *Waktu Pengambilan:* {$tanggal} pukul {$waktu} WIB\n\n" .
|
"- *Waktu Pengambilan:* {$tanggal} pukul {$waktu} WIB\n\n" .
|
||||||
"Mohon simpan rincian ini dan ditunggu info selanjutnya ya Kak. Terima kasih! ✨";
|
"Mohon simpan rincian ini dan ditunggu info selanjutnya ya Kak. Terima kasih!";
|
||||||
} elseif ($status === 'ditolak') {
|
} elseif ($status === 'ditolak') {
|
||||||
$msg = "Halo Kak *{$nama}*,\n\n" .
|
$msg = "Halo Kak *{$nama}*,\n\n" .
|
||||||
"Mengenai pesanan Anda dengan Nomor Invoice: *{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" .
|
"Mengenai pesanan Anda dengan Nomor Invoice: *{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" .
|
||||||
|
|
|
||||||
|
|
@ -156,62 +156,60 @@
|
||||||
</section>
|
</section>
|
||||||
@include('admin.paket-foto.partials.modal-create-foto')
|
@include('admin.paket-foto.partials.modal-create-foto')
|
||||||
@include('admin.paket-foto.partials.modal-create-additional')
|
@include('admin.paket-foto.partials.modal-create-additional')
|
||||||
|
<script>
|
||||||
|
// FUNGSI PREVIEW UNIVERSAL (Bisa untuk Create & Edit)
|
||||||
|
function previewImage(input, previewId, placeholderId) {
|
||||||
|
const preview = document.getElementById(previewId);
|
||||||
|
const placeholder = document.getElementById(placeholderId);
|
||||||
|
const file = input.files[0];
|
||||||
|
|
||||||
@push('scripts')
|
if (file) {
|
||||||
<script>
|
const reader = new FileReader();
|
||||||
// FUNGSI PREVIEW UNIVERSAL (Bisa untuk Create & Edit)
|
reader.onload = function(e) {
|
||||||
function previewImage(input, previewId, placeholderId) {
|
preview.src = e.target.result;
|
||||||
const preview = document.getElementById(previewId);
|
preview.classList.remove('d-none');
|
||||||
const placeholder = document.getElementById(placeholderId);
|
if (placeholder) placeholder.classList.add('d-none');
|
||||||
const file = input.files[0];
|
|
||||||
|
|
||||||
if (file) {
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.onload = function(e) {
|
|
||||||
preview.src = e.target.result;
|
|
||||||
preview.classList.remove('d-none');
|
|
||||||
if (placeholder) placeholder.classList.add('d-none');
|
|
||||||
}
|
|
||||||
reader.readAsDataURL(file);
|
|
||||||
}
|
}
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
function clearBackdrop() {
|
||||||
|
const backdrops = document.querySelectorAll('.modal-backdrop');
|
||||||
|
backdrops.forEach(b => b.remove());
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
// Error Create Paket Foto
|
||||||
function clearBackdrop() {
|
@if (session('error_modal') === 'createFoto')
|
||||||
const backdrops = document.querySelectorAll('.modal-backdrop');
|
new bootstrap.Modal(document.getElementById('createFoto')).show();
|
||||||
backdrops.forEach(b => b.remove());
|
@endif
|
||||||
document.body.classList.remove('modal-open');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Error Create Paket Foto
|
// Error Create Additional
|
||||||
@if (session('error_modal') === 'createFoto')
|
@if (session('error_modal') === 'createAdd')
|
||||||
new bootstrap.Modal(document.getElementById('createFoto')).show();
|
new bootstrap.Modal(document.getElementById('createAdd')).show();
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
// Error Create Additional
|
// Error Edit Paket Foto
|
||||||
@if (session('error_modal') === 'createAdd')
|
@if (session('error_id_foto'))
|
||||||
new bootstrap.Modal(document.getElementById('createAdd')).show();
|
clearBackdrop();
|
||||||
@endif
|
new bootstrap.Modal(document.getElementById("editFoto{{ session('error_id_foto') }}")).show();
|
||||||
|
@endif
|
||||||
|
|
||||||
// Error Edit Paket Foto
|
// Error Edit Additional
|
||||||
@if (session('error_id_foto'))
|
@if (session('error_id_add'))
|
||||||
clearBackdrop();
|
clearBackdrop();
|
||||||
new bootstrap.Modal(document.getElementById("editFoto{{ session('error_id_foto') }}")).show();
|
new bootstrap.Modal(document.getElementById("editAdd{{ session('error_id_add') }}")).show();
|
||||||
@endif
|
@endif
|
||||||
|
});
|
||||||
|
|
||||||
// Error Edit Additional
|
// MODAL SHOW IMG
|
||||||
@if (session('error_id_add'))
|
function showImage(src) {
|
||||||
clearBackdrop();
|
var modalImg = document.getElementById('img-preview-target');
|
||||||
new bootstrap.Modal(document.getElementById("editAdd{{ session('error_id_add') }}")).show();
|
modalImg.src = src;
|
||||||
@endif
|
new bootstrap.Modal(document.getElementById('modalImagePreview')).show();
|
||||||
});
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
// MODAL SHOW IMG
|
|
||||||
function showImage(src) {
|
|
||||||
var modalImg = document.getElementById('img-preview-target');
|
|
||||||
modalImg.src = src;
|
|
||||||
new bootstrap.Modal(document.getElementById('modalImagePreview')).show();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue