@feedmepos/mf-menu 0.31.40-prod → 0.31.41-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 (90) hide show
  1. package/dist/{App-aWEH-ZEk.js → App-5Lzy8zHZ.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-jJyinQZl.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BnKXsQH-.js} +3 -3
  3. package/dist/{Catalog-BoFfFdn8.js → Catalog-s5b8V8nw.js} +8 -9
  4. package/dist/{Category-CWYbb3Jn.js → Category-BJzScJEY.js} +4 -4
  5. package/dist/{Category-DZ45uikR.js → Category-DZ-xqIMI.js} +6 -6
  6. package/dist/{CookingGuide-BU0PRWIQ.js → CookingGuide-Bkd6GPww.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Z5xsKDIE.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-B8tIjKOW.js} +1 -1
  8. package/dist/{Group-BMQDeqiS.js → Group-0b2Qiov3.js} +1 -1
  9. package/dist/{Group-C0T_uknK.js → Group-BOaCcKiI.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DyfmY6F1.js → Group.vue_vue_type_script_setup_true_lang-DUlUfMAs.js} +8 -8
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CouimeC4.js +399 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dl-Wvt3D.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DOvQmbrZ.js} +13 -14
  13. package/dist/{Ingredient-3lwDUQx_.js → Ingredient-ChcYUvOg.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-VLrrTkSC.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DE1HkipX.js} +2 -2
  15. package/dist/LinkProductSideSheet-BdzBGYxG.js +361 -0
  16. package/dist/MenuSetting-zAAttaoA.js +618 -0
  17. package/dist/{PrintRoute-DfJ-vUAb.js → PrintRoute-T-vuO5N8.js} +4 -4
  18. package/dist/{Product-F4PoLm9v.js → Product-B5q291VF.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-DT5gffpA.js → Product.vue_vue_type_script_setup_true_lang-DLRlT10W.js} +468 -465
  20. package/dist/{ProductInternalTools-DSGU-OqU.js → ProductInternalTools-BOlc0VUR.js} +5 -5
  21. package/dist/{Products-COzW2Z4g.js → Products-Cd4Mqhm3.js} +88 -85
  22. package/dist/{Publish-CDXVWCk2.js → Publish-SuRzt-_D.js} +3 -3
  23. package/dist/{Recipe-BZx4wrcP.js → Recipe-BKrjNs5g.js} +4 -4
  24. package/dist/{Scheduler-wHCWSeU2.js → Scheduler-DnDgImLC.js} +3 -3
  25. package/dist/{ServingSequence-BbYEhDYh.js → ServingSequence-D602bVnm.js} +3 -3
  26. package/dist/{Setting-C9Tlw1Iy.js → Setting-FMT4oBYH.js} +44 -45
  27. package/dist/{Subcategory-C8AwfrKb.js → Subcategory-CpYmjAvA.js} +4 -4
  28. package/dist/{Takeaway-t1053wg2.js → Takeaway-BXh3iuME.js} +1 -1
  29. package/dist/{Takeaway-DaEUn-yM.js → Takeaway-D4hjN5z5.js} +4 -4
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-7XycP5fU.js → Takeaway.vue_vue_type_script_setup_true_lang-By1f-FCO.js} +5 -5
  31. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-CZUwa5C_.js +440 -0
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Ci6iqOry.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DfjtfcCh.js} +604 -600
  33. package/dist/{Unit-CnqptGCz.js → Unit-CsjHkV-h.js} +2 -2
  34. package/dist/{Variant-DiOYOwJs.js → Variant-Djra14ZX.js} +3 -3
  35. package/dist/{_id_-BSfU16VO.js → _id_-BXkqoCzB.js} +78 -75
  36. package/dist/{app-Ddb81PNo.js → app-CVqWWV4x.js} +278 -278
  37. package/dist/{LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js → app-CiBqmBzO.js} +2120 -2084
  38. package/dist/{app-Cou6qPF2.js → app-PhBJNss_.js} +1 -1
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/api/menu.d.ts +2 -1
  41. package/dist/apps/mf-menu/src/app.d.ts +144 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +36 -0
  43. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +9 -3
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +294 -4
  45. package/dist/apps/mf-menu/src/composable/attributes.d.ts +26 -0
  46. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +40 -0
  47. package/dist/apps/mf-menu/src/helper/import-export.d.ts +285 -0
  48. package/dist/apps/mf-menu/src/helper/menu.d.ts +285 -0
  49. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +285 -0
  50. package/dist/apps/mf-menu/src/stores/menu.d.ts +293 -3
  51. package/dist/apps/mf-menu/src/utils/array.d.ts +1 -0
  52. package/dist/apps/mf-menu/src/utils/customAttributes.d.ts +12 -0
  53. package/dist/apps/mf-menu/src/views/MenuSetting/LinkProductRuleGroups.vue.d.ts +2 -0
  54. package/dist/apps/mf-menu/src/views/MenuSetting/RuleGroupSideSheet.vue.d.ts +176 -0
  55. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +166 -0
  56. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  57. package/dist/assets/linked-status-WlVAcpRn.js +13 -0
  58. package/dist/assets/override-menu-__h4D7ac.js +13 -0
  59. package/dist/assets/validate-menu-DyPuzLRg.js +13 -0
  60. package/dist/{catalog-DSuJhsUb.js → catalog-C_TuQLxq.js} +1 -1
  61. package/dist/{catalogSetting-C3gEw9ov.js → catalogSetting-BUlJu6hG.js} +1 -1
  62. package/dist/{category-CwWq3KCE.js → category-CmVw1Kj-.js} +1 -1
  63. package/dist/{currency-g45Sh-t6.js → currency-OhOTnAqk.js} +1 -1
  64. package/dist/customAttributes-fpOfmGnw.js +180 -0
  65. package/dist/{dayjs.min-g3eN5z-V.js → dayjs.min-CDhP-7L5.js} +1 -1
  66. package/dist/{index-QsLFbxyG.js → index-BJZEWB5C.js} +4 -4
  67. package/dist/{index-BLQCYEc6.js → index-DHAYGEPp.js} +7 -8
  68. package/dist/{index-0yRUi7LL.js → index-DtwHmS38.js} +1 -1
  69. package/dist/index-N3cGc8ex.js +245 -0
  70. package/dist/{item-BvvQ9urP.js → item-BELLphR0.js} +16 -16
  71. package/dist/{jszip.min-DzdUiaR4.js → jszip.min-CZtcGb7A.js} +353 -353
  72. package/dist/{menu-QrVg2Ph7.js → menu-Csyr6W9A.js} +7 -7
  73. package/dist/{menu-DFNvhoNQ.js → menu-DS_ERmBf.js} +23355 -23206
  74. package/dist/{menuV2-Ezf_jW40.js → menuV2-DKzAZ4Ss.js} +151 -146
  75. package/dist/mf-menu.css +1 -1
  76. package/dist/{priceTier-zENsn3P_.js → priceTier-CYWS5lDS.js} +1 -1
  77. package/dist/{scheduler-BuwGSv6A.js → scheduler-DI5dXC7Y.js} +8 -8
  78. package/dist/{subcategory-O3L_zCJA.js → subcategory-D_ao-IV9.js} +2 -2
  79. package/dist/{toExcel-CpRy_4nG.js → toExcel-Cml-rkJQ.js} +2 -2
  80. package/dist/{unit-Ct_7Hfa2.js → unit-BWDp2LkV.js} +42 -41
  81. package/package.json +3 -3
  82. package/dist/FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js +0 -50
  83. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6qro5w_.js +0 -367
  84. package/dist/LinkProductSideSheet-LDZjKX95.js +0 -297
  85. package/dist/MenuSetting-AhutsCVy.js +0 -185
  86. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-B7oLH9cP.js +0 -431
  87. package/dist/assets/linked-status-B_crHhZH.js +0 -24
  88. package/dist/assets/override-menu-BmlCEpHH.js +0 -24
  89. package/dist/assets/validate-menu-CF-psoB-.js +0 -24
  90. package/dist/index-0Q5T9VZV.js +0 -214
