@fayz-ai/pos 0.24.3 → 0.24.4
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 +82 -76
- package/dist/index.js.map +1 -1
- package/dist/screen/DeliveryBoard.d.ts.map +1 -1
- package/dist/styles.css +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4967,84 +4967,90 @@ function DeliveryBoard({ orders, activeId, onSelect, now, channelsConnected, his
|
|
|
4967
4967
|
Icon: Bike
|
|
4968
4968
|
}
|
|
4969
4969
|
),
|
|
4970
|
-
/* @__PURE__ */
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
historyOpen ? "Ocultar hist\xF3rico" : "Hist\xF3rico do dia"
|
|
4975
|
-
] }),
|
|
4976
|
-
/* @__PURE__ */ jsx("p", { className: "pos-board__note", children: DELIVERED_LINGER_NOTE })
|
|
4977
|
-
] }),
|
|
4978
|
-
/* @__PURE__ */ jsx("div", { className: "pos-board", children: DELIVERY_COLUMNS.map(({ name, states, tone }) => {
|
|
4979
|
-
const Icon = ICONE[name] ?? Clock;
|
|
4980
|
-
const column = orders.filter((o) => stillOnBoard(o, now)).filter((o) => states.includes(deliveryStatus(o.dispatch)));
|
|
4981
|
-
return /* @__PURE__ */ jsxs(
|
|
4982
|
-
"section",
|
|
4970
|
+
/* @__PURE__ */ jsx("div", { className: "pos-board__bar", children: /* @__PURE__ */ jsx("p", { className: "pos-board__note", children: DELIVERED_LINGER_NOTE }) }),
|
|
4971
|
+
/* @__PURE__ */ jsxs("div", { className: "pos-board", children: [
|
|
4972
|
+
onToggleHistory && /* @__PURE__ */ jsx(
|
|
4973
|
+
PosButton,
|
|
4983
4974
|
{
|
|
4984
|
-
className: "pos-
|
|
4985
|
-
"aria-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
4975
|
+
className: "pos-icon-btn pos-board__history",
|
|
4976
|
+
"aria-pressed": !!historyOpen,
|
|
4977
|
+
onClick: onToggleHistory,
|
|
4978
|
+
"aria-label": historyOpen ? "Fechar o hist\xF3rico do dia" : "Abrir o hist\xF3rico do dia",
|
|
4979
|
+
title: historyOpen ? "Fechar o hist\xF3rico do dia" : "Hist\xF3rico do dia",
|
|
4980
|
+
children: /* @__PURE__ */ jsx(History, { size: 22 })
|
|
4981
|
+
}
|
|
4982
|
+
),
|
|
4983
|
+
DELIVERY_COLUMNS.map(({ name, states, tone }) => {
|
|
4984
|
+
const Icon = ICONE[name] ?? Clock;
|
|
4985
|
+
const column = orders.filter((o) => stillOnBoard(o, now)).filter((o) => states.includes(deliveryStatus(o.dispatch)));
|
|
4986
|
+
return /* @__PURE__ */ jsxs(
|
|
4987
|
+
"section",
|
|
4988
|
+
{
|
|
4989
|
+
className: "pos-col",
|
|
4990
|
+
"aria-label": name,
|
|
4991
|
+
style: { ["--pos-col-edge"]: `var(--pos-deliv-${tone})` },
|
|
4992
|
+
children: [
|
|
4993
|
+
/* @__PURE__ */ jsxs("header", { className: "pos-col__head", children: [
|
|
4994
|
+
/* @__PURE__ */ jsx(Icon, { size: 15, strokeWidth: 2.2, "aria-hidden": true }),
|
|
4995
|
+
/* @__PURE__ */ jsx("span", { className: "pos-col__t", children: name }),
|
|
4996
|
+
/* @__PURE__ */ jsx("span", { className: "pos-col__n pos-num", children: column.length })
|
|
4997
|
+
] }),
|
|
4998
|
+
/* @__PURE__ */ jsxs("div", { className: "pos-col__body", children: [
|
|
4999
|
+
column.map((o) => {
|
|
5000
|
+
const late = lateness(o, now);
|
|
5001
|
+
const isLate = late != null && late > 0;
|
|
5002
|
+
const awaiting = name === "Pedidos" && !isLate;
|
|
5003
|
+
return /* @__PURE__ */ jsxs(
|
|
5004
|
+
PosButton,
|
|
5005
|
+
{
|
|
5006
|
+
className: "pos-card",
|
|
5007
|
+
"data-late": isLate,
|
|
5008
|
+
"data-await": awaiting,
|
|
5009
|
+
"aria-current": o.id === activeId,
|
|
5010
|
+
style: o.channelTone && !isLate && !awaiting ? { ["--pos-edge"]: `var(--pos-tone-${o.channelTone})` } : void 0,
|
|
5011
|
+
onClick: () => {
|
|
5012
|
+
haptic("tap");
|
|
5013
|
+
onSelect(o);
|
|
5014
|
+
},
|
|
5015
|
+
children: [
|
|
5016
|
+
/* @__PURE__ */ jsxs("span", { className: "pos-card__top", children: [
|
|
5017
|
+
/* @__PURE__ */ jsxs("span", { className: "pos-card__id pos-num", children: [
|
|
5018
|
+
"#",
|
|
5019
|
+
o.label.replace(/\D/g, "") || o.label
|
|
5020
|
+
] }),
|
|
5021
|
+
o.channel && /* @__PURE__ */ jsx("span", { className: "pos-card__ch", children: o.channel })
|
|
5015
5022
|
] }),
|
|
5016
|
-
o.
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
] })
|
|
5029
|
-
o.
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
)
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
}) })
|
|
5023
|
+
o.customerName && /* @__PURE__ */ jsx("span", { className: "pos-card__who", children: o.customerName }),
|
|
5024
|
+
o.address && /* @__PURE__ */ jsx("span", { className: "pos-card__addr", children: o.address }),
|
|
5025
|
+
/* @__PURE__ */ jsxs("span", { className: "pos-card__foot", children: [
|
|
5026
|
+
/* @__PURE__ */ jsx("span", { className: isLate ? "pos-card__late" : "pos-card__due", children: isLate ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5027
|
+
/* @__PURE__ */ jsx(AlertTriangle, { size: 12, strokeWidth: 2.4, "aria-hidden": true }),
|
|
5028
|
+
late,
|
|
5029
|
+
"min atrasado"
|
|
5030
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5031
|
+
/* @__PURE__ */ jsx(Clock, { size: 12, strokeWidth: 2.2, "aria-hidden": true }),
|
|
5032
|
+
dueLabel(o, now)
|
|
5033
|
+
] }) }),
|
|
5034
|
+
o.totalCents != null && /* @__PURE__ */ jsx("span", { className: "pos-card__v pos-num", children: formatCents(o.totalCents) })
|
|
5035
|
+
] }),
|
|
5036
|
+
o.courierName && /* @__PURE__ */ jsxs("span", { className: "pos-card__courier", children: [
|
|
5037
|
+
/* @__PURE__ */ jsx(Bike, { size: 12, strokeWidth: 2.2, "aria-hidden": true }),
|
|
5038
|
+
o.courierName
|
|
5039
|
+
] })
|
|
5040
|
+
]
|
|
5041
|
+
},
|
|
5042
|
+
o.id
|
|
5043
|
+
);
|
|
5044
|
+
}),
|
|
5045
|
+
ghosts.filter((g) => deliveryColumnOf(g.from)?.name === name).map((g) => /* @__PURE__ */ jsx("span", { className: "pos-card pos-card--ghost", "aria-hidden": true }, `ghost-${g.id}`)),
|
|
5046
|
+
column.length === 0 && ghosts.every((g) => deliveryColumnOf(g.from)?.name !== name) && /* @__PURE__ */ jsx("p", { className: "pos-col__empty", children: "Nenhum" })
|
|
5047
|
+
] })
|
|
5048
|
+
]
|
|
5049
|
+
},
|
|
5050
|
+
name
|
|
5051
|
+
);
|
|
5052
|
+
})
|
|
5053
|
+
] })
|
|
5048
5054
|
] });
|
|
5049
5055
|
}
|
|
5050
5056
|
function dueLabel(p, now) {
|