From 66ec9806b34780a26db19f964716f24dbc7b65d9 Mon Sep 17 00:00:00 2001 From: Zelda Ababil Date: Thu, 1 Feb 2024 22:54:55 +0700 Subject: [PATCH] sudah semua --- resources/views/pages/Kasir/js.blade.php | 8 +- .../views/pages/Kasir/transaksi.blade.php | 219 ++++++++++-------- 2 files changed, 120 insertions(+), 107 deletions(-) diff --git a/resources/views/pages/Kasir/js.blade.php b/resources/views/pages/Kasir/js.blade.php index c5c8aa0..42b44ca 100644 --- a/resources/views/pages/Kasir/js.blade.php +++ b/resources/views/pages/Kasir/js.blade.php @@ -235,7 +235,7 @@ $('#modal-default').modal('hide'); } else { globalId++; - console.log(globalId); + // console.log(globalId); if (paketFreenya.length != 0) { if (paketFreenya.length == 3) { paketFreenyaini = 'FREEALL'; @@ -318,7 +318,7 @@ // delete menu from table and calculate qty and total price menu ordered function deleteMenu(params) { - console.log(params); + // console.log(params); var table = document.getElementById("order-menus"); var index = 0; @@ -363,7 +363,7 @@ // increment qty menu ordered function incrementMenu(params, nama_produk) { - console.log(params); + // console.log(params); var table = document.getElementById("order-menus"); var index = 0; @@ -1039,7 +1039,7 @@ // clear selected menus function clearSelected() { - console.log('batal'); + // console.log('batal'); for (var i = 0; i < selectedMenus.length; i++) { changeOrderedMenus(selectedMenus[i].id, 'batal'); menu_terpilih.innerHTML = ` `; diff --git a/resources/views/pages/Kasir/transaksi.blade.php b/resources/views/pages/Kasir/transaksi.blade.php index 39d285b..f33d67f 100644 --- a/resources/views/pages/Kasir/transaksi.blade.php +++ b/resources/views/pages/Kasir/transaksi.blade.php @@ -255,116 +255,127 @@ @else @foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) {{-- Jika paket irit --}} - @if ($kelompokKategoriPivot->kelompok_kategori_id == 9) - @if ( - $kelompokKategoriPivot->produk->tgl_start_promo <= \Carbon\Carbon::now() && - $kelompokKategoriPivot->produk->tgl_end_promo >= \Carbon\Carbon::now()) - @if ($kelompokKategoriPivot->produk->stok_promo === 0) -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
- {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} -
-
- + @switch($kelompokKategoriPivot->kelompok_kategori_id) + @case(9) + @if ( + $kelompokKategoriPivot->produk->tgl_start_promo <= \Carbon\Carbon::now() && + $kelompokKategoriPivot->produk->tgl_end_promo >= \Carbon\Carbon::now()) + @if ($kelompokKategoriPivot->produk->stok_promo === 0) + {{-- untuk promo aktif dan stok tersedia --}} +
+
+
+
+ {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
-
- @if ( - $kelompokKategoriPivot->produk->stok_promo != '' || - $kelompokKategoriPivot->produk->stok_promo != 0 || - $kelompokKategoriPivot->produk->stok_promo != null) -
Promo Tersisa: - {{ $kelompokKategoriPivot->produk->stok_promo ?? 0 }} -
- @endif +
+
+ {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
+
+ {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} +
+
+ +
+
+ @if ( + $kelompokKategoriPivot->produk->stok_promo != '' || + $kelompokKategoriPivot->produk->stok_promo != 0 || + $kelompokKategoriPivot->produk->stok_promo != null) +
Promo Tersisa: + {{ $kelompokKategoriPivot->produk->stok_promo ?? 0 }} +
+ @endif +
-
+ @else + {{-- untuk promo dengan stok kosong --}} +
+
+
+
+ {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
+
+
+
+ {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
+
+ {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} +
+
+
+ Pesan +
+
+
+ @if ( + $kelompokKategoriPivot->produk->stok_promo != '' || + $kelompokKategoriPivot->produk->stok_promo != 0 || + $kelompokKategoriPivot->produk->stok_promo != null) +
Promo Tersisa: + {{ $kelompokKategoriPivot->produk->stok_promo ?? 0 }} +
+ @endif +
+
+
+
+ @endif @else -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
- {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} -
-
-
- Pesan -
-
-
- @if ( - $kelompokKategoriPivot->produk->stok_promo != '' || - $kelompokKategoriPivot->produk->stok_promo != 0 || - $kelompokKategoriPivot->produk->stok_promo != null) -
Promo Tersisa: - {{ $kelompokKategoriPivot->produk->stok_promo ?? 0 }} -
- @endif -
-
-
-
+ {{-- untuk promo tidak aktif --}} + @if ($loop->last) + Tidak ada promo + @endif @endif - @endif - @else -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
-
-
- {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
-
- {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} -
-
+ @break + + @default + {{-- untuk semua menu selain paket --}} +
+
+
+
+ {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
+
+
- Pesan + {{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} +
+
+ {{ convert_to_rupiah($kelompokKategoriPivot->produk->harga_produk) }} +
+
+
+ Pesan +
-
- @endif + @endswitch @endforeach @endif
@@ -387,7 +398,8 @@
- +
@@ -450,7 +462,8 @@ @@ -463,8 +476,8 @@ class="form-control rounded-3 col-lg-6" placeholder="Nomor Pemesan" id="nomor-pemesan" oninput="inputNum(this)" required> + class="form-control rounded-3 mt-1" placeholder="Nomor Meja" + id="nomor-meja" required>
Menu
- +