@@ -1,6 +1,6 @@
1
1
  import { type ComputedRef, type Ref, type ShallowReactive, type ShallowRef } from "vue";
2
2
  import { F_MENU_VERSION, type FdoDecimal } from "@feedmepos/core-dart";
3
- import type { FdoMenuCookingGuide, FdoMenuPrintDepartment, FdoMenuServeSequence, FdoMenuUnit, FdoMenuV4, FdoMenuV4Catalog, FdoMenuV4Category, FdoMenuV4Group, FdoMenuV4Scheduler, FdoMenuV4Takeaway, FdoMenuV4VariantGroup, FdoProductTaxSetting, FdtoRestaurantWithMenuV4, FdtoV4Tax, FdoMenuV4Item, FdoMenuSubCategory } from "@feedmepos/menu/entity";
3
+ import type { FdoMenuCookingGuide, FdoMenuPrintDepartment, FdoMenuServeSequence, FdoMenuUnit, FdoMenuV4, FdoMenuV4Catalog, FdoMenuV4Category, FdoMenuV4Group, FdoMenuV4Scheduler, FdoMenuV4Takeaway, FdoMenuV4VariantGroup, FdoProductTaxSetting, FdtoRestaurantWithMenuV4, FdtoV4Tax, FdoMenuV4Item, FdoMenuSubCategory, FdtoRestaurantInfo } from "@feedmepos/menu/entity";
4
4
  import { type UpdateMenuModuleRequest } from "@feedmepos/menu/manager";
