@feedmepos/mf-order-setting 0.0.87 → 0.0.88

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 (46) hide show
  1. package/dist/{DisplaySystemView-Dx4As33V.js → DisplaySystemView-BiKFL6UY.js} +1 -1
  2. package/dist/{KioskDevicesView-Ziu9ekHK.js → KioskDevicesView-DQPue13D.js} +1 -1
  3. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-Bki-OF23.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-BAe1eQvx.js} +3 -3
  4. package/dist/{KioskSettingView-BlLW-tDD.js → KioskSettingView-M3pBFSwt.js} +3 -3
  5. package/dist/{KioskView-CzlaEjMR.js → KioskView-BfTNsmN1.js} +5 -5
  6. package/dist/OrderSettingsView-CowX8_oN.js +69743 -0
  7. package/dist/{app-C8jy3wlN.js → app-DgZSoUgk.js} +947 -885
  8. package/dist/app.js +1 -1
  9. package/dist/frontend/mf-order/src/app.d.ts +8 -0
  10. package/dist/frontend/mf-order/src/main.d.ts +8 -0
  11. package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue.d.ts +18 -8
  12. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  13. package/dist/{index-DiRlxqKH.js → index-CGJIcLNE.js} +2 -2
  14. package/dist/{index-DNvUwB59.js → index-CWm0u6lo.js} +1 -1
  15. package/dist/{index-VtBPFvME.js → index-DzmXxFJu.js} +1 -1
  16. package/dist/order.dto-DQWf-RVV.js +40244 -0
  17. package/dist/package/entity/alert/suggestion.dto.d.ts +6 -0
  18. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +96 -0
  19. package/dist/package/entity/incoming-order/incoming-order.do.d.ts +22 -0
  20. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +1 -0
  21. package/dist/package/entity/index.d.ts +2 -0
  22. package/dist/package/entity/order/order.do.d.ts +56 -0
  23. package/dist/package/entity/order/order.dto.d.ts +86 -0
  24. package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +376 -0
  25. package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.dto.d.ts +102 -0
  26. package/dist/package/entity/order-platform/order-platform.dto.d.ts +82 -0
  27. package/dist/package/entity/queue/queue.do.d.ts +76 -0
  28. package/dist/style.css +1 -1
  29. package/package.json +3 -3
  30. package/src/locales/en-US.json +2 -0
  31. package/src/locales/ja-JP.json +2 -0
  32. package/src/locales/th-TH.json +2 -0
  33. package/src/locales/zh-CN.json +2 -0
  34. package/src/views/order-settings/delivery/DeliverySetting.vue +1 -0
  35. package/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue +15 -0
  36. package/src/views/order-settings/delivery/integrated-delivery/DeliverooSetting.vue +2 -0
  37. package/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue +18 -1
  38. package/src/views/order-settings/delivery/integrated-delivery/GoFoodSetting.vue +3 -1
  39. package/src/views/order-settings/delivery/integrated-delivery/GrabfoodSetting.vue +3 -1
  40. package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +28 -0
  41. package/src/views/order-settings/delivery/integrated-delivery/ShopeefoodSetting.vue +3 -1
  42. package/src/views/order-settings/delivery/integrated-delivery/TngSetting.vue +7 -3
  43. package/src/views/order-settings/dine-in/DineInSetting.vue +14 -0
  44. package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +13 -0
  45. package/dist/OrderSettingsView-B69It-yu.js +0 -69105
  46. package/dist/order.dto-CFw4X11T.js +0 -39292
