@feedmepos/mf-menu 0.32.77 → 0.32.78
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/{App-BHaFFKgj.js → App-DPCHWImL.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DVEtgCqE.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C4iacJky.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-3uCD_k5b.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BWoRN4s5.js} +3 -3
- package/dist/{Catalog-DdV0gF_5.js → Catalog-CBYCvZ4i.js} +6 -6
- package/dist/{Category-fkh6uy_X.js → Category-CbNtnuBB.js} +4 -4
- package/dist/{Category-B4u7nW_n.js → Category-Dpc6jnS1.js} +14 -14
- package/dist/{CookingGuide-1BHECj2Q.js → CookingGuide-B848njOa.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-MYd4Yzd0.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkNSC4k9.js} +1 -1
- package/dist/{Group-D8C1gd_3.js → Group-WQdbziVl.js} +1 -1
- package/dist/{Group-DEIB_rHc.js → Group-yhtx74q4.js} +8 -8
- package/dist/Group.vue_vue_type_script_setup_true_lang-Q0Z5rAEg.js +627 -0
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CLrQ5top.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-R2zzBkf0.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BHudLX0K.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-_R7RQdJk.js} +7 -7
- package/dist/{Ingredient-CnKzPizo.js → Ingredient-C5i01EIS.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DuKTQfLa.js → InventoryBinding.vue_vue_type_script_setup_true_lang-OpRB3dyV.js} +2 -2
- package/dist/{LinkProductSideSheet-B0PciGSP.js → LinkProductSideSheet-Dt78f3fG.js} +4 -4
- package/dist/{MenuSetting-D4lyi3VS.js → MenuSetting-LhwHiH3C.js} +7 -7
- package/dist/{OrderPacing-BchmVvhQ.js → OrderPacing-DXj4J7Sp.js} +5 -5
- package/dist/{PrintRoute-ltS-wCjr.js → PrintRoute-DZQYeMsQ.js} +5 -5
- package/dist/{Product-WZdmdoQr.js → Product--7aX0fcK.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BFqhhLvN.js → Product.vue_vue_type_script_setup_true_lang-BSsS2dqJ.js} +14 -14
- package/dist/{ProductInternalTools-CeDden2S.js → ProductInternalTools-C4_r1tAz.js} +6 -6
- package/dist/{Products-DcLtwbRO.js → Products-CmtzWP4r.js} +61 -61
- package/dist/{Publish-H3Liavuu.js → Publish-Bquodjpf.js} +4 -4
- package/dist/{Recipe-PL1QHaYe.js → Recipe-DanBt83W.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Czp_55oY.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Ck5gHsEQ.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-P6DLshs1.js → RuleView.vue_vue_type_script_setup_true_lang-xuzVQmfE.js} +3 -3
- package/dist/{Scheduler-CXoxVRBZ.js → Scheduler-CNQbEpCH.js} +3 -3
- package/dist/{ServingSequence-YhME6BpW.js → ServingSequence-BpLukp5s.js} +3 -3
- package/dist/{Setting-CI0xqqtI.js → Setting-CqtVbgEX.js} +5 -5
- package/dist/{Subcategory-BHPtwuUq.js → Subcategory-D05nSckm.js} +6 -6
- package/dist/{Takeaway-xwwcISfI.js → Takeaway-BojkiMWZ.js} +1 -1
- package/dist/{Takeaway-BzT_Th8V.js → Takeaway-o938dKSs.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Be9HV6dK.js → Takeaway.vue_vue_type_script_setup_true_lang-CyItVmUO.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-C1eTBdUl.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BrLUgeet.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-CjlsCXDm.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BlgJ9HSX.js} +2 -2
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dl7sYg0Q.js +5971 -0
- package/dist/{Unit-ByhOcOYA.js → Unit-BO34czMi.js} +2 -2
- package/dist/{Variant-DHTF9Khv.js → Variant-9hYjzP27.js} +3 -3
- package/dist/{_id_-Baab0DQO.js → _id_-C9EPUJMN.js} +10 -10
- package/dist/{app-jJLYblaN.js → app-BJeTqtv9.js} +331 -331
- package/dist/{app-Cs8Id8Xm.js → app-Br1rwkSn.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +50 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/BaseForm.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/BaseForm.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +9 -0
- package/dist/apps/mf-menu/src/composable/groupHidden.d.ts +26 -0
- package/dist/apps/mf-menu/src/manager/menu/group.d.ts +12 -3
- package/dist/apps/mf-menu/src/manager/menu/groupExtraction.d.ts +17 -1
- package/dist/apps/mf-menu/src/manager/menu/groupImmutableFields.d.ts +2 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{override-menu-hOWb-U8t.js → linked-status-DeOWgUtC.js} +3 -3
- package/dist/assets/{menu-export-DYwNTsVD.js → menu-export-C4lP1SAy.js} +3 -3
- package/dist/assets/{linked-status-BSOqiFHd.js → override-menu-D_fBjnbT.js} +3 -3
- package/dist/assets/{validate-menu-DWZ_nQ9A.js → validate-menu-Cyw7mq4e.js} +2 -2
- package/dist/catalog-xBfYjm-n.js +235 -0
- package/dist/{catalogSetting-D1rTJ0IV.js → catalogSetting-CuHh62ii.js} +1 -1
- package/dist/{currency-CfklxgOo.js → currency-CSYrHGCM.js} +1 -1
- package/dist/{dayjs.min-s8Pn5XhH.js → dayjs.min-DMxeixDE.js} +2 -2
- package/dist/{discardConfirm-X1bjXonQ.js → discardConfirm-DEE_kXqK.js} +1 -1
- package/dist/{index-CSBbHVWU.js → index-CFAe9jDS.js} +1 -1
- package/dist/{index-BFLrHA28.js → index-CgR6vyM1.js} +5 -5
- package/dist/{index-DF1e-d79.js → index-nDpqIsxv.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-DKMwA-UJ.js → index.vue_vue_type_script_setup_true_lang-CDnlHcKS.js} +6 -6
- package/dist/{item-D0GMSEFc.js → item-Cg4hkIm0.js} +4670 -4549
- package/dist/{jszip.min-CrG2EhWe.js → jszip.min-BGGp26Zm.js} +3 -3
- package/dist/{linkProducts-DOtgB1M6.js → linkProducts-rOzmlZmQ.js} +4 -4
- package/dist/{memberPricing-DINEsVxj.js → memberPricing-BVC55wej.js} +1 -1
- package/dist/{menu-DobV0-S0.js → menu-sD696lXn.js} +1 -1
- package/dist/{menuV2-CzU77NoT.js → menuV2-Cf41MUAw.js} +73 -73
- package/dist/{order_pacing-Cg41OjXP.js → order_pacing-D-VDq_AN.js} +5 -5
- package/dist/{priceTier-ByJqyA8e.js → priceTier-Dajfy9ll.js} +1 -1
- package/dist/{rules-DbQdfkh_.js → rules-BTp32qER.js} +3 -3
- package/dist/{scheduler-B-GZ_cxC.js → scheduler-Ct06dHRB.js} +5 -5
- package/dist/{toExcel-Bq4sIMSZ.js → toExcel-BOsLuO7C.js} +2 -2
- package/dist/{unit-BBPddYB3.js → unit-D-Sppjh0.js} +3 -3
- package/package.json +2 -2
- package/dist/Group.vue_vue_type_script_setup_true_lang-DfTwCDNq.js +0 -622
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cb-21rZW.js +0 -5865
- package/dist/catalog-AhHjSmxz.js +0 -199
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineStore as r } from "pinia";
|
|
2
|
-
import { K as a, L as s, M as l } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { K as a, L as s, M as l } from "./index.vue_vue_type_script_setup_true_lang-CDnlHcKS.js";
|
|
3
3
|
const u = {
|
|
4
4
|
async read() {
|
|
5
5
|
return a(await s().get("/public-setting"));
|
package/dist/app.js
CHANGED
|
@@ -82,6 +82,13 @@ export declare const i18nMessages: {
|
|
|
82
82
|
products_count: string;
|
|
83
83
|
search: string;
|
|
84
84
|
status: string;
|
|
85
|
+
hide_group: string;
|
|
86
|
+
hide_group_sublabel_variant: string;
|
|
87
|
+
hide_group_sublabel_product: string;
|
|
88
|
+
hide_group_sublabel_catalog: string;
|
|
89
|
+
hide_group_notice: string;
|
|
90
|
+
min_locked_while_hidden: string;
|
|
91
|
+
hide_group_notice_reset: string;
|
|
85
92
|
};
|
|
86
93
|
translation: {
|
|
87
94
|
title_suffix: string;
|
|
@@ -442,6 +449,9 @@ export declare const i18nMessages: {
|
|
|
442
449
|
code: string;
|
|
443
450
|
is_default: string;
|
|
444
451
|
should_link_at_least_one_variant: string;
|
|
452
|
+
show_in_variants: string;
|
|
453
|
+
hidden_in_variants: string;
|
|
454
|
+
shown_in_all_variants: string;
|
|
445
455
|
};
|
|
446
456
|
types: {
|
|
447
457
|
normal: string;
|
|
@@ -2149,6 +2159,13 @@ export declare const i18nMessages: {
|
|
|
2149
2159
|
products_count: string;
|
|
2150
2160
|
search: string;
|
|
2151
2161
|
status: string;
|
|
2162
|
+
hide_group: string;
|
|
2163
|
+
hide_group_sublabel_variant: string;
|
|
2164
|
+
hide_group_sublabel_product: string;
|
|
2165
|
+
hide_group_sublabel_catalog: string;
|
|
2166
|
+
hide_group_notice: string;
|
|
2167
|
+
min_locked_while_hidden: string;
|
|
2168
|
+
hide_group_notice_reset: string;
|
|
2152
2169
|
};
|
|
2153
2170
|
translation: {
|
|
2154
2171
|
title_suffix: string;
|
|
@@ -2509,6 +2526,9 @@ export declare const i18nMessages: {
|
|
|
2509
2526
|
code: string;
|
|
2510
2527
|
is_default: string;
|
|
2511
2528
|
should_link_at_least_one_variant: string;
|
|
2529
|
+
show_in_variants: string;
|
|
2530
|
+
hidden_in_variants: string;
|
|
2531
|
+
shown_in_all_variants: string;
|
|
2512
2532
|
};
|
|
2513
2533
|
types: {
|
|
2514
2534
|
normal: string;
|
|
@@ -4214,6 +4234,13 @@ export declare const i18nMessages: {
|
|
|
4214
4234
|
products_count: string;
|
|
4215
4235
|
search: string;
|
|
4216
4236
|
status: string;
|
|
4237
|
+
hide_group: string;
|
|
4238
|
+
hide_group_sublabel_variant: string;
|
|
4239
|
+
hide_group_sublabel_product: string;
|
|
4240
|
+
hide_group_sublabel_catalog: string;
|
|
4241
|
+
hide_group_notice: string;
|
|
4242
|
+
min_locked_while_hidden: string;
|
|
4243
|
+
hide_group_notice_reset: string;
|
|
4217
4244
|
};
|
|
4218
4245
|
translation: {
|
|
4219
4246
|
title_suffix: string;
|
|
@@ -4574,6 +4601,9 @@ export declare const i18nMessages: {
|
|
|
4574
4601
|
code: string;
|
|
4575
4602
|
is_default: string;
|
|
4576
4603
|
should_link_at_least_one_variant: string;
|
|
4604
|
+
show_in_variants: string;
|
|
4605
|
+
hidden_in_variants: string;
|
|
4606
|
+
shown_in_all_variants: string;
|
|
4577
4607
|
};
|
|
4578
4608
|
types: {
|
|
4579
4609
|
normal: string;
|
|
@@ -6280,6 +6310,13 @@ export declare const i18nMessages: {
|
|
|
6280
6310
|
products_count: string;
|
|
6281
6311
|
search: string;
|
|
6282
6312
|
status: string;
|
|
6313
|
+
hide_group: string;
|
|
6314
|
+
hide_group_sublabel_variant: string;
|
|
6315
|
+
hide_group_sublabel_product: string;
|
|
6316
|
+
hide_group_sublabel_catalog: string;
|
|
6317
|
+
hide_group_notice: string;
|
|
6318
|
+
min_locked_while_hidden: string;
|
|
6319
|
+
hide_group_notice_reset: string;
|
|
6283
6320
|
};
|
|
6284
6321
|
translation: {
|
|
6285
6322
|
title_suffix: string;
|
|
@@ -6640,6 +6677,9 @@ export declare const i18nMessages: {
|
|
|
6640
6677
|
code: string;
|
|
6641
6678
|
is_default: string;
|
|
6642
6679
|
should_link_at_least_one_variant: string;
|
|
6680
|
+
show_in_variants: string;
|
|
6681
|
+
hidden_in_variants: string;
|
|
6682
|
+
shown_in_all_variants: string;
|
|
6643
6683
|
};
|
|
6644
6684
|
types: {
|
|
6645
6685
|
normal: string;
|
|
@@ -8345,6 +8385,13 @@ export declare const i18nMessages: {
|
|
|
8345
8385
|
products_count: string;
|
|
8346
8386
|
search: string;
|
|
8347
8387
|
status: string;
|
|
8388
|
+
hide_group: string;
|
|
8389
|
+
hide_group_sublabel_variant: string;
|
|
8390
|
+
hide_group_sublabel_product: string;
|
|
8391
|
+
hide_group_sublabel_catalog: string;
|
|
8392
|
+
hide_group_notice: string;
|
|
8393
|
+
min_locked_while_hidden: string;
|
|
8394
|
+
hide_group_notice_reset: string;
|
|
8348
8395
|
};
|
|
8349
8396
|
translation: {
|
|
8350
8397
|
title_suffix: string;
|
|
@@ -8705,6 +8752,9 @@ export declare const i18nMessages: {
|
|
|
8705
8752
|
code: string;
|
|
8706
8753
|
is_default: string;
|
|
8707
8754
|
should_link_at_least_one_variant: string;
|
|
8755
|
+
show_in_variants: string;
|
|
8756
|
+
hidden_in_variants: string;
|
|
8757
|
+
shown_in_all_variants: string;
|
|
8708
8758
|
};
|
|
8709
8759
|
types: {
|
|
8710
8760
|
normal: string;
|
|
@@ -7,6 +7,11 @@ interface Props {
|
|
|
7
7
|
config: (group: MenuGroup) => GroupConfig;
|
|
8
8
|
categorizedItems: CategorizedItem[];
|
|
9
9
|
allowRefundInventory?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Label of the scope the "hide this group" toggle applies to, e.g. the selected variant. Left
|
|
12
|
+
* unset when the form edits a single scope that needs no naming (a product, a catalog).
|
|
13
|
+
*/
|
|
14
|
+
hideGroupScope?: string | null;
|
|
10
15
|
}
|
|
11
16
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
12
17
|
trigger: (event?: any) => void;
|
package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/BaseForm.vue.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ interface Props {
|
|
|
7
7
|
config: (group: MenuGroup) => GroupConfig;
|
|
8
8
|
categorizedItems: CategorizedItem[];
|
|
9
9
|
allowRefundInventory?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Label of the scope the "hide this group" toggle applies to, e.g. the selected variant. Left
|
|
12
|
+
* unset when the form edits a single scope that needs no naming (a product, a catalog).
|
|
13
|
+
*/
|
|
14
|
+
hideGroupScope?: string | null;
|
|
10
15
|
}
|
|
11
16
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
12
17
|
trigger: (event?: any) => void;
|
|
@@ -23,6 +23,9 @@ export declare const GroupManagerForm: {
|
|
|
23
23
|
allowRefundInventory: {
|
|
24
24
|
type: import("vue").PropType<boolean>;
|
|
25
25
|
};
|
|
26
|
+
hideGroupScope: {
|
|
27
|
+
type: import("vue").PropType<string | null>;
|
|
28
|
+
};
|
|
26
29
|
}>> & Readonly<{
|
|
27
30
|
"onUpdate:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
28
31
|
"onSubmit:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
@@ -65,6 +68,9 @@ export declare const GroupManagerForm: {
|
|
|
65
68
|
allowRefundInventory: {
|
|
66
69
|
type: import("vue").PropType<boolean>;
|
|
67
70
|
};
|
|
71
|
+
hideGroupScope: {
|
|
72
|
+
type: import("vue").PropType<string | null>;
|
|
73
|
+
};
|
|
68
74
|
}>> & Readonly<{
|
|
69
75
|
"onUpdate:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
70
76
|
"onSubmit:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
@@ -100,6 +106,9 @@ export declare const GroupManagerForm: {
|
|
|
100
106
|
allowRefundInventory: {
|
|
101
107
|
type: import("vue").PropType<boolean>;
|
|
102
108
|
};
|
|
109
|
+
hideGroupScope: {
|
|
110
|
+
type: import("vue").PropType<string | null>;
|
|
111
|
+
};
|
|
103
112
|
}>> & Readonly<{
|
|
104
113
|
"onUpdate:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
105
114
|
"onSubmit:group"?: ((group: import("../../../../../manager/menu/group").MenuGroup) => any) | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FdoGroupOverriderV4, type FdoMenuV4Group } from "@feedmepos/entity";
|
|
2
|
+
import type { MenuGroup } from "@/manager/menu/group";
|
|
3
|
+
/**
|
|
4
|
+
* A group is "hidden" when it cannot contribute a single selectable option: min is overridden to
|
|
5
|
+
* 0 and every product under it (base rows and variant rows alike) is set to NONE. POS, QR and
|
|
6
|
+
* Kiosk drop a group with no available products, so this combination is what actually hides it.
|
|
7
|
+
*
|
|
8
|
+
* There is no `hidden` field on the overrider — this is derived, so a merchant who configures the
|
|
9
|
+
* same combination by hand still sees the toggle switched on.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isGroupHidden(group: MenuGroup | null | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Same question as {@link isGroupHidden}, answered straight from an overrider and its base group.
|
|
14
|
+
* Building the merged view deep-clones the whole menu, which is far too heavy to do once per
|
|
15
|
+
* variant, so callers that only need the answer for several scopes at once use this instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isGroupHiddenInOverride(override: FdoGroupOverriderV4 | null | undefined, baseGroup: FdoMenuV4Group | null | undefined): boolean;
|
|
18
|
+
/** Overrides min to 0 and every product under the group to NONE. */
|
|
19
|
+
export declare function hideGroup(group: MenuGroup): MenuGroup;
|
|
20
|
+
/**
|
|
21
|
+
* Clears what {@link hideGroup} wrote: min goes back to the base group's value and every product
|
|
22
|
+
* falls back to inheriting its availability. Any per-product availability the merchant had set
|
|
23
|
+
* before hiding is not restored — the option table is locked while the group is hidden, so there
|
|
24
|
+
* is nothing to preserve from that period.
|
|
25
|
+
*/
|
|
26
|
+
export declare function showGroup(group: MenuGroup, baseMin: number): MenuGroup;
|
|
@@ -3,8 +3,8 @@ import { F_ADDON_GROUP_TYPE, F_ORDER_FROM } from "@feedmepos/entity";
|
|
|
3
3
|
import { type FdoGroupOverriderV4, type FdoItemOverriderV4, FdoMenuV4Group, type FdoMenuV4Item } from "@feedmepos/entity";
|
|
4
4
|
import { type DialogProvider } from "@feedmepos/ui-library";
|
|
5
5
|
import { useMenuLoader } from "@/helper/menu";
|
|
6
|
-
export { extractGroup } from "@/manager/menu/groupExtraction";
|
|
7
|
-
export { mapGroupConfigToImmutableItemsFields } from "@/manager/menu/groupImmutableFields";
|
|
6
|
+
export { dropRedundantMinMax, extractGroup } from "@/manager/menu/groupExtraction";
|
|
7
|
+
export { mapGroupConfigToImmutableFields, mapGroupConfigToImmutableItemsFields } from "@/manager/menu/groupImmutableFields";
|
|
8
8
|
export interface GroupConfig {
|
|
9
9
|
type: boolean;
|
|
10
10
|
price: boolean;
|
|
@@ -18,6 +18,16 @@ export interface GroupConfig {
|
|
|
18
18
|
name: (combinationKey?: string | null | undefined) => boolean;
|
|
19
19
|
isDefault: (combinationKey?: string | null | undefined) => boolean;
|
|
20
20
|
orderFrom: (combinationKey?: string | null | undefined) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether min/max may be edited and persisted in this context. Overriders store them per
|
|
23
|
+
* scope (`FdoGroupOverriderV4.min/max`), so this is true wherever that overrider is written.
|
|
24
|
+
*/
|
|
25
|
+
minMax: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to offer the "hide this group" shortcut, which overrides min to 0 and sets every
|
|
28
|
+
* product under the group to NONE. Only meaningful where `minMax` and `orderFrom` are editable.
|
|
29
|
+
*/
|
|
30
|
+
hideGroup: boolean;
|
|
21
31
|
isOverride: boolean;
|
|
22
32
|
isItemGroup: boolean;
|
|
23
33
|
isV4: boolean;
|
|
@@ -62,7 +72,6 @@ export declare class MenuGroupManager {
|
|
|
62
72
|
applyItems(group: MenuGroup, overrideIds: string[]): Promise<void>;
|
|
63
73
|
private isOverride;
|
|
64
74
|
}
|
|
65
|
-
export declare function mapGroupConfigToImmutableFields(groupConfig: GroupConfig | null | undefined): Array<keyof MenuGroup>;
|
|
66
75
|
/**
|
|
67
76
|
* Currently, there are many fields under group that are immutable. Such as name, type, min, max, etc.
|
|
68
77
|
* If we don't remove these fields, the group will be saved with these fields. Which will cause these
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FdoItemOverriderV4, FdoMenuV4Group } from "@feedmepos/entity";
|
|
1
|
+
import type { FdoGroupOverriderV4, FdoItemOverriderV4, FdoMenuV4Group } from "@feedmepos/entity";
|
|
2
2
|
/**
|
|
3
3
|
* The shape `extractGroup` needs from a `MenuGroup`: items keyed by id, each carrying its variant
|
|
4
4
|
* overriders under `items`. Declared structurally so this module stays free of the store and
|
|
@@ -17,4 +17,20 @@ type ExtractableGroup = Omit<FdoMenuV4Group, "items"> & {
|
|
|
17
17
|
* item overrider list the menu module stores.
|
|
18
18
|
*/
|
|
19
19
|
export declare function extractGroup(group: ExtractableGroup): FdoMenuV4Group;
|
|
20
|
+
/**
|
|
21
|
+
* Picks the group-level fields an overrider may carry beyond its items. Callers hand in a group
|
|
22
|
+
* that has already been through `removeImmutableFieldsByGroup`, so a field is absent exactly when
|
|
23
|
+
* the current context is not allowed to override it — and an absent field must stay absent rather
|
|
24
|
+
* than be written as `undefined`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function pickGroupOverrideMinMax(group: FdoMenuV4Group): Pick<FdoGroupOverriderV4, "min" | "max">;
|
|
27
|
+
/**
|
|
28
|
+
* Drops min/max from an overrider when they already match the base group. Without this every
|
|
29
|
+
* save of an override form would freeze min/max at today's value, so a later edit to the base
|
|
30
|
+
* group would silently stop reaching that catalog/variant.
|
|
31
|
+
*/
|
|
32
|
+
export declare function dropRedundantMinMax<T extends {
|
|
33
|
+
min?: number | null;
|
|
34
|
+
max?: number | null;
|
|
35
|
+
}>(override: T, baseGroup: FdoMenuV4Group | undefined | null): T;
|
|
20
36
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FdoItemOverriderV4 } from "@feedmepos/entity";
|
|
2
|
+
import type { GroupConfig, MenuGroup } from "@/manager/menu/group";
|
|
2
3
|
interface ImmutableGroupConfig {
|
|
3
4
|
priceEdit: boolean;
|
|
4
5
|
priceTier: boolean;
|
|
@@ -6,4 +7,5 @@ interface ImmutableGroupConfig {
|
|
|
6
7
|
isDefault: (combinationKey?: string | null | undefined) => boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare function mapGroupConfigToImmutableItemsFields(groupConfig: ImmutableGroupConfig | null | undefined, combinationKey?: string | null | undefined): (keyof FdoItemOverriderV4)[];
|
|
10
|
+
export declare function mapGroupConfigToImmutableFields(groupConfig: GroupConfig | null | undefined): Array<keyof MenuGroup>;
|
|
9
11
|
export {};
|