@feedmepos/mf-order-setting 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{KioskDevicesView-D9PQ22G6.js → KioskDevicesView-DoTQRyXe.js} +1 -1
  2. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-BuwHk_0a.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DB0dvpBG.js} +2 -2
  3. package/dist/{KioskSettingView-C98iSa7q.js → KioskSettingView-DRpVR7Ij.js} +1 -1
  4. package/dist/{KioskView-C6s4u6vt.js → KioskView-4-s6RwC6.js} +4 -4
  5. package/dist/OrderSettingsView-BqgGXVhY.js +76752 -0
  6. package/dist/{app-86WCOyBO.js → app-BbOgWoeI.js} +16 -13
  7. package/dist/app.js +1 -1
  8. package/dist/{dayjs.min-BiuO1l2_.js → dayjs.min-COLd3dVw.js} +1 -1
  9. package/dist/frontend/mf-order/src/api/menu/index.d.ts +4 -0
  10. package/dist/frontend/mf-order/src/app.d.ts +3 -0
  11. package/dist/frontend/mf-order/src/main.d.ts +3 -0
  12. package/dist/frontend/mf-order/src/stores/menu/menu.d.ts +13 -4
  13. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  14. package/dist/{index-DZKSDqn_.js → index-BewBuJGi.js} +2 -2
  15. package/dist/menu.dto-Bf0Evx6J.js +127224 -0
  16. package/dist/package/entity/food-court/order.dto.d.ts +1952 -1952
  17. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +6 -6
  18. package/dist/package/entity/incoming-order/incoming-order.do.d.ts +24 -24
  19. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +16 -16
  20. package/dist/package/entity/order/order.dto.d.ts +3284 -3284
  21. package/dist/package/entity/order/payment/payment.dto.d.ts +1702 -1702
  22. package/dist/package/entity/payment/payment.dto.d.ts +3 -3
  23. package/dist/package/entity/queue/queue.dto.d.ts +868 -868
  24. package/dist/package/entity/restaurant/restaurant.dto.d.ts +282 -3
  25. package/package.json +4 -4
  26. package/src/api/menu/index.ts +4 -1
  27. package/src/locales/en-US.json +1 -0
  28. package/src/locales/th-TH.json +1 -0
  29. package/src/locales/zh-CN.json +1 -0
  30. package/src/stores/menu/menu.ts +33 -14
  31. package/src/views/order-settings/OrderSettingsView.vue +30 -3
  32. package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +0 -1
  33. package/dist/OrderSettingsView-DFB_C-VO.js +0 -50757
  34. package/dist/menu.dto-CT1XwUKO.js +0 -127978
@@ -3955,7 +3955,7 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
3955
3955
  paymentGateways: z.ZodArray<z.ZodDiscriminatedUnion<"paymentGateway", z.Primitive, z.ZodObject<z.extendShape<{
3956
3956
  _id: z.ZodString;
3957
3957
  _rev: z.ZodString;
3958
- paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "REVENUE_MONSTER", "E_GHL", "RAZER_MERCHANT_SERVICE", "MACAU_PASS"]>;
3958
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
3959
3959
  active: z.ZodBoolean;
3960
3960
  }, {
3961
3961
  paymentGateway: z.ZodLiteral<"REVENUE_MONSTER">;
@@ -4000,7 +4000,7 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
4000
4000
  }> | z.ZodObject<z.extendShape<{
4001
4001
  _id: z.ZodString;
4002
4002
  _rev: z.ZodString;
4003
- paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "REVENUE_MONSTER", "E_GHL", "RAZER_MERCHANT_SERVICE", "MACAU_PASS"]>;
4003
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4004
4004
  active: z.ZodBoolean;
4005
4005
  }, {
4006
4006
  paymentGateway: z.ZodLiteral<"RAZER_MERCHANT_SERVICE">;
@@ -4055,7 +4055,7 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
4055
4055
  }> | z.ZodObject<z.extendShape<{
4056
4056
  _id: z.ZodString;
4057
4057
  _rev: z.ZodString;
4058
- paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "REVENUE_MONSTER", "E_GHL", "RAZER_MERCHANT_SERVICE", "MACAU_PASS"]>;
4058
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4059
4059
  active: z.ZodBoolean;
