@@ -32,9 +47,9 @@
Daftar Pesanan
@@ -48,7 +63,13 @@
Daftar Pesanan
function loadOrders() {
const orderList = document.getElementById('order-list');
- const orders = JSON.parse(localStorage.getItem('orders')) || [];
+ let orders = [];
+
+ try {
+ orders = JSON.parse(localStorage.getItem('orders')) || [];
+ } catch (e) {
+ console.error('Failed to load orders:', e);
+ }
// Sort orders by most recent first
orders.sort((a, b) => new Date(b.time) - new Date(a.time));
@@ -120,7 +141,14 @@
Daftar Pesanan
cancelButtonText: 'Batal'
}).then((result) => {
if (result.isConfirmed) {
- let orders = JSON.parse(localStorage.getItem('orders')) || [];
+ let orders = [];
+
+ try {
+ orders = JSON.parse(localStorage.getItem('orders')) || [];
+ } catch (e) {
+ console.error('Failed to load orders:', e);
+ }
+
orders = orders.filter(order => order.id !== orderId);
localStorage.setItem('orders', JSON.stringify(orders));
loadOrders();
@@ -134,6 +162,13 @@
Daftar Pesanan
});
};
});
+
+ const menuBtn = document.getElementById('menu-btn');
+ const mobileMenu = document.getElementById('mobile-menu');
+
+ menuBtn.addEventListener('click', () => {
+ mobileMenu.classList.toggle('hidden');
+ });
diff --git a/transaksi_total.html b/transaksi_total.html
index b4c16b4..ecd556c 100644
--- a/transaksi_total.html
+++ b/transaksi_total.html
@@ -10,11 +10,19 @@
-
+
POS Penjualan Warung Mbah Karmi
+
+
+
+
-
+
+
+
+
+
+