@feedmepos/mf-order-setting 0.0.22 → 0.0.24

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/{KioskDevicesView-C6YmdLKc.js → KioskDevicesView-DGkvW2mH.js} +1 -1
  2. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DiLHpWbm.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-BGZLd8T_.js} +2 -2
  3. package/dist/KioskSettingView-DLb5nnCu.js +821 -0
  4. package/dist/KioskView-kZZYSfUh.js +430 -0
  5. package/dist/{OrderSettingsView-D_bGK-3J.js → OrderSettingsView-Cil4j9G5.js} +14 -11
  6. package/dist/{app-C5qwExhL.js → app-D47VRl5B.js} +47 -39
  7. package/dist/app.js +1 -1
  8. package/dist/{dayjs.min-kEC9G7bx.js → dayjs.min-R4180ukF.js} +1 -1
  9. package/dist/frontend/mf-order/src/app.d.ts +8 -0
  10. package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +17 -0
  11. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +192 -12
  12. package/dist/frontend/mf-order/src/stores/order-setting/mapper.d.ts +4 -2
  13. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskEnablePaxDialogSection.vue.d.ts +9 -0
  14. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +15 -0
  15. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +4 -3
  16. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  17. package/dist/{index-C_53CwBa.js → index-DgLlDwJK.js} +2 -2
  18. package/dist/package/entity/order-platform/foodpanda/foodpanda-order.do.d.ts +16 -16
  19. package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +6 -6
  20. package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +129 -0
  21. package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +255 -0
  22. package/dist/package/entity/order-setting/kiosk/kiosk.enum.d.ts +3 -0
  23. package/dist/package/entity/order-setting/order-setting.do.d.ts +156 -8
  24. package/dist/package/entity/order-setting/order-setting.dto.d.ts +312 -16
  25. package/dist/package/entity/order-setting/sequence/sequence.do.d.ts +4 -4
  26. package/dist/package/entity/order-setting/sequence/sequence.dto.d.ts +4 -4
  27. package/dist/package/entity/payment/payment.enum.d.ts +2 -0
  28. package/dist/package/entity/restaurant/restaurant.dto.d.ts +154 -6
  29. package/dist/package/entity/websocket/websocket.dto.d.ts +328 -0
  30. package/dist/{queue.do-Vog69wnQ.js → queue.do-CNMuossU.js} +4540 -4517
  31. package/package.json +1 -1
  32. package/src/locales/en-US.json +5 -2
  33. package/src/locales/zh-CN.json +4 -0
  34. package/src/modules/order-setting/kiosk/interface.ts +20 -0
  35. package/src/stores/order-setting/mapper.ts +68 -11
  36. package/src/views/kiosk/settings/KioskDineInSection.vue +4 -5
  37. package/src/views/kiosk/settings/KioskDisplayStandSection.vue +36 -0
  38. package/src/views/kiosk/settings/KioskEnablePaxDialogSection.vue +33 -0
  39. package/src/views/kiosk/settings/KioskInstructionSection.vue +40 -0
  40. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +30 -19
  41. package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +45 -7
  42. package/src/views/kiosk/settings/KioskSettingView.vue +41 -3
  43. package/src/views/kiosk/settings/KioskTakeawaySection.vue +38 -4
  44. package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +3 -8
  45. package/dist/KioskSettingView-D-muNxlb.js +0 -649
  46. package/dist/KioskView-kcjjk4fF.js +0 -371
@@ -24,6 +24,14 @@
24
24
  @update:model-value="updateMenuItemSetting"
25
25
  />
26
26
  </div>
27
+ <div class="flex flex-col gap-2">
28
+ <span class="fm-typo-en-title-sm-600">{{ t('order.displayPaxDialogTitle') }}</span>
29
+ <KioskEnablePaxDialogSection
30
+ :key="'enable-pax-dialog-' + restaurantId"
31
+ :v="enablePaxDialog"
32
+ @update-enable-pax-dialog="updateEnablePaxDialogSetting"
33
+ />
34
+ </div>
27
35
  <div class="flex flex-col gap-2">
28
36
  <span class="fm-typo-en-title-sm-600">{{ t('order.acceptedPayment') }}</span>
29
37
  <span class="fm-typo-en-title-sm-400 font-bold">{{ t('order.configuration') }}</span>
@@ -70,6 +78,7 @@ import type {
70
78
  import { useLoading } from '@/composables/loading'
71
79
  import { useSnackbar } from '@feedmepos/ui-library'
72
80
  import { useI18n } from '@feedmepos/mf-common'
81
+ import KioskEnablePaxDialogSection from './KioskEnablePaxDialogSection.vue'
73
82
 
74
83
  const { t } = useI18n()
75
84
 
@@ -106,7 +115,12 @@ const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
106
115
  min: f.dineIn.displayStand.standSlotRange.min ?? 0,
107
116
  max: f.dineIn.displayStand.standSlotRange.max ?? 10
108
117
  },
109
- prefix: f.dineIn.displayStand.prefix ?? ''
118
+ prefix: f.dineIn.displayStand.prefix ?? '',
119
+ enablePaxDialog: f.dineIn.displayStand.enablePaxDialog,
120
+ submitOrderInstruction: {
121
+ payAtCounter: f.dineIn.displayStand.submitOrderInstruction.payAtCounter ?? null,
122
+ paid: f.dineIn.displayStand.submitOrderInstruction.paid ?? null
123
+ }
110
124
  }
111
125
  }
112
126
  }
@@ -134,7 +148,12 @@ const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
134
148
  min: displayStand.standSlotRange.min,
135
149
  max: displayStand.standSlotRange.max
136
150
  },
