@feedmepos/mf-menu 0.32.44 → 0.32.45
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-BXkiQoTM.js → App-CczmyQeJ.js} +1471 -1458
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js} +3 -3
- package/dist/{Catalog-CLFVLyor.js → Catalog-RU_6keJm.js} +6 -6
- package/dist/{Category-CNuVHuI3.js → Category-7Fg2kD0h.js} +79 -79
- package/dist/{Category-BdyouDU8.js → Category-CwEXbsDv.js} +4 -4
- package/dist/{CookingGuide-Bed7bUt1.js → CookingGuide-DFu5VStf.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js} +1 -1
- package/dist/{Group-TUqCPmO3.js → Group-C6vQeBnj.js} +1 -1
- package/dist/{Group-D4UTsIxI.js → Group-l-YpAi6B.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js → Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js} +165 -165
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js} +6 -6
- package/dist/{Ingredient-CcxoeuDd.js → Ingredient-CHqDo-GY.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js} +2 -2
- package/dist/{LinkProductSideSheet-DazOkwkd.js → LinkProductSideSheet-DY32g33Q.js} +3 -3
- package/dist/{MenuSetting-B3oLll4C.js → MenuSetting-DhbxlKuU.js} +5 -5
- package/dist/{PrintRoute-D878qPu8.js → PrintRoute-CToZ0ClG.js} +4 -4
- package/dist/{Product-DOC8y_mW.js → Product-Cpg32wpg.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js → Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js} +440 -438
- package/dist/{ProductInternalTools-9TgIc2bR.js → ProductInternalTools-wH9BN1NK.js} +5 -5
- package/dist/Products-CpINHaH6.js +291 -0
- package/dist/{Publish-BktK_PKq.js → Publish-CJS_836k.js} +3 -3
- package/dist/{Recipe-eA0xrGYk.js → Recipe-Cz7hivmM.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js → RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js} +207 -207
- package/dist/{Scheduler-CKSqPZLQ.js → Scheduler-QuWCnEJw.js} +3 -3
- package/dist/{ServingSequence-Ea20baNj.js → ServingSequence-CqK5Sjmq.js} +3 -3
- package/dist/{Setting-u6lX_Dzg.js → Setting-C3tKUfsm.js} +5 -5
- package/dist/{Subcategory-C6s7OMOb.js → Subcategory-DCtTOPUj.js} +99 -100
- package/dist/{Takeaway-lWxS9oWe.js → Takeaway-BnB1OFnK.js} +1 -1
- package/dist/{Takeaway-B9kr-Nf4.js → Takeaway-Fi8SAH2t.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js → Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js} +91 -91
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js → Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js} +4 -4
- package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js +278 -0
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js +140 -0
- package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js +60 -0
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js} +13 -13
- package/dist/{Unit-DkQlUg2l.js → Unit-5yE2-y9D.js} +2 -2
- package/dist/Variant-C7lIdRID.js +248 -0
- package/dist/{_id_-_oqk-OhC.js → _id_-08ykp97a.js} +9 -9
- package/dist/{app-CfCYl2pO.js → app-CA4g3v2n.js} +26 -26
- package/dist/{app-DIYHNWEw.js → app-DPovSnb_.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/translation/LanguageChip.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/translation/LanguageSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/translation/LocaleIconBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationFieldRow.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/composable/translationLanguages.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/utils/translation.d.ts +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-AoXjo9FF.js → linked-status-WT6deoPw.js} +2 -2
- package/dist/assets/{menu-export-BHcaWhM3.js → menu-export-DxtFXMED.js} +2 -2
- package/dist/assets/{override-menu-B9xQcjuJ.js → override-menu-BJGRdWWE.js} +2 -2
- package/dist/assets/{validate-menu-D-ezd4W8.js → validate-menu-B_tmkHe7.js} +2 -2
- package/dist/{catalog-CvN9Wu8V.js → catalog-D7Jjqj3-.js} +1 -1
- package/dist/{catalogSetting-qS5Np22q.js → catalogSetting-Bg_zMUrV.js} +1 -1
- package/dist/{currency-Nxod6uwl.js → currency-DDxFMjAI.js} +1 -1
- package/dist/{dayjs.min-B1AjAGva.js → dayjs.min-BVOO8wJG.js} +1 -1
- package/dist/{index-Cq-czJjU.js → index-BlLRjkMF.js} +8 -7
- package/dist/{index-nKlYiotY.js → index-CG7GFWlC.js} +1 -1
- package/dist/index-Cq2MVpMv.js +472 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-YXKayPEp.js → index.vue_vue_type_script_setup_true_lang-C6IVvAua.js} +169 -168
- package/dist/{item-CUZSonzT.js → item-Bq6SCc7D.js} +3250 -3386
- package/dist/{jszip.min-BnkZQ6lD.js → jszip.min-1MrCGuHF.js} +2 -2
- package/dist/{menu-BP_ArXCI.js → menu-CKA9uouu.js} +1 -1
- package/dist/{menuV2-BGEYgQ8-.js → menuV2-DBkrmeha.js} +71 -71
- package/dist/{priceTier-B-Qa0xaO.js → priceTier-Cxr9IcVP.js} +1 -1
- package/dist/{rules-Dchd_ilF.js → rules-DFWR7a3m.js} +4 -4
- package/dist/{scheduler-DN7ZGLk8.js → scheduler-HKff8Ty2.js} +4 -4
- package/dist/{toExcel-jHmkDqcm.js → toExcel-DopYrxBW.js} +2 -2
- package/dist/{unit-DgL56pkI.js → unit-5G600HMJ.js} +2 -2
- package/package.json +1 -1
- package/dist/Products-DfUGnHmD.js +0 -1568
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +0 -194
- package/dist/Variant-BF5r2WLL.js +0 -247
- package/dist/index-C0Zw1cSS.js +0 -545
- package/dist/translation-Cdap0IVg.js +0 -79
- /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
- /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { getCurrentInstance as te, defineComponent as ne, computed as
|
|
2
|
-
import { G as H, u as J, Q as W, M as N, A as z, I as Y, B as se, ap as Q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { getCurrentInstance as te, defineComponent as ne, computed as C, watch as oe, h as M, resolveComponent as L, createElementBlock as V, openBlock as w, Fragment as P, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as $, withCtx as O, renderList as ie, createBlock as j, createCommentVNode as G, toDisplayString as S, withModifiers as q } from "vue";
|
|
2
|
+
import { G as H, u as J, Q as W, M as N, A as z, I as Y, B as se, ap as Q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { _ as me } from "./app-CA4g3v2n.js";
|
|
6
|
+
import { a as ye, l as ee, T as pe } from "./index-BlLRjkMF.js";
|
|
7
|
+
import { _ as fe } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js";
|
|
8
|
+
import { u as _e } from "./search-BAPEUu1R.js";
|
|
9
|
+
import { f as F } from "./currency-DDxFMjAI.js";
|
|
10
|
+
import { defineStore as ke } from "pinia";
|
|
11
|
+
import { C as ve } from "./catalog-D7Jjqj3-.js";
|
|
12
|
+
import { c as we } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
13
|
function ge(b, _, l, u) {
|
|
14
14
|
var y, p, k;
|
|
15
15
|
if (u >= 0) {
|
|
@@ -24,39 +24,39 @@ function be(b, _, l, u) {
|
|
|
24
24
|
const e = Y(b);
|
|
25
25
|
e.override.takeaway[l._id] = { price: l.price || void 0 };
|
|
26
26
|
const y = [...l.usedBy, ..._.usedBy];
|
|
27
|
-
for (const
|
|
27
|
+
for (const n of y) {
|
|
28
28
|
const c = l.usedBy.some(
|
|
29
|
-
(s) => s._id ===
|
|
30
|
-
) ? l._id : "", a = (e.override.items[
|
|
31
|
-
(s) => s.combinationKey ===
|
|
32
|
-
), d = ge(e,
|
|
29
|
+
(s) => s._id === n._id && s.combinationKey === n.combinationKey
|
|
30
|
+
) ? l._id : "", a = (e.override.items[n._id] || []).findIndex(
|
|
31
|
+
(s) => s.combinationKey === n.combinationKey
|
|
32
|
+
), d = ge(e, n, u, a);
|
|
33
33
|
if (a >= 0)
|
|
34
|
-
e.override.items[
|
|
34
|
+
e.override.items[n._id][a].takeawayUsed = c;
|
|
35
35
|
else if (d !== c) {
|
|
36
36
|
const s = {
|
|
37
|
-
_id:
|
|
38
|
-
combinationKey:
|
|
37
|
+
_id: n._id,
|
|
38
|
+
combinationKey: n.combinationKey,
|
|
39
39
|
takeawayUsed: c
|
|
40
40
|
};
|
|
41
|
-
e.override.items[
|
|
41
|
+
e.override.items[n._id] = [...e.override.items[n._id] || [], s];
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const p = [...new Set(y.map((
|
|
45
|
-
for (const
|
|
46
|
-
const v = u.find((d) => d._id ===
|
|
44
|
+
const p = [...new Set(y.map((n) => n._id))];
|
|
45
|
+
for (const n of p) {
|
|
46
|
+
const v = u.find((d) => d._id === n);
|
|
47
47
|
if (!((m = (k = v == null ? void 0 : v.variant) == null ? void 0 : k.variantCombinations) != null && m.length)) continue;
|
|
48
|
-
const c = (e.override.items[
|
|
48
|
+
const c = (e.override.items[n] || []).findIndex(
|
|
49
49
|
(d) => !d.combinationKey
|
|
50
50
|
);
|
|
51
51
|
if (c < 0) continue;
|
|
52
|
-
l.usedBy.some((d) => d._id ===
|
|
52
|
+
l.usedBy.some((d) => d._id === n) || (e.override.items[n][c].takeawayUsed = "");
|
|
53
53
|
}
|
|
54
54
|
return e;
|
|
55
55
|
}
|
|
56
|
-
const he =
|
|
56
|
+
const he = ke("takeaway-manager", () => {
|
|
57
57
|
const b = ce(), _ = Z(), l = H(_), u = W(l), e = J(), y = te(), { t: p } = X(), k = (a) => {
|
|
58
58
|
var s, h;
|
|
59
|
-
const { vNode: d } =
|
|
59
|
+
const { vNode: d } = we(
|
|
60
60
|
ye,
|
|
61
61
|
y,
|
|
62
62
|
a
|
|
@@ -64,8 +64,8 @@ const he = _e("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, U;
|
|
68
|
+
const s = ((U = (h = e.currentCatalog) == null ? void 0 : h.override.takeaway[a._id]) == null ? void 0 : U.price) ? null : e.state.menu.modules.takeaway.find((x) => x._id === a._id);
|
|
69
69
|
k({
|
|
70
70
|
initialValue: a,
|
|
71
71
|
applyProduct: !0,
|
|
@@ -73,12 +73,12 @@ const he = _e("takeaway-manager", () => {
|
|
|
73
73
|
fallback: s,
|
|
74
74
|
action: "update",
|
|
75
75
|
"onUpdate:takeaway": async (x) => {
|
|
76
|
-
let
|
|
77
|
-
x.price ?
|
|
76
|
+
let t = Y(e.currentCatalog);
|
|
77
|
+
x.price ? t.override.takeaway[a._id] = { price: x.price } : delete t.override.takeaway[a._id], t = be(t, a, x, e.state.menu.modules.item), await new ve(t, e, u.updateMenu, b).update();
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
async function
|
|
81
|
+
async function n(a) {
|
|
82
82
|
k({
|
|
83
83
|
initialValue: a,
|
|
84
84
|
bindToVariant: e.rules.item.bindToVariant,
|
|
@@ -98,7 +98,7 @@ const he = _e("takeaway-manager", () => {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
async function v(a) {
|
|
101
|
-
e.currentCatalog ? await m(a) : await
|
|
101
|
+
e.currentCatalog ? await m(a) : await n(a);
|
|
102
102
|
}
|
|
103
103
|
async function c(a) {
|
|
104
104
|
b.open({
|
|
@@ -151,55 +151,55 @@ const he = _e("takeaway-manager", () => {
|
|
|
151
151
|
}, Be = {
|
|
152
152
|
key: 1,
|
|
153
153
|
class: "xs:pt-24"
|
|
154
|
-
},
|
|
154
|
+
}, Ge = /* @__PURE__ */ ne({
|
|
155
155
|
__name: "Takeaway",
|
|
156
156
|
emits: ["update:count"],
|
|
157
157
|
setup(b, {
|
|
158
158
|
emit: _
|
|
159
159
|
}) {
|
|
160
|
-
const l = J(), u = he(), e =
|
|
161
|
-
...
|
|
162
|
-
usedBy: l.items.reduce((
|
|
163
|
-
var
|
|
164
|
-
const
|
|
165
|
-
if ((!e.value || !((
|
|
166
|
-
|
|
160
|
+
const l = J(), 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
|
+
...t,
|
|
162
|
+
usedBy: l.items.reduce((o, f) => {
|
|
163
|
+
var r, E, R;
|
|
164
|
+
const T = f.takeawayUsed === t._id;
|
|
165
|
+
if ((!e.value || !((E = (r = f.variant) == null ? void 0 : r.variantGroupIds) != null && E.length)) && T)
|
|
166
|
+
o.push({
|
|
167
167
|
_id: f._id
|
|
168
168
|
});
|
|
169
169
|
else {
|
|
170
|
-
const ae = (((R = f.variant) == null ? void 0 : R.variantCombinations) || []).filter((
|
|
170
|
+
const ae = (((R = f.variant) == null ? void 0 : R.variantCombinations) || []).filter((K) => K.takeawayUsed === t._id || K.takeawayUsed == null && T).map((K) => ({
|
|
171
171
|
_id: f._id,
|
|
172
|
-
combinationKey:
|
|
172
|
+
combinationKey: K.combinationKey
|
|
173
173
|
}));
|
|
174
|
-
|
|
174
|
+
o = [...o, ...ae];
|
|
175
175
|
}
|
|
176
|
-
return
|
|
176
|
+
return o;
|
|
177
177
|
}, [])
|
|
178
178
|
}))), {
|
|
179
179
|
filter: v,
|
|
180
180
|
searchKey: c
|
|
181
|
-
} =
|
|
182
|
-
oe(() => a.value.length, (
|
|
183
|
-
d("update:count",
|
|
181
|
+
} = _e(), a = C(() => n.value.filter((t) => v([t.name, F(t.price, !1)]))), d = _;
|
|
182
|
+
oe(() => a.value.length, (t) => {
|
|
183
|
+
d("update:count", t);
|
|
184
184
|
}, {
|
|
185
185
|
immediate: !0
|
|
186
186
|
});
|
|
187
187
|
const {
|
|
188
188
|
t: s
|
|
189
|
-
} = X(), h =
|
|
189
|
+
} = X(), h = C(() => [{
|
|
190
190
|
accessorKey: "name",
|
|
191
191
|
header: () => s("menu.takeaway.table.columns.name"),
|
|
192
192
|
enableSorting: !1,
|
|
193
193
|
size: 700,
|
|
194
|
-
cell: (
|
|
195
|
-
const
|
|
196
|
-
return
|
|
194
|
+
cell: (t) => {
|
|
195
|
+
const o = t.row.original, f = t.getValue();
|
|
196
|
+
return M("div", {
|
|
197
197
|
class: "flex items-center gap-8"
|
|
198
|
-
}, [
|
|
198
|
+
}, [M("span", {
|
|
199
199
|
class: "break-all"
|
|
200
|
-
}, f),
|
|
201
|
-
|
|
202
|
-
}
|
|
200
|
+
}, f), o.name_locale ? M(fe, {
|
|
201
|
+
nameLocale: o.name_locale ?? {}
|
|
202
|
+
}) : null]);
|
|
203
203
|
}
|
|
204
204
|
}, {
|
|
205
205
|
accessorKey: "price",
|
|
@@ -211,17 +211,17 @@ const he = _e("takeaway-manager", () => {
|
|
|
211
211
|
meta: {
|
|
212
212
|
textAlign: "right"
|
|
213
213
|
},
|
|
214
|
-
cell: (
|
|
215
|
-
const
|
|
216
|
-
return F(
|
|
214
|
+
cell: (t) => {
|
|
215
|
+
const o = t.getValue();
|
|
216
|
+
return F(o, !1);
|
|
217
217
|
}
|
|
218
218
|
}, {
|
|
219
219
|
accessorKey: "usedBy",
|
|
220
220
|
header: () => s("menu.takeaway.table.columns.products"),
|
|
221
221
|
enableSorting: !1,
|
|
222
222
|
size: 200,
|
|
223
|
-
cell: (
|
|
224
|
-
const
|
|
223
|
+
cell: (t) => {
|
|
224
|
+
const o = t.getValue(), f = Q(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,48 +233,48 @@ const he = _e("takeaway-manager", () => {
|
|
|
233
233
|
cellClass: "pl-16",
|
|
234
234
|
headerContentClass: "-mx-16"
|
|
235
235
|
},
|
|
236
|
-
cell: (
|
|
236
|
+
cell: (t) => M("div", {
|
|
237
237
|
class: "flex justify-end items-center"
|
|
238
|
-
}, [y.value.delete ?
|
|
238
|
+
}, [y.value.delete ? M(de.FmButton, {
|
|
239
239
|
prependIcon: "delete",
|
|
240
240
|
variant: A.Tertiary,
|
|
241
241
|
textColor: "neutral-gray-400",
|
|
242
|
-
onClick: (
|
|
243
|
-
|
|
242
|
+
onClick: (o) => {
|
|
243
|
+
o.stopPropagation(), u.deleteTakeaway(t.row.original);
|
|
244
244
|
}
|
|
245
245
|
}) : null])
|
|
246
|
-
}]),
|
|
247
|
-
return (
|
|
248
|
-
const f = L("fm-search"),
|
|
249
|
-
return
|
|
246
|
+
}]), U = ue(), x = C(() => U.breakpoints.value.xs);
|
|
247
|
+
return (t, o) => {
|
|
248
|
+
const f = L("fm-search"), T = L("fm-table"), B = L("fm-button");
|
|
249
|
+
return n.value.length ? (w(), V(P, {
|
|
250
250
|
key: 0
|
|
251
|
-
}, [x.value ? (w(), V(
|
|
251
|
+
}, [x.value ? (w(), V(P, {
|
|
252
252
|
key: 1
|
|
253
253
|
}, [g("div", Ve, [I(f, {
|
|
254
254
|
class: "w-full",
|
|
255
255
|
autofocus: "",
|
|
256
256
|
modelValue: i(c),
|
|
257
|
-
"onUpdate:modelValue":
|
|
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(
|
|
260
|
-
key:
|
|
259
|
+
}, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(P, null, ie(a.value, (r) => (w(), V("div", {
|
|
260
|
+
key: r._id,
|
|
261
261
|
class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
262
262
|
onClick: () => {
|
|
263
|
-
y.value.edit && i(u).updateTakeaway(
|
|
263
|
+
y.value.edit && i(u).updateTakeaway(r);
|
|
264
264
|
}
|
|
265
|
-
}, [g("div", Ue, [g("p", Ee,
|
|
265
|
+
}, [g("div", Ue, [g("p", Ee, S(r.name), 1), g("p", Ke, S(`${i(Q)(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
|
-
onClick: q(() => i(u).deleteTakeaway(
|
|
271
|
-
}, null, 8, ["variant", "onClick"])) :
|
|
270
|
+
onClick: q(() => i(u).deleteTakeaway(r), ["stop"])
|
|
271
|
+
}, null, 8, ["variant", "onClick"])) : G("", !0)], 8, Me))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
|
|
272
272
|
autofocus: "",
|
|
273
273
|
modelValue: i(c),
|
|
274
|
-
"onUpdate:modelValue":
|
|
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: O(() => [I(T, {
|
|
278
278
|
"column-defs": h.value,
|
|
279
279
|
loading: i(p).checkMenuIsLoading(),
|
|
280
280
|
"page-size": a.value.length,
|
|
@@ -284,8 +284,8 @@ const he = _e("takeaway-manager", () => {
|
|
|
284
284
|
class: "flex-1 overflow-hidden",
|
|
285
285
|
"hide-footer": "",
|
|
286
286
|
"pin-header-row": "",
|
|
287
|
-
onRowClick:
|
|
288
|
-
y.value.edit && i(u).updateTakeaway(
|
|
287
|
+
onRowClick: o[1] || (o[1] = (r) => {
|
|
288
|
+
y.value.edit && i(u).updateTakeaway(r.original);
|
|
289
289
|
})
|
|
290
290
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
291
291
|
_: 1
|
|
@@ -293,32 +293,32 @@ const he = _e("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: O(() => [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
|
-
"onUpdate:takeaway":
|
|
301
|
+
"onUpdate:takeaway": o[3] || (o[3] = (r) => i(p).updateMenu({
|
|
302
302
|
module: i(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
303
303
|
operation: i(N.F_OPERATION_TYPE).create,
|
|
304
|
-
data:
|
|
305
|
-
link: i(ee)(
|
|
306
|
-
},
|
|
304
|
+
data: r,
|
|
305
|
+
link: i(ee)(r.usedBy || [])
|
|
306
|
+
}, r.name))
|
|
307
307
|
}, {
|
|
308
|
-
default:
|
|
309
|
-
trigger:
|
|
310
|
-
}) => [I(
|
|
308
|
+
default: O(({
|
|
309
|
+
trigger: r
|
|
310
|
+
}) => [I(B, {
|
|
311
311
|
"prepend-icon": "add",
|
|
312
312
|
label: i(s)("menu.takeaway.empty.action"),
|
|
313
|
-
onClick: q(
|
|
313
|
+
onClick: q(r, ["stop"])
|
|
314
314
|
}, null, 8, ["label", "onClick"])]),
|
|
315
315
|
_: 1
|
|
316
|
-
}, 8, ["bind-to-variant"])) :
|
|
316
|
+
}, 8, ["bind-to-variant"])) : G("", !0)]),
|
|
317
317
|
_: 1
|
|
318
318
|
}, 8, ["subtitle", "title"])]));
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
export {
|
|
323
|
-
|
|
323
|
+
Ge as _
|
|
324
324
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as R, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as U, createCommentVNode as j } from "vue";
|
|
2
|
-
import { A as h, M as E, G as C, Q as O, al as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as S } from "./menuV2-
|
|
4
|
-
import { C as v, h as N } from "./catalog-
|
|
2
|
+
import { A as h, M as E, G as C, Q as O, al as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
3
|
+
import { u as S } from "./menuV2-DBkrmeha.js";
|
|
4
|
+
import { C as v, h as N } from "./catalog-D7Jjqj3-.js";
|
|
5
5
|
import { useSnackbar as P, useDialog as z } from "@feedmepos/ui-library";
|
|
6
|
-
import { a as T } from "./LinkProductSideSheet-
|
|
6
|
+
import { a as T } from "./LinkProductSideSheet-DY32g33Q.js";
|
|
7
7
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
8
8
|
function q() {
|
|
9
9
|
const t = S(), o = d(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), i = d(() => {
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { defineComponent as v, createElementBlock as c, openBlock as t, normalizeClass as h, toDisplayString as y, unref as i, resolveComponent as u, createVNode as _, createElementVNode as d, computed as b, createBlock as g, createCommentVNode as B, Fragment as k, renderList as F, withCtx as x } from "vue";
|
|
2
|
+
import { useI18n as N } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as S } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
4
|
+
const T = {
|
|
5
|
+
"en-US": {
|
|
6
|
+
icon: "EN",
|
|
7
|
+
name: "English"
|
|
8
|
+
},
|
|
9
|
+
"zh-CN": {
|
|
10
|
+
icon: "简",
|
|
11
|
+
name: "简体中文"
|
|
12
|
+
},
|
|
13
|
+
"th-TH": {
|
|
14
|
+
icon: "TH",
|
|
15
|
+
name: "ไทย"
|
|
16
|
+
},
|
|
17
|
+
"ja-JP": {
|
|
18
|
+
icon: "JP",
|
|
19
|
+
name: "日本語"
|
|
20
|
+
},
|
|
21
|
+
"zh-Hant": {
|
|
22
|
+
icon: "繁",
|
|
23
|
+
name: "繁體中文"
|
|
24
|
+
},
|
|
25
|
+
"id-ID": {
|
|
26
|
+
icon: "ID",
|
|
27
|
+
name: "Bahasa Indonesia"
|
|
28
|
+
},
|
|
29
|
+
"vi-VN": {
|
|
30
|
+
icon: "VN",
|
|
31
|
+
name: "Tiếng Việt"
|
|
32
|
+
},
|
|
33
|
+
"ms-MY": {
|
|
34
|
+
icon: "MY",
|
|
35
|
+
name: "Bahasa Melayu"
|
|
36
|
+
},
|
|
37
|
+
"ph-PH": {
|
|
38
|
+
icon: "PH",
|
|
39
|
+
name: "Filipino"
|
|
40
|
+
},
|
|
41
|
+
"ko-KR": {
|
|
42
|
+
icon: "KR",
|
|
43
|
+
name: "한국어"
|
|
44
|
+
},
|
|
45
|
+
"fr-MA": {
|
|
46
|
+
icon: "MA",
|
|
47
|
+
name: "Français (Maroc)"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function w(n) {
|
|
51
|
+
var o, e;
|
|
52
|
+
const l = ((o = n.split("-")[1]) == null ? void 0 : o.toUpperCase()) ?? "";
|
|
53
|
+
return ((e = T[n]) == null ? void 0 : e.icon) || l;
|
|
54
|
+
}
|
|
55
|
+
function L(n) {
|
|
56
|
+
var l;
|
|
57
|
+
return ((l = T[n]) == null ? void 0 : l.name) || n;
|
|
58
|
+
}
|
|
59
|
+
const C = /* @__PURE__ */ v({
|
|
60
|
+
__name: "LocaleIconBadge",
|
|
61
|
+
props: {
|
|
62
|
+
localeCode: {},
|
|
63
|
+
variant: { default: "neutral" }
|
|
64
|
+
},
|
|
65
|
+
setup(n) {
|
|
66
|
+
const l = {
|
|
67
|
+
primary: "bg-fm-color-primary-oats text-fm-color-primary",
|
|
68
|
+
secondary: "bg-fm-color-opacity-sm text-fm-color-typo-primary",
|
|
69
|
+
neutral: "bg-fm-color-opacity-sm text-fm-color-typo-primary"
|
|
70
|
+
};
|
|
71
|
+
return (o, e) => (t(), c("div", {
|
|
72
|
+
class: h([
|
|
73
|
+
"w-24 h-24 rounded-full flex items-center justify-center fm-typo-en-body-sm-600",
|
|
74
|
+
l[o.variant]
|
|
75
|
+
])
|
|
76
|
+
}, y(i(w)(o.localeCode)), 3));
|
|
77
|
+
}
|
|
78
|
+
}), U = { class: "flex items-center gap-8 p-8 border border-fm-color-primary text-fm-color-primary rounded-full" }, E = { class: "fm-typo-en-body-md-600" }, H = /* @__PURE__ */ v({
|
|
79
|
+
__name: "LanguageChip",
|
|
80
|
+
props: {
|
|
81
|
+
localeCode: {}
|
|
82
|
+
},
|
|
83
|
+
emits: ["remove"],
|
|
84
|
+
setup(n, { emit: l }) {
|
|
85
|
+
const o = l;
|
|
86
|
+
return (e, a) => {
|
|
87
|
+
const s = u("FmIcon");
|
|
88
|
+
return t(), c("div", U, [
|
|
89
|
+
_(C, {
|
|
90
|
+
"locale-code": e.localeCode,
|
|
91
|
+
variant: "primary"
|
|
92
|
+
}, null, 8, ["locale-code"]),
|
|
93
|
+
d("span", E, y(i(L)(e.localeCode)), 1),
|
|
94
|
+
_(s, {
|
|
95
|
+
name: "close",
|
|
96
|
+
class: "cursor-pointer",
|
|
97
|
+
variant: "secondary",
|
|
98
|
+
onClick: a[0] || (a[0] = (m) => o("remove", e.localeCode))
|
|
99
|
+
})
|
|
100
|
+
]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function P(n) {
|
|
105
|
+
const l = S(), o = b(() => l.state.featureFlags.supportedLocales.map((a) => ({
|
|
106
|
+
code: a,
|
|
107
|
+
name: L(a)
|
|
108
|
+
}))), e = b(() => {
|
|
109
|
+
const a = new Set(n.value);
|
|
110
|
+
return o.value.filter((s) => !a.has(s.code));
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
localeList: o,
|
|
114
|
+
availableLocales: e
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const R = { class: "flex flex-col gap-8" }, A = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, z = { class: "flex items-center gap-8 flex-wrap" }, D = ["onClick"], j = { class: "flex items-center gap-8" }, J = { class: "fm-typo-en-body-md-400" }, X = /* @__PURE__ */ v({
|
|
118
|
+
__name: "LanguageSelector",
|
|
119
|
+
props: {
|
|
120
|
+
selectedLocales: {},
|
|
121
|
+
label: { default: "" }
|
|
122
|
+
},
|
|
123
|
+
emits: ["update:selectedLocales"],
|
|
124
|
+
setup(n, { emit: l }) {
|
|
125
|
+
const o = n, e = l, { t: a } = N(), s = b(() => o.selectedLocales), { availableLocales: m } = P(s);
|
|
126
|
+
function r(f) {
|
|
127
|
+
e("update:selectedLocales", [...o.selectedLocales, f]);
|
|
128
|
+
}
|
|
129
|
+
function $(f) {
|
|
130
|
+
e(
|
|
131
|
+
"update:selectedLocales",
|
|
132
|
+
o.selectedLocales.filter((V) => V !== f)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
return (f, V) => {
|
|
136
|
+
const I = u("fm-button"), M = u("FmMenu");
|
|
137
|
+
return t(), c("div", R, [
|
|
138
|
+
d("p", A, y(f.label || i(a)("menu.common.translation.language")), 1),
|
|
139
|
+
d("div", z, [
|
|
140
|
+
(t(!0), c(k, null, F(f.selectedLocales, (p) => (t(), g(H, {
|
|
141
|
+
key: p,
|
|
142
|
+
"locale-code": p,
|
|
143
|
+
onRemove: $
|
|
144
|
+
}, null, 8, ["locale-code"]))), 128)),
|
|
145
|
+
i(m).length > 0 ? (t(), g(M, { key: 0 }, {
|
|
146
|
+
"menu-button": x(() => [
|
|
147
|
+
_(I, {
|
|
148
|
+
variant: "secondary",
|
|
149
|
+
"border-color": "neutral-gray-300",
|
|
150
|
+
"text-color": "neutral-gray-400",
|
|
151
|
+
icon: "add"
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
default: x(() => [
|
|
155
|
+
(t(!0), c(k, null, F(i(m), (p) => (t(), c("div", {
|
|
156
|
+
class: "p-12 cursor-pointer hover:bg-fm-color-opacity-md rounded-sm",
|
|
157
|
+
key: p.code,
|
|
158
|
+
onClick: (q) => r(p.code)
|
|
159
|
+
}, [
|
|
160
|
+
d("div", j, [
|
|
161
|
+
_(C, {
|
|
162
|
+
"locale-code": p.code,
|
|
163
|
+
variant: "secondary"
|
|
164
|
+
}, null, 8, ["locale-code"]),
|
|
165
|
+
d("span", J, y(p.name), 1)
|
|
166
|
+
])
|
|
167
|
+
], 8, D))), 128))
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
})) : B("", !0)
|
|
171
|
+
])
|
|
172
|
+
]);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}), K = /* @__PURE__ */ v({
|
|
176
|
+
__name: "TranslationBadge",
|
|
177
|
+
props: {
|
|
178
|
+
label: {},
|
|
179
|
+
spacing: { default: "md" }
|
|
180
|
+
},
|
|
181
|
+
setup(n) {
|
|
182
|
+
const o = n.spacing === "sm" ? "mb-4" : "mb-8";
|
|
183
|
+
return (e, a) => (t(), c("p", {
|
|
184
|
+
class: h([
|
|
185
|
+
"fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4",
|
|
186
|
+
i(o)
|
|
187
|
+
])
|
|
188
|
+
}, y(e.label), 3));
|
|
189
|
+
}
|
|
190
|
+
}), O = { class: "fm-typo-en-body-md-400" }, Y = { class: "flex-1" }, Z = /* @__PURE__ */ v({
|
|
191
|
+
__name: "TranslationFieldRow",
|
|
192
|
+
props: {
|
|
193
|
+
localeCode: {},
|
|
194
|
+
modelValue: {},
|
|
195
|
+
placeholder: {},
|
|
196
|
+
readonly: { type: Boolean, default: !1 },
|
|
197
|
+
inputType: { default: "text" }
|
|
198
|
+
},
|
|
199
|
+
emits: ["update:modelValue"],
|
|
200
|
+
setup(n, { emit: l }) {
|
|
201
|
+
const o = l;
|
|
202
|
+
return (e, a) => {
|
|
203
|
+
const s = u("fm-text-field"), m = u("fm-textarea");
|
|
204
|
+
return t(), c("div", {
|
|
205
|
+
class: h(["flex gap-16", e.inputType === "textarea" ? "items-start" : "items-center"])
|
|
206
|
+
}, [
|
|
207
|
+
d("div", {
|
|
208
|
+
class: h(["flex w-[100px] items-center gap-8", e.inputType === "textarea" ? "pt-12" : ""])
|
|
209
|
+
}, [
|
|
210
|
+
_(C, {
|
|
211
|
+
"locale-code": e.localeCode,
|
|
212
|
+
variant: "secondary"
|
|
213
|
+
}, null, 8, ["locale-code"]),
|
|
214
|
+
d("span", O, y(i(L)(e.localeCode)), 1)
|
|
215
|
+
], 2),
|
|
216
|
+
d("div", Y, [
|
|
217
|
+
e.inputType === "text" ? (t(), g(s, {
|
|
218
|
+
key: 0,
|
|
219
|
+
"model-value": e.modelValue,
|
|
220
|
+
placeholder: e.placeholder,
|
|
221
|
+
readonly: e.readonly,
|
|
222
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o("update:modelValue", r))
|
|
223
|
+
}, null, 8, ["model-value", "placeholder", "readonly"])) : (t(), g(m, {
|
|
224
|
+
key: 1,
|
|
225
|
+
"model-value": e.modelValue,
|
|
226
|
+
placeholder: e.placeholder,
|
|
227
|
+
readonly: e.readonly,
|
|
228
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => o("update:modelValue", r))
|
|
229
|
+
}, null, 8, ["model-value", "placeholder", "readonly"]))
|
|
230
|
+
])
|
|
231
|
+
], 2);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}), ee = /* @__PURE__ */ v({
|
|
235
|
+
__name: "TranslationFieldSection",
|
|
236
|
+
props: {
|
|
237
|
+
label: {},
|
|
238
|
+
modelValue: {},
|
|
239
|
+
type: { default: "text" },
|
|
240
|
+
spacing: { default: "md" },
|
|
241
|
+
placeholder: {},
|
|
242
|
+
readonly: { type: Boolean, default: !1 }
|
|
243
|
+
},
|
|
244
|
+
emits: ["update:modelValue"],
|
|
245
|
+
setup(n, { emit: l }) {
|
|
246
|
+
const o = l;
|
|
247
|
+
return (e, a) => {
|
|
248
|
+
const s = u("FmTextField"), m = u("fm-textarea");
|
|
249
|
+
return t(), c("div", null, [
|
|
250
|
+
_(K, {
|
|
251
|
+
label: e.label,
|
|
252
|
+
spacing: e.spacing
|
|
253
|
+
}, null, 8, ["label", "spacing"]),
|
|
254
|
+
e.type === "text" ? (t(), g(s, {
|
|
255
|
+
key: 0,
|
|
256
|
+
"model-value": e.modelValue,
|
|
257
|
+
placeholder: e.placeholder,
|
|
258
|
+
readonly: e.readonly,
|
|
259
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o("update:modelValue", r))
|
|
260
|
+
}, null, 8, ["model-value", "placeholder", "readonly"])) : (t(), g(m, {
|
|
261
|
+
key: 1,
|
|
262
|
+
"model-value": e.modelValue,
|
|
263
|
+
placeholder: e.placeholder,
|
|
264
|
+
readonly: e.readonly,
|
|
265
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => o("update:modelValue", r))
|
|
266
|
+
}, null, 8, ["model-value", "placeholder", "readonly"]))
|
|
267
|
+
]);
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
export {
|
|
272
|
+
X as _,
|
|
273
|
+
ee as a,
|
|
274
|
+
K as b,
|
|
275
|
+
Z as c,
|
|
276
|
+
L as d,
|
|
277
|
+
w as g
|
|
278
|
+
};
|