@fayz-ai/pos 0.23.1 → 0.23.3
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
|
@@ -5008,10 +5008,12 @@ function DispatchRail({
|
|
|
5008
5008
|
now,
|
|
5009
5009
|
open,
|
|
5010
5010
|
containerRef,
|
|
5011
|
-
extra
|
|
5011
|
+
extra,
|
|
5012
|
+
carrier
|
|
5012
5013
|
}) {
|
|
5013
5014
|
const status = order.dispatch ?? "received";
|
|
5014
5015
|
const next = nextDispatch(status);
|
|
5016
|
+
const held = !!carrier && (next === "dispatched" || next === "out" || next === "delivered");
|
|
5015
5017
|
const late = order.dueAt ? Math.floor((now - new Date(order.dueAt).getTime()) / 6e4) : void 0;
|
|
5016
5018
|
return /* @__PURE__ */ jsxs(
|
|
5017
5019
|
"aside",
|
|
@@ -5118,7 +5120,10 @@ function DispatchRail({
|
|
|
5118
5120
|
] }),
|
|
5119
5121
|
extra,
|
|
5120
5122
|
/* @__PURE__ */ jsxs("div", { className: "pos-cta", style: { display: "grid", gap: "var(--pos-2x)" }, children: [
|
|
5121
|
-
|
|
5123
|
+
held ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5124
|
+
/* @__PURE__ */ jsx(PosButton, { className: "pos-btn", disabled: true, children: carrier.label }),
|
|
5125
|
+
/* @__PURE__ */ jsx("p", { className: "pos-t-sm", style: { margin: 0, textAlign: "center", color: "var(--pos-fg-3)" }, children: carrier.note })
|
|
5126
|
+
] }) : next ? /* @__PURE__ */ jsx(PosButton, { className: "pos-btn", onClick: () => onAdvance(next), children: ADVANCE_LABEL[next] }) : /* @__PURE__ */ jsx(PosButton, { className: "pos-btn", disabled: true, children: "Entregue" }),
|
|
5122
5127
|
/* @__PURE__ */ jsx(PosButton, { className: "pos-btn pos-btn--ghost", style: { width: "100%" }, onClick: onCancel, children: "Cancelar pedido" })
|
|
5123
5128
|
] })
|
|
5124
5129
|
]
|
|
@@ -7518,6 +7523,7 @@ function PosScreen({
|
|
|
7518
7523
|
onCloseBill,
|
|
7519
7524
|
onDispatch,
|
|
7520
7525
|
renderDispatchExtra,
|
|
7526
|
+
dispatchCarrier,
|
|
7521
7527
|
verifyPin,
|
|
7522
7528
|
onAuthorised,
|
|
7523
7529
|
actionGate,
|
|
@@ -9021,7 +9027,8 @@ function PosScreen({
|
|
|
9021
9027
|
},
|
|
9022
9028
|
onCancel: () => handleAction("cancel_order"),
|
|
9023
9029
|
onCloseDetails: () => closeDetailsRef.current(),
|
|
9024
|
-
extra: renderDispatchExtra?.(activePosition, ticket)
|
|
9030
|
+
extra: renderDispatchExtra?.(activePosition, ticket),
|
|
9031
|
+
carrier: dispatchCarrier?.(activePosition) ?? null
|
|
9025
9032
|
}
|
|
9026
9033
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9027
9034
|
railOpen && /* @__PURE__ */ jsx(
|