commit
8869d87ebb
|
|
@ -61,7 +61,7 @@ public function updateStatus(Request $request, $id)
|
|||
"- *Request:* {$req}\n" .
|
||||
"- *Ucapan:* \"{$ucapan}\"\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') {
|
||||
$msg = "Halo Kak *{$nama}*,\n\n" .
|
||||
"Mengenai pesanan Anda dengan Nomor Invoice: *{$invoice}* terpaksa kami *TOLAK* dikarenakan:\n\n" .
|
||||
|
|
|
|||
|
|
@ -156,62 +156,60 @@
|
|||
</section>
|
||||
@include('admin.paket-foto.partials.modal-create-foto')
|
||||
@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')
|
||||
<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];
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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() {
|
||||
function clearBackdrop() {
|
||||
const backdrops = document.querySelectorAll('.modal-backdrop');
|
||||
backdrops.forEach(b => b.remove());
|
||||
document.body.classList.remove('modal-open');
|
||||
}
|
||||
// Error Create Paket Foto
|
||||
@if (session('error_modal') === 'createFoto')
|
||||
new bootstrap.Modal(document.getElementById('createFoto')).show();
|
||||
@endif
|
||||
|
||||
// Error Create Paket Foto
|
||||
@if (session('error_modal') === 'createFoto')
|
||||
new bootstrap.Modal(document.getElementById('createFoto')).show();
|
||||
@endif
|
||||
// Error Create Additional
|
||||
@if (session('error_modal') === 'createAdd')
|
||||
new bootstrap.Modal(document.getElementById('createAdd')).show();
|
||||
@endif
|
||||
|
||||
// Error Create Additional
|
||||
@if (session('error_modal') === 'createAdd')
|
||||
new bootstrap.Modal(document.getElementById('createAdd')).show();
|
||||
@endif
|
||||
// Error Edit Paket Foto
|
||||
@if (session('error_id_foto'))
|
||||
clearBackdrop();
|
||||
new bootstrap.Modal(document.getElementById("editFoto{{ session('error_id_foto') }}")).show();
|
||||
@endif
|
||||
|
||||
// Error Edit Paket Foto
|
||||
@if (session('error_id_foto'))
|
||||
clearBackdrop();
|
||||
new bootstrap.Modal(document.getElementById("editFoto{{ session('error_id_foto') }}")).show();
|
||||
@endif
|
||||
// Error Edit Additional
|
||||
@if (session('error_id_add'))
|
||||
clearBackdrop();
|
||||
new bootstrap.Modal(document.getElementById("editAdd{{ session('error_id_add') }}")).show();
|
||||
@endif
|
||||
});
|
||||
|
||||
// Error Edit Additional
|
||||
@if (session('error_id_add'))
|
||||
clearBackdrop();
|
||||
new bootstrap.Modal(document.getElementById("editAdd{{ session('error_id_add') }}")).show();
|
||||
@endif
|
||||
});
|
||||
// MODAL SHOW IMG
|
||||
function showImage(src) {
|
||||
var modalImg = document.getElementById('img-preview-target');
|
||||
modalImg.src = src;
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue