@feedmepos/mf-order-setting 0.0.60-prod → 0.0.61-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.
Files changed (33) hide show
  1. package/dist/{KioskDevicesView-DRgZJgHO.js → KioskDevicesView-BQP98N83.js} +1 -1
  2. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-CZ6pa8Xh.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DqyycfFx.js} +3 -3
  3. package/dist/{KioskSettingView-DVN4bTT4.js → KioskSettingView-CfkesNHX.js} +3 -3
  4. package/dist/{KioskView-CmHhShkd.js → KioskView-D78JmEu_.js} +4 -4
  5. package/dist/OrderSettingsView-Cb-RdKE9.js +56929 -0
  6. package/dist/{app-D4H4nuew.js → app-BajIwvwC.js} +2388 -2321
  7. package/dist/app.js +3 -3
  8. package/dist/{dayjs.min-DOI5QB21.js → dayjs.min-mvnb5cgq.js} +1 -1
  9. package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +30 -3
  10. package/dist/frontend/mf-order/src/views/all-orders/ReflowOrder.vue.d.ts +20 -2
  11. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  12. package/dist/{index-BdJJKX0e.js → index-BUuyLjBw.js} +1 -1
  13. package/dist/index-v1JWPl0T.js +19656 -0
  14. package/dist/menu.dto-As7AyKo1.js +96924 -0
  15. package/dist/package/entity/booking/booking.do.d.ts +520 -45
  16. package/dist/package/entity/delivery/delivery.dto.d.ts +104 -9
  17. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +114 -19
  18. package/dist/package/entity/incoming-order/incoming-order.do.d.ts +225 -45
  19. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +426 -80
  20. package/dist/package/entity/member/member.dto.d.ts +84 -7
  21. package/dist/package/entity/order/order.dto.d.ts +112 -17
  22. package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +104 -9
  23. package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +104 -9
  24. package/dist/package/entity/order-platform/order-platform.dto.d.ts +75 -15
  25. package/dist/package/entity/order-platform/shopeefood/shopeefood-order.do.d.ts +104 -9
  26. package/dist/package/entity/order-platform/shopeefood/shopeefood-order.dto.d.ts +120 -0
  27. package/dist/package/entity/queue/queue.dto.d.ts +6 -6
  28. package/package.json +3 -2
  29. package/src/views/order-settings/dine-in/DineInSetting.vue +2 -5
  30. package/src/views/order-settings/dine-in/PaymentType.vue +27 -22
  31. package/dist/OrderSettingsView-q1TUGzEA.js +0 -32195
  32. package/dist/index-CEeonoD9.js +0 -19758
  33. package/dist/menu.dto-BlTCG2YJ.js +0 -120873
@@ -1405,6 +1405,124 @@ export declare const SFStoreStatus: z.ZodObject<{
1405
1405
  code: number;
1406
1406
  msg: string;
1407
1407
  }>;