5
5
  import { type FdtoUpdateMenuRes, type MenuV4Doc, type UpdateMenuSettingReq } from "@/api";
6
6
  import { type CategorizedItem } from "@/helper/menu";
@@ -13,7 +13,12 @@ interface MenuState {
13
13
  currentCategoryIds: (string | null)[] | null;
14
14
  currentCatalogId: string | null;
15
15
  currentSchedulerId: string | null;
16
- currentRestaurantCustomAttributes: any;
16
+ currentRestaurantAttrParams: {
17
+ restaurantCustomAttributes?: {
18
+ [key: string]: any;
19
+ } | null;
20
+ restaurantAttributes?: FdtoRestaurantInfo | null;
21
+ };
17
22
  }
18
23
  interface ITaxSetting {
19
24
  systemCode: string;
@@ -1452,25 +1457,82 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
1452
1457
  usePriceTiers: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1453
1458
  priceTierRules: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
1454
1459
  priceTier: z.ZodString;
1460
+ restaurantRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1461
+ restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1462
+ restaurantCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1463
+ }, "strip", z.ZodTypeAny, {
1464
+ restaurantAttributes?: any;
1465
+ restaurantCustomAttributes?: any;
1466
+ }, {
1467
+ restaurantAttributes?: any;
1468
+ restaurantCustomAttributes?: any;
1469
+ }>>>;
1455
1470
  restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1456
1471
  }, "strip", z.ZodTypeAny, {
1457
1472
  restaurantAttributes?: any;
1473
+ restaurantRule?: {
1474
+ restaurantAttributes?: any;
1475
+ restaurantCustomAttributes?: any;
1476
+ } | null | undefined;
1458
1477
  priceTier: string;
1459
1478
  }, {
1460
1479
  restaurantAttributes?: any;
1480
+ restaurantRule?: {
1481
+ restaurantAttributes?: any;
1482
+ restaurantCustomAttributes?: any;
1483
+ } | null | undefined;
1461
1484
  priceTier: string;
1462
1485
  }>, "many">>>;
1463
1486
  linkItemRules: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
1464
1487
  orderFrom: z.ZodEnum<["ALL", "POS_ONLY", "NONE"]>;
1488
+ ruleGroupIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1489
+ restaurantRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1490
+ restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1491
+ restaurantCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ restaurantAttributes?: any;
1494
+ restaurantCustomAttributes?: any;
1495
+ }, {
1496
+ restaurantAttributes?: any;
1497
+ restaurantCustomAttributes?: any;
1498
+ }>>>;
1499
+ itemRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1500
+ itemAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1501
+ itemCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1502
+ }, "strip", z.ZodTypeAny, {
1503
+ itemAttributes?: any;
1504
+ itemCustomAttributes?: any;
1505
+ }, {
1506
+ itemAttributes?: any;
1507
+ itemCustomAttributes?: any;
1508
+ }>>>;
1465
1509
  restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1466
1510
  itemAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1467
