@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
@@ -140,6 +140,11 @@ export declare function removeArea(draft: DisplayTemplateDraft, zoneId: string):
140
140
  /** An area holds one module, so placing one is a replacement. Rotation is
141
141
  * media.carousel's job, which is why nothing here can be refused. */
142
142
  export declare function setBlock(draft: DisplayTemplateDraft, zoneId: string, block: DisplayBlockDraft): boolean;
143
+ /** The mode a template's pickup blocks share; undefined when none sets one. */
144
+ export declare function dineInCallModeOf(root: DisplayLayoutDraft): unknown;
145
+ /** The POS keeps one Ready list per screen, so the template saves only when
146
+ * every pickup block agrees: changing one changes them all. */
147
+ export declare function setDineInCallMode(root: DisplayLayoutDraft, mode: unknown): void;
143
148
  /** Dragging a module onto another area swaps the two, so a move never leaves an
144
149
  * area empty and the gesture is always legal. */
145
150
  export declare function swapBlocks(draft: DisplayTemplateDraft, fromZoneId: string, toZoneId: string): boolean;
@@ -19,4 +19,8 @@ export interface MfKioskDevice {
19
19
  operatingSystem?: string;
20
20
  osVersion?: string;
21
21
  lastStartup?: Date;
22
+ /** Licence this device holds; unset for a device bound before licensing. */
23
+ licenseId?: string;
24
+ /** When that licence ends. */
25
+ licenseExpiredAt?: Date;
22
26
  }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Kiosk and tablet licences on the Devices page. The rules on the backend side
