@feedmepos/mf-menu 0.32.37 → 0.32.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.
- package/dist/{App-Dl-BiHwh.js → App-CONXGagS.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Z4PgBxr3.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DS_gQ7_2.js} +3 -3
- package/dist/{Catalog-BSZ8BAbX.js → Catalog-DqGqLNN2.js} +6 -6
- package/dist/Category-Brn_eOxZ.js +224 -0
- package/dist/{Category-bGvXpr0F.js → Category-DlvKgR7e.js} +9 -9
- package/dist/{CookingGuide-DijUR2JM.js → CookingGuide-DvsYJxXb.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-B30t_PW1.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CoAJkdZX.js} +1 -1
- package/dist/{Group-O4L3iHx0.js → Group-BTdbQ303.js} +1 -1
- package/dist/{Group-CrqE40ia.js → Group-CeOonB-B.js} +7 -7
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CsM72Jnq.js → Group.vue_vue_type_script_setup_true_lang-WW3jF2A7.js} +227 -216
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BGR4kFzj.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Btb2BTqb.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-wf0Wm51b.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DLswQZTA.js} +315 -315
- package/dist/{Ingredient-DvvuwOdH.js → Ingredient-DNVMZVrz.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-anFCPZZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BBjjgCDV.js} +2 -2
- package/dist/{LinkProductSideSheet-ImK8azTA.js → LinkProductSideSheet-1ZQVQTG_.js} +3 -3
- package/dist/{MenuSetting-BX0ohmwF.js → MenuSetting-CTCx0oeP.js} +5 -5
- package/dist/{PrintRoute-CXYZHJsf.js → PrintRoute-CZcDiXfi.js} +4 -4
- package/dist/{Product-BnnwL5DZ.js → Product-XtB1aNsr.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DUBnQJZ1.js → Product.vue_vue_type_script_setup_true_lang-vf14Uzzm.js} +348 -337
- package/dist/{ProductInternalTools-DzRnmE1r.js → ProductInternalTools-DY1Np_PQ.js} +22 -22
- package/dist/{Products-CtzHONQZ.js → Products-DQorirQ3.js} +30 -30
- package/dist/{Publish-DmIbDy8-.js → Publish-Bv6Yiafq.js} +3 -3
- package/dist/{Recipe-D_0Ezt1C.js → Recipe-BDjd8TQg.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DdeQnyfQ.js → RuleView.vue_vue_type_script_setup_true_lang-DLMPV1-F.js} +2 -2
- package/dist/{Scheduler-BgQsbdVM.js → Scheduler-XTwUJH8U.js} +3 -3
- package/dist/{ServingSequence-DCRzJsrs.js → ServingSequence-BujAc7xS.js} +3 -3
- package/dist/{Setting-CgtttPN_.js → Setting-BUovlSPt.js} +5 -5
- package/dist/Subcategory-BWZdguIR.js +345 -0
- package/dist/{Takeaway-CExKsbN5.js → Takeaway-CGGaO_dh.js} +4 -4
- package/dist/{Takeaway-BfcHs1we.js → Takeaway-Doy30uHo.js} +1 -1
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-Iy2ZwQf_.js +316 -0
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Br279NC_.js → Thumbnail.vue_vue_type_script_setup_true_lang-CY9TyaLG.js} +4 -4
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DiGAs3Gd.js +185 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CZq5WTEG.js +6120 -0
- package/dist/{Unit-B6P_ykM-.js → Unit-Bl0DBmQ3.js} +2 -2
- package/dist/Variant-DgUxTOkz.js +247 -0
- package/dist/{_id_-D2ozS9Ck.js → _id_-BqediDNk.js} +9 -9
- package/dist/app-BVB_5Ks2.js +363 -0
- package/dist/{app-DqyNXgYz.js → app-DAPQhgfg.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +264 -0
- package/dist/apps/mf-menu/src/components/ProductTranslationDialog.vue.d.ts +41 -0
- package/dist/apps/mf-menu/src/components/TranslationBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/TranslationFieldSection.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +54 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/Form.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/ProductOverrideTranslation.vue.d.ts +22 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +24 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +125 -1
- package/dist/apps/mf-menu/src/components/feature/VariantManager/ProductVariantTranslation.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +16 -0
- package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +10 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +11 -0
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +125 -1
- package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/manager/menu/group.d.ts +1 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +6 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +31 -1
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +9 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +125 -1
- package/dist/apps/mf-menu/src/utils/translation.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddCategoryDialogContentComponent.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +46 -0
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +10 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-CupfG8qX.js +13 -0
- package/dist/assets/menu-export-CL6U9A01.js +107 -0
- package/dist/assets/override-menu-K_rFGpIx.js +13 -0
- package/dist/assets/validate-menu-Dr7DxB6L.js +13 -0
- package/dist/{catalog-CFKVaXk7.js → catalog-8-hugI0j.js} +1 -1
- package/dist/{catalogSetting-N4nT-nGm.js → catalogSetting-BWa1ZTnY.js} +1 -1
- package/dist/{currency-Bi_GukGE.js → currency-B59CBSWJ.js} +1 -1
- package/dist/dayjs.min-D1xLv5bP.js +6 -0
- package/dist/index-ChzxrjXq.js +539 -0
- package/dist/index-DIXBx1sl.js +335 -0
- package/dist/{index-uiJS0BKT.js → index-wA29dyse.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CL6a622s.js → index.vue_vue_type_script_setup_true_lang-CZJpW7cW.js} +18104 -17902
- package/dist/item-Fu9YmyOy.js +8117 -0
- package/dist/{jszip.min-v__o3BM4.js → jszip.min-qs5Z6KRL.js} +383 -383
- package/dist/{menu-LtIuM7Qj.js → menu-CoqhBDql.js} +1 -1
- package/dist/{menuV2-N0hB53Gw.js → menuV2-CnCDR__p.js} +125 -125
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DZeAvlXs.js → priceTier-BvG_RNTn.js} +1 -1
- package/dist/rules-Av0lxCL-.js +212 -0
- package/dist/{scheduler-FVlscyjB.js → scheduler-CrvDOlmc.js} +4 -4
- package/dist/{toExcel-DBCbupeI.js → toExcel-CnzBt_4W.js} +2 -2
- package/dist/translation-BeqjfyEb.js +75 -0
- package/dist/{unit-DNphv-4C.js → unit-h28_cadr.js} +2 -2
- package/package.json +3 -3
- package/dist/Category-DMgNea31.js +0 -392
- package/dist/Subcategory-6SgvwWpX.js +0 -280
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-GAZ3S2_n.js +0 -305
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BFwMfAlB.js +0 -6024
- package/dist/Variant-DmNuLi96.js +0 -230
- package/dist/app-CE0yoao0.js +0 -363
- package/dist/assets/linked-status-BB6BrSUB.js +0 -13
- package/dist/assets/menu-export-C1TBcoi-.js +0 -107
- package/dist/assets/override-menu-C0RijOOI.js +0 -13
- package/dist/assets/validate-menu-9VpR7oZY.js +0 -13
- package/dist/category-BSGaVgyv.js +0 -156
- package/dist/dayjs.min-DgXlcVSD.js +0 -6
- package/dist/index-BaxQ5Nq0.js +0 -273
- package/dist/index-Bun2EboK.js +0 -239
- package/dist/item-DPivBmJh.js +0 -6950
- package/dist/rules-CIWTZQfh.js +0 -6
- package/dist/subcategory-CIctYwBF.js +0 -148
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { J as
|
|
3
|
-
import { d as
|
|
4
|
-
import { b as ve, H as
|
|
5
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as Z, computed as g, resolveComponent as M, createBlock as U, openBlock as m, withCtx as D, createElementBlock as C, Fragment as T, renderList as ne, createElementVNode as p, normalizeClass as X, toDisplayString as G, createVNode as i, ref as R, renderSlot as Ne, unref as r, createCommentVNode as I, watch as Ee, h as H, mergeProps as Re, createSlots as Se, withModifiers as Ie, isRef as W, nextTick as fe } from "vue";
|
|
2
|
+
import { J as q, u as le, Q as Ue, G as Te, A as v, D as $e, a4 as Ye, B as Le, M as ze } from "./index.vue_vue_type_script_setup_true_lang-CZJpW7cW.js";
|
|
3
|
+
import { d as je } from "./vuedraggable-CK8z7qA8.js";
|
|
4
|
+
import { b as ve, H as Be } from "./app-5fxKLAzS.js";
|
|
5
|
+
import { useI18n as ae, useCoreStore as Ke, useCustomAttributes as He } from "@feedmepos/mf-common";
|
|
6
6
|
import { useBreakpoints as ye, components as _e, useSnackbar as qe, useDialog as Qe, FmButtonVariant as Je } from "@feedmepos/ui-library";
|
|
7
|
-
import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Ze } from "./app-
|
|
7
|
+
import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CoAJkdZX.js";
|
|
8
|
+
import { _ as Ze } from "./app-BVB_5Ks2.js";
|
|
9
9
|
import { _ as et, a as tt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
10
|
import { c as ot } from "./object-DVUNCr7w.js";
|
|
11
11
|
import { u as nt } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DS_gQ7_2.js";
|
|
13
13
|
import { c as at } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { M as ge,
|
|
15
|
-
import { u as
|
|
16
|
-
import { C as
|
|
17
|
-
import { c as ft } from "./menuV2-
|
|
18
|
-
|
|
14
|
+
import { M as ge, D as rt, E as ut, B as st, j as it, l as ct, r as mt } from "./item-Fu9YmyOy.js";
|
|
15
|
+
import { u as pt } from "./search-BAPEUu1R.js";
|
|
16
|
+
import { C as dt } from "./catalog-8-hugI0j.js";
|
|
17
|
+
import { c as ft } from "./menuV2-CnCDR__p.js";
|
|
18
|
+
import { g as vt } from "./translation-BeqjfyEb.js";
|
|
19
|
+
const gt = /* @__PURE__ */ Z({
|
|
19
20
|
__name: "ResponsiveContextMenu",
|
|
20
21
|
props: {
|
|
21
22
|
items: {}
|
|
22
23
|
},
|
|
23
24
|
setup(L) {
|
|
24
25
|
const S = ye(), u = g(() => S.breakpoints.value.xs);
|
|
25
|
-
return (
|
|
26
|
+
return (E, V) => {
|
|
26
27
|
const k = M("FmButton"), f = M("FmMenuItem"), y = M("FmMenu");
|
|
27
|
-
return u.value ? (m(),
|
|
28
|
-
default:
|
|
29
|
-
(m(!0), C(T, null,
|
|
30
|
-
key:
|
|
28
|
+
return u.value ? (m(), U(et, { key: 0 }, {
|
|
29
|
+
default: D(() => [
|
|
30
|
+
(m(!0), C(T, null, ne(E.items, ({ icon: h, label: A, disabled: x, itemClass: F, onClick: _ }) => (m(), U(tt, {
|
|
31
|
+
key: A,
|
|
31
32
|
icon: h,
|
|
32
|
-
label:
|
|
33
|
-
disabled:
|
|
34
|
-
itemClass:
|
|
33
|
+
label: A,
|
|
34
|
+
disabled: x,
|
|
35
|
+
itemClass: F,
|
|
35
36
|
onClick: () => {
|
|
36
|
-
!
|
|
37
|
+
!x && (_ == null || _());
|
|
37
38
|
}
|
|
38
39
|
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
39
40
|
]),
|
|
40
41
|
_: 1
|
|
41
|
-
})) : (m(),
|
|
42
|
+
})) : (m(), U(y, {
|
|
42
43
|
key: 1,
|
|
43
44
|
"stop-click-propagation": "",
|
|
44
45
|
shift: !0
|
|
45
46
|
}, {
|
|
46
|
-
"menu-button":
|
|
47
|
-
|
|
47
|
+
"menu-button": D(() => [
|
|
48
|
+
i(k, {
|
|
48
49
|
type: "button",
|
|
49
50
|
variant: "tertiary",
|
|
50
51
|
icon: "more_vert",
|
|
@@ -52,19 +53,19 @@ const vt = /* @__PURE__ */ X({
|
|
|
52
53
|
size: "md"
|
|
53
54
|
})
|
|
54
55
|
]),
|
|
55
|
-
default:
|
|
56
|
-
(m(!0), C(T, null,
|
|
57
|
-
key:
|
|
58
|
-
disabled:
|
|
56
|
+
default: D(() => [
|
|
57
|
+
(m(!0), C(T, null, ne(E.items, ({ icon: h, label: A, disabled: x, itemClass: F, onClick: _ }) => (m(), U(f, {
|
|
58
|
+
key: A,
|
|
59
|
+
disabled: x,
|
|
59
60
|
onClick: () => {
|
|
60
|
-
!
|
|
61
|
+
!x && (_ == null || _());
|
|
61
62
|
},
|
|
62
|
-
label:
|
|
63
|
+
label: A
|
|
63
64
|
}, {
|
|
64
|
-
label:
|
|
65
|
-
|
|
66
|
-
class:
|
|
67
|
-
}, G(
|
|
65
|
+
label: D(() => [
|
|
66
|
+
p("span", {
|
|
67
|
+
class: X(x ? "text-fm-color-typo-disabled" : F)
|
|
68
|
+
}, G(A), 3)
|
|
68
69
|
]),
|
|
69
70
|
_: 2
|
|
70
71
|
}, 1032, ["disabled", "onClick", "label"]))), 128))
|
|
@@ -73,7 +74,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
73
74
|
}));
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
|
-
}),
|
|
77
|
+
}), yt = { class: "fm-typo-en-title-md-600" }, _t = { class: "flex gap-8 items-center justify-start" }, bt = /* @__PURE__ */ Z({
|
|
77
78
|
__name: "ApplyProductDialog",
|
|
78
79
|
props: {
|
|
79
80
|
title: {},
|
|
@@ -83,57 +84,57 @@ const vt = /* @__PURE__ */ X({
|
|
|
83
84
|
},
|
|
84
85
|
emits: ["apply:product"],
|
|
85
86
|
setup(L, { emit: S }) {
|
|
86
|
-
const u = L,
|
|
87
|
-
() => !
|
|
87
|
+
const u = L, E = S, { t: V } = ae(), k = u.initialValue.map((F) => ({ _id: F })), f = R(q.clone(k)), y = nt(
|
|
88
|
+
() => !q.isEqual(f.value, k),
|
|
88
89
|
() => {
|
|
89
90
|
h.value = !1;
|
|
90
91
|
}
|
|
91
|
-
), h =
|
|
92
|
-
at.isBoolean(
|
|
93
|
-
},
|
|
94
|
-
return (
|
|
95
|
-
const b = M("fm-button"),
|
|
92
|
+
), h = R(!1), A = (F) => {
|
|
93
|
+
at.isBoolean(F) ? h.value = F : h.value = !h.value, h.value && (f.value = u.initialValue.map((_) => ({ _id: _ })));
|
|
94
|
+
}, x = le();
|
|
95
|
+
return (F, _) => {
|
|
96
|
+
const b = M("fm-button"), Q = M("fm-side-sheet");
|
|
96
97
|
return m(), C(T, null, [
|
|
97
|
-
Ne(
|
|
98
|
-
|
|
98
|
+
Ne(F.$slots, "default", { trigger: A }),
|
|
99
|
+
i(Q, {
|
|
99
100
|
id: "group-form",
|
|
100
101
|
modelValue: h.value,
|
|
101
102
|
"onUpdate:modelValue": _[1] || (_[1] = (N) => h.value = N),
|
|
102
103
|
"is-container": r(_e).FmForm,
|
|
103
104
|
"is-container-props": {
|
|
104
105
|
onValidationSuccess: () => {
|
|
105
|
-
|
|
106
|
+
E("apply:product", f.value), A(!1);
|
|
106
107
|
},
|
|
107
108
|
blameFormChildOnValidationFailed: !0
|
|
108
109
|
},
|
|
109
110
|
"max-width": 560,
|
|
110
111
|
"onOn:clickedAway": r(y)
|
|
111
112
|
}, {
|
|
112
|
-
"side-sheet-header":
|
|
113
|
-
|
|
113
|
+
"side-sheet-header": D(() => [
|
|
114
|
+
p("p", yt, G(F.title), 1)
|
|
114
115
|
]),
|
|
115
|
-
"side-sheet-footer":
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
"side-sheet-footer": D(() => [
|
|
117
|
+
p("div", _t, [
|
|
118
|
+
i(b, {
|
|
118
119
|
label: r(V)("common.save"),
|
|
119
120
|
size: "lg",
|
|
120
121
|
type: "submit",
|
|
121
122
|
variant: "primary"
|
|
122
123
|
}, null, 8, ["label"]),
|
|
123
|
-
|
|
124
|
+
i(b, {
|
|
124
125
|
label: "Cancel",
|
|
125
126
|
size: "lg",
|
|
126
127
|
variant: "tertiary",
|
|
127
|
-
onClick:
|
|
128
|
+
onClick: A
|
|
128
129
|
})
|
|
129
130
|
])
|
|
130
131
|
]),
|
|
131
|
-
default:
|
|
132
|
-
|
|
132
|
+
default: D(() => [
|
|
133
|
+
i(lt, {
|
|
133
134
|
overrides: f.value,
|
|
134
135
|
"onUpdate:overrides": _[0] || (_[0] = (N) => f.value = N),
|
|
135
|
-
"categorized-items": r(
|
|
136
|
-
editable:
|
|
136
|
+
"categorized-items": r(x).categorizedItems,
|
|
137
|
+
editable: F.editable,
|
|
137
138
|
"select-variant": !1,
|
|
138
139
|
"show-variant": !1,
|
|
139
140
|
"link-button-label": r(V)("menu.group.actions.apply_product"),
|
|
@@ -145,125 +146,125 @@ const vt = /* @__PURE__ */ X({
|
|
|
145
146
|
], 64);
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
|
-
}),
|
|
149
|
+
}), kt = {
|
|
149
150
|
key: 0,
|
|
150
151
|
class: "mt-4"
|
|
151
|
-
},
|
|
152
|
+
}, ht = { class: "text-fm-color-typo-secondary mb-2" }, wt = { class: "list-disc list-inside text-fm-color-typo-secondary ml-4 space-y-1" }, Ct = /* @__PURE__ */ Z({
|
|
152
153
|
__name: "DeleteGroupDialog",
|
|
153
154
|
props: {
|
|
154
155
|
group: {}
|
|
155
156
|
},
|
|
156
157
|
setup(L) {
|
|
157
|
-
const S = L, { t: u } =
|
|
158
|
-
const f =
|
|
158
|
+
const S = L, { t: u } = ae(), E = le(), V = g(() => S.group.itemsLinked.map((k) => {
|
|
159
|
+
const f = E.state.menu.modules.item.find((y) => y._id === k);
|
|
159
160
|
return (f == null ? void 0 : f.name) || k;
|
|
160
161
|
}).filter(Boolean));
|
|
161
162
|
return (k, f) => (m(), C("div", null, [
|
|
162
|
-
|
|
163
|
-
V.value.length > 0 ? (m(), C("div",
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
(m(!0), C(T, null,
|
|
163
|
+
p("div", null, G(r(u)("menu.group.dialogs.delete.message", { name: k.group.name })), 1),
|
|
164
|
+
V.value.length > 0 ? (m(), C("div", kt, [
|
|
165
|
+
p("div", ht, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
|
|
166
|
+
p("ul", wt, [
|
|
167
|
+
(m(!0), C(T, null, ne(V.value, (y) => (m(), C("li", {
|
|
167
168
|
key: y,
|
|
168
169
|
class: "text-sm"
|
|
169
170
|
}, G(y), 1))), 128))
|
|
170
171
|
])
|
|
171
|
-
])) :
|
|
172
|
+
])) : I("", !0)
|
|
172
173
|
]));
|
|
173
174
|
}
|
|
174
|
-
}),
|
|
175
|
+
}), xt = {
|
|
175
176
|
key: 1,
|
|
176
177
|
class: "xs:pt-24"
|
|
177
178
|
}, Ot = {
|
|
178
179
|
key: 0,
|
|
179
|
-
class: /* @__PURE__ */
|
|
180
|
-
}, xt = {
|
|
181
|
-
class: "flex justify-between items-center space-x-8"
|
|
180
|
+
class: /* @__PURE__ */ X(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden", "pt-16"])
|
|
182
181
|
}, Dt = {
|
|
183
|
-
class: "
|
|
182
|
+
class: "flex justify-between items-center space-x-8"
|
|
184
183
|
}, At = {
|
|
185
|
-
|
|
184
|
+
class: "w-[320px]"
|
|
186
185
|
}, Ft = {
|
|
187
|
-
|
|
186
|
+
key: 0
|
|
188
187
|
}, Mt = {
|
|
189
|
-
class: "py-8
|
|
188
|
+
class: "px-16 py-8"
|
|
190
189
|
}, Gt = {
|
|
190
|
+
class: "py-8 px-16"
|
|
191
|
+
}, Pt = {
|
|
191
192
|
key: 0,
|
|
192
193
|
class: "px-16 py-8"
|
|
193
|
-
}, Pt = {
|
|
194
|
-
class: "flex items-center flex-1"
|
|
195
194
|
}, Vt = {
|
|
196
|
-
class: "flex-
|
|
195
|
+
class: "flex items-center flex-1"
|
|
197
196
|
}, Nt = {
|
|
197
|
+
class: "flex-1 space-y-4"
|
|
198
|
+
}, Et = {
|
|
198
199
|
class: "fm-typo-en-body-lg-600"
|
|
199
200
|
}, Rt = {
|
|
200
201
|
key: 0,
|
|
201
202
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
202
|
-
},
|
|
203
|
+
}, St = {
|
|
203
204
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
204
|
-
},
|
|
205
|
+
}, to = /* @__PURE__ */ Z({
|
|
205
206
|
__name: "Group",
|
|
206
207
|
emits: ["update:count"],
|
|
207
208
|
setup(L, {
|
|
208
209
|
emit: S
|
|
209
210
|
}) {
|
|
210
|
-
const u =
|
|
211
|
-
searchKey:
|
|
212
|
-
filter:
|
|
213
|
-
} =
|
|
214
|
-
attributes:
|
|
211
|
+
const u = le(), E = Ke(), V = qe(), k = Ue(Te(V)), f = Qe(), y = g(() => u.rules.group), h = g(() => new ge(u, k.updateMenu, f)), A = g(() => h.value.mapGroups(u.groups, !1)), {
|
|
212
|
+
searchKey: x,
|
|
213
|
+
filter: F
|
|
214
|
+
} = pt(), _ = R(!1), b = R(null), {
|
|
215
|
+
attributes: Q,
|
|
215
216
|
filterRule: N,
|
|
216
|
-
mongoQuery:
|
|
217
|
+
mongoQuery: re
|
|
217
218
|
} = He({
|
|
218
|
-
valueSource:
|
|
219
|
+
valueSource: A,
|
|
219
220
|
entity: "group"
|
|
220
221
|
}), z = g(() => {
|
|
221
|
-
const t = (a) =>
|
|
222
|
-
return
|
|
222
|
+
const t = (a) => F([a.name, ...Object.values(a.items).flatMap((n) => `${n.code} ${n.name ?? n.fallbackName} ${Le.Dinero.fromFdoDinero(n.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !re.value ? !0 : Be(a.customAttributes ?? {}, re.value);
|
|
223
|
+
return A.value.filter((a) => t(a) && e(a)).filter((a) => !b.value || a.type === b.value);
|
|
223
224
|
}), be = S;
|
|
224
|
-
|
|
225
|
+
Ee(() => z.value.length, () => {
|
|
225
226
|
be("update:count", z.value.length);
|
|
226
227
|
}, {
|
|
227
228
|
immediate: !0
|
|
228
229
|
});
|
|
229
230
|
const c = g(() => !!u.state.currentCatalogId || !!u.state.currentSchedulerId);
|
|
230
|
-
function
|
|
231
|
+
function ue(t) {
|
|
231
232
|
var Y, o;
|
|
232
|
-
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, n = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((o = u.currentCatalog) == null ? void 0 : o.usePriceTiers),
|
|
233
|
+
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, n = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((o = u.currentCatalog) == null ? void 0 : o.usePriceTiers), s = u.rules.item.bindToVariant, w = u.rules.group.type, d = u.version === v.F_MENU_VERSION.enum.v3, P = u.rules.item.orderFromActiveOnly;
|
|
233
234
|
return {
|
|
234
|
-
link: (O) => !c.value && (!O ||
|
|
235
|
+
link: (O) => !c.value && (!O || s),
|
|
235
236
|
name: (O) => !c.value && !O,
|
|
236
237
|
isDefault: (O) => !c.value,
|
|
237
|
-
type:
|
|
238
|
-
price: !
|
|
239
|
-
priceEdit: !(n && n.length > 0 && !
|
|
240
|
-
priceTier: !
|
|
241
|
-
inventory: a ?
|
|
242
|
-
orderFrom: (O) => a ?
|
|
238
|
+
type: w && !t._id && !c.value,
|
|
239
|
+
price: !d || t.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
240
|
+
priceEdit: !(n && n.length > 0 && !d && a),
|
|
241
|
+
priceTier: !d && a && e,
|
|
242
|
+
inventory: a ? d ? !c.value && t.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
|
|
243
|
+
orderFrom: (O) => a ? d ? t.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !O : c.value : !1,
|
|
243
244
|
orderFromActiveOnly: P,
|
|
244
|
-
showOrderFrom: a ?
|
|
245
|
-
bindToVariant:
|
|
245
|
+
showOrderFrom: a ? d ? c.value ? !0 : t.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : !0 : !1,
|
|
246
|
+
bindToVariant: s,
|
|
246
247
|
isOverride: c.value,
|
|
247
248
|
isItemGroup: !1,
|
|
248
|
-
isV4: !
|
|
249
|
+
isV4: !d
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
252
|
const ke = g(() => {
|
|
252
|
-
const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version === v.F_MENU_VERSION.enum.v3, n = u.rules.item.orderFromActiveOnly,
|
|
253
|
-
return function(
|
|
253
|
+
const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version === v.F_MENU_VERSION.enum.v3, n = u.rules.item.orderFromActiveOnly, s = u.rules.item.bindToVariant;
|
|
254
|
+
return function(d) {
|
|
254
255
|
return {
|
|
255
|
-
link: (P) => !c.value && (!P ||
|
|
256
|
+
link: (P) => !c.value && (!P || s),
|
|
256
257
|
name: (P) => !c.value && !P,
|
|
257
258
|
isDefault: (P) => !c.value,
|
|
258
|
-
type: e && !
|
|
259
|
-
price:
|
|
259
|
+
type: e && !d._id && !c.value,
|
|
260
|
+
price: d.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
260
261
|
priceEdit: !0,
|
|
261
262
|
priceTier: u.isV4,
|
|
262
|
-
inventory: t ? a ? !c.value &&
|
|
263
|
-
orderFrom: (P) => t ? a ?
|
|
263
|
+
inventory: t ? a ? !c.value && d.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
|
|
264
|
+
orderFrom: (P) => t ? a ? d.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !P : c.value : !1,
|
|
264
265
|
orderFromActiveOnly: n,
|
|
265
|
-
showOrderFrom: t ? a ? c.value ? !0 :
|
|
266
|
-
bindToVariant:
|
|
266
|
+
showOrderFrom: t ? a ? c.value ? !0 : d.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : c.value : !1,
|
|
267
|
+
bindToVariant: s,
|
|
267
268
|
isOverride: c.value,
|
|
268
269
|
isItemGroup: !1,
|
|
269
270
|
isV4: !a
|
|
@@ -275,11 +276,11 @@ const vt = /* @__PURE__ */ X({
|
|
|
275
276
|
items: {},
|
|
276
277
|
position: u.groups.length - 1,
|
|
277
278
|
itemsLinked: []
|
|
278
|
-
})),
|
|
279
|
-
function
|
|
279
|
+
})), ee = g(() => ke.value(he.value).type);
|
|
280
|
+
function se(t) {
|
|
280
281
|
h.value.sortGroups(t);
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
+
function we(t) {
|
|
283
284
|
f.open({
|
|
284
285
|
title: l("menu.group.actions.duplicate.title"),
|
|
285
286
|
message: l("menu.group.actions.duplicate.message", {
|
|
@@ -295,36 +296,36 @@ const vt = /* @__PURE__ */ X({
|
|
|
295
296
|
}
|
|
296
297
|
}).onPrimary(() => h.value.duplicateGroup(t));
|
|
297
298
|
}
|
|
298
|
-
const
|
|
299
|
+
const te = g(() => u.currentCatalog), j = g(() => u.currentScheduler), B = g(() => new dt(te.value, u, k.updateMenu, f)), oe = g(() => new rt(j.value, u, k.updateMenu, f)), Ce = (t) => {
|
|
299
300
|
let e = t;
|
|
300
301
|
function a(n) {
|
|
301
|
-
const
|
|
302
|
+
const w = u.state.menu.modules.group.find((o) => o._id === n._id), d = (n.items ?? []).reduce((o, O) => (o[O._id] = [...o[O._id] || [], O.combinationKey || ""], o), {}), Y = (w.items ?? []).filter((o) => {
|
|
302
303
|
var O;
|
|
303
|
-
return !((O =
|
|
304
|
+
return !((O = d[o._id]) != null && O.includes(o.combinationKey || ""));
|
|
304
305
|
}).map((o) => ({
|
|
305
306
|
_id: o._id,
|
|
306
307
|
combinationKey: o.combinationKey,
|
|
307
308
|
selection: o.selection
|
|
308
309
|
})).filter((o) => !!u.mergedMenu.modules.item.find((O) => O._id === o._id));
|
|
309
310
|
return {
|
|
310
|
-
...
|
|
311
|
+
...w,
|
|
311
312
|
...Object.fromEntries(Object.entries(n).filter(([, o]) => !!o)),
|
|
312
313
|
items: [...n.items ?? [], ...Y]
|
|
313
314
|
};
|
|
314
315
|
}
|
|
315
316
|
if (c.value) {
|
|
316
317
|
let n;
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
e = new ge(u, k.updateMenu, f).mapGroups([
|
|
318
|
+
te.value ? j.value ? n = B.value.getCatalogSchedulerGroup(t._id, j.value._id) : n = B.value.getCatalogGroup(t._id) : n = oe.value.getSchedulerGroup(t._id);
|
|
319
|
+
const s = a(n);
|
|
320
|
+
e = new ge(u, k.updateMenu, f).mapGroups([s], !0)[0];
|
|
320
321
|
}
|
|
321
322
|
return {
|
|
322
323
|
group: e,
|
|
323
|
-
config:
|
|
324
|
+
config: ue,
|
|
324
325
|
categorizedItems: u.categorizedItems
|
|
325
326
|
};
|
|
326
327
|
};
|
|
327
|
-
function
|
|
328
|
+
function xe(t) {
|
|
328
329
|
f.open({
|
|
329
330
|
title: l("menu.group.dialogs.delete.title"),
|
|
330
331
|
contentComponent: Ct,
|
|
@@ -344,40 +345,40 @@ const vt = /* @__PURE__ */ X({
|
|
|
344
345
|
await h.value.deleteGroup(t);
|
|
345
346
|
});
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
348
|
+
function ie(t, e) {
|
|
349
|
+
return H(bt, {
|
|
349
350
|
key: t._id,
|
|
350
351
|
initialValue: t.itemsLinked,
|
|
351
352
|
group: it(t),
|
|
352
353
|
editable: y.value.applyProduct,
|
|
353
354
|
"onApply:product": async (a) => {
|
|
354
355
|
var n;
|
|
355
|
-
for (const
|
|
356
|
-
if (ft(u.state.menu, t._id,
|
|
357
|
-
const
|
|
356
|
+
for (const s of a)
|
|
357
|
+
if (ft(u.state.menu, t._id, s._id)) {
|
|
358
|
+
const w = (n = u.state.menu.modules.item.find((d) => d._id === s._id)) == null ? void 0 : n.name;
|
|
358
359
|
V.open({
|
|
359
360
|
type: "error",
|
|
360
361
|
message: l("menu.product.form.group.circularError", {
|
|
361
362
|
groupName: t.name,
|
|
362
|
-
productName:
|
|
363
|
+
productName: w
|
|
363
364
|
})
|
|
364
365
|
});
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
|
-
await h.value.applyItems(t, a.map((
|
|
368
|
+
await h.value.applyItems(t, a.map((s) => s._id));
|
|
368
369
|
}
|
|
369
370
|
}, {
|
|
370
371
|
default: e
|
|
371
372
|
});
|
|
372
373
|
}
|
|
373
|
-
const
|
|
374
|
+
const ce = (t) => {
|
|
374
375
|
const e = t.group;
|
|
375
|
-
return
|
|
376
|
+
return ie(e, ({
|
|
376
377
|
trigger: n
|
|
377
378
|
}) => {
|
|
378
|
-
const
|
|
379
|
+
const s = [{
|
|
379
380
|
label: l("menu.common.actions.edit"),
|
|
380
|
-
onClick: () =>
|
|
381
|
+
onClick: () => pe(e)
|
|
381
382
|
}, {
|
|
382
383
|
label: l("menu.group.actions.apply_product"),
|
|
383
384
|
disable: !y.value.applyProduct,
|
|
@@ -385,33 +386,43 @@ const vt = /* @__PURE__ */ X({
|
|
|
385
386
|
}, {
|
|
386
387
|
label: l("menu.group.actions.duplicate_action"),
|
|
387
388
|
disabled: !y.value.create,
|
|
388
|
-
onClick: () =>
|
|
389
|
+
onClick: () => we(e)
|
|
389
390
|
}, {
|
|
390
391
|
label: l("menu.common.actions.delete"),
|
|
391
392
|
itemClass: "text-fm-color-typo-error",
|
|
392
393
|
disabled: !y.value.delete,
|
|
393
|
-
onClick: () =>
|
|
394
|
+
onClick: () => xe(e)
|
|
394
395
|
}];
|
|
395
|
-
return
|
|
396
|
+
return i(gt, {
|
|
396
397
|
class: t.className,
|
|
397
|
-
items:
|
|
398
|
+
items: s
|
|
398
399
|
}, null);
|
|
399
400
|
});
|
|
400
|
-
},
|
|
401
|
+
}, Oe = g(() => [{
|
|
401
402
|
accessorKey: "name",
|
|
402
403
|
header: () => l("menu.group.list.columns.name"),
|
|
403
|
-
enableSorting: !1
|
|
404
|
+
enableSorting: !1,
|
|
405
|
+
cell: (t) => {
|
|
406
|
+
const e = t.row.original, a = t.getValue(), s = Object.keys(e.name_locale ?? {}).map((w) => vt(w));
|
|
407
|
+
return H("div", {
|
|
408
|
+
class: "flex items-center gap-8"
|
|
409
|
+
}, [H("span", {
|
|
410
|
+
class: "break-all"
|
|
411
|
+
}, a), ...s.map((w) => H("div", {
|
|
412
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
413
|
+
}, w))]);
|
|
414
|
+
}
|
|
404
415
|
}, {
|
|
405
416
|
accessorKey: "items",
|
|
406
417
|
header: () => l("menu.group.list.columns.products"),
|
|
407
418
|
enableSorting: !1,
|
|
408
419
|
cell: (t) => {
|
|
409
420
|
const e = t.getValue(), a = Object.values(e).map((n) => {
|
|
410
|
-
var
|
|
411
|
-
const
|
|
412
|
-
return (n.items || []).length > 1 ? `${
|
|
413
|
-
count: (
|
|
414
|
-
})})` :
|
|
421
|
+
var w;
|
|
422
|
+
const s = [(n == null ? void 0 : n.code) || "", n.name || n.fallbackName].join(" ").trim();
|
|
423
|
+
return (n.items || []).length > 1 ? `${s} (${l("menu.group.list.variants", {
|
|
424
|
+
count: (w = n.items) == null ? void 0 : w.length
|
|
425
|
+
})})` : s;
|
|
415
426
|
});
|
|
416
427
|
return a.length > 5 ? `${a.slice(0, 5).join(", ")} ${l("menu.group.list.more_items", {
|
|
417
428
|
count: a.length - 5
|
|
@@ -440,7 +451,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
440
451
|
size: 140,
|
|
441
452
|
cell: (t) => {
|
|
442
453
|
const e = t.row.original;
|
|
443
|
-
return
|
|
454
|
+
return H(We, {
|
|
444
455
|
// FIXME:FdoCustomAttribute under "@feedmepos/custom-attributes" is not compatible
|
|
445
456
|
// with FdoCustomAttribute from "@feedmepos/core", ! mark should be removed when fixed
|
|
446
457
|
customAttributes: e.customAttributes
|
|
@@ -454,12 +465,12 @@ const vt = /* @__PURE__ */ X({
|
|
|
454
465
|
const e = t.getValue(), a = l("menu.group.list.items_linked", {
|
|
455
466
|
count: e.length
|
|
456
467
|
});
|
|
457
|
-
return
|
|
468
|
+
return ie(t.row.original, ({
|
|
458
469
|
trigger: n
|
|
459
|
-
}) =>
|
|
470
|
+
}) => i("div", {
|
|
460
471
|
class: "w-fit cursor-pointer border-b border-dashed border-fm-color-neutral-gray-300 hover:border-fm-color-neutral-gray-400",
|
|
461
|
-
onClick: (
|
|
462
|
-
|
|
472
|
+
onClick: (s) => {
|
|
473
|
+
s.stopPropagation(), n(s);
|
|
463
474
|
}
|
|
464
475
|
}, [a]));
|
|
465
476
|
}
|
|
@@ -471,7 +482,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
471
482
|
},
|
|
472
483
|
cell: (t) => {
|
|
473
484
|
const e = t.row.original;
|
|
474
|
-
return
|
|
485
|
+
return ce({
|
|
475
486
|
group: e,
|
|
476
487
|
className: "flex justify-end w-full"
|
|
477
488
|
});
|
|
@@ -481,14 +492,14 @@ const vt = /* @__PURE__ */ X({
|
|
|
481
492
|
return {
|
|
482
493
|
itemsLinked: y.value.showAppliedProduct,
|
|
483
494
|
type: y.value.type,
|
|
484
|
-
tagging: ((t =
|
|
495
|
+
tagging: ((t = E.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
|
|
485
496
|
};
|
|
486
497
|
}), Ae = async (t) => {
|
|
487
|
-
const e = ct(t), a = e.group, n = mt(a,
|
|
498
|
+
const e = ct(t), a = e.group, n = mt(a, ue(t));
|
|
488
499
|
if (c.value)
|
|
489
|
-
|
|
500
|
+
te.value ? (j.value ? B.value.overrideCatalogSchedulerGroups([n], j.value._id) : B.value.overrideCatalogGroups([n]), await B.value.update()) : (oe.value.overrideSchedulerGroups([n]), await oe.value.update());
|
|
490
501
|
else {
|
|
491
|
-
const
|
|
502
|
+
const s = {
|
|
492
503
|
module: v.F_MENU_MODULE_V4_KEY.enum.group,
|
|
493
504
|
operation: ze.F_OPERATION_TYPE.update,
|
|
494
505
|
data: n,
|
|
@@ -498,31 +509,31 @@ const vt = /* @__PURE__ */ X({
|
|
|
498
509
|
data: e.linkItems
|
|
499
510
|
}]
|
|
500
511
|
};
|
|
501
|
-
await k.updateMenu(
|
|
512
|
+
await k.updateMenu(s, n.name);
|
|
502
513
|
}
|
|
503
|
-
}, $ =
|
|
514
|
+
}, $ = R(null), me = R(null), pe = async (t) => {
|
|
504
515
|
var e;
|
|
505
|
-
$.value = ot(t), await fe(), (e =
|
|
516
|
+
$.value = ot(t), await fe(), (e = me.value) == null || e.trigger(!0);
|
|
506
517
|
};
|
|
507
518
|
function Fe(t) {
|
|
508
|
-
|
|
519
|
+
pe(t.original);
|
|
509
520
|
}
|
|
510
521
|
const Me = ye(), Ge = g(() => Me.breakpoints.value.xs), {
|
|
511
522
|
t: l
|
|
512
|
-
} =
|
|
523
|
+
} = ae(), Pe = g(() => {
|
|
513
524
|
var t;
|
|
514
|
-
return ((t =
|
|
515
|
-
}), K =
|
|
525
|
+
return ((t = E.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
|
|
526
|
+
}), K = R(!1), J = R(null);
|
|
516
527
|
async function Ve() {
|
|
517
|
-
K.value = !K.value, K.value && (await fe(),
|
|
528
|
+
K.value = !K.value, K.value && (await fe(), J.value && J.value.toggleProperty(!0));
|
|
518
529
|
}
|
|
519
|
-
const de = () => y.value.multiScheduler ?
|
|
520
|
-
append: () => Pe.value ?
|
|
530
|
+
const de = () => y.value.multiScheduler ? i(Xe, null, {
|
|
531
|
+
append: () => Pe.value ? i("div", {
|
|
521
532
|
class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
|
|
522
533
|
onClick: (t) => {
|
|
523
534
|
t.stopPropagation(), Ve();
|
|
524
535
|
}
|
|
525
|
-
}, [
|
|
536
|
+
}, [i(_e.FmIcon, {
|
|
526
537
|
name: "filter_alt",
|
|
527
538
|
outline: !0,
|
|
528
539
|
color: "neutral-gray-400",
|
|
@@ -530,31 +541,31 @@ const vt = /* @__PURE__ */ X({
|
|
|
530
541
|
}, null)]) : null
|
|
531
542
|
}) : null;
|
|
532
543
|
return (t, e) => {
|
|
533
|
-
const a = M("fm-button"), n = M("fm-chip"),
|
|
534
|
-
return m(), C(T, null, [$.value ? (m(),
|
|
544
|
+
const a = M("fm-button"), n = M("fm-chip"), s = M("fm-menu-item"), w = M("fm-menu"), d = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
|
|
545
|
+
return m(), C(T, null, [$.value ? (m(), U(ut, Re({
|
|
535
546
|
ref_key: "groupManagerFormRef",
|
|
536
|
-
ref:
|
|
547
|
+
ref: me,
|
|
537
548
|
key: $.value._id
|
|
538
|
-
},
|
|
549
|
+
}, Ce($.value), {
|
|
539
550
|
action: "update",
|
|
540
551
|
title: r(l)("menu.group.dialogs.update.title"),
|
|
541
552
|
group: $.value,
|
|
542
553
|
"onUpdate:group": e[0] || (e[0] = (o) => $.value = o),
|
|
543
554
|
"onSubmit:group": e[1] || (e[1] = (o) => Ae(o))
|
|
544
|
-
}), null, 16, ["title", "group"])) :
|
|
555
|
+
}), null, 16, ["title", "group"])) : I("", !0), A.value.length === 0 ? (m(), C("div", xt, [i(Ye, {
|
|
545
556
|
subtitle: r(l)("menu.group.empty.subtitle"),
|
|
546
557
|
title: r(l)("menu.group.empty.title")
|
|
547
558
|
}, Se({
|
|
548
559
|
_: 2
|
|
549
560
|
}, [y.value.create ? {
|
|
550
561
|
name: "action",
|
|
551
|
-
fn:
|
|
552
|
-
default:
|
|
562
|
+
fn: D(() => [i(r(st), null, {
|
|
563
|
+
default: D(({
|
|
553
564
|
trigger: o
|
|
554
|
-
}) => [
|
|
565
|
+
}) => [i(a, {
|
|
555
566
|
"prepend-icon": "add",
|
|
556
567
|
label: r(l)("menu.group.actions.add"),
|
|
557
|
-
onClick:
|
|
568
|
+
onClick: Ie(o, ["stop"])
|
|
558
569
|
}, null, 8, ["label", "onClick"])]),
|
|
559
570
|
_: 1
|
|
560
571
|
})]),
|
|
@@ -563,106 +574,106 @@ const vt = /* @__PURE__ */ X({
|
|
|
563
574
|
key: 2
|
|
564
575
|
}, [Ge.value ? (m(), C(T, {
|
|
565
576
|
key: 1
|
|
566
|
-
}, [
|
|
577
|
+
}, [p("div", Mt, [i(d, {
|
|
567
578
|
autofocus: "",
|
|
568
|
-
modelValue: r(
|
|
569
|
-
"onUpdate:modelValue": e[9] || (e[9] = (o) =>
|
|
579
|
+
modelValue: r(x),
|
|
580
|
+
"onUpdate:modelValue": e[9] || (e[9] = (o) => W(x) ? x.value = o : null),
|
|
570
581
|
placeholder: r(l)("menu.group.search.placeholder")
|
|
571
|
-
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] =
|
|
582
|
+
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = p("div", {
|
|
572
583
|
class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
|
|
573
|
-
}, null, -1)),
|
|
584
|
+
}, null, -1)), p("div", Gt, [i(de), ee.value ? (m(), U(Y, {
|
|
574
585
|
key: 0,
|
|
575
586
|
modelValue: _.value,
|
|
576
587
|
"onUpdate:modelValue": e[14] || (e[14] = (o) => _.value = o)
|
|
577
588
|
}, {
|
|
578
|
-
"bottom-sheet-button":
|
|
589
|
+
"bottom-sheet-button": D(() => [i(n, {
|
|
579
590
|
label: r(l)("menu.group.type.title", {
|
|
580
|
-
type: b.value ? r(
|
|
591
|
+
type: b.value ? r(q.capitalize)(b.value) : r(l)("menu.common.labels.all")
|
|
581
592
|
}),
|
|
582
593
|
class: "text-fm-color-typo-secondary",
|
|
583
594
|
"right-icon": "keyboard_arrow_down"
|
|
584
595
|
}, null, 8, ["label"])]),
|
|
585
|
-
default:
|
|
596
|
+
default: D(() => [p("div", null, [p("div", {
|
|
586
597
|
class: "px-16 py-8",
|
|
587
598
|
onClick: e[10] || (e[10] = (o) => b.value = null)
|
|
588
|
-
}, G(r(l)("menu.group.type.all")), 1),
|
|
599
|
+
}, G(r(l)("menu.group.type.all")), 1), p("div", {
|
|
589
600
|
class: "px-16 py-8",
|
|
590
601
|
onClick: e[11] || (e[11] = (o) => b.value = "NORMAL")
|
|
591
|
-
}, G(r(l)("menu.group.type.normal")), 1),
|
|
602
|
+
}, G(r(l)("menu.group.type.normal")), 1), p("div", {
|
|
592
603
|
class: "px-16 py-8",
|
|
593
604
|
onClick: e[12] || (e[12] = (o) => b.value = "PRODUCT")
|
|
594
|
-
}, G(r(l)("menu.group.type.product")), 1),
|
|
605
|
+
}, G(r(l)("menu.group.type.product")), 1), p("div", {
|
|
595
606
|
class: "px-16 py-8",
|
|
596
607
|
onClick: e[13] || (e[13] = (o) => b.value = "DYNAMIC")
|
|
597
608
|
}, G(r(l)("menu.group.type.dynamic")), 1)])]),
|
|
598
609
|
_: 1
|
|
599
|
-
}, 8, ["modelValue"])) :
|
|
610
|
+
}, 8, ["modelValue"])) : I("", !0)]), K.value ? (m(), C("div", Pt, [i(r(ve), {
|
|
600
611
|
ref_key: "attributeFilterRef",
|
|
601
|
-
ref:
|
|
602
|
-
attributes: r(
|
|
612
|
+
ref: J,
|
|
613
|
+
attributes: r(Q),
|
|
603
614
|
modelValue: r(N),
|
|
604
|
-
"onUpdate:modelValue": e[15] || (e[15] = (o) =>
|
|
605
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
606
|
-
class:
|
|
615
|
+
"onUpdate:modelValue": e[15] || (e[15] = (o) => W(N) ? N.value = o : null)
|
|
616
|
+
}, null, 8, ["attributes", "modelValue"])])) : I("", !0), i(r(je), {
|
|
617
|
+
class: X(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
607
618
|
"model-value": z.value,
|
|
608
619
|
group: "categories",
|
|
609
620
|
handle: ".handle",
|
|
610
621
|
"item-key": "_id",
|
|
611
|
-
"onUpdate:modelValue": e[16] || (e[16] = (o) =>
|
|
622
|
+
"onUpdate:modelValue": e[16] || (e[16] = (o) => se(o))
|
|
612
623
|
}, {
|
|
613
|
-
item:
|
|
624
|
+
item: D(({
|
|
614
625
|
element: o
|
|
615
626
|
}) => [(m(), C("div", {
|
|
616
627
|
key: o._id,
|
|
617
|
-
class:
|
|
618
|
-
}, [
|
|
628
|
+
class: X(["py-12 px-16", "flex space-x-16", "items-center"])
|
|
629
|
+
}, [p("div", Vt, [p("div", Nt, [p("p", Et, G(o.name), 1), p("div", null, [ee.value ? (m(), C("p", Rt, G(r(q.capitalize)(o.type)) + " type ", 1)) : I("", !0), p("p", St, G(r(l)("menu.group.list.products_linked", {
|
|
619
630
|
count: o.itemsLinked.length
|
|
620
|
-
})), 1)])]),
|
|
631
|
+
})), 1)])]), i(ce, {
|
|
621
632
|
group: o
|
|
622
633
|
}, null, 8, ["group"])])]))]),
|
|
623
634
|
_: 1
|
|
624
|
-
}, 8, ["model-value"])], 64)) : (m(), C("div", Ot, [
|
|
635
|
+
}, 8, ["model-value"])], 64)) : (m(), C("div", Ot, [p("div", Dt, [i(de), ee.value ? (m(), U(w, {
|
|
625
636
|
key: 0
|
|
626
637
|
}, {
|
|
627
|
-
"menu-button":
|
|
638
|
+
"menu-button": D(() => [i(n, {
|
|
628
639
|
label: r(l)("menu.group.type.title", {
|
|
629
|
-
type: b.value ? r(
|
|
640
|
+
type: b.value ? r(q.capitalize)(b.value) : r(l)("menu.common.labels.all")
|
|
630
641
|
}),
|
|
631
642
|
class: "text-fm-color-typo-secondary",
|
|
632
643
|
"right-icon": "keyboard_arrow_down"
|
|
633
644
|
}, null, 8, ["label"])]),
|
|
634
|
-
default:
|
|
645
|
+
default: D(() => [p("div", null, [i(s, {
|
|
635
646
|
class: "px-16 py-8",
|
|
636
647
|
label: r(l)("menu.group.type.all"),
|
|
637
648
|
onClick: e[2] || (e[2] = (o) => b.value = null)
|
|
638
|
-
}, null, 8, ["label"]), s
|
|
649
|
+
}, null, 8, ["label"]), i(s, {
|
|
639
650
|
class: "px-16 py-8",
|
|
640
651
|
label: r(l)("menu.group.type.normal"),
|
|
641
652
|
onClick: e[3] || (e[3] = (o) => b.value = "NORMAL")
|
|
642
|
-
}, null, 8, ["label"]), s
|
|
653
|
+
}, null, 8, ["label"]), i(s, {
|
|
643
654
|
class: "px-16 py-8",
|
|
644
655
|
label: r(l)("menu.group.type.product"),
|
|
645
656
|
onClick: e[4] || (e[4] = (o) => b.value = "PRODUCT")
|
|
646
|
-
}, null, 8, ["label"]), s
|
|
657
|
+
}, null, 8, ["label"]), i(s, {
|
|
647
658
|
class: "px-16 py-8",
|
|
648
659
|
label: r(l)("menu.group.type.dynamic"),
|
|
649
660
|
onClick: e[5] || (e[5] = (o) => b.value = "DYNAMIC")
|
|
650
661
|
}, null, 8, ["label"])])]),
|
|
651
662
|
_: 1
|
|
652
|
-
})) :
|
|
663
|
+
})) : I("", !0), p("div", At, [i(d, {
|
|
653
664
|
autofocus: "",
|
|
654
|
-
modelValue: r(
|
|
655
|
-
"onUpdate:modelValue": e[6] || (e[6] = (o) =>
|
|
665
|
+
modelValue: r(x),
|
|
666
|
+
"onUpdate:modelValue": e[6] || (e[6] = (o) => W(x) ? x.value = o : null),
|
|
656
667
|
placeholder: r(l)("menu.group.search.placeholder")
|
|
657
|
-
}, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), C("div",
|
|
668
|
+
}, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), C("div", Ft, [i(r(ve), {
|
|
658
669
|
ref_key: "attributeFilterRef",
|
|
659
|
-
ref:
|
|
660
|
-
attributes: r(
|
|
670
|
+
ref: J,
|
|
671
|
+
attributes: r(Q),
|
|
661
672
|
modelValue: r(N),
|
|
662
|
-
"onUpdate:modelValue": e[7] || (e[7] = (o) =>
|
|
663
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
664
|
-
default:
|
|
665
|
-
"column-defs":
|
|
673
|
+
"onUpdate:modelValue": e[7] || (e[7] = (o) => W(N) ? N.value = o : null)
|
|
674
|
+
}, null, 8, ["attributes", "modelValue"])])) : I("", !0), i(Ze, null, {
|
|
675
|
+
default: D(() => [i(P, {
|
|
676
|
+
"column-defs": Oe.value,
|
|
666
677
|
"column-visibility": De.value,
|
|
667
678
|
loading: r(k).checkMenuIsLoading(),
|
|
668
679
|
"page-size": z.value.length,
|
|
@@ -673,7 +684,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
673
684
|
"hide-footer": "",
|
|
674
685
|
"pin-header-row": "",
|
|
675
686
|
onRowClick: Fe,
|
|
676
|
-
onDndChanged: e[8] || (e[8] = (o) =>
|
|
687
|
+
onDndChanged: e[8] || (e[8] = (o) => se(o))
|
|
677
688
|
}, null, 8, ["column-defs", "column-visibility", "loading", "page-size", "row-data"])]),
|
|
678
689
|
_: 1
|
|
679
690
|
})]))], 64))], 64);
|
|
@@ -681,5 +692,5 @@ const vt = /* @__PURE__ */ X({
|
|
|
681
692
|
}
|
|
682
693
|
});
|
|
683
694
|
export {
|
|
684
|
-
|
|
695
|
+
to as _
|
|
685
696
|
};
|