1408
+ export declare const SFQueryOrdersDto: z.ZodObject<{
1409
+ store_id: z.ZodString;
1410
+ from_date: z.ZodString;
1411
+ end_date: z.ZodString;
1412
+ order_submission_status: z.ZodOptional<z.ZodNumber>;
1413
+ page_num: z.ZodOptional<z.ZodNumber>;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ order_submission_status?: number | undefined;
1416
+ page_num?: number | undefined;
1417
+ store_id: string;
1418
+ from_date: string;
1419
+ end_date: string;
1420
+ }, {
1421
+ order_submission_status?: number | undefined;
1422
+ page_num?: number | undefined;
1423
+ store_id: string;
1424
+ from_date: string;
1425
+ end_date: string;
1426
+ }>;
1427
+ export declare const SFQueryOrderSummary: z.ZodObject<{
1428
+ vendor_id: z.ZodString;
1429
+ store_id: z.ZodString;
1430
+ order_id: z.ZodString;
1431
+ order_status: z.ZodString;
1432
+ order_submit_time: z.ZodString;
1433
+ order_submission_sync_status: z.ZodNumber;
1434
+ }, "strip", z.ZodTypeAny, {
1435
+ order_id: string;
1436
+ store_id: string;
1437
+ vendor_id: string;
1438
+ order_status: string;
1439
+ order_submit_time: string;
1440
+ order_submission_sync_status: number;
1441
+ }, {
1442
+ order_id: string;
1443
+ store_id: string;
1444
+ vendor_id: string;
1445
+ order_status: string;
1446
+ order_submit_time: string;
1447
+ order_submission_sync_status: number;
1448
+ }>;
1449
+ export declare const SFQueryOrdersRes: z.ZodObject<{
1450
+ code: z.ZodNumber;
1451
+ msg: z.ZodString;
1452
+ data: z.ZodObject<{
1453
+ orders: z.ZodArray<z.ZodObject<{
1454
+ vendor_id: z.ZodString;
1455
+ store_id: z.ZodString;
1456
+ order_id: z.ZodString;
1457
+ order_status: z.ZodString;
1458
+ order_submit_time: z.ZodString;
1459
+ order_submission_sync_status: z.ZodNumber;
1460
+ }, "strip", z.ZodTypeAny, {
1461
+ order_id: string;
1462
+ store_id: string;
1463
+ vendor_id: string;
1464
+ order_status: string;
1465
+ order_submit_time: string;
1466
+ order_submission_sync_status: number;
1467
+ }, {
1468
+ order_id: string;
1469
+ store_id: string;
1470
+ vendor_id: string;
1471
+ order_status: string;
1472
+ order_submit_time: string;
1473
+ order_submission_sync_status: number;
1474
+ }>, "many">;
1475
+ has_more: z.ZodBoolean;
1476
+ }, "strip", z.ZodTypeAny, {
1477
+ orders: {
1478
+ order_id: string;
1479
+ store_id: string;
1480
+ vendor_id: string;
1481
+ order_status: string;
1482
+ order_submit_time: string;
1483
+ order_submission_sync_status: number;
1484
+ }[];
1485
+ has_more: boolean;
1486
+ }, {
1487
+ orders: {
1488
+ order_id: string;
1489
+ store_id: string;
1490
+ vendor_id: string;
1491
+ order_status: string;
1492
+ order_submit_time: string;
1493
+ order_submission_sync_status: number;
1494
+ }[];
1495
+ has_more: boolean;
1496
+ }>;
1497
+ }, "strip", z.ZodTypeAny, {
1498
+ data: {
1499
+ orders: {
1500
+ order_id: string;
1501
+ store_id: string;
1502
+ vendor_id: string;
1503
+ order_status: string;
1504
+ order_submit_time: string;
1505
+ order_submission_sync_status: number;
1506
+ }[];
1507
+ has_more: boolean;
1508
+ };
1509
+ code: number;
1510
+ msg: string;
1511
+ }, {
1512
+ data: {
1513
+ orders: {
1514
+ order_id: string;
1515
+ store_id: string;
1516
+ vendor_id: string;
1517
+ order_status: string;
1518
+ order_submit_time: string;
1519
+ order_submission_sync_status: number;
1520
+ }[];
1521
+ has_more: boolean;
1522
+ };
1523
+ code: number;
1524
+ msg: string;
1525
+ }>;
1408
1526
  export type SFRejectedOrderDto = z.infer<typeof SFRejectedOrderDto>;
1409
1527
  export type SFNotifyMenuRes = z.infer<typeof SFNotifyMenuRes>;
1410
1528
  export type SFGetOrderDto = z.infer<typeof SFGetOrderDto>;
@@ -1414,3 +1532,5 @@ export type SFLoginRes = z.infer<typeof SFLoginRes>;
1414
1532
  export type SFLoginReq = z.infer<typeof SFLoginReq>;
1415
1533
  export type SFGetOrderRes = z.infer<typeof SFGetOrderRes>;
1416
1534
  export type SFStoreStatus = z.infer<typeof SFStoreStatus>;
1535
+ export type SFQueryOrdersDto = z.infer<typeof SFQueryOrdersDto>;
1536
+ export type SFQueryOrdersRes = z.infer<typeof SFQueryOrdersRes>;
@@ -3867,7 +3867,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
3867
3867
  target: "PAYMENT";
3868
3868
  };
3869
3869
  success: boolean;
3870
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
3871
3870
  adjustment: {
3872
3871
  inclusive?: boolean | null | undefined;
3873
3872
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -3877,6 +3876,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
3877
3876
  };
3878
3877
  };
3879
3878
  referenceId: string;
3879
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
3880
3880
  }, {
3881
3881
  reason?: string | null | undefined;
3882
3882
  priority?: number | null | undefined;
@@ -3958,7 +3958,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
3958
3958
  target: "PAYMENT";
3959
3959
  };
3960
3960
  success: boolean;
3961
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
3962
3961
  adjustment: {
3963
3962
  inclusive?: boolean | null | undefined;
3964
3963
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -3968,6 +3967,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
3968
3967
  };
3969
3968
  };