3
+ * (KL-1..KL-9) are in backend/apps/kiosk-backend/KIOSK-LICENCES.md; this file
4
+ * only turns the licence list and a device's licence into what the page shows.
5
+ */
6
+ export type MfKioskLicenseType = 'KIOSK' | 'TABLET';
7
+ export type MfKioskLicenseStatus = 'FREE' | 'IN_USE' | 'EXPIRED';
8
+ /** Shape of `GET /restaurants/:rid/kiosk/licenses` (kiosk-backend PortalKioskLicenseList). */
9
+ export interface MfKioskLicenseList {
10
+ /** False when the licence service could not be read; `licenses` is then empty. */
11
+ verified: boolean;
12
+ /** The business needs no licence to bind devices. */
13
+ unlimited: boolean;
14
+ /** A tablet may use a free kiosk licence when no tablet licence is free. */
15
+ tabletMayUseKioskLicense: boolean;
16
+ licenses: MfKioskLicense[];
17
+ }
18
+ export interface MfKioskLicense {
19
+ id: string;
20
+ type: MfKioskLicenseType;
21
+ expiredAt: string;
22
+ status: MfKioskLicenseStatus;
23
+ device: {
24
+ machineId: string;
25
+ name?: string | null;
26
+ restaurantId: string;
27
+ restaurantName?: string | null;
28
+ deviceAppType?: string | null;
29
+ lastStartup?: string | null;
30
+ } | null;
31
+ }
32
+ /** A licence that ends within this many days is shown in amber. */
33
+ export declare const EXPIRING_SOON_DAYS = 30;
34
+ export type DeviceLicenseState = {
35
+ kind: 'none';
36
+ } | {
37
+ kind: 'active';
38
+ expiredAt: Date;
39
+ } | {
40
+ kind: 'expiring';
41
+ expiredAt: Date;
42
+ daysLeft: number;
43
+ } | {
44
+ kind: 'expired';
45
+ expiredAt: Date;
46
+ };
47
+ /**
48
+ * The state of the licence a device holds. A device without a licence id was
49
+ * bound before licensing (or for an unlimited business): it is never blocked.
50
+ * A licence id without a date is treated the same way, because the kiosk
51
+ * itself only stops on a date that has passed.
52
+ */
53
+ export declare function deviceLicenseState(device: {
54
+ licenseId?: string | null;
55
+ expiredAt?: Date | null;
56
+ }, now?: Date): DeviceLicenseState;
57
+ export type ChipVariant = 'success' | 'warning' | 'critical' | 'plain' | 'info';
58
+ export interface LicenseChip {
59
+ variant: ChipVariant;
60
+ labelKey: string;
61
+ params: Record<string, string | number>;
62
+ }
63
+ /** Chip for a device's licence line: green, amber, red, or grey (`plain`) for no licence. */
64
+ export declare function deviceLicenseChip(state: DeviceLicenseState, formatDate: (d: Date) => string): LicenseChip;
65
+ /** Chip for a row of the Licences tab. */
66
+ export declare function licenseRowChip(license: MfKioskLicense, now?: Date): LicenseChip;
67
+ /**
68
+ * The device holds a licence of the other type. Only a tablet on a kiosk
69
+ * licence is expected (the fallback); the other way should never happen, but
70
+ * a licence's type can be changed in the licence portal after binding.
71
+ */
72
+ export declare function licenseMismatchKey(deviceAppType: string | undefined | null, licenseType: MfKioskLicenseType | undefined): string | null;
73
+ export interface LicenseSummary {
74
+ type: MfKioskLicenseType;
75
+ /** Unexpired licences of this type. */
76
+ total: number;
77
+ used: number;
78
+ free: number;
79
+ /** Earliest end date among the unexpired licences, if any. */
80
+ nextExpiry: Date | null;
81
+ }
82
+ export declare function summariseLicenses(list: MfKioskLicense[], type: MfKioskLicenseType): LicenseSummary;
83
+ /**
84
+ * Which licence a new device of each kind will use, for the bind dialog.
85
+ * 'none' means the bind will be refused.
86
+ */
87
+ export declare function bindLicensePlan(list: MfKioskLicenseList): {
88
+ kiosk: 'KIOSK' | 'none';
89
+ tablet: MfKioskLicenseType | 'none';
90
+ };
91
+ /** Last six characters: enough to tell licences apart when talking to support. */
92
+ export declare function shortLicenseId(id: string): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * When the Kiosk / Tablet page may load an outlet's devices and settings.
3
+ *
4
+ * The portal can mount this page before the signed-in user's token is ready.
5
+ * Calling the API then throws before any request is sent (`baseClientInstance`:
6
+ * "Unauthorized request"), and the page used to show "Couldn't load devices"
7
+ * and default settings. So the page waits until it has both a token and an
8
+ * outlet, and loads each outlet once.
9
+ */
10
+ export interface OutletLoadInput {
11
+ hasToken: boolean;
12
+ restaurantId: string | null | undefined;
13
+ }
14
+ /** The outlet to load now, or null when not ready yet or already loaded. */
15
+ export declare function outletToLoad(input: OutletLoadInput, loadedFor: string | null): string | null;
@@ -0,0 +1,24 @@
1
+ import type { MfKioskOrderSettingForm, MfKioskSubmitOrderInstruction } from '@/modules/order-setting/kiosk/interface';
2
+ /**
3
+ * The Kiosk / Tablet Settings tab shows one section at a time (a section menu on
4
+ * the left, a row of section buttons on phones), so the merchant scrolls one short
5
+ * section instead of the whole form.
6
+ *
7
+ * - ordering: dine-in, takeaway, order number, guests, menu items, minimum weight
8
+ * - look: languages and cover images (kiosks and tablets)
9
+ * - payment: payment methods (kiosk only; tablets are paid at the counter)
10
+ * - updates: the OTA channel (admins only)
11
+ */
12
+ export type KioskSettingsSection = 'ordering' | 'look' | 'payment' | 'updates';
13
+ /** Sections this user can see, in menu order. Updates is for admins only. */
14
+ export declare function visibleSettingsSections(isAdmin: boolean): KioskSettingsSection[];
15
+ /** Largest minimum weight (grams) a merchant may set; 100 kg is far above any kiosk scale. */
16
+ export declare const MAX_MIN_WEIGH_GRAMS = 100000;
17
+ /**
18
+ * Sections whose fields cannot be saved as they are, in menu order. Save refuses
19
+ * while this is not empty and opens the first one, so the merchant sees the error
20
+ * even when it is in a section that is not on screen.
21
+ */
22
+ export declare function invalidSettingsSections(f: MfKioskOrderSettingForm): KioskSettingsSection[];
23
+ /** True when the merchant wrote their own text for either "submit order" message. */
24
+ export declare function hasCustomMessages(instruction: MfKioskSubmitOrderInstruction | undefined): boolean;
@@ -0,0 +1,29 @@
1
+ import type { MfKioskOrderSetting } from '@/modules/order-setting/kiosk/interface';
2
+ /** The parts of the order-setting store this page uses (see `stores/order-setting`). */
3
+ export interface KioskSettingsStore {
4
+ state: {
5
+ kiosk?: MfKioskOrderSetting;
6
+ };
7
+ reset(): void;
8
+ getSetting(isCurrent?: () => boolean): Promise<void>;
9
+ updateKioskSetting(kiosk: MfKioskOrderSetting): Promise<void>;
10
+ }
11
+ export type KioskSettingsStatus = 'idle' | 'loading' | 'error' | 'ready';
12
+ /**
13
+ * The Settings tab's load and save rules for one outlet at a time:
14
+ * - `load()` (on every outlet change, and Retry) clears the previous outlet's
15
+ * settings first, and drops a response that arrives after a newer load started;
16
+ * - `form` is set only while this outlet's settings are loaded ('ready'), so the
17
+ * page never renders defaults or another outlet's values;
18
+ * - `save()` refuses unless 'ready', and calls `onSaved` only after the backend
19
+ * accepted the update (`onFailed` + rethrow otherwise, so edits stay unsaved).
20
+ */
21
+ export declare function useKioskSettings(store: KioskSettingsStore, notify: {
22
+ onSaved: () => void;
23
+ onFailed: () => void;
24
+ }): {
25
+ status: import("vue").Ref<KioskSettingsStatus, KioskSettingsStatus>;
26
+ form: import("vue").ComputedRef<MfKioskOrderSetting | null>;
27
+ load: () => Promise<void>;
28
+ save: (kiosk: MfKioskOrderSetting) => Promise<void>;
29
+ };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The payment device (payment-service "terminal") that a kiosk uses.
3
+ *
4
+ * A kiosk and its payment device are joined by name: payment-service stores the
5
+ * kiosk as deviceId `<restaurantId>-<machineId>` (see `terminalDeviceId`).
6
+ *
7
+ * The portal endpoint we read (`GET /portal/restaurants/:id/terminals`) returns the
8
+ * whole terminal, secrets included (secretKey, token, securityCode, bindCode, ECR
9
+ * private keys). `toKioskPaymentDevice` copies only the fields below, one by one,
10
+ * so no secret ever reaches the store or the page. Never spread the raw object.
11
+ */
12
+ export interface KioskPaymentDeviceEcr {
13
+ gateway: string;
14
+ merchantId: string | null;
15
+ terminalId: string | null;
16
+ }
17
+ export interface KioskPaymentDevice {
18
+ /** payment-service terminal _id, used in the payment portal URL. */
19
+ id: string;
20
+ name: string | null;
21
+ deviceId: string;
22
+ status: string | null;
23
+ /** "SoftPos Gateway" tab. */
24
+ softPosGateways: string[];
25
+ /** "ECR Gateway" tab, remote ECR (has terminal / merchant IDs). */
26
+ ecrs: KioskPaymentDeviceEcr[];
27
+ /** "ECR Gateway" tab, ECR integrations on the device (cable / IP). */
28
+ ecrIntegrations: string[];
29
+ /** "QR Gateway" tab. */
30
+ qrGateways: string[];
31
+ }
32
+ /** The fields `toKioskPaymentDevice` may return. A test fails if this list grows a secret. */
33
+ export declare const KIOSK_PAYMENT_DEVICE_FIELDS: readonly ["id", "name", "deviceId", "status", "softPosGateways", "ecrs", "ecrIntegrations", "qrGateways"];
34
+ export declare const KIOSK_PAYMENT_DEVICE_ECR_FIELDS: readonly ["gateway", "merchantId", "terminalId"];
35
+ /** Copy the safe fields of one payment-service terminal. Null when it has no kiosk link. */
36
+ export declare function toKioskPaymentDevice(raw: unknown): KioskPaymentDevice | null;
37
+ export declare function toKioskPaymentDevices(raw: unknown): KioskPaymentDevice[];
38
+ export interface PaymentPortalContext {
39
+ country?: string | null;
40
+ businessId?: string | null;
41
+ restaurantId?: string | null;
42
+ }
43
+ /**
44
+ * The payment portal's kiosk page, as support opens it today:
45
+ * `<portal>/payment/admin/terminal/kiosk/<terminal id>?country=..&businessId=..&restaurantId=..`
46
+ */
47
+ export declare function paymentPortalKioskUrl(portalOrigin: string, terminalId: string, ctx: PaymentPortalContext): string;
48
+ /** What an older kiosk app reports about the GHL terminal it was set up with. */
49
+ export interface KioskReportedTerminal {
50
+ gateway: string;
51
+ merchantId: string;
52
+ terminalId: string;
53
+ }
54
+ /**
55
+ * True when the kiosk reports a GHL terminal that the payment device does not have
56
+ * among its GHL ECR gateways (Ghl, Ghl2, Ghl3).
57
+ */
58
+ export declare function reportedTerminalDiffers(reported: KioskReportedTerminal | null | undefined, device: KioskPaymentDevice | null): boolean;
@@ -105,10 +105,32 @@ export declare const useKioskStore: import("pinia").StoreDefinition<"kiosk", Pic
105
105
  operatingSystem?: string | undefined;