1511
  }, "strip", z.ZodTypeAny, {
1468
1512
  restaurantAttributes?: any;
1469
1513
  itemAttributes?: any;
1514
+ restaurantRule?: {
1515
+ restaurantAttributes?: any;
1516
+ restaurantCustomAttributes?: any;
1517
+ } | null | undefined;
1518
+ ruleGroupIds?: string[] | null | undefined;
1519
+ itemRule?: {
1520
+ itemAttributes?: any;
1521
+ itemCustomAttributes?: any;
1522
+ } | null | undefined;
1470
1523
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
1471
1524
  }, {
1472
1525
  restaurantAttributes?: any;
1473
1526
  itemAttributes?: any;
1527
+ restaurantRule?: {
1528
+ restaurantAttributes?: any;
1529
+ restaurantCustomAttributes?: any;
1530
+ } | null | undefined;
1531
+ ruleGroupIds?: string[] | null | undefined;
1532
+ itemRule?: {
1533
+ itemAttributes?: any;
1534
+ itemCustomAttributes?: any;
1535
+ } | null | undefined;
1474
1536
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
1475
1537
  }>, "many">>>;
1476
1538
  }, "strip", z.ZodTypeAny, {
@@ -1543,11 +1605,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
1543
1605
  usePriceTiers?: string[] | null | undefined;
1544
1606
  priceTierRules?: {
1545
1607
  restaurantAttributes?: any;
1608
+ restaurantRule?: {
1609
+ restaurantAttributes?: any;
1610
+ restaurantCustomAttributes?: any;
1611
+ } | null | undefined;
1546
1612
  priceTier: string;
1547
1613
  }[] | null | undefined;
1548
1614
  linkItemRules?: {
1549
1615
  restaurantAttributes?: any;
1550
1616
  itemAttributes?: any;
1617
+ restaurantRule?: {
1618
+ restaurantAttributes?: any;
1619
+ restaurantCustomAttributes?: any;
1620
+ } | null | undefined;
1621
+ ruleGroupIds?: string[] | null | undefined;
1622
+ itemRule?: {
1623
+ itemAttributes?: any;
1624
+ itemCustomAttributes?: any;
1625
+ } | null | undefined;
1551
1626
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
1552
1627
  }[] | null | undefined;
1553
1628
  name: string;
@@ -1763,11 +1838,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
1763
1838
  usePriceTiers?: string[] | null | undefined;
1764
1839
  priceTierRules?: {
1765
1840
  restaurantAttributes?: any;
1841
+ restaurantRule?: {
1842
+ restaurantAttributes?: any;
1843
+ restaurantCustomAttributes?: any;
1844
+ } | null | undefined;
1766
1845
  priceTier: string;
1767
1846
  }[] | null | undefined;
1768
1847
  linkItemRules?: {
1769
1848
  restaurantAttributes?: any;
1770
1849
  itemAttributes?: any;
1850
+ restaurantRule?: {
1851
+ restaurantAttributes?: any;
1852
+ restaurantCustomAttributes?: any;
1853
+ } | null | undefined;
1854
+ ruleGroupIds?: string[] | null | undefined;
1855
+ itemRule?: {
1856
+ itemAttributes?: any;
1857
+ itemCustomAttributes?: any;
1858
+ } | null | undefined;
1771
1859
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
1772
1860
  }[] | null | undefined;
1773
1861
  name: string;
@@ -5064,11 +5152,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
5064
5152
  usePriceTiers?: string[] | null | undefined;
5065
5153
  priceTierRules?: {
5066
5154
  restaurantAttributes?: any;
5155
+ restaurantRule?: {
5156
+ restaurantAttributes?: any;
5157
+ restaurantCustomAttributes?: any;
5158
+ } | null | undefined;
5067
5159
  priceTier: string;
5068
5160
  }[] | null | undefined;
5069
5161
  linkItemRules?: {
5070
5162
  restaurantAttributes?: any;
5071
5163
  itemAttributes?: any;
5164
+ restaurantRule?: {
5165
+ restaurantAttributes?: any;
5166
+ restaurantCustomAttributes?: any;
5167
+ } | null | undefined;
5168
+ ruleGroupIds?: string[] | null | undefined;
5169
+ itemRule?: {
5170
+ itemAttributes?: any;
5171
+ itemCustomAttributes?: any;
5172
+ } | null | undefined;
5072
5173
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
5073
5174
  }[] | null | undefined;
5074
5175
  name: string;
@@ -5747,11 +5848,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
5747
5848
  usePriceTiers?: string[] | null | undefined;
5748
5849
  priceTierRules?: {
5749
5850
  restaurantAttributes?: any;
5851
+ restaurantRule?: {
5852
+ restaurantAttributes?: any;
5853
+ restaurantCustomAttributes?: any;
5854
+ } | null | undefined;
5750
5855
  priceTier: string;
5751
5856
  }[] | null | undefined;
5752
5857
  linkItemRules?: {
5753
5858
  restaurantAttributes?: any;
5754
5859
  itemAttributes?: any;
5860
+ restaurantRule?: {
5861
+ restaurantAttributes?: any;
5862
+ restaurantCustomAttributes?: any;
5863
+ } | null | undefined;
5864
+ ruleGroupIds?: string[] | null | undefined;
5865
+ itemRule?: {
5866
+ itemAttributes?: any;
5867
+ itemCustomAttributes?: any;
5868
+ } | null | undefined;
5755
5869
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
5756
5870
  }[] | null | undefined;
5757
5871
  name: string;
@@ -6053,6 +6167,120 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
6053
6167
  }, {
6054
6168
  key: string;
6055
6169
  }>, "many">>>;
