-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
39 lines (37 loc) · 1.68 KB
/
Copy pathconfig.js
File metadata and controls
39 lines (37 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* ============================================================
RM. CIREMAI SEMARANG — Konfigurasi Global
Edit file ini untuk mengubah info warung & nomor WA.
============================================================ */
const CONFIG = {
namaWarung: 'RM. Ciremai',
kota: 'Semarang, Jawa Tengah',
tagline: 'Magelangan • Nasi Goreng • Mie Dokdok',
// Ganti dengan nomor WhatsApp resmi warung (format internasional tanpa +)
waNomor: '6281234567890',
jamBuka: 'Setiap hari · Buka 24 Jam',
alamat: 'Jl. Kalimasada, Sekaran, Kec. Gn. Pati, Kota Semarang, Jawa Tengah 50229',
gmapsUrl: 'https://maps.app.goo.gl/Dzp9H1tu6BkAkfSV8',
// Database cloud (opsional). Set enabled=true setelah isi url & key dari Supabase.
// Gratis di https://supabase.com — lihat README untuk skema SQL-nya.
supabase: {
enabled: true,
url: 'https://lnxprlvmyhqxkzarrzac.supabase.co',
key: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxueHBybHZteWhxeGt6YXJyemFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODc0MDAwMDIsImV4cCI6MjEwMjk3NjAwMn0.fb4njNTFQZMcZPuvHE96i8zfX7CXCTGVN10A6wYDZUs',
},
// Jumlah meja untuk fitur QR code (kasir → pelanggan scan di meja)
// Pin halaman kasir (pelindung tambahan, di samping link terpisah)
kasirPin: '9900',
jumlahMeja: 10,
};
// URL katalog dengan nomor meja (untuk QR code)
CONFIG.mejaUrl = (no) => {
const loc = window.location;
let path = loc.pathname
.replace(/\/admin(?:\/.*)?$/, '/')
.replace(/\/kasir(?:\/.*)?$/, '/')
.replace(/(?:admin|kasir)\.html$/, 'index.html');
if (!path.endsWith('index.html')) {
path = path.replace(/\/$/, '') + '/index.html';
}
return `${loc.origin}${path}?meja=${no}`;
};