done -> testing in production
@ -418,6 +418,7 @@ class CustomerController extends Controller
|
||||
'od.harga_satuan',
|
||||
'od.status_order as status_order_detail',
|
||||
'od.catatan',
|
||||
'od.total_kalori',
|
||||
DB::raw('COALESCE(mm.nama_menu, mcu.nama_mcu) as nama_item'),
|
||||
'mm.foto as foto'
|
||||
)
|
||||
@ -462,7 +463,8 @@ class CustomerController extends Controller
|
||||
'jumlah' => $item->jumlah,
|
||||
'harga_satuan' => $item->harga_satuan,
|
||||
'status_order' => $item->status_order_detail,
|
||||
'catatan' => $item->catatan ?? '-'
|
||||
'catatan' => $item->catatan ?? '-',
|
||||
'total_kalori' => $item->total_kalori
|
||||
// tambahkan field tambahan jika diperlukan
|
||||
];
|
||||
})->values(),
|
||||
|
||||
BIN
public/gambar/1VhHxJmuroGL7z6.jpg
Normal file
|
After Width: | Height: | Size: 140 KiB |
BIN
public/gambar/3Y3Ez9eazDjltwU.jpg
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
public/gambar/6cphK0gBVbdDpy7.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
public/gambar/BDyQv2C3ZJstYk5.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
public/gambar/BcQLFyCRKbD7fGm.jpg
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
public/gambar/BhVLQcmU0pVMzQ5.jpg
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
public/gambar/DA1gXOOK4cMnL65.jpg
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
public/gambar/DX8Ev2haNMqhqgq.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
public/gambar/EcyHylUTMAVohMF.jpg
Normal file
|
After Width: | Height: | Size: 140 KiB |
BIN
public/gambar/MIBkGAo6Wsv5U8J.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
public/gambar/NWj9s7XJsEznf32.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
public/gambar/Nmq2csw3jlvDbFn.jpg
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
public/gambar/OfSOkI4v8QOFLDQ.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
public/gambar/Ukd0oblLPOj2gGk.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
public/gambar/V47AjynduyGYBKJ.jpg
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
public/gambar/ZyRXajWB3BFyCIJ.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
public/gambar/c8RrP9pmbFQ5wPd.jpg
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
public/gambar/cG1OGeEi5XzhUOK.jpg
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
public/gambar/clLvziFQZnHVnMq.jpg
Normal file
|
After Width: | Height: | Size: 195 KiB |
BIN
public/gambar/d8ASQ3mkBbAkjPR.jpg
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
public/gambar/dAVbOJQeJnGogUg.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
public/gambar/m0UEA7GZ3eqH6yZ.jpg
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
public/gambar/sKEpPVmmXHGH42e.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
public/gambar/sjFBBFhx2wpSuE8.jpg
Normal file
|
After Width: | Height: | Size: 175 KiB |
BIN
public/gambar/teCc2Q88QGhBUQL.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
public/gambar/ui9A9mjwVaZq2hj.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
public/gambar/vajeyxcmaRf6JR3.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
public/gambar/yugmkzUNtvyoKXG.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
public/gambar/zc8vn0ZMLirPaAJ.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
@ -348,7 +348,7 @@ function renderCartSummary() {
|
||||
<option disabled selected>Pilih Karbohidrat</option>
|
||||
${(karhohidrats || []).map(k => `
|
||||
<option value="${k.karbohidrat_id}" ${p.karbohidrat_id === k.karbohidrat_id ? 'selected' : ''} data-kalori=${k.nilai_kalori}>
|
||||
${k.nama_karbohidrat} ${k.nilai_kalori ? `(${k.nilai_kalori} kkal)` : ''}
|
||||
${k.nama_karbohidrat} ${k.nilai_kalori ? `(${k.nilai_kalori} kal)` : ''}
|
||||
</option>
|
||||
`).join('')}
|
||||
</select>
|
||||
@ -425,14 +425,14 @@ function renderCartSummary() {
|
||||
|
||||
const itemHTML = `
|
||||
<div class="card mb-3 shadow-sm position-relative">
|
||||
<button type="button" class="btn btn-sm btn-outline-danger position-absolute top-0 end-0 m-2" onClick="removeCartItem(${item.id})" style="z-index:1;">
|
||||
<button type="button" class="btn btn-sm btn-danger position-absolute top-0 end-0 m-2" onClick="removeCartItem(${item.id})" style="z-index:1;">
|
||||
Hapus
|
||||
</button>
|
||||
<div class="d-flex flex-column flex-md-row">
|
||||
|
||||
<div class="p-2 d-flex justify-content-center align-items-center" style="flex: 0 0 300px;">
|
||||
<img src="gambar/${item.foto || 'default.jpg'}" alt="${item.nama_menu}"
|
||||
class="img-fluid rounded" style="max-height: 180px; width: 100%; object-fit: cover;">
|
||||
class="img-fluid rounded" style="max-height: 280px; width: 100%; object-fit: cover;">
|
||||
</div>
|
||||
|
||||
<div class="flex-grow-1 position-relative">
|
||||
@ -452,7 +452,7 @@ function renderCartSummary() {
|
||||
|
||||
<div class="mb-2 small text-muted"><strong>Silahkan isi tanggal pemesanan, pilih karbohidrat dan catatan pemesanan (opsional) yang diinginkan</strong></div>
|
||||
${pesananHTML}
|
||||
|
||||
ilahkan isi tanggal pemesanan, pilih karbohidrat dan catatan pemesanan (opsional) yang diinginkan
|
||||
<div class="mt-3 d-flex justify-content-between align-items-center flex-wrap gap-2">
|
||||
<button class="btn btn-sm btn-outline-success"
|
||||
onclick="addOrderDate(${item.id}, ${item.apakah_menu_sore})">
|
||||
@ -505,7 +505,8 @@ function onTanggalChange(itemId, index) {
|
||||
function onKarbohidratChange(itemId, index, el, kalori){
|
||||
const selectedOption = el.options[el.selectedIndex];
|
||||
const kaloriOption = parseInt(selectedOption.getAttribute('data-kalori')) || 0;
|
||||
const kaloriMenuInt = parseInt(kalori) || 0;
|
||||
|
||||
const kaloriMenuInt = kalori || 0;
|
||||
|
||||
const totalKalori = kaloriOption + kaloriMenuInt;
|
||||
const kaloriEl = document.getElementById(`kalori_${itemId}_${index}`);
|
||||
@ -516,7 +517,7 @@ function onKarbohidratChange(itemId, index, el, kalori){
|
||||
let cart = JSON.parse(sessionStorage.getItem('cart') || '[]');
|
||||
const input = document.querySelector(`div[data-item-id='${itemId}'][data-index='${index}'] .karbohidrat-input`);
|
||||
cart.find(item => item.id === itemId).pesanan[index].karbohidrat_id = parseInt(input.value);
|
||||
cart.find(item => item.id === itemId).pesanan[index].resultKalori = parseInt(totalKalori);
|
||||
cart.find(item => item.id === itemId).pesanan[index].resultKalori = totalKalori;
|
||||
sessionStorage.setItem('cart', JSON.stringify(cart));
|
||||
}
|
||||
|
||||
|
||||
@ -222,8 +222,9 @@ document.getElementById('formMasterMenu').addEventListener('submit', function(e)
|
||||
const allFormSetsBeforSubmit = document.querySelectorAll('.form-set');
|
||||
|
||||
for (let i = 0; i < allFormSetsBeforSubmit.length; i++) {
|
||||
const checkSiang = allFormSetsBeforSubmit[i].querySelector(`input[name="data[${i}][apakah_menu_siang]"]`);
|
||||
const checkSore = allFormSetsBeforSubmit[i].querySelector(`input[name="data[${i}][apakah_menu_sore]"]`);
|
||||
|
||||
const checkSiang = allFormSetsBeforSubmit[i].querySelector(`input[name*="[apakah_menu_siang]"]`);
|
||||
const checkSore = allFormSetsBeforSubmit[i].querySelector(`input[name*="[apakah_menu_sore]"]`);
|
||||
|
||||
if (!checkSiang?.checked && !checkSore?.checked) {
|
||||
e.preventDefault();
|
||||
|
||||
@ -91,7 +91,9 @@
|
||||
},
|
||||
{
|
||||
title:"Nama Menu",
|
||||
field:"nama_menu",
|
||||
formatter:function(value, row){
|
||||
return row?.kalori[0]?.nilai_kalori ? row?.nama_menu + ' ' + '(' + row?.kalori[0]?.nilai_kalori + ' kal)' : row?.nama_menu
|
||||
},
|
||||
width: 300
|
||||
},
|
||||
{
|
||||
|
||||
@ -94,18 +94,6 @@ let orderIndex = 0;
|
||||
$('#cartTotal').text('Rp ' + total.toLocaleString('id-ID'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function renderCartTotalOnly() {
|
||||
const cart = JSON.parse(sessionStorage.getItem('cart') || '[]');
|
||||
let total = 0;
|
||||
|
||||
@ -19,6 +19,9 @@ function detailOrder(id){
|
||||
<div class="${data?.order?.jenis_customer === "MCU" ? 'col-md-12' : 'col-md-7 p-1'}">
|
||||
<p class="mb-1">Nama Menu: <strong>${data?.menu?.nama_menu || data?.master_mcu?.nama_mcu}</strong></p>
|
||||
<p class="mb-1">Tanggal Antar: <span>${data?.tgl_antar || 0}</span></p>
|
||||
${data?.total_kalori ? `
|
||||
<p class="mb-1">Total Kalori: <span>${data?.total_kalori} kal</span></p>
|
||||
` : ''}
|
||||
<p class="mb-1">Jumlah: <span>${data?.jumlah || 0}</span></p>
|
||||
<p class="mb-1">Harga Satuan: <strong>Rp ${parseInt(data?.harga_satuan || 0).toLocaleString('id-ID')}</strong></p>
|
||||
<p class="mb-1">Status Pesanan:
|
||||
|
||||
@ -226,7 +226,7 @@ function detailOrder(id){
|
||||
<p class="mb-1">Nama Menu: <strong>${data?.menu?.nama_menu || data?.master_mcu?.nama_mcu}</strong></p>
|
||||
<p class="mb-1">Tanggal Antar: <span>${data?.tgl_antar || 0}</span></p>
|
||||
<p class="mb-1">Jumlah: <span>${data?.jumlah || 0}</span></p>
|
||||
${data?.total_kalori ? `<p class="mb-1">Jumlah: <span>${data?.total_kalori || 0} kal</span></p>` : ''}
|
||||
${data?.total_kalori ? `<p class="mb-1">Total Kalori: <span>${data?.total_kalori || 0} kal</span></p>` : ''}
|
||||
<p class="mb-1">Harga Satuan: <strong>Rp ${parseInt(data?.harga_satuan || 0).toLocaleString('id-ID')}</strong></p>
|
||||
<p class="mb-1">Status Pesanan:
|
||||
<span class="badge text-dark ${data?.status_order === 'Selesai' ? 'bg-success' : 'bg-warning'}">
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
}
|
||||
.info td {
|
||||
padding: 0 1px;
|
||||
padding: 2px 5px;
|
||||
vertical-align: top;
|
||||
font-size: 10px;
|
||||
}
|
||||
@ -94,17 +94,27 @@
|
||||
@endif
|
||||
<tr><td>Pesanan</td>
|
||||
<td>
|
||||
<div style="max-width: 54mm; word-wrap: break-word; white-space: normal; display: block;">
|
||||
: {{ $label?->masterMcu?->nama_mcu ?? $label?->menu?->nama_menu }}
|
||||
</div>
|
||||
<span style="vertical-align: top;">:</span>
|
||||
<span style="max-width: 54mm; word-wrap: break-word; white-space: normal; display: inline-block; vertical-align: top;">
|
||||
{{ $label?->masterMcu?->nama_mcu ?? $label?->menu?->nama_menu }}
|
||||
</span>
|
||||
</td></tr>
|
||||
<tr><td>Total Kalori</td><td>: {{ isset($label->total_kalori) ? $label->total_kalori . ' (kal)' : '-' }}</td></tr>
|
||||
<tr><td>Total Kalori</td><td>: {{ isset($label->total_kalori) ? $label->total_kalori . ' kal' : '-' }}</td></tr>
|
||||
<tr><td>Harga Satuan</td><td>: Rp {{ number_format($label?->harga_satuan, 0, ',', '.') }}</td></tr>
|
||||
<tr><td>Tanggal Produksi</td><td>: {{ $label?->tgl_antar ?? '-' }}</td></tr>
|
||||
<tr><td>Tanggal Produksi</td><td>: {{ $label?->tgl_antar ? \Carbon\Carbon::parse($label->tgl_antar)->translatedFormat('d F Y') : '-' }} </td></tr>
|
||||
<tr><td>No. Telp</td><td>: {{ $label?->order?->no_wa ?? '-' }}</td></tr>
|
||||
@if($label?->order?->alamat)
|
||||
<tr><td>Alamat</td><td>: {{ $label?->order?->alamat }}</td></tr>
|
||||
@if ($label?->order?->alamat)
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Alamat</td>
|
||||
<td><span style="vertical-align: top;">:</span>
|
||||
<span style="max-width: 54mm; word-wrap: break-word; white-space: normal; display: inline-block; vertical-align: top;">
|
||||
{{ $label?->order?->alamat }}
|
||||
</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</table>
|
||||
|
||||
<div class="footer">
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
<!-- fontawosome CSS -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<link rel="stylesheet" href="{{ ver('/assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css') }}../" />
|
||||
{{-- flatcpicker css --}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
@ -83,6 +83,9 @@
|
||||
<div class="card-body py-2 px-3 mt-2">
|
||||
<h6 class="card-title mb-1">${item.nama_item}</h6>
|
||||
<p class="mb-1 small text-muted">Tgl Antar: <strong>${item.tgl_antar}</strong></p>
|
||||
${item?.total_kalori ? `
|
||||
<p class="mb-1 small text-muted">Total Kalori: <strong>${item?.total_kalori || '-'} kal</strong></p>
|
||||
` : ''}
|
||||
<p class="mb-1 small">Harga: <strong>${harga.toLocaleString('id-ID')}</strong></p>
|
||||
<p class="mb-1 small">Jumlah: <strong>${jumlah}</strong></p>
|
||||
<p class="mb-0 small">Total: <strong class="text-success">Rp ${total.toLocaleString('id-ID')}</strong></p>
|
||||
|
||||
@ -23,15 +23,15 @@
|
||||
<div class="col-12 mb-2">
|
||||
<h6 class="fw-bold text-muted mb-1">
|
||||
Pilih Tanggal Makanan
|
||||
<a tabindex="0" class="ms-1 text-decoration-none" role="button" data-bs-toggle="popover" data-bs-trigger="focus"
|
||||
<a tabindex="0" class="text-decoration-none" role="button" data-bs-toggle="popover" data-bs-trigger="focus"
|
||||
title="Panduan"
|
||||
data-bs-content="Pilih rentang tanggal untuk melihat daftar menu yang tersedia pada tanggal tersebut.">
|
||||
<i class="fa fa-info-circle text-secondary"></i>
|
||||
</a>
|
||||
</h6>
|
||||
|
||||
<div class="input-group input-group-sm mb-2" style="max-width: 350px;">
|
||||
<span class="input-group-text bg-white px-2">
|
||||
<div class="input-group input-group-sm mb-2" style="max-width: 450px;">
|
||||
<span class="input-group-text bg-white px-1">
|
||||
<i class="fa fa-calendar-alt text-primary"></i>
|
||||
</span>
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
<div class="fw-bold mb-2">
|
||||
<i class="fa fa-info-circle me-1"></i>Informasi
|
||||
</div>
|
||||
<ul class="mb-0 ps-3">
|
||||
<ul class="mb-0 ps-3 pe-3">
|
||||
<li>
|
||||
Butuh bantuan? Hubungi WhatsApp <strong>Instalasi Gizi</strong>:
|
||||
<a href="https://wa.me/08815611382 " target="_blank">08815611382 </a> <br>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="container position-relative d-flex align-items-center justify-content-between">
|
||||
<a href="/" class="logo d-flex align-items-center me-auto">
|
||||
<!-- Uncomment the line below if you also wish to use an image logo -->
|
||||
<img src="/logo/logo_rsabhk.png" width="170" alt="Logo RSAB HARAPAN KITA" class="logo-img">
|
||||
<img src="/logo/logo_rsabhk.png" alt="Logo RSAB HARAPAN KITA" class="logo-img">
|
||||
<h1 class="sitename"></h1>
|
||||
</a>
|
||||
|
||||
|
||||