6170
+ ruleGroupSettings: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6171
+ groups: z.ZodArray<z.ZodObject<{
6172
+ _id: z.ZodString;
6173
+ name: z.ZodString;
6174
+ description: z.ZodString;
6175
+ rules: z.ZodArray<z.ZodObject<{
6176
+ _id: z.ZodString;
6177
+ restaurantRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6178
+ restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
6179
+ restaurantCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
6180
+ }, "strip", z.ZodTypeAny, {
6181
+ restaurantAttributes?: any;
6182
+ restaurantCustomAttributes?: any;
6183
+ }, {
6184
+ restaurantAttributes?: any;
6185
+ restaurantCustomAttributes?: any;
6186
+ }>>>;
6187
+ itemRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6188
+ itemAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
6189
+ itemCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
6190
+ }, "strip", z.ZodTypeAny, {
6191
+ itemAttributes?: any;
6192
+ itemCustomAttributes?: any;
6193
+ }, {
6194
+ itemAttributes?: any;
6195
+ itemCustomAttributes?: any;
6196
+ }>>>;
6197
+ }, "strip", z.ZodTypeAny, {
6198
+ restaurantRule?: {
6199
+ restaurantAttributes?: any;
6200
+ restaurantCustomAttributes?: any;
6201
+ } | null | undefined;
6202
+ itemRule?: {
6203
+ itemAttributes?: any;
6204
+ itemCustomAttributes?: any;
6205
+ } | null | undefined;
6206
+ _id: string;
6207
+ }, {
6208
+ restaurantRule?: {
6209
+ restaurantAttributes?: any;
6210
+ restaurantCustomAttributes?: any;
6211
+ } | null | undefined;
6212
+ itemRule?: {
6213
+ itemAttributes?: any;
6214
+ itemCustomAttributes?: any;
6215
+ } | null | undefined;
6216
+ _id: string;
6217
+ }>, "many">;
6218
+ }, "strip", z.ZodTypeAny, {
6219
+ name: string;
6220
+ description: string;
6221
+ _id: string;
6222
+ rules: {
6223
+ restaurantRule?: {
6224
+ restaurantAttributes?: any;
6225
+ restaurantCustomAttributes?: any;
6226
+ } | null | undefined;
6227
+ itemRule?: {
6228
+ itemAttributes?: any;
6229
+ itemCustomAttributes?: any;
6230
+ } | null | undefined;
6231
+ _id: string;
6232
+ }[];
6233
+ }, {
6234
+ name: string;
6235
+ description: string;
6236
+ _id: string;
6237
+ rules: {
6238
+ restaurantRule?: {
6239
+ restaurantAttributes?: any;
6240
+ restaurantCustomAttributes?: any;
6241
+ } | null | undefined;
6242
+ itemRule?: {
6243
+ itemAttributes?: any;
6244
+ itemCustomAttributes?: any;
6245
+ } | null | undefined;
6246
+ _id: string;
6247
+ }[];
6248
+ }>, "many">;
6249
+ }, "strip", z.ZodTypeAny, {
6250
+ groups: {
6251
+ name: string;
6252
+ description: string;
6253
+ _id: string;
6254
+ rules: {
6255
+ restaurantRule?: {
6256
+ restaurantAttributes?: any;
6257
+ restaurantCustomAttributes?: any;
6258
+ } | null | undefined;
6259
+ itemRule?: {
6260
+ itemAttributes?: any;
6261
+ itemCustomAttributes?: any;
6262
+ } | null | undefined;
6263
+ _id: string;
6264
+ }[];
6265
+ }[];
6266
+ }, {
6267
+ groups: {
6268
+ name: string;
6269
+ description: string;
6270
+ _id: string;
6271
+ rules: {
6272
+ restaurantRule?: {
6273
+ restaurantAttributes?: any;
6274
+ restaurantCustomAttributes?: any;
6275
+ } | null | undefined;
6276
+ itemRule?: {
6277
+ itemAttributes?: any;
6278
+ itemCustomAttributes?: any;
6279
+ } | null | undefined;
6280
+ _id: string;
6281
+ }[];
6282
+ }[];
6283
+ }>>>;
6056
6284
  lowStockThreshold: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
