@feedmepos/mf-menu 0.32.7 → 0.32.8-dev
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-6Q1nmlfA.js → App-B5S9byVJ.js} +5457 -4622
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-xLPJOt02.js → ApplyProduct.vue_vue_type_script_setup_true_lang-bSXFWpq_.js} +3 -3
- package/dist/{Catalog-Bf5JieUH.js → Catalog-CTfF5FmI.js} +52 -52
- package/dist/{Category-BBATgN1o.js → Category-BntCVeoT.js} +57 -57
- package/dist/{Category-BSBZlBHF.js → Category-Z3bphlCX.js} +26 -26
- package/dist/{CookingGuide-BnjSTAL4.js → CookingGuide-CoPo2Alx.js} +127 -127
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BXdLDaBB.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DJ3sb3XV.js} +1 -1
- package/dist/{Group-Dpbz5j1x.js → Group-B7rZfFlT.js} +3 -3
- package/dist/{Group-BqXtHWr2.js → Group-CblWJOl1.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Bz5hEPov.js → Group.vue_vue_type_script_setup_true_lang-wX7yqw0Z.js} +33 -33
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-3a6eV6cB.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1gBCBA.js} +27 -27
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C6Z7OJz7.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CcQBD0I8.js} +3127 -3127
- package/dist/{Ingredient-BZfbbI--.js → Ingredient-Bn-jeNeI.js} +46 -46
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DfyUAd9n.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DbGNFA3D.js} +2 -2
- package/dist/{LinkProductSideSheet-C-CcvD1Y.js → LinkProductSideSheet-BjcQDT4U.js} +61 -61
- package/dist/{MenuSetting-CRCXtk6n.js → MenuSetting-BT5YSMgK.js} +14 -14
- package/dist/{PrintRoute-BqRkve5U.js → PrintRoute-B0j0eqNM.js} +34 -34
- package/dist/{Product-cj-wKww4.js → Product-BOMprFhc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DtCzSk94.js → Product.vue_vue_type_script_setup_true_lang-q9xFzQ0v.js} +142 -142
- package/dist/{ProductInternalTools-B5V7Hs15.js → ProductInternalTools-O5d2jMAH.js} +39 -39
- package/dist/{Products-a0N50IJw.js → Products-BnMrK40x.js} +15 -15
- package/dist/{Publish-CyiUajCw.js → Publish-dTP5mQS3.js} +26 -26
- package/dist/{Recipe-CKIoGrBI.js → Recipe-DnftcZPO.js} +26 -26
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-fp_IdVVZ.js → RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js} +2 -2
- package/dist/{Scheduler-CwTdAm-V.js → Scheduler-DRLaQK_V.js} +22 -22
- package/dist/{ServingSequence-BAxm0bx1.js → ServingSequence-CPIyJ7T8.js} +39 -39
- package/dist/{Setting-J9s4VpKm.js → Setting-CLtISC4c.js} +22 -22
- package/dist/{Subcategory-BXJ2H9cr.js → Subcategory-b0bXCYYY.js} +32 -32
- package/dist/{Takeaway-CPPrIbb0.js → Takeaway-CCIKDCoF.js} +12 -12
- package/dist/{Takeaway-Cm9DdUdf.js → Takeaway-h9uUxFJd.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-PRAGlbyK.js → Takeaway.vue_vue_type_script_setup_true_lang-BOG_W-2a.js} +26 -26
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BQcHroCG.js → Thumbnail.vue_vue_type_script_setup_true_lang-D4KcX3XQ.js} +26 -26
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B3EByLES.js +6016 -0
- package/dist/{Unit-9pTm3F5W.js → Unit-B0kiwrN6.js} +13 -13
- package/dist/{Variant-qGJvwVW3.js → Variant-CJSk0kTW.js} +18 -18
- package/dist/{_id_-BPgTKleB.js → _id_-108G3lsv.js} +22 -22
- package/dist/{app-BYd7KCR0.js → app-BTn28hDr.js} +1 -1
- package/dist/{app-BoVVV8kG.js → app-CPJH5bgs.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +4 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{validate-menu-C55soZke.js → linked-status-Bp5piT25.js} +7 -7
- package/dist/assets/{override-menu-D2ffZ3LE.js → override-menu-D47qVZAi.js} +2 -2
- package/dist/assets/{linked-status-YBCdx1_k.js → validate-menu-YuXYm9iE.js} +7 -7
- package/dist/{catalog-DjMrJdom.js → catalog-CpFTifAS.js} +1 -1
- package/dist/{catalogSetting-DMUZ11RQ.js → catalogSetting-DjGqI2Vf.js} +1 -1
- package/dist/{category-DRr-IdFP.js → category-DaRWiQd8.js} +5 -5
- package/dist/{currency-CAUInXnj.js → currency-DbURufyM.js} +1 -1
- package/dist/{index-CG5i_sE7.js → index-C6AkIinM.js} +1 -1
- package/dist/{index-DOwV5hqi.js → index-D67GKEzf.js} +1 -1
- package/dist/{index-hDyuidIm.js → index-kjRAsH_h.js} +38 -38
- package/dist/{index-By_yIps1.js → index-pJtym1c6.js} +21 -21
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js → index.vue_vue_type_script_setup_true_lang-BvohjQ00.js} +440 -430
- package/dist/item-2WoPAnNJ.js +6838 -0
- package/dist/{iteration-V9L5Rk-0.js → iteration-BGItxpWj.js} +1 -1
- package/dist/{jszip.min-Danu3otn.js → jszip.min-D8NeBCPG.js} +353 -353
- package/dist/{menu-D1PHF11v.js → menu-DVdMR0zo.js} +1 -1
- package/dist/{menuV2-BfvbnMWo.js → menuV2-CcBdUc80.js} +73 -73
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DszOAydN.js → priceTier-CTfRyTuS.js} +1 -1
- package/dist/{scheduler-BbQrleYX.js → scheduler-DOMDX4d7.js} +20 -20
- package/dist/{subcategory-BnW2z6Vy.js → subcategory-NsslZ1my.js} +6 -6
- package/dist/{toExcel-De8V6KyO.js → toExcel-Bdne-Dw_.js} +2 -2
- package/dist/{unit-BjQ-Hi7b.js → unit-DKyvdauo.js} +29 -29
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BRmrp3_3.js +0 -6038
- package/dist/item-Cq7YkZBk.js +0 -7685
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as S, computed as o, createBlock as v, openBlock as t, unref as c, withCtx as g, renderSlot as B, ref as A, resolveComponent as I, createElementBlock as a, createElementVNode as m, createCommentVNode as b, Fragment as f, renderList as C, toDisplayString as d, withModifiers as F } from "vue";
|
|
2
2
|
import { useI18n as V } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as M } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
4
|
-
import { u as D } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as D } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
5
5
|
import { useBreakpoints as E } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as y } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
7
7
|
const X = /* @__PURE__ */ S({
|
|
@@ -2,9 +2,9 @@ import { defineComponent as m, ref as p, createBlock as i, openBlock as d, unref
|
|
|
2
2
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as f } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
4
4
|
import { _ as g } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
5
|
-
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { A as b } from "./item-
|
|
7
|
-
import { a as h } from "./menu-
|
|
5
|
+
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-wX7yqw0Z.js";
|
|
6
|
+
import { A as b } from "./item-2WoPAnNJ.js";
|
|
7
|
+
import { a as h } from "./menu-DVdMR0zo.js";
|
|
8
8
|
const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "flex items-center" }, k = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, C = { class: "fm-typo-en-body-md-600 font-semibold" }, j = /* @__PURE__ */ m({
|
|
9
9
|
__name: "Group",
|
|
10
10
|
setup(N) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as I, openBlock as m, withCtx as x, createElementBlock as w, Fragment as T, renderList as oe, createElementVNode as d, normalizeClass as W, toDisplayString as G, createVNode as s, ref as E, renderSlot as Ne, unref as r, createCommentVNode as U, watch as Re, h as pe, mergeProps as Ee, createSlots as Se, withModifiers as Ue, isRef as Q, nextTick as fe } from "vue";
|
|
2
|
+
import { J as H, u as ne, P as Ie, G as Te, A as v, D as $e, a3 as Ye, B as Le, K as ze } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
3
|
import { d as Be } from "./vuedraggable-CK8z7qA8.js";
|
|
4
|
-
import { b as ve, H as
|
|
5
|
-
import { useI18n as le, useCoreStore as
|
|
4
|
+
import { b as ve, H as Ke } from "./app-5fxKLAzS.js";
|
|
5
|
+
import { useI18n as le, useCoreStore as je, useCustomAttributes as He } from "@feedmepos/mf-common";
|
|
6
6
|
import { useBreakpoints as ye, components as _e, useSnackbar as qe, useDialog as Je, FmButtonVariant as Qe } 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-DJ3sb3XV.js";
|
|
8
|
+
import { _ as Ze } from "./app-CPJH5bgs.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-bSXFWpq_.js";
|
|
13
13
|
import { c as at } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { M as ge,
|
|
14
|
+
import { M as ge, v as rt, w as ut, A as st, e as it, h as ct, r as mt } from "./item-2WoPAnNJ.js";
|
|
15
15
|
import { u as dt } from "./search-BAPEUu1R.js";
|
|
16
|
-
import { C as pt } from "./catalog-
|
|
17
|
-
import { c as ft } from "./menuV2-
|
|
16
|
+
import { C as pt } from "./catalog-CpFTifAS.js";
|
|
17
|
+
import { c as ft } from "./menuV2-CcBdUc80.js";
|
|
18
18
|
const vt = /* @__PURE__ */ X({
|
|
19
19
|
__name: "ResponsiveContextMenu",
|
|
20
20
|
props: {
|
|
@@ -24,9 +24,9 @@ const vt = /* @__PURE__ */ X({
|
|
|
24
24
|
const S = ye(), u = g(() => S.breakpoints.value.xs);
|
|
25
25
|
return (R, V) => {
|
|
26
26
|
const h = M("FmButton"), f = M("FmMenuItem"), y = M("FmMenu");
|
|
27
|
-
return u.value ? (m(),
|
|
27
|
+
return u.value ? (m(), I(et, { key: 0 }, {
|
|
28
28
|
default: x(() => [
|
|
29
|
-
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(),
|
|
29
|
+
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(), I(tt, {
|
|
30
30
|
key: D,
|
|
31
31
|
icon: k,
|
|
32
32
|
label: D,
|
|
@@ -38,7 +38,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
38
38
|
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
39
39
|
]),
|
|
40
40
|
_: 1
|
|
41
|
-
})) : (m(),
|
|
41
|
+
})) : (m(), I(y, {
|
|
42
42
|
key: 1,
|
|
43
43
|
"stop-click-propagation": "",
|
|
44
44
|
shift: !0
|
|
@@ -53,7 +53,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
53
53
|
})
|
|
54
54
|
]),
|
|
55
55
|
default: x(() => [
|
|
56
|
-
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(),
|
|
56
|
+
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(), I(f, {
|
|
57
57
|
key: D,
|
|
58
58
|
disabled: C,
|
|
59
59
|
onClick: () => {
|
|
@@ -168,7 +168,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
168
168
|
class: "text-sm"
|
|
169
169
|
}, G(y), 1))), 128))
|
|
170
170
|
])
|
|
171
|
-
])) :
|
|
171
|
+
])) : U("", !0)
|
|
172
172
|
]));
|
|
173
173
|
}
|
|
174
174
|
}), Ct = {
|
|
@@ -207,7 +207,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
207
207
|
setup(L, {
|
|
208
208
|
emit: S
|
|
209
209
|
}) {
|
|
210
|
-
const u = ne(), R =
|
|
210
|
+
const u = ne(), R = je(), V = qe(), h = Ie(Te(V)), f = Je(), y = g(() => u.rules.group), k = g(() => new ge(u, h.updateMenu, f)), D = g(() => k.value.mapGroups(u.groups, !1)), {
|
|
211
211
|
searchKey: C,
|
|
212
212
|
filter: A
|
|
213
213
|
} = dt(), _ = E(!1), b = E(null), {
|
|
@@ -218,7 +218,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
218
218
|
valueSource: D,
|
|
219
219
|
entity: "group"
|
|
220
220
|
}), z = g(() => {
|
|
221
|
-
const t = (a) => A([a.name, ...Object.values(a.items).flatMap((l) => `${l.code} ${l.name} ${Le.Dinero.fromFdoDinero(l.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !ae.value ? !0 :
|
|
221
|
+
const t = (a) => A([a.name, ...Object.values(a.items).flatMap((l) => `${l.code} ${l.name} ${Le.Dinero.fromFdoDinero(l.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !ae.value ? !0 : Ke(a.customAttributes ?? {}, ae.value);
|
|
222
222
|
return D.value.filter((a) => t(a) && e(a)).filter((a) => !b.value || a.type === b.value);
|
|
223
223
|
}), be = S;
|
|
224
224
|
Re(() => z.value.length, () => {
|
|
@@ -295,7 +295,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
295
295
|
}
|
|
296
296
|
}).onPrimary(() => k.value.duplicateGroup(t));
|
|
297
297
|
}
|
|
298
|
-
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler),
|
|
298
|
+
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), K = g(() => new pt(ee.value, u, h.updateMenu, f)), te = g(() => new rt(B.value, u, h.updateMenu, f)), Ce = (t) => {
|
|
299
299
|
let e = t;
|
|
300
300
|
function a(l) {
|
|
301
301
|
const F = u.state.menu.modules.group.find((o) => o._id === l._id), p = (l.items ?? []).reduce((o, O) => (o[O._id] = [...o[O._id] || [], O.combinationKey || ""], o), {}), Y = (F.items ?? []).filter((o) => {
|
|
@@ -314,7 +314,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
314
314
|
}
|
|
315
315
|
if (c.value) {
|
|
316
316
|
let l;
|
|
317
|
-
ee.value ? B.value ? l =
|
|
317
|
+
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
318
|
const i = a(l);
|
|
319
319
|
e = new ge(u, h.updateMenu, f).mapGroups([i], !0)[0];
|
|
320
320
|
}
|
|
@@ -486,7 +486,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
486
486
|
}), Ae = async (t) => {
|
|
487
487
|
const e = ct(t), a = e.group, l = mt(a, re(t));
|
|
488
488
|
if (c.value)
|
|
489
|
-
ee.value ? (B.value ?
|
|
489
|
+
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
490
|
else {
|
|
491
491
|
const i = {
|
|
492
492
|
module: v.F_MENU_MODULE_V4_KEY.enum.group,
|
|
@@ -512,9 +512,9 @@ const vt = /* @__PURE__ */ X({
|
|
|
512
512
|
} = le(), Pe = g(() => {
|
|
513
513
|
var t;
|
|
514
514
|
return ((t = R.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
|
|
515
|
-
}),
|
|
515
|
+
}), j = E(!1), J = E(null);
|
|
516
516
|
async function Ve() {
|
|
517
|
-
|
|
517
|
+
j.value = !j.value, j.value && (await fe(), J.value && J.value.toggleProperty(!0));
|
|
518
518
|
}
|
|
519
519
|
const de = () => y.value.multiScheduler ? s(Xe, null, {
|
|
520
520
|
append: () => Pe.value ? s("div", {
|
|
@@ -531,7 +531,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
531
531
|
}) : null;
|
|
532
532
|
return (t, e) => {
|
|
533
533
|
const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"), F = M("fm-menu"), p = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
|
|
534
|
-
return m(), w(T, null, [$.value ? (m(),
|
|
534
|
+
return m(), w(T, null, [$.value ? (m(), I(ut, Ee({
|
|
535
535
|
ref_key: "groupManagerFormRef",
|
|
536
536
|
ref: ce,
|
|
537
537
|
key: $.value._id
|
|
@@ -541,7 +541,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
541
541
|
group: $.value,
|
|
542
542
|
"onUpdate:group": e[0] || (e[0] = (o) => $.value = o),
|
|
543
543
|
"onSubmit:group": e[1] || (e[1] = (o) => Ae(o))
|
|
544
|
-
}), null, 16, ["title", "group"])) :
|
|
544
|
+
}), null, 16, ["title", "group"])) : U("", !0), D.value.length === 0 ? (m(), w("div", Ct, [s(Ye, {
|
|
545
545
|
subtitle: r(n)("menu.group.empty.subtitle"),
|
|
546
546
|
title: r(n)("menu.group.empty.title")
|
|
547
547
|
}, Se({
|
|
@@ -554,7 +554,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
554
554
|
}) => [s(a, {
|
|
555
555
|
"prepend-icon": "add",
|
|
556
556
|
label: r(n)("menu.group.actions.add"),
|
|
557
|
-
onClick:
|
|
557
|
+
onClick: Ue(o, ["stop"])
|
|
558
558
|
}, null, 8, ["label", "onClick"])]),
|
|
559
559
|
_: 1
|
|
560
560
|
})]),
|
|
@@ -570,7 +570,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
570
570
|
placeholder: r(n)("menu.group.search.placeholder")
|
|
571
571
|
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = d("div", {
|
|
572
572
|
class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
|
|
573
|
-
}, null, -1)), d("div", Mt, [s(de), Z.value ? (m(),
|
|
573
|
+
}, null, -1)), d("div", Mt, [s(de), Z.value ? (m(), I(Y, {
|
|
574
574
|
key: 0,
|
|
575
575
|
modelValue: _.value,
|
|
576
576
|
"onUpdate:modelValue": e[14] || (e[14] = (o) => _.value = o)
|
|
@@ -596,13 +596,13 @@ const vt = /* @__PURE__ */ X({
|
|
|
596
596
|
onClick: e[13] || (e[13] = (o) => b.value = "DYNAMIC")
|
|
597
597
|
}, G(r(n)("menu.group.type.dynamic")), 1)])]),
|
|
598
598
|
_: 1
|
|
599
|
-
}, 8, ["modelValue"])) :
|
|
599
|
+
}, 8, ["modelValue"])) : U("", !0)]), j.value ? (m(), w("div", Gt, [s(r(ve), {
|
|
600
600
|
ref_key: "attributeFilterRef",
|
|
601
601
|
ref: J,
|
|
602
602
|
attributes: r(q),
|
|
603
603
|
modelValue: r(N),
|
|
604
604
|
"onUpdate:modelValue": e[15] || (e[15] = (o) => Q(N) ? N.value = o : null)
|
|
605
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
605
|
+
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(r(Be), {
|
|
606
606
|
class: W(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
607
607
|
"model-value": z.value,
|
|
608
608
|
group: "categories",
|
|
@@ -615,13 +615,13 @@ const vt = /* @__PURE__ */ X({
|
|
|
615
615
|
}) => [(m(), w("div", {
|
|
616
616
|
key: o._id,
|
|
617
617
|
class: W(["py-12 px-16", "flex space-x-16", "items-center"])
|
|
618
|
-
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(), w("p", Rt, G(r(H.capitalize)(o.type)) + " type ", 1)) :
|
|
618
|
+
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(), w("p", Rt, G(r(H.capitalize)(o.type)) + " type ", 1)) : U("", !0), d("p", Et, G(r(n)("menu.group.list.products_linked", {
|
|
619
619
|
count: o.itemsLinked.length
|
|
620
620
|
})), 1)])]), s(ie, {
|
|
621
621
|
group: o
|
|
622
622
|
}, null, 8, ["group"])])]))]),
|
|
623
623
|
_: 1
|
|
624
|
-
}, 8, ["model-value"])], 64)) : (m(), w("div", Ot, [d("div", xt, [s(de), Z.value ? (m(),
|
|
624
|
+
}, 8, ["model-value"])], 64)) : (m(), w("div", Ot, [d("div", xt, [s(de), Z.value ? (m(), I(F, {
|
|
625
625
|
key: 0
|
|
626
626
|
}, {
|
|
627
627
|
"menu-button": x(() => [s(l, {
|
|
@@ -649,18 +649,18 @@ const vt = /* @__PURE__ */ X({
|
|
|
649
649
|
onClick: e[5] || (e[5] = (o) => b.value = "DYNAMIC")
|
|
650
650
|
}, null, 8, ["label"])])]),
|
|
651
651
|
_: 1
|
|
652
|
-
})) :
|
|
652
|
+
})) : U("", !0), d("div", Dt, [s(p, {
|
|
653
653
|
autofocus: "",
|
|
654
654
|
modelValue: r(C),
|
|
655
655
|
"onUpdate:modelValue": e[6] || (e[6] = (o) => Q(C) ? C.value = o : null),
|
|
656
656
|
placeholder: r(n)("menu.group.search.placeholder")
|
|
657
|
-
}, null, 8, ["modelValue", "placeholder"])])]),
|
|
657
|
+
}, null, 8, ["modelValue", "placeholder"])])]), j.value ? (m(), w("div", At, [s(r(ve), {
|
|
658
658
|
ref_key: "attributeFilterRef",
|
|
659
659
|
ref: J,
|
|
660
660
|
attributes: r(q),
|
|
661
661
|
modelValue: r(N),
|
|
662
662
|
"onUpdate:modelValue": e[7] || (e[7] = (o) => Q(N) ? N.value = o : null)
|
|
663
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
663
|
+
}, null, 8, ["attributes", "modelValue"])])) : U("", !0), s(Ze, null, {
|
|
664
664
|
default: x(() => [s(P, {
|
|
665
665
|
"column-defs": xe.value,
|
|
666
666
|
"column-visibility": De.value,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as N, useModel as K, computed as B, resolveComponent as d, createBlock as
|
|
1
|
+
import { defineComponent as N, useModel as K, computed as B, resolveComponent as d, createBlock as P, openBlock as b, ref as L, watch as W, withCtx as _, createElementBlock as F, createElementVNode as I, 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-CTfRyTuS.js";
|
|
5
5
|
import { b as O } from "./app-5fxKLAzS.js";
|
|
6
6
|
import { FmButtonVariant as Z, useDialog as ne, components as ie, FmButtonColorThemeVariant as j } from "@feedmepos/ui-library";
|
|
7
|
-
import { m as G, f as
|
|
8
|
-
import { L as R } from "./catalogSetting-
|
|
9
|
-
import { L as de } from "./LinkProductSideSheet-
|
|
10
|
-
import { c as
|
|
11
|
-
import { u as pe,
|
|
7
|
+
import { m as G, f as Y, d as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
8
|
+
import { L as R } from "./catalogSetting-DjGqI2Vf.js";
|
|
9
|
+
import { L as de } from "./LinkProductSideSheet-BjcQDT4U.js";
|
|
10
|
+
import { c as H } from "./check-C9mY6LiX.js";
|
|
11
|
+
import { u as pe, I as J, am as ce } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
12
12
|
import { c as ve } from "./string-DpfFixWH.js";
|
|
13
13
|
const fe = /* @__PURE__ */ N({
|
|
14
14
|
__name: "LinkPriceTier",
|
|
@@ -24,7 +24,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
24
24
|
})));
|
|
25
25
|
return (V, g) => {
|
|
26
26
|
const i = d("FmSelect");
|
|
27
|
-
return b(),
|
|
27
|
+
return b(), P(i, {
|
|
28
28
|
items: a.value,
|
|
29
29
|
"model-value": r.value ?? [],
|
|
30
30
|
multiselect: !0,
|
|
@@ -64,8 +64,8 @@ const fe = /* @__PURE__ */ N({
|
|
|
64
64
|
return {
|
|
65
65
|
priceTier: p.priceTier,
|
|
66
66
|
restaurantRule: {
|
|
67
|
-
restaurantAttributes:
|
|
68
|
-
restaurantCustomAttributes:
|
|
67
|
+
restaurantAttributes: Y((c = p.restaurantRule) == null ? void 0 : c.restaurantAttributes),
|
|
68
|
+
restaurantCustomAttributes: Y((n = p.restaurantRule) == null ? void 0 : n.restaurantCustomAttributes)
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
});
|
|
@@ -101,13 +101,13 @@ const fe = /* @__PURE__ */ N({
|
|
|
101
101
|
}
|
|
102
102
|
return (l, p) => {
|
|
103
103
|
const c = d("FmSelect"), n = d("fm-button"), v = d("FmCard"), E = d("FmButton");
|
|
104
|
-
return b(),
|
|
105
|
-
default: _(() => [(b(!0), F(q, null, X(o.value, (M, S) => (b(),
|
|
104
|
+
return b(), P(me, null, {
|
|
105
|
+
default: _(() => [(b(!0), F(q, null, X(o.value, (M, S) => (b(), P(v, {
|
|
106
106
|
key: S,
|
|
107
107
|
class: "p-16 space-y-16",
|
|
108
108
|
variant: "outlined"
|
|
109
109
|
}, {
|
|
110
|
-
default: _(() => [
|
|
110
|
+
default: _(() => [I("div", null, [u(c, {
|
|
111
111
|
label: "Price groups",
|
|
112
112
|
"label-mark": "required",
|
|
113
113
|
items: s.value,
|
|
@@ -138,13 +138,13 @@ const fe = /* @__PURE__ */ N({
|
|
|
138
138
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])];
|
|
139
139
|
}),
|
|
140
140
|
_: 2
|
|
141
|
-
}, 1032, ["label"]),
|
|
141
|
+
}, 1032, ["label"]), I("div", _e, [u(n, {
|
|
142
142
|
variant: e(Z).Tertiary,
|
|
143
143
|
"prepend-icon": "delete",
|
|
144
144
|
onClick: (f) => A(S)
|
|
145
145
|
}, null, 8, ["variant", "onClick"])])]),
|
|
146
146
|
_: 2
|
|
147
|
-
}, 1024))), 128)),
|
|
147
|
+
}, 1024))), 128)), I("div", null, [u(E, {
|
|
148
148
|
label: "Add rule",
|
|
149
149
|
onClick: t
|
|
150
150
|
})])]),
|
|
@@ -178,7 +178,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
178
178
|
}
|
|
179
179
|
return (s, t) => {
|
|
180
180
|
const A = d("fm-radio"), k = d("fm-radio-group");
|
|
181
|
-
return !s.isMainCatalog && s.isV4 && e(V).priceTiers.value.length > 0 ? (b(),
|
|
181
|
+
return !s.isMainCatalog && s.isV4 && e(V).priceTiers.value.length > 0 ? (b(), P(x, {
|
|
182
182
|
key: 0,
|
|
183
183
|
label: e(a)("menu.price_tier.link_price_tier")
|
|
184
184
|
}, {
|
|
@@ -241,7 +241,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
241
241
|
const r = T, o = pe();
|
|
242
242
|
ne();
|
|
243
243
|
const { t: a } = z(), V = y, g = B(() => r.action === "add" ? a("menu.markup.dialog.title.add") : a("menu.markup.dialog.title.update")), i = L(!1), s = (n) => {
|
|
244
|
-
|
|
244
|
+
H.isBoolean(n) ? i.value = n : i.value = !i.value;
|
|
245
245
|
}, t = L(
|
|
246
246
|
r.modelValue ? J(r.modelValue) : {
|
|
247
247
|
percentage: 0,
|
|
@@ -298,7 +298,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
298
298
|
le(n.$slots, "default", { trigger: s }),
|
|
299
299
|
u(ee, {
|
|
300
300
|
modelValue: i.value,
|
|
301
|
-
"onUpdate:modelValue": v[4] || (v[4] = (
|
|
301
|
+
"onUpdate:modelValue": v[4] || (v[4] = (U) => i.value = U),
|
|
302
302
|
"is-component": e(ie).FmForm,
|
|
303
303
|
"is-component-props": {
|
|
304
304
|
onValidationSuccess: c
|
|
@@ -312,7 +312,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
312
312
|
class: "sm:w-full xs:w-full ml-auto",
|
|
313
313
|
label: "Cancel",
|
|
314
314
|
variant: "tertiary",
|
|
315
|
-
onClick: v[3] || (v[3] = (
|
|
315
|
+
onClick: v[3] || (v[3] = (U) => s(!1))
|
|
316
316
|
}),
|
|
317
317
|
u(C, {
|
|
318
318
|
label: e(ve)(n.action),
|
|
@@ -323,9 +323,9 @@ const fe = /* @__PURE__ */ N({
|
|
|
323
323
|
}, null, 8, ["label"])
|
|
324
324
|
]),
|
|
325
325
|
default: _(() => {
|
|
326
|
-
var
|
|
326
|
+
var U;
|
|
327
327
|
return [
|
|
328
|
-
|
|
328
|
+
I("div", ge, [
|
|
329
329
|
u(M, {
|
|
330
330
|
modelValue: t.value.percentage,
|
|
331
331
|
"onUpdate:modelValue": v[0] || (v[0] = (m) => t.value.percentage = m),
|
|
@@ -333,7 +333,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
333
333
|
max: 100,
|
|
334
334
|
min: 0,
|
|
335
335
|
rules: [
|
|
336
|
-
(m) => e(
|
|
336
|
+
(m) => e(H).isSet(m) && m >= 0 || e(a)("menu.markup.dialog.fields.percentage.required")
|
|
337
337
|
],
|
|
338
338
|
label: e(a)("menu.markup.dialog.fields.percentage.label"),
|
|
339
339
|
placeholder: e(a)("menu.markup.dialog.fields.percentage.placeholder")
|
|
@@ -343,7 +343,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
343
343
|
]),
|
|
344
344
|
_: 1
|
|
345
345
|
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
346
|
-
|
|
346
|
+
I("div", null, [
|
|
347
347
|
u(f, {
|
|
348
348
|
modelValue: k.value,
|
|
349
349
|
"onUpdate:modelValue": [
|
|
@@ -353,7 +353,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
353
353
|
class: "space-y-8"
|
|
354
354
|
}, {
|
|
355
355
|
default: _(() => [
|
|
356
|
-
(b(!0), F(q, null, X(p.value, (m) => (b(),
|
|
356
|
+
(b(!0), F(q, null, X(p.value, (m) => (b(), P(S, {
|
|
357
357
|
key: m.value,
|
|
358
358
|
label: m.label,
|
|
359
359
|
value: m.value
|
|
@@ -361,7 +361,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
361
361
|
]),
|
|
362
362
|
_: 1
|
|
363
363
|
}, 8, ["modelValue"]),
|
|
364
|
-
|
|
364
|
+
I("div", ke, [
|
|
365
365
|
u(de, {
|
|
366
366
|
title: "Link products",
|
|
367
367
|
"categorized-items": e(o).categorizedItems,
|
|
@@ -370,7 +370,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
370
370
|
onSubmit: v[2] || (v[2] = ({ items: m }) => A(m))
|
|
371
371
|
}, {
|
|
372
372
|
default: _(({ trigger: m }) => [
|
|
373
|
-
k.value === 1 ? (b(),
|
|
373
|
+
k.value === 1 ? (b(), P(C, {
|
|
374
374
|
key: 0,
|
|
375
375
|
"text-color": e(j).ColorPrimary,
|
|
376
376
|
"border-color": e(j).ColorPrimary,
|
|
@@ -382,7 +382,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
382
382
|
]),
|
|
383
383
|
_: 1
|
|
384
384
|
}, 8, ["categorized-items", "initial-value"]),
|
|
385
|
-
(
|
|
385
|
+
(U = t.value.includeItems) != null && U.length ? (b(), F("p", Ve, h(e(a)("menu.markup.dialog.products.count", { count: t.value.includeItems.length })), 1)) : $("", !0)
|
|
386
386
|
])
|
|
387
387
|
])
|
|
388
388
|
])
|