@fayz-ai/pos 0.24.2 → 0.24.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
@@ -5015,7 +5015,7 @@ function DeliveryBoard({ orders, activeId, onSelect, now, channelsConnected, his
5015
5015
  ] }),
5016
5016
  o.channel && /* @__PURE__ */ jsx("span", { className: "pos-card__ch", children: o.channel })
5017
5017
  ] }),
5018
- /* @__PURE__ */ jsx("span", { className: "pos-card__who", children: o.customerName ?? "\u2014" }),
5018
+ o.customerName && /* @__PURE__ */ jsx("span", { className: "pos-card__who", children: o.customerName }),
5019
5019
  o.address && /* @__PURE__ */ jsx("span", { className: "pos-card__addr", children: o.address }),
5020
5020
  /* @__PURE__ */ jsxs("span", { className: "pos-card__foot", children: [
5021
5021
  /* @__PURE__ */ jsx("span", { className: isLate ? "pos-card__late" : "pos-card__due", children: isLate ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -5048,7 +5048,11 @@ function DeliveryBoard({ orders, activeId, onSelect, now, channelsConnected, his
5048
5048
  ] });
5049
5049
  }
5050
5050
  function dueLabel(p, now) {
5051
- if (!p.dueAt) return "\u2014";
5051
+ if (!p.dueAt) {
5052
+ if (!p.openedAt) return "sem hor\xE1rio";
5053
+ const age = Math.max(0, Math.floor((now - new Date(p.openedAt).getTime()) / 6e4));
5054
+ return age < 1 ? "agora" : `h\xE1 ${age}min`;
5055
+ }
5052
5056
  const minutes = Math.ceil((new Date(p.dueAt).getTime() - now) / 6e4);
5053
5057
  return minutes <= 0 ? "agora" : `em ${minutes}min`;
5054
5058
  }