106
106
  osVersion?: string | undefined;
107
107
  lastStartup?: Date | undefined;
108
+ licenseId?: string | undefined;
109
+ licenseExpiredAt?: Date | undefined;
108
110
  }[];
111
+ licenses: {
112
+ verified: boolean;
113
+ unlimited: boolean;
114
+ tabletMayUseKioskLicense: boolean;
115
+ licenses: {
116
+ id: string;
117
+ type: import("@/modules/kiosk/license").MfKioskLicenseType;
118
+ expiredAt: string;
119
+ status: import("@/modules/kiosk/license").MfKioskLicenseStatus;
120
+ device: {
121
+ machineId: string;
122
+ name?: string | null | undefined;
123
+ restaurantId: string;
124
+ restaurantName?: string | null | undefined;
125
+ deviceAppType?: string | null | undefined;
126
+ lastStartup?: string | null | undefined;
127
+ } | null;
128
+ }[];
129
+ } | null;
109
130
  };
110
131
  requestOtp: () => Promise<void>;
111
132
  getDevices: () => Promise<void>;
133
+ getLicenses: () => Promise<void>;
112
134
  unbind: (machineId: string) => Promise<void>;
113
135
  updateDevicePin: (pinInfo: string, machineId: string) => Promise<void>;
114
136
  updateDeviceRemark: (remarkInfo: string | null, machineId: string) => Promise<void>;