4060
4060
  }, {
4061
4061
  paymentGateway: z.ZodLiteral<"E_GHL">;
@@ -4092,6 +4092,191 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
4092
4092
  terminalId: string;
4093
4093
  privateKey: string;
4094
4094
  };
4095
+ }> | z.ZodObject<z.extendShape<{
4096
+ _id: z.ZodString;
4097
+ _rev: z.ZodString;
4098
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4099
+ active: z.ZodBoolean;
4100
+ }, {
4101
+ paymentGateway: z.ZodLiteral<"MACAU_PASS">;
4102
+ config: z.ZodObject<{
4103
+ merchantId: z.ZodString;
4104
+ merchantName: z.ZodString;
4105
+ merchantCategoryCode: z.ZodString;
4106
+ storeID: z.ZodString;
4107
+ storeName: z.ZodString;
4108
+ }, "strip", z.ZodTypeAny, {
4109
+ merchantId: string;
4110
+ merchantName: string;
4111
+ merchantCategoryCode: string;
4112
+ storeID: string;
4113
+ storeName: string;
4114
+ }, {
4115
+ merchantId: string;
4116
+ merchantName: string;
4117
+ merchantCategoryCode: string;
4118
+ storeID: string;
4119
+ storeName: string;
4120
+ }>;
4121
+ }>, "strip", z.ZodTypeAny, {
4122
+ _id: string;
4123
+ _rev: string;
4124
+ paymentGateway: "MACAU_PASS";
4125
+ active: boolean;
4126
+ config: {
4127
+ merchantId: string;
4128
+ merchantName: string;
4129
+ merchantCategoryCode: string;
4130
+ storeID: string;
4131
+ storeName: string;
4132
+ };
4133
+ }, {
4134
+ _id: string;
4135
+ _rev: string;
4136
+ paymentGateway: "MACAU_PASS";
4137
+ active: boolean;
4138
+ config: {
4139
+ merchantId: string;
4140
+ merchantName: string;
4141
+ merchantCategoryCode: string;
4142
+ storeID: string;
4143
+ storeName: string;
4144
+ };
4145
+ }> | z.ZodObject<z.extendShape<{
4146
+ _id: z.ZodString;
4147
+ _rev: z.ZodString;
4148
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4149
+ active: z.ZodBoolean;
4150
+ }, {
4151
+ paymentGateway: z.ZodLiteral<"GRAB">;
4152
+ config: z.ZodObject<{
4153
+ merchantId: z.ZodString;
4154
+ }, "strip", z.ZodTypeAny, {
4155
+ merchantId: string;
4156
+ }, {
4157
+ merchantId: string;
4158
+ }>;
4159
+ }>, "strip", z.ZodTypeAny, {
4160
+ _id: string;
4161
+ _rev: string;
4162
+ paymentGateway: "GRAB";
4163
+ active: boolean;
4164
+ config: {
4165
+ merchantId: string;
4166
+ };
4167
+ }, {
4168
+ _id: string;
4169
+ _rev: string;
4170
+ paymentGateway: "GRAB";
4171
+ active: boolean;
4172
+ config: {
4173
+ merchantId: string;
4174
+ };
4175
+ }> | z.ZodObject<z.extendShape<{
4176
+ _id: z.ZodString;
4177
+ _rev: z.ZodString;
4178
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4179
+ active: z.ZodBoolean;
4180
+ }, {
4181
+ paymentGateway: z.ZodLiteral<"SOFTSPACE">;
4182
+ config: z.ZodObject<{
4183
+ mid: z.ZodString;
4184
+ tid: z.ZodString;
4185
+ }, "strip", z.ZodTypeAny, {
4186
+ mid: string;
4187
+ tid: string;
4188
+ }, {
4189
+ mid: string;
4190
+ tid: string;
4191
+ }>;
4192
+ }>, "strip", z.ZodTypeAny, {
4193
+ _id: string;
4194
+ _rev: string;
4195
+ paymentGateway: "SOFTSPACE";
4196
+ active: boolean;
4197
+ config: {
4198
+ mid: string;
4199
+ tid: string;
4200
+ };
4201
+ }, {
4202
+ _id: string;
4203
+ _rev: string;
4204
+ paymentGateway: "SOFTSPACE";
4205
+ active: boolean;
4206
+ config: {
4207
+ mid: string;
4208
+ tid: string;
4209
+ };
4210
+ }> | z.ZodObject<z.extendShape<{
4211
+ _id: z.ZodString;
4212
+ _rev: z.ZodString;
4213
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4214
+ active: z.ZodBoolean;
4215
+ }, {
4216
+ paymentGateway: z.ZodLiteral<"DIGIO">;
4217
+ config: z.ZodObject<{
4218
+ merchantId: z.ZodString;
4219
+ }, "strip", z.ZodTypeAny, {
4220
+ merchantId: string;
4221
+ }, {
4222
+ merchantId: string;
4223
+ }>;
4224
+ }>, "strip", z.ZodTypeAny, {
4225
+ _id: string;
4226
+ _rev: string;
4227
+ paymentGateway: "DIGIO";
4228
+ active: boolean;
4229
+ config: {
4230
+ merchantId: string;
4231
+ };
4232
+ }, {
4233
+ _id: string;
4234
+ _rev: string;
4235
+ paymentGateway: "DIGIO";
4236
+ active: boolean;
4237
+ config: {
4238
+ merchantId: string;
4239
+ };
4240
+ }> | z.ZodObject<z.extendShape<{
4241
+ _id: z.ZodString;
4242
+ _rev: z.ZodString;
4243
+ paymentGateway: z.ZodEnum<["FEEDME", "FEEDME_TERMINAL", "E_GHL", "GHL", "MACAU_PASS", "REVENUE_MONSTER", "RAZER_MERCHANT_SERVICE", "MAYBANK", "MAYBANK2", "MAYBANK3", "NETS", "CASH", "SOFTSPACE", "GRAB", "DIGIO", "KBANK", "ADYEN"]>;
4244
+ active: z.ZodBoolean;
4245
+ }, {
4246
+ paymentGateway: z.ZodLiteral<"ADYEN">;
4247
+ config: z.ZodObject<{
4248
+ merchantAccount: z.ZodString;
4249
+ username: z.ZodString;
4250
+ apiKey: z.ZodString;
4251
+ }, "strip", z.ZodTypeAny, {
4252
+ merchantAccount: string;
4253
+ username: string;
4254
+ apiKey: string;
4255
+ }, {
4256
+ merchantAccount: string;
4257
+ username: string;
4258
+ apiKey: string;
4259
+ }>;
4260
+ }>, "strip", z.ZodTypeAny, {
4261
+ _id: string;
4262
+ _rev: string;
4263
+ paymentGateway: "ADYEN";
4264
+ active: boolean;
4265
+ config: {
4266
+ merchantAccount: string;
4267
+ username: string;
4268
+ apiKey: string;
4269
+ };
4270
+ }, {
4271
+ _id: string;
4272
+ _rev: string;
4273
+ paymentGateway: "ADYEN";
4274
+ active: boolean;
4275
+ config: {
4276
+ merchantAccount: string;
4277
+ username: string;
4278
+ apiKey: string;
4279
+ };
4095
4280
  }>>, "many">;
