@feedmepos/mf-menu 0.32.57-dev.1 → 0.32.57
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-C7XMC5tu.js → App-DUxN7yt3.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-E3y0Yzvz.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Cnjt_wfR.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-BzxL3LIz.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-bM6TM5x1.js} +2 -2
- package/dist/{Catalog-wjLJ0FKr.js → Catalog-BpdfaEWd.js} +6 -6
- package/dist/{Category-C8NEdw1f.js → Category-CRsvI23c.js} +13 -13
- package/dist/{Category-BVAF5jZq.js → Category-h0mVpwHr.js} +10 -10
- package/dist/{CookingGuide-DkVCd-Tc.js → CookingGuide-DFgQ2jxt.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Csn3gjAQ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-D8nqY4jC.js} +1 -1
- package/dist/{Group-DsuU26jf.js → Group-PG5pxNfh.js} +3 -3
- package/dist/{Group-CFeW2ARj.js → Group-slvcd4if.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BPgT_ckT.js → Group.vue_vue_type_script_setup_true_lang-Ca0RTf7d.js} +57 -58
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Cl6AEPoD.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BpeIXVCs.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BLK8bASJ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Ck2KAv76.js} +193 -190
- package/dist/{Ingredient-CASi0MP2.js → Ingredient-xKI7y0XB.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-a4r-l-jt.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CH3jTi1A.js} +2 -2
- package/dist/{LinkProductSideSheet-Ci1_qEKm.js → LinkProductSideSheet-BF_00Jg8.js} +3 -3
- package/dist/{MenuSetting-CQxD3M9k.js → MenuSetting-BAbfo028.js} +6 -6
- package/dist/{OrderPacing-CKpx1zWN.js → OrderPacing-BPz3MCxe.js} +5 -5
- package/dist/{PrintRoute-BDkeKHLa.js → PrintRoute-CiXCACml.js} +4 -4
- package/dist/{Product-DxkexFiq.js → Product-DrSEg6_V.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DxkTpeIp.js → Product.vue_vue_type_script_setup_true_lang-BsgdvCz2.js} +12 -12
- package/dist/{ProductInternalTools-DMh7P9N6.js → ProductInternalTools-BerUVFF6.js} +16 -16
- package/dist/{Products-BaTN9Vrv.js → Products-DhJlfhP5.js} +26 -26
- package/dist/{Publish-B-0kzb8B.js → Publish-BAjNPk_P.js} +3 -3
- package/dist/{Recipe-DiFdfvoL.js → Recipe-CkVcMchR.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BZ6-uHC1.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CSZz_CAP.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-C3d41j99.js → RuleView.vue_vue_type_script_setup_true_lang-DVQKrN9R.js} +642 -642
- package/dist/{Scheduler-Y-r-uhl2.js → Scheduler-Dj1MR5rm.js} +3 -3
- package/dist/{ServingSequence-B2gZumZ5.js → ServingSequence-BqsD44ye.js} +3 -3
- package/dist/{Setting-CVIGpw-x.js → Setting-DMSyoLbv.js} +5 -5
- package/dist/{Subcategory-CGBVYZ7Z.js → Subcategory-CZ4i-zBw.js} +5 -5
- package/dist/{Takeaway-D4mIHqv6.js → Takeaway-Bl9Srdio.js} +4 -4
- package/dist/{Takeaway-DDTTQZak.js → Takeaway-qHbk6yp-.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CJuJedKh.js → Takeaway.vue_vue_type_script_setup_true_lang-C6z0FcYx.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-AHNsIox6.js → Thumbnail.vue_vue_type_script_setup_true_lang-DZSD2_pk.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-CpEWc_Ff.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-C74nkozY.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BPkpxT1s.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BI5I0IXp.js} +2 -2
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DMd8Z0TE.js +5986 -0
- package/dist/{Unit-DAHT36Af.js → Unit-DXysALJ4.js} +2 -2
- package/dist/{Variant-0UJVh4AG.js → Variant-pFLHZVO9.js} +3 -3
- package/dist/{_id_-BSzV5VHq.js → _id_-4-U7cNsx.js} +9 -9
- package/dist/{app-RorQyO5L.js → app-CR7NhNht.js} +1 -1
- package/dist/{app-BpxsJTLh.js → app-D2NOhx2Z.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +2 -0
- package/dist/apps/mf-menu/src/manager/menu/circularLink.d.ts +3 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1 -2
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BUeQipEA.js → linked-status-DYxk695w.js} +2 -2
- package/dist/assets/{menu-export-Vn3MYK3_.js → menu-export-CyN_O3Kf.js} +4 -4
- package/dist/assets/{override-menu-BpEh_6g3.js → override-menu-BTTTU6jX.js} +2 -2
- package/dist/assets/{validate-menu-De9rzE7_.js → validate-menu-C2al0uj-.js} +2 -2
- package/dist/{catalog-BBaS6Pnd.js → catalog-BF2fCHSi.js} +1 -1
- package/dist/{catalogSetting-BDnNmlnm.js → catalogSetting-BCrV4DCa.js} +1 -1
- package/dist/{currency-BrkU2Vde.js → currency-DrKjxBJB.js} +1 -1
- package/dist/{dayjs.min-DgpA8hFi.js → dayjs.min-DzJl7L78.js} +2 -2
- package/dist/{index-Dy5TC0x7.js → index-Bxm8mZ6g.js} +4 -4
- package/dist/{index-DBAlmXib.js → index-Dhou0UEg.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bx__FUMc.js → index.vue_vue_type_script_setup_true_lang-CKIfNp-a.js} +6 -6
- package/dist/{item-oY2LwWGC.js → item-Dyckwjo-.js} +517 -489
- package/dist/{jszip.min-BbhegiH-.js → jszip.min-ByutR7rj.js} +175 -175
- package/dist/{memberPricing-nYksLKBc.js → memberPricing-BMRI1Z7U.js} +1 -1
- package/dist/{menu-CJl8kr2v.js → menu-CDzIVGfu.js} +1 -1
- package/dist/menuV2-puLrcFs3.js +1023 -0
- package/dist/{order_pacing-BPt_fRk7.js → order_pacing-Cs212Wff.js} +5 -5
- package/dist/{priceTier-BlOBX3x3.js → priceTier-WPgZnKsU.js} +1 -1
- package/dist/{rules-BkSEsnpL.js → rules-DCnNMPmp.js} +3 -3
- package/dist/{scheduler-Cl70ZIns.js → scheduler-BWWxcljn.js} +4 -4
- package/dist/{toExcel-BAeoALKB.js → toExcel-DuXu6LJi.js} +2 -2
- package/dist/{unit-BH96dkTh.js → unit-DLzvIszm.js} +2 -2
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Ddstxum-.js +0 -5974
- package/dist/menuV2-Cfjb_IgJ.js +0 -1055
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as f, resolveComponent as V, createBlock as R, openBlock as m, withCtx as
|
|
2
|
-
import { u as ye, P as Ee, B as Le, y as ee, R as w, A as Ue, a5 as Ke, H as te, z as ze, K as fe, J as Be } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as oe, computed as f, resolveComponent as V, createBlock as R, openBlock as m, withCtx as C, createElementBlock as y, Fragment as E, renderList as ne, createElementVNode as p, normalizeClass as J, toDisplayString as A, createVNode as i, createCommentVNode as O, unref as u, ref as T, watch as $e, h as Y, mergeProps as De, createSlots as Pe, withModifiers as Te, isRef as q, nextTick as pe } from "vue";
|
|
2
|
+
import { u as ye, P as Ee, B as Le, y as ee, R as w, A as Ue, a5 as Ke, H as te, z as ze, K as fe, J as Be } from "./index.vue_vue_type_script_setup_true_lang-CKIfNp-a.js";
|
|
3
3
|
import { d as je } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
4
4
|
import { b as ve, H as Ye } from "./app-5fxKLAzS.js";
|
|
5
|
-
import { useI18n as _e, useCoreStore as He, useCustomAttributes as
|
|
6
|
-
import { useBreakpoints as be, useSnackbar as
|
|
7
|
-
import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as tt } from "./app-
|
|
5
|
+
import { useI18n as _e, useCoreStore as He, useCustomAttributes as qe } from "@feedmepos/mf-common";
|
|
6
|
+
import { useBreakpoints as be, useSnackbar as Je, useDialog as Qe, components as We, FmButtonVariant as Xe } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-D8nqY4jC.js";
|
|
8
|
+
import { _ as tt } from "./app-D2NOhx2Z.js";
|
|
9
9
|
import { _ as nt, a as ot } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
10
|
import { c as lt } from "./object-DVUNCr7w.js";
|
|
11
|
-
import { _ as rt } from "./ApplyProductDialog.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { M as ge,
|
|
13
|
-
import { _ as
|
|
14
|
-
import { u as
|
|
15
|
-
import { C as
|
|
16
|
-
import { c as vt } from "./menuV2-Cfjb_IgJ.js";
|
|
11
|
+
import { _ as rt } from "./ApplyProductDialog.vue_vue_type_script_setup_true_lang-bM6TM5x1.js";
|
|
12
|
+
import { M as ge, L as at, N as ut, K as st, m as it, x as ct, r as mt, s as dt } from "./item-Dyckwjo-.js";
|
|
13
|
+
import { _ as pt } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-DiK3fi9J.js";
|
|
14
|
+
import { u as ft } from "./search-BAPEUu1R.js";
|
|
15
|
+
import { C as vt } from "./catalog-BF2fCHSi.js";
|
|
17
16
|
const gt = /* @__PURE__ */ oe({
|
|
18
17
|
__name: "ResponsiveContextMenu",
|
|
19
18
|
props: {
|
|
@@ -24,7 +23,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
24
23
|
return (I, N) => {
|
|
25
24
|
const b = V("FmButton"), k = V("FmMenuItem"), v = V("FmMenu");
|
|
26
25
|
return a.value ? (m(), R(nt, { key: 0 }, {
|
|
27
|
-
default:
|
|
26
|
+
default: C(() => [
|
|
28
27
|
(m(!0), y(E, null, ne(I.items, ({ icon: F, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(ot, {
|
|
29
28
|
key: G,
|
|
30
29
|
icon: F,
|
|
@@ -42,7 +41,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
42
41
|
"stop-click-propagation": "",
|
|
43
42
|
shift: !0
|
|
44
43
|
}, {
|
|
45
|
-
"menu-button":
|
|
44
|
+
"menu-button": C(() => [
|
|
46
45
|
i(b, {
|
|
47
46
|
type: "button",
|
|
48
47
|
variant: "tertiary",
|
|
@@ -51,7 +50,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
51
50
|
size: "md"
|
|
52
51
|
})
|
|
53
52
|
]),
|
|
54
|
-
default:
|
|
53
|
+
default: C(() => [
|
|
55
54
|
(m(!0), y(E, null, ne(I.items, ({ icon: F, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(k, {
|
|
56
55
|
key: G,
|
|
57
56
|
disabled: h,
|
|
@@ -60,9 +59,9 @@ const gt = /* @__PURE__ */ oe({
|
|
|
60
59
|
},
|
|
61
60
|
label: G
|
|
62
61
|
}, {
|
|
63
|
-
label:
|
|
62
|
+
label: C(() => [
|
|
64
63
|
p("span", {
|
|
65
|
-
class:
|
|
64
|
+
class: J(h ? "text-fm-color-typo-disabled" : U)
|
|
66
65
|
}, A(G), 3)
|
|
67
66
|
]),
|
|
68
67
|
_: 2
|
|
@@ -103,10 +102,10 @@ const gt = /* @__PURE__ */ oe({
|
|
|
103
102
|
class: "xs:pt-24"
|
|
104
103
|
}, wt = {
|
|
105
104
|
key: 0,
|
|
106
|
-
class: /* @__PURE__ */
|
|
107
|
-
}, Ct = {
|
|
108
|
-
class: "flex justify-between items-center space-x-8"
|
|
105
|
+
class: /* @__PURE__ */ J(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden", "pt-16"])
|
|
109
106
|
}, xt = {
|
|
107
|
+
class: "flex justify-between items-center space-x-8"
|
|
108
|
+
}, Ct = {
|
|
110
109
|
class: "w-[320px]"
|
|
111
110
|
}, Mt = {
|
|
112
111
|
key: 0
|
|
@@ -128,20 +127,20 @@ const gt = /* @__PURE__ */ oe({
|
|
|
128
127
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
129
128
|
}, Ot = {
|
|
130
129
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
131
|
-
},
|
|
130
|
+
}, Jt = /* @__PURE__ */ oe({
|
|
132
131
|
__name: "Group",
|
|
133
132
|
emits: ["update:count"],
|
|
134
133
|
setup(Q, {
|
|
135
134
|
emit: L
|
|
136
135
|
}) {
|
|
137
|
-
const a = ye(), I = He(), N =
|
|
136
|
+
const a = ye(), I = He(), N = Je(), b = Ee(Le(N)), k = Qe(), v = f(() => a.rules.group), F = f(() => new ge(a, b.updateMenu, k)), G = f(() => F.value.mapGroups(a.groups, !1)), {
|
|
138
137
|
searchKey: h,
|
|
139
138
|
filter: U
|
|
140
|
-
} =
|
|
139
|
+
} = ft(), S = T(!1), _ = T(null), {
|
|
141
140
|
attributes: le,
|
|
142
141
|
filterRule: $,
|
|
143
142
|
mongoQuery: re
|
|
144
|
-
} =
|
|
143
|
+
} = qe({
|
|
145
144
|
valueSource: G,
|
|
146
145
|
entity: "group"
|
|
147
146
|
}), K = f(() => {
|
|
@@ -156,17 +155,17 @@ const gt = /* @__PURE__ */ oe({
|
|
|
156
155
|
const c = f(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId);
|
|
157
156
|
function ae(t) {
|
|
158
157
|
var P, n;
|
|
159
|
-
const e = !a.state.currentCatalogId, r = !a.state.currentSchedulerId, o = ((P = a.currentCatalog) == null ? void 0 : P.priceTierRules) ?? ((n = a.currentCatalog) == null ? void 0 : n.usePriceTiers), s = a.rules.item.bindToVariant,
|
|
158
|
+
const e = !a.state.currentCatalogId, r = !a.state.currentSchedulerId, o = ((P = a.currentCatalog) == null ? void 0 : P.priceTierRules) ?? ((n = a.currentCatalog) == null ? void 0 : n.usePriceTiers), s = a.rules.item.bindToVariant, x = a.rules.group.type, d = a.version === ee.enum.v3, M = a.rules.item.orderFromActiveOnly;
|
|
160
159
|
return {
|
|
161
160
|
link: (g) => !c.value && (!g || s),
|
|
162
161
|
name: (g) => !c.value && !g,
|
|
163
162
|
isDefault: (g) => !c.value,
|
|
164
|
-
type:
|
|
163
|
+
type: x && !t._id && !c.value,
|
|
165
164
|
price: !d || t.type !== w.enum.DYNAMIC,
|
|
166
165
|
priceEdit: !(o && o.length > 0 && !d && r),
|
|
167
166
|
priceTier: !d && r && e,
|
|
168
167
|
inventory: r ? d ? !c.value && t.type === w.enum.NORMAL : !c.value : !1,
|
|
169
|
-
orderFrom: (g) => r ? d ? t.type === w.enum.DYNAMIC ? !a.state.currentSchedulerId :
|
|
168
|
+
orderFrom: (g) => r ? d ? t.type === w.enum.DYNAMIC ? !a.state.currentSchedulerId : !!a.state.currentSchedulerId == !g : !a.state.currentSchedulerId : !1,
|
|
170
169
|
orderFromActiveOnly: M,
|
|
171
170
|
showOrderFrom: r ? d ? c.value ? !0 : t.type === w.enum.PRODUCT : !0 : !1,
|
|
172
171
|
bindToVariant: s,
|
|
@@ -206,7 +205,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
206
205
|
function ue(t) {
|
|
207
206
|
F.value.sortGroups(t);
|
|
208
207
|
}
|
|
209
|
-
function
|
|
208
|
+
function xe(t) {
|
|
210
209
|
k.open({
|
|
211
210
|
title: l("menu.group.actions.duplicate.title"),
|
|
212
211
|
message: l("menu.group.actions.duplicate.message", {
|
|
@@ -222,10 +221,10 @@ const gt = /* @__PURE__ */ oe({
|
|
|
222
221
|
}
|
|
223
222
|
}).onPrimary(() => F.value.duplicateGroup(t));
|
|
224
223
|
}
|
|
225
|
-
const X = f(() => a.currentCatalog), z = f(() => a.currentScheduler), B = f(() => new
|
|
224
|
+
const X = f(() => a.currentCatalog), z = f(() => a.currentScheduler), B = f(() => new vt(X.value, a, b.updateMenu, k)), Z = f(() => new at(z.value, a, b.updateMenu, k)), Ce = (t) => {
|
|
226
225
|
let e = t;
|
|
227
226
|
function r(o) {
|
|
228
|
-
const
|
|
227
|
+
const x = a.state.menu.modules.group.find((n) => n._id === o._id), d = (o.items ?? []).reduce((n, g) => (n[g._id] = [...n[g._id] || [], g.combinationKey || ""], n), {}), P = (x.items ?? []).filter((n) => {
|
|
229
228
|
var g;
|
|
230
229
|
return !((g = d[n._id]) != null && g.includes(n.combinationKey || ""));
|
|
231
230
|
}).map((n) => ({
|
|
@@ -234,7 +233,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
234
233
|
selection: n.selection
|
|
235
234
|
})).filter((n) => !!a.mergedMenu.modules.item.find((g) => g._id === n._id));
|
|
236
235
|
return {
|
|
237
|
-
...
|
|
236
|
+
...x,
|
|
238
237
|
...Object.fromEntries(Object.entries(o).filter(([, n]) => !!n)),
|
|
239
238
|
items: [...o.items ?? [], ...P]
|
|
240
239
|
};
|
|
@@ -280,13 +279,13 @@ const gt = /* @__PURE__ */ oe({
|
|
|
280
279
|
"onApply:product": async (r) => {
|
|
281
280
|
var o;
|
|
282
281
|
for (const s of r)
|
|
283
|
-
if (
|
|
284
|
-
const
|
|
282
|
+
if (ct(a.state.menu, t._id, s._id)) {
|
|
283
|
+
const x = (o = a.state.menu.modules.item.find((d) => d._id === s._id)) == null ? void 0 : o.name;
|
|
285
284
|
N.open({
|
|
286
285
|
type: "error",
|
|
287
286
|
message: l("menu.product.form.group.circularError", {
|
|
288
287
|
groupName: t.name,
|
|
289
|
-
productName:
|
|
288
|
+
productName: x
|
|
290
289
|
})
|
|
291
290
|
});
|
|
292
291
|
return;
|
|
@@ -312,7 +311,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
312
311
|
}, {
|
|
313
312
|
label: l("menu.group.actions.duplicate_action"),
|
|
314
313
|
disabled: !v.value.create,
|
|
315
|
-
onClick: () =>
|
|
314
|
+
onClick: () => xe(e)
|
|
316
315
|
}, {
|
|
317
316
|
label: l("menu.common.actions.delete"),
|
|
318
317
|
itemClass: "text-fm-color-typo-error",
|
|
@@ -334,7 +333,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
334
333
|
class: "flex items-center gap-8"
|
|
335
334
|
}, [Y("span", {
|
|
336
335
|
class: "break-all"
|
|
337
|
-
}, r), e.name_locale ? Y(
|
|
336
|
+
}, r), e.name_locale ? Y(pt, {
|
|
338
337
|
nameLocale: e.name_locale ?? {}
|
|
339
338
|
}) : null]);
|
|
340
339
|
}
|
|
@@ -344,10 +343,10 @@ const gt = /* @__PURE__ */ oe({
|
|
|
344
343
|
enableSorting: !1,
|
|
345
344
|
cell: (t) => {
|
|
346
345
|
const e = t.getValue(), r = Object.values(e).map((o) => {
|
|
347
|
-
var
|
|
346
|
+
var x;
|
|
348
347
|
const s = [(o == null ? void 0 : o.code) || "", o.name || o.fallbackName].join(" ").trim();
|
|
349
348
|
return (o.items || []).length > 1 ? `${s} (${l("menu.group.list.variants", {
|
|
350
|
-
count: (
|
|
349
|
+
count: (x = o.items) == null ? void 0 : x.length
|
|
351
350
|
})})` : s;
|
|
352
351
|
});
|
|
353
352
|
return r.length > 5 ? `${r.slice(0, 5).join(", ")} ${l("menu.group.list.more_items", {
|
|
@@ -421,7 +420,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
421
420
|
tagging: ((t = I.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
|
|
422
421
|
};
|
|
423
422
|
}), Se = async (t) => {
|
|
424
|
-
const e =
|
|
423
|
+
const e = mt(t), r = e.group, o = dt(r, ae(t));
|
|
425
424
|
if (c.value)
|
|
426
425
|
X.value ? (z.value ? B.value.overrideCatalogSchedulerGroups([o], z.value._id) : B.value.overrideCatalogGroups([o]), await B.value.update()) : (Z.value.overrideSchedulerGroups([o]), await Z.value.update());
|
|
427
426
|
else {
|
|
@@ -437,7 +436,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
437
436
|
};
|
|
438
437
|
await b.updateMenu(s, o.name);
|
|
439
438
|
}
|
|
440
|
-
}, D = T(null), Ve = f(() =>
|
|
439
|
+
}, D = T(null), Ve = f(() => Ce(D.value)), ce = T(null), me = async (t) => {
|
|
441
440
|
var e;
|
|
442
441
|
D.value = lt(t), await pe(), (e = ce.value) == null || e.trigger(!0);
|
|
443
442
|
};
|
|
@@ -467,7 +466,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
467
466
|
}, null)]) : null
|
|
468
467
|
}) : null;
|
|
469
468
|
return (t, e) => {
|
|
470
|
-
const r = V("fm-button"), o = V("fm-chip"), s = V("fm-menu-item"),
|
|
469
|
+
const r = V("fm-button"), o = V("fm-chip"), s = V("fm-menu-item"), x = V("fm-menu"), d = V("fm-search"), M = V("fm-table"), P = V("fm-bottom-sheet");
|
|
471
470
|
return m(), y(E, null, [D.value ? (m(), R(ut, De({
|
|
472
471
|
ref_key: "groupManagerFormRef",
|
|
473
472
|
ref: ce,
|
|
@@ -485,8 +484,8 @@ const gt = /* @__PURE__ */ oe({
|
|
|
485
484
|
_: 2
|
|
486
485
|
}, [v.value.create ? {
|
|
487
486
|
name: "action",
|
|
488
|
-
fn:
|
|
489
|
-
default:
|
|
487
|
+
fn: C(() => [i(u(st), null, {
|
|
488
|
+
default: C(({
|
|
490
489
|
trigger: n
|
|
491
490
|
}) => [i(r, {
|
|
492
491
|
"prepend-icon": "add",
|
|
@@ -503,7 +502,7 @@ const gt = /* @__PURE__ */ oe({
|
|
|
503
502
|
}, [p("div", At, [i(d, {
|
|
504
503
|
autofocus: "",
|
|
505
504
|
modelValue: u(h),
|
|
506
|
-
"onUpdate:modelValue": e[9] || (e[9] = (n) =>
|
|
505
|
+
"onUpdate:modelValue": e[9] || (e[9] = (n) => q(h) ? h.value = n : null),
|
|
507
506
|
placeholder: u(l)("menu.group.search.placeholder")
|
|
508
507
|
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = p("div", {
|
|
509
508
|
class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
|
|
@@ -512,14 +511,14 @@ const gt = /* @__PURE__ */ oe({
|
|
|
512
511
|
modelValue: S.value,
|
|
513
512
|
"onUpdate:modelValue": e[14] || (e[14] = (n) => S.value = n)
|
|
514
513
|
}, {
|
|
515
|
-
"bottom-sheet-button":
|
|
514
|
+
"bottom-sheet-button": C(() => [i(o, {
|
|
516
515
|
label: u(l)("menu.group.type.title", {
|
|
517
516
|
type: _.value ? u(te.capitalize)(_.value) : u(l)("menu.common.labels.all")
|
|
518
517
|
}),
|
|
519
518
|
class: "text-fm-color-typo-secondary",
|
|
520
519
|
"right-icon": "keyboard_arrow_down"
|
|
521
520
|
}, null, 8, ["label"])]),
|
|
522
|
-
default:
|
|
521
|
+
default: C(() => [p("div", null, [p("div", {
|
|
523
522
|
class: "px-16 py-8",
|
|
524
523
|
onClick: e[10] || (e[10] = (n) => _.value = null)
|
|
525
524
|
}, A(u(l)("menu.group.type.all")), 1), p("div", {
|
|
@@ -538,37 +537,37 @@ const gt = /* @__PURE__ */ oe({
|
|
|
538
537
|
ref: H,
|
|
539
538
|
attributes: u(le),
|
|
540
539
|
modelValue: u($),
|
|
541
|
-
"onUpdate:modelValue": e[15] || (e[15] = (n) =>
|
|
540
|
+
"onUpdate:modelValue": e[15] || (e[15] = (n) => q($) ? $.value = n : null)
|
|
542
541
|
}, null, 8, ["attributes", "modelValue"])])) : O("", !0), i(u(je), {
|
|
543
|
-
class:
|
|
542
|
+
class: J(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
544
543
|
"model-value": K.value,
|
|
545
544
|
group: "categories",
|
|
546
545
|
handle: ".handle",
|
|
547
546
|
"item-key": "_id",
|
|
548
547
|
"onUpdate:modelValue": e[16] || (e[16] = (n) => ue(n))
|
|
549
548
|
}, {
|
|
550
|
-
item:
|
|
549
|
+
item: C(({
|
|
551
550
|
element: n
|
|
552
551
|
}) => [(m(), y("div", {
|
|
553
552
|
key: n._id,
|
|
554
|
-
class:
|
|
553
|
+
class: J(["py-12 px-16", "flex space-x-16", "items-center"])
|
|
555
554
|
}, [p("div", Vt, [p("div", Ft, [p("p", It, A(n.name), 1), p("div", null, [W.value ? (m(), y("p", Nt, A(u(te.capitalize)(n.type)) + " type ", 1)) : O("", !0), p("p", Ot, A(u(l)("menu.group.list.products_linked", {
|
|
556
555
|
count: n.itemsLinked.length
|
|
557
556
|
})), 1)])]), i(ie, {
|
|
558
557
|
group: n
|
|
559
558
|
}, null, 8, ["group"])])]))]),
|
|
560
559
|
_: 1
|
|
561
|
-
}, 8, ["model-value"])], 64)) : (m(), y("div", wt, [p("div",
|
|
560
|
+
}, 8, ["model-value"])], 64)) : (m(), y("div", wt, [p("div", xt, [i(de), W.value ? (m(), R(x, {
|
|
562
561
|
key: 0
|
|
563
562
|
}, {
|
|
564
|
-
"menu-button":
|
|
563
|
+
"menu-button": C(() => [i(o, {
|
|
565
564
|
label: u(l)("menu.group.type.title", {
|
|
566
565
|
type: _.value ? u(te.capitalize)(_.value) : u(l)("menu.common.labels.all")
|
|
567
566
|
}),
|
|
568
567
|
class: "text-fm-color-typo-secondary",
|
|
569
568
|
"right-icon": "keyboard_arrow_down"
|
|
570
569
|
}, null, 8, ["label"])]),
|
|
571
|
-
default:
|
|
570
|
+
default: C(() => [p("div", null, [i(s, {
|
|
572
571
|
class: "px-16 py-8",
|
|
573
572
|
label: u(l)("menu.group.type.all"),
|
|
574
573
|
onClick: e[2] || (e[2] = (n) => _.value = null)
|
|
@@ -586,19 +585,19 @@ const gt = /* @__PURE__ */ oe({
|
|
|
586
585
|
onClick: e[5] || (e[5] = (n) => _.value = "DYNAMIC")
|
|
587
586
|
}, null, 8, ["label"])])]),
|
|
588
587
|
_: 1
|
|
589
|
-
})) : O("", !0), p("div",
|
|
588
|
+
})) : O("", !0), p("div", Ct, [i(d, {
|
|
590
589
|
autofocus: "",
|
|
591
590
|
modelValue: u(h),
|
|
592
|
-
"onUpdate:modelValue": e[6] || (e[6] = (n) =>
|
|
591
|
+
"onUpdate:modelValue": e[6] || (e[6] = (n) => q(h) ? h.value = n : null),
|
|
593
592
|
placeholder: u(l)("menu.group.search.placeholder")
|
|
594
593
|
}, null, 8, ["modelValue", "placeholder"])])]), j.value ? (m(), y("div", Mt, [i(u(ve), {
|
|
595
594
|
ref_key: "attributeFilterRef",
|
|
596
595
|
ref: H,
|
|
597
596
|
attributes: u(le),
|
|
598
597
|
modelValue: u($),
|
|
599
|
-
"onUpdate:modelValue": e[7] || (e[7] = (n) =>
|
|
598
|
+
"onUpdate:modelValue": e[7] || (e[7] = (n) => q($) ? $.value = n : null)
|
|
600
599
|
}, null, 8, ["attributes", "modelValue"])])) : O("", !0), i(tt, null, {
|
|
601
|
-
default:
|
|
600
|
+
default: C(() => [i(M, {
|
|
602
601
|
"column-defs": Ae.value,
|
|
603
602
|
"column-visibility": Ge.value,
|
|
604
603
|
loading: u(b).checkMenuIsLoading(),
|
|
@@ -618,5 +617,5 @@ const gt = /* @__PURE__ */ oe({
|
|
|
618
617
|
}
|
|
619
618
|
});
|
|
620
619
|
export {
|
|
621
|
-
|
|
620
|
+
Jt as _
|
|
622
621
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as N, useModel as K, computed as B, resolveComponent as d, createBlock as I, openBlock as b, ref as L, watch as W, withCtx as f, createElementBlock as F, createElementVNode as U, Fragment as q, renderList as X, createVNode as u, unref as e, createCommentVNode as $, withModifiers as Q, onMounted as te, renderSlot as le, toDisplayString as h, createTextVNode as ae } from "vue";
|
|
2
2
|
import { useI18n as z, useCustomAttributes as ue, useCoreStore as re, isEmptyRule as oe, EMPTY_RULE as w } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as x } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
4
|
-
import { u as D } from "./priceTier-
|
|
4
|
+
import { u as D } from "./priceTier-WPgZnKsU.js";
|
|
5
5
|
import { b as G } from "./app-5fxKLAzS.js";
|
|
6
6
|
import { FmButtonVariant as Z, useDialog as ne, components as ie, FmButtonColorThemeVariant as O } from "@feedmepos/ui-library";
|
|
7
|
-
import { m as j, f as Y, e as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { L as R } from "./catalogSetting-
|
|
9
|
-
import { L as de } from "./LinkProductSideSheet-
|
|
7
|
+
import { m as j, f as Y, e as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-DVQKrN9R.js";
|
|
8
|
+
import { L as R } from "./catalogSetting-BCrV4DCa.js";
|
|
9
|
+
import { L as de } from "./LinkProductSideSheet-BF_00Jg8.js";
|
|
10
10
|
import { c as H } from "./check-C9mY6LiX.js";
|
|
11
|
-
import { u as pe, G as J, au as ce } from "./index.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { u as pe, G as J, au as ce } from "./index.vue_vue_type_script_setup_true_lang-CKIfNp-a.js";
|
|
12
12
|
import { c as ve } from "./string-DpfFixWH.js";
|
|
13
13
|
const _e = /* @__PURE__ */ N({
|
|
14
14
|
__name: "LinkPriceTier",
|