137
- prefix: displayStand.prefix ?? ''
151
+ prefix: displayStand.prefix ?? '',
152
+ enablePaxDialog: displayStand.enablePaxDialog,
153
+ submitOrderInstruction: {
154
+ payAtCounter: displayStand.submitOrderInstruction.payAtCounter ?? null,
155
+ paid: displayStand.submitOrderInstruction.paid ?? null
156
+ }
138
157
  }
139
158
  }
140
159
  }
@@ -154,7 +173,12 @@ const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
154
173
  min: f.dineIn.displayStand.standSlotRange.min ?? 0,
155
174
  max: f.dineIn.displayStand.standSlotRange.max ?? 10
156
175
  },
157
- prefix: f.dineIn.displayStand.prefix ?? ''
176
+ prefix: f.dineIn.displayStand.prefix ?? '',
177
+ enablePaxDialog: f.dineIn.displayStand.enablePaxDialog,
178
+ submitOrderInstruction: {
179
+ payAtCounter: f.dineIn.displayStand.submitOrderInstruction.payAtCounter ?? null,
180
+ paid: f.dineIn.displayStand.submitOrderInstruction.paid ?? null
181
+ }
158
182
  }
159
183
  }
160
184
  }
@@ -187,6 +211,20 @@ const allowEPayment = computed(() => {
187
211
  return paymentTypes.includes(F_ORDER_PAYMENT_TYPE.enum.ePayment);
188
212
  })
189
213
 
214
+ async function updateEnablePaxDialogSetting(v: boolean) {
215
+ kioskOrderSettingForm.value.dineIn.displayStand.enablePaxDialog = v
216
+ kioskOrderSettingForm.value.dineIn.pickUp.enablePaxDialog = v
217
+ }
218
+
219
+ const enablePaxDialog = computed(() => {
220
+ return (
221
+ ((kioskOrderSettingForm.value.dineIn.displayStand.enabled &&
222
+ kioskOrderSettingForm.value.dineIn.displayStand.enablePaxDialog) ||
223
+ kioskOrderSettingForm.value.dineIn.pickUp.enablePaxDialog) ??
224
+ false
225
+ )
226
+ })
227
+
190
228
  async function submitForm() {
191
229
  if (validKioskOrderSetting.value) {
192
230
  const kioskOrderSetting = validKioskOrderSetting.value
@@ -4,14 +4,21 @@
4
4
  :model-value="v.enabled"
5
5
  :label="t('order.takeaway')"
6
6
  label-placement="right"
7
- @update:model-value="updateTakeawaySetting"
7
+ @update:model-value="updateTakeawaySettingEnabled"
8
8
  class="mb-5"
9
9
  />
10
+ <kiosk-instruction-section
11
+ v-show="v.enabled"
12
+ :fields="instructionFields"
13
+ @update:field="updateTakeawaySettingInstructions"
14
+ />
10
15
  </div>
11
16
  </template>
12
17
  <script setup lang="ts">
13
18
  import type { KioskTakeawaySettingForm } from '@/modules/order-setting/kiosk/interface'
14
19
  import { useI18n } from '@feedmepos/mf-common'
20
+ import { computed } from 'vue'
21
+ import KioskInstructionSection from './KioskInstructionSection.vue'
15
22
 
16
23
  const { t } = useI18n()
17
24
 
@@ -23,10 +30,37 @@ interface Emits {
23
30
  (e: 'updateTakeaway', setting: KioskTakeawaySettingForm): void
24
31
  }
25
32
 
26
- defineProps<Props>()
33
+ const props = defineProps<Props>()
27
34
  const emits = defineEmits<Emits>()
28
35
 
29
- function updateTakeawaySetting(v: boolean) {
30
- emits('updateTakeaway', { enabled: v })
36
+ const instructionFields = computed(() => {
37
+ return [
38
+ {
39
+ id: 'payAtCounter',
40
+ value: props.v.submitOrderInstruction.payAtCounter ?? undefined,
41
+ title: t('order.payAtCounter'),
42
+ defaultValue: 'Collect your transaction slip below and present it to the cashier'
43
+ },
44
+ {
45
+ id: 'paid',
46
+ value: props.v.submitOrderInstruction.paid ?? undefined,
47
+ title: t('order.paid'),
48
+ defaultValue: "Please wait as we prepare your food. We'll call your number when it's ready."
49
+ }
50
+ ]
51
+ })
52
+
53
+ function updateTakeawaySettingEnabled(v: boolean) {
54
+ emits('updateTakeaway', { ...props.v, enabled: v })
55
+ }
56
+
57
+ function updateTakeawaySettingInstructions(id: string, instructions: string) {
58
+ emits('updateTakeaway', {
59
+ ...props.v,
60
+ submitOrderInstruction: {
61
+ ...props.v.submitOrderInstruction,
62
+ [id]: instructions
63
+ }
64
+ })
31
65
  }
32
66
  </script>
@@ -479,17 +479,12 @@ watch(
479
479
  class="ml-auto"
480
480
  />
481
481
  </div>
482
- <div class="fm-corner-radius-lg flex flex-col">
483
- <div
484
- v-for="(item, index) in filteredTable"
485
- :key="index"
486
- class="flex flex-col pl-6"
487
- v-if="showTable"
488
- >
482
+ <div class="fm-corner-radius-lg flex flex-col" v-if="showTable">
483
+ <div v-for="(item, index) in filteredTable" :key="index" class="flex flex-col pl-6">
489
484
  <FmCheckbox
485
+ :value="item.name"
490
486
  :model-value="selectedTables[item.name].isSelected"
491
487
  :label="item.name"
492
- value=""
493
488
  @update:model-value="(v: boolean) => handleChildUpdateTable(v, item.name)"
494
489
  />
495
490
  </div>