@feedmepos/mf-order-setting 0.0.76 → 0.0.77
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-H7stMDFu.js → KioskDevicesView-Dgs5_UoK.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DgpV4oKE.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-B4DXPgAV.js} +3 -3
- package/dist/KioskSettingView-BUcPNVTc.js +681 -0
- package/dist/{KioskView-Cxcc1UL1.js → KioskView-DelVMMj4.js} +137 -127
- package/dist/{OrderSettingsView-Ds2L_rbu.js → OrderSettingsView-DE2U7vqW.js} +9232 -8262
- package/dist/{app-BDlPjU4y.js → app-BIvt4NBq.js} +1476 -1302
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-OJf1trOq.js → dayjs.min-B58_jBg3.js} +1 -1
- package/dist/frontend/mf-order/src/api/index.d.ts +3 -1
- package/dist/frontend/mf-order/src/api/remoteOrder/index.d.ts +65 -2
- package/dist/frontend/mf-order/src/app.d.ts +174 -0
- package/dist/frontend/mf-order/src/composables/useInternalUser.d.ts +3 -0
- package/dist/frontend/mf-order/src/main.d.ts +174 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +4 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +15 -3
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/AdditionalStores.vue.d.ts +16 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/FoodpandaAdditionalStores.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue.d.ts +15 -4
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/IntegrationIdentityDetails.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ShopeefoodAdditionalStores.vue.d.ts +10 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/index-CLS-FSH-.js +762 -0
- package/dist/{index-gGOpbnY3.js → index-CahsmFL1.js} +1 -1
- package/dist/{lineman-settings.dto-Cny_fF4n.js → lineman-settings.dto-DBDThIb0.js} +8999 -8874
- package/dist/package/entity/delivery/delivery.enum.d.ts +1 -1
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +4 -4
- package/dist/package/entity/kiosk/marketing/marketing.dto.d.ts +11 -0
- package/dist/package/entity/order-platform/base-integration.dto.d.ts +179 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-dto.d.ts +2 -2
- package/dist/package/entity/order-platform/deliveroo/deliveroo-setting.do.d.ts +2 -2
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +4 -4
- package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +4 -4
- package/dist/package/entity/order-platform/foodpanda/foodpanda-menu.dto.d.ts +1 -1
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.do.d.ts +105 -4
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.dto.d.ts +30 -11
- package/dist/package/entity/order-platform/gofood/gofood-settings.do.d.ts +2 -2
- package/dist/package/entity/order-platform/gofood/gofood-settings.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +10 -10
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +134 -6
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +42 -20
- package/dist/package/entity/order-platform/lineman/lineman-settings.do.d.ts +2 -2
- package/dist/package/entity/order-platform/lineman/lineman-settings.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.do.d.ts +102 -4
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.dto.d.ts +66 -5
- package/dist/package/entity/order-platform/tng/tng-settings.do.d.ts +2 -2
- package/dist/package/entity/order-platform/tng/tng-settings.dto.d.ts +4 -4
- package/dist/package/entity/order-setting/dine-in/dine-in.do.d.ts +2 -2
- package/dist/package/entity/order-setting/dine-in/dine-in.dto.d.ts +2 -2
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +6 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +6 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +14 -4
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +28 -8
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +10 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +24 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +8 -2
- package/src/api/remoteOrder/index.ts +200 -4
- package/src/composables/useInternalUser.ts +14 -0
- package/src/locales/en-US.json +43 -0
- package/src/locales/ja-JP.json +43 -0
- package/src/locales/th-TH.json +90 -45
- package/src/locales/zh-CN.json +43 -0
- package/src/modules/order-setting/kiosk/interface.ts +29 -19
- package/src/stores/order-setting/mapper.ts +65 -55
- package/src/views/kiosk/settings/KioskSettingView.vue +33 -0
- package/src/views/order-settings/delivery/DeliverySetting.vue +0 -1
- package/src/views/order-settings/delivery/delivery.data.ts +3 -0
- package/src/views/order-settings/delivery/integrated-delivery/AdditionalStores.vue +472 -0
- package/src/views/order-settings/delivery/integrated-delivery/FoodpandaAdditionalStores.vue +314 -0
- package/src/views/order-settings/delivery/integrated-delivery/FoodpandaSetting.vue +27 -8
- package/src/views/order-settings/delivery/integrated-delivery/GrabfoodSetting.vue +31 -12
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +23 -11
- package/src/views/order-settings/delivery/integrated-delivery/IntegrationIdentityDetails.vue +144 -0
- package/src/views/order-settings/delivery/integrated-delivery/ShopeefoodAdditionalStores.vue +335 -0
- package/src/views/order-settings/delivery/integrated-delivery/ShopeefoodSetting.vue +29 -8
- package/src/views/order-settings/queue/QueueSetting.vue +1 -1
- package/dist/KioskSettingView-fF6k9s_q.js +0 -658
- package/dist/index-Bid9lO2x.js +0 -665
|
@@ -25,9 +25,9 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
25
25
|
enabled: boolean;
|
|
26
26
|
mergeAction: "concat" | "override" | "keep";
|
|
27
27
|
} | null | undefined;
|
|
28
|
-
printChecklist?: boolean | null | undefined;
|
|
29
28
|
autoCloseBill?: boolean | null | undefined;
|
|
30
29
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
30
|
+
printChecklist?: boolean | null | undefined;
|
|
31
31
|
overridePax: boolean | null;
|
|
32
32
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
33
33
|
}, {
|
|
@@ -35,9 +35,9 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
35
35
|
enabled?: boolean | undefined;
|
|
36
36
|
mergeAction?: "concat" | "override" | "keep" | undefined;
|
|
37
37
|
} | null | undefined;
|
|
38
|
-
printChecklist?: boolean | null | undefined;
|
|
39
38
|
autoCloseBill?: boolean | null | undefined;
|
|
40
39
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
40
|
+
printChecklist?: boolean | null | undefined;
|
|
41
41
|
overridePax?: boolean | null | undefined;
|
|
42
42
|
tableCartSyncMode?: "poll" | "realtime" | null | undefined;
|
|
43
43
|
}>>>;
|
|
@@ -565,6 +565,8 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
565
565
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
566
566
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
567
567
|
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
568
|
+
autoCloseBill: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
569
|
+
printReceiptAfterClose: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
568
570
|
}, "strip", z.ZodTypeAny, {
|
|
569
571
|
dineIn?: {
|
|
570
572
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -624,6 +626,8 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
624
626
|
coverImageLandscape?: string | null | undefined;
|
|
625
627
|
coverImagePortrait?: string | null | undefined;
|
|
626
628
|
otaChannel?: string | null | undefined;
|
|
629
|
+
autoCloseBill?: boolean | null | undefined;
|
|
630
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
627
631
|
}, {
|
|
628
632
|
dineIn?: {
|
|
629
633
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -683,6 +687,8 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
683
687
|
coverImageLandscape?: string | null | undefined;
|
|
684
688
|
coverImagePortrait?: string | null | undefined;
|
|
685
689
|
otaChannel?: string | null | undefined;
|
|
690
|
+
autoCloseBill?: boolean | null | undefined;
|
|
691
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
686
692
|
}>>>>;
|
|
687
693
|
queueSettings: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
688
694
|
enableOrder: z.ZodBoolean;
|
|
@@ -1180,6 +1186,8 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
1180
1186
|
coverImageLandscape?: string | null | undefined;
|
|
1181
1187
|
coverImagePortrait?: string | null | undefined;
|
|
1182
1188
|
otaChannel?: string | null | undefined;
|
|
1189
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1190
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1183
1191
|
} | null | undefined;
|
|
1184
1192
|
queueSettings?: {
|
|
1185
1193
|
codeSettings?: {
|
|
@@ -1208,9 +1216,9 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
1208
1216
|
enabled: boolean;
|
|
1209
1217
|
mergeAction: "concat" | "override" | "keep";
|
|
1210
1218
|
} | null | undefined;
|
|
1211
|
-
printChecklist?: boolean | null | undefined;
|
|
1212
1219
|
autoCloseBill?: boolean | null | undefined;
|
|
1213
1220
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
1221
|
+
printChecklist?: boolean | null | undefined;
|
|
1214
1222
|
overridePax: boolean | null;
|
|
1215
1223
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
1216
1224
|
} | null | undefined;
|
|
@@ -1392,6 +1400,8 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
1392
1400
|
coverImageLandscape?: string | null | undefined;
|
|
1393
1401
|
coverImagePortrait?: string | null | undefined;
|
|
1394
1402
|
otaChannel?: string | null | undefined;
|
|
1403
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1404
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1395
1405
|
} | null | undefined;
|
|
1396
1406
|
queueSettings?: {
|
|
1397
1407
|
duration?: number | undefined;
|
|
@@ -1420,9 +1430,9 @@ export declare const OrderSettingsDto: z.ZodObject<{
|
|
|
1420
1430
|
enabled?: boolean | undefined;
|
|
1421
1431
|
mergeAction?: "concat" | "override" | "keep" | undefined;
|
|
1422
1432
|
} | null | undefined;
|
|
1423
|
-
printChecklist?: boolean | null | undefined;
|
|
1424
1433
|
autoCloseBill?: boolean | null | undefined;
|
|
1425
1434
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
1435
|
+
printChecklist?: boolean | null | undefined;
|
|
1426
1436
|
overridePax?: boolean | null | undefined;
|
|
1427
1437
|
tableCartSyncMode?: "poll" | "realtime" | null | undefined;
|
|
1428
1438
|
} | null | undefined;
|
|
@@ -1541,9 +1551,9 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
1541
1551
|
enabled: boolean;
|
|
1542
1552
|
mergeAction: "concat" | "override" | "keep";
|
|
1543
1553
|
} | null | undefined;
|
|
1544
|
-
printChecklist?: boolean | null | undefined;
|
|
1545
1554
|
autoCloseBill?: boolean | null | undefined;
|
|
1546
1555
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
1556
|
+
printChecklist?: boolean | null | undefined;
|
|
1547
1557
|
overridePax: boolean | null;
|
|
1548
1558
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
1549
1559
|
}, {
|
|
@@ -1551,9 +1561,9 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
1551
1561
|
enabled?: boolean | undefined;
|
|
1552
1562
|
mergeAction?: "concat" | "override" | "keep" | undefined;
|
|
1553
1563
|
} | null | undefined;
|
|
1554
|
-
printChecklist?: boolean | null | undefined;
|
|
1555
1564
|
autoCloseBill?: boolean | null | undefined;
|
|
1556
1565
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
1566
|
+
printChecklist?: boolean | null | undefined;
|
|
1557
1567
|
overridePax?: boolean | null | undefined;
|
|
1558
1568
|
tableCartSyncMode?: "poll" | "realtime" | null | undefined;
|
|
1559
1569
|
}>>>;
|
|
@@ -2081,6 +2091,8 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2081
2091
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2082
2092
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2083
2093
|
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2094
|
+
autoCloseBill: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
2095
|
+
printReceiptAfterClose: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
2084
2096
|
}, "strip", z.ZodTypeAny, {
|
|
2085
2097
|
dineIn?: {
|
|
2086
2098
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -2140,6 +2152,8 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2140
2152
|
coverImageLandscape?: string | null | undefined;
|
|
2141
2153
|
coverImagePortrait?: string | null | undefined;
|
|
2142
2154
|
otaChannel?: string | null | undefined;
|
|
2155
|
+
autoCloseBill?: boolean | null | undefined;
|
|
2156
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
2143
2157
|
}, {
|
|
2144
2158
|
dineIn?: {
|
|
2145
2159
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -2199,6 +2213,8 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2199
2213
|
coverImageLandscape?: string | null | undefined;
|
|
2200
2214
|
coverImagePortrait?: string | null | undefined;
|
|
2201
2215
|
otaChannel?: string | null | undefined;
|
|
2216
|
+
autoCloseBill?: boolean | null | undefined;
|
|
2217
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
2202
2218
|
}>>>>;
|
|
2203
2219
|
queueSettings: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
2204
2220
|
enableOrder: z.ZodBoolean;
|
|
@@ -2696,6 +2712,8 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2696
2712
|
coverImageLandscape?: string | null | undefined;
|
|
2697
2713
|
coverImagePortrait?: string | null | undefined;
|
|
2698
2714
|
otaChannel?: string | null | undefined;
|
|
2715
|
+
autoCloseBill?: boolean | null | undefined;
|
|
2716
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
2699
2717
|
} | null | undefined;
|
|
2700
2718
|
queueSettings?: {
|
|
2701
2719
|
codeSettings?: {
|
|
@@ -2724,9 +2742,9 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2724
2742
|
enabled: boolean;
|
|
2725
2743
|
mergeAction: "concat" | "override" | "keep";
|
|
2726
2744
|
} | null | undefined;
|
|
2727
|
-
printChecklist?: boolean | null | undefined;
|
|
2728
2745
|
autoCloseBill?: boolean | null | undefined;
|
|
2729
2746
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
2747
|
+
printChecklist?: boolean | null | undefined;
|
|
2730
2748
|
overridePax: boolean | null;
|
|
2731
2749
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
2732
2750
|
} | null | undefined;
|
|
@@ -2907,6 +2925,8 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2907
2925
|
coverImageLandscape?: string | null | undefined;
|
|
2908
2926
|
coverImagePortrait?: string | null | undefined;
|
|
2909
2927
|
otaChannel?: string | null | undefined;
|
|
2928
|
+
autoCloseBill?: boolean | null | undefined;
|
|
2929
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
2910
2930
|
} | null | undefined;
|
|
2911
2931
|
queueSettings?: {
|
|
2912
2932
|
duration?: number | undefined;
|
|
@@ -2935,9 +2955,9 @@ export declare const OrderSettingUpdateDto: z.ZodObject<Omit<{
|
|
|
2935
2955
|
enabled?: boolean | undefined;
|
|
2936
2956
|
mergeAction?: "concat" | "override" | "keep" | undefined;
|
|
2937
2957
|
} | null | undefined;
|
|
2938
|
-
printChecklist?: boolean | null | undefined;
|
|
2939
2958
|
autoCloseBill?: boolean | null | undefined;
|
|
2940
2959
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
2960
|
+
printChecklist?: boolean | null | undefined;
|
|
2941
2961
|
overridePax?: boolean | null | undefined;
|
|
2942
2962
|
tableCartSyncMode?: "poll" | "realtime" | null | undefined;
|
|
2943
2963
|
} | null | undefined;
|
|
@@ -4329,6 +4329,8 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
|
|
|
4329
4329
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4330
4330
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4331
4331
|
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4332
|
+
autoCloseBill: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
4333
|
+
printReceiptAfterClose: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
4332
4334
|
}, "strip", z.ZodTypeAny, {
|
|
4333
4335
|
dineIn?: {
|
|
4334
4336
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -4388,6 +4390,8 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
|
|
|
4388
4390
|
coverImageLandscape?: string | null | undefined;
|
|
4389
4391
|
coverImagePortrait?: string | null | undefined;
|
|
4390
4392
|
otaChannel?: string | null | undefined;
|
|
4393
|
+
autoCloseBill?: boolean | null | undefined;
|
|
4394
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
4391
4395
|
}, {
|
|
4392
4396
|
dineIn?: {
|
|
4393
4397
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -4447,6 +4451,8 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
|
|
|
4447
4451
|
coverImageLandscape?: string | null | undefined;
|
|
4448
4452
|
coverImagePortrait?: string | null | undefined;
|
|
4449
4453
|
otaChannel?: string | null | undefined;
|
|
4454
|
+
autoCloseBill?: boolean | null | undefined;
|
|
4455
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
4450
4456
|
}>>>>;
|
|
4451
4457
|
queueSettings: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
4452
4458
|
enableOrder: z.ZodBoolean;
|
|
@@ -5441,6 +5447,8 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
|
|
|
5441
5447
|
coverImageLandscape?: string | null | undefined;
|
|
5442
5448
|
coverImagePortrait?: string | null | undefined;
|
|
5443
5449
|
otaChannel?: string | null | undefined;
|
|
5450
|
+
autoCloseBill?: boolean | null | undefined;
|
|
5451
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
5444
5452
|
} | null | undefined;
|
|
5445
5453
|
queueSettings?: {
|
|
5446
5454
|
codeSettings?: {
|
|
@@ -5775,6 +5783,8 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
|
|
|
5775
5783
|
coverImageLandscape?: string | null | undefined;
|
|
5776
5784
|
coverImagePortrait?: string | null | undefined;
|
|
5777
5785
|
otaChannel?: string | null | undefined;
|
|
5786
|
+
autoCloseBill?: boolean | null | undefined;
|
|
5787
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
5778
5788
|
} | null | undefined;
|
|
5779
5789
|
queueSettings?: {
|
|
5780
5790
|
duration?: number | undefined;
|
|
@@ -491,6 +491,8 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
491
491
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
492
492
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
493
493
|
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
494
|
+
autoCloseBill: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
495
|
+
printReceiptAfterClose: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
494
496
|
}, "strip", z.ZodTypeAny, {
|
|
495
497
|
dineIn?: {
|
|
496
498
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -550,6 +552,8 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
550
552
|
coverImageLandscape?: string | null | undefined;
|
|
551
553
|
coverImagePortrait?: string | null | undefined;
|
|
552
554
|
otaChannel?: string | null | undefined;
|
|
555
|
+
autoCloseBill?: boolean | null | undefined;
|
|
556
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
553
557
|
}, {
|
|
554
558
|
dineIn?: {
|
|
555
559
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -609,6 +613,8 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
609
613
|
coverImageLandscape?: string | null | undefined;
|
|
610
614
|
coverImagePortrait?: string | null | undefined;
|
|
611
615
|
otaChannel?: string | null | undefined;
|
|
616
|
+
autoCloseBill?: boolean | null | undefined;
|
|
617
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
612
618
|
}>>;
|
|
613
619
|
}>, "strip", z.ZodTypeAny, {
|
|
614
620
|
data: {
|
|
@@ -670,6 +676,8 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
670
676
|
coverImageLandscape?: string | null | undefined;
|
|
671
677
|
coverImagePortrait?: string | null | undefined;
|
|
672
678
|
otaChannel?: string | null | undefined;
|
|
679
|
+
autoCloseBill?: boolean | null | undefined;
|
|
680
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
673
681
|
};
|
|
674
682
|
type: "KIOSK:UPDATE_SETTING";
|
|
675
683
|
}, {
|
|
@@ -732,6 +740,8 @@ export declare const WebSocketEventDto: z.ZodDiscriminatedUnion<"type", z.Primit
|
|
|
732
740
|
coverImageLandscape?: string | null | undefined;
|
|
733
741
|
coverImagePortrait?: string | null | undefined;
|
|
734
742
|
otaChannel?: string | null | undefined;
|
|
743
|
+
autoCloseBill?: boolean | null | undefined;
|
|
744
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
735
745
|
} | undefined;
|
|
736
746
|
type: "KIOSK:UPDATE_SETTING";
|
|
737
747
|
}>>;
|
|
@@ -1192,6 +1202,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1192
1202
|
coverImageLandscape: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1193
1203
|
coverImagePortrait: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1194
1204
|
otaChannel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1205
|
+
autoCloseBill: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1206
|
+
printReceiptAfterClose: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1195
1207
|
}, "strip", z.ZodTypeAny, {
|
|
1196
1208
|
dineIn?: {
|
|
1197
1209
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -1251,6 +1263,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1251
1263
|
coverImageLandscape?: string | null | undefined;
|
|
1252
1264
|
coverImagePortrait?: string | null | undefined;
|
|
1253
1265
|
otaChannel?: string | null | undefined;
|
|
1266
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1267
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1254
1268
|
}, {
|
|
1255
1269
|
dineIn?: {
|
|
1256
1270
|
requiredSlot?: boolean | null | undefined;
|
|
@@ -1310,6 +1324,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1310
1324
|
coverImageLandscape?: string | null | undefined;
|
|
1311
1325
|
coverImagePortrait?: string | null | undefined;
|
|
1312
1326
|
otaChannel?: string | null | undefined;
|
|
1327
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1328
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1313
1329
|
}>>;
|
|
1314
1330
|
}>, "strip", z.ZodTypeAny, {
|
|
1315
1331
|
data: {
|
|
@@ -1371,6 +1387,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1371
1387
|
coverImageLandscape?: string | null | undefined;
|
|
1372
1388
|
coverImagePortrait?: string | null | undefined;
|
|
1373
1389
|
otaChannel?: string | null | undefined;
|
|
1390
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1391
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1374
1392
|
};
|
|
1375
1393
|
type: "KIOSK:UPDATE_SETTING";
|
|
1376
1394
|
}, {
|
|
@@ -1433,6 +1451,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1433
1451
|
coverImageLandscape?: string | null | undefined;
|
|
1434
1452
|
coverImagePortrait?: string | null | undefined;
|
|
1435
1453
|
otaChannel?: string | null | undefined;
|
|
1454
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1455
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1436
1456
|
} | undefined;
|
|
1437
1457
|
type: "KIOSK:UPDATE_SETTING";
|
|
1438
1458
|
}>>;
|
|
@@ -1543,6 +1563,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1543
1563
|
coverImageLandscape?: string | null | undefined;
|
|
1544
1564
|
coverImagePortrait?: string | null | undefined;
|
|
1545
1565
|
otaChannel?: string | null | undefined;
|
|
1566
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1567
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1546
1568
|
};
|
|
1547
1569
|
type: "KIOSK:UPDATE_SETTING";
|
|
1548
1570
|
};
|
|
@@ -1654,6 +1676,8 @@ export declare const WebSocketReqDto: z.ZodObject<{
|
|
|
1654
1676
|
coverImageLandscape?: string | null | undefined;
|
|
1655
1677
|
coverImagePortrait?: string | null | undefined;
|
|
1656
1678
|
otaChannel?: string | null | undefined;
|
|
1679
|
+
autoCloseBill?: boolean | null | undefined;
|
|
1680
|
+
printReceiptAfterClose?: boolean | null | undefined;
|
|
1657
1681
|
} | undefined;
|
|
1658
1682
|
type: "KIOSK:UPDATE_SETTING";
|
|
1659
1683
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tng-setting-sheet[data-v-9b3f97fa] .text-fm-color-neutral-gray-400.fm-typo-cn-body-md-400.mb-5.mt-5{margin-top:0;margin-bottom:0}.delivery-company-filter-toolbar[data-v-
|
|
1
|
+
.integration-details[data-v-b07038c5]{display:flex;flex-direction:column;gap:.625rem;padding:1rem;margin-top:1rem;border:1px solid #e5e7eb;border-radius:.5rem}.integration-details--owned[data-v-b07038c5]{border-color:var(--fm-color-primary-oats);box-shadow:inset .25rem 0 0 var(--fm-color-primary)}.integration-details__header[data-v-b07038c5]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}.integration-details__title[data-v-b07038c5]{display:flex;align-items:center;gap:.375rem}.integration-details__store-label[data-v-b07038c5]{padding:.25rem .625rem;color:var(--fm-color-primary);background:var(--fm-color-primary-oats);border-radius:999px}.integration-details__row[data-v-b07038c5]{display:grid;grid-template-columns:10rem minmax(0,1fr);align-items:center;gap:1rem}.integration-details__value[data-v-b07038c5]{display:flex;min-width:0;align-items:center;gap:.5rem}code[data-v-b07038c5]{min-width:0;overflow-wrap:anywhere}@media (max-width: 460px){.integration-details__row[data-v-b07038c5]{grid-template-columns:1fr;gap:.25rem}.integration-details__header[data-v-b07038c5]{align-items:flex-start}}.store-section[data-v-fede2e83]{border-top:1px solid #e5e7eb;padding-top:1.5rem}.store-card[data-v-fede2e83]{padding:1.25rem;margin-bottom:1rem}.store-card__top[data-v-fede2e83]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.store-card__title[data-v-fede2e83]{min-width:0;word-break:break-all}.store-card__actions[data-v-fede2e83]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;flex-shrink:0}.store-card__fields[data-v-fede2e83]{display:flex;flex-direction:column;gap:.625rem}.store-field[data-v-fede2e83]{display:grid;grid-template-columns:9rem minmax(0,1fr);gap:1rem}.store-field>span[data-v-fede2e83]:first-child{color:var(--fm-color-neutral-gray-400)}.store-field>span[data-v-fede2e83]:last-child{word-break:break-word}.store-sheet-body[data-v-fede2e83]{display:flex;flex-direction:column;gap:1rem;padding-top:.5rem}@media (max-width: 460px){.store-field[data-v-fede2e83]{grid-template-columns:1fr}}.store-section[data-v-eb981b1a]{border-top:1px solid #e5e7eb;padding-top:1.5rem}.store-card[data-v-eb981b1a]{padding:1.25rem;margin-bottom:1rem}.store-card__top[data-v-eb981b1a]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.store-card__title[data-v-eb981b1a]{min-width:0;word-break:break-all}.store-card__actions[data-v-eb981b1a]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;flex-shrink:0}.store-card__fields[data-v-eb981b1a]{display:flex;flex-direction:column;gap:.625rem}.store-field[data-v-eb981b1a]{display:grid;grid-template-columns:9rem minmax(0,1fr);align-items:start;-moz-column-gap:1rem;column-gap:1rem;row-gap:.125rem}.store-field>span[data-v-eb981b1a]:last-child{word-break:break-word}.store-sheet-body[data-v-eb981b1a]{display:flex;flex-direction:column;gap:1rem;padding-top:.5rem}.store-sheet-activate[data-v-eb981b1a]{padding-top:1.25rem;border-top:1px solid #e5e7eb}.store-sheet-activate__hint[data-v-eb981b1a]{margin-top:.5rem}@media (max-width: 460px){.store-field[data-v-eb981b1a]{grid-template-columns:1fr}}.store-section[data-v-748c1a37]{border-top:1px solid #e5e7eb;padding-top:1.5rem}.store-card[data-v-748c1a37]{padding:1.25rem;margin-bottom:1rem}.store-card__top[data-v-748c1a37]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.store-card__title[data-v-748c1a37]{min-width:0;word-break:break-all}.store-card__actions[data-v-748c1a37]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;flex-shrink:0}.store-card__fields[data-v-748c1a37]{display:flex;flex-direction:column;gap:.625rem}.store-field[data-v-748c1a37]{display:grid;grid-template-columns:9rem minmax(0,1fr);gap:1rem}.store-field>span[data-v-748c1a37]:first-child{color:var(--fm-color-neutral-gray-400)}.store-field>span[data-v-748c1a37]:last-child{word-break:break-word}.store-sheet-body[data-v-748c1a37]{display:flex;flex-direction:column;gap:1rem;padding-top:.5rem}@media (max-width: 460px){.store-field[data-v-748c1a37]{grid-template-columns:1fr}}.tng-setting-sheet[data-v-9b3f97fa] .text-fm-color-neutral-gray-400.fm-typo-cn-body-md-400.mb-5.mt-5{margin-top:0;margin-bottom:0}.delivery-company-filter-toolbar[data-v-18c1028e]{display:flex;flex-direction:row;justify-content:space-between}@media (max-width: 647px){.delivery-company-filter-toolbar[data-v-18c1028e]{flex-direction:column;flex-wrap:wrap}}
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -94,11 +94,14 @@ class ApiError extends Error {
|
|
|
94
94
|
export class SvcCompanyApiError extends ApiError {
|
|
95
95
|
/** HTTP status from the failed response, when available (e.g. 403 for permission denied). */
|
|
96
96
|
readonly status?: number
|
|
97
|
-
|
|
97
|
+
/** Stable application error code from the failed response, when supplied. */
|
|
98
|
+
readonly code?: string
|
|
99
|
+
constructor(message: string, status?: number, code?: string) {
|
|
98
100
|
super(message)
|
|
99
101
|
this.name = 'SvcCompanyApiError'
|
|
100
102
|
this.message = message
|
|
101
103
|
this.status = status
|
|
104
|
+
this.code = code
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
@@ -134,7 +137,10 @@ export const baseClientInstance = (
|
|
|
134
137
|
if (error instanceof AxiosError) {
|
|
135
138
|
const data = error.response?.data
|
|
136
139
|
const errMsg = data?.message || data?.error || `${error.message}` || `${error}`
|
|
137
|
-
|
|
140
|
+
const errCode = typeof data?.code === 'string' ? data.code : undefined
|
|
141
|
+
return Promise.reject(
|
|
142
|
+
new SvcCompanyApiError(errMsg, error.response?.status, errCode)
|
|
143
|
+
)
|
|
138
144
|
}
|
|
139
145
|
return Promise.reject(error)
|
|
140
146
|
}
|
|
@@ -15,17 +15,91 @@ import type {
|
|
|
15
15
|
FdoExternalSetting,
|
|
16
16
|
FdoFoodpandaOrderOutput,
|
|
17
17
|
FdoFoodpandaSettings,
|
|
18
|
+
FPdtoFoodpandaAdditionalStoreCreate,
|
|
19
|
+
FPdtoFoodpandaAdditionalStoreUpsert,
|
|
18
20
|
FdoGoFoodSettings,
|
|
19
21
|
FdoGrabfoodOrderOutput,
|
|
20
22
|
FdoGrabfoodSettings,
|
|
23
|
+
FdtoGrabfoodAdditionalStoreUpsert,
|
|
21
24
|
FdoLinemanSettings,
|
|
22
25
|
FdoShopeeFoodOrder,
|
|
23
26
|
FdoShopeeFoodOrderOutput,
|
|
24
27
|
FdoShopeeFoodSettings,
|
|
28
|
+
FdtoShopeeFoodAdditionalStoreUpsert,
|
|
25
29
|
FdtoGetOrderReq,
|
|
26
30
|
FdoTngSettings
|
|
27
31
|
} from '@entity'
|
|
28
32
|
|
|
33
|
+
/** A store row as returned by GET /setting/:rid/stores — primary (flagged) + additional. */
|
|
34
|
+
export interface GrabfoodStoreView {
|
|
35
|
+
/** Canonical FeedMe identity used by all store CRUD routes. */
|
|
36
|
+
integrationId: string
|
|
37
|
+
/** Client-only route identity; always equal to integrationId. */
|
|
38
|
+
routeId: string
|
|
39
|
+
partnerId?: string | null
|
|
40
|
+
providerId?: string | null
|
|
41
|
+
merchantID: string
|
|
42
|
+
catalogId?: string | null
|
|
43
|
+
enable?: boolean
|
|
44
|
+
lastSynchronize?: string | null
|
|
45
|
+
status?: string | null
|
|
46
|
+
menuSyncError?: string | null
|
|
47
|
+
menuRetryCount?: number | null
|
|
48
|
+
integrationStatus?: string | null
|
|
49
|
+
updatedAt?: string | null
|
|
50
|
+
isPrimary: boolean
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FoodpandaStoreView {
|
|
54
|
+
/** Canonical FeedMe identity used by all store CRUD routes. */
|
|
55
|
+
integrationId: string
|
|
56
|
+
/** Client-only route identity; always equal to integrationId. */
|
|
57
|
+
routeId: string
|
|
58
|
+
partnerId?: string | null
|
|
59
|
+
providerId?: string | null
|
|
60
|
+
remoteId: string
|
|
61
|
+
catalogId?: string | null
|
|
62
|
+
enable?: boolean
|
|
63
|
+
lastSynchronize?: string | null
|
|
64
|
+
status?: string | null
|
|
65
|
+
menuSyncError?: string | null
|
|
66
|
+
updatedAt?: string | null
|
|
67
|
+
isPrimary: boolean
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface ShopeefoodStoreView {
|
|
71
|
+
/** Canonical FeedMe identity used by all store CRUD routes. */
|
|
72
|
+
integrationId: string
|
|
73
|
+
/** Client-only route identity; always equal to integrationId. */
|
|
74
|
+
routeId: string
|
|
75
|
+
partnerId?: string | null
|
|
76
|
+
providerId?: string | null
|
|
77
|
+
storeID: string
|
|
78
|
+
catalogId?: string | null
|
|
79
|
+
enable?: boolean
|
|
80
|
+
lastSynchronize?: string | null
|
|
81
|
+
status?: string | null
|
|
82
|
+
menuSyncError?: string | null
|
|
83
|
+
updatedAt?: string | null
|
|
84
|
+
isPrimary: boolean
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function isNonEmptyString(value: unknown): value is string {
|
|
88
|
+
return typeof value === 'string' && value.trim() !== ''
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function normalizeStoreRoutes<T extends { integrationId: string }>(
|
|
92
|
+
stores: T[]
|
|
93
|
+
): (T & { routeId: string })[] {
|
|
94
|
+
return stores.map((store) => {
|
|
95
|
+
if (!isNonEmptyString(store.integrationId)) {
|
|
96
|
+
throw new Error('DPI store response is missing integrationId')
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return { ...store, routeId: store.integrationId }
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
|
|
29
103
|
type DeliveryCompanyUrl =
|
|
30
104
|
| 'foodpanda'
|
|
31
105
|
| 'grabfood'
|
|
@@ -99,16 +173,57 @@ export const remoteOrderApi = {
|
|
|
99
173
|
restaurantId: string,
|
|
100
174
|
dto: FdoFoodpandaSettings
|
|
101
175
|
): Promise<FdoFoodpandaSettings> {
|
|
176
|
+
const payload: Partial<FdoFoodpandaSettings> = { ...dto }
|
|
177
|
+
delete payload.integrationId
|
|
178
|
+
delete payload.remoteId
|
|
179
|
+
delete payload.additionalStores
|
|
102
180
|
return getData(
|
|
103
181
|
await deliveryClientInstance('foodpanda').put(`/setting/${restaurantId}`, {
|
|
104
|
-
|
|
105
|
-
|
|
182
|
+
...payload,
|
|
183
|
+
_id: restaurantId
|
|
106
184
|
})
|
|
107
185
|
)
|
|
108
186
|
},
|
|
109
187
|
async syncFoodpandaMenu(restaurantId: string): Promise<FdoFoodpandaSettings> {
|
|
110
188
|
return getData(await deliveryClientInstance('foodpanda').put(`/menu-sync/${restaurantId}`))
|
|
111
189
|
},
|
|
190
|
+
async listFoodpandaStores(restaurantId: string): Promise<FoodpandaStoreView[]> {
|
|
191
|
+
return normalizeStoreRoutes(
|
|
192
|
+
getData(
|
|
193
|
+
await deliveryClientInstance('foodpanda').get(`/setting/${restaurantId}/stores`)
|
|
194
|
+
) as Omit<FoodpandaStoreView, 'routeId'>[]
|
|
195
|
+
)
|
|
196
|
+
},
|
|
197
|
+
async addFoodpandaStore(
|
|
198
|
+
restaurantId: string,
|
|
199
|
+
store: FPdtoFoodpandaAdditionalStoreCreate
|
|
200
|
+
): Promise<FdoFoodpandaSettings | null> {
|
|
201
|
+
return getData(
|
|
202
|
+
await deliveryClientInstance('foodpanda').post(`/setting/${restaurantId}/stores`, store)
|
|
203
|
+
)
|
|
204
|
+
},
|
|
205
|
+
async updateFoodpandaStore(
|
|
206
|
+
restaurantId: string,
|
|
207
|
+
routeId: string,
|
|
208
|
+
store: FPdtoFoodpandaAdditionalStoreUpsert
|
|
209
|
+
): Promise<FdoFoodpandaSettings | null> {
|
|
210
|
+
return getData(
|
|
211
|
+
await deliveryClientInstance('foodpanda').put(
|
|
212
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`,
|
|
213
|
+
store
|
|
214
|
+
)
|
|
215
|
+
)
|
|
216
|
+
},
|
|
217
|
+
async removeFoodpandaStore(
|
|
218
|
+
restaurantId: string,
|
|
219
|
+
routeId: string
|
|
220
|
+
): Promise<FdoFoodpandaSettings | null> {
|
|
221
|
+
return getData(
|
|
222
|
+
await deliveryClientInstance('foodpanda').delete(
|
|
223
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
},
|
|
112
227
|
async readGrabfood(restaurantId: string): Promise<FdoGrabfoodSettings | null> {
|
|
113
228
|
return getData(await deliveryClientInstance('grabfood').get(`/setting/${restaurantId}`))
|
|
114
229
|
},
|
|
@@ -133,9 +248,53 @@ export const remoteOrderApi = {
|
|
|
133
248
|
async syncGrabfoodMenu(merchantId: string): Promise<FdoGrabfoodSettings> {
|
|
134
249
|
return getData(await deliveryClientInstance('grabfood').get(`/menu-sync/${merchantId}`))
|
|
135
250
|
},
|
|
136
|
-
async startSelfServeFlow(restaurantId: string): Promise<string | null> {
|
|
251
|
+
async startSelfServeFlow(restaurantId: string, routeId?: string): Promise<string | null> {
|
|
137
252
|
return getData(
|
|
138
|
-
await deliveryClientInstance('grabfood').get(
|
|
253
|
+
await deliveryClientInstance('grabfood').get(
|
|
254
|
+
routeId
|
|
255
|
+
? `/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}/integration-url`
|
|
256
|
+
: `/setting/integration-url/${restaurantId}`
|
|
257
|
+
)
|
|
258
|
+
)
|
|
259
|
+
},
|
|
260
|
+
// ── Multi-store: additional GrabFood stores under one restaurant ──
|
|
261
|
+
async listGrabfoodStores(restaurantId: string): Promise<GrabfoodStoreView[]> {
|
|
262
|
+
return normalizeStoreRoutes(
|
|
263
|
+
getData(
|
|
264
|
+
await deliveryClientInstance('grabfood').get(`/setting/${restaurantId}/stores`)
|
|
265
|
+
) as Omit<GrabfoodStoreView, 'routeId'>[]
|
|
266
|
+
)
|
|
267
|
+
},
|
|
268
|
+
async addGrabfoodStore(
|
|
269
|
+
restaurantId: string,
|
|
270
|
+
store: FdtoGrabfoodAdditionalStoreUpsert
|
|
271
|
+
): Promise<FdoGrabfoodSettings | null> {
|
|
272
|
+
return getData(
|
|
273
|
+
await deliveryClientInstance('grabfood').post(`/setting/${restaurantId}/stores`, store)
|
|
274
|
+
)
|
|
275
|
+
},
|
|
276
|
+
async updateGrabfoodStore(
|
|
277
|
+
restaurantId: string,
|
|
278
|
+
routeId: string,
|
|
279
|
+
store: FdtoGrabfoodAdditionalStoreUpsert
|
|
280
|
+
): Promise<FdoGrabfoodSettings | null> {
|
|
281
|
+
return getData(
|
|
282
|
+
await deliveryClientInstance('grabfood').put(
|
|
283
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`,
|
|
284
|
+
store
|
|
285
|
+
)
|
|
286
|
+
)
|
|
287
|
+
},
|
|
288
|
+
async removeGrabfoodStore(
|
|
289
|
+
restaurantId: string,
|
|
290
|
+
routeId: string,
|
|
291
|
+
forceLocal = false
|
|
292
|
+
): Promise<FdoGrabfoodSettings | null> {
|
|
293
|
+
return getData(
|
|
294
|
+
await deliveryClientInstance('grabfood').delete(
|
|
295
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`,
|
|
296
|
+
forceLocal ? { params: { forceLocal: true } } : undefined
|
|
297
|
+
)
|
|
139
298
|
)
|
|
140
299
|
},
|
|
141
300
|
|
|
@@ -167,6 +326,43 @@ export const remoteOrderApi = {
|
|
|
167
326
|
async syncShopeefoodMenu(storeId: string): Promise<FdoShopeeFoodSettings> {
|
|
168
327
|
return getData(await deliveryClientInstance('shopeefood').get(`/menu-sync/${storeId}`))
|
|
169
328
|
},
|
|
329
|
+
async listShopeefoodStores(restaurantId: string): Promise<ShopeefoodStoreView[]> {
|
|
330
|
+
return normalizeStoreRoutes(
|
|
331
|
+
getData(
|
|
332
|
+
await deliveryClientInstance('shopeefood').get(`/setting/${restaurantId}/stores`)
|
|
333
|
+
) as Omit<ShopeefoodStoreView, 'routeId'>[]
|
|
334
|
+
)
|
|
335
|
+
},
|
|
336
|
+
async addShopeefoodStore(
|
|
337
|
+
restaurantId: string,
|
|
338
|
+
store: FdtoShopeeFoodAdditionalStoreUpsert
|
|
339
|
+
): Promise<FdoShopeeFoodSettings | null> {
|
|
340
|
+
return getData(
|
|
341
|
+
await deliveryClientInstance('shopeefood').post(`/setting/${restaurantId}/stores`, store)
|
|
342
|
+
)
|
|
343
|
+
},
|
|
344
|
+
async updateShopeefoodStore(
|
|
345
|
+
restaurantId: string,
|
|
346
|
+
routeId: string,
|
|
347
|
+
store: FdtoShopeeFoodAdditionalStoreUpsert
|
|
348
|
+
): Promise<FdoShopeeFoodSettings | null> {
|
|
349
|
+
return getData(
|
|
350
|
+
await deliveryClientInstance('shopeefood').put(
|
|
351
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`,
|
|
352
|
+
store
|
|
353
|
+
)
|
|
354
|
+
)
|
|
355
|
+
},
|
|
356
|
+
async removeShopeefoodStore(
|
|
357
|
+
restaurantId: string,
|
|
358
|
+
routeId: string
|
|
359
|
+
): Promise<FdoShopeeFoodSettings | null> {
|
|
360
|
+
return getData(
|
|
361
|
+
await deliveryClientInstance('shopeefood').delete(
|
|
362
|
+
`/setting/${restaurantId}/stores/${encodeURIComponent(routeId)}`
|
|
363
|
+
)
|
|
364
|
+
)
|
|
365
|
+
},
|
|
170
366
|
async readGofood(restaurantId: string): Promise<FdoGoFoodSettings | null> {
|
|
171
367
|
return getData(await deliveryClientInstance('gofood').get(`/setting/${restaurantId}`))
|
|
172
368
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed } from 'vue'
|
|
2
|
+
import { useCoreStore } from '@feedmepos/mf-common'
|
|
3
|
+
|
|
4
|
+
export function useInternalUser() {
|
|
5
|
+
const CoreStore = useCoreStore()
|
|
6
|
+
const isInternal = computed(
|
|
7
|
+
() =>
|
|
8
|
+
(CoreStore.sessionUser.value?.role?.isStaff ||
|
|
9
|
+
CoreStore.sessionUser.value?.role?.isAdmin) ??
|
|
10
|
+
false
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
return { isInternal }
|
|
14
|
+
}
|