@feedmepos/mf-menu 0.32.45 → 0.32.46-dev.2
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-CczmyQeJ.js → App-DnmPW7GQ.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js} +3 -3
- package/dist/{Catalog-RU_6keJm.js → Catalog-gxj-MZB8.js} +44 -44
- package/dist/{Category-7Fg2kD0h.js → Category-CqWHFR6I.js} +19 -19
- package/dist/{Category-CwEXbsDv.js → Category-JHb56PfQ.js} +24 -24
- package/dist/{CookingGuide-DFu5VStf.js → CookingGuide-DNMfIDDf.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BYdToHa3.js} +1 -1
- package/dist/{Group-l-YpAi6B.js → Group-DXEgfQ_e.js} +3 -3
- package/dist/{Group-C6vQeBnj.js → Group-bxjyN23A.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js → Group.vue_vue_type_script_setup_true_lang-DPhYCl15.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DAsxXqGu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js} +2940 -2939
- package/dist/{Ingredient-CHqDo-GY.js → Ingredient-BAnjcaO0.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CppjxcTA.js} +2 -2
- package/dist/{LinkProductSideSheet-DY32g33Q.js → LinkProductSideSheet-CvWcioxX.js} +45 -45
- package/dist/{MenuSetting-DhbxlKuU.js → MenuSetting-DCQM7rh6.js} +47 -47
- package/dist/{PrintRoute-CToZ0ClG.js → PrintRoute-Be0WG4oQ.js} +39 -39
- package/dist/{Product-Cpg32wpg.js → Product-DfYmo4vJ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js → Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js} +93 -93
- package/dist/{ProductInternalTools-wH9BN1NK.js → ProductInternalTools-D2QTAjE7.js} +66 -66
- package/dist/{Products-CpINHaH6.js → Products-BhY4Cwaz.js} +41 -41
- package/dist/{Publish-CJS_836k.js → Publish-BfEtLeeh.js} +29 -29
- package/dist/{Recipe-Cz7hivmM.js → Recipe-ssNUNy2j.js} +24 -24
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DHnuxBck.js +144 -0
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js → RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js} +176 -176
- package/dist/{Scheduler-QuWCnEJw.js → Scheduler-CAUHWrZs.js} +11 -11
- package/dist/{ServingSequence-CqK5Sjmq.js → ServingSequence-D12rqxa8.js} +44 -44
- package/dist/{Setting-C3tKUfsm.js → Setting-pJ06C7wS.js} +17 -17
- package/dist/{Subcategory-DCtTOPUj.js → Subcategory-Dfd-qx6m.js} +54 -54
- package/dist/{Takeaway-Fi8SAH2t.js → Takeaway-Bnat0taD.js} +13 -13
- package/dist/{Takeaway-BnB1OFnK.js → Takeaway-Cv-kA3M_.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js → Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js} +33 -33
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js → Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js} +27 -27
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js} +5 -5
- package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js} +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js +5767 -0
- package/dist/{Unit-5yE2-y9D.js → Unit-DeegDDRz.js} +8 -8
- package/dist/{Variant-C7lIdRID.js → Variant-D8WwGu3E.js} +14 -14
- package/dist/{_id_-08ykp97a.js → _id_-BfOGbmqs.js} +28 -28
- package/dist/app-BmAr9vNI.js +2283 -0
- package/dist/{app-DPovSnb_.js → app-DhZxk0zL.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/index.d.ts +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +14 -5
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-WT6deoPw.js → linked-status-CxpcEFX9.js} +5 -5
- package/dist/assets/{menu-export-DxtFXMED.js → menu-export-C09ZbTRq.js} +2 -2
- package/dist/assets/{override-menu-BJGRdWWE.js → override-menu-0rFjySh6.js} +5 -5
- package/dist/assets/{validate-menu-B_tmkHe7.js → validate-menu-cO19zy8y.js} +2 -2
- package/dist/{catalog-D7Jjqj3-.js → catalog-tNpB0Dhn.js} +1 -1
- package/dist/{catalogSetting-Bg_zMUrV.js → catalogSetting-BRnA4v49.js} +1 -1
- package/dist/{currency-DDxFMjAI.js → currency-CyKauaRc.js} +1 -1
- package/dist/dayjs.min-ipgoM27T.js +7 -0
- package/dist/{index-BlLRjkMF.js → index-BGm2uHNk.js} +31 -31
- package/dist/{index-Cq2MVpMv.js → index-CXquA22H.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-C6IVvAua.js → index.vue_vue_type_script_setup_true_lang-D6HyeIid.js} +6918 -6861
- package/dist/{item-Bq6SCc7D.js → item-Cik-YX-L.js} +16 -16
- package/dist/{jszip.min-1MrCGuHF.js → jszip.min-D22BefT1.js} +388 -387
- package/dist/{menu-CKA9uouu.js → menu-ag-37Ofg.js} +1 -1
- package/dist/{menuV2-DBkrmeha.js → menuV2-DZDWxmas.js} +172 -172
- package/dist/{priceTier-Cxr9IcVP.js → priceTier-BmDl3J-3.js} +1 -1
- package/dist/{rules-DFWR7a3m.js → rules-pJdF9REd.js} +12 -12
- package/dist/{scheduler-HKff8Ty2.js → scheduler-DRHXK6kX.js} +29 -29
- package/dist/{toExcel-DopYrxBW.js → toExcel-5kDfvPVG.js} +2 -2
- package/dist/{unit-5G600HMJ.js → unit-CIlgFZ50.js} +35 -35
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js +0 -6130
- package/dist/app-CA4g3v2n.js +0 -363
- package/dist/dayjs.min-BVOO8wJG.js +0 -6
- package/dist/index-CG7GFWlC.js +0 -246
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as z, renderSlot as oe, createVNode as m, unref as n, withCtx as b, createElementVNode as c, renderList as Q, toDisplayString as M, h as T, withModifiers as K, getCurrentInstance as ne, createBlock as U, createCommentVNode as le } from "vue";
|
|
2
2
|
import { useI18n as R } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as j, components as W, useDialog as X, FmButtonVariant as
|
|
3
|
+
import { useSnackbar as j, components as W, useDialog as X, FmButtonVariant as q, useBreakpoints as se, FmButtonColorThemeVariant as ie } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as re } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import {
|
|
5
|
+
import { B as P, u as Y, O as J, J as Z, y as ee, a2 as ce } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
6
6
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as me } from "./app-
|
|
7
|
+
import { _ as me } from "./app-BmAr9vNI.js";
|
|
8
8
|
import { c as de } from "./createForm-BoUQeZTd.js";
|
|
9
9
|
import { u as pe } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import { c as
|
|
11
|
-
import { r as _e, u as ae } from "./rules-
|
|
12
|
-
import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { c as G } from "./object-DVUNCr7w.js";
|
|
11
|
+
import { r as _e, u as ae } from "./rules-pJdF9REd.js";
|
|
12
|
+
import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js";
|
|
13
13
|
import { c as ve } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { g as
|
|
15
|
-
import { _ as ge } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as ye } from "./menu-
|
|
14
|
+
import { g as H } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js";
|
|
15
|
+
import { _ as ge } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js";
|
|
16
|
+
import { a as ye } from "./menu-ag-37Ofg.js";
|
|
17
17
|
const be = {
|
|
18
18
|
class: "fm-typo-en-title-md-600"
|
|
19
19
|
}, he = {
|
|
@@ -22,34 +22,34 @@ const be = {
|
|
|
22
22
|
class: "py-12 px-16 space-y-4"
|
|
23
23
|
}, Ce = {
|
|
24
24
|
class: "flex gap-8 items-center justify-start"
|
|
25
|
-
}, ke = /* @__PURE__ */
|
|
25
|
+
}, ke = /* @__PURE__ */ A({
|
|
26
26
|
__name: "Form",
|
|
27
27
|
props: {
|
|
28
28
|
initialValue: {}
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
30
|
+
setup(B, {
|
|
31
31
|
expose: w
|
|
32
32
|
}) {
|
|
33
|
-
const h =
|
|
33
|
+
const h = B, S = j(), F = P(S), E = J(F), d = Y(), {
|
|
34
34
|
t: l
|
|
35
|
-
} = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0),
|
|
35
|
+
} = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), N = (e) => {
|
|
36
36
|
ve.isBoolean(e) ? o.value = e : o.value = !o.value;
|
|
37
|
-
}, s = x(
|
|
37
|
+
}, s = x(G(h.initialValue)), O = V(() => !!s.value.name), D = V(() => {
|
|
38
38
|
var f;
|
|
39
39
|
const e = [], a = "en-US", t = (f = u.value) == null ? void 0 : f[a];
|
|
40
40
|
return s.value.name && !t && e.push({
|
|
41
41
|
locale: a,
|
|
42
42
|
name: s.value.name,
|
|
43
|
-
localeDisplay:
|
|
43
|
+
localeDisplay: H(a)
|
|
44
44
|
}), u.value && Object.entries(u.value).filter(([y, v]) => v && v.trim()).sort(([y], [v]) => y.localeCompare(v)).forEach(([y, v]) => {
|
|
45
45
|
e.push({
|
|
46
46
|
locale: y,
|
|
47
47
|
name: v,
|
|
48
|
-
localeDisplay:
|
|
48
|
+
localeDisplay: H(y)
|
|
49
49
|
});
|
|
50
50
|
}), e;
|
|
51
51
|
});
|
|
52
|
-
function
|
|
52
|
+
function I(e) {
|
|
53
53
|
u.value = e;
|
|
54
54
|
}
|
|
55
55
|
function i(e) {
|
|
@@ -74,20 +74,20 @@ const be = {
|
|
|
74
74
|
name: s.value.name ?? (e == null ? void 0 : e.name),
|
|
75
75
|
name_locale: t
|
|
76
76
|
}
|
|
77
|
-
}, s.value.name),
|
|
77
|
+
}, s.value.name), N(!1);
|
|
78
78
|
}
|
|
79
79
|
return te(() => o.value, () => {
|
|
80
80
|
if (!o.value) return;
|
|
81
|
-
s.value =
|
|
81
|
+
s.value = G(h.initialValue);
|
|
82
82
|
const e = d.subcategories.find((a) => a._id === s.value._id);
|
|
83
83
|
u.value = e == null ? void 0 : e.name_locale;
|
|
84
84
|
}), w({
|
|
85
|
-
trigger:
|
|
85
|
+
trigger: N,
|
|
86
86
|
show: o
|
|
87
87
|
}), (e, a) => {
|
|
88
88
|
const t = C("fm-button"), f = C("FmTooltip"), y = C("FmTextField"), v = C("fm-side-sheet");
|
|
89
|
-
return p(), k(
|
|
90
|
-
trigger:
|
|
89
|
+
return p(), k(z, null, [oe(e.$slots, "default", {
|
|
90
|
+
trigger: N
|
|
91
91
|
}), m(v, {
|
|
92
92
|
id: "group-form",
|
|
93
93
|
modelValue: o.value,
|
|
@@ -100,7 +100,7 @@ const be = {
|
|
|
100
100
|
"max-width": 560,
|
|
101
101
|
"onOn:clickedAway": n(r)
|
|
102
102
|
}, {
|
|
103
|
-
"side-sheet-header": b(() => [c("p", be,
|
|
103
|
+
"side-sheet-header": b(() => [c("p", be, M(n(l)("menu.subcategory.title")), 1)]),
|
|
104
104
|
"side-sheet-footer": b(() => [c("div", Ce, [m(t, {
|
|
105
105
|
label: n(l)("menu.common.actions.update"),
|
|
106
106
|
loading: L.value,
|
|
@@ -126,9 +126,9 @@ const be = {
|
|
|
126
126
|
placement: "top",
|
|
127
127
|
"z-index": 999
|
|
128
128
|
}, {
|
|
129
|
-
content: b(() => [c("div", xe, [(p(!0), k(
|
|
129
|
+
content: b(() => [c("div", xe, [(p(!0), k(z, null, Q(D.value, (g) => (p(), k("div", {
|
|
130
130
|
key: g.locale
|
|
131
|
-
},
|
|
131
|
+
}, M(g.name) + " (" + M(g.localeDisplay) + ") ", 1))), 128))])]),
|
|
132
132
|
default: b(() => [m(t, {
|
|
133
133
|
variant: "tertiary",
|
|
134
134
|
icon: "g_translate",
|
|
@@ -147,7 +147,7 @@ const be = {
|
|
|
147
147
|
name: s.value.name,
|
|
148
148
|
"name-locale": u.value,
|
|
149
149
|
"onUpdate:name": i,
|
|
150
|
-
"onUpdate:nameLocale":
|
|
150
|
+
"onUpdate:nameLocale": I
|
|
151
151
|
}, null, 8, ["modelValue", "title", "name", "name-locale"])], 64);
|
|
152
152
|
};
|
|
153
153
|
}
|
|
@@ -164,14 +164,14 @@ const be = {
|
|
|
164
164
|
class: "p-8"
|
|
165
165
|
}, Ee = {
|
|
166
166
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
167
|
-
},
|
|
167
|
+
}, Ne = ["onClick"], Te = {
|
|
168
168
|
class: "flex-1 space-y-4"
|
|
169
|
-
},
|
|
169
|
+
}, Me = {
|
|
170
170
|
class: "fm-typo-en-body-lg-600"
|
|
171
|
-
}, Oe = /* @__PURE__ */
|
|
171
|
+
}, Oe = /* @__PURE__ */ A({
|
|
172
172
|
__name: "SubcategoryTable",
|
|
173
|
-
setup(
|
|
174
|
-
const w = X(), h = j(), S = P(h), F =
|
|
173
|
+
setup(B) {
|
|
174
|
+
const w = X(), h = j(), S = P(h), F = J(S), E = ae({
|
|
175
175
|
dialog: w,
|
|
176
176
|
menuLoader: F
|
|
177
177
|
}), d = V(() => Y().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
|
|
@@ -185,11 +185,11 @@ const be = {
|
|
|
185
185
|
},
|
|
186
186
|
cell: (i) => {
|
|
187
187
|
const r = i.row.original, _ = i.getValue();
|
|
188
|
-
return
|
|
188
|
+
return T("div", {
|
|
189
189
|
class: "flex items-center gap-8"
|
|
190
|
-
}, [
|
|
190
|
+
}, [T("span", {
|
|
191
191
|
class: "break-all"
|
|
192
|
-
}, _), r.name_locale ?
|
|
192
|
+
}, _), r.name_locale ? T(ge, {
|
|
193
193
|
nameLocale: r.name_locale ?? {}
|
|
194
194
|
}) : null]);
|
|
195
195
|
}
|
|
@@ -203,14 +203,14 @@ const be = {
|
|
|
203
203
|
header: "",
|
|
204
204
|
cell: (i) => {
|
|
205
205
|
const r = i.row.original;
|
|
206
|
-
return
|
|
206
|
+
return T("div", {
|
|
207
207
|
class: "flex justify-end"
|
|
208
|
-
}, [
|
|
208
|
+
}, [T(W.FmButton, {
|
|
209
209
|
icon: "delete",
|
|
210
210
|
disabled: !r._id,
|
|
211
211
|
variant: "tertiary",
|
|
212
212
|
textColor: "neutral-gray-400",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: K(async () => {
|
|
214
214
|
await u(r);
|
|
215
215
|
}, ["stop", "prevent"])
|
|
216
216
|
})]);
|
|
@@ -232,7 +232,7 @@ const be = {
|
|
|
232
232
|
primaryActions: {
|
|
233
233
|
text: "Remove",
|
|
234
234
|
close: !0,
|
|
235
|
-
variant:
|
|
235
|
+
variant: q.Destructive
|
|
236
236
|
},
|
|
237
237
|
secondaryActions: {
|
|
238
238
|
text: "Cancel",
|
|
@@ -246,7 +246,7 @@ const be = {
|
|
|
246
246
|
}, i.name, !0);
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
async function
|
|
249
|
+
async function N(i) {
|
|
250
250
|
const r = i.map((_) => _._id).filter((_) => !!_);
|
|
251
251
|
await E.rearrange(r);
|
|
252
252
|
}
|
|
@@ -256,10 +256,10 @@ const be = {
|
|
|
256
256
|
initialValue: i
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
const
|
|
259
|
+
const D = se(), I = V(() => D.breakpoints.value.xs);
|
|
260
260
|
return (i, r) => {
|
|
261
261
|
const _ = C("FmSearch"), e = C("FmTable"), a = C("FmButton");
|
|
262
|
-
return
|
|
262
|
+
return I.value ? (p(), k("div", $e, [c("div", Se, [m(_, {
|
|
263
263
|
autofocus: "",
|
|
264
264
|
modelValue: l.value,
|
|
265
265
|
"onUpdate:modelValue": r[2] || (r[2] = (t) => l.value = t),
|
|
@@ -267,17 +267,17 @@ const be = {
|
|
|
267
267
|
placeholder: n(o)("menu.common.labels.search_placeholder", {
|
|
268
268
|
type: "categories"
|
|
269
269
|
})
|
|
270
|
-
}, null, 8, ["modelValue", "placeholder"])]), c("div", Ee, [(p(!0), k(
|
|
270
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", Ee, [(p(!0), k(z, null, Q(L.value, (t) => (p(), k("div", {
|
|
271
271
|
key: t._id || "",
|
|
272
272
|
class: "flex flex-row py-12 px-16",
|
|
273
273
|
onClick: (f) => O(t)
|
|
274
|
-
}, [c("div",
|
|
274
|
+
}, [c("div", Te, [c("p", Me, M(t.name), 1)]), m(a, {
|
|
275
275
|
"text-color": n(ie).NeutralGray400,
|
|
276
|
-
variant: n(
|
|
276
|
+
variant: n(q).Tertiary,
|
|
277
277
|
"prepend-icon": "delete",
|
|
278
278
|
disabled: !t._id,
|
|
279
|
-
onClick:
|
|
280
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
279
|
+
onClick: K((f) => u(t), ["stop"])
|
|
280
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ne))), 128))])])) : (p(), k("div", we, [c("div", Fe, [c("div", Le, [m(_, {
|
|
281
281
|
modelValue: l.value,
|
|
282
282
|
"onUpdate:modelValue": r[0] || (r[0] = (t) => l.value = t),
|
|
283
283
|
autofocus: "",
|
|
@@ -295,17 +295,17 @@ const be = {
|
|
|
295
295
|
"shrink-at": !1,
|
|
296
296
|
"hide-footer": "",
|
|
297
297
|
"pin-header-row": "",
|
|
298
|
-
onDndChanged:
|
|
298
|
+
onDndChanged: N,
|
|
299
299
|
onRowClick: r[1] || (r[1] = (t) => O(t.original))
|
|
300
300
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
301
301
|
_: 1
|
|
302
302
|
})]));
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
}), Ue = { class: "flex-1 flex justify-between gap-8 pl-8" },
|
|
305
|
+
}), Ue = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "flex items-center" }, De = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ie = { class: "fm-typo-en-body-md-600 font-semibold" }, aa = /* @__PURE__ */ A({
|
|
306
306
|
__name: "Subcategory",
|
|
307
|
-
setup(
|
|
308
|
-
const w = X(), h = j(), S = P(h), F =
|
|
307
|
+
setup(B) {
|
|
308
|
+
const w = X(), h = j(), S = P(h), F = J(S), E = ae({ dialog: w, menuLoader: F }), d = V(() => Y().subcategories), { t: l } = R();
|
|
309
309
|
function L() {
|
|
310
310
|
E.create();
|
|
311
311
|
}
|
|
@@ -326,9 +326,9 @@ const be = {
|
|
|
326
326
|
]),
|
|
327
327
|
"append-heading": b(() => [
|
|
328
328
|
c("div", Ue, [
|
|
329
|
-
c("div",
|
|
330
|
-
c("div",
|
|
331
|
-
c("p",
|
|
329
|
+
c("div", Be, [
|
|
330
|
+
c("div", De, [
|
|
331
|
+
c("p", Ie, M(o.value), 1)
|
|
332
332
|
])
|
|
333
333
|
]),
|
|
334
334
|
d.value.length > 0 ? (p(), U(re, {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as f, computed as y, ref as k, createBlock as i, openBlock as d, unref as a, withCtx as s, createElementVNode as t, toDisplayString as b, createCommentVNode as g, createVNode as m } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { B as x, u as v, O as w, J as E, y as M } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
3
3
|
import { useI18n as T } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as V } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as h } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
6
|
import { _ as C } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { T as
|
|
9
|
-
import { a as
|
|
10
|
-
const
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js";
|
|
8
|
+
import { T as O, l as S } from "./index-BGm2uHNk.js";
|
|
9
|
+
import { a as B } from "./menu-ag-37Ofg.js";
|
|
10
|
+
const L = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, D = { class: "fm-typo-en-body-md-600 font-semibold" }, G = /* @__PURE__ */ f({
|
|
11
11
|
__name: "Takeaway",
|
|
12
|
-
setup(
|
|
12
|
+
setup(I) {
|
|
13
13
|
const u = V(), l = x(u), p = v(), c = w(l), _ = y(() => p.rules.item.bindToVariant), n = k(0), { t: r } = T();
|
|
14
|
-
return
|
|
14
|
+
return B().resetOnMount(), (P, o) => (d(), i(C, {
|
|
15
15
|
heading: a(r)("menu.takeaway.title")
|
|
16
16
|
}, {
|
|
17
17
|
default: s(() => [
|
|
@@ -20,14 +20,14 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
20
20
|
})
|
|
21
21
|
]),
|
|
22
22
|
"append-heading": s(() => [
|
|
23
|
-
t("div",
|
|
24
|
-
t("div",
|
|
23
|
+
t("div", L, [
|
|
24
|
+
t("div", U, [
|
|
25
25
|
t("div", F, [
|
|
26
|
-
t("p",
|
|
26
|
+
t("p", D, b(n.value), 1)
|
|
27
27
|
])
|
|
28
28
|
]),
|
|
29
29
|
t("div", null, [
|
|
30
|
-
n.value > 0 ? (d(), i(a(
|
|
30
|
+
n.value > 0 ? (d(), i(a(O), {
|
|
31
31
|
key: 0,
|
|
32
32
|
"bind-to-variant": _.value,
|
|
33
33
|
action: "add",
|
|
@@ -37,7 +37,7 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
37
37
|
module: a(M.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
38
38
|
operation: a(E.F_OPERATION_TYPE).create,
|
|
39
39
|
data: e,
|
|
40
|
-
link: a(
|
|
40
|
+
link: a(S)(e.usedBy || [])
|
|
41
41
|
},
|
|
42
42
|
e.name
|
|
43
43
|
))
|
|
@@ -60,5 +60,5 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
G as default
|
|
64
64
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { getCurrentInstance as te, defineComponent as ne, computed as C, watch as oe, h as
|
|
2
|
-
import {
|
|
1
|
+
import { getCurrentInstance as te, defineComponent as ne, computed as C, watch as oe, h as U, resolveComponent as L, createElementBlock as V, openBlock as w, Fragment as O, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as $, withCtx as P, renderList as ie, createBlock as j, createCommentVNode as G, toDisplayString as S, withModifiers as q } from "vue";
|
|
2
|
+
import { B as H, u as Q, O as W, J as z, y as N, G as Y, z as se, am as J, a2 as re } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
3
3
|
import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as ue } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as me } from "./app-
|
|
6
|
-
import { a as ye, l as ee, T as pe } from "./index-
|
|
7
|
-
import { _ as fe } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as me } from "./app-BmAr9vNI.js";
|
|
6
|
+
import { a as ye, l as ee, T as pe } from "./index-BGm2uHNk.js";
|
|
7
|
+
import { _ as fe } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js";
|
|
8
8
|
import { u as _e } from "./search-BAPEUu1R.js";
|
|
9
|
-
import { f as F } from "./currency-
|
|
9
|
+
import { f as F } from "./currency-CyKauaRc.js";
|
|
10
10
|
import { defineStore as ke } from "pinia";
|
|
11
|
-
import { C as ve } from "./catalog-
|
|
11
|
+
import { C as ve } from "./catalog-tNpB0Dhn.js";
|
|
12
12
|
import { c as we } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
13
|
function ge(b, _, l, u) {
|
|
14
14
|
var y, p, k;
|
|
@@ -54,7 +54,7 @@ function be(b, _, l, u) {
|
|
|
54
54
|
return e;
|
|
55
55
|
}
|
|
56
56
|
const he = ke("takeaway-manager", () => {
|
|
57
|
-
const b = ce(), _ = Z(), l = H(_), u = W(l), e =
|
|
57
|
+
const b = ce(), _ = Z(), l = H(_), u = W(l), e = Q(), y = te(), { t: p } = X(), k = (a) => {
|
|
58
58
|
var s, h;
|
|
59
59
|
const { vNode: d } = we(
|
|
60
60
|
ye,
|
|
@@ -64,8 +64,8 @@ const he = ke("takeaway-manager", () => {
|
|
|
64
64
|
(h = (s = d.component) == null ? void 0 : s.exposed) == null || h.trigger();
|
|
65
65
|
};
|
|
66
66
|
async function m(a) {
|
|
67
|
-
var h,
|
|
68
|
-
const s = ((
|
|
67
|
+
var h, M;
|
|
68
|
+
const s = ((M = (h = e.currentCatalog) == null ? void 0 : h.override.takeaway[a._id]) == null ? void 0 : M.price) ? null : e.state.menu.modules.takeaway.find((x) => x._id === a._id);
|
|
69
69
|
k({
|
|
70
70
|
initialValue: a,
|
|
71
71
|
applyProduct: !0,
|
|
@@ -87,8 +87,8 @@ const he = ke("takeaway-manager", () => {
|
|
|
87
87
|
"onUpdate:takeaway": async (d) => {
|
|
88
88
|
await u.updateMenu(
|
|
89
89
|
{
|
|
90
|
-
module:
|
|
91
|
-
operation:
|
|
90
|
+
module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
91
|
+
operation: z.F_OPERATION_TYPE.update,
|
|
92
92
|
data: d,
|
|
93
93
|
link: ee(d.usedBy || [])
|
|
94
94
|
},
|
|
@@ -116,8 +116,8 @@ const he = ke("takeaway-manager", () => {
|
|
|
116
116
|
}).onPrimary(async () => {
|
|
117
117
|
await u.updateMenu(
|
|
118
118
|
{
|
|
119
|
-
module:
|
|
120
|
-
operation:
|
|
119
|
+
module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
120
|
+
operation: z.F_OPERATION_TYPE.delete,
|
|
121
121
|
data: a._id
|
|
122
122
|
},
|
|
123
123
|
a.name,
|
|
@@ -140,7 +140,7 @@ const he = ke("takeaway-manager", () => {
|
|
|
140
140
|
class: "px-16 pt-8"
|
|
141
141
|
}, Ie = {
|
|
142
142
|
class: /* @__PURE__ */ D(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
|
|
143
|
-
},
|
|
143
|
+
}, Ue = ["onClick"], Me = {
|
|
144
144
|
class: "flex-1"
|
|
145
145
|
}, Ee = {
|
|
146
146
|
class: "fm-typo-en-body-lg-600 mb-4"
|
|
@@ -157,7 +157,7 @@ const he = ke("takeaway-manager", () => {
|
|
|
157
157
|
setup(b, {
|
|
158
158
|
emit: _
|
|
159
159
|
}) {
|
|
160
|
-
const l =
|
|
160
|
+
const l = Q(), u = he(), e = C(() => l.rules.item.bindToVariant), y = C(() => l.rules.takeaway), p = W(H(Z())), k = le(), m = C(() => se.Country.getCountry(k.currentCountry.value).currency), n = C(() => l.takeaways.map((t) => ({
|
|
161
161
|
...t,
|
|
162
162
|
usedBy: l.items.reduce((o, f) => {
|
|
163
163
|
var r, E, R;
|
|
@@ -193,11 +193,11 @@ const he = ke("takeaway-manager", () => {
|
|
|
193
193
|
size: 700,
|
|
194
194
|
cell: (t) => {
|
|
195
195
|
const o = t.row.original, f = t.getValue();
|
|
196
|
-
return
|
|
196
|
+
return U("div", {
|
|
197
197
|
class: "flex items-center gap-8"
|
|
198
|
-
}, [
|
|
198
|
+
}, [U("span", {
|
|
199
199
|
class: "break-all"
|
|
200
|
-
}, f), o.name_locale ?
|
|
200
|
+
}, f), o.name_locale ? U(fe, {
|
|
201
201
|
nameLocale: o.name_locale ?? {}
|
|
202
202
|
}) : null]);
|
|
203
203
|
}
|
|
@@ -221,7 +221,7 @@ const he = ke("takeaway-manager", () => {
|
|
|
221
221
|
enableSorting: !1,
|
|
222
222
|
size: 200,
|
|
223
223
|
cell: (t) => {
|
|
224
|
-
const o = t.getValue(), f =
|
|
224
|
+
const o = t.getValue(), f = J(l.categorizedItems, o).flatMap((T) => T.items).length ?? 0;
|
|
225
225
|
return s("menu.takeaway.table.items_linked", {
|
|
226
226
|
count: f
|
|
227
227
|
});
|
|
@@ -233,9 +233,9 @@ const he = ke("takeaway-manager", () => {
|
|
|
233
233
|
cellClass: "pl-16",
|
|
234
234
|
headerContentClass: "-mx-16"
|
|
235
235
|
},
|
|
236
|
-
cell: (t) =>
|
|
236
|
+
cell: (t) => U("div", {
|
|
237
237
|
class: "flex justify-end items-center"
|
|
238
|
-
}, [y.value.delete ?
|
|
238
|
+
}, [y.value.delete ? U(de.FmButton, {
|
|
239
239
|
prependIcon: "delete",
|
|
240
240
|
variant: A.Tertiary,
|
|
241
241
|
textColor: "neutral-gray-400",
|
|
@@ -243,12 +243,12 @@ const he = ke("takeaway-manager", () => {
|
|
|
243
243
|
o.stopPropagation(), u.deleteTakeaway(t.row.original);
|
|
244
244
|
}
|
|
245
245
|
}) : null])
|
|
246
|
-
}]),
|
|
246
|
+
}]), M = ue(), x = C(() => M.breakpoints.value.xs);
|
|
247
247
|
return (t, o) => {
|
|
248
248
|
const f = L("fm-search"), T = L("fm-table"), B = L("fm-button");
|
|
249
|
-
return n.value.length ? (w(), V(
|
|
249
|
+
return n.value.length ? (w(), V(O, {
|
|
250
250
|
key: 0
|
|
251
|
-
}, [x.value ? (w(), V(
|
|
251
|
+
}, [x.value ? (w(), V(O, {
|
|
252
252
|
key: 1
|
|
253
253
|
}, [g("div", Ve, [I(f, {
|
|
254
254
|
class: "w-full",
|
|
@@ -256,25 +256,25 @@ const he = ke("takeaway-manager", () => {
|
|
|
256
256
|
modelValue: i(c),
|
|
257
257
|
"onUpdate:modelValue": o[2] || (o[2] = (r) => $(c) ? c.value = r : null),
|
|
258
258
|
placeholder: i(s)("menu.takeaway.table.search.placeholder")
|
|
259
|
-
}, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(
|
|
259
|
+
}, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(O, null, ie(a.value, (r) => (w(), V("div", {
|
|
260
260
|
key: r._id,
|
|
261
261
|
class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
262
262
|
onClick: () => {
|
|
263
263
|
y.value.edit && i(u).updateTakeaway(r);
|
|
264
264
|
}
|
|
265
|
-
}, [g("div",
|
|
265
|
+
}, [g("div", Me, [g("p", Ee, S(r.name), 1), g("p", Ke, S(`${i(J)(i(l).categorizedItems, r.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), g("p", Se, " Price: " + S(m.value.symbol) + S(i(F)(r.price, !1)), 1)]), y.value.delete ? (w(), j(B, {
|
|
266
266
|
key: 0,
|
|
267
267
|
variant: i(A).Tertiary,
|
|
268
268
|
"text-color": "neutral-gray-400",
|
|
269
269
|
"prepend-icon": "delete",
|
|
270
270
|
onClick: q(() => i(u).deleteTakeaway(r), ["stop"])
|
|
271
|
-
}, null, 8, ["variant", "onClick"])) : G("", !0)], 8,
|
|
271
|
+
}, null, 8, ["variant", "onClick"])) : G("", !0)], 8, Ue))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
|
|
272
272
|
autofocus: "",
|
|
273
273
|
modelValue: i(c),
|
|
274
274
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => $(c) ? c.value = r : null),
|
|
275
275
|
placeholder: i(s)("menu.takeaway.table.search.placeholder")
|
|
276
276
|
}, null, 8, ["modelValue", "placeholder"])])]), I(me, null, {
|
|
277
|
-
default:
|
|
277
|
+
default: P(() => [I(T, {
|
|
278
278
|
"column-defs": h.value,
|
|
279
279
|
loading: i(p).checkMenuIsLoading(),
|
|
280
280
|
"page-size": a.value.length,
|
|
@@ -293,19 +293,19 @@ const he = ke("takeaway-manager", () => {
|
|
|
293
293
|
subtitle: i(s)("menu.takeaway.empty.subtitle"),
|
|
294
294
|
title: i(s)("menu.takeaway.empty.title")
|
|
295
295
|
}, {
|
|
296
|
-
action:
|
|
296
|
+
action: P(() => [y.value.create ? (w(), j(i(pe), {
|
|
297
297
|
key: 0,
|
|
298
298
|
"bind-to-variant": e.value,
|
|
299
299
|
action: "add",
|
|
300
300
|
"apply-product": "",
|
|
301
301
|
"onUpdate:takeaway": o[3] || (o[3] = (r) => i(p).updateMenu({
|
|
302
|
-
module: i(
|
|
303
|
-
operation: i(
|
|
302
|
+
module: i(N.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
303
|
+
operation: i(z.F_OPERATION_TYPE).create,
|
|
304
304
|
data: r,
|
|
305
305
|
link: i(ee)(r.usedBy || [])
|
|
306
306
|
}, r.name))
|
|
307
307
|
}, {
|
|
308
|
-
default:
|
|
308
|
+
default: P(({
|
|
309
309
|
trigger: r
|
|
310
310
|
}) => [I(B, {
|
|
311
311
|
"prepend-icon": "add",
|