Przebudowa - code review aplikaacji, podział na moduły.
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
window.kitchenAnimations = [
|
||||
`<div class="kitchen-anim"><div class="fire-emoji">🔥</div><div class="pan-emoji">🍳</div></div>`,
|
||||
`<div class="anim-run"><div class="chicken">🐓</div><div class="chef">👨🍳</div></div>`,
|
||||
`<div class="anim-pot"><div class="chicken-head">🐓</div><div class="pot-emoji">🍲</div></div>`,
|
||||
`<div class="anim-pizza"><div class="chef-pizza">👨🍳</div><div class="pizza-emoji">🍕</div></div>`,
|
||||
`<div class="anim-pig"><div class="pig-emoji">🐷</div><div class="sweat-emoji">💦</div><div class="knife-emoji">🍴</div></div>`
|
||||
];
|
||||
window.selectedAnimationHtml = null;
|
||||
|
||||
let hashParam = "";
|
||||
let tableParam = "";
|
||||
let appAccessLevel = "none"; // "none" | "menu" | "full"
|
||||
let pendingProtectedAction = null; // "status" | "waiter" | "bill"
|
||||
let billState = { payment: "", doc: "", nip: "", company: null };
|
||||
let cachedOpenBills = [];
|
||||
let guestPendingActions = {
|
||||
waiter_call: false,
|
||||
bill_request: false,
|
||||
};
|
||||
let isStaffPreview = false;
|
||||
let analyticsSessionId = "";
|
||||
|
||||
export function getHashParam() {
|
||||
return hashParam;
|
||||
}
|
||||
|
||||
export function setHashParam(value) {
|
||||
hashParam = (value || "").trim();
|
||||
}
|
||||
|
||||
export function getTableParam() {
|
||||
return tableParam;
|
||||
}
|
||||
|
||||
export function setTableParam(value) {
|
||||
tableParam = value || "";
|
||||
}
|
||||
|
||||
export function getAppAccessLevel() {
|
||||
return appAccessLevel;
|
||||
}
|
||||
|
||||
export function setAppAccessLevel(value) {
|
||||
appAccessLevel = value;
|
||||
}
|
||||
|
||||
export function getPendingProtectedAction() {
|
||||
return pendingProtectedAction;
|
||||
}
|
||||
|
||||
export function setPendingProtectedAction(value) {
|
||||
pendingProtectedAction = value;
|
||||
}
|
||||
|
||||
export function getBillState() {
|
||||
return billState;
|
||||
}
|
||||
|
||||
export function setBillState(value) {
|
||||
billState = value;
|
||||
}
|
||||
|
||||
export function getCachedOpenBills() {
|
||||
return cachedOpenBills;
|
||||
}
|
||||
|
||||
export function setCachedOpenBills(value) {
|
||||
cachedOpenBills = Array.isArray(value) ? value : [];
|
||||
}
|
||||
|
||||
export function getGuestPendingActions() {
|
||||
return guestPendingActions;
|
||||
}
|
||||
|
||||
export function setGuestPendingAction(messageType, pending) {
|
||||
guestPendingActions[messageType] = !!pending;
|
||||
}
|
||||
|
||||
export function getIsStaffPreview() {
|
||||
return isStaffPreview;
|
||||
}
|
||||
|
||||
export function setIsStaffPreview(value) {
|
||||
isStaffPreview = !!value;
|
||||
}
|
||||
|
||||
export function getAnalyticsSessionId() {
|
||||
return analyticsSessionId;
|
||||
}
|
||||
|
||||
export function setAnalyticsSessionId(value) {
|
||||
analyticsSessionId = value || "";
|
||||
}
|
||||
Reference in New Issue
Block a user