@feedmepos/mf-order-setting 0.0.102 → 0.0.103

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.
Files changed (139) hide show
  1. package/dist/{DisplaySystemView-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
  2. package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
  3. package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
  4. package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
  5. package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
  6. package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
  7. package/dist/KioskDevicesView-CYiew4X5.js +4 -0
  8. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
  9. package/dist/KioskSettingView-AKBiij9a.js +1124 -0
  10. package/dist/KioskView-zKB6mC8I.js +765 -0
  11. package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
  12. package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-DjoTyV6m.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-KSMU_jGl.js} +1 -1
  13. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  14. package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
  17. package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
  18. package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
  19. package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
  20. package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
  21. package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
  22. package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
  23. package/dist/frontend/mf-order/src/app.d.ts +687 -0
  24. package/dist/frontend/mf-order/src/main.d.ts +687 -0
  25. package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
  26. package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
  27. package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
  28. package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
  29. package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
  30. package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
  31. package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
  32. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
  33. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
  34. package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
  35. package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
  36. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
  37. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
  38. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
  39. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
  40. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
  41. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
  42. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
  43. package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
  44. package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
  45. package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
  46. package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
  47. package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
  48. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
  50. package/dist/index-CMOvrim4.js +147 -0
  51. package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
  52. package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
  53. package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
  54. package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
  55. package/dist/package/entity/display/blocks.d.ts +12 -2
  56. package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
  57. package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
  58. package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
  59. package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
  60. package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
  61. package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
  62. package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
  63. package/dist/package/entity/queue/queue.do.d.ts +153 -0
  64. package/dist/package/entity/queue/queue.dto.d.ts +221 -2
  65. package/dist/package/entity/queue/queue.enum.d.ts +5 -0
  66. package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
  67. package/dist/style.css +1 -1
  68. package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
  69. package/package.json +2 -1
  70. package/src/api/food-court/index.ts +63 -0
  71. package/src/api/kiosk/index.ts +8 -0
  72. package/src/api/payment/index.ts +18 -1
  73. package/src/api/queue/index.ts +39 -0
  74. package/src/api/restaurant-setting/index.ts +14 -0
  75. package/src/locales/en-US.json +197 -26
  76. package/src/locales/ja-JP.json +193 -23
  77. package/src/locales/th-TH.json +193 -21
  78. package/src/locales/zh-CN.json +197 -23
  79. package/src/modules/display-system/interface.spec.ts +26 -1
  80. package/src/modules/display-system/interface.ts +20 -0
  81. package/src/modules/kiosk/interface.ts +4 -0
  82. package/src/modules/kiosk/license.spec.ts +167 -0
  83. package/src/modules/kiosk/license.ts +175 -0
  84. package/src/modules/kiosk/outletLoad.spec.ts +25 -0
  85. package/src/modules/kiosk/outletLoad.ts +19 -0
  86. package/src/modules/kiosk/settingsSections.spec.ts +85 -0
  87. package/src/modules/kiosk/settingsSections.ts +82 -0
  88. package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
  89. package/src/modules/kiosk/useKioskSettings.ts +61 -0
  90. package/src/modules/payment/paymentDevice.spec.ts +175 -0
  91. package/src/modules/payment/paymentDevice.ts +156 -0
  92. package/src/stores/kiosk/index.ts +16 -1
  93. package/src/stores/kiosk/mapper.ts +2 -0
  94. package/src/stores/order-setting/index.spec.ts +83 -0
  95. package/src/stores/order-setting/index.ts +49 -27
  96. package/src/stores/payment/index.spec.ts +86 -0
  97. package/src/stores/payment/index.ts +48 -2
  98. package/src/views/display-system/DisplayInspector.vue +17 -8
  99. package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
  100. package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
  101. package/src/views/food-court/food-court-export.spec.ts +151 -0
  102. package/src/views/food-court/food-court-export.ts +283 -0
  103. package/src/views/kiosk/KioskStatePanel.vue +2 -2
  104. package/src/views/kiosk/KioskView.vue +219 -82
  105. package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
  106. package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
  107. package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
  108. package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
  109. package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
  110. package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
  111. package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
  112. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
  113. package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
  114. package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
  115. package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
  116. package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
  117. package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
  118. package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
  119. package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
  120. package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
  121. package/src/views/order-settings/pos-status/pos-status.ts +86 -0
  122. package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
  123. package/src/views/order-settings/queue/QueueSetting.vue +289 -15
  124. package/src/views/order-settings/queue/called-message.spec.ts +29 -1
  125. package/src/views/order-settings/queue/called-message.ts +18 -0
  126. package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
  127. package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
  128. package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
  129. package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
  130. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
  131. package/dist/KioskSettingView-rdom_aS8.js +0 -880
  132. package/dist/KioskView-DOON9zR6.js +0 -516
  133. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
  134. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
  135. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
  136. package/dist/index-CaHG3M7C.js +0 -135
  137. package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
  138. package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
  139. package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