6057
6285
  }, "strip", z.ZodTypeAny, {
6058
6286
  updatedAt?: string | null | undefined;
@@ -6073,6 +6301,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
6073
6301
  priceTierSettings?: {
6074
6302
  key: string;
6075
6303
  }[] | null | undefined;
6304
+ ruleGroupSettings?: {
6305
+ groups: {
6306
+ name: string;
6307
+ description: string;
6308
+ _id: string;
6309
+ rules: {
6310
+ restaurantRule?: {
6311
+ restaurantAttributes?: any;
6312
+ restaurantCustomAttributes?: any;
6313
+ } | null | undefined;
6314
+ itemRule?: {
6315
+ itemAttributes?: any;
6316
+ itemCustomAttributes?: any;
6317
+ } | null | undefined;
6318
+ _id: string;
6319
+ }[];
6320
+ }[];
6321
+ } | null | undefined;
6076
6322
  _id: string;
6077
6323
  modules: {
6078
6324
  subCategory?: {
@@ -6501,11 +6747,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
6501
6747
  usePriceTiers?: string[] | null | undefined;
6502
6748
  priceTierRules?: {
6503
6749
  restaurantAttributes?: any;
6750
+ restaurantRule?: {
6751
+ restaurantAttributes?: any;
6752
+ restaurantCustomAttributes?: any;
6753
+ } | null | undefined;
6504
6754
  priceTier: string;
6505
6755
  }[] | null | undefined;
6506
6756
  linkItemRules?: {
6507
6757
  restaurantAttributes?: any;
6508
6758
  itemAttributes?: any;
6759
+ restaurantRule?: {
6760
+ restaurantAttributes?: any;
6761
+ restaurantCustomAttributes?: any;
6762
+ } | null | undefined;
6763
+ ruleGroupIds?: string[] | null | undefined;
6764
+ itemRule?: {
6765
+ itemAttributes?: any;
6766
+ itemCustomAttributes?: any;
6767
+ } | null | undefined;
6509
6768
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
6510
6769
  }[] | null | undefined;
6511
6770
  name: string;
@@ -6777,6 +7036,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
6777
7036
  priceTierSettings?: {
6778
7037
  key: string;
6779
7038
  }[] | null | undefined;
7039
+ ruleGroupSettings?: {
7040
+ groups: {
7041
+ name: string;
7042
+ description: string;
7043
+ _id: string;
7044
+ rules: {
7045
+ restaurantRule?: {
7046
+ restaurantAttributes?: any;
7047
+ restaurantCustomAttributes?: any;
7048
+ } | null | undefined;
7049
+ itemRule?: {
7050
+ itemAttributes?: any;
7051
+ itemCustomAttributes?: any;
7052
+ } | null | undefined;
7053
+ _id: string;
7054
+ }[];
7055
+ }[];
7056
+ } | null | undefined;
6780
7057
  _id: string;
6781
7058
  modules: {
6782
7059
  subCategory?: {
@@ -7205,11 +7482,24 @@ export declare function initMenuV4(): z.infer<z.ZodObject<{
7205
7482
  usePriceTiers?: string[] | null | undefined;
7206
7483
  priceTierRules?: {
7207
7484
  restaurantAttributes?: any;
7485
+ restaurantRule?: {
7486
+ restaurantAttributes?: any;
7487
+ restaurantCustomAttributes?: any;
7488
+ } | null | undefined;
7208
7489
  priceTier: string;
7209
7490
  }[] | null | undefined;
7210
7491
  linkItemRules?: {
7211
7492
  restaurantAttributes?: any;
7212
7493
  itemAttributes?: any;
7494
+ restaurantRule?: {
7495
+ restaurantAttributes?: any;
7496
+ restaurantCustomAttributes?: any;
7497
+ } | null | undefined;
7498
+ ruleGroupIds?: string[] | null | undefined;
7499
+ itemRule?: {
7500
+ itemAttributes?: any;
7501
+ itemCustomAttributes?: any;
7502
+ } | null | undefined;
7213
7503
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
7214
7504
  }[] | null | undefined;
7215
7505
  name: string;
@@ -7506,7 +7796,7 @@ interface MenuStoreType {
7506
7796
  selectCatalog: (id: string | null) => void;
7507
7797
  selectScheduler: (id: string | null) => void;
7508
7798
  selectCategory: (id: (string | null)[] | null) => void;
7509
- setRestaurantCustomAttributes: (attr?: any) => void;
7799
+ setRestaurantAttrParams: (attr?: any) => void;
7510
7800
  updateMenu: (data: UpdateMenuModuleRequest | UpdateMenuModuleRequest[], performValidate?: boolean) => Promise<FdtoUpdateMenuRes | void>;
7511
7801
  updateMenuSetting: (data: UpdateMenuSettingReq) => Promise<MenuV4Doc>;
7512
7802
  computeMergedMenu: () => Promise<FdoMenuV4>;
@@ -7525,5 +7815,5 @@ interface MenuStoreType {
7525
7815
  redoHistory: () => void;
7526
7816
  clearHistory: () => void;
7527
7817
  }
7528
- export declare const useMenuStore: import("pinia").StoreDefinition<"mf-menu-store-v2", Pick<MenuStoreType, "state" | "mergedMenu" | "workerIsComputing" | "mergedMenuChangeId">, Pick<MenuStoreType, "groups" | "categories" | "items" | "version" | "isV4" | "serveSequence" | "catalogs" | "currentCatalog" | "schedulers" | "currentScheduler" | "catalogOptions" | "subcategories" | "sortedItems" | "categorizedItems" | "categorizedRawMenuItems" | "variants" | "takeaways" | "printDepartments" | "units" | "recipes" | "cookingGuide" | "skus" | "rules" | "taxSetting" | "canUndoHistory" | "canRedoHistory">, Pick<MenuStoreType, "readMenu" | "readRestaurants" | "selectCatalog" | "selectScheduler" | "selectCategory" | "setRestaurantCustomAttributes" | "updateMenu" | "updateMenuSetting" | "encodeTax" | "decodeTax" | "getSelectedTax" | "mapVariant" | "setMenu" | "computeMergedMenu" | "undoHistory" | "redoHistory" | "clearHistory">>;
7818
+ export declare const useMenuStore: import("pinia").StoreDefinition<"mf-menu-store-v2", Pick<MenuStoreType, "state" | "mergedMenu" | "workerIsComputing" | "mergedMenuChangeId">, Pick<MenuStoreType, "groups" | "categories" | "items" | "version" | "isV4" | "serveSequence" | "catalogs" | "currentCatalog" | "schedulers" | "currentScheduler" | "catalogOptions" | "subcategories" | "sortedItems" | "categorizedItems" | "categorizedRawMenuItems" | "variants" | "takeaways" | "printDepartments" | "units" | "recipes" | "cookingGuide" | "skus" | "rules" | "taxSetting" | "canUndoHistory" | "canRedoHistory">, Pick<MenuStoreType, "readMenu" | "readRestaurants" | "selectCatalog" | "selectScheduler" | "selectCategory" | "setRestaurantAttrParams" | "updateMenu" | "updateMenuSetting" | "encodeTax" | "decodeTax" | "getSelectedTax" | "mapVariant" | "setMenu" | "computeMergedMenu" | "undoHistory" | "redoHistory" | "clearHistory">>;
7529
7819
  export {};
@@ -0,0 +1,26 @@
1
+ import { type ComputedRef, type Ref } from "vue";
2
+ import { FdoRuleGroup } from "@feedmepos/custom-attributes";
3
+ import type { FdoMenuV4Category, FdoMenuV4Item } from "@feedmepos/menu/entity";
4
+ interface UseItemAttributesOptions {
5
+ menuItems?: ComputedRef<FdoMenuV4Item[]> | Ref<FdoMenuV4Item[]>;
6
+ categories?: ComputedRef<FdoMenuV4Category[]> | Ref<FdoMenuV4Category[]>;
7
+ }
8
+ export declare function useRestaurantAttributes(): {
9
+ restaurantAttributes: ComputedRef<{
10
+ type: "string" | "number" | "date";
11
+ key: string;
12
+ entity: "item" | "restaurant";
13
+ values?: string[] | undefined;
14
+ }[]>;
15
+ };
16
+ export declare function useItemAttributes(options?: UseItemAttributesOptions): {
17
+ itemAttributes: ComputedRef<{
18
+ type: "string" | "number" | "date";
19
+ key: string;
20
+ entity: "item" | "restaurant";
21
+ values?: string[] | undefined;
22
+ }[]>;
23
+ convertCategoryIdToName: (ruleGroup: FdoRuleGroup) => FdoRuleGroup;
24
+ convertCategoryNameToId: (ruleGroup: FdoRuleGroup) => FdoRuleGroup;
25
+ };
26
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { type LinkProductSubmitPayload } from "@/types/linkProducts";
2
2
  export declare function useLinkProducts(isLocalOnly: boolean): {
3
3
  menuItems: import("vue").ComputedRef<any>;
4
+ categories: import("vue").ComputedRef<any[]>;
4
5
  linkItemRules: import("vue").ComputedRef<any>;
5
6
  catalogManager: {
6
7
  linkableItems: import("vue").ComputedRef<import("../helper/menu").CategorizedItem[]>;
@@ -10,15 +11,54 @@ export declare function useLinkProducts(isLocalOnly: boolean): {
10
11
  applyProduct: (productIds: string[]) => Promise<void>;
11
12
  saveLinkItemRules: (linkItemRules: z.infer<z.ZodObject<{
12
13
  orderFrom: z.ZodEnum<["ALL", "POS_ONLY", "NONE"]>;
14
+ ruleGroupIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
15
+ restaurantRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
16
+ restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
17
+ restaurantCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ restaurantAttributes?: any;
20
+ restaurantCustomAttributes?: any;
21
+ }, {
22
+ restaurantAttributes?: any;
23
+ restaurantCustomAttributes?: any;
24
+ }>>>;
25
+ itemRule: z.ZodNullable<z.ZodOptional<z.ZodObject<{
26
+ itemAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
27
+ itemCustomAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ itemAttributes?: any;
30
+ itemCustomAttributes?: any;
31
+ }, {
32
+ itemAttributes?: any;
33
+ itemCustomAttributes?: any;
34
+ }>>>;
13
35
  restaurantAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
14
36
  itemAttributes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
15
37
  }, "strip", z.ZodTypeAny, {
16
38
  restaurantAttributes?: any;
17
39
  itemAttributes?: any;
40
+ restaurantRule?: {
41
+ restaurantAttributes?: any;
42
+ restaurantCustomAttributes?: any;
43
+ } | null | undefined;
44
+ ruleGroupIds?: string[] | null | undefined;
45
+ itemRule?: {
46
+ itemAttributes?: any;
47
+ itemCustomAttributes?: any;
48
+ } | null | undefined;
18
49
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
19
50
  }, {
20
51
  restaurantAttributes?: any;
21
52
  itemAttributes?: any;
53
+ restaurantRule?: {
54
+ restaurantAttributes?: any;
55
+ restaurantCustomAttributes?: any;
56
+ } | null | undefined;
57
+ ruleGroupIds?: string[] | null | undefined;
58
+ itemRule?: {
59
+ itemAttributes?: any;
60
+ itemCustomAttributes?: any;
61
+ } | null | undefined;
22
62
  orderFrom: "ALL" | "POS_ONLY" | "NONE";
23
63
  }>>[] | null | undefined) => Promise<void>;
24
64
  };