@feedmepos/mf-menu 0.31.71-alpha.1 → 0.31.72
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-C1efkJzL.js → App-CvauiBxh.js} +1441 -2545
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BHDnLuRy.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BK9XcgvQ.js} +3 -3
- package/dist/{Catalog-BJjTCl9l.js → Catalog-CBdU6H-7.js} +26 -26
- package/dist/{Category-C35HseX2.js → Category-BFO9_FCp.js} +35 -35
- package/dist/{Category-CxrTHk1Y.js → Category-DkKEXvEF.js} +22 -22
- package/dist/{CookingGuide-BwEQicZ8.js → CookingGuide-E34vwLgw.js} +113 -113
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DhiJEKXO.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlnAxQwE.js} +1 -1
- package/dist/{Group-2MAzdN5P.js → Group-Bcc1Z7D-.js} +1 -1
- package/dist/{Group-C_AO4FGn.js → Group-CpSycfFA.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DjEPQI2w.js → Group.vue_vue_type_script_setup_true_lang-CWIHfDqh.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Cttg3YhQ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B8tJzkEO.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-8pgeYhp4.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BGWmkL9R.js} +21 -22
- package/dist/{Ingredient-CL_5yWPs.js → Ingredient-0Cg2IcHV.js} +23 -23
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Di42poKp.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Dztd7mAs.js} +2 -2
- package/dist/{LinkProductSideSheet-Buso155W.js → LinkProductSideSheet-CiRZO3uN.js} +3 -3
- package/dist/{MenuSetting-CnREg4Yu.js → MenuSetting-Bv4sWdlj.js} +31 -31
- package/dist/{PrintRoute-C9sWURzn.js → PrintRoute-DP-fjMrF.js} +26 -26
- package/dist/{Product-BLRDuiIG.js → Product-DgZcdRkv.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BpKLqY3j.js → Product.vue_vue_type_script_setup_true_lang-CpthNypU.js} +71 -71
- package/dist/{ProductInternalTools-Cn2WRqm6.js → ProductInternalTools-CLmYNGLn.js} +16 -16
- package/dist/{Products-BQBfz9A8.js → Products-KrRu9cnx.js} +11 -11
- package/dist/{Publish-DMQ9O69V.js → Publish-C9Wi7dG1.js} +56 -57
- package/dist/{Recipe-CXEZt0zY.js → Recipe-BPdgYfvy.js} +13 -13
- package/dist/{Scheduler-hJTrqBhn.js → Scheduler-C9LCR2Oj.js} +16 -16
- package/dist/{ServingSequence-CctiqLbz.js → ServingSequence-D-OBo-oY.js} +20 -20
- package/dist/{Setting-BrKRjfTn.js → Setting-qITT89Lg.js} +20 -20
- package/dist/{Subcategory-K0jGgZtU.js → Subcategory-kl6ncKqB.js} +19 -19
- package/dist/{Takeaway-o5KBa5oX.js → Takeaway-BOxto2HZ.js} +1 -1
- package/dist/{Takeaway-DiJwhBwl.js → Takeaway-D9GOXVdh.js} +10 -10
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BpgD3grk.js → Takeaway.vue_vue_type_script_setup_true_lang-CbhZLN-r.js} +20 -20
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BCejAD3E.js → Thumbnail.vue_vue_type_script_setup_true_lang-CH9jzjP0.js} +20 -20
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMZfeg2n.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C0NgcFQK.js} +15 -16
- package/dist/{Unit-BAy6O7xD.js → Unit-Dr0n8Nl-.js} +13 -13
- package/dist/{Variant-BtXJASw_.js → Variant-BVvjuGqK.js} +15 -15
- package/dist/{_id_-HD8T1NGg.js → _id_-DqqSN5Lt.js} +14 -14
- package/dist/{app-C7AqPK-c.js → app-B3_2cau3.js} +1 -1
- package/dist/{app-Bp1A4ItJ.js → app-DJ-rQRBU.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +72 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +218 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +81 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +55 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +144 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +165 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +55 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +375 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/tree.d.ts +18 -18
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +81 -0
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +55 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +430 -0
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +375 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +375 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +165 -0
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +81 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +375 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +220 -0
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +52 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-qkReSi42.js +13 -0
- package/dist/assets/override-menu-Dyv1SsFk.js +13 -0
- package/dist/assets/validate-menu-DpF5os-S.js +13 -0
- package/dist/{catalog-XPyE5k4t.js → catalog-DeBJkQdk.js} +1 -1
- package/dist/{catalogSetting-C-A9fWEC.js → catalogSetting-CkZSHD-W.js} +1 -1
- package/dist/{category-DXZrXFYj.js → category-CJKIi291.js} +5 -5
- package/dist/{currency-D939gSij.js → currency-NcUCHGGN.js} +1 -1
- package/dist/{customAttributes-bw8OCoHr.js → customAttributes-Cf1e7I1m.js} +1 -1
- package/dist/{index-BU5aiCzu.js → index-B7ZCIQp2.js} +13 -13
- package/dist/{index-CPb1lDPU.js → index-BaeTP7Ku.js} +1 -1
- package/dist/{index-B4t_Uzk7.js → index-DQqxmq0e.js} +26 -26
- package/dist/{index-Cq9qqaCC.js → index-EBL2mPva.js} +1 -1
- package/dist/{item-D4uNJyVR.js → item-BsvsZcce.js} +16 -16
- package/dist/iteration-CxQwvFbX.js +27 -0
- package/dist/{jszip.min-15VIwqfl.js → jszip.min-DoZyvEEd.js} +353 -353
- package/dist/{menu-CPLvXPJu.js → menu-Dlsf52hs.js} +27998 -27430
- package/dist/{menu-BSAn1m0K.js → menu-zMO5M1Ur.js} +1 -1
- package/dist/{menuV2-DZpI5Elt.js → menuV2-Ss7NpjF_.js} +48 -48
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/packages/shared/src/components/info/TextChip.vue.d.ts +1 -1
- package/dist/{priceTier-Bs5Ve98k.js → priceTier-Dhh2TKAL.js} +1 -1
- package/dist/{scheduler-BKwB9GfG.js → scheduler-CA9RiMAg.js} +20 -20
- package/dist/{subcategory-DJW1_br9.js → subcategory-tJjY3seO.js} +6 -6
- package/dist/{toExcel-C_lOM1fZ.js → toExcel-C6zcyUsq.js} +2 -2
- package/dist/{unit-ioVHtQya.js → unit-D4M4cm2W.js} +9 -9
- package/package.json +3 -3
- package/dist/apps/mf-menu/src/components/Announcements.vue.d.ts +0 -19
- package/dist/apps/mf-menu/src/stores/announcement/announcement.d.ts +0 -11
- package/dist/assets/linked-status-DmzniV97.js +0 -13
- package/dist/assets/override-menu-CdzhzFFi.js +0 -13
- package/dist/assets/validate-menu-BSL_Zd2w.js +0 -13
- package/dist/dayjs.min-C3Ch6D78.js +0 -6
- package/dist/iteration-BoeoXAHD.js +0 -23
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as K, computed as i, h as u, ref as U, resolveComponent as b, createElementBlock as p, openBlock as d, createVNode as f, withCtx as g, createElementVNode as V, createCommentVNode as C, toDisplayString as j, unref as n, isRef as A, createBlock as D, Fragment as G, renderList as H } from "vue";
|
|
2
2
|
import { useI18n as M } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as B, FmButtonColorThemeVariant as h, FmButtonVariant as I } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as O } from "./customAttributes-
|
|
5
|
-
import { L as $ } from "./LinkProductSideSheet-
|
|
4
|
+
import { _ as O } from "./customAttributes-Cf1e7I1m.js";
|
|
5
|
+
import { L as $ } from "./LinkProductSideSheet-CiRZO3uN.js";
|
|
6
6
|
import { u as q } from "./search-BAPEUu1R.js";
|
|
7
|
-
import { u as J, am as Q } from "./menu-
|
|
7
|
+
import { u as J, am as Q } from "./menu-Dlsf52hs.js";
|
|
8
8
|
const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }, Y = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as se, computed as x, resolveComponent as _, createBlock as V, openBlock as p, createVNode as o, ref as
|
|
1
|
+
import { defineComponent as se, computed as x, resolveComponent as _, createBlock as V, openBlock as p, createVNode as o, ref as K, createElementBlock as O, Fragment as j, renderSlot as be, unref as e, withCtx as g, createElementVNode as v, createCommentVNode as z, renderList as X, createTextVNode as xe, toDisplayString as N, markRaw as Ce, toRaw as ke, h as q, withModifiers as Q, normalizeClass as he } from "vue";
|
|
2
2
|
import { useRouter as Oe } from "vue-router";
|
|
3
|
-
import { u as pe,
|
|
3
|
+
import { u as pe, z as M, O as fe, D as ge, B as re, A as Fe, H as le, J as ve, a8 as ie } from "./menu-Dlsf52hs.js";
|
|
4
4
|
import { useI18n as ue, useCoreStore as _e } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as ye, components as ne, FmButtonVariant as J, FmButtonColorThemeVariant as Z, useDialog as Me, useBreakpoints as Ve } from "@feedmepos/ui-library";
|
|
6
|
-
import { _ as De, R as ce } from "./app-
|
|
6
|
+
import { _ as De, R as ce } from "./app-DJ-rQRBU.js";
|
|
7
7
|
import { _ as Se } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
-
import { _ as Te, a as te } from "./customAttributes-
|
|
9
|
-
import { _ as me, a as Ue } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Te, a as te } from "./customAttributes-Cf1e7I1m.js";
|
|
9
|
+
import { _ as me, a as Ue } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B8tJzkEO.js";
|
|
10
10
|
import { c as we } from "./check-C9mY6LiX.js";
|
|
11
|
-
import { C as B, a as P } from "./catalogSetting-
|
|
11
|
+
import { C as B, a as P } from "./catalogSetting-CkZSHD-W.js";
|
|
12
12
|
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
13
13
|
import { _ as Ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
14
|
-
import { C as Ne } from "./catalog-
|
|
14
|
+
import { C as Ne } from "./catalog-DeBJkQdk.js";
|
|
15
15
|
const Re = /* @__PURE__ */ se({
|
|
16
16
|
__name: "CatalogUsageTable",
|
|
17
17
|
props: {
|
|
@@ -80,17 +80,17 @@ const Re = /* @__PURE__ */ se({
|
|
|
80
80
|
}), Le = { class: "space-y-32" }, $e = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "pl-32 space-x-8"
|
|
83
|
-
}, Ie = { class: "pl-[60px] space-y-16" }, Be = { class: "space-x-16 flex items-center" }, Pe = { class: "flex-1 space-y-4" }, ze = { class: "fm-typo-en-body-lg-400" },
|
|
83
|
+
}, Ie = { class: "pl-[60px] space-y-16" }, Be = { class: "space-x-16 flex items-center" }, Pe = { class: "flex-1 space-y-4" }, ze = { class: "fm-typo-en-body-lg-400" }, Ke = { class: "fm-typo-en-body-md-400" }, je = { class: "flex gap-8 items-center justify-start" }, Ge = /* @__PURE__ */ se({
|
|
84
84
|
__name: "Form",
|
|
85
85
|
setup(ee, { expose: D }) {
|
|
86
|
-
const d =
|
|
86
|
+
const d = K(!1), S = K(!1), R = (c, u) => {
|
|
87
87
|
we.isBoolean(c) ? d.value = c : d.value = !d.value, d.value && (r.value = B.fromCatalog(
|
|
88
88
|
u ?? re.generator.initMenuV4Catalog(),
|
|
89
89
|
y.value
|
|
90
90
|
));
|
|
91
|
-
}, y = x(() => C.version === M.F_MENU_VERSION.enum.v4), C = pe(), E = _e(), m = fe(ge(ye())), r =
|
|
91
|
+
}, y = x(() => C.version === M.F_MENU_VERSION.enum.v4), C = pe(), E = _e(), m = fe(ge(ye())), r = K(
|
|
92
92
|
B.fromCatalog(re.generator.initMenuV4Catalog(), y.value)
|
|
93
|
-
), ae = x(() => C.catalogs.map((c) => c.name)),
|
|
93
|
+
), ae = x(() => C.catalogs.map((c) => c.name)), G = x({
|
|
94
94
|
get: () => r.value.taxSetting,
|
|
95
95
|
set: (c) => {
|
|
96
96
|
r.value.taxSetting = c;
|
|
@@ -111,7 +111,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
111
111
|
const u = r.value.taxSetting, f = u.mode === P.AUTO ? B.manualTax(Y.value) : le(u);
|
|
112
112
|
f.inclusive ?? (f.inclusive = []);
|
|
113
113
|
const k = f.inclusive.findIndex((w) => w.systemCode === c.systemCode);
|
|
114
|
-
k < 0 ? f.inclusive.push(c) : f.inclusive.splice(k, 1, c),
|
|
114
|
+
k < 0 ? f.inclusive.push(c) : f.inclusive.splice(k, 1, c), G.value = f;
|
|
115
115
|
}
|
|
116
116
|
function U(c, u) {
|
|
117
117
|
const f = le(r.value);
|
|
@@ -143,7 +143,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
143
143
|
const { t: i } = ue();
|
|
144
144
|
return D({ trigger: R }), (c, u) => {
|
|
145
145
|
const f = _("fm-text-field"), k = _("fm-radio"), w = _("fm-radio-group"), A = _("fm-checkbox"), $ = _("fm-switch"), s = _("fm-select"), a = _("fm-button"), l = _("fm-chip"), F = _("fm-card"), I = _("fm-side-sheet");
|
|
146
|
-
return p(), O(
|
|
146
|
+
return p(), O(j, null, [
|
|
147
147
|
be(c.$slots, "default", { trigger: R }),
|
|
148
148
|
o(I, {
|
|
149
149
|
modelValue: d.value,
|
|
@@ -156,7 +156,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
156
156
|
"max-width": 560
|
|
157
157
|
}, {
|
|
158
158
|
"side-sheet-footer": g(() => [
|
|
159
|
-
v("div",
|
|
159
|
+
v("div", je, [
|
|
160
160
|
o(a, {
|
|
161
161
|
loading: S.value,
|
|
162
162
|
label: e(i)("menu.common.actions.add"),
|
|
@@ -197,7 +197,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
197
197
|
o(w, {
|
|
198
198
|
"model-value": (t = r.value.taxSetting) == null ? void 0 : t.mode,
|
|
199
199
|
"onUpdate:modelValue": u[1] || (u[1] = (n) => {
|
|
200
|
-
n === e(P).AUTO ?
|
|
200
|
+
n === e(P).AUTO ? G.value = e(B).autoTax() : G.value = e(B).manualTax(Y.value);
|
|
201
201
|
})
|
|
202
202
|
}, {
|
|
203
203
|
default: g(() => [
|
|
@@ -215,7 +215,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["model-value"]),
|
|
217
217
|
((b = r.value.taxSetting) == null ? void 0 : b.mode) === e(P).MANUAL ? (p(), O("div", $e, [
|
|
218
|
-
(p(!0), O(
|
|
218
|
+
(p(!0), O(j, null, X(Y.value, (n) => (p(), V(A, {
|
|
219
219
|
key: n.systemCode,
|
|
220
220
|
"model-value": n.inclusive,
|
|
221
221
|
value: !0,
|
|
@@ -297,7 +297,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
}, 8, ["categories", "items"]),
|
|
300
|
-
(p(!0), O(
|
|
300
|
+
(p(!0), O(j, null, X(r.value.markupOptions, (t, b) => (p(), V(me, {
|
|
301
301
|
key: b,
|
|
302
302
|
categories: e(C).categories,
|
|
303
303
|
items: e(C).items,
|
|
@@ -322,7 +322,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
322
322
|
_: 2
|
|
323
323
|
}, 1024),
|
|
324
324
|
v("p", ze, N(e(i)("menu.catalog.form.markup.config", { number: b + 1 })), 1),
|
|
325
|
-
v("p",
|
|
325
|
+
v("p", Ke, N(t.includeItems ? e(i)("menu.catalog.form.markup.products", {
|
|
326
326
|
count: t.includeItems.length
|
|
327
327
|
}) : e(i)("menu.catalog.form.markup.all_items")), 1)
|
|
328
328
|
]),
|
|
@@ -355,7 +355,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
355
355
|
], 64);
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
}), de =
|
|
358
|
+
}), de = Ge, Ye = {
|
|
359
359
|
key: 0
|
|
360
360
|
}, He = {
|
|
361
361
|
class: "flex justify-end items-center"
|
|
@@ -394,7 +394,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
394
394
|
s[a._id] = a;
|
|
395
395
|
}), s;
|
|
396
396
|
}), ae = x(() => new Map(d.state.menu.modules.item.map((s) => [s._id, s])));
|
|
397
|
-
function
|
|
397
|
+
function G(s, a) {
|
|
398
398
|
var t, b, n, h;
|
|
399
399
|
const l = r.value[a._id], F = [...a.linkedDeliveryCatalogs.map((T) => ({
|
|
400
400
|
label: `Delivery (${T.name})`,
|
|
@@ -435,10 +435,10 @@ const Re = /* @__PURE__ */ se({
|
|
|
435
435
|
return d.state.restaurants.map((a) => ({
|
|
436
436
|
id: a._id,
|
|
437
437
|
name: a.name,
|
|
438
|
-
usage:
|
|
438
|
+
usage: G(s, a)
|
|
439
439
|
})).filter((a) => a.usage.length > 0);
|
|
440
440
|
}
|
|
441
|
-
const L =
|
|
441
|
+
const L = K(!1), U = K(""), W = x(() => {
|
|
442
442
|
var a;
|
|
443
443
|
return [{
|
|
444
444
|
id: oe,
|
|
@@ -479,7 +479,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
479
479
|
id: s
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
}, u =
|
|
482
|
+
}, u = K(null);
|
|
483
483
|
function f(s) {
|
|
484
484
|
var a;
|
|
485
485
|
(a = u.value) == null || a.trigger(null, {
|
|
@@ -608,7 +608,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
608
608
|
_: 1
|
|
609
609
|
})]),
|
|
610
610
|
_: 1
|
|
611
|
-
}, 8, ["subtitle", "title"])) : (p(), O(
|
|
611
|
+
}, 8, ["subtitle", "title"])) : (p(), O(j, {
|
|
612
612
|
key: 1
|
|
613
613
|
}, [$.value ? (p(), O("div", We, [v("div", qe, [o(F, {
|
|
614
614
|
autofocus: "",
|
|
@@ -618,7 +618,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
618
618
|
placeholder: e(m)("menu.common.labels.search_placeholder", {
|
|
619
619
|
type: e(m)("menu.catalog.title")
|
|
620
620
|
})
|
|
621
|
-
}, null, 8, ["modelValue", "placeholder"])]), v("div", Qe, [(p(!0), O(
|
|
621
|
+
}, null, 8, ["modelValue", "placeholder"])]), v("div", Qe, [(p(!0), O(j, null, X(i.value, (n) => (p(), O("div", {
|
|
622
622
|
key: n.id,
|
|
623
623
|
class: "flex flex-row py-12 px-16 items-center",
|
|
624
624
|
onClick: (h) => c(n.id)
|
|
@@ -659,7 +659,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
659
659
|
"dismiss-away": ""
|
|
660
660
|
}, {
|
|
661
661
|
"side-sheet-header": g(() => [v("p", oa, N(e(m)("menu.catalog.usage.title")), 1)]),
|
|
662
|
-
default: g(() => [L.value ? (p(), O("div", na, [(p(!0), O(
|
|
662
|
+
default: g(() => [L.value ? (p(), O("div", na, [(p(!0), O(j, null, X(W.value, (n, h) => (p(), V(Re, {
|
|
663
663
|
key: h,
|
|
664
664
|
catalog: n
|
|
665
665
|
}, null, 8, ["catalog"]))), 128))])) : z("", !0)]),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent 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 I, 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
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 {
|
|
5
|
+
import { D as q, u as ge, Z as fe, X as _e, z as K, a2 as ye, O as G, J as te } from "./menu-Dlsf52hs.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-DJ-rQRBU.js";
|
|
8
8
|
import { c as be } from "./createForm-BoUQeZTd.js";
|
|
9
|
-
import { _ as Z } from "./customAttributes-
|
|
9
|
+
import { _ as Z } from "./customAttributes-Cf1e7I1m.js";
|
|
10
10
|
import { u as xe } from "./discardConfirm-BHni0LNu.js";
|
|
11
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-zMO5M1Ur.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-BsvsZcce.js";
|
|
16
|
+
import { u as oe } from "./category-CJKIi291.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"
|
|
@@ -29,7 +29,7 @@ const $e = {
|
|
|
29
29
|
class: "flex-1 overflow-hidden min-h-[300px]"
|
|
30
30
|
}, Oe = {
|
|
31
31
|
class: "flex gap-8 items-center justify-start"
|
|
32
|
-
}, Ue = /* @__PURE__ */
|
|
32
|
+
}, Ue = /* @__PURE__ */ A({
|
|
33
33
|
__name: "Form",
|
|
34
34
|
props: {
|
|
35
35
|
initialValue: {}
|
|
@@ -37,7 +37,7 @@ const $e = {
|
|
|
37
37
|
setup(N, {
|
|
38
38
|
expose: h
|
|
39
39
|
}) {
|
|
40
|
-
const _ = N, V = Y(), b =
|
|
40
|
+
const _ = N, V = Y(), b = q(V), $ = G(b), m = ge(), r = Fe(), {
|
|
41
41
|
categories: x
|
|
42
42
|
} = J(), {
|
|
43
43
|
t
|
|
@@ -72,7 +72,7 @@ const $e = {
|
|
|
72
72
|
outline: !0,
|
|
73
73
|
variant: "tertiary",
|
|
74
74
|
textColor: "neutral-gray-400",
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: I(async () => {
|
|
76
76
|
await s(a);
|
|
77
77
|
}, ["stop", "prevent"])
|
|
78
78
|
})]);
|
|
@@ -84,12 +84,12 @@ const $e = {
|
|
|
84
84
|
async function s(o) {
|
|
85
85
|
await r.update(o._id);
|
|
86
86
|
}
|
|
87
|
-
const y = B(() => m.version ===
|
|
88
|
-
async function
|
|
87
|
+
const y = B(() => m.version === K.F_MENU_VERSION.enum.v4);
|
|
88
|
+
async function z(o) {
|
|
89
89
|
const a = ye(o, i.value.id);
|
|
90
90
|
await r.updateMany(a);
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const D = xe(() => i.value.name !== _.initialValue.name, () => {
|
|
93
93
|
u.value = !1;
|
|
94
94
|
});
|
|
95
95
|
async function c() {
|
|
@@ -97,7 +97,7 @@ const $e = {
|
|
|
97
97
|
updateMenu: a
|
|
98
98
|
} = $;
|
|
99
99
|
await a({
|
|
100
|
-
module:
|
|
100
|
+
module: K.F_MENU_MODULE_V4_KEY.enum.category,
|
|
101
101
|
operation: te.F_OPERATION_TYPE.update,
|
|
102
102
|
data: {
|
|
103
103
|
...o,
|
|
@@ -124,7 +124,7 @@ const $e = {
|
|
|
124
124
|
blameFormChildOnValidationFailed: !0
|
|
125
125
|
},
|
|
126
126
|
"max-width": 560,
|
|
127
|
-
"onOn:clickedAway": e(
|
|
127
|
+
"onOn:clickedAway": e(D)
|
|
128
128
|
}, {
|
|
129
129
|
"side-sheet-header": g(() => [n("p", $e, T(e(t)("menu.category.title")), 1)]),
|
|
130
130
|
"side-sheet-footer": g(() => [n("div", Oe, [d(W, {
|
|
@@ -179,7 +179,7 @@ const $e = {
|
|
|
179
179
|
"shrink-at": !1,
|
|
180
180
|
"hide-footer": "",
|
|
181
181
|
"pin-header-row": "",
|
|
182
|
-
onDndChanged:
|
|
182
|
+
onDndChanged: z,
|
|
183
183
|
onRowClick: a[2] || (a[2] = (v) => s(v.original))
|
|
184
184
|
}, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
|
|
185
185
|
_: 1
|
|
@@ -192,25 +192,25 @@ const $e = {
|
|
|
192
192
|
key: 0
|
|
193
193
|
}, Pe = {
|
|
194
194
|
class: "flex justify-end items-center"
|
|
195
|
-
}, Ie = {
|
|
196
|
-
class: "w-[320px]"
|
|
197
195
|
}, ze = {
|
|
196
|
+
class: "w-[320px]"
|
|
197
|
+
}, De = {
|
|
198
198
|
key: 1,
|
|
199
199
|
class: "flex-1 flex flex-col min-h-0"
|
|
200
|
-
},
|
|
200
|
+
}, Ie = {
|
|
201
201
|
class: "p-8"
|
|
202
202
|
}, Re = {
|
|
203
203
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
204
|
-
},
|
|
204
|
+
}, Ke = ["onClick"], Ae = {
|
|
205
205
|
class: "flex-1 space-y-4"
|
|
206
206
|
}, je = {
|
|
207
207
|
class: "fm-typo-en-body-lg-600"
|
|
208
208
|
}, Ye = {
|
|
209
209
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
210
|
-
},
|
|
210
|
+
}, qe = /* @__PURE__ */ A({
|
|
211
211
|
__name: "CategoryTable",
|
|
212
212
|
setup(N) {
|
|
213
|
-
const h = ee(), _ = Y(), V =
|
|
213
|
+
const h = ee(), _ = Y(), V = q(_), b = G(V), $ = oe({
|
|
214
214
|
dialog: h,
|
|
215
215
|
menuLoader: b
|
|
216
216
|
}), {
|
|
@@ -252,7 +252,7 @@ const $e = {
|
|
|
252
252
|
disabled: !s.id,
|
|
253
253
|
variant: "tertiary",
|
|
254
254
|
textColor: "neutral-gray-400",
|
|
255
|
-
onClick:
|
|
255
|
+
onClick: I(async () => {
|
|
256
256
|
await u(s);
|
|
257
257
|
}, ["stop", "prevent"])
|
|
258
258
|
})]);
|
|
@@ -282,7 +282,7 @@ const $e = {
|
|
|
282
282
|
}
|
|
283
283
|
}).onPrimary(async () => {
|
|
284
284
|
await b.updateMenu({
|
|
285
|
-
module:
|
|
285
|
+
module: K.F_MENU_MODULE_V4_KEY.enum.category,
|
|
286
286
|
operation: te.F_OPERATION_TYPE.delete,
|
|
287
287
|
// `category.id` is guaranteed to be defined due to the earlier check in `deleteCategory`.
|
|
288
288
|
data: l.id
|
|
@@ -301,8 +301,8 @@ const $e = {
|
|
|
301
301
|
}
|
|
302
302
|
const S = de(), P = B(() => S.breakpoints.value.xs);
|
|
303
303
|
return (l, s) => {
|
|
304
|
-
const y = p("FmSearch"),
|
|
305
|
-
return P.value ? (f(), E("div",
|
|
304
|
+
const y = p("FmSearch"), z = p("FmTable"), D = p("FmButton");
|
|
305
|
+
return P.value ? (f(), E("div", De, [n("div", Ie, [d(y, {
|
|
306
306
|
autofocus: "",
|
|
307
307
|
modelValue: r.value,
|
|
308
308
|
"onUpdate:modelValue": s[2] || (s[2] = (c) => r.value = c),
|
|
@@ -314,15 +314,15 @@ const $e = {
|
|
|
314
314
|
key: c.id || "",
|
|
315
315
|
class: "flex flex-row py-12 px-16",
|
|
316
316
|
onClick: (o) => C(c)
|
|
317
|
-
}, [n("div",
|
|
317
|
+
}, [n("div", Ae, [n("p", je, T(c.name), 1), n("p", Ye, T(e(t)(c.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
318
318
|
count: c.items.length
|
|
319
|
-
})), 1)]), d(
|
|
319
|
+
})), 1)]), d(D, {
|
|
320
320
|
"text-color": e(me).NeutralGray400,
|
|
321
321
|
variant: e(X).Tertiary,
|
|
322
322
|
"prepend-icon": "delete",
|
|
323
323
|
disabled: !c.id,
|
|
324
|
-
onClick:
|
|
325
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
324
|
+
onClick: I((o) => u(c), ["stop"])
|
|
325
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ke))), 128))])])) : (f(), E("div", Ne, [n("div", Pe, [n("div", ze, [d(y, {
|
|
326
326
|
modelValue: r.value,
|
|
327
327
|
"onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
|
|
328
328
|
autofocus: "",
|
|
@@ -331,7 +331,7 @@ const $e = {
|
|
|
331
331
|
type: e(t)("menu.category.title")
|
|
332
332
|
})
|
|
333
333
|
}, null, 8, ["modelValue", "placeholder"])])]), d(he, null, {
|
|
334
|
-
default: g(() => [d(
|
|
334
|
+
default: g(() => [d(z, {
|
|
335
335
|
"column-defs": O.value,
|
|
336
336
|
draggable: !0,
|
|
337
337
|
"page-size": e(m).length,
|
|
@@ -347,10 +347,10 @@ const $e = {
|
|
|
347
347
|
})]));
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
}),
|
|
350
|
+
}), Ge = { 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
|
-
const h = ee(), _ = Y(), V =
|
|
353
|
+
const h = ee(), _ = Y(), V = q(_), b = G(V), $ = oe({ dialog: h, menuLoader: b }), { categories: m } = J(), { t: r } = j();
|
|
354
354
|
function x() {
|
|
355
355
|
$.create();
|
|
356
356
|
}
|
|
@@ -359,7 +359,7 @@ const $e = {
|
|
|
359
359
|
heading: e(r)("menu.category.title")
|
|
360
360
|
}, {
|
|
361
361
|
default: g(() => [
|
|
362
|
-
e(m).length > 0 ? (f(), U(
|
|
362
|
+
e(m).length > 0 ? (f(), U(qe, { key: 0 })) : (f(), U(e(Ve), {
|
|
363
363
|
key: 1,
|
|
364
364
|
action: {
|
|
365
365
|
text: e(r)("menu.category.add"),
|
|
@@ -370,7 +370,7 @@ const $e = {
|
|
|
370
370
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
371
371
|
]),
|
|
372
372
|
"append-heading": g(() => [
|
|
373
|
-
n("div",
|
|
373
|
+
n("div", Ge, [
|
|
374
374
|
n("div", Je, [
|
|
375
375
|
n("div", We, [
|
|
376
376
|
n("p", Xe, T(t.value), 1)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as S, computed as k, ref as C, resolveComponent as w, createElementBlock as _, openBlock as u, createElementVNode as i, createVNode as g, unref as n, withCtx as K, Fragment as P, renderList as U, toDisplayString as E, createBlock as V } from "vue";
|
|
2
2
|
import { useI18n as L } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as M, useBreakpoints as $, useDialog as
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
3
|
+
import { useSnackbar as M, useBreakpoints as $, useDialog as I } from "@feedmepos/ui-library";
|
|
4
|
+
import { D as F, u as Y, X as j, O as D, J as A, z as J } from "./menu-Dlsf52hs.js";
|
|
5
|
+
import { _ as R } from "./app-DJ-rQRBU.js";
|
|
6
|
+
import { u as O } from "./menu-zMO5M1Ur.js";
|
|
7
|
+
import { _ as X } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
|
+
import { u as q } from "./category-CJKIi291.js";
|
|
9
|
+
const G = {
|
|
10
10
|
key: 0
|
|
11
11
|
}, H = {
|
|
12
12
|
class: "flex justify-end items-center"
|
|
@@ -27,10 +27,10 @@ const q = {
|
|
|
27
27
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
28
28
|
}, ne = /* @__PURE__ */ S({
|
|
29
29
|
__name: "CategoryTable",
|
|
30
|
-
setup(
|
|
31
|
-
const f = M(), y = F(f), h =
|
|
30
|
+
setup(T) {
|
|
31
|
+
const f = M(), y = F(f), h = D(y), p = Y(), {
|
|
32
32
|
categories: v
|
|
33
|
-
} =
|
|
33
|
+
} = O(), b = k(() => {
|
|
34
34
|
var r, t;
|
|
35
35
|
const l = ((t = (r = p.currentCatalog) == null ? void 0 : r.override) == null ? void 0 : t.category) ?? {}, o = v.value.map((e, c) => {
|
|
36
36
|
var m;
|
|
@@ -40,7 +40,7 @@ const q = {
|
|
|
40
40
|
position: e.id ? ((m = l[e.id]) == null ? void 0 : m.position) ?? c + 1 : null
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
|
-
return
|
|
43
|
+
return j(o, (e) => e.name);
|
|
44
44
|
}), a = C(""), d = k(() => b.value.filter((l) => l.name.toLowerCase().includes(a.value.toLowerCase()))), {
|
|
45
45
|
t: s
|
|
46
46
|
} = L(), x = C([{
|
|
@@ -62,7 +62,7 @@ const q = {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
-
async function
|
|
65
|
+
async function z(l) {
|
|
66
66
|
var e;
|
|
67
67
|
const o = p.currentCatalog;
|
|
68
68
|
if (!o)
|
|
@@ -76,8 +76,8 @@ const q = {
|
|
|
76
76
|
_id: c.id
|
|
77
77
|
});
|
|
78
78
|
}), await r({
|
|
79
|
-
module:
|
|
80
|
-
operation:
|
|
79
|
+
module: J.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
80
|
+
operation: A.F_OPERATION_TYPE.update,
|
|
81
81
|
data: {
|
|
82
82
|
...o,
|
|
83
83
|
override: {
|
|
@@ -87,10 +87,10 @@ const q = {
|
|
|
87
87
|
}
|
|
88
88
|
}, "Category");
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const B = $(), N = k(() => B.breakpoints.value.xs);
|
|
91
91
|
return (l, o) => {
|
|
92
92
|
const r = w("FmSearch"), t = w("FmTable");
|
|
93
|
-
return
|
|
93
|
+
return N.value ? (u(), _("div", W, [i("div", Z, [g(r, {
|
|
94
94
|
autofocus: "",
|
|
95
95
|
modelValue: a.value,
|
|
96
96
|
"onUpdate:modelValue": o[1] || (o[1] = (e) => a.value = e),
|
|
@@ -103,7 +103,7 @@ const q = {
|
|
|
103
103
|
class: "flex flex-row py-12 px-16"
|
|
104
104
|
}, [i("div", oe, [i("p", te, E(e.name), 1), i("p", ae, E(n(s)(e.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
105
105
|
count: e.items.length
|
|
106
|
-
})), 1)])]))), 128))])])) : (u(), _("div",
|
|
106
|
+
})), 1)])]))), 128))])])) : (u(), _("div", G, [i("div", H, [i("div", Q, [g(r, {
|
|
107
107
|
modelValue: a.value,
|
|
108
108
|
"onUpdate:modelValue": o[0] || (o[0] = (e) => a.value = e),
|
|
109
109
|
autofocus: "",
|
|
@@ -111,7 +111,7 @@ const q = {
|
|
|
111
111
|
placeholder: n(s)("menu.common.labels.search_placeholder", {
|
|
112
112
|
type: n(s)("menu.category.title")
|
|
113
113
|
})
|
|
114
|
-
}, null, 8, ["modelValue", "placeholder"])])]), g(
|
|
114
|
+
}, null, 8, ["modelValue", "placeholder"])])]), g(R, null, {
|
|
115
115
|
default: K(() => [g(t, {
|
|
116
116
|
"column-defs": x.value,
|
|
117
117
|
draggable: !0,
|
|
@@ -121,7 +121,7 @@ const q = {
|
|
|
121
121
|
"shrink-at": !1,
|
|
122
122
|
"hide-footer": "",
|
|
123
123
|
"pin-header-row": "",
|
|
124
|
-
onDndChanged:
|
|
124
|
+
onDndChanged: z
|
|
125
125
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
126
126
|
_: 1
|
|
127
127
|
})]));
|
|
@@ -129,15 +129,15 @@ const q = {
|
|
|
129
129
|
}
|
|
130
130
|
}), pe = /* @__PURE__ */ S({
|
|
131
131
|
__name: "Category",
|
|
132
|
-
setup(
|
|
133
|
-
const f =
|
|
132
|
+
setup(T) {
|
|
133
|
+
const f = I(), y = M(), h = F(y), p = D(h), v = q({ dialog: f, menuLoader: p }), { categories: b } = O(), { t: a } = L();
|
|
134
134
|
function d() {
|
|
135
135
|
v.create();
|
|
136
136
|
}
|
|
137
137
|
return (s, x) => n(b).length > 0 ? (u(), V(ne, {
|
|
138
138
|
key: 0,
|
|
139
139
|
class: "pt-16"
|
|
140
|
-
})) : (u(), V(n(
|
|
140
|
+
})) : (u(), V(n(X), {
|
|
141
141
|
key: 1,
|
|
142
142
|
class: "pt-16",
|
|
143
143
|
action: {
|