@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,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 a, 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 "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { L as $ } from "./LinkProductSideSheet-
|
|
4
|
+
import { _ as O } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
5
|
+
import { L as $ } from "./LinkProductSideSheet-BjcQDT4U.js";
|
|
6
6
|
import { u as q } from "./search-BAPEUu1R.js";
|
|
7
|
-
import { u as J, an as Q } from "./index.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { u as J, an as Q } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.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 K, createElementBlock as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { u as pe,
|
|
1
|
+
import { defineComponent as se, computed as x, resolveComponent as _, createBlock as V, openBlock as p, createVNode as o, ref as K, createElementBlock as F, Fragment as G, 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 J, withModifiers as Q, normalizeClass as he } from "vue";
|
|
2
|
+
import { useRouter as Fe } from "vue-router";
|
|
3
|
+
import { u as pe, A as M, P as fe, G as ge, D as re, B as Oe, I as le, K as ve, ac as ie, a3 as Me } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
4
4
|
import { useI18n as ue, useCoreStore as _e } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as ye, components as ne, FmButtonVariant as
|
|
6
|
-
import { _ as Se, R as ce } from "./app-
|
|
5
|
+
import { useSnackbar as ye, components as ne, FmButtonVariant as W, FmButtonColorThemeVariant as Z, useDialog as Ve, useBreakpoints as De } from "@feedmepos/ui-library";
|
|
6
|
+
import { _ as Se, R as ce } from "./app-CPJH5bgs.js";
|
|
7
7
|
import { _ as Te } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
8
|
import { _ as te } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
9
|
-
import { _ as Ue } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as me, a as we } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Ue } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
10
|
+
import { _ as me, a as we } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1gBCBA.js";
|
|
11
11
|
import { c as Ee } from "./check-C9mY6LiX.js";
|
|
12
|
-
import { C as B, a as P } from "./catalogSetting-
|
|
12
|
+
import { C as B, a as P } from "./catalogSetting-DjGqI2Vf.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-CpFTifAS.js";
|
|
15
15
|
const Re = /* @__PURE__ */ se({
|
|
16
16
|
__name: "CatalogUsageTable",
|
|
17
17
|
props: {
|
|
@@ -80,7 +80,7 @@ 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" }, Ke = { class: "fm-typo-en-body-md-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" }, Ge = { class: "flex gap-8 items-center justify-start" }, je = /* @__PURE__ */ se({
|
|
84
84
|
__name: "Form",
|
|
85
85
|
setup(ee, { expose: D }) {
|
|
86
86
|
const d = K(!1), S = K(!1), R = (c, u) => {
|
|
@@ -90,7 +90,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
90
90
|
));
|
|
91
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)), j = x({
|
|
94
94
|
get: () => r.value.taxSetting,
|
|
95
95
|
set: (c) => {
|
|
96
96
|
r.value.taxSetting = c;
|
|
@@ -99,7 +99,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
99
99
|
var f, k;
|
|
100
100
|
if (!E.currentCountry.value) return [];
|
|
101
101
|
const c = ((f = r.value.taxSetting) == null ? void 0 : f.mode) === P.MANUAL ? ((k = r.value.taxSetting) == null ? void 0 : k.inclusive) ?? [] : [];
|
|
102
|
-
return
|
|
102
|
+
return Oe.Country.getCountry(E.currentCountry.value).taxSystems.map((w) => {
|
|
103
103
|
const A = c.find(($) => $.systemCode === w.code);
|
|
104
104
|
return {
|
|
105
105
|
inclusive: (A == null ? void 0 : A.inclusive) || !1,
|
|
@@ -111,13 +111,13 @@ 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), j.value = f;
|
|
115
115
|
}
|
|
116
116
|
function U(c, u) {
|
|
117
117
|
const f = le(r.value);
|
|
118
118
|
f.markupOptions && (f.markupOptions[c] = u, r.value = f);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function q(c) {
|
|
121
121
|
const u = le(r.value);
|
|
122
122
|
u.markupOptions && (u.markupOptions.splice(c, 1), r.value = u);
|
|
123
123
|
}
|
|
@@ -142,8 +142,8 @@ const Re = /* @__PURE__ */ se({
|
|
|
142
142
|
}
|
|
143
143
|
const { t: i } = ue();
|
|
144
144
|
return D({ trigger: R }), (c, u) => {
|
|
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"),
|
|
146
|
-
return p(),
|
|
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"), O = _("fm-card"), I = _("fm-side-sheet");
|
|
146
|
+
return p(), F(G, 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", Ge, [
|
|
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 ? j.value = e(B).autoTax() : j.value = e(B).manualTax(Y.value);
|
|
201
201
|
})
|
|
202
202
|
}, {
|
|
203
203
|
default: g(() => [
|
|
@@ -214,8 +214,8 @@ const Re = /* @__PURE__ */ se({
|
|
|
214
214
|
]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["model-value"]),
|
|
217
|
-
((b = r.value.taxSetting) == null ? void 0 : b.mode) === e(P).MANUAL ? (p(),
|
|
218
|
-
(p(!0),
|
|
217
|
+
((b = r.value.taxSetting) == null ? void 0 : b.mode) === e(P).MANUAL ? (p(), F("div", $e, [
|
|
218
|
+
(p(!0), F(G, null, X(Y.value, (n) => (p(), V(A, {
|
|
219
219
|
key: n.systemCode,
|
|
220
220
|
"model-value": n.inclusive,
|
|
221
221
|
value: !0,
|
|
@@ -289,7 +289,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
289
289
|
o(a, {
|
|
290
290
|
"text-color": e(Z).ColorPrimary,
|
|
291
291
|
"border-color": e(Z).ColorPrimary,
|
|
292
|
-
variant: e(
|
|
292
|
+
variant: e(W).Secondary,
|
|
293
293
|
label: e(i)("menu.catalog.form.markup.add"),
|
|
294
294
|
"prepend-icon": "add",
|
|
295
295
|
onClick: t
|
|
@@ -297,7 +297,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
}, 8, ["categories", "items"]),
|
|
300
|
-
(p(!0),
|
|
300
|
+
(p(!0), F(G, 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,
|
|
@@ -306,7 +306,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
306
306
|
"onUpdate:modelValue": (n) => n && U(b, n)
|
|
307
307
|
}, {
|
|
308
308
|
default: g(({ trigger: n }) => [
|
|
309
|
-
o(
|
|
309
|
+
o(O, {
|
|
310
310
|
id: JSON.stringify(t),
|
|
311
311
|
class: "py-12 px-16 cursor-pointer",
|
|
312
312
|
variant: "outlined",
|
|
@@ -327,9 +327,9 @@ const Re = /* @__PURE__ */ se({
|
|
|
327
327
|
}) : e(i)("menu.catalog.form.markup.all_items")), 1)
|
|
328
328
|
]),
|
|
329
329
|
o(a, {
|
|
330
|
-
variant: e(
|
|
330
|
+
variant: e(W).Tertiary,
|
|
331
331
|
"prepend-icon": "delete",
|
|
332
|
-
onClick: (h) =>
|
|
332
|
+
onClick: (h) => q(b)
|
|
333
333
|
}, null, 8, ["variant", "onClick"])
|
|
334
334
|
])
|
|
335
335
|
]),
|
|
@@ -355,16 +355,16 @@ const Re = /* @__PURE__ */ se({
|
|
|
355
355
|
], 64);
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
}), de =
|
|
358
|
+
}), de = je, Ye = {
|
|
359
359
|
key: 0
|
|
360
360
|
}, He = {
|
|
361
361
|
class: "flex justify-end items-center"
|
|
362
|
-
}, Je = {
|
|
363
|
-
class: "w-[320px]"
|
|
364
362
|
}, We = {
|
|
363
|
+
class: "w-[320px]"
|
|
364
|
+
}, qe = {
|
|
365
365
|
key: 1,
|
|
366
366
|
class: "flex-1 flex flex-col min-h-0"
|
|
367
|
-
},
|
|
367
|
+
}, Je = {
|
|
368
368
|
class: "p-8"
|
|
369
369
|
}, Qe = {
|
|
370
370
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
@@ -386,7 +386,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
386
386
|
}, oe = "main", xa = /* @__PURE__ */ se({
|
|
387
387
|
__name: "Catalog",
|
|
388
388
|
setup(ee) {
|
|
389
|
-
const D = _e(), d = pe(), S = ye(), R = ge(S), y = Ve(), C = fe(R), E =
|
|
389
|
+
const D = _e(), d = pe(), S = ye(), R = ge(S), y = Ve(), C = fe(R), E = Fe(), {
|
|
390
390
|
t: m
|
|
391
391
|
} = ue(), r = x(() => {
|
|
392
392
|
const s = {};
|
|
@@ -394,9 +394,9 @@ 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 j(s, a) {
|
|
398
398
|
var t, b, n, h;
|
|
399
|
-
const l = r.value[a._id],
|
|
399
|
+
const l = r.value[a._id], O = [...a.linkedDeliveryCatalogs.map((T) => ({
|
|
400
400
|
label: `Delivery (${T.name})`,
|
|
401
401
|
selector: T.catalog
|
|
402
402
|
})), {
|
|
@@ -427,7 +427,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
427
427
|
}, {
|
|
428
428
|
label: "Delivery (Feedme express)",
|
|
429
429
|
selector: (h = l == null ? void 0 : l.feedmeDelivery) == null ? void 0 : h.catalogId
|
|
430
|
-
}, ...ie(
|
|
430
|
+
}, ...ie(O, {
|
|
431
431
|
selector: "label"
|
|
432
432
|
})].filter((T) => s ? Array.isArray(T.selector) ? T.selector.includes(s) : T.selector === s : T.selector === null).map((T) => T.label);
|
|
433
433
|
}
|
|
@@ -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: j(s, a)
|
|
439
439
|
})).filter((a) => a.usage.length > 0);
|
|
440
440
|
}
|
|
441
|
-
const L = K(!1), U = K(""),
|
|
441
|
+
const L = K(!1), U = K(""), q = x(() => {
|
|
442
442
|
var a;
|
|
443
443
|
return [{
|
|
444
444
|
id: oe,
|
|
@@ -460,19 +460,19 @@ const Re = /* @__PURE__ */ se({
|
|
|
460
460
|
defaultOrderFrom: l.defaultOrderFrom
|
|
461
461
|
}))].map((l) => {
|
|
462
462
|
var t;
|
|
463
|
-
const
|
|
463
|
+
const O = Y(((t = l.doc) == null ? void 0 : t._id) || null), I = l.doc ? Ne.getSellingItem(l.doc, ae.value) : d.state.menu.modules.item;
|
|
464
464
|
return {
|
|
465
465
|
...l,
|
|
466
466
|
taxMode: l.taxes ? "Manual" : "Automatic",
|
|
467
467
|
autoLink: l.defaultOrderFrom !== M.F_ORDER_FROM.enum.NONE ? "Activated" : "Deactivated",
|
|
468
|
-
restaurants: ie(
|
|
468
|
+
restaurants: ie(O, {
|
|
469
469
|
selector: "name"
|
|
470
470
|
}),
|
|
471
471
|
totalProducts: I.length,
|
|
472
472
|
disableDelete: l.disableDelete
|
|
473
473
|
};
|
|
474
474
|
});
|
|
475
|
-
}), H = x(() =>
|
|
475
|
+
}), H = x(() => q.value.filter((s) => s.id !== oe)), i = x(() => H.value.filter((s) => s.name.toLowerCase().includes(U.value.toLowerCase()))), c = (s) => {
|
|
476
476
|
d.selectCatalog(s === oe ? null : s), E.push({
|
|
477
477
|
name: ce.EDIT_CATALOG_PRODUCT,
|
|
478
478
|
params: {
|
|
@@ -488,7 +488,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
async function k(s) {
|
|
491
|
-
const a = d.state.restaurants.filter((l) => [...l.additionalCatalogs, l.inHouseDelivery, ...l.linkedDeliveryCatalogs.map((
|
|
491
|
+
const a = d.state.restaurants.filter((l) => [...l.additionalCatalogs, l.inHouseDelivery, ...l.linkedDeliveryCatalogs.map((O) => O.catalog), l.pickupCatalog, l.takeawayCatalog, l.catalogId].includes(s.id)).map((l) => l.name);
|
|
492
492
|
a.length > 0 ? S.open({
|
|
493
493
|
type: "error",
|
|
494
494
|
message: m("menu.catalog.dialogs.remove.error", {
|
|
@@ -502,7 +502,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
502
502
|
primaryActions: {
|
|
503
503
|
text: m("menu.common.actions.remove"),
|
|
504
504
|
close: !0,
|
|
505
|
-
variant:
|
|
505
|
+
variant: W.Destructive
|
|
506
506
|
},
|
|
507
507
|
secondaryActions: {
|
|
508
508
|
text: m("menu.common.actions.cancel"),
|
|
@@ -532,7 +532,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
532
532
|
enableSorting: !1,
|
|
533
533
|
cell: (s) => {
|
|
534
534
|
const a = s.row.original;
|
|
535
|
-
return
|
|
535
|
+
return J("div", {
|
|
536
536
|
class: "flex justify-between"
|
|
537
537
|
}, [a.autoLink]);
|
|
538
538
|
}
|
|
@@ -546,9 +546,9 @@ const Re = /* @__PURE__ */ se({
|
|
|
546
546
|
header: "",
|
|
547
547
|
cell: (s) => {
|
|
548
548
|
const a = s.row.original;
|
|
549
|
-
return
|
|
549
|
+
return J("div", {
|
|
550
550
|
class: "flex justify-end"
|
|
551
|
-
}, [
|
|
551
|
+
}, [J(ne.FmButton, {
|
|
552
552
|
icon: "file_copy",
|
|
553
553
|
disabled: !a.id,
|
|
554
554
|
variant: "tertiary",
|
|
@@ -556,7 +556,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
556
556
|
onClick: Q(async () => {
|
|
557
557
|
await f(a);
|
|
558
558
|
}, ["stop", "prevent"])
|
|
559
|
-
}),
|
|
559
|
+
}), J(ne.FmButton, {
|
|
560
560
|
icon: "delete",
|
|
561
561
|
disabled: !a.id,
|
|
562
562
|
variant: "tertiary",
|
|
@@ -568,7 +568,7 @@ const Re = /* @__PURE__ */ se({
|
|
|
568
568
|
}
|
|
569
569
|
}]), A = De(), $ = x(() => A.breakpoints.value.xs);
|
|
570
570
|
return (s, a) => {
|
|
571
|
-
const l = _("fm-button"),
|
|
571
|
+
const l = _("fm-button"), O = _("FmSearch"), I = _("FmTable"), t = _("FmButton"), b = _("fm-side-sheet");
|
|
572
572
|
return p(), V(Ae, {
|
|
573
573
|
heading: e(m)("menu.catalog.title")
|
|
574
574
|
}, {
|
|
@@ -608,9 +608,9 @@ const Re = /* @__PURE__ */ se({
|
|
|
608
608
|
_: 1
|
|
609
609
|
})]),
|
|
610
610
|
_: 1
|
|
611
|
-
}, 8, ["subtitle", "title"])) : (p(),
|
|
611
|
+
}, 8, ["subtitle", "title"])) : (p(), F(G, {
|
|
612
612
|
key: 1
|
|
613
|
-
}, [$.value ? (p(),
|
|
613
|
+
}, [$.value ? (p(), F("div", qe, [v("div", Je, [o(O, {
|
|
614
614
|
autofocus: "",
|
|
615
615
|
modelValue: U.value,
|
|
616
616
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => U.value = n),
|
|
@@ -618,21 +618,21 @@ 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),
|
|
621
|
+
}, null, 8, ["modelValue", "placeholder"])]), v("div", Qe, [(p(!0), F(G, null, X(i.value, (n) => (p(), F("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)
|
|
625
625
|
}, [v("div", Ze, [v("p", ea, " Tax calculation: " + N(n.taxMode), 1), v("p", aa, " Auto link product: " + N(n.autoLink), 1), v("p", la, N(n.name), 1)]), v("div", ta, [o(t, {
|
|
626
626
|
"text-color": e(Z).NeutralGray400,
|
|
627
|
-
variant: e(
|
|
627
|
+
variant: e(W).Tertiary,
|
|
628
628
|
"prepend-icon": "file_copy",
|
|
629
629
|
onClick: Q((h) => f(n), ["stop"])
|
|
630
630
|
}, null, 8, ["text-color", "variant", "onClick"]), o(t, {
|
|
631
631
|
"text-color": e(Z).NeutralGray400,
|
|
632
|
-
variant: e(
|
|
632
|
+
variant: e(W).Tertiary,
|
|
633
633
|
"prepend-icon": "delete",
|
|
634
634
|
onClick: Q((h) => k(n), ["stop"])
|
|
635
|
-
}, null, 8, ["text-color", "variant", "onClick"])])], 8, Xe))), 128))])])) : (p(),
|
|
635
|
+
}, null, 8, ["text-color", "variant", "onClick"])])], 8, Xe))), 128))])])) : (p(), F("div", Ye, [v("div", He, [v("div", We, [o(O, {
|
|
636
636
|
modelValue: U.value,
|
|
637
637
|
"onUpdate:modelValue": a[1] || (a[1] = (n) => U.value = n),
|
|
638
638
|
autofocus: "",
|
|
@@ -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(),
|
|
662
|
+
default: g(() => [L.value ? (p(), F("div", na, [(p(!0), F(G, null, X(q.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 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 Z, renderSlot as re, createVNode as d, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as L, withModifiers as D, 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 J, 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 { G, u as ge, $ as fe, Y as _e, A as K, a2 as ye, P as q, K as te, a3 as ve } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
6
6
|
import { _ as he } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as be } from "./app-
|
|
7
|
+
import { _ as be } from "./app-CPJH5bgs.js";
|
|
8
8
|
import { c as xe } from "./createForm-BoUQeZTd.js";
|
|
9
|
-
import { _ as
|
|
9
|
+
import { _ as Q } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
10
10
|
import { u as Ce } from "./discardConfirm-BHni0LNu.js";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as X } from "./object-DVUNCr7w.js";
|
|
12
12
|
import { r as ke } from "./rules-CIWTZQfh.js";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as W, a as we } from "./menu-DVdMR0zo.js";
|
|
14
14
|
import { c as Fe } from "./check-C9mY6LiX.js";
|
|
15
|
-
import { u as Ve } from "./item-
|
|
16
|
-
import { u as oe } from "./category-
|
|
15
|
+
import { u as Ve } from "./item-2WoPAnNJ.js";
|
|
16
|
+
import { u as oe } from "./category-DaRWiQd8.js";
|
|
17
17
|
const $e = {
|
|
18
18
|
class: "fm-typo-en-title-md-600"
|
|
19
19
|
}, Me = {
|
|
@@ -26,7 +26,7 @@ const $e = {
|
|
|
26
26
|
class: "flex-1"
|
|
27
27
|
}, Te = {
|
|
28
28
|
class: "flex-1 overflow-hidden min-h-[300px]"
|
|
29
|
-
},
|
|
29
|
+
}, Pe = {
|
|
30
30
|
class: "flex gap-8 items-center justify-start"
|
|
31
31
|
}, Ue = /* @__PURE__ */ A({
|
|
32
32
|
__name: "Form",
|
|
@@ -36,17 +36,17 @@ const $e = {
|
|
|
36
36
|
setup(N, {
|
|
37
37
|
expose: h
|
|
38
38
|
}) {
|
|
39
|
-
const _ = N, V = Y(), b =
|
|
39
|
+
const _ = N, V = Y(), b = G(V), $ = q(b), m = ge(), r = Ve(), {
|
|
40
40
|
categories: x
|
|
41
|
-
} =
|
|
41
|
+
} = W(), {
|
|
42
42
|
t
|
|
43
|
-
} = j(),
|
|
43
|
+
} = j(), P = F(!1), u = F(!1), M = (o) => {
|
|
44
44
|
Fe.isBoolean(o) ? u.value = o : u.value = !u.value;
|
|
45
|
-
}, i = F(
|
|
45
|
+
}, i = F(X(_.initialValue)), C = F(""), S = B(() => {
|
|
46
46
|
var k;
|
|
47
47
|
const o = ((k = x.value.find((w) => w.id === i.value.id)) == null ? void 0 : k.items) || [], a = fe(i.value.id);
|
|
48
48
|
return _e(o, (w) => w.code || w.name, a);
|
|
49
|
-
}),
|
|
49
|
+
}), O = [{
|
|
50
50
|
accessorKey: "name",
|
|
51
51
|
header: () => t("menu.category.products.columns.name"),
|
|
52
52
|
enableSorting: !1
|
|
@@ -71,7 +71,7 @@ const $e = {
|
|
|
71
71
|
outline: !0,
|
|
72
72
|
variant: "tertiary",
|
|
73
73
|
textColor: "neutral-gray-400",
|
|
74
|
-
onClick:
|
|
74
|
+
onClick: D(async () => {
|
|
75
75
|
await s(a);
|
|
76
76
|
}, ["stop", "prevent"])
|
|
77
77
|
})]);
|
|
@@ -84,11 +84,11 @@ const $e = {
|
|
|
84
84
|
await r.update(o._id);
|
|
85
85
|
}
|
|
86
86
|
const y = B(() => m.version === K.F_MENU_VERSION.enum.v4);
|
|
87
|
-
async function
|
|
87
|
+
async function I(o) {
|
|
88
88
|
const a = ye(o, i.value.id);
|
|
89
89
|
await r.updateMany(a);
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const z = Ce(() => i.value.name !== _.initialValue.name, () => {
|
|
92
92
|
u.value = !1;
|
|
93
93
|
});
|
|
94
94
|
async function c() {
|
|
@@ -105,13 +105,13 @@ const $e = {
|
|
|
105
105
|
}, i.value.name), M(!1);
|
|
106
106
|
}
|
|
107
107
|
return se(() => u.value, () => {
|
|
108
|
-
u.value && (i.value =
|
|
108
|
+
u.value && (i.value = X(_.initialValue));
|
|
109
109
|
}), h({
|
|
110
110
|
trigger: M,
|
|
111
111
|
show: u
|
|
112
112
|
}), (o, a) => {
|
|
113
|
-
const k = p("FmTextField"), w = p("FmButton"), ae = p("FmSearch"), ne = p("FmTable"),
|
|
114
|
-
return f(), E(
|
|
113
|
+
const k = p("FmTextField"), w = p("FmButton"), ae = p("FmSearch"), ne = p("FmTable"), H = p("fm-button"), le = p("fm-side-sheet");
|
|
114
|
+
return f(), E(Z, null, [re(o.$slots, "default", {
|
|
115
115
|
trigger: M
|
|
116
116
|
}), d(le, {
|
|
117
117
|
id: "group-form",
|
|
@@ -123,23 +123,23 @@ const $e = {
|
|
|
123
123
|
blameFormChildOnValidationFailed: !0
|
|
124
124
|
},
|
|
125
125
|
"max-width": 560,
|
|
126
|
-
"onOn:clickedAway": e(
|
|
126
|
+
"onOn:clickedAway": e(z)
|
|
127
127
|
}, {
|
|
128
128
|
"side-sheet-header": g(() => [n("p", $e, T(e(t)("menu.category.title")), 1)]),
|
|
129
|
-
"side-sheet-footer": g(() => [n("div",
|
|
129
|
+
"side-sheet-footer": g(() => [n("div", Pe, [d(H, {
|
|
130
130
|
label: e(t)("menu.common.actions.update"),
|
|
131
|
-
loading:
|
|
131
|
+
loading: P.value,
|
|
132
132
|
size: "lg",
|
|
133
133
|
type: "submit",
|
|
134
134
|
variant: "primary",
|
|
135
135
|
disabled: !i.value.id
|
|
136
|
-
}, null, 8, ["label", "loading", "disabled"]), d(
|
|
136
|
+
}, null, 8, ["label", "loading", "disabled"]), d(H, {
|
|
137
137
|
label: e(t)("menu.common.actions.cancel"),
|
|
138
138
|
size: "lg",
|
|
139
139
|
variant: "tertiary",
|
|
140
140
|
onClick: a[3] || (a[3] = () => u.value = !1)
|
|
141
141
|
}, null, 8, ["label"])])]),
|
|
142
|
-
default: g(() => [n("div", Me, [d(
|
|
142
|
+
default: g(() => [n("div", Me, [d(Q, {
|
|
143
143
|
title: e(t)("menu.category.detail")
|
|
144
144
|
}, {
|
|
145
145
|
default: g(() => [d(k, {
|
|
@@ -150,7 +150,7 @@ const $e = {
|
|
|
150
150
|
rules: [e(ke)]
|
|
151
151
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])]),
|
|
152
152
|
_: 1
|
|
153
|
-
}, 8, ["title"]), d(
|
|
153
|
+
}, 8, ["title"]), d(Q, {
|
|
154
154
|
title: e(t)("menu.category.products.title"),
|
|
155
155
|
class: "flex-1 min-h-0",
|
|
156
156
|
shrinkable: !0
|
|
@@ -170,7 +170,7 @@ const $e = {
|
|
|
170
170
|
modelValue: C.value,
|
|
171
171
|
"onUpdate:modelValue": a[1] || (a[1] = (v) => C.value = v)
|
|
172
172
|
}, null, 8, ["placeholder", "modelValue"])])]), n("div", Te, [d(ne, {
|
|
173
|
-
"column-defs":
|
|
173
|
+
"column-defs": O,
|
|
174
174
|
draggable: y.value,
|
|
175
175
|
"page-size": S.value.length,
|
|
176
176
|
"row-data": S.value,
|
|
@@ -178,7 +178,7 @@ const $e = {
|
|
|
178
178
|
"shrink-at": !1,
|
|
179
179
|
"hide-footer": "",
|
|
180
180
|
"pin-header-row": "",
|
|
181
|
-
onDndChanged:
|
|
181
|
+
onDndChanged: I,
|
|
182
182
|
onRowClick: a[2] || (a[2] = (v) => s(v.original))
|
|
183
183
|
}, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
|
|
184
184
|
_: 1
|
|
@@ -189,14 +189,14 @@ const $e = {
|
|
|
189
189
|
}
|
|
190
190
|
}), Le = Ue, Ne = {
|
|
191
191
|
key: 0
|
|
192
|
-
},
|
|
192
|
+
}, Oe = {
|
|
193
193
|
class: "flex justify-end items-center"
|
|
194
|
-
},
|
|
194
|
+
}, Ie = {
|
|
195
195
|
class: "w-[320px]"
|
|
196
|
-
},
|
|
196
|
+
}, ze = {
|
|
197
197
|
key: 1,
|
|
198
198
|
class: "flex-1 flex flex-col min-h-0"
|
|
199
|
-
},
|
|
199
|
+
}, De = {
|
|
200
200
|
class: "p-8"
|
|
201
201
|
}, Re = {
|
|
202
202
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
@@ -206,17 +206,17 @@ const $e = {
|
|
|
206
206
|
class: "fm-typo-en-body-lg-600"
|
|
207
207
|
}, Ye = {
|
|
208
208
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
209
|
-
},
|
|
209
|
+
}, Ge = /* @__PURE__ */ A({
|
|
210
210
|
__name: "CategoryTable",
|
|
211
211
|
setup(N) {
|
|
212
|
-
const h = ee(), _ = Y(), V =
|
|
212
|
+
const h = ee(), _ = Y(), V = G(_), b = q(V), $ = oe({
|
|
213
213
|
dialog: h,
|
|
214
214
|
menuLoader: b
|
|
215
215
|
}), {
|
|
216
216
|
categories: m
|
|
217
|
-
} =
|
|
217
|
+
} = W(), r = F(""), x = B(() => m.value.filter((l) => l.name.toLowerCase().includes(r.value.toLowerCase()))), {
|
|
218
218
|
t
|
|
219
|
-
} = j(),
|
|
219
|
+
} = j(), P = F([{
|
|
220
220
|
accessorKey: "name",
|
|
221
221
|
header: () => t("menu.category.columns.title"),
|
|
222
222
|
enableSorting: !1,
|
|
@@ -251,7 +251,7 @@ const $e = {
|
|
|
251
251
|
disabled: !s.id,
|
|
252
252
|
variant: "tertiary",
|
|
253
253
|
textColor: "neutral-gray-400",
|
|
254
|
-
onClick:
|
|
254
|
+
onClick: D(async () => {
|
|
255
255
|
await u(s);
|
|
256
256
|
}, ["stop", "prevent"])
|
|
257
257
|
})]);
|
|
@@ -273,7 +273,7 @@ const $e = {
|
|
|
273
273
|
primaryActions: {
|
|
274
274
|
text: "Remove",
|
|
275
275
|
close: !0,
|
|
276
|
-
variant:
|
|
276
|
+
variant: J.Destructive
|
|
277
277
|
},
|
|
278
278
|
secondaryActions: {
|
|
279
279
|
text: "Cancel",
|
|
@@ -298,10 +298,10 @@ const $e = {
|
|
|
298
298
|
initialValue: l
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
const S = de(),
|
|
301
|
+
const S = de(), O = B(() => S.breakpoints.value.xs);
|
|
302
302
|
return (l, s) => {
|
|
303
|
-
const y = p("FmSearch"),
|
|
304
|
-
return
|
|
303
|
+
const y = p("FmSearch"), I = p("FmTable"), z = p("FmButton");
|
|
304
|
+
return O.value ? (f(), E("div", ze, [n("div", De, [d(y, {
|
|
305
305
|
autofocus: "",
|
|
306
306
|
modelValue: r.value,
|
|
307
307
|
"onUpdate:modelValue": s[2] || (s[2] = (c) => r.value = c),
|
|
@@ -309,19 +309,19 @@ const $e = {
|
|
|
309
309
|
placeholder: e(t)("menu.common.labels.search_placeholder", {
|
|
310
310
|
type: "categories"
|
|
311
311
|
})
|
|
312
|
-
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(
|
|
312
|
+
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(Z, null, ce(x.value, (c) => (f(), E("div", {
|
|
313
313
|
key: c.id || "",
|
|
314
314
|
class: "flex flex-row py-12 px-16",
|
|
315
315
|
onClick: (o) => C(c)
|
|
316
316
|
}, [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", {
|
|
317
317
|
count: c.items.length
|
|
318
|
-
})), 1)]), d(
|
|
318
|
+
})), 1)]), d(z, {
|
|
319
319
|
"text-color": e(me).NeutralGray400,
|
|
320
|
-
variant: e(
|
|
320
|
+
variant: e(J).Tertiary,
|
|
321
321
|
"prepend-icon": "delete",
|
|
322
322
|
disabled: !c.id,
|
|
323
|
-
onClick:
|
|
324
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ke))), 128))])])) : (f(), E("div", Ne, [n("div",
|
|
323
|
+
onClick: D((o) => u(c), ["stop"])
|
|
324
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ke))), 128))])])) : (f(), E("div", Ne, [n("div", Oe, [n("div", Ie, [d(y, {
|
|
325
325
|
modelValue: r.value,
|
|
326
326
|
"onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
|
|
327
327
|
autofocus: "",
|
|
@@ -330,8 +330,8 @@ const $e = {
|
|
|
330
330
|
type: e(t)("menu.category.title")
|
|
331
331
|
})
|
|
332
332
|
}, null, 8, ["modelValue", "placeholder"])])]), d(be, null, {
|
|
333
|
-
default: g(() => [d(
|
|
334
|
-
"column-defs":
|
|
333
|
+
default: g(() => [d(I, {
|
|
334
|
+
"column-defs": P.value,
|
|
335
335
|
draggable: !0,
|
|
336
336
|
"page-size": e(m).length,
|
|
337
337
|
"row-data": e(m),
|
|
@@ -346,19 +346,19 @@ const $e = {
|
|
|
346
346
|
})]));
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
349
|
+
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, We = { class: "flex items-center" }, He = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Je = { class: "fm-typo-en-body-md-600 font-semibold" }, pt = /* @__PURE__ */ A({
|
|
350
350
|
__name: "Category",
|
|
351
351
|
setup(N) {
|
|
352
|
-
const h = ee(), _ = Y(), V =
|
|
352
|
+
const h = ee(), _ = Y(), V = G(_), b = q(V), $ = oe({ dialog: h, menuLoader: b }), { categories: m } = W(), { t: r } = j();
|
|
353
353
|
function x() {
|
|
354
354
|
$.create();
|
|
355
355
|
}
|
|
356
356
|
const t = B(() => m.value.length);
|
|
357
|
-
return we().resetOnMount(), (
|
|
357
|
+
return we().resetOnMount(), (P, u) => (f(), U(he, {
|
|
358
358
|
heading: e(r)("menu.category.title")
|
|
359
359
|
}, {
|
|
360
360
|
default: g(() => [
|
|
361
|
-
e(m).length > 0 ? (f(), U(
|
|
361
|
+
e(m).length > 0 ? (f(), U(Ge, { key: 0 })) : (f(), U(e(ve), {
|
|
362
362
|
key: 1,
|
|
363
363
|
action: {
|
|
364
364
|
text: e(r)("menu.category.add"),
|
|
@@ -369,10 +369,10 @@ const $e = {
|
|
|
369
369
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
370
370
|
]),
|
|
371
371
|
"append-heading": g(() => [
|
|
372
|
-
n("div",
|
|
373
|
-
n("div",
|
|
374
|
-
n("div",
|
|
375
|
-
n("p",
|
|
372
|
+
n("div", qe, [
|
|
373
|
+
n("div", We, [
|
|
374
|
+
n("div", He, [
|
|
375
|
+
n("p", Je, T(t.value), 1)
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
378
378
|
e(m).length > 0 ? (f(), U(pe, {
|