@@ -1,12 +1,12 @@
1
- import { defineComponent as H, ref as V, resolveComponent as R, openBlock as f, createElementBlock as T, createElementVNode as v, toDisplayString as S, createVNode as b, unref as x, createBlock as z, computed as U, watch as oe, onMounted as re, withCtx as N, createTextVNode as se, createCommentVNode as E, Fragment as ie, renderList as le, renderSlot as ae } from "vue";
2
- import { e as g } from "./app-Dvk30CIa.js";
3
- import { useDialog as ue } from "@feedmepos/ui-library";
1
+ import { defineComponent as Q, ref as V, resolveComponent as R, openBlock as f, createElementBlock as T, createElementVNode as w, toDisplayString as S, createVNode as $, unref as x, createBlock as z, computed as U, watch as oe, onMounted as re, withCtx as N, createTextVNode as se, createCommentVNode as E, Fragment as ie, renderList as ue, renderSlot as ae } from "vue";
2
+ import { e as g } from "./app-CmuI6uSl.js";
3
+ import { useDialog as le } from "@feedmepos/ui-library";
4
4
  import { useI18n as Y, useCoreStore as ne } from "@feedmepos/mf-common";
5
5
  import { defineStore as de } from "pinia";
6
- import { r as F, g as a, b as O, a as Q } from "./index-C4n5H7t3.js";
7
- import "./order.dto-Cb_gh3iB.js";
8
- import { a as q } from "./index-CW4VlFWz.js";
9
- const ce = /* @__PURE__ */ H({
6
+ import { r as O, g as a, b as F, S as H } from "./index-BQa8AudZ.js";
7
+ import "./order.dto-BD9raQG5.js";
8
+ import { a as q } from "./index-D5qh2_4b.js";
9
+ const ce = /* @__PURE__ */ Q({
10
10
  __name: "OfflinePaymentTypeDialogContent",
11
11
  props: {
12
12
  name: {},
@@ -14,44 +14,44 @@ const ce = /* @__PURE__ */ H({
14
14
  },
15
15
  emits: ["update:nameValue", "update:instructionValue"],
16
16
  setup(e, { emit: t }) {
17
- const { t: r } = Y(), $ = e, i = t, y = V("");
18
- function D(w) {
19
- i("update:nameValue", w);
17
+ const { t: o } = Y(), v = e, i = t, y = V("");
18
+ function D(P) {
19
+ i("update:nameValue", P);
20
20
  }
21
- function C(w) {
22
- i("update:instructionValue", w);
21
+ function C(P) {
22
+ i("update:instructionValue", P);
23
23
  }
24
- return (w, m) => {
25
- const P = R("FmTextField"), c = R("FmTextarea");
24
+ return (P, m) => {
25
+ const h = R("FmTextField"), c = R("FmTextarea");
26
26
  return f(), T("div", null, [
27
- v("span", null, S($.name), 1),
28
- b(P, {
27
+ w("span", null, S(v.name), 1),
28
+ $(h, {
29
29
  "model-value": y.value,
30
30
  "onUpdate:modelValue": D,
31
- placeholder: x(r)("order.enterPaymentName"),
32
- rules: [(u) => !!u || x(r)("order.fieldCannotBeEmpty")]
31
+ placeholder: x(o)("order.enterPaymentName"),
32
+ rules: [(l) => !!l || x(o)("order.fieldCannotBeEmpty")]
33
33
  }, null, 8, ["model-value", "placeholder", "rules"]),
34
- m[0] || (m[0] = v("div", { class: "mb-12" }, null, -1)),
35
- v("span", null, S($.instruction), 1),
36
- b(c, {
34
+ m[0] || (m[0] = w("div", { class: "mb-12" }, null, -1)),
35
+ w("span", null, S(v.instruction), 1),
36
+ $(c, {
37
37
  "model-value": y.value,
38
38
  "onUpdate:modelValue": C,
39
- placeholder: x(r)("order.enterPaymentInstruction")
39
+ placeholder: x(o)("order.enterPaymentInstruction")
40
40
  }, null, 8, ["model-value", "placeholder"])
41
41
  ]);
42
42
  };
43
43
  }
44
- }), pe = /* @__PURE__ */ H({
44
+ }), pe = /* @__PURE__ */ Q({
45
45
  __name: "OfflinePaymentTypeDialog",
46
46
  emits: ["add:offline-payment-type"],
47
47
  setup(e, { emit: t }) {
48
- const { t: r } = Y(), $ = ue(), i = V(""), y = V(""), D = () => {
49
- i.value = "", y.value = "", $.open({
50
- title: r("order.addCustomPayment"),
48
+ const { t: o } = Y(), v = le(), i = V(""), y = V(""), D = () => {
49
+ i.value = "", y.value = "", v.open({
50
+ title: o("order.addCustomPayment"),
51
51
  contentComponent: ce,
52
52
  contentComponentProps: {
53
- name: r("order.name"),
54
- instruction: r("order.instruction"),
53
+ name: o("order.name"),
54
+ instruction: o("order.instruction"),
55
55
  "onUpdate:nameValue": (m) => {
56
56
  i.value = m;
57
57
  },
@@ -59,8 +59,8 @@ const ce = /* @__PURE__ */ H({
59
59
  y.value = m;
60
60
  }
61
61
  },
62
- primaryActions: { text: r("order.add"), close: !0 },
63
- secondaryActions: { text: r("order.cancel"), close: !0 }
62
+ primaryActions: { text: o("order.add"), close: !0 },
63
+ secondaryActions: { text: o("order.cancel"), close: !0 }
64
64
  }).onPrimary(async () => {
65
65
  const m = {
66
66
  name: i.value,
@@ -70,13 +70,13 @@ const ce = /* @__PURE__ */ H({
70
70
  });
71
71
  };
72
72
  async function C(m) {
73
- w("add:offline-payment-type", m);
73
+ P("add:offline-payment-type", m);
74
74
  }
75
- const w = t;
76
- return (m, P) => {
75
+ const P = t;
76
+ return (m, h) => {
77
77
  const c = R("FmButton");
78
78
  return f(), z(c, {
79
- label: x(r)("order.editOfflinePayment"),
79
+ label: x(o)("order.editOfflinePayment"),
80
80
  onClick: D,
81
81
  variant: "plain"
82
82
  }, null, 8, ["label"]);
@@ -91,7 +91,7 @@ const ce = /* @__PURE__ */ H({
91
91
  }, $e = {
92
92
  key: 4,
93
93
  class: "text-fm-color-secondary-salmon fm-typo-en-body-sm-600 ml-7"
94
- }, Ie = /* @__PURE__ */ H({
94
+ }, Ie = /* @__PURE__ */ Q({
95
95
  __name: "PaymentType",
96
96
  props: {
97
97
  paymentTypes: {
@@ -125,93 +125,93 @@ const ce = /* @__PURE__ */ H({
125
125
  },
126
126
  emits: ["update:paymentTypes", "update:offlinePaymentTypes"],
127
127
  setup(e, { emit: t }) {
128
- const { t: r } = Y(), { currentRestaurant: $ } = ne(), i = e, y = t;
129
- async function D(l) {
128
+ const { t: o } = Y(), { currentRestaurant: v } = ne(), i = e, y = t;
129
+ async function D(u) {
130
130
  y(
131
131
  "update:offlinePaymentTypes",
132
- i.offlinePaymentTypes.filter((d, p) => p !== l)
132
+ i.offlinePaymentTypes.filter((d, p) => p !== u)
133
133
  );
134
134
  }
135
- const C = U(() => (i.paymentTypes || []).includes(g.F_ORDER_PAYMENT_TYPE.enum.ePayment)), w = U(() => (i.paymentTypes || []).includes(g.F_ORDER_PAYMENT_TYPE.enum.credit)), m = U(() => {
136
- const l = i.paymentTypes || [], d = i.offlinePaymentTypes || [];
137
- return l.includes(g.F_ORDER_PAYMENT_TYPE.enum.cash) || d.length > 0;
138
- }), P = V(!1), c = V([]), u = U(() => [
139
- { label: r("order.offlinePayment"), value: "offline" },
135
+ const C = U(() => (i.paymentTypes || []).includes(g.F_ORDER_PAYMENT_TYPE.enum.ePayment)), P = U(() => (i.paymentTypes || []).includes(g.F_ORDER_PAYMENT_TYPE.enum.credit)), m = U(() => {
136
+ const u = i.paymentTypes || [], d = i.offlinePaymentTypes || [];
137
+ return u.includes(g.F_ORDER_PAYMENT_TYPE.enum.cash) || d.length > 0;
138
+ }), h = V(!1), c = V([]), l = U(() => [
139
+ { label: o("order.offlinePayment"), value: "offline" },
140
140
  {
141
- label: r("order.ePayment"),
141
+ label: o("order.ePayment"),
142
142
  value: "e-payment",
143
143
  disable: !i.allowEPayment,
144
144
  suffix: !i.allowEPayment && i.showDisabledOptions ? {
145
- text: `(${i.disabledSuffixes["e-payment"] || r("order.notAllowed")})`,
145
+ text: `(${i.disabledSuffixes["e-payment"] || o("order.notAllowed")})`,
146
146
  class: "text-negative t-system"
147
147
  } : void 0
148
148
  },
149
149
  {
150
- label: r("order.credit"),
150
+ label: o("order.credit"),
151
151
  value: "credit",
152
152
  disable: !i.allowCredit,
153
153
  suffix: !i.allowCredit && i.showDisabledOptions ? {
154
- text: `(${i.disabledSuffixes.credit || r("order.notAllowed")})`,
154
+ text: `(${i.disabledSuffixes.credit || o("order.notAllowed")})`,
155
155
  class: "text-negative t-system"
156
156
  } : void 0
157
157
  }
158
158
  ]), I = () => {
159
- const l = [];
160
- m.value && l.push("offline"), C.value && l.push("e-payment"), w.value && l.push("credit"), c.value = l;
159
+ const u = [];
160
+ m.value && u.push("offline"), C.value && u.push("e-payment"), P.value && u.push("credit"), c.value = u;
161
161
  let d = 0;
162
- i.showDisabledOptions ? d = u.value.length : d = u.value.filter((p) => !(p.value === "e-payment" && !i.allowEPayment || p.value === "credit" && !i.allowCredit)).length, P.value = l.length === d && l.length > 0;
162
+ i.showDisabledOptions ? d = l.value.length : d = l.value.filter((p) => !(p.value === "e-payment" && !i.allowEPayment || p.value === "credit" && !i.allowCredit)).length, h.value = u.length === d && u.length > 0;
163
163
  };
164
164
  I();
165
- const B = (l) => {
166
- const d = u.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit));
167
- c.value = l ? d.map((s) => s.value) : [], P.value = l;
168
- const p = [], o = l ? i.offlinePaymentTypes || [] : [];
169
- c.value.includes("e-payment") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.ePayment), c.value.includes("offline") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.cash), c.value.includes("credit") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.credit), y("update:paymentTypes", p), y("update:offlinePaymentTypes", o);
170
- }, k = (l) => {
171
- c.value = l, i.showDisabledOptions ? u.value.length : u.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit)).length;
172
- const d = u.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit)).length;
173
- P.value = l.length === d && l.length > 0;
174
- const p = [], o = l.includes("offline") ? i.offlinePaymentTypes || [] : [];
175
- l.includes("e-payment") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.ePayment), l.includes("offline") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.cash), l.includes("credit") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.credit), y("update:paymentTypes", p), y("update:offlinePaymentTypes", o);
165
+ const B = (u) => {
166
+ const d = l.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit));
167
+ c.value = u ? d.map((s) => s.value) : [], h.value = u;
168
+ const p = [], r = u ? i.offlinePaymentTypes || [] : [];
169
+ c.value.includes("e-payment") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.ePayment), c.value.includes("offline") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.cash), c.value.includes("credit") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.credit), y("update:paymentTypes", p), y("update:offlinePaymentTypes", r);
170
+ }, k = (u) => {
171
+ c.value = u, i.showDisabledOptions ? l.value.length : l.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit)).length;
172
+ const d = l.value.filter((s) => !(s.value === "e-payment" && !i.allowEPayment || s.value === "credit" && !i.allowCredit)).length;
173
+ h.value = u.length === d && u.length > 0;
174
+ const p = [], r = u.includes("offline") ? i.offlinePaymentTypes || [] : [];
175
+ u.includes("e-payment") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.ePayment), u.includes("offline") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.cash), u.includes("credit") && p.push(g.F_ORDER_PAYMENT_TYPE.enum.credit), y("update:paymentTypes", p), y("update:offlinePaymentTypes", r);
176
176
  };
177
177
  return oe(
178
- () => $.value,
179
- (l) => {
178
+ () => v.value,
179
+ (u) => {
180
180
  I();
181
181
  },
182
182
  { immediate: !0 }
183
183
  ), re(() => {
184
184
  I();
185
- }), (l, d) => {
185
+ }), (u, d) => {
186
186
  var L, J, K, W, X, Z, ee;
187
- const p = R("FmCheckbox"), o = R("FmCardSection"), s = R("FmCard"), G = R("FmButton");
187
+ const p = R("FmCheckbox"), r = R("FmCardSection"), s = R("FmCard"), G = R("FmButton");
188
188
  return f(), T("div", ye, [
189
- v("div", me, S(x(r)("order.acceptedPayment")), 1),
190
- b(p, {
189
+ w("div", me, S(x(o)("order.acceptedPayment")), 1),
190
+ $(p, {
191
191
  value: "",
192
- "model-value": P.value,
193
- label: x(r)("order.all"),
194
- indeterminate: c.value.length > 0 && !P.value,
192
+ "model-value": h.value,
193
+ label: x(o)("order.all"),
194
+ indeterminate: c.value.length > 0 && !h.value,
195
195
  "onUpdate:modelValue": B
196
196
  }, null, 8, ["model-value", "label", "indeterminate"]),
197
- v("div", fe, [
198
- b(p, {
197
+ w("div", fe, [
198
+ $(p, {
199
199
  modelValue: c.value,
200
200
  "onUpdate:modelValue": [
201
- d[0] || (d[0] = (h) => c.value = h),
201
+ d[0] || (d[0] = (b) => c.value = b),
202
202
  k
203
203
  ],
204
- label: u.value[0].label,
205
- value: u.value[0].value
204
+ label: l.value[0].label,
205
+ value: l.value[0].value
206
206
  }, null, 8, ["modelValue", "label", "value"])
207
207
  ]),
208
- c.value.includes(u.value[0].value) ? (f(), T("div", ge, [
208
+ c.value.includes(l.value[0].value) ? (f(), T("div", ge, [
209
209
  ((L = e.offlinePaymentTypes) == null ? void 0 : L.length) === 0 ? (f(), T("div", ve, [
210
- b(s, { variant: "outlined" }, {
210
+ $(s, { variant: "outlined" }, {
211
211
  default: N(() => [
212
- b(o, null, {
212
+ $(r, null, {
213
213
  default: N(() => [
214
- se(S(x(r)("order.cash")), 1)
214
+ se(S(x(o)("order.cash")), 1)
215
215
  ]),
216
216
  _: 1
217
217
  })
@@ -219,21 +219,21 @@ const ce = /* @__PURE__ */ H({
219
219
  _: 1
220
220
  })
221
221
  ])) : E("", !0),
222
- (f(!0), T(ie, null, le(e.offlinePaymentTypes, (h, te) => (f(), T("p", { key: te }, [
223
- b(s, {
222
+ (f(!0), T(ie, null, ue(e.offlinePaymentTypes, (b, te) => (f(), T("p", { key: te }, [
223
+ $(s, {
224
224
  variant: "outlined",
225
225
  class: "mb-3"
226
226
  }, {
227
227
  default: N(() => [
228
- b(o, { class: "flex items-center justify-between" }, {
228
+ $(r, { class: "flex items-center justify-between" }, {
229
229
  default: N(() => [
230
- v("div", null, [
231
- v("span", we, S(h.name), 1),
232
- d[4] || (d[4] = v("br", null, null, -1)),
233
- v("span", null, S(h.instruction), 1)
230
+ w("div", null, [
231
+ w("span", we, S(b.name), 1),
232
+ d[4] || (d[4] = w("br", null, null, -1)),
233
+ w("span", null, S(b.instruction), 1)
234
234
  ]),
235
- v("div", null, [
236
- b(G, {
235
+ w("div", null, [
236
+ $(G, {
237
237
  "append-icon": "delete",
238
238
  variant: "plain",
239
239
  onClick: (Se) => D(te)
@@ -246,70 +246,79 @@ const ce = /* @__PURE__ */ H({
246
246
  _: 2
247
247
  }, 1024)
248
248
  ]))), 128)),
249
- v("div", Pe, [
249
+ w("div", Pe, [
250
250
  e.offlinePaymentTypes.length === 0 || e.showDisabledOptions ? (f(), z(pe, {
251
251
  key: 0,
252
- "onAdd:offlinePaymentType": d[1] || (d[1] = (h) => y("update:offlinePaymentTypes", [...i.offlinePaymentTypes, h]))
252
+ "onAdd:offlinePaymentType": d[1] || (d[1] = (b) => y("update:offlinePaymentTypes", [...i.offlinePaymentTypes, b]))
253
253
  })) : E("", !0)
254
254
  ])
255
255
  ])) : E("", !0),
256
- b(p, {
256
+ $(p, {
257
257
  modelValue: c.value,
258
258
  "onUpdate:modelValue": [
259
- d[2] || (d[2] = (h) => c.value = h),
259
+ d[2] || (d[2] = (b) => c.value = b),
260
260
  k
261
261
  ],
262
- label: u.value[1].label,
263
- value: u.value[1].value,
264
- disabled: u.value[1].disable
262
+ label: l.value[1].label,
263
+ value: l.value[1].value,
264
+ disabled: l.value[1].disable
265
265
  }, null, 8, ["modelValue", "label", "value", "disabled"]),
266
- u.value[1].suffix ? (f(), T("div", he, S((W = (K = (J = u.value) == null ? void 0 : J[1]) == null ? void 0 : K.suffix) == null ? void 0 : W.text), 1)) : E("", !0),
267
- ae(l.$slots, "e-payment-note"),
266
+ l.value[1].suffix ? (f(), T("div", he, S((W = (K = (J = l.value) == null ? void 0 : J[1]) == null ? void 0 : K.suffix) == null ? void 0 : W.text), 1)) : E("", !0),
267
+ ae(u.$slots, "e-payment-note"),
268
268
  c.value.includes("e-payment") ? (f(), T("div", be, [
269
- ae(l.$slots, "e-payment-content")
269
+ ae(u.$slots, "e-payment-content")
270
270
  ])) : E("", !0),
271
271
  e.allowCredit || e.showDisabledOptions ? (f(), z(p, {
272
272
  key: 3,
273
273
  modelValue: c.value,
274
274
  "onUpdate:modelValue": [
275
- d[3] || (d[3] = (h) => c.value = h),
275
+ d[3] || (d[3] = (b) => c.value = b),
276
276
  k
277
277
  ],
278
- label: u.value[2].label,
279
- value: u.value[2].value,
280
- disabled: u.value[2].disable
278
+ label: l.value[2].label,
279
+ value: l.value[2].value,
280
+ disabled: l.value[2].disable
281
281
  }, null, 8, ["modelValue", "label", "value", "disabled"])) : E("", !0),
282
- u.value[2].suffix ? (f(), T("div", $e, S((ee = (Z = (X = u.value) == null ? void 0 : X[2]) == null ? void 0 : Z.suffix) == null ? void 0 : ee.text), 1)) : E("", !0)
282
+ l.value[2].suffix ? (f(), T("div", $e, S((ee = (Z = (X = l.value) == null ? void 0 : X[2]) == null ? void 0 : Z.suffix) == null ? void 0 : ee.text), 1)) : E("", !0)
283
283
  ]);
284
284
  };
285
285
  }
286
286
  }), A = {
287
+ /**
288
+ * A fresh read of the restaurant doc, for its POS heartbeat. The portal shell's
289
+ * `currentRestaurant` is loaded once at sign-in, so its `posHeartbeat` is stale
290
+ * by the time anyone looks; this hits portal-v2 `GET /restaurants/:id` instead.
291
+ */
292
+ async readRestaurantPosState(e) {
293
+ const t = await F().get(`/restaurants/${e}`), { _id: o, posHeartbeat: v, posVersion: i } = a(t);
294
+ return { _id: o, posHeartbeat: v, posVersion: i };
295
+ },
287
296
  async readRestaurantSetting(e) {
288
- const t = await O().get(`/restaurants/${e}/restaurant-setting`);
297
+ const t = await F().get(`/restaurants/${e}/restaurant-setting`);
289
298
  return a(t);
290
299
  },
291
300
  async updateDineInSetting(e) {
292
- const t = await F().put("/dine-in", e);
301
+ const t = await O().put("/dine-in", e);
293
302
  return a(t);
294
303
  },
295
304
  async updatePickupSetting(e) {
296
- const t = await F().put("/pickup", e);
305
+ const t = await O().put("/pickup", e);
297
306
  return a(t);
298
307
  },
299
308
  async updateDriveThruSetting(e) {
300
- const t = await F().put("/drive-thru", e);
309
+ const t = await O().put("/drive-thru", e);
301
310
  return a(t);
302
311
  },
303
312
  async updateServiceCharge(e) {
304
- const t = await F().put("/service-charge-setting", e);
313
+ const t = await O().put("/service-charge-setting", e);
305
314
  return a(t);
306
315
  },
307
316
  async getMobileOrderSetting() {
308
- return await a(await F().get("/order-settings"));
317
+ return await a(await O().get("/order-settings"));
309
318
  },
310
319
  async updateQueueSetting(e, t) {
311
- const r = await F().put("/queue", t);
312
- return a(r);
320
+ const o = await O().put("/queue", t);
321
+ return a(o);
313
322
  }
314
323
  };
315
324
  function _e(e) {
@@ -324,18 +333,18 @@ function j(e) {
324
333
  }
325
334
  const n = (e) => {
326
335
  const t = `/${e}`;
327
- return O(t, "portal");
336
+ return F(t, "portal");
328
337
  }, M = () => {
329
- const e = Q.getRestaurantId();
338
+ const e = H.getRestaurantId();
330
339
  if (!e) throw new Error("Invalid restaurant ID");
331
- const { linkedDeliveryBackend: t } = Q.getBackendUrl(), r = `${t}/restaurants/${e}/linked-deliveries`;
332
- return O("", "portal", { url: r });
340
+ const { linkedDeliveryBackend: t } = H.getBackendUrl(), o = `${t}/restaurants/${e}/linked-deliveries`;
341
+ return F("", "portal", { url: o });
333
342
  }, _ = {
334
343
  async readLinkedDeliveryCompanies() {
335
344
  return a(await M().get(""));
336
345
  },
337
346
  async readLocalDeliveryCompanies() {
338
- return a(await O().get("/deliveries"));
347
+ return a(await F().get("/deliveries"));
339
348
  },
340
349
  async createDeliveryCompany(e) {
341
350
  return a(await M().post("", e));
@@ -349,12 +358,12 @@ const n = (e) => {
349
358
  integratedDelivery: {
350
359
  async updateInhouse(e, t) {
351
360
  return a(
352
- await O().put(`/restaurants/${e}/in-house-delivery`, t)
361
+ await F().put(`/restaurants/${e}/in-house-delivery`, t)
353
362
  );
354
363
  },
355
364
  async updateFeedme(e, t) {
356
365
  return a(
357
- await O().put(`/restaurants/${e}/feedme-delivery`, t)
366
+ await F().put(`/restaurants/${e}/feedme-delivery`, t)
358
367
  );
359
368
  },
360
369
  async readFoodpanda(e) {
@@ -370,10 +379,10 @@ const n = (e) => {
370
379
  return a(await n("foodpanda").put(`/order/void/${e}`));
371
380
  },
372
381
  async updateFoodpanda(e, t) {
373
- const r = { ...t };
374
- return delete r.integrationId, delete r.remoteId, delete r.additionalStores, a(
382
+ const o = { ...t };
383
+ return delete o.integrationId, delete o.remoteId, delete o.additionalStores, a(
375
384
  await n("foodpanda").put(`/setting/${e}`, {
376
- ...r,
385
+ ...o,
377
386
  _id: e
378
387
  })
379
388
  );
@@ -393,11 +402,11 @@ const n = (e) => {
393
402
  await n("foodpanda").post(`/setting/${e}/stores`, t)
394
403
  );
395
404
  },
396
- async updateFoodpandaStore(e, t, r) {
405
+ async updateFoodpandaStore(e, t, o) {
397
406
  return a(
398
407
  await n("foodpanda").put(
399
408
  `/setting/${e}/stores/${encodeURIComponent(t)}`,
400
- r
409
+ o
401
410
  )
402
411
  );
403
412
  },
@@ -451,36 +460,36 @@ const n = (e) => {
451
460
  await n("grabfood").post(`/setting/${e}/stores`, t)
452
461
  );
453
462
  },
454
- async updateGrabfoodStore(e, t, r) {
463
+ async updateGrabfoodStore(e, t, o) {
455
464
  return a(
456
465
  await n("grabfood").put(
457
466
  `/setting/${e}/stores/${encodeURIComponent(t)}`,
458
- r
467
+ o
459
468
  )
460
469
  );
461
470
  },
462
- async removeGrabfoodStore(e, t, r = !1) {
471
+ async removeGrabfoodStore(e, t, o = !1) {
463
472
  return a(
464
473
  await n("grabfood").delete(
465
474
  `/setting/${e}/stores/${encodeURIComponent(t)}`,
466
- r ? { params: { forceLocal: !0 } } : void 0
475
+ o ? { params: { forceLocal: !0 } } : void 0
467
476
  )
468
477
  );
469
478
  },
470
479
  // Paths omit the /portal segment: the gateway maps the /gofood (and /grabfood) base onto the backend's /portal prefix, exactly as /setting reaches @Controller('/portal/setting').
471
- async listCampaigns(e, t, r) {
480
+ async listCampaigns(e, t, o) {
472
481
  return a(
473
482
  await n(e).get(`/campaign/${t}`, {
474
- params: r != null && r.length ? { statuses: r.join(",") } : void 0
483
+ params: o != null && o.length ? { statuses: o.join(",") } : void 0
475
484
  })
476
485
  );
477
486
  },
478
487
  async readGofoodCatalog(e) {
479
488
  return a(await n("gofood").get(`/campaign/${e}/catalog`));
480
489
  },
481
- async createCampaign(e, t, r) {
490
+ async createCampaign(e, t, o) {
482
491
  return a(
483
- await n(e).post(`/campaign/${t}`, r)
492
+ await n(e).post(`/campaign/${t}`, o)
484
493
  );
485
494
  },
486
495
  async deactivateGofoodPromo(e, t) {
@@ -544,11 +553,11 @@ const n = (e) => {
544
553
  await n("shopeefood").post(`/setting/${e}/stores`, t)
545
554
  );
546
555
  },
547
- async updateShopeefoodStore(e, t, r) {
556
+ async updateShopeefoodStore(e, t, o) {
548
557
  return a(
549
558
  await n("shopeefood").put(
550
559
  `/setting/${e}/stores/${encodeURIComponent(t)}`,
551
- r
560
+ o
552
561
  )
553
562
  );
554
563
  },
@@ -584,11 +593,11 @@ const n = (e) => {
584
593
  })
585
594
  );
586
595
  },
587
- async syncLinemanMenu(e, t, r) {
596
+ async syncLinemanMenu(e, t, o) {
588
597
  return a(
589
598
  await n("lineman").put(
590
599
  `/menu-sync/${e}/restaurants/${t}`,
591
- { catalogId: r ?? null }
600
+ { catalogId: o ?? null }
592
601
  )
593
602
  );
594
603
  },
@@ -663,97 +672,97 @@ function Te() {
663
672
  };
664
673
  }
665
674
  const ke = de("restaurant", () => {
666
- const e = ne(), t = V(Te()), r = U(
675
+ const e = ne(), t = V(Te()), o = U(
667
676
  () => {
668
- var o;
669
- return t.value.restaurantSettings[((o = e.currentRestaurant.value) == null ? void 0 : o._id) || ""];
677
+ var r;
678
+ return t.value.restaurantSettings[((r = e.currentRestaurant.value) == null ? void 0 : r._id) || ""];
670
679
  }
671
680
  );
672
- async function $(o) {
673
- const s = await A.readRestaurantSetting(o);
681
+ async function v(r) {
682
+ const s = await A.readRestaurantSetting(r);
674
683
  return t.value.restaurantSettings = {
675
684
  ...t.value.restaurantSettings,
676
- [o]: s
685
+ [r]: s
677
686
  }, s;
678
687
  }
679
- async function i(o) {
680
- await $(o), Q.setRestaurantId(o), setRestaurantId(o), q.FeatureFlag.setRestaurant(o || void 0), localStorage.set("feedme_restaurant", o);
688
+ async function i(r) {
689
+ await v(r), H.setRestaurantId(r), setRestaurantId(r), q.FeatureFlag.setRestaurant(r || void 0), localStorage.set("feedme_restaurant", r);
681
690
  }
682
- async function y(o) {
683
- await A.updateServiceCharge(o);
691
+ async function y(r) {
692
+ await A.updateServiceCharge(r);
684
693
  }
685
- async function D(o) {
686
- await A.updateDineInSetting(o);
694
+ async function D(r) {
695
+ await A.updateDineInSetting(r);
687
696
  }
688
- async function C(o) {
689
- await A.updatePickupSetting(o);
697
+ async function C(r) {
698
+ await A.updatePickupSetting(r);
690
699
  }
691
- async function w(o) {
692
- await A.updateDriveThruSetting(o);
700
+ async function P(r) {
701
+ await A.updateDriveThruSetting(r);
693
702
  }
694
- async function m(o, s) {
695
- await _.integratedDelivery.updateInhouse(o, s);
703
+ async function m(r, s) {
704
+ await _.integratedDelivery.updateInhouse(r, s);
696
705
  }
697
- async function P(o, s) {
698
- return await _.integratedDelivery.updateFeedme(o, s);
706
+ async function h(r, s) {
707
+ return await _.integratedDelivery.updateFeedme(r, s);
699
708
  }
700
- async function c(o, s) {
701
- await _.integratedDelivery.updateFoodpanda(o, s);
709
+ async function c(r, s) {
710
+ await _.integratedDelivery.updateFoodpanda(r, s);
702
711
  }
703
- async function u(o, s) {
704
- await _.integratedDelivery.updateGrabfood(o, s);
712
+ async function l(r, s) {
713
+ await _.integratedDelivery.updateGrabfood(r, s);
705
714
  }
706
- async function I(o, s) {
707
- await _.integratedDelivery.updateLineman(o, s);
715
+ async function I(r, s) {
716
+ await _.integratedDelivery.updateLineman(r, s);
708
717
  }
709
- async function B(o, s) {
710
- await _.integratedDelivery.updateShopeefood(o, s);
718
+ async function B(r, s) {
719
+ await _.integratedDelivery.updateShopeefood(r, s);
711
720
  }
712
- async function k(o, s) {
713
- await _.integratedDelivery.updateGofood(o, s);
721
+ async function k(r, s) {
722
+ await _.integratedDelivery.updateGofood(r, s);
714
723
  }
715
- async function l(o, s) {
716
- await _.integratedDelivery.updateDeliveroo(o, s);
724
+ async function u(r, s) {
725
+ await _.integratedDelivery.updateDeliveroo(r, s);
717
726
  }
718
- async function d(o, s) {
719
- await _.integratedDelivery.updateExternal(o, s);
727
+ async function d(r, s) {
728
+ await _.integratedDelivery.updateExternal(r, s);
720
729
  }
721
730
  function p() {
722
- const { t: o } = Y();
731
+ const { t: r } = Y();
723
732
  if (!e.currentRestaurant.value)
724
733
  return "getRestaurantEPayment - Invalid restaurant ";
725
734
  const s = e.currentRestaurant.value.payoutAccount, G = e.currentRestaurant.value.posVersion;
726
735
  return !!G && q.Pos.canUse({
727
736
  feature: g.F_FEATURE.enum.qrEPayment,
728
737
  posVersion: G
729
- }) ? !s || !s.enable || s.status !== g.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? o("order.payoutAccountIsRequired") : !0 : o("order.payoutPosVersion", {
738
+ }) ? !s || !s.enable || s.status !== g.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? r("order.payoutAccountIsRequired") : !0 : r("order.payoutPosVersion", {
730
739
  version: q.Pos.minVersionToUse(g.F_FEATURE.enum.qrEPayment)
731
740
  });
732
741
  }
733
742
  return {
734
743
  state: t.value,
735
- currentRestaurantSetting: r.value,
736
- readRestaurantSetting: $,
744
+ currentRestaurantSetting: o.value,
745
+ readRestaurantSetting: v,
737
746
  selectRestaurant: i,
738
747
  updateServiceCharge: y,
739
748
  updateDineInSetting: D,
740
749
  updatePickupSetting: C,
741
- updateDriveThruSetting: w,
750
+ updateDriveThruSetting: P,
742
751
  updateInhouseDelivery: m,
743
- updateFeedmeDelivery: P,
752
+ updateFeedmeDelivery: h,
744
753
  updateIntegratedFoodpandaDelivery: c,
745
- updateIntegratedGrabfoodDelivery: u,
754
+ updateIntegratedGrabfoodDelivery: l,
746
755
  updateIntegratedLinemanDelivery: I,
747
756
  updateIntegratedShopeefoodDelivery: B,
748
757
  updateIntegratedGofoodDelivery: k,
749
- updateIntegratedDeliverooDelivery: l,
758
+ updateIntegratedDeliverooDelivery: u,
750
759
  updateExternalDelivery: d,
751
760
  getRestaurantEPayment: p
752
761
  };
753
762
  });
754
763
  export {
755
764
  Ie as _,
756
- A as a,
757
- _ as r,
765
+ _ as a,
766
+ A as r,
758
767
  ke as u
759
768
  };