@@ -219,10 +241,32 @@ export declare const useKioskStore: import("pinia").StoreDefinition<"kiosk", Pic
219
241
  operatingSystem?: string | undefined;
220
242
  osVersion?: string | undefined;
221
243
  lastStartup?: Date | undefined;
244
+ licenseId?: string | undefined;
245
+ licenseExpiredAt?: Date | undefined;
222
246
  }[];
247
+ licenses: {
248
+ verified: boolean;
249
+ unlimited: boolean;
250
+ tabletMayUseKioskLicense: boolean;
251
+ licenses: {
252
+ id: string;
253
+ type: import("@/modules/kiosk/license").MfKioskLicenseType;
254
+ expiredAt: string;
255
+ status: import("@/modules/kiosk/license").MfKioskLicenseStatus;
256
+ device: {
257
+ machineId: string;
258
+ name?: string | null | undefined;
259
+ restaurantId: string;
260
+ restaurantName?: string | null | undefined;
261
+ deviceAppType?: string | null | undefined;
262
+ lastStartup?: string | null | undefined;
263
+ } | null;
264
+ }[];
265
+ } | null;
223
266
  };
224
267
  requestOtp: () => Promise<void>;
225
268
  getDevices: () => Promise<void>;
269
+ getLicenses: () => Promise<void>;
226
270
  unbind: (machineId: string) => Promise<void>;