3970
3969
  referenceId: string;
3970
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
3971
3971
  }>>, "many">>;
3972
3972
  option: z.ZodDiscriminatedUnion<"type", z.Primitive, z.ZodObject<z.extendShape<{
3973
3973
  type: z.ZodEnum<["DINE_IN", "PICKUP", "DELIVERY"]>;
@@ -6079,7 +6079,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
6079
6079
  target: "PAYMENT";
6080
6080
  };
6081
6081
  success: boolean;
6082
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
6083
6082
  adjustment: {
6084
6083
  inclusive?: boolean | null | undefined;
6085
6084
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -6089,6 +6088,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
6089
6088
  };
6090
6089
  };
6091
6090
  referenceId: string;
6091
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
6092
6092
  })[];
6093
6093
  orderAt: string;
6094
6094
  }, {
@@ -6382,7 +6382,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
6382
6382
  target: "PAYMENT";
6383
6383
  };
6384
6384
  success: boolean;
6385
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
6386
6385
  adjustment: {
6387
6386
  inclusive?: boolean | null | undefined;
6388
6387
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -6392,6 +6391,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
6392
6391
  };
6393
6392
  };
6394
6393
  referenceId: string;
6394
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
6395
6395
  })[] | undefined;
6396
6396
  option: {
6397
6397
  remark?: string | null | undefined;
@@ -7471,7 +7471,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
7471
7471
  target: "PAYMENT";
7472
7472
  };
7473
7473
  success: boolean;
7474
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
7475
7474
  adjustment: {
7476
7475
  inclusive?: boolean | null | undefined;
7477
7476
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -7481,6 +7480,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
7481
7480
  };
7482
7481
  };
7483
7482
  referenceId: string;
7483
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
7484
7484
  })[];
7485
7485
  orderAt: string;
7486
7486
  } | null | undefined;
@@ -7910,7 +7910,6 @@ export declare const RestaurantQueueDto: z.ZodObject<{
7910
7910
  target: "PAYMENT";
7911
7911
  };
7912
7912
  success: boolean;
7913
- from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
7914
7913
  adjustment: {
7915
7914
  inclusive?: boolean | null | undefined;
7916
7915
  type: "BY_PERCENTAGE" | "BY_AMOUNT" | "TO_AMOUNT";
@@ -7920,6 +7919,7 @@ export declare const RestaurantQueueDto: z.ZodObject<{
7920
7919
  };
7921
7920
  };
7922
7921
  referenceId: string;
7922
+ from: "COUNTER" | "PROMOTION" | "VOUCHER" | "MEMBERSHIP" | "FREE_CREDIT";
7923
7923
  })[] | undefined;
7924
7924
  option: {
7925
7925
  remark?: string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-order-setting",
3
- "version": "0.0.60-prod",
3
+ "version": "0.0.61-prod",
4
4
  "type": "module",
5
5
  "module": "./dist/app.js",
6
6
  "license": "UNLICENSED",
@@ -28,7 +28,8 @@
28
28
  "format": "prettier --write src/"
29
29
  },
