@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.
- package/dist/{DisplaySystemView-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
- package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
- package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
- package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
- package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
- package/dist/KioskDevicesView-CYiew4X5.js +4 -0
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
- package/dist/KioskSettingView-AKBiij9a.js +1124 -0
- package/dist/KioskView-zKB6mC8I.js +765 -0
- package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
- 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
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
- package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
- package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
- package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
- package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
- package/dist/frontend/mf-order/src/app.d.ts +687 -0
- package/dist/frontend/mf-order/src/main.d.ts +687 -0
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
- package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
- package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
- package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
- package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
- package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
- package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
- package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
- package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
- package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
- package/dist/index-CMOvrim4.js +147 -0
- package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
- package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
- package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
- package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
- package/dist/package/entity/display/blocks.d.ts +12 -2
- package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
- package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
- package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
- package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
- package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
- package/dist/package/entity/queue/queue.do.d.ts +153 -0
- package/dist/package/entity/queue/queue.dto.d.ts +221 -2
- package/dist/package/entity/queue/queue.enum.d.ts +5 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
- package/dist/style.css +1 -1
- package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
- package/package.json +2 -1
- package/src/api/food-court/index.ts +63 -0
- package/src/api/kiosk/index.ts +8 -0
- package/src/api/payment/index.ts +18 -1
- package/src/api/queue/index.ts +39 -0
- package/src/api/restaurant-setting/index.ts +14 -0
- package/src/locales/en-US.json +197 -26
- package/src/locales/ja-JP.json +193 -23
- package/src/locales/th-TH.json +193 -21
- package/src/locales/zh-CN.json +197 -23
- package/src/modules/display-system/interface.spec.ts +26 -1
- package/src/modules/display-system/interface.ts +20 -0
- package/src/modules/kiosk/interface.ts +4 -0
- package/src/modules/kiosk/license.spec.ts +167 -0
- package/src/modules/kiosk/license.ts +175 -0
- package/src/modules/kiosk/outletLoad.spec.ts +25 -0
- package/src/modules/kiosk/outletLoad.ts +19 -0
- package/src/modules/kiosk/settingsSections.spec.ts +85 -0
- package/src/modules/kiosk/settingsSections.ts +82 -0
- package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
- package/src/modules/kiosk/useKioskSettings.ts +61 -0
- package/src/modules/payment/paymentDevice.spec.ts +175 -0
- package/src/modules/payment/paymentDevice.ts +156 -0
- package/src/stores/kiosk/index.ts +16 -1
- package/src/stores/kiosk/mapper.ts +2 -0
- package/src/stores/order-setting/index.spec.ts +83 -0
- package/src/stores/order-setting/index.ts +49 -27
- package/src/stores/payment/index.spec.ts +86 -0
- package/src/stores/payment/index.ts +48 -2
- package/src/views/display-system/DisplayInspector.vue +17 -8
- package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
- package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
- package/src/views/food-court/food-court-export.spec.ts +151 -0
- package/src/views/food-court/food-court-export.ts +283 -0
- package/src/views/kiosk/KioskStatePanel.vue +2 -2
- package/src/views/kiosk/KioskView.vue +219 -82
- package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
- package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
- package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
- package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
- package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
- package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
- package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
- package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
- package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
- package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
- package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
- package/src/views/order-settings/pos-status/pos-status.ts +86 -0
- package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
- package/src/views/order-settings/queue/QueueSetting.vue +289 -15
- package/src/views/order-settings/queue/called-message.spec.ts +29 -1
- package/src/views/order-settings/queue/called-message.ts +18 -0
- package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
- package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
- package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
- package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
- package/dist/KioskSettingView-rdom_aS8.js +0 -880
- package/dist/KioskView-DOON9zR6.js +0 -516
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
- package/dist/index-CaHG3M7C.js +0 -135
- package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
- package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
- package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<FmSwitch
|
|
4
|
-
:model-value="displayStand.enabled"
|
|
5
|
-
:label="t('order.displayStand')"
|
|
6
|
-
label-placement="right"
|
|
7
|
-
@update:model-value="updateEnabled"
|
|
8
|
-
/>
|
|
9
|
-
<div
|
|
10
|
-
class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12"
|
|
11
|
-
v-show="displayStand.enabled"
|
|
12
|
-
>
|
|
13
|
-
<span class="fm-typo-en-title-sm-600">{{ t('order.tableServiceSetting') }}</span>
|
|
14
|
-
<div class="flex flex-col gap-10">
|
|
15
|
-
<!-- prefix -->
|
|
16
|
-
<!-- TODO: How to let user know this field is do for what-->
|
|
17
|
-
<FmTextField
|
|
18
|
-
:model-value="displayStand.prefix"
|
|
19
|
-
:label="t('order.prefix')"
|
|
20
|
-
:placeholder="t('order.prefix')"
|
|
21
|
-
@update:model-value="updatePrefix"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="flex flex-row gap-2">
|
|
25
|
-
<!-- <span class="fm-typo-en-title-sm-600">Table Stand Number Range</span> -->
|
|
26
|
-
<FmStepperField
|
|
27
|
-
class="w-1/2"
|
|
28
|
-
:model-value="displayStand.standSlotRange.min"
|
|
29
|
-
:label="t('order.start')"
|
|
30
|
-
labelMark="required"
|
|
31
|
-
:rules="minRules"
|
|
32
|
-
:placeholder="t('order.enterANumber')"
|
|
33
|
-
@update:modelValue="updateMin"
|
|
34
|
-
/>
|
|
35
|
-
<FmStepperField
|
|
36
|
-
class="w-1/2"
|
|
37
|
-
:model-value="displayStand.standSlotRange.max"
|
|
38
|
-
:label="t('order.end')"
|
|
39
|
-
labelMark="required"
|
|
40
|
-
:rules="maxRules"
|
|
41
|
-
:placeholder="t('order.enterANumber')"
|
|
42
|
-
@update:modelValue="updateMax"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<!-- pad digit -->
|
|
47
|
-
<!-- TODO: How to let user know this field is do for what-->
|
|
48
|
-
<FmStepperField
|
|
49
|
-
:model-value="displayStand.padDigit"
|
|
50
|
-
:label="t('order.padDigit')"
|
|
51
|
-
labelMark="required"
|
|
52
|
-
:rules="padDigitRules"
|
|
53
|
-
:placeholder="t('order.padDigit')"
|
|
54
|
-
@update:modelValue="updatePadDigit"
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<kiosk-instruction-section
|
|
60
|
-
v-show="displayStand.enabled"
|
|
61
|
-
:fields="instructionFields"
|
|
62
|
-
@update:field="updateInstruction"
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
</template>
|
|
66
|
-
<script lang="ts" setup>
|
|
67
|
-
import { computed } from 'vue'
|
|
68
|
-
import { NumberUtil } from '@/utils/number'
|
|
69
|
-
import type { DisplayStandSettingForm } from '@/modules/order-setting/kiosk/interface'
|
|
70
|
-
import { useI18n } from '@feedmepos/mf-common'
|
|
71
|
-
import KioskInstructionSection from './KioskInstructionSection.vue'
|
|
72
|
-
|
|
73
|
-
const { t } = useI18n()
|
|
74
|
-
|
|
75
|
-
interface Props {
|
|
76
|
-
displayStand: DisplayStandSettingForm
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface Emits {
|
|
80
|
-
(e: 'updateDisplayStand', displayStand: DisplayStandSettingForm): void
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const props = defineProps<Props>()
|
|
84
|
-
const emits = defineEmits<Emits>()
|
|
85
|
-
|
|
86
|
-
const instructionFields = computed(() => {
|
|
87
|
-
const instructions = props.displayStand.submitOrderInstruction
|
|
88
|
-
return [
|
|
89
|
-
{
|
|
90
|
-
id: 'payAtCounter',
|
|
91
|
-
value: instructions.payAtCounter ?? undefined,
|
|
92
|
-
title: t('order.payAtCounter'),
|
|
93
|
-
defaultValue: 'Collect your transaction slip below and present it to the cashier'
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: 'paid',
|
|
97
|
-
value: instructions.paid ?? undefined,
|
|
98
|
-
title: t('order.paid'),
|
|
99
|
-
defaultValue:
|
|
100
|
-
"Please collect your receipt and we'll bring your food to your table once it's ready."
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
function updateInstruction(id: string, value: string) {
|
|
106
|
-
emits('updateDisplayStand', {
|
|
107
|
-
...props.displayStand,
|
|
108
|
-
submitOrderInstruction: {
|
|
109
|
-
...props.displayStand.submitOrderInstruction,
|
|
110
|
-
[id]: value
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const nonNegativeRule = (val: any) => {
|
|
116
|
-
if (val < 0) {
|
|
117
|
-
return t('order.nonNegativeRule')
|
|
118
|
-
}
|
|
119
|
-
return true
|
|
120
|
-
}
|
|
121
|
-
const greaterThanMinRule = (val: any) => {
|
|
122
|
-
if (val <= (props.displayStand.standSlotRange.min ?? 0)) {
|
|
123
|
-
return t('order.greaterThanMinRule')
|
|
124
|
-
}
|
|
125
|
-
return true
|
|
126
|
-
}
|
|
127
|
-
type ErrMsg = string
|
|
128
|
-
type ValidateCallback = (val: any) => true | ErrMsg
|
|
129
|
-
|
|
130
|
-
const padDigitRules = computed<ValidateCallback[]>(() => {
|
|
131
|
-
return [nonNegativeRule]
|
|
132
|
-
})
|
|
133
|
-
const minRules = computed<ValidateCallback[]>(() => {
|
|
134
|
-
return [nonNegativeRule]
|
|
135
|
-
})
|
|
136
|
-
const maxRules = computed<ValidateCallback[]>(() => {
|
|
137
|
-
return [nonNegativeRule, greaterThanMinRule]
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
const previewResult = computed<string>(() => {
|
|
141
|
-
const exampleValue = 5
|
|
142
|
-
const padDigitResult = NumberUtil.applyPadDigits(exampleValue, props.displayStand.padDigit ?? 0)
|
|
143
|
-
return `Preview: ${props.displayStand.prefix}${padDigitResult}`
|
|
144
|
-
})
|
|
145
|
-
|
|
146
|
-
function updateEnabled(v: boolean) {
|
|
147
|
-
emits('updateDisplayStand', {
|
|
148
|
-
...props.displayStand,
|
|
149
|
-
enabled: v
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function updateMin(v: number | null) {
|
|
154
|
-
if (!v) return
|
|
155
|
-
emits('updateDisplayStand', {
|
|
156
|
-
...props.displayStand,
|
|
157
|
-
standSlotRange: {
|
|
158
|
-
...props.displayStand.standSlotRange,
|
|
159
|
-
min: v
|
|
160
|
-
}
|
|
161
|
-
})
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function updateMax(v: number | null) {
|
|
165
|
-
if (!v) return
|
|
166
|
-
emits('updateDisplayStand', {
|
|
167
|
-
...props.displayStand,
|
|
168
|
-
standSlotRange: {
|
|
169
|
-
...props.displayStand.standSlotRange,
|
|
170
|
-
max: v
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function updatePrefix(v: string) {
|
|
176
|
-
emits('updateDisplayStand', {
|
|
177
|
-
...props.displayStand,
|
|
178
|
-
prefix: v
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function updatePadDigit(v: number | null) {
|
|
183
|
-
if (!v) return
|
|
184
|
-
emits('updateDisplayStand', {
|
|
185
|
-
...props.displayStand,
|
|
186
|
-
padDigit: v
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
</script>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12">
|
|
3
|
-
<span class="fm-typo-en-title-sm-600">{{ t('order.submitOrderInstruction') }}</span>
|
|
4
|
-
<div class="flex flex-col gap-10" v-for="field in props.fields" :key="field.title">
|
|
5
|
-
<FmTextField
|
|
6
|
-
:model-value="field.value"
|
|
7
|
-
:label="field.title"
|
|
8
|
-
:placeholder="field.defaultValue"
|
|
9
|
-
@update:model-value="(v: string) => updateField(field.id, v)"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
<script lang="ts" setup>
|
|
15
|
-
import { useI18n } from '@feedmepos/mf-common'
|
|
16
|
-
const { t } = useI18n()
|
|
17
|
-
|
|
18
|
-
interface ITextField {
|
|
19
|
-
id: string
|
|
20
|
-
value: string | undefined
|
|
21
|
-
title: string
|
|
22
|
-
defaultValue: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface Props {
|
|
26
|
-
fields: ITextField[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const props = defineProps<Props>()
|
|
30
|
-
|
|
31
|
-
interface Emits {
|
|
32
|
-
(e: 'update:field', id: string, value: string): void
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const emit = defineEmits<Emits>()
|
|
36
|
-
|
|
37
|
-
function updateField(id: string, value: string) {
|
|
38
|
-
emit('update:field', id, value)
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<FmSwitch
|
|
4
|
-
:model-value="form.enabled"
|
|
5
|
-
:label="t('order.pickAtCounter')"
|
|
6
|
-
label-placement="right"
|
|
7
|
-
@update:model-value="updatePickUpEnabled"
|
|
8
|
-
/>
|
|
9
|
-
<kiosk-instruction-section
|
|
10
|
-
v-show="form.enabled"
|
|
11
|
-
:fields="instructionFields"
|
|
12
|
-
@update:field="updatePickUpInstruction"
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import type { PickAtCounterSettingForm } from '@/modules/order-setting/kiosk/interface'
|
|
18
|
-
import { useI18n } from '@feedmepos/mf-common'
|
|
19
|
-
import { computed } from 'vue'
|
|
20
|
-
import KioskInstructionSection from './KioskInstructionSection.vue'
|
|
21
|
-
|
|
22
|
-
const { t } = useI18n()
|
|
23
|
-
|
|
24
|
-
interface Props {
|
|
25
|
-
form: PickAtCounterSettingForm
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface Emits {
|
|
29
|
-
(e: 'update-pick-up', form: PickAtCounterSettingForm): void
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const props = defineProps<Props>()
|
|
33
|
-
const emits = defineEmits<Emits>()
|
|
34
|
-
|
|
35
|
-
const instructionFields = computed(() => {
|
|
36
|
-
return [
|
|
37
|
-
{
|
|
38
|
-
id: 'payAtCounter',
|
|
39
|
-
value: props.form.submitOrderInstruction.payAtCounter ?? undefined,
|
|
40
|
-
title: t('order.payAtCounter'),
|
|
41
|
-
defaultValue: 'Collect your transaction slip below and present it to the cashier'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'paid',
|
|
45
|
-
value: props.form.submitOrderInstruction.paid ?? undefined,
|
|
46
|
-
title: t('order.paid'),
|
|
47
|
-
defaultValue: "Please wait as we prepare your food. We'll call your number when it's ready."
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
function updatePickUpEnabled(enabled: boolean) {
|
|
53
|
-
emits('update-pick-up', {
|
|
54
|
-
...props.form,
|
|
55
|
-
enabled
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function updatePickUpInstruction(id: string, instruction: string) {
|
|
60
|
-
emits('update-pick-up', {
|
|
61
|
-
...props.form,
|
|
62
|
-
submitOrderInstruction: {
|
|
63
|
-
...props.form.submitOrderInstruction,
|
|
64
|
-
[id]: instruction
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
</script>
|