4096
4281
  posHeartbeat: z.ZodNullable<z.ZodOptional<z.ZodString>>;
4097
4282
  }, "strip", z.ZodTypeAny, {
@@ -4288,6 +4473,53 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
4288
4473
  terminalId: string;
4289
4474
  privateKey: string;
4290
4475
  };
4476
+ } | {
4477
+ _id: string;
4478
+ _rev: string;
4479
+ paymentGateway: "MACAU_PASS";
4480
+ active: boolean;
4481
+ config: {
4482
+ merchantId: string;
4483
+ merchantName: string;
4484
+ merchantCategoryCode: string;
4485
+ storeID: string;
4486
+ storeName: string;
4487
+ };
4488
+ } | {
4489
+ _id: string;
4490
+ _rev: string;
4491
+ paymentGateway: "GRAB";
4492
+ active: boolean;
4493
+ config: {
4494
+ merchantId: string;
4495
+ };
4496
+ } | {
4497
+ _id: string;
4498
+ _rev: string;
4499
+ paymentGateway: "SOFTSPACE";
4500
+ active: boolean;
4501
+ config: {
4502
+ mid: string;
4503
+ tid: string;
4504
+ };
4505
+ } | {
4506
+ _id: string;
4507
+ _rev: string;
4508
+ paymentGateway: "DIGIO";
4509
+ active: boolean;
4510
+ config: {
4511
+ merchantId: string;
4512
+ };
4513
+ } | {
4514
+ _id: string;
4515
+ _rev: string;
4516
+ paymentGateway: "ADYEN";
4517
+ active: boolean;
4518
+ config: {
4519
+ merchantAccount: string;
4520
+ username: string;
4521
+ apiKey: string;
4522
+ };
4291
4523
  })[];