227
271
  updateDevicePin: (pinInfo: string, machineId: string) => Promise<void>;
228
272
  updateDeviceRemark: (remarkInfo: string | null, machineId: string) => Promise<void>;
@@ -333,11 +377,33 @@ export declare const useKioskStore: import("pinia").StoreDefinition<"kiosk", Pic
333
377
  operatingSystem?: string | undefined;
334
378
  osVersion?: string | undefined;
335
379
  lastStartup?: Date | undefined;
380
+ licenseId?: string | undefined;
381
+ licenseExpiredAt?: Date | undefined;
336
382
  }[];
383
+ licenses: {
384
+ verified: boolean;
385
+ unlimited: boolean;
386
+ tabletMayUseKioskLicense: boolean;
387
+ licenses: {
388
+ id: string;
389
+ type: import("@/modules/kiosk/license").MfKioskLicenseType;
390
+ expiredAt: string;
391
+ status: import("@/modules/kiosk/license").MfKioskLicenseStatus;
392
+ device: {
393
+ machineId: string;
394
+ name?: string | null | undefined;
395
+ restaurantId: string;
396
+ restaurantName?: string | null | undefined;
397
+ deviceAppType?: string | null | undefined;
398
+ lastStartup?: string | null | undefined;
399
+ } | null;
400
+ }[];
401
+ } | null;
337
402
  };
338
403
  requestOtp: () => Promise<void>;
339
404
  getDevices: () => Promise<void>;
405
+ getLicenses: () => Promise<void>;
340
406
  unbind: (machineId: string) => Promise<void>;
341
407
  updateDevicePin: (pinInfo: string, machineId: string) => Promise<void>;
342
408
  updateDeviceRemark: (remarkInfo: string | null, machineId: string) => Promise<void>;
343
- }, "requestOtp" | "getDevices" | "unbind" | "updateDevicePin" | "updateDeviceRemark">>;
409
+ }, "requestOtp" | "getDevices" | "getLicenses" | "unbind" | "updateDevicePin" | "updateDeviceRemark">>;
@@ -237,6 +237,8 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
237
237
  };
238
238
  }[] | null | undefined;
239
239
  disableRemoteQueue?: boolean | null | undefined;
240
+ requireEntranceCode?: boolean | null | undefined;
241
+ entranceCodeResetTime?: string | null | undefined;
240
242
  disableSMS?: boolean | null | undefined;
241
243
  autoCancelCalledMinutes?: number | null | undefined;
242
244
  calledMessage?: string | null | undefined;
@@ -305,10 +307,11 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
305
307
  dineInCanTakeaway: boolean;
306
308
  };
307
309
  } | undefined;
310
+ restaurantId?: string | undefined;
308
311
  };
309
- getSetting: () => Promise<void>;
310
- updateKioskSetting: () => Promise<void>;
311
- setKioskOrderSetting: (kioskOrderSetting: MfKioskOrderSetting) => void;
312
+ getSetting: (isCurrent?: () => boolean) => Promise<void>;
313
+ reset: () => void;
314
+ updateKioskSetting: (kiosk: MfKioskOrderSetting) => Promise<void>;
312
315
  }, "state">, Pick<{
313
316
  state: {
314
317
  kiosk?: {
@@ -547,6 +550,8 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
547
550
  };
548
551
  }[] | null | undefined;
549
552
  disableRemoteQueue?: boolean | null | undefined;
553
+ requireEntranceCode?: boolean | null | undefined;
554
+ entranceCodeResetTime?: string | null | undefined;
550
555
  disableSMS?: boolean | null | undefined;
551
556
  autoCancelCalledMinutes?: number | null | undefined;
552
557
  calledMessage?: string | null | undefined;
@@ -615,10 +620,11 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
615
620
  dineInCanTakeaway: boolean;
616
621
  };
617
622
  } | undefined;
623
+ restaurantId?: string | undefined;
618
624
  };