@@ -1277,6 +1277,7 @@ async function updateDelivery(
1277
1277
  autoCloseBill: integratedDocument.autoCloseBill,
1278
1278
  printReceiptAfterClose: integratedDocument.printReceiptAfterClose,
1279
1279
  canRemark: integratedDocument.canRemark,
1280
+ allowReject: integratedDocument.allowReject,
1280
1281
  status: integratedDocument.status,
1281
1282
  dineIn: cleanFulfillment(integratedDocument.dineIn),
1282
1283
  pickup: cleanFulfillment(integratedDocument.pickup),
@@ -114,6 +114,10 @@ function updatePrintReceiptAfterClose(printReceiptAfterClose: boolean) {
114
114
  emits('update:order-settings', { ...props.orderInhouseDeliverySettings, printReceiptAfterClose })
115
115
  }
116
116
 
117
+ function updateAllowReject(allowReject: boolean) {
118
+ emits('update:order-settings', { ...props.orderInhouseDeliverySettings, allowReject })
119
+ }
120
+
117
121
  const inhouse = reactive<InhouseDialogData>(
118
122
  props.initialValue
119
123
  ? clone(props.initialValue)
@@ -326,6 +330,17 @@ const actualDeliveryTime = computed({
326
330
  />
327
331
  </div>
328
332
 
333
+ <div class="mb-5">
334
+ <FmSwitch
335
+ :model-value="orderInhouseDeliverySettings.allowReject ?? true"
336
+ value="allowReject"
337
+ :label="t('order.allowRejectOnPos')"
338
+ :sublabel="t('order.allowRejectOnPosSublabel')"
339
+ label-placement="right"
340
+ @update:model-value="updateAllowReject"
341
+ />
342
+ </div>
343
+
329
344
  <div class="mb-5">
330
345
  <FmSelect
331
346
  :model-value="inhouse.catalogId"
@@ -50,6 +50,7 @@ const modelValue = computed<IntegratedDeliverySettingData>(() => {
50
50
  updatedAt: auto.updatedAt,
51
51
  printReceiptAfterClose: auto.printReceiptAfterClose ?? true,
52
52
  menuSyncError: auto.menuSyncError,
53
+ allowReject: auto.allowReject,
53
54
  commissionRate: 0 // always 0
54
55
  }
55
56
  }
@@ -102,6 +103,7 @@ async function cancelTestOrder() {}
102
103
  :model-value="modelValue"
103
104
  :company="company"
104
105
  :can-use-auto-delivery-integration="canUseAutoDeliveryIntegration"
106
+ show-allow-reject
105
107
  @update:model-value="updateDataPass"
106
108
  @sync-menu="syncMenu"
107
109
  @flow-test-order="flowTestOrder"
@@ -31,6 +31,15 @@
31
31
  value=""
32
32
  />
33
33
  </div>
34
+ <div class="mt-3">
35
+ <FmSwitch
36
+ :model-value="data.config.allowReject ?? true"
37
+ :label="t('order.allowRejectOnPos')"
38
+ :sublabel="t('order.allowRejectOnPosSublabel')"
39
+ label-placement="right"
40
+ @update:model-value="updateAllowReject"
41
+ />
42
+ </div>
34
43
  </div>
35
44
  <div v-if="data.enable">
36
45
  <FmCard variant="outlined" class="mt-6 p-5">
@@ -149,7 +158,10 @@ const data = reactive<FdoExternalSetting>({
149
158
  printReceiptAfterClose: props.initialValue.config?.printReceiptAfterClose,
150
159
  bypass: props.initialValue.config?.bypass,
151
160
  skipAllocateTax: props.initialValue.config?.skipAllocateTax,
152
- groupItemsBySubCategory: props.initialValue.config?.groupItemsBySubCategory
161
+ groupItemsBySubCategory: props.initialValue.config?.groupItemsBySubCategory,
162
+ // Left undefined when unset so the backend's per-key config merge keeps the
163
+ // stored value; nullish means reject allowed.
164
+ allowReject: props.initialValue.config?.allowReject
153
165
  },
154
166
  platform: props.initialValue.platform ?? F_ORDER_PLATFORM.enum.ZUS,
155
167
  delivery: cloneMenuOrderTypeSetting(props.initialValue.delivery),
@@ -212,6 +224,11 @@ function updatePrintReceiptAfterClose(value: boolean) {
212
224
  emitUpdatedValue()
213
225
  }
214
226
 
227
+ function updateAllowReject(value: boolean) {
228
+ data.config.allowReject = value
229
+ emitUpdatedValue()
230
+ }
231
+
215
232
  function updateEnable(value: boolean) {
216
233
  data.enable = value
217
234
  emitUpdatedValue()
@@ -53,7 +53,8 @@ const modelValue = computed<IntegratedDeliverySettingData>(() => {
53
53
  lastSynchronize: auto.lastSynchronize,
54
54
  status: auto.status,
55
55
  updatedAt: auto.updatedAt,
56
- menuSyncError: auto.menuSyncError
56
+ menuSyncError: auto.menuSyncError,
57
+ allowReject: auto.allowReject
57
58
  }
58
59
  }
59
60
  })
@@ -100,6 +101,7 @@ async function syncMenu() {
100
101
  :model-value="modelValue"
101
102
  :company="company"
102
103
  :can-use-auto-delivery-integration="canUseAutoDeliveryIntegration"
104
+ show-allow-reject
103
105
  @update:model-value="updateDataPass"
104
106
  @sync-menu="syncMenu"
105
107
  />
@@ -57,7 +57,8 @@ const modelValue = computed<IntegratedDeliverySettingData>(() => {
57
57
  ignoreDiscount: auto.ignoreDiscount ?? false,
58
58
  status: auto.status,
59
59
  updatedAt: auto.updatedAt,
60
- menuSyncError: auto.menuSyncError
60
+ menuSyncError: auto.menuSyncError,
61
+ allowReject: auto.allowReject
61
62
  }
62
63
  }
63
64
  })
@@ -147,6 +148,7 @@ async function startSelfServeFlow() {
147
148
  :company="company"
148
149
  :can-use-auto-delivery-integration="canUseAutoDeliveryIntegration"
149
150
  :always-show-menu-sync-error="true"
151
+ show-allow-reject
150
152
  @update:model-value="updateDataPass"
151
153
  @sync-menu="syncMenu"
152
154
  @flow-test-order="flowTestOrder"
@@ -30,6 +30,9 @@ export interface AutoIntegrateData {
30
30
  menuSyncError?: string | null
31
31
  sstInclusive?: boolean | null
32
32
  printReceiptAfterClose?: boolean | null
33
+ // Unset means "reject allowed"; it stays undefined until the merchant toggles
34
+ // it, so saving another field never writes it.
35
+ allowReject?: boolean | null
33
36
  }
34
37
 
35
38
  export interface IntegratedDeliverySettingData {
@@ -73,6 +76,13 @@ const props = defineProps({
73
76
  syncMenuLoading: {
74
77
  type: Boolean,
75
78
  default: false
79
+ },
80
+ // Opt-in rather than presence-gated like the order-setting checkboxes: an
81
+ // unset `allowReject` loads as undefined, which presence-gating would read
82
+ // as "platform has no such setting".
83
+ showAllowReject: {
84
+ type: Boolean,
85
+ default: false
76
86
  }
77
87
  })
78
88
 
@@ -268,6 +278,13 @@ function updateOrderSettings(orderSettingKeys: OrderSettingKey[]) {
268
278
  }))
269
279
  }
270
280
 
281
+ function updateAllowReject(allowReject: boolean) {
282
+ updateAuto((oldV) => ({
283
+ ...oldV,
284
+ allowReject
285
+ }))
286
+ }
287
+
271
288
  function convertStatusI18n(status: string) {
272
289
  switch (status) {
273
290
  case 'PROCESSING':
@@ -351,6 +368,17 @@ const formattedMenuSyncError = computed(() => {
351
368
  />
352
369
  </div>
353
370
 
371
+ <FmSwitch
372
+ v-if="showAllowReject"
373
+ class="mt-3"
374
+ :disabled="!canEdit"
375
+ :model-value="modelValue.auto.allowReject ?? true"
376
+ :label="t('order.allowRejectOnPos')"
377
+ :sublabel="t('order.allowRejectOnPosSublabel')"
378
+ label-placement="right"
379
+ @update:model-value="updateAllowReject"
380
+ />
381
+
354
382
  <slot name="order-setting" :editable="!canEdit" />
355
383
  </div>
356
384
 
@@ -52,7 +52,8 @@ const modelValue = computed<IntegratedDeliverySettingData>(() => {
52
52
  ignoreDiscount: auto.ignoreDiscount ?? false,
53
53
  status: auto.status,
54
54
  updatedAt: auto.updatedAt,
55
- menuSyncError: auto.menuSyncError
55
+ menuSyncError: auto.menuSyncError,
56
+ allowReject: auto.allowReject
56
57
  }
57
58
  }
58
59
  })
@@ -126,6 +127,7 @@ async function cancelTestOrder() {
126
127
  :model-value="modelValue"
127
128
  :company="company"
128
129
  :can-use-auto-delivery-integration="canUseAutoDeliveryIntegration"
130
+ show-allow-reject
129
131
  @update:model-value="updateDataPass"
130
132
  @sync-menu="syncMenu"
131
133
  @flow-test-order="flowTestOrder"
@@ -117,7 +117,8 @@ const modelValue = computed<IntegratedDeliverySettingData>(() => {
117
117
  status: auto.status,
118
118
  updatedAt: auto.updatedAt,
119
119
  lastSynchronize: auto.lastSynchronize,
120
- menuSyncError: auto.menuSyncError?.message ?? null
120
+ menuSyncError: auto.menuSyncError?.message ?? null,
121
+ allowReject: auto.allowReject
121
122
  }
122
123
  }
123
124
  })
@@ -169,7 +170,8 @@ function updateModelValue({ manual, auto }: IntegratedDeliverySettingData) {
169
170
  autoCloseBill,
170
171
  printReceiptAfterClose,
171
172
  canRemark,
172
- status
173
+ status,
174
+ allowReject
173
175
  } = auto
174
176
 
175
177
  data.manual = manual
@@ -181,7 +183,8 @@ function updateModelValue({ manual, auto }: IntegratedDeliverySettingData) {
181
183
  printReceiptAfterClose: printReceiptAfterClose ?? true,
182
184
  canRemark: canRemark ?? true,
183
185
  partnerMerchantId: integrationId,
184
- status: status ?? data.integrated.status
186
+ status: status ?? data.integrated.status,
187
+ allowReject
185
188
  }
186
189
 
187
190
  emitUpdatedTngSettings()
@@ -484,6 +487,7 @@ function toggleItemSelection(itemId: string, isSelected: boolean) {
484
487
  :company="company"
485
488
  :can-use-auto-delivery-integration="canUseAutoDeliveryIntegration"
486
489
  :show-test-order-actions="false"
490
+ show-allow-reject
487
491
  @update:model-value="updateModelValue"
488
492
  @sync-menu="syncMenu"
489
493
  >
@@ -143,6 +143,14 @@
143
143
  label-placement="right"
144
144
  @update:model-value="updatePrintReceiptAfterClose"
145
145
  ></FmSwitch>
146
+
147
+ <FmSwitch
148
+ :model-value="orderSetting?.dineInSettings?.allowReject ?? true"
149
+ :label="t('order.allowRejectOnPos')"
150
+ :sublabel="t('order.allowRejectOnPosSublabel')"
151
+ label-placement="right"
152
+ @update:model-value="updateAllowReject"
153
+ ></FmSwitch>
146
154
  </div>
147
155
  <div class="p-[1.5rem] flex flex-col gap-2 m-5 w-2/3">
148
156
  <PaymentType
@@ -313,6 +321,12 @@ function updatePrintReceiptAfterClose(v: boolean) {
313
321
  if (dineInSettings) dineInSettings.printReceiptAfterClose = v
314
322
  }
315
323
 
324
+ // Unset means "reject allowed"; only a merchant toggle writes an explicit value.
325
+ function updateAllowReject(v: boolean) {
326
+ const dineInSettings = ensureOrderDineInSettings()
327
+ if (dineInSettings) dineInSettings.allowReject = v
328
+ }
329
+
316
330
  // Threshold mirrors backend `posSupportsDineInRemarkMerge` — must be kept
317
331
  // in lockstep. Restaurants on older POS see the toggle disabled with a
318
332
  // "requires version X+" hint instead of a hidden control.
@@ -49,6 +49,15 @@
49
49
  label-placement="right"
50
50
  @update:model-value="updatePrintReceiptAfterClose"
51
51
  />
52
+ <FmSwitch
53
+ class="mt-5"
54
+ :model-value="orderPickupSettings.allowReject ?? true"
55
+ value="allowReject"
56
+ :label="t('order.allowRejectOnPos')"
57
+ :sublabel="t('order.allowRejectOnPosSublabel')"
58
+ label-placement="right"
59
+ @update:model-value="updateAllowReject"
60
+ />
52
61
  <FmCard variant="outlined" class="p-5 mt-10">
53
62
  <Preorder :model-value="pickupData" @update:model-value="updatePickupSetting" />
54
63
  </FmCard>
@@ -173,6 +182,10 @@ const {
173
182
  function updatePrintReceiptAfterClose(printReceiptAfterClose: boolean) {
174
183
  emits('update-order-settings', { ...props.orderPickupSettings, printReceiptAfterClose })
175
184
  }
185
+
186
+ function updateAllowReject(allowReject: boolean) {
187
+ emits('update-order-settings', { ...props.orderPickupSettings, allowReject })
188
+ }
176
189
  const pickupSetting = ref<FdoRestaurantPickup>(defaultPickupSetting())
177
190
  const pickupData = computed<PreorderData | null>(() => {
178
191
  if (!pickupSetting.value.pickupTime) {