4292
4524
  }, {
4293
4525
  catalogId?: string | null | undefined;
@@ -4483,6 +4715,53 @@ export declare const RestaurantCustomerKioskDto: z.ZodObject<{
4483
4715
  terminalId: string;
4484
4716
  privateKey: string;
4485
4717
  };
4718
+ } | {
4719
+ _id: string;
4720
+ _rev: string;
4721
+ paymentGateway: "MACAU_PASS";
4722
+ active: boolean;
4723
+ config: {
4724
+ merchantId: string;
4725
+ merchantName: string;
4726
+ merchantCategoryCode: string;
4727
+ storeID: string;
4728
+ storeName: string;
4729
+ };
4730
+ } | {
4731
+ _id: string;
4732
+ _rev: string;
4733
+ paymentGateway: "GRAB";
4734
+ active: boolean;
4735
+ config: {
4736
+ merchantId: string;
4737
+ };
4738
+ } | {
4739
+ _id: string;
4740
+ _rev: string;
4741
+ paymentGateway: "SOFTSPACE";
4742
+ active: boolean;
4743
+ config: {
4744
+ mid: string;
4745
+ tid: string;
4746
+ };
4747
+ } | {
4748
+ _id: string;
4749
+ _rev: string;
4750
+ paymentGateway: "DIGIO";
4751
+ active: boolean;
4752
+ config: {
4753
+ merchantId: string;
4754
+ };
4755
+ } | {
4756
+ _id: string;
4757
+ _rev: string;
4758
+ paymentGateway: "ADYEN";
4759
+ active: boolean;
4760
+ config: {
4761
+ merchantAccount: string;
4762
+ username: string;
4763
+ apiKey: string;
4764
+ };
4486
4765
  })[];
4487
4766
  }>;
4488
4767
  export type RestaurantCustomerKioskDto = z.infer<typeof RestaurantCustomerKioskDto>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-order-setting",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "type": "module",
5
5
  "module": "./dist/app.js",
6
6
  "license": "UNLICENSED",
@@ -26,7 +26,7 @@
26
26
  "format": "prettier --write src/"
27
27
  },
28
28
  "dependencies": {
29
- "@feedmepos/core": "^2.14.35",
29
+ "@feedmepos/core": "^2.14.40",
30
30
  "@feedmepos/menu": "^1.7.6",
31
31
  "@feedmepos/mf-common": "1.20.0-beta.2",
32
32
  "@feedmepos/ordering": "^0.0.3",
@@ -34,7 +34,6 @@
34
34
  "@types/googlemaps": "^3.43.3",
35
35
  "axios": "^1.7.2",
36
36
  "change-case": "^5.4.4",
37
- "zod-openapi": "^4.1.0",
38
37
  "date-fns": "^3.6.0",
39
38
  "dayjs": "^1.11.12",
40
39
  "firebase": "^10.13.1",
@@ -45,7 +44,8 @@
45
44
  "pinia": "^2.1.7",
46
45
  "vue": "^3.3.8",
47
46
  "vue-i18n": "^10.0.5",
48
- "vue-router": "^4.2.5"
47
+ "vue-router": "^4.2.5",
48
+ "zod-openapi": "^4.1.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@babel/types": "^7.24.7",
@@ -10,4 +10,7 @@ export const menuApi = {
10
10
  async readMenu(): Promise<MenuV4Doc> {
11
11
  return getData(await menuClientInstance().get(''));
12
12
  },
13
- };
13
+ async readCatalogOptions(restaurantId: string): Promise<Record<string, Array<{ _id: string; name: string }>>> {
14
+ return getData(await menuClientInstance().post('/restaurant-catalog-list', {restaurantIds: [restaurantId]}));
15
+ },
16
+ };
@@ -106,6 +106,7 @@
106
106
  "eWalletDescription": "Scan QR Code to make payment with phone",