30
30
  "dependencies": {
31
- "@feedmepos/core": "^2.14.60",
31
+ "@feedmepos/core": "^2.15.12",
32
+ "@feedmepos/zod-common": "^1.0.6",
32
33
  "@feedmepos/menu": "^1.7.32",
33
34
  "@feedmepos/mf-common": "1.20.0-beta.2",
34
35
  "@feedmepos/ordering": "^0.0.3",
@@ -132,14 +132,12 @@ import { useSnackbarFunctions } from '@/components/snackbar'
132
132
  const { t } = useI18n()
133
133
 
134
134
  const { currentRestaurant } = useCoreStore()
135
+ const restaurantStore = useRestaurantStore()
135
136
  const dineInSetting = ref<FdoRestaurantDineIn>(initDineInSetting())
136
137
  const orderSetting = ref<OrderSettingsDto | undefined>(undefined)
137
138
  const lastOrderBeforeCloseEnable = ref<boolean>(false)
138
139
 
139
- const allowEPayment = computed(() => {
140
- const paymentTypes = dineInSetting.value.paymentTypes || []
141
- return paymentTypes.includes(F_ORDER_PAYMENT_TYPE.enum.ePayment)
142
- })
140
+ const allowEPayment = computed(() => restaurantStore.getRestaurantEPayment() === true)
143
141
 
144
142
  const lastOrderSettingRules = computed(() => {
145
143
  return [
@@ -233,7 +231,6 @@ async function orderSettingInit() {
233
231
  }
234
232
 
235
233
  const { showSuccess, showError } = useSnackbarFunctions()
236
- const restaurantStore = useRestaurantStore()
237
234
  const { startAsyncCallWithErr, isLoading } = useLoading()
238
235
  async function updateDineInSetting() {
239
236
  if (!isDineInsettingValid.value) {
@@ -54,10 +54,11 @@ const allowEPayment = computed(() => {
54
54
  return paymentTypes.includes(F_ORDER_PAYMENT_TYPE.enum.ePayment)
55
55
  })
56
56
 
57
- const allowCreditPayment = computed(() => {
58
- const paymentTypes = props.paymentTypes || []
59
- return paymentTypes.includes(F_ORDER_PAYMENT_TYPE.enum.credit)
60
- })
57
+ // TODO: credit payment - not ready for production yet
58
+ // const allowCreditPayment = computed(() => {
59
+ // const paymentTypes = props.paymentTypes || []
60
+ // return paymentTypes.includes(F_ORDER_PAYMENT_TYPE.enum.credit)
61
+ // })
61
62
 
62
63
  const allowOfflinePayment = computed(() => {
63
64
  const paymentTypes = props.paymentTypes || []
@@ -72,8 +73,8 @@ const nestedVal = ref<string[]>([])
72
73
  const checkboxChildren = computed(() => {
73
74
  const options = [
74
75
  { label: t('order.offlinePayment'), value: 'offline' },
75
- {
76
- label: t('order.ePayment'),
76
+ {
77
+ label: t('order.ePayment'),
77
78
  value: 'e-payment',
78
79
  disable: !props.allowEPayment,
79
80
  suffix: !props.allowEPayment && props.showDisabledOptions
@@ -83,17 +84,18 @@ const checkboxChildren = computed(() => {
83
84
  }
84
85
  : undefined
85
86
  },
86
- {
87
- label: t('order.credit'),
88
- value: 'credit',
89
- disable: !props.allowCredit,
90
- suffix: !props.allowCredit && props.showDisabledOptions
91
- ? {
92
- text: `(${props.disabledSuffixes['credit'] || t('order.notAllowed')})`,
93
- class: 'text-negative t-system'
94
- }
95
- : undefined
96
- }
87
+ // TODO: credit payment - not ready for production yet
88
+ // {
89
+ // label: t('order.credit'),
90
+ // value: 'credit',
91
+ // disable: !props.allowCredit,
92
+ // suffix: !props.allowCredit && props.showDisabledOptions
93
+ // ? {
94
+ // text: `(${props.disabledSuffixes['credit'] || t('order.notAllowed')})`,
95
+ // class: 'text-negative t-system'
96
+ // }
97
+ // : undefined
98
+ // }
97
99
  ]
98
100
  return options
99
101
  })
@@ -102,7 +104,8 @@ const initializeCheckboxes = () => {
102
104
  const initialValues: string[] = []
103
105
  if (allowOfflinePayment.value) initialValues.push('offline')
104
106
  if (allowEPayment.value) initialValues.push('e-payment')
105
- if (allowCreditPayment.value) initialValues.push('credit')
107
+ // TODO: credit payment - not ready for production yet
108
+ // if (allowCreditPayment.value) initialValues.push('credit')
106
109
  nestedVal.value = initialValues
107
110
 
108
111
  let availableOptionsCount = 0
@@ -254,12 +257,14 @@ onMounted(() => {
254
257
  <div v-if="nestedVal.includes('e-payment')" class="ml-7">
255
258
  <slot name="e-payment-content"></slot>
256
259
  </div>
257
-
258
- <FmCheckbox v-if="allowCredit || showDisabledOptions" v-model="nestedVal" :label="checkboxChildren[2].label" :value="checkboxChildren[2].value"
260
+
261
+ <!-- TODO: credit payment - not ready for production yet -->
262
+ <!-- <FmCheckbox v-if="allowCredit || showDisabledOptions" v-model="nestedVal" :label="checkboxChildren[2].label" :value="checkboxChildren[2].value"
259
263
  @update:model-value="handleChildUpdate" :disabled="checkboxChildren[2].disable" />
260
-
264
+
261
265
  <div class="text-fm-color-secondary-salmon fm-typo-en-body-sm-600 ml-7" v-if="checkboxChildren[2].suffix">
262
266
  {{ checkboxChildren?.[2]?.suffix?.text }}
263
- </div>
267
+ </div> -->
268
+
264
269
  </div>
265
270
  </template>