@fayz-ai/pos 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1214,6 +1214,13 @@ function closedBelongsToChannel(o, channel) {
|
|
|
1214
1214
|
if ((o.totalCents ?? 0) <= 0) return false;
|
|
1215
1215
|
return comandaChannel(o) === channel;
|
|
1216
1216
|
}
|
|
1217
|
+
function closedForView(closed, channel, isWaitlist) {
|
|
1218
|
+
if (isWaitlist) return [];
|
|
1219
|
+
if (!channel || !closed) return closed;
|
|
1220
|
+
const temEixo = closed.some((c) => c.tableId !== void 0 || c.channel !== void 0);
|
|
1221
|
+
if (!temEixo) return closed;
|
|
1222
|
+
return closed.filter((c) => closedBelongsToChannel(c, channel));
|
|
1223
|
+
}
|
|
1217
1224
|
|
|
1218
1225
|
// src/screen/serviceChargeGuard.ts
|
|
1219
1226
|
var FRASE = {
|
|
@@ -7756,13 +7763,14 @@ function PosScreen({
|
|
|
7756
7763
|
activePosition?.kind,
|
|
7757
7764
|
config.menus.map((m) => ({ id: m.id, kind: MENU_KIND[m.id] }))
|
|
7758
7765
|
);
|
|
7759
|
-
const fechadasDoCanal = useMemo(
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
+
const fechadasDoCanal = useMemo(
|
|
7767
|
+
() => closedForView(
|
|
7768
|
+
closedTickets,
|
|
7769
|
+
canalMarcado ? MENU_CHANNEL[canalMarcado] : void 0,
|
|
7770
|
+
menu?.view === "waitlist"
|
|
7771
|
+
),
|
|
7772
|
+
[closedTickets, canalMarcado, menu?.view]
|
|
7773
|
+
);
|
|
7766
7774
|
const escapeRef = useRef(() => false);
|
|
7767
7775
|
escapeRef.current = () => {
|
|
7768
7776
|
if (railOpen) {
|