@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,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as N, computed as y, h as p, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as i, unref as d, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as s, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
|
|
2
|
-
import { A as c, Q as W, u as Q, G, a4 as J } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { A as c, Q as W, u as Q, G, a4 as J } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
3
3
|
import { useI18n as X } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as Z, useDialog as ee, useSnackbar as te } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
-
import { _ as ae } from "./app-
|
|
7
|
-
import { d as oe, _ as le, u as se, c as re } from "./scheduler-
|
|
6
|
+
import { _ as ae } from "./app-CA4g3v2n.js";
|
|
7
|
+
import { d as oe, _ as le, u as se, c as re } from "./scheduler-HKff8Ty2.js";
|
|
8
8
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
9
|
const ce = {
|
|
10
10
|
class: "flex flex-1 justify-end"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as H, ref as I, computed as L, resolveComponent as h, createElementBlock as g, openBlock as d, Fragment as x, renderSlot as ae, createVNode as l, unref as t, withCtx as m, createElementVNode as y, toDisplayString as z, onBeforeMount as oe, watch as F, watchEffect as se, h as $, getCurrentInstance as le, onMounted as re, createBlock as j, createCommentVNode as G, isRef as ie, normalizeClass as J, renderList as ue } from "vue";
|
|
2
2
|
import { useRouter as ce } from "vue-router";
|
|
3
|
-
import { I as Q, u as W, G as X, Q as Z, M as O, A as S, a4 as de } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { I as Q, u as W, G as X, Q as Z, M as O, A as S, a4 as de } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as me, useCoreStore as pe } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as ne, components as Y, useDialog as _e, FmButtonVariant as A, useBreakpoints as fe } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ge } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
7
|
-
import { _ as ve, R as he } from "./app-
|
|
7
|
+
import { _ as ve, R as he } from "./app-CA4g3v2n.js";
|
|
8
8
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
9
9
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
10
10
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
11
|
-
import { u as xe } from "./app-
|
|
11
|
+
import { u as xe } from "./app-DPovSnb_.js";
|
|
12
12
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
13
|
const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex flex-col h-full" }, Ee = { class: "flex gap-8 items-center justify-start" }, Ve = /* @__PURE__ */ H({
|
|
14
14
|
__name: "Form",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ne, computed as p, ref as se, watch as ue, watchEffect as ie, resolveComponent as m, createElementBlock as V, openBlock as r, normalizeClass as H, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as D, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
|
|
2
|
-
import { u as me, G as ce, A as f, Q as de, B as pe, I as w } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as me, G as ce, A as f, Q as de, B as pe, I as w } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
3
3
|
import { useCoreStore as ve, useI18n as ge } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as fe, useDialog as _e, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as be } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { C as _, a as x } from "./catalogSetting-
|
|
9
|
-
import { C as xe } from "./catalog-
|
|
6
|
+
import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js";
|
|
7
|
+
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-Bg_zMUrV.js";
|
|
9
|
+
import { C as xe } from "./catalog-D7Jjqj3-.js";
|
|
10
10
|
const Ce = {
|
|
11
11
|
class: /* @__PURE__ */ H(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
|
|
12
12
|
}, Oe = {
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as z, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as
|
|
1
|
+
import { defineComponent as z, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as I, renderSlot as oe, createVNode as m, unref as n, withCtx as b, createElementVNode as c, renderList as H, toDisplayString as T, h as N, withModifiers as G, 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
|
|
3
|
+
import { useSnackbar as j, components as W, useDialog as X, FmButtonVariant as J, 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 { G as
|
|
5
|
+
import { G as P, u as Y, Q as K, M as Z, A as ee, a4 as ce } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.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-CA4g3v2n.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 q } from "./object-DVUNCr7w.js";
|
|
11
|
+
import { r as _e, u as ae } from "./rules-DFWR7a3m.js";
|
|
12
|
+
import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js";
|
|
13
13
|
import { c as ve } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { g as
|
|
15
|
-
import {
|
|
16
|
-
|
|
14
|
+
import { g as Q } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js";
|
|
15
|
+
import { _ as ge } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js";
|
|
16
|
+
import { a as ye } from "./menu-CKA9uouu.js";
|
|
17
|
+
const be = {
|
|
17
18
|
class: "fm-typo-en-title-md-600"
|
|
18
|
-
}, be = {
|
|
19
|
-
class: "flex flex-col gap-32 h-full min-h-0 py-16"
|
|
20
19
|
}, he = {
|
|
21
|
-
class: "
|
|
20
|
+
class: "flex flex-col gap-32 h-full min-h-0 py-16"
|
|
22
21
|
}, xe = {
|
|
22
|
+
class: "py-12 px-16 space-y-4"
|
|
23
|
+
}, Ce = {
|
|
23
24
|
class: "flex gap-8 items-center justify-start"
|
|
24
|
-
},
|
|
25
|
+
}, ke = /* @__PURE__ */ z({
|
|
25
26
|
__name: "Form",
|
|
26
27
|
props: {
|
|
27
28
|
initialValue: {}
|
|
@@ -29,70 +30,68 @@ const ye = {
|
|
|
29
30
|
setup(D, {
|
|
30
31
|
expose: w
|
|
31
32
|
}) {
|
|
32
|
-
const h = D, S =
|
|
33
|
+
const h = D, S = j(), F = P(S), E = K(F), d = Y(), {
|
|
33
34
|
t: l
|
|
34
35
|
} = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), M = (e) => {
|
|
35
36
|
ve.isBoolean(e) ? o.value = e : o.value = !o.value;
|
|
36
|
-
}, s = x(
|
|
37
|
-
var
|
|
38
|
-
const e = [],
|
|
39
|
-
return s.value.name && !
|
|
40
|
-
locale:
|
|
37
|
+
}, s = x(q(h.initialValue)), O = V(() => !!s.value.name), B = V(() => {
|
|
38
|
+
var f;
|
|
39
|
+
const e = [], a = "en-US", t = (f = u.value) == null ? void 0 : f[a];
|
|
40
|
+
return s.value.name && !t && e.push({
|
|
41
|
+
locale: a,
|
|
41
42
|
name: s.value.name,
|
|
42
|
-
localeDisplay:
|
|
43
|
-
}), u.value && Object.entries(u.value).filter(([
|
|
43
|
+
localeDisplay: Q(a)
|
|
44
|
+
}), u.value && Object.entries(u.value).filter(([y, v]) => v && v.trim()).sort(([y], [v]) => y.localeCompare(v)).forEach(([y, v]) => {
|
|
44
45
|
e.push({
|
|
45
|
-
locale:
|
|
46
|
-
name:
|
|
47
|
-
localeDisplay:
|
|
46
|
+
locale: y,
|
|
47
|
+
name: v,
|
|
48
|
+
localeDisplay: Q(y)
|
|
48
49
|
});
|
|
49
50
|
}), e;
|
|
50
51
|
});
|
|
51
|
-
function
|
|
52
|
+
function A(e) {
|
|
52
53
|
u.value = e;
|
|
53
54
|
}
|
|
54
55
|
function i(e) {
|
|
55
56
|
s.value.name = e;
|
|
56
57
|
}
|
|
57
58
|
const r = pe(() => {
|
|
58
|
-
const e = d.subcategories.find((
|
|
59
|
-
return
|
|
59
|
+
const e = d.subcategories.find((v) => v._id === s.value._id), a = s.value.name !== (e == null ? void 0 : e.name), t = (e == null ? void 0 : e.name_locale) || {}, f = u.value || {}, y = JSON.stringify(t) !== JSON.stringify(f);
|
|
60
|
+
return a || y;
|
|
60
61
|
}, () => {
|
|
61
62
|
o.value = !1;
|
|
62
63
|
});
|
|
63
64
|
async function _() {
|
|
64
|
-
const e = d.subcategories.find((
|
|
65
|
-
updateMenu:
|
|
66
|
-
} = E;
|
|
67
|
-
await
|
|
65
|
+
const e = d.subcategories.find((f) => f._id === s.value._id), {
|
|
66
|
+
updateMenu: a
|
|
67
|
+
} = E, t = u.value;
|
|
68
|
+
await a({
|
|
68
69
|
module: ee.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
69
70
|
operation: Z.F_OPERATION_TYPE.update,
|
|
70
71
|
// @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
|
|
71
72
|
data: {
|
|
72
73
|
...e,
|
|
73
74
|
name: s.value.name ?? (e == null ? void 0 : e.name),
|
|
74
|
-
|
|
75
|
-
name_locale: u.value
|
|
76
|
-
}
|
|
75
|
+
name_locale: t
|
|
77
76
|
}
|
|
78
77
|
}, s.value.name), M(!1);
|
|
79
78
|
}
|
|
80
79
|
return te(() => o.value, () => {
|
|
81
80
|
if (!o.value) return;
|
|
82
|
-
s.value =
|
|
83
|
-
const e = d.subcategories.find((
|
|
81
|
+
s.value = q(h.initialValue);
|
|
82
|
+
const e = d.subcategories.find((a) => a._id === s.value._id);
|
|
84
83
|
u.value = e == null ? void 0 : e.name_locale;
|
|
85
84
|
}), w({
|
|
86
85
|
trigger: M,
|
|
87
86
|
show: o
|
|
88
|
-
}), (e,
|
|
89
|
-
const
|
|
90
|
-
return p(), k(
|
|
87
|
+
}), (e, a) => {
|
|
88
|
+
const t = C("fm-button"), f = C("FmTooltip"), y = C("FmTextField"), v = C("fm-side-sheet");
|
|
89
|
+
return p(), k(I, null, [oe(e.$slots, "default", {
|
|
91
90
|
trigger: M
|
|
92
|
-
}), m(
|
|
91
|
+
}), m(v, {
|
|
93
92
|
id: "group-form",
|
|
94
93
|
modelValue: o.value,
|
|
95
|
-
"onUpdate:modelValue":
|
|
94
|
+
"onUpdate:modelValue": a[3] || (a[3] = (g) => o.value = g),
|
|
96
95
|
"is-container": n(W).FmForm,
|
|
97
96
|
"is-container-props": {
|
|
98
97
|
onValidationSuccess: _,
|
|
@@ -101,39 +100,39 @@ const ye = {
|
|
|
101
100
|
"max-width": 560,
|
|
102
101
|
"onOn:clickedAway": n(r)
|
|
103
102
|
}, {
|
|
104
|
-
"side-sheet-header":
|
|
105
|
-
"side-sheet-footer":
|
|
103
|
+
"side-sheet-header": b(() => [c("p", be, T(n(l)("menu.subcategory.title")), 1)]),
|
|
104
|
+
"side-sheet-footer": b(() => [c("div", Ce, [m(t, {
|
|
106
105
|
label: n(l)("menu.common.actions.update"),
|
|
107
106
|
loading: L.value,
|
|
108
107
|
size: "lg",
|
|
109
108
|
type: "submit",
|
|
110
109
|
variant: "primary",
|
|
111
110
|
disabled: !s.value._id
|
|
112
|
-
}, null, 8, ["label", "loading", "disabled"]), m(
|
|
111
|
+
}, null, 8, ["label", "loading", "disabled"]), m(t, {
|
|
113
112
|
label: n(l)("menu.common.actions.cancel"),
|
|
114
113
|
size: "lg",
|
|
115
114
|
variant: "tertiary",
|
|
116
|
-
onClick:
|
|
115
|
+
onClick: a[2] || (a[2] = () => o.value = !1)
|
|
117
116
|
}, null, 8, ["label"])])]),
|
|
118
|
-
default:
|
|
117
|
+
default: b(() => [c("div", he, [m(y, {
|
|
119
118
|
label: n(l)("menu.subcategory.name"),
|
|
120
119
|
modelValue: s.value.name,
|
|
121
|
-
"onUpdate:modelValue":
|
|
120
|
+
"onUpdate:modelValue": a[1] || (a[1] = (g) => s.value.name = g),
|
|
122
121
|
disabled: !s.value._id,
|
|
123
122
|
rules: [n(_e)]
|
|
124
123
|
}, {
|
|
125
|
-
append:
|
|
124
|
+
append: b(() => [m(f, {
|
|
126
125
|
variant: "plain",
|
|
127
126
|
placement: "top",
|
|
128
127
|
"z-index": 999
|
|
129
128
|
}, {
|
|
130
|
-
content:
|
|
131
|
-
key:
|
|
132
|
-
}, T(
|
|
133
|
-
default:
|
|
129
|
+
content: b(() => [c("div", xe, [(p(!0), k(I, null, H(B.value, (g) => (p(), k("div", {
|
|
130
|
+
key: g.locale
|
|
131
|
+
}, T(g.name) + " (" + T(g.localeDisplay) + ") ", 1))), 128))])]),
|
|
132
|
+
default: b(() => [m(t, {
|
|
134
133
|
variant: "tertiary",
|
|
135
134
|
icon: "g_translate",
|
|
136
|
-
onClick:
|
|
135
|
+
onClick: a[0] || (a[0] = (g) => $.value = !0),
|
|
137
136
|
disabled: !O.value
|
|
138
137
|
}, null, 8, ["disabled"])]),
|
|
139
138
|
_: 1
|
|
@@ -143,39 +142,39 @@ const ye = {
|
|
|
143
142
|
_: 1
|
|
144
143
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), m(fe, {
|
|
145
144
|
modelValue: $.value,
|
|
146
|
-
"onUpdate:modelValue":
|
|
145
|
+
"onUpdate:modelValue": a[4] || (a[4] = (g) => $.value = g),
|
|
147
146
|
title: n(l)("menu.subcategory.title"),
|
|
148
147
|
name: s.value.name,
|
|
149
148
|
"name-locale": u.value,
|
|
150
149
|
"onUpdate:name": i,
|
|
151
|
-
"onUpdate:nameLocale":
|
|
150
|
+
"onUpdate:nameLocale": A
|
|
152
151
|
}, null, 8, ["modelValue", "title", "name", "name-locale"])], 64);
|
|
153
152
|
};
|
|
154
153
|
}
|
|
155
|
-
}),
|
|
154
|
+
}), Ve = ke, we = {
|
|
156
155
|
key: 0
|
|
157
|
-
}, we = {
|
|
158
|
-
class: "flex justify-end items-center"
|
|
159
156
|
}, Fe = {
|
|
160
|
-
class: "
|
|
157
|
+
class: "flex justify-end items-center"
|
|
161
158
|
}, Le = {
|
|
159
|
+
class: "w-[320px]"
|
|
160
|
+
}, $e = {
|
|
162
161
|
key: 1,
|
|
163
162
|
class: "flex-1 flex flex-col min-h-0"
|
|
164
|
-
}, $e = {
|
|
165
|
-
class: "p-8"
|
|
166
163
|
}, Se = {
|
|
164
|
+
class: "p-8"
|
|
165
|
+
}, Ee = {
|
|
167
166
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
168
|
-
},
|
|
167
|
+
}, Me = ["onClick"], Ne = {
|
|
169
168
|
class: "flex-1 space-y-4"
|
|
170
|
-
},
|
|
169
|
+
}, Te = {
|
|
171
170
|
class: "fm-typo-en-body-lg-600"
|
|
172
|
-
},
|
|
171
|
+
}, Oe = /* @__PURE__ */ z({
|
|
173
172
|
__name: "SubcategoryTable",
|
|
174
173
|
setup(D) {
|
|
175
|
-
const w = X(), h =
|
|
174
|
+
const w = X(), h = j(), S = P(h), F = K(S), E = ae({
|
|
176
175
|
dialog: w,
|
|
177
176
|
menuLoader: F
|
|
178
|
-
}), d = V(() =>
|
|
177
|
+
}), d = V(() => Y().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
|
|
179
178
|
t: o
|
|
180
179
|
} = R(), $ = x([{
|
|
181
180
|
accessorKey: "name",
|
|
@@ -185,14 +184,14 @@ const ye = {
|
|
|
185
184
|
width: "auto"
|
|
186
185
|
},
|
|
187
186
|
cell: (i) => {
|
|
188
|
-
const r = i.row.original, _ = i.getValue()
|
|
187
|
+
const r = i.row.original, _ = i.getValue();
|
|
189
188
|
return N("div", {
|
|
190
189
|
class: "flex items-center gap-8"
|
|
191
190
|
}, [N("span", {
|
|
192
191
|
class: "break-all"
|
|
193
|
-
}, _),
|
|
194
|
-
|
|
195
|
-
}
|
|
192
|
+
}, _), r.name_locale ? N(ge, {
|
|
193
|
+
nameLocale: r.name_locale ?? {}
|
|
194
|
+
}) : null]);
|
|
196
195
|
}
|
|
197
196
|
}, {
|
|
198
197
|
id: "actions",
|
|
@@ -211,7 +210,7 @@ const ye = {
|
|
|
211
210
|
disabled: !r._id,
|
|
212
211
|
variant: "tertiary",
|
|
213
212
|
textColor: "neutral-gray-400",
|
|
214
|
-
onClick:
|
|
213
|
+
onClick: G(async () => {
|
|
215
214
|
await u(r);
|
|
216
215
|
}, ["stop", "prevent"])
|
|
217
216
|
})]);
|
|
@@ -233,7 +232,7 @@ const ye = {
|
|
|
233
232
|
primaryActions: {
|
|
234
233
|
text: "Remove",
|
|
235
234
|
close: !0,
|
|
236
|
-
variant:
|
|
235
|
+
variant: J.Destructive
|
|
237
236
|
},
|
|
238
237
|
secondaryActions: {
|
|
239
238
|
text: "Cancel",
|
|
@@ -253,41 +252,41 @@ const ye = {
|
|
|
253
252
|
}
|
|
254
253
|
const s = ne();
|
|
255
254
|
async function O(i) {
|
|
256
|
-
de(s,
|
|
255
|
+
de(s, Ve, {
|
|
257
256
|
initialValue: i
|
|
258
257
|
});
|
|
259
258
|
}
|
|
260
|
-
const B = se(),
|
|
259
|
+
const B = se(), A = V(() => B.breakpoints.value.xs);
|
|
261
260
|
return (i, r) => {
|
|
262
|
-
const _ = C("FmSearch"), e = C("FmTable"),
|
|
263
|
-
return
|
|
261
|
+
const _ = C("FmSearch"), e = C("FmTable"), a = C("FmButton");
|
|
262
|
+
return A.value ? (p(), k("div", $e, [c("div", Se, [m(_, {
|
|
264
263
|
autofocus: "",
|
|
265
264
|
modelValue: l.value,
|
|
266
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
265
|
+
"onUpdate:modelValue": r[2] || (r[2] = (t) => l.value = t),
|
|
267
266
|
class: "w-full",
|
|
268
267
|
placeholder: n(o)("menu.common.labels.search_placeholder", {
|
|
269
268
|
type: "categories"
|
|
270
269
|
})
|
|
271
|
-
}, null, 8, ["modelValue", "placeholder"])]), c("div",
|
|
272
|
-
key:
|
|
270
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", Ee, [(p(!0), k(I, null, H(L.value, (t) => (p(), k("div", {
|
|
271
|
+
key: t._id || "",
|
|
273
272
|
class: "flex flex-row py-12 px-16",
|
|
274
|
-
onClick: (
|
|
275
|
-
}, [c("div",
|
|
273
|
+
onClick: (f) => O(t)
|
|
274
|
+
}, [c("div", Ne, [c("p", Te, T(t.name), 1)]), m(a, {
|
|
276
275
|
"text-color": n(ie).NeutralGray400,
|
|
277
|
-
variant: n(
|
|
276
|
+
variant: n(J).Tertiary,
|
|
278
277
|
"prepend-icon": "delete",
|
|
279
|
-
disabled: !
|
|
280
|
-
onClick:
|
|
281
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
278
|
+
disabled: !t._id,
|
|
279
|
+
onClick: G((f) => u(t), ["stop"])
|
|
280
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Me))), 128))])])) : (p(), k("div", we, [c("div", Fe, [c("div", Le, [m(_, {
|
|
282
281
|
modelValue: l.value,
|
|
283
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
282
|
+
"onUpdate:modelValue": r[0] || (r[0] = (t) => l.value = t),
|
|
284
283
|
autofocus: "",
|
|
285
284
|
class: "mb-8",
|
|
286
285
|
placeholder: n(o)("menu.common.labels.search_placeholder", {
|
|
287
286
|
type: n(o)("menu.subcategory.title")
|
|
288
287
|
})
|
|
289
288
|
}, null, 8, ["modelValue", "placeholder"])])]), m(me, null, {
|
|
290
|
-
default:
|
|
289
|
+
default: b(() => [m(e, {
|
|
291
290
|
"column-defs": $.value,
|
|
292
291
|
draggable: !0,
|
|
293
292
|
"page-size": d.value.length,
|
|
@@ -297,25 +296,25 @@ const ye = {
|
|
|
297
296
|
"hide-footer": "",
|
|
298
297
|
"pin-header-row": "",
|
|
299
298
|
onDndChanged: M,
|
|
300
|
-
onRowClick: r[1] || (r[1] = (
|
|
299
|
+
onRowClick: r[1] || (r[1] = (t) => O(t.original))
|
|
301
300
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
302
301
|
_: 1
|
|
303
302
|
})]));
|
|
304
303
|
};
|
|
305
304
|
}
|
|
306
|
-
}),
|
|
305
|
+
}), Ue = { class: "flex-1 flex justify-between gap-8 pl-8" }, De = { class: "flex items-center" }, Be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ae = { class: "fm-typo-en-body-md-600 font-semibold" }, aa = /* @__PURE__ */ z({
|
|
307
306
|
__name: "Subcategory",
|
|
308
307
|
setup(D) {
|
|
309
|
-
const w = X(), h =
|
|
308
|
+
const w = X(), h = j(), S = P(h), F = K(S), E = ae({ dialog: w, menuLoader: F }), d = V(() => Y().subcategories), { t: l } = R();
|
|
310
309
|
function L() {
|
|
311
310
|
E.create();
|
|
312
311
|
}
|
|
313
312
|
const o = V(() => d.value.length);
|
|
314
|
-
return
|
|
313
|
+
return ye().resetOnMount(), ($, u) => (p(), U(ue, {
|
|
315
314
|
heading: n(l)("menu.subcategory.title")
|
|
316
315
|
}, {
|
|
317
|
-
default:
|
|
318
|
-
d.value.length > 0 ? (p(), U(
|
|
316
|
+
default: b(() => [
|
|
317
|
+
d.value.length > 0 ? (p(), U(Oe, { key: 0 })) : (p(), U(n(ce), {
|
|
319
318
|
key: 1,
|
|
320
319
|
action: {
|
|
321
320
|
text: n(l)("menu.subcategory.add"),
|
|
@@ -325,11 +324,11 @@ const ye = {
|
|
|
325
324
|
title: n(l)("menu.subcategory.empty.title")
|
|
326
325
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
327
326
|
]),
|
|
328
|
-
"append-heading":
|
|
329
|
-
c("div",
|
|
330
|
-
c("div",
|
|
331
|
-
c("div",
|
|
332
|
-
c("p",
|
|
327
|
+
"append-heading": b(() => [
|
|
328
|
+
c("div", Ue, [
|
|
329
|
+
c("div", De, [
|
|
330
|
+
c("div", Be, [
|
|
331
|
+
c("p", Ae, T(o.value), 1)
|
|
333
332
|
])
|
|
334
333
|
]),
|
|
335
334
|
d.value.length > 0 ? (p(), U(re, {
|
|
@@ -345,5 +344,5 @@ const ye = {
|
|
|
345
344
|
}
|
|
346
345
|
});
|
|
347
346
|
export {
|
|
348
|
-
|
|
347
|
+
aa as default
|
|
349
348
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.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 S, l as L } from "./index-
|
|
9
|
-
import { a as O } from "./menu-
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js";
|
|
8
|
+
import { T as S, l as L } from "./index-BlLRjkMF.js";
|
|
9
|
+
import { a as O } from "./menu-CKA9uouu.js";
|
|
10
10
|
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, A = { class: "fm-typo-en-body-md-600 font-semibold" }, z = /* @__PURE__ */ f({
|
|
11
11
|
__name: "Takeaway",
|
|
12
12
|
setup(D) {
|