Compare commits
No commits in common. "42581b13ce846d3c033d8a581de993d1d7036f80" and "0b1cba14654624adfe7b0d22772894d9daa64a84" have entirely different histories.
42581b13ce
...
0b1cba1465
@ -285,7 +285,7 @@ class CustomerController extends Controller
|
|||||||
'entry_at' => Carbon::now()->format('Y-m-d H:i:s.u'),
|
'entry_at' => Carbon::now()->format('Y-m-d H:i:s.u'),
|
||||||
];
|
];
|
||||||
if($jenisCustomer === "Karyawan RSAB Harapan Kita"){
|
if($jenisCustomer === "Karyawan RSAB Harapan Kita"){
|
||||||
$nip_pns = Karyawan::where('namalengkap',$biodataResult['nama_pemesan'])->first()?->nip_pns;
|
$nip_pns = Karyawan::where('namalengkap',$biodataResult['nama_pemesan'])->first()->nip_pns;
|
||||||
$payloadOrder['nip'] = $nip_pns ?? null;
|
$payloadOrder['nip'] = $nip_pns ?? null;
|
||||||
$payloadOrder['bagian_instalasi'] = $biodataResult['bagian_instalasi'] ?? null;
|
$payloadOrder['bagian_instalasi'] = $biodataResult['bagian_instalasi'] ?? null;
|
||||||
$payloadOrder['no_ekstensien'] = $biodataResult['no_ekstensien'] ?? null;
|
$payloadOrder['no_ekstensien'] = $biodataResult['no_ekstensien'] ?? null;
|
||||||
@ -317,12 +317,7 @@ class CustomerController extends Controller
|
|||||||
}
|
}
|
||||||
//code...
|
//code...
|
||||||
if($order->email){
|
if($order->email){
|
||||||
try {
|
|
||||||
Mail::to($order->email)->send(new NotifikasiCustomer($order->nama_pemesan, $order->no_order, $order->total_harga));
|
Mail::to($order->email)->send(new NotifikasiCustomer($order->nama_pemesan, $order->no_order, $order->total_harga));
|
||||||
} catch (\Throwable $th) {
|
|
||||||
//throw $th;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
DB::connection('dbOrderGizi')->commit();
|
DB::connection('dbOrderGizi')->commit();
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@ -380,15 +375,7 @@ class CustomerController extends Controller
|
|||||||
$order->update($payload);
|
$order->update($payload);
|
||||||
|
|
||||||
if($order->email){
|
if($order->email){
|
||||||
try {
|
Mail::to($order->email)->send(new NotifikasiPembayaran($order->nama_pemesan, $order->no_order));
|
||||||
Mail::to($order->email)->send(
|
|
||||||
new NotifikasiPembayaran($order->nama_pemesan, $order->no_order)
|
|
||||||
);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
// log error biar bisa ditelusuri nanti
|
|
||||||
// \Log::error('Gagal mengirim email ke ' . $order->email . ': ' . $e->getMessage());
|
|
||||||
// continue tanpa break flow
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DB::connection('dbOrderGizi')->commit();
|
DB::connection('dbOrderGizi')->commit();
|
||||||
session()->flash('payment_success', true);
|
session()->flash('payment_success', true);
|
||||||
|
|||||||
@ -122,12 +122,7 @@ class PesananController extends Controller
|
|||||||
$order->update($payload);
|
$order->update($payload);
|
||||||
|
|
||||||
if($order->email){
|
if($order->email){
|
||||||
try {
|
|
||||||
//code...
|
|
||||||
Mail::to($order->email)->send(new NotifikasiKonfirmasiPembayaran($order->nama_pemesan, $order->no_order, $order->total_harga));
|
Mail::to($order->email)->send(new NotifikasiKonfirmasiPembayaran($order->nama_pemesan, $order->no_order, $order->total_harga));
|
||||||
} catch (\Throwable $th) {
|
|
||||||
//throw $th;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::connection('dbOrderGizi')->commit();
|
DB::connection('dbOrderGizi')->commit();
|
||||||
|
|||||||
@ -241,21 +241,18 @@ function toggleCustomerFields() {
|
|||||||
$nama.val('')
|
$nama.val('')
|
||||||
$nama.removeClass('form-control')
|
$nama.removeClass('form-control')
|
||||||
$("#help_nama_pemesan").removeClass('d-none')
|
$("#help_nama_pemesan").removeClass('d-none')
|
||||||
$("#help_email_karyawan").removeClass('d-none')
|
|
||||||
selectKaryawan(); // inisialisasi ulang selectize
|
selectKaryawan(); // inisialisasi ulang selectize
|
||||||
break;
|
break;
|
||||||
case 'Keluarga Pasien / Penunggu Pasien':
|
case 'Keluarga Pasien / Penunggu Pasien':
|
||||||
$('.pasien').show();
|
$('.pasien').show();
|
||||||
$nama.addClass('form-control')
|
$nama.addClass('form-control')
|
||||||
$("#help_nama_pemesan").addClass('d-none')
|
$("#help_nama_pemesan").addClass('d-none')
|
||||||
$("#help_email_karyawan").addClass('d-none')
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: // Masyarakat Umum
|
default: // Masyarakat Umum
|
||||||
$('.umum').show();
|
$('.umum').show();
|
||||||
$nama.addClass('form-control')
|
$nama.addClass('form-control')
|
||||||
$("#help_nama_pemesan").addClass('d-none')
|
$("#help_nama_pemesan").addClass('d-none')
|
||||||
$("#help_email_karyawan").addClass('d-none')
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -746,6 +743,8 @@ function validateCartBeforeSubmit() {
|
|||||||
cart.forEach((item, index) => {
|
cart.forEach((item, index) => {
|
||||||
const pesananList = item.pesanan || [];
|
const pesananList = item.pesanan || [];
|
||||||
pesananList.forEach((pesanan, i) => {
|
pesananList.forEach((pesanan, i) => {
|
||||||
|
console.log(!pesanan.karbohidrat_id, !item?.apakah_someday);
|
||||||
|
|
||||||
if (!pesanan.tgl) {
|
if (!pesanan.tgl) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
errorMessage = `Tanggal belum diisi pada item "${item.nama_menu}" (baris ${i + 1})`;
|
errorMessage = `Tanggal belum diisi pada item "${item.nama_menu}" (baris ${i + 1})`;
|
||||||
@ -785,42 +784,20 @@ function hitungTotalHarga(){
|
|||||||
function copyNoRek() {
|
function copyNoRek() {
|
||||||
const text = document.getElementById('noRekText').innerText;
|
const text = document.getElementById('noRekText').innerText;
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
Swal.fire({
|
alert("Nomor rekening berhasil disalin: " + text);
|
||||||
icon: 'success',
|
|
||||||
title: 'Disalin!',
|
|
||||||
text: 'Nomor rekening berhasil disalin: ' + text,
|
|
||||||
showConfirmButton: false,
|
|
||||||
timer: 1500
|
|
||||||
});
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('Gagal menyalin: ', err);
|
console.error('Gagal menyalin: ', err);
|
||||||
Swal.fire({
|
alert("Gagal menyalin teks.");
|
||||||
icon: 'warning',
|
|
||||||
text: 'Gagal menyalin teks: ' + text,
|
|
||||||
showConfirmButton: false,
|
|
||||||
timer: 2000
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyNoOrder() {
|
function copyNoOrder() {
|
||||||
const text = document.getElementById('no_order_display').innerText;
|
const text = document.getElementById('no_order_display').innerText;
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
Swal.fire({
|
alert("Nomor order berhasil disalin: " + text);
|
||||||
icon: 'success',
|
|
||||||
title: 'Disalin!',
|
|
||||||
text: 'Nomor order berhasil disalin: ' + text,
|
|
||||||
showConfirmButton: false,
|
|
||||||
timer: 1500
|
|
||||||
});
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('Gagal menyalin: ', err);
|
console.error('Gagal menyalin: ', err);
|
||||||
Swal.fire({
|
alert("Gagal menyalin teks.");
|
||||||
icon: 'warning',
|
|
||||||
text: 'Gagal menyalin teks: ' + text,
|
|
||||||
showConfirmButton: false,
|
|
||||||
timer: 2000
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -857,13 +834,12 @@ function initFlatpickrTersedia(item, i) {
|
|||||||
dayNumbers.forEach(day => {
|
dayNumbers.forEach(day => {
|
||||||
const dayStr = String(day).padStart(2, '0');
|
const dayStr = String(day).padStart(2, '0');
|
||||||
const fullDateStr = `${year}-${month}-${dayStr}`;
|
const fullDateStr = `${year}-${month}-${dayStr}`;
|
||||||
const fullDate = new Date(`${fullDateStr}T13:00:00`);
|
const fullDate = new Date(`${fullDateStr}T00:00:00`);
|
||||||
|
|
||||||
// Jika bukan menu someday, cek aturan H-1 dan jam batas
|
// Jika bukan menu someday, cek aturan H-1 dan jam batas
|
||||||
if (item.apakah_someday) {
|
if (item.apakah_someday) {
|
||||||
availableDates.push(fullDateStr);
|
availableDates.push(fullDateStr);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const selisihHari = Math.floor((fullDate - now) / (1000 * 60 * 60 * 24));
|
const selisihHari = Math.floor((fullDate - now) / (1000 * 60 * 60 * 24));
|
||||||
if (selisihHari >= 1 || (selisihHari === 1 && !lewatBatasNormal)) {
|
if (selisihHari >= 1 || (selisihHari === 1 && !lewatBatasNormal)) {
|
||||||
availableDates.push(fullDateStr);
|
availableDates.push(fullDateStr);
|
||||||
@ -905,6 +881,7 @@ function increment(itemId, index) {
|
|||||||
function decrement(itemId, index) {
|
function decrement(itemId, index) {
|
||||||
const input = document.getElementById(`jumlah-${itemId}-${index}`);
|
const input = document.getElementById(`jumlah-${itemId}-${index}`);
|
||||||
let current = parseInt(input.value || "0");
|
let current = parseInt(input.value || "0");
|
||||||
|
console.log(current);
|
||||||
|
|
||||||
if (current > 1) {
|
if (current > 1) {
|
||||||
input.value = current - 1;
|
input.value = current - 1;
|
||||||
@ -980,6 +957,7 @@ document.getElementById('submitNote').addEventListener('click', function(e){
|
|||||||
const noted = $("#note_order").val()
|
const noted = $("#note_order").val()
|
||||||
const cart = JSON.parse(sessionStorage.getItem('cart') || '[]');
|
const cart = JSON.parse(sessionStorage.getItem('cart') || '[]');
|
||||||
const item =cart.find(item => item.id === id)
|
const item =cart.find(item => item.id === id)
|
||||||
|
console.log(id, index, item);
|
||||||
|
|
||||||
if(item && item.pesanan && item.pesanan[index]){
|
if(item && item.pesanan && item.pesanan[index]){
|
||||||
item.pesanan[index].catatan = noted
|
item.pesanan[index].catatan = noted
|
||||||
@ -1007,13 +985,7 @@ function selectKaryawan(){
|
|||||||
valueField: 'label', // sama dengan labelField
|
valueField: 'label', // sama dengan labelField
|
||||||
labelField: 'label',
|
labelField: 'label',
|
||||||
searchField: ['label'],
|
searchField: ['label'],
|
||||||
create: function(input) {
|
create: false,
|
||||||
return {
|
|
||||||
label: input,
|
|
||||||
value: input
|
|
||||||
};
|
|
||||||
},
|
|
||||||
createOnBlur: true,
|
|
||||||
placeholder: "Cari nama karyawan...",
|
placeholder: "Cari nama karyawan...",
|
||||||
maxItems: 1,
|
maxItems: 1,
|
||||||
load: function (query, callback) {
|
load: function (query, callback) {
|
||||||
|
|||||||
@ -148,12 +148,9 @@
|
|||||||
@if($label->total_kalori)
|
@if($label->total_kalori)
|
||||||
<tr><td>Total Kalori</td><td>: {{ $label->total_kalori }}</td></tr>
|
<tr><td>Total Kalori</td><td>: {{ $label->total_kalori }}</td></tr>
|
||||||
@endif
|
@endif
|
||||||
<tr><td>Catatan</td>
|
@if($label->order?->jenis_customer !== 'MCU')
|
||||||
<td><span style="vertical-align: top;">:</span>
|
<tr><td>Harga Satuan</td><td>: Rp {{ number_format($label?->harga_satuan, 0, ',', '.') }}</td></tr>
|
||||||
<span style="max-width: 54mm; word-wrap: break-word; white-space: normal; display: inline-block; vertical-align: top;">
|
@endif
|
||||||
{{ $label?->catatan ?? '-' }}
|
|
||||||
</span></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>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>
|
<tr><td>No. Telp</td><td>: {{ $label?->order?->no_wa ?? '-' }}</td></tr>
|
||||||
@if ($label?->order?->alamat)
|
@if ($label?->order?->alamat)
|
||||||
|
|||||||
@ -75,6 +75,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
th:nth-child(6), td:nth-child(6) {
|
th:nth-child(6), td:nth-child(6) {
|
||||||
|
width: 110px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +126,6 @@
|
|||||||
<th>Waktu Makan <br/> /Jam Layanan</th>
|
<th>Waktu Makan <br/> /Jam Layanan</th>
|
||||||
<th>Menu</th>
|
<th>Menu</th>
|
||||||
<th>Karbohidrat</th>
|
<th>Karbohidrat</th>
|
||||||
<th>Catatan</th>
|
|
||||||
<th>Total Kalori</th>
|
<th>Total Kalori</th>
|
||||||
<th>Keterangan</th>
|
<th>Keterangan</th>
|
||||||
<th>Jumlah</th>
|
<th>Jumlah</th>
|
||||||
@ -157,7 +157,6 @@
|
|||||||
-
|
-
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $row['catatan'] ? $row['catatan'] . ' kal' : '' }}</td>
|
|
||||||
<td>{{ $row['total_kalori'] ? $row['total_kalori'] . ' kal' : '' }}</td>
|
<td>{{ $row['total_kalori'] ? $row['total_kalori'] . ' kal' : '' }}</td>
|
||||||
<td class="keterangan">
|
<td class="keterangan">
|
||||||
@php
|
@php
|
||||||
|
|||||||
@ -50,7 +50,6 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="form-label">Email <span class="text-danger">*</span></label>
|
<label class="form-label">Email <span class="text-danger">*</span></label>
|
||||||
<input type="email" class="form-control" name="email" id="email" required>
|
<input type="email" class="form-control" name="email" id="email" required>
|
||||||
<div id="help_email_karyawan" class="form-text d-none">Notifikasi dari sistem belum dapat dikirim ke email dengan domain @rsabhk.co.id, oleh karena itu karyawan disarankan memakai alamat email lain</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="col-md-6">
|
{{-- <div class="col-md-6">
|
||||||
<label class="form-label">Tanggal Lahir</label>
|
<label class="form-label">Tanggal Lahir</label>
|
||||||
@ -82,9 +81,8 @@
|
|||||||
<option value="Ruang Cempaka">Ruang Cempaka</option>
|
<option value="Ruang Cempaka">Ruang Cempaka</option>
|
||||||
<option value="Ruang Widuri">Ruang Widuri</option>
|
<option value="Ruang Widuri">Ruang Widuri</option>
|
||||||
<option value="Ruang Teratai">Ruang Teratai</option>
|
<option value="Ruang Teratai">Ruang Teratai</option>
|
||||||
<option value="Ruang Anggrek">Ruang Anggrek</option>
|
<option value="Klinik Anggrek">Klinik Melati</option>
|
||||||
<option value="Ruang VK">Ruang VK</option>
|
<option value="Ruang VK">Ruang VK</option>
|
||||||
<option value="Klinik Melati">Klinik Melati</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -100,7 +98,7 @@
|
|||||||
<option value="VIP A">VIP A</option>
|
<option value="VIP A">VIP A</option>
|
||||||
<option value="VIP B">VIP B</option>
|
<option value="VIP B">VIP B</option>
|
||||||
<option value="Kelas I">Kelas I</option>
|
<option value="Kelas I">Kelas I</option>
|
||||||
<option value="Klinik Melati">Klinik Melati</option>
|
<option value="Mesa Tesa">Mesa Tesa</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{-- End Pasien --}}
|
{{-- End Pasien --}}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="card shadow-sm p-4">
|
<div class="card shadow-sm p-4">
|
||||||
<div class="row justify-content-center text-center">
|
<div class="row justify-content-center text-center">
|
||||||
<div class="col-12 col-sm-10 col-md-8 col-lg-6 mb-3">
|
<div class="col-12 col-sm-10 col-md-8 col-lg-6 mb-3">
|
||||||
<img src="/gambar/qris.jpg" alt="Pembayaran"
|
<img src="gambar/qris.jpg" alt="Pembayaran"
|
||||||
class="img-fluid rounded shadow w-100"
|
class="img-fluid rounded shadow w-100"
|
||||||
style="max-width: 500px; height: auto;">
|
style="max-width: 500px; height: auto;">
|
||||||
</div>
|
</div>
|
||||||
@ -35,13 +35,13 @@
|
|||||||
<!-- Bank -->
|
<!-- Bank -->
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-md-6 col-sm-12 fw-semibold">Bank</div>
|
<div class="col-md-6 col-sm-12 fw-semibold">Bank</div>
|
||||||
<div class="col-md-6 col-sm-12 text-sm-end">Bank BRI</div>
|
<div class="col-md-6 col-sm-12 text-sm-end">Bank BCA</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Nama Rekening -->
|
<!-- Nama Rekening -->
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-md-6 col-sm-12 fw-semibold">Nama Rek.</div>
|
<div class="col-md-6 col-sm-12 fw-semibold">Nama Rek.</div>
|
||||||
<div class="col-md-6 col-sm-12 text-sm-end">RPL 182 RSAB HARKIT OPR BLU PENERIMAAN</div>
|
<div class="col-md-6 col-sm-12 text-sm-end">RSAB Harapan Kita</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- No Rek -->
|
<!-- No Rek -->
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<i class="fa fa-copy me-1"></i> Salin
|
<i class="fa fa-copy me-1"></i> Salin
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<strong id="noRekText" class="d-block text-sm-end">096201000073308</strong>
|
<strong id="noRekText" class="d-block text-sm-end">1234-5678-9101</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user