619
- getSetting: () => Promise<void>;
620
- updateKioskSetting: () => Promise<void>;
621
- setKioskOrderSetting: (kioskOrderSetting: MfKioskOrderSetting) => void;
625
+ getSetting: (isCurrent?: () => boolean) => Promise<void>;
626
+ reset: () => void;
627
+ updateKioskSetting: (kiosk: MfKioskOrderSetting) => Promise<void>;
622
628
  }, never>, Pick<{
623
629
  state: {
624
630
  kiosk?: {
@@ -857,6 +863,8 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
857
863
  };
858
864
  }[] | null | undefined;
859
865
  disableRemoteQueue?: boolean | null | undefined;
866
+ requireEntranceCode?: boolean | null | undefined;
867
+ entranceCodeResetTime?: string | null | undefined;
860
868
  disableSMS?: boolean | null | undefined;
861
869
  autoCancelCalledMinutes?: number | null | undefined;
862
870
  calledMessage?: string | null | undefined;
@@ -925,8 +933,9 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
925
933
  dineInCanTakeaway: boolean;
926
934
  };
927
935
  } | undefined;
936
+ restaurantId?: string | undefined;
928
937
  };
929
- getSetting: () => Promise<void>;
930
- updateKioskSetting: () => Promise<void>;
931
- setKioskOrderSetting: (kioskOrderSetting: MfKioskOrderSetting) => void;
932
- }, "getSetting" | "updateKioskSetting" | "setKioskOrderSetting">>;
938
+ getSetting: (isCurrent?: () => boolean) => Promise<void>;
939
+ reset: () => void;
940
+ updateKioskSetting: (kiosk: MfKioskOrderSetting) => Promise<void>;
941
+ }, "reset" | "getSetting" | "updateKioskSetting">>;
@@ -1,4 +1,5 @@
1
1
  import type { PaymentCheckoutLoadError, TerminalCheckoutsDto } from '@/modules/payment/interface';
2
+ import type { KioskPaymentDevice } from '@/modules/payment/paymentDevice';
2
3
  export declare function terminalDeviceId(restaurantId: string, machineId: string): string;
3
4
  export declare const usePaymentStore: import("pinia").StoreDefinition<"payment", Pick<{
4
5
  state: {
@@ -20,9 +21,28 @@ export declare const usePaymentStore: import("pinia").StoreDefinition<"payment",
20
21
  }[];
21
22
  }[];
22
23
  loadError: PaymentCheckoutLoadError | null;
24
+ paymentDevices: {
25
+ id: string;
26
+ name: string | null;
27
+ deviceId: string;
28
+ status: string | null;
29
+ softPosGateways: string[];
30
+ ecrs: {
31
+ gateway: string;
32
+ merchantId: string | null;
33
+ terminalId: string | null;
34
+ }[];
35
+ ecrIntegrations: string[];
36
+ qrGateways: string[];
37
+ }[] | null;
38
+ paymentDevicesLoading: boolean;
39
+ paymentDevicesLoadError: PaymentCheckoutLoadError | null;
23
40
  };
24
41
  loadCheckouts: () => Promise<void>;
25
42
  terminalForDevice: (restaurantId: string, machineId: string) => TerminalCheckoutsDto | null;
43
+ loadPaymentDevices: () => Promise<void>;
44
+ clearPaymentDevices: () => void;
45
+ paymentDeviceFor: (restaurantId: string, machineId: string) => KioskPaymentDevice | null;
26
46
  }, "state">, Pick<{
27
47
  state: {
28
48
  terminals: {
@@ -43,9 +63,28 @@ export declare const usePaymentStore: import("pinia").StoreDefinition<"payment",
43
63
  }[];
44
64
  }[];
45
65
  loadError: PaymentCheckoutLoadError | null;
66
+ paymentDevices: {
67
+ id: string;
68
+ name: string | null;
69
+ deviceId: string;
70
+ status: string | null;
71
+ softPosGateways: string[];
72
+ ecrs: {
73
+ gateway: string;
74
+ merchantId: string | null;
75
+ terminalId: string | null;
76
+ }[];
77
+ ecrIntegrations: string[];
78
+ qrGateways: string[];
79
+ }[] | null;
80
+ paymentDevicesLoading: boolean;
81
+ paymentDevicesLoadError: PaymentCheckoutLoadError | null;
46
82
  };