107
107
  "exclusive": "Exclulsive",
108
108
  "failed": "FAILED",
109
+ "failedToLoadCatalogOptions": "Failed to load catalog options, please refresh again",
109
110
  "failedToUpdateSetting": "Failed to update setting",
110
111
  "feedMeExpress": "FeedMe express",
111
112
  "feedmeExpressNotApproved": "Your payout account is under review. Please contact our staff for further assistant.",
@@ -104,6 +104,7 @@
104
104
  "eWalletDescription": "สแกนรหัส QR เพื่อชำระเงินด้วยโทรศัพท์",
105
105
  "exclusive": "พิเศษ",
106
106
  "failed": "ล้มเหลว",
107
+ "failedToLoadCatalogOptions": "ไม่สามารถโหลดตัวเลือกแค็ตตาล็อกได้ กรุณารีเฟรชอีกครั้ง",
107
108
  "failedToUpdateSetting": "ไม่สามารถอัปเดตการตั้งค่า",
108
109
  "feedMeExpress": "FeedMe express",
109
110
  "feedmeExpressNotApproved": "บัญชีการจ่ายเงินของคุณอยู่ระหว่างการตรวจสอบ โปรดติดต่อเจ้าหน้าที่ของเราเพื่อรับความช่วยเหลือเพิ่มเติม",
@@ -108,6 +108,7 @@
108
108
  "eWalletDescription": "使用手机扫描二维码进行支付",
109
109
  "exclusive": "不包括",
110
110
  "failed": "失败",
111
+ "failedToLoadCatalogOptions": "目录选项加载失败,请重新刷新",
111
112
  "failedToUpdateSetting": "设置更新失败",
112
113
  "feedMeExpress": "FeedMe 外卖快递",
113
114
  "feedmeExpressNotApproved": "您的支付账户正在审核中,请联系我们的工作人员获取进一步的帮助。",
@@ -13,6 +13,9 @@ interface MenuState {
13
13
  menu: { _rev: string } & FdoMenuV4;
14
14
  currentCatalogId: string | null;
15
15
  currentSchedulerId: string;
16
+ catalogOptions: { label: string; value: string | null }[];
17
+ loadingCatalogOptions: boolean;
18
+ catalogOptionsError: string | null;
16
19
  }
17
20
 
18
21
  function initMenuState(): MenuState {
@@ -21,6 +24,9 @@ function initMenuState(): MenuState {
21
24
  menu: { ...generator.initMenuV4(), _rev: '' },
22
25
  currentCatalogId: null,
23
26
  currentSchedulerId: '',
27
+ catalogOptions: [],
28
+ loadingCatalogOptions: false,
29
+ catalogOptionsError: null,
24
30
  };
25
31
  }
26
32
 
@@ -120,19 +126,6 @@ export const useMenuStore = defineStore('menu', {
120
126
  (catalog) => catalog._id === state.currentCatalogId
121
127
  );
122
128
  },
123
-
124
- catalogOptions(): { label: string; value: string | null }[] {
125
- return [
126
- {
127
- label: 'Main',
128
- value: null,
129
- },
130
- ...this.catalogs.map((catalog) => ({
131
- label: catalog.name,
132
- value: catalog._id,
133
- })),
134
- ];
135
- },
136
129
  categories(): (Omit<FdoMenuV4Category, '_id'> & { _id: string | null })[] {
137
130
  const categories = this.mergedMenu.modules.category;
138
131
  return [
@@ -250,9 +243,35 @@ export const useMenuStore = defineStore('menu', {
250
243
  this.menu = await menuApi.readMenu();
251
244
  this.selectCatalog(null);
252
245
  },
246
+
247
+ async loadCatalogOptions(restaurantId: string) {
248
+ this.loadingCatalogOptions = true;
249
+ this.catalogOptionsError = null;
250
+ const options: {label:string, value: string | null}[] = [{
251
+ label: 'Main',
252
+ value: null,
253
+ }];
254
+
255
+ try {
256
+ const resp = await menuApi.readCatalogOptions(restaurantId);
257
+ const restaurntCatalogOptions = resp[restaurantId] ?? [];
258
+ for (let index = 0; index < restaurntCatalogOptions.length; index++) {
259
+ const opt = restaurntCatalogOptions[index];
260
+ options.push({
261
+ label: opt.name,
262
+ value: opt._id
263
+ })
264
+ }
265
+ this.catalogOptions = options;
266
+ } catch (error) {
267
+ console.error('Failed to load catalog options:', error)
268
+ this.catalogOptionsError = 'order.failedToLoadCatalogOptions';
269
+ } finally {
270
+ this.loadingCatalogOptions = false;
271
+ }
272
+ },
253
273
  selectCatalog(id: string | null) {
254
274
  this.currentCatalogId = id;
255
275
  },
256
276
  }
257
-
258
277
  });
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <div class="py-[1.5rem]">
3
3
  <FmPageHead :title="t('order.orderSetting')" />
