@feedmepos/mf-order-setting 0.0.54 → 0.0.57-prod
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/{KioskDevicesView-CMKNjgWx.js → KioskDevicesView-CVnUSyRk.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B1sNvlUC.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-D-XcAx8n.js} +2 -2
- package/dist/KioskSettingView-69arsdyn.js +744 -0
- package/dist/{KioskView-U-Wg8oMC.js → KioskView-hndM6pEn.js} +60 -57
- package/dist/{OrderSettingsView-BWzaITT6.js → OrderSettingsView-BBOKp6kp.js} +4 -4
- package/dist/{app-CFfgPAd8.js → app-SgEu0Zl4.js} +77 -69
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CuRr-wlf.js → dayjs.min-puCJYept.js} +1 -1
- package/dist/frontend/mf-order/src/app.d.ts +8 -0
- package/dist/frontend/mf-order/src/main.d.ts +8 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +2 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +4 -4
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-Bj0bCGTm.js → index-CtMw6yZU.js} +1 -1
- package/dist/{menu.dto-DAh1J2ES.js → menu.dto-Csu6ZBea.js} +2 -0
- package/dist/package/entity/food-court/order.do.d.ts +4 -24
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +1 -12341
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +22443 -3
- package/dist/package/entity/order/order.do.d.ts +1 -1
- package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +12 -12
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +32 -32
- package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +2 -2
- package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +2 -2
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +3 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +5 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +10 -0
- package/dist/package/entity/queue/queue.do.d.ts +3 -8
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +5 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +12 -0
- package/package.json +1 -1
- package/src/locales/en-US.json +2 -0
- package/src/locales/ja-JP.json +11 -9
- package/src/locales/th-TH.json +2 -0
- package/src/locales/zh-CN.json +2 -0
- package/src/main.ts +5 -5
- package/src/modules/order-setting/kiosk/interface.ts +19 -17
- package/src/stores/order-setting/mapper.ts +66 -63
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +19 -1
- package/src/views/kiosk/settings/KioskSettingView.vue +56 -34
- package/src/views/order-settings/OrderSettingsView.vue +1 -1
- package/src/views/order-settings/drive-thru/DriveThruSetting.vue +4 -4
- package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +1 -5
- package/dist/KioskSettingView-BE_pMA-i.js +0 -720
|
@@ -488,6 +488,7 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
488
488
|
}, {
|
|
489
489
|
showAllOnly: boolean;
|
|
490
490
|
}>>>;
|
|
491
|
+
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
491
492
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
492
493
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
493
494
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -546,6 +547,7 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
546
547
|
menuItem?: {
|
|
547
548
|
showAllOnly: boolean;
|
|
548
549
|
} | null | undefined;
|
|
550
|
+
otaChannel?: string | null | undefined;
|
|
549
551
|
coverImageLandscape?: string | null | undefined;
|
|
550
552
|
coverImagePortrait?: string | null | undefined;
|
|
551
553
|
}, {
|
|
@@ -604,6 +606,7 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
604
606
|
menuItem?: {
|
|
605
607
|
showAllOnly: boolean;
|
|
606
608
|
} | null | undefined;
|
|
609
|
+
otaChannel?: string | null | undefined;
|
|
607
610
|
coverImageLandscape?: string | null | undefined;
|
|
608
611
|
coverImagePortrait?: string | null | undefined;
|
|
609
612
|
}>>;
|
|
@@ -664,6 +667,7 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
664
667
|
menuItem?: {
|
|
665
668
|
showAllOnly: boolean;
|
|
666
669
|
} | null | undefined;
|
|
670
|
+
otaChannel?: string | null | undefined;
|
|
667
671
|
coverImageLandscape?: string | null | undefined;
|
|
668
672
|
coverImagePortrait?: string | null | undefined;
|
|
669
673
|
};
|
|
@@ -725,6 +729,7 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
725
729
|
menuItem?: {
|
|
726
730
|
showAllOnly: boolean;
|
|
727
731
|
} | null | undefined;
|
|
732
|
+
otaChannel?: string | null | undefined;
|
|
728
733
|
coverImageLandscape?: string | null | undefined;
|
|
729
734
|
coverImagePortrait?: string | null | undefined;
|
|
730
735
|
} | undefined;
|
|
@@ -1184,6 +1189,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1184
1189
|
}, {
|
|
1185
1190
|
showAllOnly: boolean;
|
|
1186
1191
|
}>>>;
|
|
1192
|
+
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1187
1193
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1188
1194
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1189
1195
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1242,6 +1248,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1242
1248
|
menuItem?: {
|
|
1243
1249
|
showAllOnly: boolean;
|
|
1244
1250
|
} | null | undefined;
|
|
1251
|
+
otaChannel?: string | null | undefined;
|
|
1245
1252
|
coverImageLandscape?: string | null | undefined;
|
|
1246
1253
|
coverImagePortrait?: string | null | undefined;
|
|
1247
1254
|
}, {
|
|
@@ -1300,6 +1307,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1300
1307
|
menuItem?: {
|
|
1301
1308
|
showAllOnly: boolean;
|
|
1302
1309
|
} | null | undefined;
|
|
1310
|
+
otaChannel?: string | null | undefined;
|
|
1303
1311
|
coverImageLandscape?: string | null | undefined;
|
|
1304
1312
|
coverImagePortrait?: string | null | undefined;
|
|
1305
1313
|
}>>;
|
|
@@ -1360,6 +1368,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1360
1368
|
menuItem?: {
|
|
1361
1369
|
showAllOnly: boolean;
|
|
1362
1370
|
} | null | undefined;
|
|
1371
|
+
otaChannel?: string | null | undefined;
|
|
1363
1372
|
coverImageLandscape?: string | null | undefined;
|
|
1364
1373
|
coverImagePortrait?: string | null | undefined;
|
|
1365
1374
|
};
|
|
@@ -1421,6 +1430,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1421
1430
|
menuItem?: {
|
|
1422
1431
|
showAllOnly: boolean;
|
|
1423
1432
|
} | null | undefined;
|
|
1433
|
+
otaChannel?: string | null | undefined;
|
|
1424
1434
|
coverImageLandscape?: string | null | undefined;
|
|
1425
1435
|
coverImagePortrait?: string | null | undefined;
|
|
1426
1436
|
} | undefined;
|
|
@@ -1530,6 +1540,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1530
1540
|
menuItem?: {
|
|
1531
1541
|
showAllOnly: boolean;
|
|
1532
1542
|
} | null | undefined;
|
|
1543
|
+
otaChannel?: string | null | undefined;
|
|
1533
1544
|
coverImageLandscape?: string | null | undefined;
|
|
1534
1545
|
coverImagePortrait?: string | null | undefined;
|
|
1535
1546
|
};
|
|
@@ -1640,6 +1651,7 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1640
1651
|
menuItem?: {
|
|
1641
1652
|
showAllOnly: boolean;
|
|
1642
1653
|
} | null | undefined;
|
|
1654
|
+
otaChannel?: string | null | undefined;
|
|
1643
1655
|
coverImageLandscape?: string | null | undefined;
|
|
1644
1656
|
coverImagePortrait?: string | null | undefined;
|
|
1645
1657
|
} | undefined;
|
package/package.json
CHANGED
package/src/locales/en-US.json
CHANGED
|
@@ -95,6 +95,8 @@
|
|
|
95
95
|
"deliveryZone": "Delivery Zone",
|
|
96
96
|
"deviceBinding": "Device Binding",
|
|
97
97
|
"deviceDetails": "Device Details",
|
|
98
|
+
"otaChannel": "OTA channel",
|
|
99
|
+
"otaChannelHint": "Optional. Leave blank to use the default OTA feed.",
|
|
98
100
|
"dineIn": "Dine In",
|
|
99
101
|
"dineInCanTakeaway": "Allow Takeaway",
|
|
100
102
|
"driveThru": "Drive Thru",
|
package/src/locales/ja-JP.json
CHANGED
|
@@ -91,15 +91,17 @@
|
|
|
91
91
|
"deliveryOrder": "配達注文",
|
|
92
92
|
"deliveryTerm": "配達条件",
|
|
93
93
|
"deliveryTime": "配達時間",
|
|
94
|
-
"deliveryTitle": "{company}配達",
|
|
95
|
-
"deliveryZone": "配達エリア",
|
|
96
|
-
"deviceBinding": "デバイス紐付け",
|
|
97
|
-
"deviceDetails": "デバイス詳細",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
94
|
+
"deliveryTitle": "{company}配達",
|
|
95
|
+
"deliveryZone": "配達エリア",
|
|
96
|
+
"deviceBinding": "デバイス紐付け",
|
|
97
|
+
"deviceDetails": "デバイス詳細",
|
|
98
|
+
"otaChannel": "OTAチャネル",
|
|
99
|
+
"otaChannelHint": "任意。空欄の場合はデフォルトのOTAフィードを使用します。",
|
|
100
|
+
"dineIn": "店内飲食",
|
|
101
|
+
"dineInCanTakeaway": "テイクアウト許可",
|
|
102
|
+
"driveThru": "ドライブスルー",
|
|
103
|
+
"driveThruSettingUpdated": "ドライブスルー設定が更新されました。",
|
|
104
|
+
"enableDriveThru": "ドライブスルーを有効にする",
|
|
103
105
|
"enableDriveThruSublabel": "お客様向けのドライブスルー注文を有効にする",
|
|
104
106
|
"dineInType": "店内飲食タイプ",
|
|
105
107
|
"discountCampaign": "割引キャンペーン",
|
package/src/locales/th-TH.json
CHANGED
|
@@ -95,6 +95,8 @@
|
|
|
95
95
|
"deliveryZone": "โซนการจัดส่ง",
|
|
96
96
|
"deviceBinding": "การผูกอุปกรณ์",
|
|
97
97
|
"deviceDetails": "รายละเอียดอุปกรณ์",
|
|
98
|
+
"otaChannel": "ช่อง OTA",
|
|
99
|
+
"otaChannelHint": "ไม่บังคับ เว้นว่างเพื่อใช้ฟีด OTA เริ่มต้น",
|
|
98
100
|
"dineIn": "รับประทานอาหารที่ร้าน",
|
|
99
101
|
"dineInCanTakeaway": "อนุญาตให้นำกลับบ้าน",
|
|
100
102
|
"driveThru": "ไดรฟ์ทรู",
|
package/src/locales/zh-CN.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -35,15 +35,15 @@ function initI18n(): I18n {
|
|
|
35
35
|
|
|
36
36
|
const app = createApp(Entry)
|
|
37
37
|
|
|
38
|
-
app.use(initI18n())
|
|
39
|
-
app.use(createPinia())
|
|
40
|
-
app.use(router)
|
|
41
|
-
|
|
42
|
-
|
|
43
38
|
app.use(FeedMeUI, {
|
|
44
39
|
locale: detectLocale(),
|
|
45
40
|
})
|
|
46
41
|
|
|
42
|
+
app.use(createPinia() as any)
|
|
43
|
+
app.use(router)
|
|
44
|
+
app.use(initI18n() as any)
|
|
45
|
+
|
|
46
|
+
|
|
47
47
|
const CoreStore = useCoreStore();
|
|
48
48
|
const iframeMode = computed(() => {
|
|
49
49
|
return new URLSearchParams(window.location.search).get('iframe') === 'true';
|
|
@@ -75,27 +75,29 @@ export type KioskPaymentTypesForm = MfKioskPaymentTypes;
|
|
|
75
75
|
|
|
76
76
|
export type KioskPaymentSettingForm = MfKioskPaymentSetting;
|
|
77
77
|
|
|
78
|
-
export interface MfKioskOrderSetting {
|
|
79
|
-
dineIn: MfKioskDineInSetting,
|
|
80
|
-
takeaway: MfKioskTakeawaySetting,
|
|
81
|
-
paymentSetting: MfKioskPaymentSetting,
|
|
82
|
-
menuItem: MfKioskOrderSettingMenuItemForm,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
export interface MfKioskOrderSetting {
|
|
79
|
+
dineIn: MfKioskDineInSetting,
|
|
80
|
+
takeaway: MfKioskTakeawaySetting,
|
|
81
|
+
paymentSetting: MfKioskPaymentSetting,
|
|
82
|
+
menuItem: MfKioskOrderSettingMenuItemForm,
|
|
83
|
+
otaChannel?: string | null,
|
|
84
|
+
coverImageLandscape: string | null,
|
|
85
|
+
coverImagePortrait: string | null,
|
|
86
|
+
}
|
|
86
87
|
|
|
87
88
|
export interface MfKioskOrderSettingMenuItemForm {
|
|
88
89
|
showAllOnly: boolean,
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
export interface MfKioskOrderSettingForm {
|
|
92
|
-
dineIn: KioskDineInSettingForm,
|
|
93
|
-
takeaway: KioskTakeawaySettingForm,
|
|
94
|
-
paymentSetting: KioskPaymentSettingForm,
|
|
95
|
-
menuItem: KioskMenuItemSettingForm,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
export interface MfKioskOrderSettingForm {
|
|
93
|
+
dineIn: KioskDineInSettingForm,
|
|
94
|
+
takeaway: KioskTakeawaySettingForm,
|
|
95
|
+
paymentSetting: KioskPaymentSettingForm,
|
|
96
|
+
menuItem: KioskMenuItemSettingForm,
|
|
97
|
+
otaChannel?: string | null,
|
|
98
|
+
coverImageLandscape: string | null,
|
|
99
|
+
coverImagePortrait: string | null,
|
|
100
|
+
}
|
|
99
101
|
|
|
100
102
|
export type KioskPickAtCounterSettingForm = MfKioskPickAtCounterSetting;
|
|
101
103
|
export type KioskMenuItemSettingForm = MfKioskOrderSettingMenuItemForm;
|
|
@@ -104,4 +106,4 @@ export interface KioskDineInSettingForm {
|
|
|
104
106
|
sequenceNumber: MfKioskSequenceNumberSetting,
|
|
105
107
|
displayStand: DisplayStandSettingForm,
|
|
106
108
|
pickUp: KioskPickAtCounterSettingForm,
|
|
107
|
-
}
|
|
109
|
+
}
|
|
@@ -50,7 +50,7 @@ export const defaultPickUp: KioskPickAtCounterSettingForm = {
|
|
|
50
50
|
enablePaxDialog: false
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export const defaultKioskOrderSetting: MfKioskOrderSettingForm = {
|
|
53
|
+
export const defaultKioskOrderSetting: MfKioskOrderSettingForm = {
|
|
54
54
|
dineIn: {
|
|
55
55
|
enabled: false,
|
|
56
56
|
pickUp: defaultPickUp,
|
|
@@ -74,13 +74,14 @@ export const defaultKioskOrderSetting: MfKioskOrderSettingForm = {
|
|
|
74
74
|
scanPay: false
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
},
|
|
78
|
-
menuItem: {
|
|
79
|
-
showAllOnly: false
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
},
|
|
78
|
+
menuItem: {
|
|
79
|
+
showAllOnly: false
|
|
80
|
+
},
|
|
81
|
+
otaChannel: '',
|
|
82
|
+
coverImageLandscape: null,
|
|
83
|
+
coverImagePortrait: null
|
|
84
|
+
}
|
|
84
85
|
|
|
85
86
|
export const defaultSubmitOrderInstruction: MfKioskSubmitOrderInstruction = {
|
|
86
87
|
payAtCounter: null,
|
|
@@ -109,10 +110,10 @@ const toKiosk = (
|
|
|
109
110
|
enabled: kioskOrderSettings?.canTakeaway ?? false,
|
|
110
111
|
submitOrderInstruction: kioskOrderSettings?.takeaway?.submitOrderInstruction
|
|
111
112
|
? {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
payAtCounter:
|
|
114
|
+
kioskOrderSettings?.takeaway?.submitOrderInstruction?.payAtCounter?.['en'] ?? null,
|
|
115
|
+
paid: kioskOrderSettings?.takeaway?.submitOrderInstruction?.paid?.['en'] ?? null
|
|
116
|
+
}
|
|
116
117
|
: defaultSubmitOrderInstruction
|
|
117
118
|
},
|
|
118
119
|
paymentSetting: {
|
|
@@ -131,13 +132,14 @@ const toKiosk = (
|
|
|
131
132
|
}
|
|
132
133
|
})
|
|
133
134
|
},
|
|
134
|
-
menuItem: {
|
|
135
|
-
showAllOnly: kioskOrderSettings?.menuItem?.showAllOnly ?? false
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
135
|
+
menuItem: {
|
|
136
|
+
showAllOnly: kioskOrderSettings?.menuItem?.showAllOnly ?? false
|
|
137
|
+
},
|
|
138
|
+
otaChannel: kioskOrderSettings?.otaChannel ?? '',
|
|
139
|
+
coverImageLandscape: kioskOrderSettings?.coverImageLandscape ?? null,
|
|
140
|
+
coverImagePortrait: kioskOrderSettings?.coverImagePortrait ?? null
|
|
141
|
+
}
|
|
142
|
+
}
|
|
141
143
|
|
|
142
144
|
const toKioskDineInSetting = (
|
|
143
145
|
kioskDineInSeq: OrderKioskDineInSequenceDto,
|
|
@@ -148,35 +150,35 @@ const toKioskDineInSetting = (
|
|
|
148
150
|
sequenceNumber: kioskDineInSeq,
|
|
149
151
|
pickUp: kioskDineInSetting?.pickUp
|
|
150
152
|
? {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
...kioskDineInSetting.pickUp,
|
|
154
|
+
submitOrderInstruction: kioskDineInSetting.pickUp.submitOrderInstruction
|
|
155
|
+
? {
|
|
156
|
+
payAtCounter:
|
|
157
|
+
kioskDineInSetting.pickUp.submitOrderInstruction?.payAtCounter?.['en'] ?? null,
|
|
158
|
+
paid: kioskDineInSetting.pickUp.submitOrderInstruction?.paid?.['en'] ?? null
|
|
159
|
+
}
|
|
160
|
+
: defaultSubmitOrderInstruction,
|
|
161
|
+
enablePaxDialog: kioskDineInSetting.pickUp.enablePaxDialog
|
|
162
|
+
? kioskDineInSetting.pickUp.enablePaxDialog
|
|
163
|
+
: false
|
|
164
|
+
}
|
|
163
165
|
: defaultPickUp,
|
|
164
166
|
displayStand: kioskDineInSetting?.displayStand
|
|
165
167
|
? {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
enabled: kioskDineInSetting.displayStand.enabled,
|
|
169
|
+
standSlotRange: kioskDineInSetting.displayStand.standSlotRange,
|
|
170
|
+
prefix: kioskDineInSetting.displayStand.prefix,
|
|
171
|
+
padDigit: kioskDineInSetting.displayStand.padDigit,
|
|
172
|
+
enablePaxDialog: kioskDineInSetting.displayStand.enablePaxDialog ?? false,
|
|
173
|
+
submitOrderInstruction: kioskDineInSetting.displayStand.submitOrderInstruction
|
|
174
|
+
? {
|
|
175
|
+
payAtCounter:
|
|
176
|
+
kioskDineInSetting.displayStand.submitOrderInstruction?.payAtCounter?.['en'] ??
|
|
177
|
+
null,
|
|
178
|
+
paid: kioskDineInSetting.displayStand.submitOrderInstruction?.paid?.['en'] ?? null
|
|
179
|
+
}
|
|
180
|
+
: defaultSubmitOrderInstruction
|
|
181
|
+
}
|
|
180
182
|
: defaultDisplayStand
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -193,13 +195,13 @@ const toOrderKioskSettingsDto = (
|
|
|
193
195
|
submitOrderInstruction: {
|
|
194
196
|
payAtCounter: dineInSetting.displayStand.submitOrderInstruction?.payAtCounter
|
|
195
197
|
? {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
en: dineInSetting.displayStand.submitOrderInstruction.payAtCounter
|
|
199
|
+
}
|
|
198
200
|
: null,
|
|
199
201
|
paid: dineInSetting.displayStand.submitOrderInstruction?.paid
|
|
200
202
|
? {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
en: dineInSetting.displayStand.submitOrderInstruction.paid
|
|
204
|
+
}
|
|
203
205
|
: null
|
|
204
206
|
}
|
|
205
207
|
},
|
|
@@ -208,27 +210,28 @@ const toOrderKioskSettingsDto = (
|
|
|
208
210
|
submitOrderInstruction: {
|
|
209
211
|
payAtCounter: dineInSetting.pickUp.submitOrderInstruction?.payAtCounter
|
|
210
212
|
? {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
en: dineInSetting.pickUp.submitOrderInstruction.payAtCounter
|
|
214
|
+
}
|
|
213
215
|
: null,
|
|
214
216
|
paid: dineInSetting.pickUp.submitOrderInstruction?.paid
|
|
215
217
|
? {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
+
en: dineInSetting.pickUp.submitOrderInstruction.paid
|
|
219
|
+
}
|
|
218
220
|
: null
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
223
|
})
|
|
222
224
|
|
|
223
|
-
const createKioskSettings = (dineIn?: OrderKioskDineIn): OrderKioskSettings => ({
|
|
224
|
-
canTakeaway: kioskSetting.takeaway.enabled,
|
|
225
|
-
dineIn,
|
|
226
|
-
menuItem: kioskSetting.menuItem,
|
|
227
|
-
coverImageLandscape: kioskSetting.coverImageLandscape,
|
|
228
|
-
coverImagePortrait: kioskSetting.coverImagePortrait,
|
|
229
|
-
paymentSetting: createPaymentSettings(kioskSetting.paymentSetting),
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
const createKioskSettings = (dineIn?: OrderKioskDineIn): OrderKioskSettings => ({
|
|
226
|
+
canTakeaway: kioskSetting.takeaway.enabled,
|
|
227
|
+
dineIn,
|
|
228
|
+
menuItem: kioskSetting.menuItem,
|
|
229
|
+
coverImageLandscape: kioskSetting.coverImageLandscape,
|
|
230
|
+
coverImagePortrait: kioskSetting.coverImagePortrait,
|
|
231
|
+
paymentSetting: createPaymentSettings(kioskSetting.paymentSetting),
|
|
232
|
+
otaChannel: kioskSetting.otaChannel || undefined,
|
|
233
|
+
takeaway: kioskSetting.takeaway.submitOrderInstruction
|
|
234
|
+
? {
|
|
232
235
|
submitOrderInstruction: {
|
|
233
236
|
payAtCounter: kioskSetting.takeaway.submitOrderInstruction.payAtCounter
|
|
234
237
|
? {
|
|
@@ -240,8 +243,8 @@ const toOrderKioskSettingsDto = (
|
|
|
240
243
|
en: kioskSetting.takeaway.submitOrderInstruction.paid
|
|
241
244
|
}
|
|
242
245
|
: null
|
|
243
|
-
}
|
|
244
246
|
}
|
|
247
|
+
}
|
|
245
248
|
: undefined
|
|
246
249
|
})
|
|
247
250
|
|
|
@@ -92,6 +92,16 @@ const initializeCheckboxes = () => {
|
|
|
92
92
|
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.SCANPAY)
|
|
93
93
|
useEwallet.value = true
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
if (props.ePaymentTypes.eWallet.terminalScanPay) {
|
|
97
|
+
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_SCAN_PAY)
|
|
98
|
+
useEwallet.value = true
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (props.ePaymentTypes.eWallet.terminalQrPay) {
|
|
102
|
+
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_QR_PAY)
|
|
103
|
+
useEwallet.value = true
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
}
|
|
97
107
|
|
|
@@ -154,7 +164,9 @@ const handleEPaymentCardUpdate = (ev: string) => {
|
|
|
154
164
|
},
|
|
155
165
|
eWallet: {
|
|
156
166
|
qrPay: false,
|
|
157
|
-
scanPay: false
|
|
167
|
+
scanPay: false,
|
|
168
|
+
terminalScanPay: false,
|
|
169
|
+
terminalQrPay: false,
|
|
158
170
|
}
|
|
159
171
|
} as FdoEPaymentMethod
|
|
160
172
|
|
|
@@ -175,6 +187,12 @@ const handleEPaymentCardUpdate = (ev: string) => {
|
|
|
175
187
|
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.SCANPAY)) {
|
|
176
188
|
ePaymentObj.eWallet.scanPay = true
|
|
177
189
|
}
|
|
190
|
+
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_SCAN_PAY)) {
|
|
191
|
+
ePaymentObj.eWallet.terminalScanPay = true
|
|
192
|
+
}
|
|
193
|
+
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_QR_PAY)) {
|
|
194
|
+
ePaymentObj.eWallet.terminalQrPay = true
|
|
195
|
+
}
|
|
178
196
|
}
|
|
179
197
|
}
|
|
180
198
|
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="!!kioskOrderSettingForm" class="flex flex-col gap-32">
|
|
3
|
+
<!-- OTA Channel Section -->
|
|
4
|
+
<div v-if="isAdmin" class="flex flex-col gap-2">
|
|
5
|
+
<span class="fm-typo-en-title-sm-600">{{ t('order.otaChannel') }}</span>
|
|
6
|
+
<div class="flex flex-col gap-1 w-full md:w-1/2">
|
|
7
|
+
<FmTextField
|
|
8
|
+
v-model="kioskOrderSettingForm.otaChannel"
|
|
9
|
+
:label="t('order.otaChannel')"
|
|
10
|
+
:placeholder="t('order.otaChannelHint')"
|
|
11
|
+
/>
|
|
12
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">
|
|
13
|
+
{{ t('order.otaChannelHint') }}
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
3
18
|
<!-- Dine In Section -->
|
|
4
19
|
<div class="flex flex-col gap-2">
|
|
5
20
|
<span class="fm-typo-en-title-sm-600">{{ t('order.dineIn') }}</span>
|
|
@@ -140,30 +155,31 @@
|
|
|
140
155
|
/>
|
|
141
156
|
</div>
|
|
142
157
|
|
|
143
|
-
<!-- Cover Image Section -->
|
|
144
|
-
<div class="flex flex-col gap-2">
|
|
145
|
-
<span class="fm-typo-en-title-sm-600">{{ t('order.coverImage') }}</span>
|
|
146
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
147
|
-
t('order.coverImageFallbackHint')
|
|
148
|
-
}}</span>
|
|
149
|
-
|
|
150
|
-
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
151
|
-
<span class="fm-typo-en-body-md-600">{{ t('order.coverImageLandscape') }}</span>
|
|
152
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
153
|
-
t('order.coverImageLandscapeHint')
|
|
154
|
-
}}</span>
|
|
155
|
-
<FmDropField
|
|
156
|
-
v-if="!getCoverImagePreview('coverImageLandscape')"
|
|
157
|
-
accept="image/*"
|
|
158
|
-
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
159
|
-
|
|
160
|
-
@file-
|
|
161
|
-
|
|
158
|
+
<!-- Cover Image Section -->
|
|
159
|
+
<div class="flex flex-col gap-2">
|
|
160
|
+
<span class="fm-typo-en-title-sm-600">{{ t('order.coverImage') }}</span>
|
|
161
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
162
|
+
t('order.coverImageFallbackHint')
|
|
163
|
+
}}</span>
|
|
164
|
+
|
|
165
|
+
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
166
|
+
<span class="fm-typo-en-body-md-600">{{ t('order.coverImageLandscape') }}</span>
|
|
167
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
168
|
+
t('order.coverImageLandscapeHint')
|
|
169
|
+
}}</span>
|
|
170
|
+
<FmDropField
|
|
171
|
+
v-if="!getCoverImagePreview('coverImageLandscape')"
|
|
172
|
+
accept="image/*"
|
|
173
|
+
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
174
|
+
content-class="w-full max-w-[400px] aspect-video"
|
|
175
|
+
@file-upload="uploadCoverImage('coverImageLandscape', $event)"
|
|
176
|
+
@file-rejected="handleCoverImageRejected('coverImageLandscape', $event)"
|
|
177
|
+
/>
|
|
162
178
|
<div v-else class="flex flex-col gap-2">
|
|
163
179
|
<img
|
|
164
180
|
:src="getCoverImagePreview('coverImageLandscape')!"
|
|
165
181
|
:alt="t('order.coverImageLandscape')"
|
|
166
|
-
class="
|
|
182
|
+
class="max-w-[400px] aspect-video object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
167
183
|
/>
|
|
168
184
|
<FmButton
|
|
169
185
|
variant="tertiary"
|
|
@@ -174,23 +190,24 @@
|
|
|
174
190
|
</div>
|
|
175
191
|
</div>
|
|
176
192
|
|
|
177
|
-
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
178
|
-
<span class="fm-typo-en-body-md-600">{{ t('order.coverImagePortrait') }}</span>
|
|
179
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
180
|
-
t('order.coverImagePortraitHint')
|
|
181
|
-
}}</span>
|
|
182
|
-
<FmDropField
|
|
183
|
-
v-if="!getCoverImagePreview('coverImagePortrait')"
|
|
184
|
-
accept="image/*"
|
|
185
|
-
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
186
|
-
|
|
187
|
-
@file-
|
|
193
|
+
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
194
|
+
<span class="fm-typo-en-body-md-600">{{ t('order.coverImagePortrait') }}</span>
|
|
195
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
196
|
+
t('order.coverImagePortraitHint')
|
|
197
|
+
}}</span>
|
|
198
|
+
<FmDropField
|
|
199
|
+
v-if="!getCoverImagePreview('coverImagePortrait')"
|
|
200
|
+
accept="image/*"
|
|
201
|
+
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
202
|
+
content-class="w-[240px] aspect-[9/16]"
|
|
203
|
+
@file-upload="uploadCoverImage('coverImagePortrait', $event)"
|
|
204
|
+
@file-rejected="handleCoverImageRejected('coverImagePortrait', $event)"
|
|
188
205
|
/>
|
|
189
206
|
<div v-else class="flex flex-col gap-2">
|
|
190
207
|
<img
|
|
191
208
|
:src="getCoverImagePreview('coverImagePortrait')!"
|
|
192
209
|
:alt="t('order.coverImagePortrait')"
|
|
193
|
-
class="
|
|
210
|
+
class="max-w-[200px] aspect-[9/16] object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
194
211
|
/>
|
|
195
212
|
<FmButton
|
|
196
213
|
variant="tertiary"
|
|
@@ -256,9 +273,12 @@ import type {
|
|
|
256
273
|
import { useLoading } from '@/composables/loading'
|
|
257
274
|
import { useSnackbar } from '@feedmepos/ui-library'
|
|
258
275
|
import { useI18n } from '@feedmepos/mf-common'
|
|
276
|
+
import { useCoreStore } from '@feedmepos/mf-common'
|
|
259
277
|
import { uploadImageFile } from '@/utils/firebase-storage'
|
|
260
278
|
|
|
261
279
|
const { t } = useI18n()
|
|
280
|
+
const CoreStore = useCoreStore()
|
|
281
|
+
const isAdmin = computed(() => CoreStore.sessionUser.value?.role.isAdmin ?? false)
|
|
262
282
|
|
|
263
283
|
interface Props {
|
|
264
284
|
restaurantId: string
|
|
@@ -296,6 +316,7 @@ const maxRules = computed(() => [nonNegativeRule, greaterThanMinRule])
|
|
|
296
316
|
|
|
297
317
|
const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
|
|
298
318
|
const f = kioskOrderSettingForm.value
|
|
319
|
+
const otaChannel = f.otaChannel?.trim()
|
|
299
320
|
|
|
300
321
|
// Validate display stand settings if both dineIn and displayStand are enabled
|
|
301
322
|
if (f.dineIn.enabled && f.dineIn.displayStand.enabled) {
|
|
@@ -313,6 +334,7 @@ const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
|
|
|
313
334
|
// Return the form as-is if valid, with display stand disabled when dineIn is disabled
|
|
314
335
|
return {
|
|
315
336
|
...f,
|
|
337
|
+
otaChannel: otaChannel || undefined,
|
|
316
338
|
dineIn: {
|
|
317
339
|
...f.dineIn,
|
|
318
340
|
displayStand: {
|
|
@@ -339,8 +361,8 @@ function updateEPaymentSetting(form: FdoEPaymentMethod) {
|
|
|
339
361
|
kioskOrderSettingForm.value.paymentSetting.ePaymentTypes = form
|
|
340
362
|
}
|
|
341
363
|
|
|
342
|
-
type CoverImageField = 'coverImageLandscape' | 'coverImagePortrait'
|
|
343
|
-
const MAX_IMAGE_FILE_SIZE = 10 * 1000 * 1000
|
|
364
|
+
type CoverImageField = 'coverImageLandscape' | 'coverImagePortrait'
|
|
365
|
+
const MAX_IMAGE_FILE_SIZE = 10 * 1000 * 1000
|
|
344
366
|
|
|
345
367
|
function clearCoverImage(field: CoverImageField) {
|
|
346
368
|
kioskOrderSettingForm.value[field] = null
|
|
@@ -74,7 +74,7 @@ async function updateDriveThruSetting() {
|
|
|
74
74
|
if (newDriveThruSetting) {
|
|
75
75
|
await restaurantStore.updateDriveThruSetting(newDriveThruSetting)
|
|
76
76
|
if (currentRestaurant.value) {
|
|
77
|
-
currentRestaurant.value.driveThru = newDriveThruSetting
|
|
77
|
+
;(currentRestaurant.value as any).driveThru = newDriveThruSetting
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
})
|
|
@@ -84,8 +84,8 @@ async function updateDriveThruSetting() {
|
|
|
84
84
|
watch(
|
|
85
85
|
() => currentRestaurant.value,
|
|
86
86
|
async (newRestaurant) => {
|
|
87
|
-
if (newRestaurant?.driveThru) {
|
|
88
|
-
driveThruSetting.value = utils.clone(newRestaurant.driveThru)
|
|
87
|
+
if ((newRestaurant as any)?.driveThru) {
|
|
88
|
+
driveThruSetting.value = utils.clone((newRestaurant as any).driveThru)
|
|
89
89
|
} else {
|
|
90
90
|
driveThruSetting.value = initDriveThruSetting()
|
|
91
91
|
}
|
|
@@ -94,7 +94,7 @@ watch(
|
|
|
94
94
|
)
|
|
95
95
|
|
|
96
96
|
onMounted(async () => {
|
|
97
|
-
const newRestaurant = currentRestaurant.value
|
|
97
|
+
const newRestaurant = currentRestaurant.value as any
|
|
98
98
|
if (newRestaurant?.driveThru) {
|
|
99
99
|
driveThruSetting.value = utils.clone(newRestaurant.driveThru)
|
|
100
100
|
}
|