47
83
  loadCheckouts: () => Promise<void>;
48
84
  terminalForDevice: (restaurantId: string, machineId: string) => TerminalCheckoutsDto | null;
85
+ loadPaymentDevices: () => Promise<void>;
86
+ clearPaymentDevices: () => void;
87
+ paymentDeviceFor: (restaurantId: string, machineId: string) => KioskPaymentDevice | null;
49
88
  }, never>, Pick<{
50
89
  state: {
51
90
  terminals: {
@@ -66,7 +105,26 @@ export declare const usePaymentStore: import("pinia").StoreDefinition<"payment",
66
105
  }[];
67
106
  }[];
68
107
  loadError: PaymentCheckoutLoadError | null;
108
+ paymentDevices: {
109
+ id: string;
110
+ name: string | null;
111
+ deviceId: string;
112
+ status: string | null;
113
+ softPosGateways: string[];
114
+ ecrs: {
115
+ gateway: string;
116
+ merchantId: string | null;
117
+ terminalId: string | null;
118
+ }[];
119
+ ecrIntegrations: string[];
120
+ qrGateways: string[];
121
+ }[] | null;
122
+ paymentDevicesLoading: boolean;
123
+ paymentDevicesLoadError: PaymentCheckoutLoadError | null;
69
124
  };
70
125
  loadCheckouts: () => Promise<void>;
71
126
  terminalForDevice: (restaurantId: string, machineId: string) => TerminalCheckoutsDto | null;
72
- }, "loadCheckouts" | "terminalForDevice">>;
127
+ loadPaymentDevices: () => Promise<void>;
128
+ clearPaymentDevices: () => void;
129
+ paymentDeviceFor: (restaurantId: string, machineId: string) => KioskPaymentDevice | null;
130
+ }, "loadCheckouts" | "terminalForDevice" | "loadPaymentDevices" | "clearPaymentDevices" | "paymentDeviceFor">>;
@@ -0,0 +1,38 @@
1
+ import dayjs from 'dayjs';
2
+ import type { FoodCourtOrderExportRow } from '@/api/food-court';
3
+ type Cell = string | number | null;
4
+ interface ExportColumn {
5
+ header: string;
6
+ definition: string;
7
+ value: (row: FoodCourtOrderExportRow) => Cell;
8
+ }
9
+ /** A time as the sheet shows it, in the browser's zone (the court's, for a user on site). */
10
+ export declare function exportTime(iso: string | null): string | null;
11
+ /**
12
+ * The export's columns, headers and definitions exactly as Food Court
13
+ * Operations specified them (KDI-4942 sample report, "Food Court Sample
14
+ * Report.xlsx"). The definitions are the sheet's second row (AC6).
15
+ */
16
+ export declare const EXPORT_COLUMNS: ExportColumn[];
17
+ /** Header row, definitions row, then one row per stall order. */
18
+ export declare function exportSheetRows(rows: FoodCourtOrderExportRow[]): Cell[][];
19
+ /**
20
+ * `[Food Court Name]_[YYYYMMDD]-[YYYYMMDD].xlsx`, e.g.
21
+ * `Main_Wesria_20260610-20260611.xlsx`: spaces become underscores and
22
+ * characters a file name cannot hold are dropped. A one-day range repeats the day.
23
+ */
24
+ export declare function exportFileName(courtName: string | null, range: {
25
+ startDate: string | null;
26
+ endDate: string | null;
27
+ }, now?: dayjs.Dayjs): string;
28
+ /** 0 → A, 25 → Z, 26 → AA. */
29
+ export declare function columnLetter(index: number): string;
30
+ /**
31
+ * The workbook bytes: one "Orders" sheet, written directly as SpreadsheetML and
32
+ * zipped with fflate. Not SheetJS: its npm release (0.18.5) carries HIGH CVEs
33
+ * (Trivy, PR #2278) and later releases are only on the vendor's CDN.
34
+ */
35
+ export declare function buildExportWorkbook(rows: FoodCourtOrderExportRow[]): Uint8Array;
36
+ /** Build the workbook and hand it to the browser as a download. */
37
+ export declare function downloadExport(fileName: string, rows: FoodCourtOrderExportRow[]): void;
38
+ export {};
@@ -1,6 +1,9 @@
1
1
  import type { MfKioskDevice } from '@/modules/kiosk/interface';
