@feedmepos/mf-menu 0.31.33-beta.7 → 0.31.33-beta.8
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-CZEABsQj.js → App-BAMi-a9P.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D_ak48OL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BWgnvXjy.js} +20 -20
- package/dist/{Catalog-DS7IAwCI.js → Catalog-DiPY42vz.js} +6 -6
- package/dist/{Category-DKes4JxR.js → Category-B9jnFDvG.js} +14 -14
- package/dist/{Category-Bi3vbTgq.js → Category-ClrACB2e.js} +19 -19
- package/dist/{CookingGuide-Cl-JvfNC.js → CookingGuide-1553FWRH.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C01PGALf.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DWNx15iJ.js} +1 -1
- package/dist/{Group-CDmNdtn6.js → Group-DLahX8qi.js} +3 -3
- package/dist/{Group-CPd33rHj.js → Group-l_-qZSyF.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DLhPMn7r.js → Group.vue_vue_type_script_setup_true_lang-PNpEgEGB.js} +9 -9
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DoVyIdTN.js +364 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DZgnCsAY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DSspLK4i.js} +12597 -12946
- package/dist/{Ingredient-C5iKMG5S.js → Ingredient-SsBtwYjB.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CYb8p8df.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DqnVkfjW.js} +2 -2
- package/dist/LinkProductSideSheet-CncbzDh3.js +335 -0
- package/dist/{MenuSetting-DeLFW5Q0.js → MenuSetting-D28a3uD4.js} +4 -4
- package/dist/{PrintRoute-BptA-_Yt.js → PrintRoute-BdlT0DDr.js} +89 -88
- package/dist/{Product-D5WYsf9P.js → Product-s5Q4wV8i.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-C6iDgQEU.js +1575 -0
- package/dist/{ProductInternalTools-_ml77R5u.js → ProductInternalTools-DjSkvzw2.js} +5 -5
- package/dist/Products-B3tF_gCa.js +283 -0
- package/dist/{Publish-BB_8J3PJ.js → Publish-G4bwUpme.js} +3 -3
- package/dist/{Recipe-Dc7mD-Mu.js → Recipe-BxgHUzb5.js} +4 -4
- package/dist/{Scheduler-H2mx0WJm.js → Scheduler-DJSKWS-9.js} +3 -3
- package/dist/{ServingSequence-GYdFh7RK.js → ServingSequence-_cmuGKlV.js} +3 -3
- package/dist/{Setting-B_-Bv8NR.js → Setting-Dx7ycxAn.js} +5 -5
- package/dist/{Subcategory-CHcCMqcS.js → Subcategory-25AzJQYt.js} +4 -4
- package/dist/{Takeaway-BeDox-sK.js → Takeaway-Bmm9d5PO.js} +1 -1
- package/dist/{Takeaway-BaDz1y8l.js → Takeaway-CcFK-Y2z.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CwWyzrey.js → Takeaway.vue_vue_type_script_setup_true_lang-Bl5OAG3c.js} +5 -5
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-B3-ypwE7.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D2gzS8Q_.js +5990 -0
- package/dist/{Unit-D4uSc8lg.js → Unit-Cs1EOuyg.js} +2 -2
- package/dist/{Variant-MVe8LhBc.js → Variant-BTCkw4RC.js} +3 -3
- package/dist/_id_-C9b2WHzy.js +202 -0
- package/dist/{app-BbIBgy7D.js → app-BhI1mPRh.js} +1 -1
- package/dist/{app-B0ogzdm0.js → app-CU2frfPB.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +3 -1
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +8 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DepVvcGX.js → linked-status-r8YcmOs7.js} +2 -2
- package/dist/assets/{override-menu-Cb7cvOj9.js → override-menu-CDLCS1zK.js} +2 -2
- package/dist/assets/{validate-menu-Hc7m9hHC.js → validate-menu-B-FxrVmM.js} +2 -2
- package/dist/{catalog-_R7Bi_aW.js → catalog-BudDGPc1.js} +1 -1
- package/dist/{catalogSetting-Bnr55VnE.js → catalogSetting-Bk1QEBg5.js} +1 -1
- package/dist/{category-C0kozMAs.js → category-UDpJb7Yh.js} +1 -1
- package/dist/{currency-DFA-7C9k.js → currency-BQIQArxm.js} +1 -1
- package/dist/{dayjs.min-BzOsbxFW.js → dayjs.min-D0EjAkx4.js} +1 -1
- package/dist/{index-asthzgeW.js → index-B_V5s58T.js} +1 -1
- package/dist/{index-LrL2OIsF.js → index-CirrSmpA.js} +3 -3
- package/dist/index-DRuDRGm-.js +213 -0
- package/dist/{index-y3TkmTDS.js → index-Dy-u7imh.js} +3 -3
- package/dist/{item-BHFMgTjL.js → item-C45Oe5Un.js} +196 -194
- package/dist/{jszip.min-BYCWga7V.js → jszip.min-BR_8QNuk.js} +245 -245
- package/dist/{menu-7YBc_V0y.js → menu-D52oU1sw.js} +1 -1
- package/dist/{menu-UNNs3oeu.js → menu-DTlhFcnq.js} +1079 -1070
- package/dist/menuV2-DQtEtGVV.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-I7O5kuz-.js → priceTier-CDyccedV.js} +1 -1
- package/dist/{scheduler-c0cSXqeD.js → scheduler-DHjrtU8G.js} +16 -17
- package/dist/subcategory-0ajMWsb2.js +148 -0
- package/dist/{toExcel-C8d-m0RH.js → toExcel-BNKDwOzQ.js} +2 -2
- package/dist/{unit-B0Bl56gY.js → unit-CBe6cpyB.js} +5 -4
- package/package.json +2 -2
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1ET8Ys.js +0 -372
- package/dist/LinkProductSideSheet-QUllj_xC.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-TwmxZaik.js +0 -1644
- package/dist/Products-BA-G2Yya.js +0 -270
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dp2eaieu.js +0 -6149
- package/dist/_id_-CoMVzmjC.js +0 -178
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +0 -12
- package/dist/customAttributes-C1FljtXt.js +0 -33
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/subcategory-YHkkwrLj.js +0 -817
- /package/dist/{app-DvG3mOom.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_7d7fe73f_lang-DvG3mOom.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as A, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as f, Fragment as
|
|
1
|
+
import { defineComponent as A, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as f, Fragment as Q, renderSlot as re, createVNode as d, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as L, withModifiers as z, getCurrentInstance as ie, renderList as ce, createBlock as U, createCommentVNode as ue } from "vue";
|
|
2
2
|
import { useI18n as j } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as
|
|
3
|
+
import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as X, useBreakpoints as de, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as pe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { D as G, u as ge,
|
|
5
|
+
import { D as G, u as ge, Z as fe, X as _e, G as K, a3 as ye, O as q, J as te } from "./menu-DTlhFcnq.js";
|
|
6
6
|
import { _ as ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as he } from "./app-
|
|
7
|
+
import { _ as he } from "./app-CU2frfPB.js";
|
|
8
8
|
import { c as be } from "./createForm-BoUQeZTd.js";
|
|
9
|
-
import { _ as
|
|
9
|
+
import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
10
|
import { u as xe } from "./discardConfirm-BHni0LNu.js";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as H } from "./object-DVUNCr7w.js";
|
|
12
12
|
import { r as Ce } from "./rules-CIWTZQfh.js";
|
|
13
|
-
import { u as J, a as ke } from "./menu-
|
|
13
|
+
import { u as J, a as ke } from "./menu-D52oU1sw.js";
|
|
14
14
|
import { c as we } from "./check-C9mY6LiX.js";
|
|
15
|
-
import { u as Fe } from "./item-
|
|
16
|
-
import { u as oe } from "./category-
|
|
15
|
+
import { u as Fe } from "./item-C45Oe5Un.js";
|
|
16
|
+
import { u as oe } from "./category-UDpJb7Yh.js";
|
|
17
17
|
import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
18
18
|
const $e = {
|
|
19
19
|
class: "fm-typo-en-title-md-600"
|
|
@@ -43,7 +43,7 @@ const $e = {
|
|
|
43
43
|
t
|
|
44
44
|
} = j(), O = F(!1), u = F(!1), M = (o) => {
|
|
45
45
|
we.isBoolean(o) ? u.value = o : u.value = !u.value;
|
|
46
|
-
}, i = F(
|
|
46
|
+
}, i = F(H(_.initialValue)), C = F(""), S = B(() => {
|
|
47
47
|
var k;
|
|
48
48
|
const o = ((k = x.value.find((w) => w.id === i.value.id)) == null ? void 0 : k.items) || [], a = fe(i.value.id);
|
|
49
49
|
return _e(o, (w) => w.code || w.name, a);
|
|
@@ -106,13 +106,13 @@ const $e = {
|
|
|
106
106
|
}, i.value.name), M(!1);
|
|
107
107
|
}
|
|
108
108
|
return se(() => u.value, () => {
|
|
109
|
-
u.value && (i.value =
|
|
109
|
+
u.value && (i.value = H(_.initialValue));
|
|
110
110
|
}), h({
|
|
111
111
|
trigger: M,
|
|
112
112
|
show: u
|
|
113
113
|
}), (o, a) => {
|
|
114
114
|
const k = p("FmTextField"), w = p("FmButton"), ae = p("FmSearch"), ne = p("FmTable"), W = p("fm-button"), le = p("fm-side-sheet");
|
|
115
|
-
return f(), E(
|
|
115
|
+
return f(), E(Q, null, [re(o.$slots, "default", {
|
|
116
116
|
trigger: M
|
|
117
117
|
}), d(le, {
|
|
118
118
|
id: "group-form",
|
|
@@ -140,7 +140,7 @@ const $e = {
|
|
|
140
140
|
variant: "tertiary",
|
|
141
141
|
onClick: a[3] || (a[3] = () => u.value = !1)
|
|
142
142
|
}, null, 8, ["label"])])]),
|
|
143
|
-
default: g(() => [n("div", Me, [d(
|
|
143
|
+
default: g(() => [n("div", Me, [d(Z, {
|
|
144
144
|
title: e(t)("menu.category.detail")
|
|
145
145
|
}, {
|
|
146
146
|
default: g(() => [d(k, {
|
|
@@ -151,7 +151,7 @@ const $e = {
|
|
|
151
151
|
rules: [e(Ce)]
|
|
152
152
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])]),
|
|
153
153
|
_: 1
|
|
154
|
-
}, 8, ["title"]), d(
|
|
154
|
+
}, 8, ["title"]), d(Z, {
|
|
155
155
|
title: e(t)("menu.category.products.title"),
|
|
156
156
|
class: "flex-1 min-h-0",
|
|
157
157
|
shrinkable: !0
|
|
@@ -274,7 +274,7 @@ const $e = {
|
|
|
274
274
|
primaryActions: {
|
|
275
275
|
text: "Remove",
|
|
276
276
|
close: !0,
|
|
277
|
-
variant:
|
|
277
|
+
variant: X.Destructive
|
|
278
278
|
},
|
|
279
279
|
secondaryActions: {
|
|
280
280
|
text: "Cancel",
|
|
@@ -310,7 +310,7 @@ const $e = {
|
|
|
310
310
|
placeholder: e(t)("menu.common.labels.search_placeholder", {
|
|
311
311
|
type: "categories"
|
|
312
312
|
})
|
|
313
|
-
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(
|
|
313
|
+
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(Q, null, ce(x.value, (c) => (f(), E("div", {
|
|
314
314
|
key: c.id || "",
|
|
315
315
|
class: "flex flex-row py-12 px-16",
|
|
316
316
|
onClick: (o) => C(c)
|
|
@@ -318,7 +318,7 @@ const $e = {
|
|
|
318
318
|
count: c.items.length
|
|
319
319
|
})), 1)]), d(I, {
|
|
320
320
|
"text-color": e(me).NeutralGray400,
|
|
321
|
-
variant: e(
|
|
321
|
+
variant: e(X).Tertiary,
|
|
322
322
|
"prepend-icon": "delete",
|
|
323
323
|
disabled: !c.id,
|
|
324
324
|
onClick: z((o) => u(c), ["stop"])
|
|
@@ -347,7 +347,7 @@ const $e = {
|
|
|
347
347
|
})]));
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Je = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" },
|
|
350
|
+
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Je = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Xe = { class: "fm-typo-en-body-md-600 font-semibold" }, gt = /* @__PURE__ */ A({
|
|
351
351
|
__name: "Category",
|
|
352
352
|
setup(N) {
|
|
353
353
|
const h = ee(), _ = Y(), V = G(_), b = q(V), $ = oe({ dialog: h, menuLoader: b }), { categories: m } = J(), { t: r } = j();
|
|
@@ -373,7 +373,7 @@ const $e = {
|
|
|
373
373
|
n("div", qe, [
|
|
374
374
|
n("div", Je, [
|
|
375
375
|
n("div", We, [
|
|
376
|
-
n("p",
|
|
376
|
+
n("p", Xe, T(t.value), 1)
|
|
377
377
|
])
|
|
378
378
|
]),
|
|
379
379
|
e(m).length > 0 ? (f(), U(pe, {
|
|
@@ -2,12 +2,12 @@ import { defineComponent as ae, ref as w, computed as V, resolveComponent as x,
|
|
|
2
2
|
import { useI18n as se } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as ue, useSnackbar as be, useDialog as ye } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ke } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as he } from "./app-
|
|
6
|
-
import { H as ee, I as me, J as re, G as oe, u as xe, O as Ce, D as we } from "./menu-
|
|
5
|
+
import { _ as he } from "./app-CU2frfPB.js";
|
|
6
|
+
import { H as ee, I as me, J as re, G as oe, u as xe, O as Ce, D as we } from "./menu-DTlhFcnq.js";
|
|
7
7
|
import { d as Fe } from "./vuedraggable-CK8z7qA8.js";
|
|
8
8
|
import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
9
9
|
import { u as pe } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import { L as Ve } from "./LinkProductSideSheet-
|
|
10
|
+
import { L as Ve } from "./LinkProductSideSheet-CncbzDh3.js";
|
|
11
11
|
import { _ as Se } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
12
12
|
import { _ as Ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
13
13
|
const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = { class: "space-y-32" }, Ke = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, De = { class: "px-16 py-8 w-[40%]" }, Le = { class: "px-16 py-8 grow" }, Ne = { class: "px-16 py-8 w-[40%]" }, Ge = { class: "px-16 py-8 grow" }, Ue = { class: "space-y-16" }, Te = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Be = { class: "flex gap-8 items-center justify-start" }, Me = /* @__PURE__ */ ae({
|
|
@@ -381,7 +381,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
381
381
|
(r) => r.productId === e && r.combinationKey == o
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
-
function n(e) {
|
|
384
|
+
function n({ items: e }) {
|
|
385
385
|
const o = e.reduce((r, c) => (r[c._id] = r[c._id] ?? [], c.combinationKey && (r[c._id] = [...r[c._id], c.combinationKey]), r), {}), b = Object.entries(o).reduce(
|
|
386
386
|
(r, [c, Q]) => {
|
|
387
387
|
var te;
|
|
@@ -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 "./menu-
|
|
4
|
+
import { u as D } from "./menu-DTlhFcnq.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-PNpEgEGB.js";
|
|
6
|
+
import { A as b } from "./item-C45Oe5Un.js";
|
|
7
|
+
import { a as h } from "./menu-D52oU1sw.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,22 +1,22 @@
|
|
|
1
1
|
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as U, openBlock as m, withCtx as x, createElementBlock as C, Fragment as T, renderList as oe, createElementVNode as p, normalizeClass as W, toDisplayString as G, createVNode as s, ref as E, renderSlot as Ne, unref as r, createCommentVNode as I, watch as Re, h as de, mergeProps as Ee, createSlots as Se, withModifiers as Ie, isRef as Q, nextTick as fe } from "vue";
|
|
2
|
-
import { I as H, u as ne, O as Ue, D as Te, G as v, B as $e, A as Ye, J as Le } from "./menu-
|
|
2
|
+
import { I as H, u as ne, O as Ue, D as Te, G as v, B as $e, A as Ye, J as Le } from "./menu-DTlhFcnq.js";
|
|
3
3
|
import { d as ze } from "./vuedraggable-CK8z7qA8.js";
|
|
4
|
-
import { b as ve, H as je } from "./
|
|
4
|
+
import { b as ve, H as je } from "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_7d7fe73f_lang-DvG3mOom.js";
|
|
5
5
|
import { useI18n as le, useCoreStore as Be } from "@feedmepos/mf-common";
|
|
6
6
|
import { useBreakpoints as ye, components as _e, useSnackbar as Ke, useDialog as He, FmButtonVariant as qe } from "@feedmepos/ui-library";
|
|
7
|
-
import { _ as Je } from "./app-
|
|
7
|
+
import { _ as Je } from "./app-CU2frfPB.js";
|
|
8
8
|
import { _ as Qe, a as We } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
9
9
|
import { c as Xe } from "./object-DVUNCr7w.js";
|
|
10
|
-
import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-DWNx15iJ.js";
|
|
11
11
|
import { u as tt } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { _ as ot } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { _ as ot } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BWgnvXjy.js";
|
|
13
13
|
import { c as nt } from "./check-C9mY6LiX.js";
|
|
14
14
|
import { _ as lt } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
15
|
-
import { M as ge, x as at, y as rt, A as ut, e as st, j as it, r as ct } from "./item-
|
|
16
|
-
import { u as mt } from "./
|
|
15
|
+
import { M as ge, x as at, y as rt, A as ut, e as st, j as it, r as ct } from "./item-C45Oe5Un.js";
|
|
16
|
+
import { u as mt } from "./LinkProductSideSheet-CncbzDh3.js";
|
|
17
17
|
import { u as pt } from "./search-BAPEUu1R.js";
|
|
18
|
-
import { C as dt } from "./catalog-
|
|
19
|
-
import { c as ft } from "./
|
|
18
|
+
import { C as dt } from "./catalog-BudDGPc1.js";
|
|
19
|
+
import { c as ft } from "./menuV2-DQtEtGVV.js";
|
|
20
20
|
const vt = /* @__PURE__ */ X({
|
|
21
21
|
__name: "ResponsiveContextMenu",
|
|
22
22
|
props: {
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { defineComponent as B, useModel as G, computed as A, resolveComponent as p, createBlock as S, openBlock as v, ref as I, watch as H, withCtx as _, createElementBlock as C, createElementVNode as M, Fragment as z, renderList as Y, createVNode as u, unref as e, createCommentVNode as U, withModifiers as q, onMounted as Z, renderSlot as ee, toDisplayString as D, createTextVNode as le } from "vue";
|
|
2
|
+
import { useI18n as L, useCoreStore as te } from "@feedmepos/mf-common";
|
|
3
|
+
import { E as x, i as ae, c as h, u as oe, a as J, L as re } from "./LinkProductSideSheet-CncbzDh3.js";
|
|
4
|
+
import { u as w } from "./priceTier-CDyccedV.js";
|
|
5
|
+
import { x as ue, N as ne, b as ie } from "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_7d7fe73f_lang-DvG3mOom.js";
|
|
6
|
+
import { FmButtonVariant as K, useDialog as se, components as me, FmButtonColorThemeVariant as j } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as de } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
|
+
import { L as y } from "./catalogSetting-Bk1QEBg5.js";
|
|
9
|
+
import { c as O } from "./check-C9mY6LiX.js";
|
|
10
|
+
import { u as pe, H as Q, aj as ce } from "./menu-DTlhFcnq.js";
|
|
11
|
+
import { c as ve } from "./string-DpfFixWH.js";
|
|
12
|
+
const fe = /* @__PURE__ */ B({
|
|
13
|
+
__name: "LinkPriceTier",
|
|
14
|
+
props: {
|
|
15
|
+
modelValue: { required: !0 },
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(k) {
|
|
20
|
+
const { t: T } = L(), o = G(k, "modelValue"), r = w(), a = A(() => r.priceTiers.value.map((b) => ({
|
|
21
|
+
label: b.key,
|
|
22
|
+
value: b.key
|
|
23
|
+
})));
|
|
24
|
+
return (b, f) => {
|
|
25
|
+
const i = p("FmSelect");
|
|
26
|
+
return v(), S(i, {
|
|
27
|
+
items: a.value,
|
|
28
|
+
"model-value": o.value ?? [],
|
|
29
|
+
multiselect: !0,
|
|
30
|
+
keepSelectionOrder: !0,
|
|
31
|
+
"onUpdate:modelValue": f[0] || (f[0] = (s) => o.value = s)
|
|
32
|
+
}, null, 8, ["items", "model-value"]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}), _e = {
|
|
36
|
+
class: "flex justify-end"
|
|
37
|
+
}, be = /* @__PURE__ */ B({
|
|
38
|
+
__name: "PriceTierRuleEditor",
|
|
39
|
+
props: {
|
|
40
|
+
modelValue: {
|
|
41
|
+
required: !0
|
|
42
|
+
},
|
|
43
|
+
modelModifiers: {}
|
|
44
|
+
},
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(k) {
|
|
47
|
+
var V;
|
|
48
|
+
const {
|
|
49
|
+
t: T
|
|
50
|
+
} = L(), o = G(k, "modelValue"), r = I((V = o.value) == null ? void 0 : V.map((t) => ({
|
|
51
|
+
...t,
|
|
52
|
+
restaurantAttributes: ae(t.restaurantAttributes) ? x : ue.build(t.restaurantAttributes)
|
|
53
|
+
})));
|
|
54
|
+
H(r, (t) => {
|
|
55
|
+
o.value = t == null ? void 0 : t.map((n) => ({
|
|
56
|
+
priceTier: n.priceTier,
|
|
57
|
+
restaurantAttributes: h(n.restaurantAttributes) ? null : ne.build(n.restaurantAttributes)
|
|
58
|
+
}));
|
|
59
|
+
}, {
|
|
60
|
+
deep: !0
|
|
61
|
+
});
|
|
62
|
+
const a = w(), {
|
|
63
|
+
attributes: b
|
|
64
|
+
} = oe(te().restaurants, "restaurant");
|
|
65
|
+
function f(t, n) {
|
|
66
|
+
r.value && r.value[t] && (h(n) ? r.value[t].restaurantAttributes = x : r.value[t].restaurantAttributes = n);
|
|
67
|
+
}
|
|
68
|
+
const i = A(() => a.priceTiers.value.map((t) => ({
|
|
69
|
+
value: t.key,
|
|
70
|
+
label: t.key
|
|
71
|
+
})));
|
|
72
|
+
function s() {
|
|
73
|
+
r.value = [...r.value || [], {
|
|
74
|
+
priceTier: "",
|
|
75
|
+
restaurantAttributes: x
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
function l(t) {
|
|
79
|
+
r.value && r.value.splice(t, 1);
|
|
80
|
+
}
|
|
81
|
+
return (t, n) => {
|
|
82
|
+
const N = p("FmSelect"), $ = p("fm-button"), m = p("FmCard"), c = p("FmButton");
|
|
83
|
+
return v(), S(de, null, {
|
|
84
|
+
default: _(() => [(v(!0), C(z, null, Y(r.value, (F, P) => (v(), S(m, {
|
|
85
|
+
key: P,
|
|
86
|
+
class: "p-16 space-y-16",
|
|
87
|
+
variant: "outlined"
|
|
88
|
+
}, {
|
|
89
|
+
default: _(() => [M("div", null, [u(N, {
|
|
90
|
+
label: "Price groups",
|
|
91
|
+
"label-mark": "required",
|
|
92
|
+
items: i.value,
|
|
93
|
+
"model-value": F.priceTier,
|
|
94
|
+
rules: [(g) => !!g || e(T)("menu.common.validation.required_field")],
|
|
95
|
+
"onUpdate:modelValue": (g) => F.priceTier = g
|
|
96
|
+
}, null, 8, ["items", "model-value", "rules", "onUpdate:modelValue"])]), u(J, {
|
|
97
|
+
label: "Restaurant filter"
|
|
98
|
+
}, {
|
|
99
|
+
default: _(() => [u(e(ie), {
|
|
100
|
+
attributes: e(b),
|
|
101
|
+
"model-value": F.restaurantAttributes,
|
|
102
|
+
"onUpdate:modelValue": (g) => f(P, g)
|
|
103
|
+
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])]),
|
|
104
|
+
_: 2
|
|
105
|
+
}, 1024), M("div", _e, [u($, {
|
|
106
|
+
variant: e(K).Tertiary,
|
|
107
|
+
"prepend-icon": "delete",
|
|
108
|
+
onClick: (g) => l(P)
|
|
109
|
+
}, null, 8, ["variant", "onClick"])])]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1024))), 128)), M("div", null, [u(c, {
|
|
112
|
+
label: "Add rule",
|
|
113
|
+
onClick: s
|
|
114
|
+
})])]),
|
|
115
|
+
_: 1
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}), Be = /* @__PURE__ */ B({
|
|
120
|
+
__name: "LinkPriceTierSection",
|
|
121
|
+
props: {
|
|
122
|
+
modelValue: {},
|
|
123
|
+
isMainCatalog: {
|
|
124
|
+
type: Boolean
|
|
125
|
+
},
|
|
126
|
+
isV4: {
|
|
127
|
+
type: Boolean
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
emits: ["update:modelValue"],
|
|
131
|
+
setup(k, {
|
|
132
|
+
emit: T
|
|
133
|
+
}) {
|
|
134
|
+
const o = k, r = T, {
|
|
135
|
+
t: a
|
|
136
|
+
} = L(), b = w(), f = I(o.modelValue.priceTierRules && o.modelValue.priceTierRules.length > 0 ? y.Rules : y.Normal);
|
|
137
|
+
function i(s) {
|
|
138
|
+
r("update:modelValue", {
|
|
139
|
+
...o.modelValue,
|
|
140
|
+
...s
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return (s, l) => {
|
|
144
|
+
const V = p("fm-radio"), t = p("fm-radio-group");
|
|
145
|
+
return !s.isMainCatalog && s.isV4 && e(b).priceTiers.value.length > 0 ? (v(), S(J, {
|
|
146
|
+
key: 0,
|
|
147
|
+
label: e(a)("menu.price_tier.link_price_tier")
|
|
148
|
+
}, {
|
|
149
|
+
default: _(() => [u(t, {
|
|
150
|
+
"model-value": f.value,
|
|
151
|
+
"onUpdate:modelValue": l[4] || (l[4] = (n) => {
|
|
152
|
+
f.value = n, n === e(y).Normal && i({
|
|
153
|
+
priceTierRules: null
|
|
154
|
+
});
|
|
155
|
+
})
|
|
156
|
+
}, {
|
|
157
|
+
default: _(() => [u(V, {
|
|
158
|
+
value: e(y).Normal,
|
|
159
|
+
label: e(a)("menu.price_tier.link_price_group"),
|
|
160
|
+
sublabel: e(a)("menu.price_tier.link_price_group_description")
|
|
161
|
+
}, null, 8, ["value", "label", "sublabel"]), f.value === e(y).Normal ? (v(), C("div", {
|
|
162
|
+
key: 0,
|
|
163
|
+
onClick: l[1] || (l[1] = q(() => {
|
|
164
|
+
}, ["prevent"])),
|
|
165
|
+
class: "pl-32"
|
|
166
|
+
}, [u(fe, {
|
|
167
|
+
"model-value": s.modelValue.usePriceTiers,
|
|
168
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => i({
|
|
169
|
+
usePriceTiers: n
|
|
170
|
+
}))
|
|
171
|
+
}, null, 8, ["model-value"])])) : U("", !0), u(V, {
|
|
172
|
+
value: e(y).Rules,
|
|
173
|
+
label: e(a)("menu.price_tier.price_group_rule"),
|
|
174
|
+
sublabel: e(a)("menu.price_tier.price_group_rule_description")
|
|
175
|
+
}, null, 8, ["value", "label", "sublabel"]), f.value === e(y).Rules ? (v(), C("div", {
|
|
176
|
+
key: 1,
|
|
177
|
+
onClick: l[3] || (l[3] = q(() => {
|
|
178
|
+
}, ["prevent"])),
|
|
179
|
+
class: "pl-32"
|
|
180
|
+
}, [u(be, {
|
|
181
|
+
"model-value": s.modelValue.priceTierRules,
|
|
182
|
+
"onUpdate:modelValue": l[2] || (l[2] = (n) => i({
|
|
183
|
+
priceTierRules: n
|
|
184
|
+
}))
|
|
185
|
+
}, null, 8, ["model-value"])])) : U("", !0)]),
|
|
186
|
+
_: 1
|
|
187
|
+
}, 8, ["model-value"])]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["label"])) : U("", !0);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
}), ge = { class: "space-y-16" }, ke = { class: "ml-32 mt-16 space-y-8" }, Ve = {
|
|
193
|
+
key: 0,
|
|
194
|
+
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
195
|
+
}, Le = /* @__PURE__ */ B({
|
|
196
|
+
__name: "GroupMarkupPriceDialog",
|
|
197
|
+
props: {
|
|
198
|
+
modelValue: {},
|
|
199
|
+
items: {},
|
|
200
|
+
categories: {},
|
|
201
|
+
action: {}
|
|
202
|
+
},
|
|
203
|
+
emits: ["update:model-value"],
|
|
204
|
+
setup(k, { emit: T }) {
|
|
205
|
+
const o = k, r = pe();
|
|
206
|
+
se();
|
|
207
|
+
const { t: a } = L(), b = T, f = A(() => o.action === "add" ? a("menu.markup.dialog.title.add") : a("menu.markup.dialog.title.update")), i = I(!1), s = (m) => {
|
|
208
|
+
O.isBoolean(m) ? i.value = m : i.value = !i.value;
|
|
209
|
+
}, l = I(
|
|
210
|
+
o.modelValue ? Q(o.modelValue) : {
|
|
211
|
+
percentage: 0,
|
|
212
|
+
includeItems: null
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
H(
|
|
216
|
+
() => i.value,
|
|
217
|
+
(m) => {
|
|
218
|
+
m && (l.value = o.modelValue ? Q(o.modelValue) : {
|
|
219
|
+
percentage: 0,
|
|
220
|
+
includeItems: null
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
), A(
|
|
224
|
+
() => ce(r.variants, o.categories, o.items)
|
|
225
|
+
);
|
|
226
|
+
function V(m) {
|
|
227
|
+
l.value = {
|
|
228
|
+
...l.value,
|
|
229
|
+
includeItems: m
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const t = I(
|
|
233
|
+
0
|
|
234
|
+
/* ALL */
|
|
235
|
+
);
|
|
236
|
+
function n(m) {
|
|
237
|
+
t.value = m, l.value = {
|
|
238
|
+
...l.value,
|
|
239
|
+
includeItems: m === 0 ? null : []
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
const N = A(() => [
|
|
243
|
+
{
|
|
244
|
+
label: a("menu.markup.dialog.options.all"),
|
|
245
|
+
value: 0
|
|
246
|
+
/* ALL */
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: a("menu.markup.dialog.options.custom"),
|
|
250
|
+
value: 1
|
|
251
|
+
/* CUSTOM */
|
|
252
|
+
}
|
|
253
|
+
]);
|
|
254
|
+
async function $() {
|
|
255
|
+
b("update:model-value", l.value), s(!1);
|
|
256
|
+
}
|
|
257
|
+
return Z(() => {
|
|
258
|
+
t.value = l.value && l.value.includeItems === null ? 0 : 1;
|
|
259
|
+
}), (m, c) => {
|
|
260
|
+
const F = p("fm-icon"), P = p("fm-stepper-field"), g = p("fm-radio"), W = p("fm-radio-group"), E = p("fm-button"), X = p("fm-dialog");
|
|
261
|
+
return v(), C(z, null, [
|
|
262
|
+
ee(m.$slots, "default", { trigger: s }),
|
|
263
|
+
u(X, {
|
|
264
|
+
modelValue: i.value,
|
|
265
|
+
"onUpdate:modelValue": c[4] || (c[4] = (R) => i.value = R),
|
|
266
|
+
"is-component": e(me).FmForm,
|
|
267
|
+
"is-component-props": {
|
|
268
|
+
onValidationSuccess: $
|
|
269
|
+
}
|
|
270
|
+
}, {
|
|
271
|
+
"dialog-header": _(() => [
|
|
272
|
+
le(D(f.value), 1)
|
|
273
|
+
]),
|
|
274
|
+
"dialog-footer": _(() => [
|
|
275
|
+
u(E, {
|
|
276
|
+
class: "sm:w-full xs:w-full ml-auto",
|
|
277
|
+
label: "Cancel",
|
|
278
|
+
variant: "tertiary",
|
|
279
|
+
onClick: c[3] || (c[3] = (R) => s(!1))
|
|
280
|
+
}),
|
|
281
|
+
u(E, {
|
|
282
|
+
label: e(ve)(m.action),
|
|
283
|
+
class: "sm:w-full xs:w-full",
|
|
284
|
+
size: "md",
|
|
285
|
+
type: "submit",
|
|
286
|
+
variant: "primary"
|
|
287
|
+
}, null, 8, ["label"])
|
|
288
|
+
]),
|
|
289
|
+
default: _(() => {
|
|
290
|
+
var R;
|
|
291
|
+
return [
|
|
292
|
+
M("div", ge, [
|
|
293
|
+
u(P, {
|
|
294
|
+
modelValue: l.value.percentage,
|
|
295
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => l.value.percentage = d),
|
|
296
|
+
decimal: 0,
|
|
297
|
+
max: 100,
|
|
298
|
+
min: 0,
|
|
299
|
+
rules: [
|
|
300
|
+
(d) => e(O).isSet(d) && d >= 0 || e(a)("menu.markup.dialog.fields.percentage.required")
|
|
301
|
+
],
|
|
302
|
+
label: e(a)("menu.markup.dialog.fields.percentage.label"),
|
|
303
|
+
placeholder: e(a)("menu.markup.dialog.fields.percentage.placeholder")
|
|
304
|
+
}, {
|
|
305
|
+
prepend: _(() => [
|
|
306
|
+
u(F, { name: "percent" })
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
310
|
+
M("div", null, [
|
|
311
|
+
u(W, {
|
|
312
|
+
modelValue: t.value,
|
|
313
|
+
"onUpdate:modelValue": [
|
|
314
|
+
c[1] || (c[1] = (d) => t.value = d),
|
|
315
|
+
n
|
|
316
|
+
],
|
|
317
|
+
class: "space-y-8"
|
|
318
|
+
}, {
|
|
319
|
+
default: _(() => [
|
|
320
|
+
(v(!0), C(z, null, Y(N.value, (d) => (v(), S(g, {
|
|
321
|
+
key: d.value,
|
|
322
|
+
label: d.label,
|
|
323
|
+
value: d.value
|
|
324
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
}, 8, ["modelValue"]),
|
|
328
|
+
M("div", ke, [
|
|
329
|
+
u(re, {
|
|
330
|
+
title: "Link products",
|
|
331
|
+
"categorized-items": e(r).categorizedItems,
|
|
332
|
+
"initial-value": l.value.includeItems || [],
|
|
333
|
+
"show-variant": !1,
|
|
334
|
+
onSubmit: c[2] || (c[2] = ({ items: d }) => V(d))
|
|
335
|
+
}, {
|
|
336
|
+
default: _(({ trigger: d }) => [
|
|
337
|
+
t.value === 1 ? (v(), S(E, {
|
|
338
|
+
key: 0,
|
|
339
|
+
"text-color": e(j).ColorPrimary,
|
|
340
|
+
"border-color": e(j).ColorPrimary,
|
|
341
|
+
variant: e(K).Secondary,
|
|
342
|
+
label: e(a)("menu.markup.dialog.products.link"),
|
|
343
|
+
"prepend-icon": "link",
|
|
344
|
+
onClick: d
|
|
345
|
+
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])) : U("", !0)
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
}, 8, ["categorized-items", "initial-value"]),
|
|
349
|
+
(R = l.value.includeItems) != null && R.length ? (v(), C("p", Ve, D(e(a)("menu.markup.dialog.products.count", { count: l.value.includeItems.length })), 1)) : U("", !0)
|
|
350
|
+
])
|
|
351
|
+
])
|
|
352
|
+
])
|
|
353
|
+
];
|
|
354
|
+
}),
|
|
355
|
+
_: 1
|
|
356
|
+
}, 8, ["modelValue", "is-component", "is-component-props"])
|
|
357
|
+
], 64);
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
export {
|
|
362
|
+
Le as _,
|
|
363
|
+
Be as a
|
|
364
|
+
};
|