@feedmepos/mf-menu 0.32.17 → 0.32.18-dev.1
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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as I, openBlock as m, withCtx as x, createElementBlock as C, Fragment as T, renderList as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
|
|
9
|
-
import { _ as et, a as tt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
-
import { c as ot } from "./object-DVUNCr7w.js";
|
|
11
|
-
import { u as nt } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js";
|
|
13
|
-
import { c as at } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { M as ge, x as rt, y as ut, A as st, e as it, i as ct, r as mt } from "./item-K01xd1Z0.js";
|
|
15
|
-
import { u as dt } from "./search-BAPEUu1R.js";
|
|
16
|
-
import { C as pt } from "./catalog-BO2nXwe5.js";
|
|
17
|
-
import { c as ft } from "./menuV2-DKE-xanq.js";
|
|
18
|
-
const vt = /* @__PURE__ */ X({
|
|
1
|
+
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as I, openBlock as m, withCtx as x, createElementBlock as C, Fragment as T, renderList as ne, createElementVNode as d, normalizeClass as J, toDisplayString as G, createVNode as s, ref as R, renderSlot as Ne, unref as r, createCommentVNode as U, watch as Ee, h as pe, mergeProps as Re, createSlots as Se, withModifiers as Ue, isRef as W, nextTick as ve } from "vue";
|
|
2
|
+
import { n as H, F as Ie, u as oe, aA as Te, b as $e, d as Ye, a as Le, aB as fe, f as ze, e as f, l as Be, a9 as Ke, aC as je, aD as He, _ as qe, K as Qe, $ as ge, U as We, i as Je, as as Xe, aE as Ze, aF as et, aG as tt, aH as nt, m as ot, C as lt } from "./App-Cfl37TTw.js";
|
|
3
|
+
import { useI18n as le, useCoreStore as at, useCustomAttributes as rt } from "@feedmepos/mf-common";
|
|
4
|
+
import { useBreakpoints as ye, components as _e, useSnackbar as ut, useDialog as st, FmButtonVariant as it } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as ct, a as mt } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js";
|
|
6
|
+
import { _ as dt } from "./app-Z0KWH9-d.js";
|
|
7
|
+
import { _ as pt, a as vt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
8
|
+
const ft = /* @__PURE__ */ X({
|
|
19
9
|
__name: "ResponsiveContextMenu",
|
|
20
10
|
props: {
|
|
21
11
|
items: {}
|
|
22
12
|
},
|
|
23
13
|
setup(L) {
|
|
24
14
|
const S = ye(), u = g(() => S.breakpoints.value.xs);
|
|
25
|
-
return (
|
|
26
|
-
const h = M("FmButton"),
|
|
27
|
-
return u.value ? (m(), I(
|
|
15
|
+
return (E, V) => {
|
|
16
|
+
const h = M("FmButton"), v = M("FmMenuItem"), y = M("FmMenu");
|
|
17
|
+
return u.value ? (m(), I(pt, { key: 0 }, {
|
|
28
18
|
default: x(() => [
|
|
29
|
-
(m(!0), C(T, null,
|
|
19
|
+
(m(!0), C(T, null, ne(E.items, ({ icon: k, label: D, disabled: w, itemClass: F, onClick: _ }) => (m(), I(vt, {
|
|
30
20
|
key: D,
|
|
31
21
|
icon: k,
|
|
32
22
|
label: D,
|
|
33
23
|
disabled: w,
|
|
34
|
-
itemClass:
|
|
24
|
+
itemClass: F,
|
|
35
25
|
onClick: () => {
|
|
36
26
|
!w && (_ == null || _());
|
|
37
27
|
}
|
|
@@ -53,7 +43,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
53
43
|
})
|
|
54
44
|
]),
|
|
55
45
|
default: x(() => [
|
|
56
|
-
(m(!0), C(T, null,
|
|
46
|
+
(m(!0), C(T, null, ne(E.items, ({ icon: k, label: D, disabled: w, itemClass: F, onClick: _ }) => (m(), I(v, {
|
|
57
47
|
key: D,
|
|
58
48
|
disabled: w,
|
|
59
49
|
onClick: () => {
|
|
@@ -63,7 +53,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
63
53
|
}, {
|
|
64
54
|
label: x(() => [
|
|
65
55
|
d("span", {
|
|
66
|
-
class:
|
|
56
|
+
class: J(w ? "text-fm-color-typo-disabled" : F)
|
|
67
57
|
}, G(D), 3)
|
|
68
58
|
]),
|
|
69
59
|
_: 2
|
|
@@ -83,18 +73,18 @@ const vt = /* @__PURE__ */ X({
|
|
|
83
73
|
},
|
|
84
74
|
emits: ["apply:product"],
|
|
85
75
|
setup(L, { emit: S }) {
|
|
86
|
-
const u = L,
|
|
87
|
-
() => !H.isEqual(
|
|
76
|
+
const u = L, E = S, { t: V } = le(), h = u.initialValue.map((F) => ({ _id: F })), v = R(H.clone(h)), y = Ie(
|
|
77
|
+
() => !H.isEqual(v.value, h),
|
|
88
78
|
() => {
|
|
89
79
|
k.value = !1;
|
|
90
80
|
}
|
|
91
|
-
), k =
|
|
92
|
-
|
|
93
|
-
}, w =
|
|
94
|
-
return (
|
|
81
|
+
), k = R(!1), D = (F) => {
|
|
82
|
+
$e.isBoolean(F) ? k.value = F : k.value = !k.value, k.value && (v.value = u.initialValue.map((_) => ({ _id: _ })));
|
|
83
|
+
}, w = oe();
|
|
84
|
+
return (F, _) => {
|
|
95
85
|
const b = M("fm-button"), q = M("fm-side-sheet");
|
|
96
86
|
return m(), C(T, null, [
|
|
97
|
-
Ne(
|
|
87
|
+
Ne(F.$slots, "default", { trigger: D }),
|
|
98
88
|
s(q, {
|
|
99
89
|
id: "group-form",
|
|
100
90
|
modelValue: k.value,
|
|
@@ -102,7 +92,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
102
92
|
"is-container": r(_e).FmForm,
|
|
103
93
|
"is-container-props": {
|
|
104
94
|
onValidationSuccess: () => {
|
|
105
|
-
|
|
95
|
+
E("apply:product", v.value), D(!1);
|
|
106
96
|
},
|
|
107
97
|
blameFormChildOnValidationFailed: !0
|
|
108
98
|
},
|
|
@@ -110,7 +100,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
110
100
|
"onOn:clickedAway": r(y)
|
|
111
101
|
}, {
|
|
112
102
|
"side-sheet-header": x(() => [
|
|
113
|
-
d("p", gt, G(
|
|
103
|
+
d("p", gt, G(F.title), 1)
|
|
114
104
|
]),
|
|
115
105
|
"side-sheet-footer": x(() => [
|
|
116
106
|
d("div", yt, [
|
|
@@ -129,11 +119,11 @@ const vt = /* @__PURE__ */ X({
|
|
|
129
119
|
])
|
|
130
120
|
]),
|
|
131
121
|
default: x(() => [
|
|
132
|
-
s(
|
|
133
|
-
overrides:
|
|
134
|
-
"onUpdate:overrides": _[0] || (_[0] = (N) =>
|
|
122
|
+
s(Te, {
|
|
123
|
+
overrides: v.value,
|
|
124
|
+
"onUpdate:overrides": _[0] || (_[0] = (N) => v.value = N),
|
|
135
125
|
"categorized-items": r(w).categorizedItems,
|
|
136
|
-
editable:
|
|
126
|
+
editable: F.editable,
|
|
137
127
|
"select-variant": !1,
|
|
138
128
|
"show-variant": !1,
|
|
139
129
|
"link-button-label": r(V)("menu.group.actions.apply_product"),
|
|
@@ -154,16 +144,16 @@ const vt = /* @__PURE__ */ X({
|
|
|
154
144
|
group: {}
|
|
155
145
|
},
|
|
156
146
|
setup(L) {
|
|
157
|
-
const S = L, { t: u } = le(),
|
|
158
|
-
const
|
|
159
|
-
return (
|
|
147
|
+
const S = L, { t: u } = le(), E = oe(), V = g(() => S.group.itemsLinked.map((h) => {
|
|
148
|
+
const v = E.state.menu.modules.item.find((y) => y._id === h);
|
|
149
|
+
return (v == null ? void 0 : v.name) || h;
|
|
160
150
|
}).filter(Boolean));
|
|
161
|
-
return (h,
|
|
151
|
+
return (h, v) => (m(), C("div", null, [
|
|
162
152
|
d("div", null, G(r(u)("menu.group.dialogs.delete.message", { name: h.group.name })), 1),
|
|
163
153
|
V.value.length > 0 ? (m(), C("div", bt, [
|
|
164
154
|
d("div", ht, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
|
|
165
155
|
d("ul", kt, [
|
|
166
|
-
(m(!0), C(T, null,
|
|
156
|
+
(m(!0), C(T, null, ne(V.value, (y) => (m(), C("li", {
|
|
167
157
|
key: y,
|
|
168
158
|
class: "text-sm"
|
|
169
159
|
}, G(y), 1))), 128))
|
|
@@ -176,14 +166,14 @@ const vt = /* @__PURE__ */ X({
|
|
|
176
166
|
class: "xs:pt-24"
|
|
177
167
|
}, Ot = {
|
|
178
168
|
key: 0,
|
|
179
|
-
class: /* @__PURE__ */
|
|
169
|
+
class: /* @__PURE__ */ J(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden", "pt-16"])
|
|
180
170
|
}, xt = {
|
|
181
171
|
class: "flex justify-between items-center space-x-8"
|
|
182
172
|
}, Dt = {
|
|
183
173
|
class: "w-[320px]"
|
|
184
|
-
}, At = {
|
|
185
|
-
key: 0
|
|
186
174
|
}, Ft = {
|
|
175
|
+
key: 0
|
|
176
|
+
}, At = {
|
|
187
177
|
class: "px-16 py-8"
|
|
188
178
|
}, Mt = {
|
|
189
179
|
class: "py-8 px-16"
|
|
@@ -196,52 +186,52 @@ const vt = /* @__PURE__ */ X({
|
|
|
196
186
|
class: "flex-1 space-y-4"
|
|
197
187
|
}, Nt = {
|
|
198
188
|
class: "fm-typo-en-body-lg-600"
|
|
199
|
-
},
|
|
189
|
+
}, Et = {
|
|
200
190
|
key: 0,
|
|
201
191
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
202
|
-
},
|
|
192
|
+
}, Rt = {
|
|
203
193
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
204
|
-
},
|
|
194
|
+
}, zt = /* @__PURE__ */ X({
|
|
205
195
|
__name: "Group",
|
|
206
196
|
emits: ["update:count"],
|
|
207
197
|
setup(L, {
|
|
208
198
|
emit: S
|
|
209
199
|
}) {
|
|
210
|
-
const u =
|
|
200
|
+
const u = oe(), E = at(), V = ut(), h = Ye(Le(V)), v = st(), y = g(() => u.rules.group), k = g(() => new fe(u, h.updateMenu, v)), D = g(() => k.value.mapGroups(u.groups, !1)), {
|
|
211
201
|
searchKey: w,
|
|
212
|
-
filter:
|
|
213
|
-
} =
|
|
202
|
+
filter: F
|
|
203
|
+
} = ze(), _ = R(!1), b = R(null), {
|
|
214
204
|
attributes: q,
|
|
215
205
|
filterRule: N,
|
|
216
206
|
mongoQuery: ae
|
|
217
|
-
} =
|
|
207
|
+
} = rt({
|
|
218
208
|
valueSource: D,
|
|
219
209
|
entity: "group"
|
|
220
210
|
}), z = g(() => {
|
|
221
|
-
const t = (a) =>
|
|
211
|
+
const t = (a) => F([a.name, ...Object.values(a.items).flatMap((l) => `${l.code} ${l.name} ${Je.Dinero.fromFdoDinero(l.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !ae.value ? !0 : Xe(a.customAttributes ?? {}, ae.value);
|
|
222
212
|
return D.value.filter((a) => t(a) && e(a)).filter((a) => !b.value || a.type === b.value);
|
|
223
213
|
}), be = S;
|
|
224
|
-
|
|
214
|
+
Ee(() => z.value.length, () => {
|
|
225
215
|
be("update:count", z.value.length);
|
|
226
216
|
}, {
|
|
227
217
|
immediate: !0
|
|
228
218
|
});
|
|
229
219
|
const c = g(() => !!u.state.currentCatalogId || !!u.state.currentSchedulerId);
|
|
230
220
|
function re(t) {
|
|
231
|
-
var Y,
|
|
232
|
-
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, l = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((
|
|
221
|
+
var Y, n;
|
|
222
|
+
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, l = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((n = u.currentCatalog) == null ? void 0 : n.usePriceTiers), i = u.rules.item.bindToVariant, A = u.rules.group.type, p = u.version === f.F_MENU_VERSION.enum.v3, P = u.rules.item.orderFromActiveOnly;
|
|
233
223
|
return {
|
|
234
224
|
link: (O) => !c.value && (!O || i),
|
|
235
225
|
name: (O) => !c.value && !O,
|
|
236
226
|
isDefault: (O) => !c.value,
|
|
237
|
-
type:
|
|
238
|
-
price: !p || t.type !==
|
|
227
|
+
type: A && !t._id && !c.value,
|
|
228
|
+
price: !p || t.type !== f.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
239
229
|
priceEdit: !(l && l.length > 0 && !p && a),
|
|
240
230
|
priceTier: !p && a && e,
|
|
241
|
-
inventory: a ? p ? !c.value && t.type ===
|
|
242
|
-
orderFrom: (O) => a ? p ? t.type ===
|
|
231
|
+
inventory: a ? p ? !c.value && t.type === f.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
|
|
232
|
+
orderFrom: (O) => a ? p ? t.type === f.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !O : c.value : !1,
|
|
243
233
|
orderFromActiveOnly: P,
|
|
244
|
-
showOrderFrom: a ? p ? c.value ? !0 : t.type ===
|
|
234
|
+
showOrderFrom: a ? p ? c.value ? !0 : t.type === f.F_ADDON_GROUP_TYPE.enum.PRODUCT : !0 : !1,
|
|
245
235
|
bindToVariant: i,
|
|
246
236
|
isOverride: c.value,
|
|
247
237
|
isItemGroup: !1,
|
|
@@ -249,20 +239,20 @@ const vt = /* @__PURE__ */ X({
|
|
|
249
239
|
};
|
|
250
240
|
}
|
|
251
241
|
const he = g(() => {
|
|
252
|
-
const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version ===
|
|
242
|
+
const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version === f.F_MENU_VERSION.enum.v3, l = u.rules.item.orderFromActiveOnly, i = u.rules.item.bindToVariant;
|
|
253
243
|
return function(p) {
|
|
254
244
|
return {
|
|
255
245
|
link: (P) => !c.value && (!P || i),
|
|
256
246
|
name: (P) => !c.value && !P,
|
|
257
247
|
isDefault: (P) => !c.value,
|
|
258
248
|
type: e && !p._id && !c.value,
|
|
259
|
-
price: p.type !==
|
|
249
|
+
price: p.type !== f.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
260
250
|
priceEdit: !0,
|
|
261
251
|
priceTier: u.isV4,
|
|
262
|
-
inventory: t ? a ? !c.value && p.type ===
|
|
263
|
-
orderFrom: (P) => t ? a ? p.type ===
|
|
252
|
+
inventory: t ? a ? !c.value && p.type === f.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
|
|
253
|
+
orderFrom: (P) => t ? a ? p.type === f.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !P : c.value : !1,
|
|
264
254
|
orderFromActiveOnly: l,
|
|
265
|
-
showOrderFrom: t ? a ? c.value ? !0 : p.type ===
|
|
255
|
+
showOrderFrom: t ? a ? c.value ? !0 : p.type === f.F_ADDON_GROUP_TYPE.enum.PRODUCT : c.value : !1,
|
|
266
256
|
bindToVariant: i,
|
|
267
257
|
isOverride: c.value,
|
|
268
258
|
isItemGroup: !1,
|
|
@@ -270,8 +260,8 @@ const vt = /* @__PURE__ */ X({
|
|
|
270
260
|
};
|
|
271
261
|
};
|
|
272
262
|
}), ke = g(() => ({
|
|
273
|
-
|
|
274
|
-
type: u.version ===
|
|
263
|
+
...Be.generator.initMenuV4Group(),
|
|
264
|
+
type: u.version === f.F_MENU_VERSION.enum.v4 ? f.F_ADDON_GROUP_TYPE.enum.PRODUCT : f.F_ADDON_GROUP_TYPE.enum.NORMAL,
|
|
275
265
|
items: {},
|
|
276
266
|
position: u.groups.length - 1,
|
|
277
267
|
itemsLinked: []
|
|
@@ -280,43 +270,43 @@ const vt = /* @__PURE__ */ X({
|
|
|
280
270
|
k.value.sortGroups(t);
|
|
281
271
|
}
|
|
282
272
|
function Ce(t) {
|
|
283
|
-
|
|
284
|
-
title:
|
|
285
|
-
message:
|
|
273
|
+
v.open({
|
|
274
|
+
title: o("menu.group.actions.duplicate.title"),
|
|
275
|
+
message: o("menu.group.actions.duplicate.message", {
|
|
286
276
|
name: t.name
|
|
287
277
|
}),
|
|
288
278
|
primaryActions: {
|
|
289
|
-
text:
|
|
279
|
+
text: o("menu.common.actions.yes"),
|
|
290
280
|
close: !0
|
|
291
281
|
},
|
|
292
282
|
secondaryActions: {
|
|
293
|
-
text:
|
|
283
|
+
text: o("menu.common.actions.cancel"),
|
|
294
284
|
close: !0
|
|
295
285
|
}
|
|
296
286
|
}).onPrimary(() => k.value.duplicateGroup(t));
|
|
297
287
|
}
|
|
298
|
-
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler),
|
|
288
|
+
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), K = g(() => new Ke(ee.value, u, h.updateMenu, v)), te = g(() => new je(B.value, u, h.updateMenu, v)), we = (t) => {
|
|
299
289
|
let e = t;
|
|
300
290
|
function a(l) {
|
|
301
|
-
const
|
|
291
|
+
const A = u.state.menu.modules.group.find((n) => n._id === l._id), p = (l.items ?? []).reduce((n, O) => (n[O._id] = [...n[O._id] || [], O.combinationKey || ""], n), {}), Y = (A.items ?? []).filter((n) => {
|
|
302
292
|
var O;
|
|
303
|
-
return !((O = p[
|
|
304
|
-
}).map((
|
|
305
|
-
_id:
|
|
306
|
-
combinationKey:
|
|
307
|
-
selection:
|
|
308
|
-
})).filter((
|
|
293
|
+
return !((O = p[n._id]) != null && O.includes(n.combinationKey || ""));
|
|
294
|
+
}).map((n) => ({
|
|
295
|
+
_id: n._id,
|
|
296
|
+
combinationKey: n.combinationKey,
|
|
297
|
+
selection: n.selection
|
|
298
|
+
})).filter((n) => !!u.mergedMenu.modules.item.find((O) => O._id === n._id));
|
|
309
299
|
return {
|
|
310
|
-
...
|
|
311
|
-
...Object.fromEntries(Object.entries(l).filter(([,
|
|
300
|
+
...A,
|
|
301
|
+
...Object.fromEntries(Object.entries(l).filter(([, n]) => !!n)),
|
|
312
302
|
items: [...l.items ?? [], ...Y]
|
|
313
303
|
};
|
|
314
304
|
}
|
|
315
305
|
if (c.value) {
|
|
316
306
|
let l;
|
|
317
|
-
ee.value ? B.value ? l =
|
|
307
|
+
ee.value ? B.value ? l = K.value.getCatalogSchedulerGroup(t._id, B.value._id) : l = K.value.getCatalogGroup(t._id) : l = te.value.getSchedulerGroup(t._id);
|
|
318
308
|
const i = a(l);
|
|
319
|
-
e = new
|
|
309
|
+
e = new fe(u, h.updateMenu, v).mapGroups([i], !0)[0];
|
|
320
310
|
}
|
|
321
311
|
return {
|
|
322
312
|
group: e,
|
|
@@ -325,19 +315,19 @@ const vt = /* @__PURE__ */ X({
|
|
|
325
315
|
};
|
|
326
316
|
};
|
|
327
317
|
function Oe(t) {
|
|
328
|
-
|
|
329
|
-
title:
|
|
318
|
+
v.open({
|
|
319
|
+
title: o("menu.group.dialogs.delete.title"),
|
|
330
320
|
contentComponent: Ct,
|
|
331
321
|
contentComponentProps: {
|
|
332
322
|
group: t
|
|
333
323
|
},
|
|
334
324
|
primaryActions: {
|
|
335
|
-
text:
|
|
325
|
+
text: o("menu.common.actions.delete"),
|
|
336
326
|
close: !0,
|
|
337
|
-
variant:
|
|
327
|
+
variant: it.Destructive
|
|
338
328
|
},
|
|
339
329
|
secondaryActions: {
|
|
340
|
-
text:
|
|
330
|
+
text: o("menu.common.actions.cancel"),
|
|
341
331
|
close: !0
|
|
342
332
|
}
|
|
343
333
|
}).onPrimary(async () => {
|
|
@@ -348,18 +338,18 @@ const vt = /* @__PURE__ */ X({
|
|
|
348
338
|
return pe(_t, {
|
|
349
339
|
key: t._id,
|
|
350
340
|
initialValue: t.itemsLinked,
|
|
351
|
-
group:
|
|
341
|
+
group: Ze(t),
|
|
352
342
|
editable: y.value.applyProduct,
|
|
353
343
|
"onApply:product": async (a) => {
|
|
354
344
|
var l;
|
|
355
345
|
for (const i of a)
|
|
356
|
-
if (
|
|
357
|
-
const
|
|
346
|
+
if (et(u.state.menu, t._id, i._id)) {
|
|
347
|
+
const A = (l = u.state.menu.modules.item.find((p) => p._id === i._id)) == null ? void 0 : l.name;
|
|
358
348
|
V.open({
|
|
359
349
|
type: "error",
|
|
360
|
-
message:
|
|
350
|
+
message: o("menu.product.form.group.circularError", {
|
|
361
351
|
groupName: t.name,
|
|
362
|
-
productName:
|
|
352
|
+
productName: A
|
|
363
353
|
})
|
|
364
354
|
});
|
|
365
355
|
return;
|
|
@@ -376,57 +366,57 @@ const vt = /* @__PURE__ */ X({
|
|
|
376
366
|
trigger: l
|
|
377
367
|
}) => {
|
|
378
368
|
const i = [{
|
|
379
|
-
label:
|
|
369
|
+
label: o("menu.common.actions.edit"),
|
|
380
370
|
onClick: () => me(e)
|
|
381
371
|
}, {
|
|
382
|
-
label:
|
|
372
|
+
label: o("menu.group.actions.apply_product"),
|
|
383
373
|
disable: !y.value.applyProduct,
|
|
384
374
|
onClick: l
|
|
385
375
|
}, {
|
|
386
|
-
label:
|
|
376
|
+
label: o("menu.group.actions.duplicate_action"),
|
|
387
377
|
disabled: !y.value.create,
|
|
388
378
|
onClick: () => Ce(e)
|
|
389
379
|
}, {
|
|
390
|
-
label:
|
|
380
|
+
label: o("menu.common.actions.delete"),
|
|
391
381
|
itemClass: "text-fm-color-typo-error",
|
|
392
382
|
disabled: !y.value.delete,
|
|
393
383
|
onClick: () => Oe(e)
|
|
394
384
|
}];
|
|
395
|
-
return s(
|
|
385
|
+
return s(ft, {
|
|
396
386
|
class: t.className,
|
|
397
387
|
items: i
|
|
398
388
|
}, null);
|
|
399
389
|
});
|
|
400
390
|
}, xe = g(() => [{
|
|
401
391
|
accessorKey: "name",
|
|
402
|
-
header: () =>
|
|
392
|
+
header: () => o("menu.group.list.columns.name"),
|
|
403
393
|
enableSorting: !1
|
|
404
394
|
}, {
|
|
405
395
|
accessorKey: "items",
|
|
406
|
-
header: () =>
|
|
396
|
+
header: () => o("menu.group.list.columns.products"),
|
|
407
397
|
enableSorting: !1,
|
|
408
398
|
cell: (t) => {
|
|
409
399
|
const e = t.getValue(), a = Object.values(e).map((l) => {
|
|
410
|
-
var
|
|
400
|
+
var A;
|
|
411
401
|
const i = [(l == null ? void 0 : l.code) || "", l.name ?? l.fallbackName].join(" ").trim();
|
|
412
|
-
return (l.items || []).length > 1 ? `${i} (${
|
|
413
|
-
count: (
|
|
402
|
+
return (l.items || []).length > 1 ? `${i} (${o("menu.group.list.variants", {
|
|
403
|
+
count: (A = l.items) == null ? void 0 : A.length
|
|
414
404
|
})})` : i;
|
|
415
405
|
});
|
|
416
|
-
return a.length > 5 ? `${a.slice(0, 5).join(", ")} ${
|
|
406
|
+
return a.length > 5 ? `${a.slice(0, 5).join(", ")} ${o("menu.group.list.more_items", {
|
|
417
407
|
count: a.length - 5
|
|
418
408
|
})}` : a.join(", ");
|
|
419
409
|
}
|
|
420
410
|
}, {
|
|
421
411
|
accessorKey: "type",
|
|
422
|
-
header: () =>
|
|
412
|
+
header: () => o("menu.group.list.columns.type"),
|
|
423
413
|
enableSorting: !1,
|
|
424
414
|
cell: (t) => {
|
|
425
415
|
const e = t.row.original;
|
|
426
416
|
return {
|
|
427
|
-
[
|
|
428
|
-
[
|
|
429
|
-
[
|
|
417
|
+
[f.F_ADDON_GROUP_TYPE.enum.NORMAL]: o("menu.group.list.types.normal"),
|
|
418
|
+
[f.F_ADDON_GROUP_TYPE.enum.PRODUCT]: o("menu.group.list.types.product"),
|
|
419
|
+
[f.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: o("menu.group.list.types.dynamic")
|
|
430
420
|
}[e.type] || "-";
|
|
431
421
|
},
|
|
432
422
|
meta: {
|
|
@@ -435,12 +425,12 @@ const vt = /* @__PURE__ */ X({
|
|
|
435
425
|
}, {
|
|
436
426
|
id: "tagging",
|
|
437
427
|
accessorKey: "tagging",
|
|
438
|
-
header: () =>
|
|
428
|
+
header: () => o("menu.product.table.columns.tagging"),
|
|
439
429
|
enableSorting: !1,
|
|
440
430
|
size: 140,
|
|
441
431
|
cell: (t) => {
|
|
442
432
|
const e = t.row.original;
|
|
443
|
-
return pe(
|
|
433
|
+
return pe(ct, {
|
|
444
434
|
// FIXME:FdoCustomAttribute under "@feedmepos/custom-attributes" is not compatible
|
|
445
435
|
// with FdoCustomAttribute from "@feedmepos/core", ! mark should be removed when fixed
|
|
446
436
|
customAttributes: e.customAttributes
|
|
@@ -448,10 +438,10 @@ const vt = /* @__PURE__ */ X({
|
|
|
448
438
|
}
|
|
449
439
|
}, {
|
|
450
440
|
accessorKey: "itemsLinked",
|
|
451
|
-
header: () =>
|
|
441
|
+
header: () => o("menu.group.list.columns.applied_products"),
|
|
452
442
|
enableSorting: !1,
|
|
453
443
|
cell: (t) => {
|
|
454
|
-
const e = t.getValue(), a =
|
|
444
|
+
const e = t.getValue(), a = o("menu.group.list.items_linked", {
|
|
455
445
|
count: e.length
|
|
456
446
|
});
|
|
457
447
|
return se(t.row.original, ({
|
|
@@ -481,42 +471,42 @@ const vt = /* @__PURE__ */ X({
|
|
|
481
471
|
return {
|
|
482
472
|
itemsLinked: y.value.showAppliedProduct,
|
|
483
473
|
type: y.value.type,
|
|
484
|
-
tagging: ((t =
|
|
474
|
+
tagging: ((t = E.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
|
|
485
475
|
};
|
|
486
|
-
}),
|
|
487
|
-
const e =
|
|
476
|
+
}), Fe = async (t) => {
|
|
477
|
+
const e = tt(t), a = e.group, l = nt(a, re(t));
|
|
488
478
|
if (c.value)
|
|
489
|
-
ee.value ? (B.value ?
|
|
479
|
+
ee.value ? (B.value ? K.value.overrideCatalogSchedulerGroups([l], B.value._id) : K.value.overrideCatalogGroups([l]), await K.value.update()) : (te.value.overrideSchedulerGroups([l]), await te.value.update());
|
|
490
480
|
else {
|
|
491
481
|
const i = {
|
|
492
|
-
module:
|
|
493
|
-
operation:
|
|
482
|
+
module: f.F_MENU_MODULE_V4_KEY.enum.group,
|
|
483
|
+
operation: ot.F_OPERATION_TYPE.update,
|
|
494
484
|
data: l,
|
|
495
485
|
link: [{
|
|
496
|
-
module:
|
|
486
|
+
module: f.F_MENU_MODULE_V4_KEY.enum.item,
|
|
497
487
|
id: "",
|
|
498
488
|
data: e.linkItems
|
|
499
489
|
}]
|
|
500
490
|
};
|
|
501
491
|
await h.updateMenu(i, l.name);
|
|
502
492
|
}
|
|
503
|
-
}, $ =
|
|
493
|
+
}, $ = R(null), ce = R(null), me = async (t) => {
|
|
504
494
|
var e;
|
|
505
|
-
$.value =
|
|
495
|
+
$.value = lt(t), await ve(), (e = ce.value) == null || e.trigger(!0);
|
|
506
496
|
};
|
|
507
|
-
function
|
|
497
|
+
function Ae(t) {
|
|
508
498
|
me(t.original);
|
|
509
499
|
}
|
|
510
500
|
const Me = ye(), Ge = g(() => Me.breakpoints.value.xs), {
|
|
511
|
-
t:
|
|
501
|
+
t: o
|
|
512
502
|
} = le(), Pe = g(() => {
|
|
513
503
|
var t;
|
|
514
|
-
return ((t =
|
|
515
|
-
}),
|
|
504
|
+
return ((t = E.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
|
|
505
|
+
}), j = R(!1), Q = R(null);
|
|
516
506
|
async function Ve() {
|
|
517
|
-
|
|
507
|
+
j.value = !j.value, j.value && (await ve(), Q.value && Q.value.toggleProperty(!0));
|
|
518
508
|
}
|
|
519
|
-
const de = () => y.value.multiScheduler ? s(
|
|
509
|
+
const de = () => y.value.multiScheduler ? s(mt, null, {
|
|
520
510
|
append: () => Pe.value ? s("div", {
|
|
521
511
|
class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
|
|
522
512
|
onClick: (t) => {
|
|
@@ -530,31 +520,31 @@ const vt = /* @__PURE__ */ X({
|
|
|
530
520
|
}, null)]) : null
|
|
531
521
|
}) : null;
|
|
532
522
|
return (t, e) => {
|
|
533
|
-
const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"),
|
|
534
|
-
return m(), C(T, null, [$.value ? (m(), I(
|
|
523
|
+
const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"), A = M("fm-menu"), p = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
|
|
524
|
+
return m(), C(T, null, [$.value ? (m(), I(He, Re({
|
|
535
525
|
ref_key: "groupManagerFormRef",
|
|
536
526
|
ref: ce,
|
|
537
527
|
key: $.value._id
|
|
538
528
|
}, we($.value), {
|
|
539
529
|
action: "update",
|
|
540
|
-
title: r(
|
|
530
|
+
title: r(o)("menu.group.dialogs.update.title"),
|
|
541
531
|
group: $.value,
|
|
542
|
-
"onUpdate:group": e[0] || (e[0] = (
|
|
543
|
-
"onSubmit:group": e[1] || (e[1] = (
|
|
544
|
-
}), null, 16, ["title", "group"])) : U("", !0), D.value.length === 0 ? (m(), C("div", wt, [s(
|
|
545
|
-
subtitle: r(
|
|
546
|
-
title: r(
|
|
532
|
+
"onUpdate:group": e[0] || (e[0] = (n) => $.value = n),
|
|
533
|
+
"onSubmit:group": e[1] || (e[1] = (n) => Fe(n))
|
|
534
|
+
}), null, 16, ["title", "group"])) : U("", !0), D.value.length === 0 ? (m(), C("div", wt, [s(qe, {
|
|
535
|
+
subtitle: r(o)("menu.group.empty.subtitle"),
|
|
536
|
+
title: r(o)("menu.group.empty.title")
|
|
547
537
|
}, Se({
|
|
548
538
|
_: 2
|
|
549
539
|
}, [y.value.create ? {
|
|
550
540
|
name: "action",
|
|
551
|
-
fn: x(() => [s(r(
|
|
541
|
+
fn: x(() => [s(r(Qe), null, {
|
|
552
542
|
default: x(({
|
|
553
|
-
trigger:
|
|
543
|
+
trigger: n
|
|
554
544
|
}) => [s(a, {
|
|
555
545
|
"prepend-icon": "add",
|
|
556
|
-
label: r(
|
|
557
|
-
onClick: Ue(
|
|
546
|
+
label: r(o)("menu.group.actions.add"),
|
|
547
|
+
onClick: Ue(n, ["stop"])
|
|
558
548
|
}, null, 8, ["label", "onClick"])]),
|
|
559
549
|
_: 1
|
|
560
550
|
})]),
|
|
@@ -563,104 +553,104 @@ const vt = /* @__PURE__ */ X({
|
|
|
563
553
|
key: 2
|
|
564
554
|
}, [Ge.value ? (m(), C(T, {
|
|
565
555
|
key: 1
|
|
566
|
-
}, [d("div",
|
|
556
|
+
}, [d("div", At, [s(p, {
|
|
567
557
|
autofocus: "",
|
|
568
558
|
modelValue: r(w),
|
|
569
|
-
"onUpdate:modelValue": e[9] || (e[9] = (
|
|
570
|
-
placeholder: r(
|
|
559
|
+
"onUpdate:modelValue": e[9] || (e[9] = (n) => W(w) ? w.value = n : null),
|
|
560
|
+
placeholder: r(o)("menu.group.search.placeholder")
|
|
571
561
|
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = d("div", {
|
|
572
562
|
class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
|
|
573
563
|
}, null, -1)), d("div", Mt, [s(de), Z.value ? (m(), I(Y, {
|
|
574
564
|
key: 0,
|
|
575
565
|
modelValue: _.value,
|
|
576
|
-
"onUpdate:modelValue": e[14] || (e[14] = (
|
|
566
|
+
"onUpdate:modelValue": e[14] || (e[14] = (n) => _.value = n)
|
|
577
567
|
}, {
|
|
578
568
|
"bottom-sheet-button": x(() => [s(l, {
|
|
579
|
-
label: r(
|
|
580
|
-
type: b.value ? r(H.capitalize)(b.value) : r(
|
|
569
|
+
label: r(o)("menu.group.type.title", {
|
|
570
|
+
type: b.value ? r(H.capitalize)(b.value) : r(o)("menu.common.labels.all")
|
|
581
571
|
}),
|
|
582
572
|
class: "text-fm-color-typo-secondary",
|
|
583
573
|
"right-icon": "keyboard_arrow_down"
|
|
584
574
|
}, null, 8, ["label"])]),
|
|
585
575
|
default: x(() => [d("div", null, [d("div", {
|
|
586
576
|
class: "px-16 py-8",
|
|
587
|
-
onClick: e[10] || (e[10] = (
|
|
588
|
-
}, G(r(
|
|
577
|
+
onClick: e[10] || (e[10] = (n) => b.value = null)
|
|
578
|
+
}, G(r(o)("menu.group.type.all")), 1), d("div", {
|
|
589
579
|
class: "px-16 py-8",
|
|
590
|
-
onClick: e[11] || (e[11] = (
|
|
591
|
-
}, G(r(
|
|
580
|
+
onClick: e[11] || (e[11] = (n) => b.value = "NORMAL")
|
|
581
|
+
}, G(r(o)("menu.group.type.normal")), 1), d("div", {
|
|
592
582
|
class: "px-16 py-8",
|
|
593
|
-
onClick: e[12] || (e[12] = (
|
|
594
|
-
}, G(r(
|
|
583
|
+
onClick: e[12] || (e[12] = (n) => b.value = "PRODUCT")
|
|
584
|
+
}, G(r(o)("menu.group.type.product")), 1), d("div", {
|
|
595
585
|
class: "px-16 py-8",
|
|
596
|
-
onClick: e[13] || (e[13] = (
|
|
597
|
-
}, G(r(
|
|
586
|
+
onClick: e[13] || (e[13] = (n) => b.value = "DYNAMIC")
|
|
587
|
+
}, G(r(o)("menu.group.type.dynamic")), 1)])]),
|
|
598
588
|
_: 1
|
|
599
|
-
}, 8, ["modelValue"])) : U("", !0)]),
|
|
589
|
+
}, 8, ["modelValue"])) : U("", !0)]), j.value ? (m(), C("div", Gt, [s(r(ge), {
|
|
600
590
|
ref_key: "attributeFilterRef",
|
|
601
591
|
ref: Q,
|
|
602
592
|
attributes: r(q),
|
|
603
593
|
modelValue: r(N),
|
|
604
|
-
"onUpdate:modelValue": e[15] || (e[15] = (
|
|
605
|
-
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(r(
|
|
606
|
-
class:
|
|
594
|
+
"onUpdate:modelValue": e[15] || (e[15] = (n) => W(N) ? N.value = n : null)
|
|
595
|
+
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(r(We), {
|
|
596
|
+
class: J(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
607
597
|
"model-value": z.value,
|
|
608
598
|
group: "categories",
|
|
609
599
|
handle: ".handle",
|
|
610
600
|
"item-key": "_id",
|
|
611
|
-
"onUpdate:modelValue": e[16] || (e[16] = (
|
|
601
|
+
"onUpdate:modelValue": e[16] || (e[16] = (n) => ue(n))
|
|
612
602
|
}, {
|
|
613
603
|
item: x(({
|
|
614
|
-
element:
|
|
604
|
+
element: n
|
|
615
605
|
}) => [(m(), C("div", {
|
|
616
|
-
key:
|
|
617
|
-
class:
|
|
618
|
-
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(
|
|
619
|
-
count:
|
|
606
|
+
key: n._id,
|
|
607
|
+
class: J(["py-12 px-16", "flex space-x-16", "items-center"])
|
|
608
|
+
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(n.name), 1), d("div", null, [Z.value ? (m(), C("p", Et, G(r(H.capitalize)(n.type)) + " type ", 1)) : U("", !0), d("p", Rt, G(r(o)("menu.group.list.products_linked", {
|
|
609
|
+
count: n.itemsLinked.length
|
|
620
610
|
})), 1)])]), s(ie, {
|
|
621
|
-
group:
|
|
611
|
+
group: n
|
|
622
612
|
}, null, 8, ["group"])])]))]),
|
|
623
613
|
_: 1
|
|
624
|
-
}, 8, ["model-value"])], 64)) : (m(), C("div", Ot, [d("div", xt, [s(de), Z.value ? (m(), I(
|
|
614
|
+
}, 8, ["model-value"])], 64)) : (m(), C("div", Ot, [d("div", xt, [s(de), Z.value ? (m(), I(A, {
|
|
625
615
|
key: 0
|
|
626
616
|
}, {
|
|
627
617
|
"menu-button": x(() => [s(l, {
|
|
628
|
-
label: r(
|
|
629
|
-
type: b.value ? r(H.capitalize)(b.value) : r(
|
|
618
|
+
label: r(o)("menu.group.type.title", {
|
|
619
|
+
type: b.value ? r(H.capitalize)(b.value) : r(o)("menu.common.labels.all")
|
|
630
620
|
}),
|
|
631
621
|
class: "text-fm-color-typo-secondary",
|
|
632
622
|
"right-icon": "keyboard_arrow_down"
|
|
633
623
|
}, null, 8, ["label"])]),
|
|
634
624
|
default: x(() => [d("div", null, [s(i, {
|
|
635
625
|
class: "px-16 py-8",
|
|
636
|
-
label: r(
|
|
637
|
-
onClick: e[2] || (e[2] = (
|
|
626
|
+
label: r(o)("menu.group.type.all"),
|
|
627
|
+
onClick: e[2] || (e[2] = (n) => b.value = null)
|
|
638
628
|
}, null, 8, ["label"]), s(i, {
|
|
639
629
|
class: "px-16 py-8",
|
|
640
|
-
label: r(
|
|
641
|
-
onClick: e[3] || (e[3] = (
|
|
630
|
+
label: r(o)("menu.group.type.normal"),
|
|
631
|
+
onClick: e[3] || (e[3] = (n) => b.value = "NORMAL")
|
|
642
632
|
}, null, 8, ["label"]), s(i, {
|
|
643
633
|
class: "px-16 py-8",
|
|
644
|
-
label: r(
|
|
645
|
-
onClick: e[4] || (e[4] = (
|
|
634
|
+
label: r(o)("menu.group.type.product"),
|
|
635
|
+
onClick: e[4] || (e[4] = (n) => b.value = "PRODUCT")
|
|
646
636
|
}, null, 8, ["label"]), s(i, {
|
|
647
637
|
class: "px-16 py-8",
|
|
648
|
-
label: r(
|
|
649
|
-
onClick: e[5] || (e[5] = (
|
|
638
|
+
label: r(o)("menu.group.type.dynamic"),
|
|
639
|
+
onClick: e[5] || (e[5] = (n) => b.value = "DYNAMIC")
|
|
650
640
|
}, null, 8, ["label"])])]),
|
|
651
641
|
_: 1
|
|
652
642
|
})) : U("", !0), d("div", Dt, [s(p, {
|
|
653
643
|
autofocus: "",
|
|
654
644
|
modelValue: r(w),
|
|
655
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
656
|
-
placeholder: r(
|
|
657
|
-
}, null, 8, ["modelValue", "placeholder"])])]),
|
|
645
|
+
"onUpdate:modelValue": e[6] || (e[6] = (n) => W(w) ? w.value = n : null),
|
|
646
|
+
placeholder: r(o)("menu.group.search.placeholder")
|
|
647
|
+
}, null, 8, ["modelValue", "placeholder"])])]), j.value ? (m(), C("div", Ft, [s(r(ge), {
|
|
658
648
|
ref_key: "attributeFilterRef",
|
|
659
649
|
ref: Q,
|
|
660
650
|
attributes: r(q),
|
|
661
651
|
modelValue: r(N),
|
|
662
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
663
|
-
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(
|
|
652
|
+
"onUpdate:modelValue": e[7] || (e[7] = (n) => W(N) ? N.value = n : null)
|
|
653
|
+
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(dt, null, {
|
|
664
654
|
default: x(() => [s(P, {
|
|
665
655
|
"column-defs": xe.value,
|
|
666
656
|
"column-visibility": De.value,
|
|
@@ -672,8 +662,8 @@ const vt = /* @__PURE__ */ X({
|
|
|
672
662
|
draggable: "",
|
|
673
663
|
"hide-footer": "",
|
|
674
664
|
"pin-header-row": "",
|
|
675
|
-
onRowClick:
|
|
676
|
-
onDndChanged: e[8] || (e[8] = (
|
|
665
|
+
onRowClick: Ae,
|
|
666
|
+
onDndChanged: e[8] || (e[8] = (n) => ue(n))
|
|
677
667
|
}, null, 8, ["column-defs", "column-visibility", "loading", "page-size", "row-data"])]),
|
|
678
668
|
_: 1
|
|
679
669
|
})]))], 64))], 64);
|
|
@@ -681,5 +671,5 @@ const vt = /* @__PURE__ */ X({
|
|
|
681
671
|
}
|
|
682
672
|
});
|
|
683
673
|
export {
|
|
684
|
-
|
|
674
|
+
zt as _
|
|
685
675
|
};
|