2
+ import { type MfKioskLicenseType } from '@/modules/kiosk/license';
2
3
  interface Props {
3
4
  device: MfKioskDevice;
5
+ /** Type of the licence this device holds, when the licence list loaded. */
6
+ licenseType?: MfKioskLicenseType;
4
7
  }
5
8
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
9
  export default _default;
@@ -1,8 +1,13 @@
1
1
  import type { MfKioskDevice } from '@/modules/kiosk/interface';
2
+ import type { MfKioskLicenseList } from '@/modules/kiosk/license';
2
3
  interface Props {
3
4
  devices: MfKioskDevice[];
5
+ /** The business's licences; null when they could not be loaded. */
6
+ licenses?: MfKioskLicenseList | null;
4
7
  /** Why the device list failed to load, if at all. 'forbidden' === HTTP 403. */
5
8
  loadError?: 'forbidden' | 'error' | null;
9
+ /** True while the device list is loading; an empty list then means "not loaded yet". */
10
+ loading?: boolean;
6
11
  }
7
12
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
13
  retry: () => any;
@@ -11,6 +16,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
11
16
  onRetry?: (() => any) | undefined;
12
17
  onRequestOtp?: (() => any) | undefined;
13
18
  }>, {
19
+ licenses: MfKioskLicenseList | null;
14
20
  loadError: "forbidden" | "error" | null;
21
+ loading: boolean;
15
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
23
  export default _default;
@@ -0,0 +1,7 @@
1
+ import { type MfKioskLicenseList } from '@/modules/kiosk/license';
2
+ type __VLS_Props = {
3
+ /** Null when the licence list could not be loaded; `verified: false` when the licence service was down. */
4
+ licenses: MfKioskLicenseList | null;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { type MfKioskLicenseList } from '@/modules/kiosk/license';
2
+ type __VLS_Props = {
3
+ licenses: MfKioskLicenseList | null;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -1,5 +1,8 @@
1
+ import { type MfKioskLicenseList } from '@/modules/kiosk/license';
1
2
  interface Props {
2
3
  otp: string;
4
+ /** The business's licences, when they loaded. */
5
+ licenses?: MfKioskLicenseList | null;
3
6
  }
4
7
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
8
  export default _default;
@@ -0,0 +1,17 @@
1
+ import { type KioskPaymentDevice, type KioskReportedTerminal } from '@/modules/payment/paymentDevice';
2
+ type __VLS_Props = {
3
+ paymentDevice: KioskPaymentDevice | null;
4
+ loading: boolean;
5
+ loadError: boolean;
6
+ /** `<restaurantId>-<machineId>`: what payment-service should call this kiosk. */
7
+ expectedDeviceId: string;
8
+ portalUrl: string | null;
9
+ /** Terminal the kiosk app itself reported (older GHL setups). */
10
+ reported?: KioskReportedTerminal | null;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ retry: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onRetry?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -1,11 +1,14 @@
1
1
  import type { MfKioskOrderSetting, MfKioskOrderSettingForm } from '@/modules/order-setting/kiosk/interface';
2
2
  interface Props {
3
3
  restaurantId: string;
4
+ /** This outlet's saved settings. The form edits a copy (the draft), never this object. */
4
5
  form: MfKioskOrderSettingForm;
6
+ /** Saves the settings; resolves only after the backend accepted them, rejects on failure. */
7
+ save: (form: MfKioskOrderSetting) => Promise<void>;
5
8
  }
6
9
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- updateKioskOrderSetting: (form: MfKioskOrderSetting) => any;
10
+ dirtyChange: (dirty: boolean) => any;
8
11
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
9
- onUpdateKioskOrderSetting?: ((form: MfKioskOrderSetting) => any) | undefined;
12
+ onDirtyChange?: ((dirty: boolean) => any) | undefined;
10
13
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
14
  export default _default;