4
- <div class="flex px-[1.5rem]">
4
+ <div class="flex px-[1.5rem] items-center">
5
5
  <div class="flex-[2_2_0%] overflow-auto">
6
6
  <FmTabs v-model:model-value="selectedOrderSetting" :items="settingItem" :showMoreAt="99" />
7
7
  </div>
8
+ <div v-if="menuStore.loadingCatalogOptions" class="flex items-center gap-2 ml-4">
9
+ <FmCircularProgress size="md" />
10
+ <span class="text-sm text-gray-600">{{ t('order.loadingCatalogs') }}</span>
11
+ </div>
8
12
  </div>
9
13
  </div>
10
14
  <component :is="currentComponent" />
@@ -12,7 +16,7 @@
12
16
 
13
17
  <script setup lang="ts">
14
18
  import { type FmTabProps } from '@feedmepos/ui-library'
15
- import { ref, computed } from 'vue'
19
+ import { ref, computed, onMounted, watch } from 'vue'
16
20
  import DeliverySetting from './delivery/DeliverySetting.vue'
17
21
  import DineInSetting from './dine-in/DineInSetting.vue'
18
22
  import PickUpSetting from './pickup/PickUpSetting.vue'
@@ -21,9 +25,14 @@ import ServiceChargeSetting from './servicecharge/ServiceChargeSetting.vue'
21
25
  import DiscountRuleSetting from './discount-rule/DiscountRuleSetting.vue'
22
26
 
23
27
  import GeneralSetting from './general/GeneralSetting.vue'
24
- import { useI18n } from '@feedmepos/mf-common'
28
+ import { useI18n, useCoreStore } from '@feedmepos/mf-common'
29
+ import { useMenuStore } from '@/stores/menu/menu'
30
+ import { useSnackbarFunctions } from '@/components/snackbar'
25
31
 
26
32
  const { t } = useI18n()
33
+ const { currentRestaurant } = useCoreStore()
34
+ const menuStore = useMenuStore()
35
+ const { showError } = useSnackbarFunctions()
27
36
  type OrderSettingMenuItemValue =
28
37
  | 'delivery'
29
38
  | 'pickup'
@@ -62,4 +71,22 @@ const currentComponent = computed(() => {
62
71
  return GeneralSetting
63
72
  }
64
73
  })
74
+
75
+ onMounted(async () => {
76
+ if (currentRestaurant.value?._id) {
77
+ await menuStore.loadCatalogOptions(currentRestaurant.value._id)
78
+ }
79
+ })
80
+
81
+ watch(currentRestaurant, async (newRestaurant) => {
82
+ if (newRestaurant?._id) {
83
+ await menuStore.loadCatalogOptions(newRestaurant._id)
84
+ }
85
+ })
86
+
87
+ watch(() => menuStore.catalogOptionsError, (errorKey) => {
88
+ if (errorKey) {
89
+ showError(t(errorKey))
90
+ }
91
+ })
65
92
  </script>
@@ -262,7 +262,6 @@ function convertStatusI18n(status: string) {
262
262
  v-if="modelValue.auto.status === 'FAILED' && modelValue.auto.menuSyncError !== null"
263
263
  :content="modelValue.auto.menuSyncError"
264
264
  :zIndex="1000"
265
- :disabled="!canEdit"
266
265
  >
267
266
  <FmIcon name="info" size="sm" />
268
267
  </FmTooltip>