@feedmepos/mf-menu 0.32.37 → 0.32.38-dev.1
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-Dl-BiHwh.js → App-DGdS9nht.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Z4PgBxr3.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBy3XScH.js} +3 -3
- package/dist/{Catalog-BSZ8BAbX.js → Catalog-BuI0IVpf.js} +6 -6
- package/dist/{Category-bGvXpr0F.js → Category-DSTt-Sl6.js} +9 -9
- package/dist/Category-DbL3CS-5.js +224 -0
- package/dist/{CookingGuide-DijUR2JM.js → CookingGuide-Baw7iMDl.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-B30t_PW1.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BDZDojOt.js} +1 -1
- package/dist/{Group-O4L3iHx0.js → Group-BnzmEllK.js} +1 -1
- package/dist/{Group-CrqE40ia.js → Group-D158_Fr0.js} +7 -7
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CsM72Jnq.js → Group.vue_vue_type_script_setup_true_lang-C3H6xvlY.js} +227 -216
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BGR4kFzj.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2G40Yc6.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-wf0Wm51b.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D-JOSWUn.js} +1743 -1743
- package/dist/{Ingredient-DvvuwOdH.js → Ingredient-C-gP75uQ.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-anFCPZZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpuYVaKl.js} +2 -2
- package/dist/{LinkProductSideSheet-ImK8azTA.js → LinkProductSideSheet-DN5fbJVw.js} +3 -3
- package/dist/{MenuSetting-BX0ohmwF.js → MenuSetting-CjQ6_Ti_.js} +5 -5
- package/dist/{PrintRoute-CXYZHJsf.js → PrintRoute-DK25vS8X.js} +4 -4
- package/dist/{Product-BnnwL5DZ.js → Product-DCEMAuw3.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DUBnQJZ1.js → Product.vue_vue_type_script_setup_true_lang-DCutU0Ny.js} +348 -337
- package/dist/{ProductInternalTools-DzRnmE1r.js → ProductInternalTools-CiDa1V3D.js} +23 -23
- package/dist/{Products-CtzHONQZ.js → Products-DUxtMLiy.js} +32 -32
- package/dist/{Publish-DmIbDy8-.js → Publish-Bs5zVwDw.js} +3 -3
- package/dist/{Recipe-D_0Ezt1C.js → Recipe-_WCpFOU6.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DdeQnyfQ.js → RuleView.vue_vue_type_script_setup_true_lang-3AVOVYpW.js} +366 -366
- package/dist/{Scheduler-BgQsbdVM.js → Scheduler-BqFwfRlm.js} +3 -3
- package/dist/{ServingSequence-DCRzJsrs.js → ServingSequence-ByNsE8ha.js} +3 -3
- package/dist/{Setting-CgtttPN_.js → Setting-widqJGfT.js} +5 -5
- package/dist/Subcategory-DXaz2g4-.js +345 -0
- package/dist/{Takeaway-BfcHs1we.js → Takeaway-Ce_y1_UW.js} +1 -1
- package/dist/{Takeaway-CExKsbN5.js → Takeaway-DVBJn6re.js} +4 -4
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-DK2Cp2Dg.js +316 -0
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Br279NC_.js → Thumbnail.vue_vue_type_script_setup_true_lang-CAiNaQMP.js} +4 -4
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-BPs9D7Pq.js +185 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-nFLEeipN.js +6120 -0
- package/dist/{Unit-B6P_ykM-.js → Unit-XJLHLSYf.js} +2 -2
- package/dist/Variant-BA1AQl9-.js +247 -0
- package/dist/{_id_-D2ozS9Ck.js → _id_-CA2rV7Eb.js} +9 -9
- package/dist/app-C9zsFCoJ.js +363 -0
- package/dist/{app-DqyNXgYz.js → app-D2Sxejos.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +264 -0
- package/dist/apps/mf-menu/src/components/ProductTranslationDialog.vue.d.ts +41 -0
- package/dist/apps/mf-menu/src/components/TranslationBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/TranslationFieldSection.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +54 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/Form.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/ProductOverrideTranslation.vue.d.ts +22 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +24 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +125 -1
- package/dist/apps/mf-menu/src/components/feature/VariantManager/ProductVariantTranslation.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +16 -0
- package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +10 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +11 -0
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +125 -1
- package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/manager/menu/group.d.ts +1 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +6 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +31 -1
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +9 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +125 -1
- package/dist/apps/mf-menu/src/utils/translation.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddCategoryDialogContentComponent.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +46 -0
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +10 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BrleJSCp.js +13 -0
- package/dist/assets/menu-export-Da3-wtnw.js +107 -0
- package/dist/assets/override-menu-ChjeVe4O.js +13 -0
- package/dist/assets/validate-menu-YVTxOfeq.js +13 -0
- package/dist/{catalog-CFKVaXk7.js → catalog-YvUT-JIh.js} +1 -1
- package/dist/{catalogSetting-N4nT-nGm.js → catalogSetting-CXOYJZO3.js} +1 -1
- package/dist/{currency-Bi_GukGE.js → currency-np4zdWW1.js} +1 -1
- package/dist/dayjs.min-CSuLNurY.js +6 -0
- package/dist/{index-uiJS0BKT.js → index-3wQe-6lg.js} +1 -1
- package/dist/index-CFbB7bM3.js +335 -0
- package/dist/index-Cek4Z9eM.js +539 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-CL6a622s.js → index.vue_vue_type_script_setup_true_lang-HZXySVXs.js} +18858 -18656
- package/dist/item-DR9qrNf6.js +8117 -0
- package/dist/{jszip.min-v__o3BM4.js → jszip.min-Bz8ZTO2s.js} +2 -2
- package/dist/{menu-LtIuM7Qj.js → menu-BWsDRctK.js} +1 -1
- package/dist/{menuV2-N0hB53Gw.js → menuV2-CfsbyMis.js} +39 -39
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DZeAvlXs.js → priceTier-BNCJtFVM.js} +1 -1
- package/dist/rules-DU-MRKWH.js +212 -0
- package/dist/{scheduler-FVlscyjB.js → scheduler-BizSj8q8.js} +4 -4
- package/dist/{toExcel-DBCbupeI.js → toExcel-DhRigI9c.js} +2 -2
- package/dist/translation-BeqjfyEb.js +75 -0
- package/dist/{unit-DNphv-4C.js → unit-CaOym7HP.js} +2 -2
- package/package.json +3 -3
- package/dist/Category-DMgNea31.js +0 -392
- package/dist/Subcategory-6SgvwWpX.js +0 -280
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-GAZ3S2_n.js +0 -305
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BFwMfAlB.js +0 -6024
- package/dist/Variant-DmNuLi96.js +0 -230
- package/dist/app-CE0yoao0.js +0 -363
- package/dist/assets/linked-status-BB6BrSUB.js +0 -13
- package/dist/assets/menu-export-C1TBcoi-.js +0 -107
- package/dist/assets/override-menu-C0RijOOI.js +0 -13
- package/dist/assets/validate-menu-9VpR7oZY.js +0 -13
- package/dist/category-BSGaVgyv.js +0 -156
- package/dist/dayjs.min-DgXlcVSD.js +0 -6
- package/dist/index-BaxQ5Nq0.js +0 -273
- package/dist/index-Bun2EboK.js +0 -239
- package/dist/item-DPivBmJh.js +0 -6950
- package/dist/rules-CIWTZQfh.js +0 -6
- package/dist/subcategory-CIctYwBF.js +0 -148
|
@@ -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,
|
|
2
|
+
import { A as c, Q as W, u as Q, G, a4 as J } from "./index.vue_vue_type_script_setup_true_lang-HZXySVXs.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-C9zsFCoJ.js";
|
|
7
|
+
import { d as oe, _ as le, u as se, c as re } from "./scheduler-BizSj8q8.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,
|
|
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-HZXySVXs.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-C9zsFCoJ.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-D2Sxejos.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-HZXySVXs.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-3AVOVYpW.js";
|
|
7
|
+
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2G40Yc6.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-CXOYJZO3.js";
|
|
9
|
+
import { C as xe } from "./catalog-YvUT-JIh.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 = {
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { defineComponent as I, ref as h, computed as k, watch as ae, resolveComponent as x, createElementBlock as C, openBlock as f, Fragment as j, renderSlot as oe, createVNode as d, unref as n, withCtx as y, createElementVNode as c, renderList as Q, toDisplayString as T, h as M, withModifiers as G, getCurrentInstance as te, createBlock as O, createCommentVNode as ne } from "vue";
|
|
2
|
+
import { useI18n as z } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as R, components as H, useDialog as W, FmButtonVariant as J, useBreakpoints as le, FmButtonColorThemeVariant as se } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as ie } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { G as P, u as Y, Q as K, M as X, A as Z, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-HZXySVXs.js";
|
|
6
|
+
import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { _ as ue } from "./app-C9zsFCoJ.js";
|
|
8
|
+
import { c as me } from "./createForm-BoUQeZTd.js";
|
|
9
|
+
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
+
import { c as q } from "./object-DVUNCr7w.js";
|
|
11
|
+
import { r as pe, u as ee } from "./rules-DU-MRKWH.js";
|
|
12
|
+
import { _ as _e } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BPs9D7Pq.js";
|
|
13
|
+
import { c as fe } from "./check-C9mY6LiX.js";
|
|
14
|
+
import { g as A } from "./translation-BeqjfyEb.js";
|
|
15
|
+
import { a as ve } from "./menu-BWsDRctK.js";
|
|
16
|
+
const ge = {
|
|
17
|
+
class: "fm-typo-en-title-md-600"
|
|
18
|
+
}, ye = {
|
|
19
|
+
class: "flex flex-col gap-32 h-full min-h-0 py-16"
|
|
20
|
+
}, be = {
|
|
21
|
+
class: "py-12 px-16 space-y-4"
|
|
22
|
+
}, he = {
|
|
23
|
+
class: "flex gap-8 items-center justify-start"
|
|
24
|
+
}, xe = /* @__PURE__ */ I({
|
|
25
|
+
__name: "Form",
|
|
26
|
+
props: {
|
|
27
|
+
initialValue: {}
|
|
28
|
+
},
|
|
29
|
+
setup(D, {
|
|
30
|
+
expose: V
|
|
31
|
+
}) {
|
|
32
|
+
const b = D, $ = R(), w = P($), S = K(w), p = Y(), {
|
|
33
|
+
t: l
|
|
34
|
+
} = z(), F = h(!1), t = h(!1), L = h(!1), u = h(void 0), E = (e) => {
|
|
35
|
+
fe.isBoolean(e) ? t.value = e : t.value = !t.value;
|
|
36
|
+
}, i = h(q(b.initialValue)), N = k(() => !!i.value.name), U = k(() => {
|
|
37
|
+
var o;
|
|
38
|
+
const e = [], a = "en-US", m = (o = u.value) == null ? void 0 : o[a];
|
|
39
|
+
return i.value.name && !m && e.push({
|
|
40
|
+
locale: a,
|
|
41
|
+
name: i.value.name,
|
|
42
|
+
localeDisplay: A(a)
|
|
43
|
+
}), u.value && Object.entries(u.value).filter(([_, v]) => v && v.trim()).sort(([_], [v]) => _.localeCompare(v)).forEach(([_, v]) => {
|
|
44
|
+
e.push({
|
|
45
|
+
locale: _,
|
|
46
|
+
name: v,
|
|
47
|
+
localeDisplay: A(_)
|
|
48
|
+
});
|
|
49
|
+
}), e;
|
|
50
|
+
});
|
|
51
|
+
function B(e) {
|
|
52
|
+
u.value = e;
|
|
53
|
+
}
|
|
54
|
+
const s = de(() => {
|
|
55
|
+
const e = p.subcategories.find((v) => v._id === i.value._id), a = i.value.name !== (e == null ? void 0 : e.name), m = (e == null ? void 0 : e.name_locale) || {}, o = u.value || {}, _ = JSON.stringify(m) !== JSON.stringify(o);
|
|
56
|
+
return a || _;
|
|
57
|
+
}, () => {
|
|
58
|
+
t.value = !1;
|
|
59
|
+
});
|
|
60
|
+
async function r() {
|
|
61
|
+
const e = p.subcategories.find((m) => m._id === i.value._id), {
|
|
62
|
+
updateMenu: a
|
|
63
|
+
} = S;
|
|
64
|
+
await a({
|
|
65
|
+
module: Z.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
66
|
+
operation: X.F_OPERATION_TYPE.update,
|
|
67
|
+
// @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
|
|
68
|
+
data: {
|
|
69
|
+
...e,
|
|
70
|
+
name: i.value.name ?? (e == null ? void 0 : e.name),
|
|
71
|
+
...u.value && {
|
|
72
|
+
name_locale: u.value
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, i.value.name), E(!1);
|
|
76
|
+
}
|
|
77
|
+
return ae(() => t.value, () => {
|
|
78
|
+
if (!t.value) return;
|
|
79
|
+
i.value = q(b.initialValue);
|
|
80
|
+
const e = p.subcategories.find((a) => a._id === i.value._id);
|
|
81
|
+
u.value = e == null ? void 0 : e.name_locale;
|
|
82
|
+
}), V({
|
|
83
|
+
trigger: E,
|
|
84
|
+
show: t
|
|
85
|
+
}), (e, a) => {
|
|
86
|
+
const m = x("fm-button"), o = x("FmTooltip"), _ = x("FmTextField"), v = x("fm-side-sheet");
|
|
87
|
+
return f(), C(j, null, [oe(e.$slots, "default", {
|
|
88
|
+
trigger: E
|
|
89
|
+
}), d(v, {
|
|
90
|
+
id: "group-form",
|
|
91
|
+
modelValue: t.value,
|
|
92
|
+
"onUpdate:modelValue": a[3] || (a[3] = (g) => t.value = g),
|
|
93
|
+
"is-container": n(H).FmForm,
|
|
94
|
+
"is-container-props": {
|
|
95
|
+
onValidationSuccess: r,
|
|
96
|
+
blameFormChildOnValidationFailed: !0
|
|
97
|
+
},
|
|
98
|
+
"max-width": 560,
|
|
99
|
+
"onOn:clickedAway": n(s)
|
|
100
|
+
}, {
|
|
101
|
+
"side-sheet-header": y(() => [c("p", ge, T(n(l)("menu.subcategory.title")), 1)]),
|
|
102
|
+
"side-sheet-footer": y(() => [c("div", he, [d(m, {
|
|
103
|
+
label: n(l)("menu.common.actions.update"),
|
|
104
|
+
loading: F.value,
|
|
105
|
+
size: "lg",
|
|
106
|
+
type: "submit",
|
|
107
|
+
variant: "primary",
|
|
108
|
+
disabled: !i.value._id
|
|
109
|
+
}, null, 8, ["label", "loading", "disabled"]), d(m, {
|
|
110
|
+
label: n(l)("menu.common.actions.cancel"),
|
|
111
|
+
size: "lg",
|
|
112
|
+
variant: "tertiary",
|
|
113
|
+
onClick: a[2] || (a[2] = () => t.value = !1)
|
|
114
|
+
}, null, 8, ["label"])])]),
|
|
115
|
+
default: y(() => [c("div", ye, [d(_, {
|
|
116
|
+
label: n(l)("menu.subcategory.name"),
|
|
117
|
+
modelValue: i.value.name,
|
|
118
|
+
"onUpdate:modelValue": a[1] || (a[1] = (g) => i.value.name = g),
|
|
119
|
+
disabled: !i.value._id,
|
|
120
|
+
rules: [n(pe)]
|
|
121
|
+
}, {
|
|
122
|
+
append: y(() => [d(o, {
|
|
123
|
+
variant: "plain",
|
|
124
|
+
placement: "top",
|
|
125
|
+
"z-index": 999
|
|
126
|
+
}, {
|
|
127
|
+
content: y(() => [c("div", be, [(f(!0), C(j, null, Q(U.value, (g) => (f(), C("div", {
|
|
128
|
+
key: g.locale
|
|
129
|
+
}, T(g.name) + " (" + T(g.localeDisplay) + ") ", 1))), 128))])]),
|
|
130
|
+
default: y(() => [d(m, {
|
|
131
|
+
variant: "tertiary",
|
|
132
|
+
icon: "g_translate",
|
|
133
|
+
onClick: a[0] || (a[0] = (g) => L.value = !0),
|
|
134
|
+
disabled: !N.value
|
|
135
|
+
}, null, 8, ["disabled"])]),
|
|
136
|
+
_: 1
|
|
137
|
+
})]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["label", "modelValue", "disabled", "rules"])])]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), d(_e, {
|
|
142
|
+
modelValue: L.value,
|
|
143
|
+
"onUpdate:modelValue": a[4] || (a[4] = (g) => L.value = g),
|
|
144
|
+
title: n(l)("menu.subcategory.title"),
|
|
145
|
+
name: i.value.name,
|
|
146
|
+
"name-locale": u.value,
|
|
147
|
+
"onUpdate:nameLocale": B
|
|
148
|
+
}, null, 8, ["modelValue", "title", "name", "name-locale"])], 64);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}), Ce = xe, ke = {
|
|
152
|
+
key: 0
|
|
153
|
+
}, Ve = {
|
|
154
|
+
class: "flex justify-end items-center"
|
|
155
|
+
}, we = {
|
|
156
|
+
class: "w-[320px]"
|
|
157
|
+
}, Fe = {
|
|
158
|
+
key: 1,
|
|
159
|
+
class: "flex-1 flex flex-col min-h-0"
|
|
160
|
+
}, Le = {
|
|
161
|
+
class: "p-8"
|
|
162
|
+
}, $e = {
|
|
163
|
+
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
164
|
+
}, Se = ["onClick"], Ee = {
|
|
165
|
+
class: "flex-1 space-y-4"
|
|
166
|
+
}, Me = {
|
|
167
|
+
class: "fm-typo-en-body-lg-600"
|
|
168
|
+
}, Te = /* @__PURE__ */ I({
|
|
169
|
+
__name: "SubcategoryTable",
|
|
170
|
+
setup(D) {
|
|
171
|
+
const V = W(), b = R(), $ = P(b), w = K($), S = ee({
|
|
172
|
+
dialog: V,
|
|
173
|
+
menuLoader: w
|
|
174
|
+
}), p = k(() => Y().subcategories), l = h(""), F = k(() => p.value.filter((s) => s.name.toLowerCase().includes(l.value.toLowerCase()))), {
|
|
175
|
+
t
|
|
176
|
+
} = z(), L = h([{
|
|
177
|
+
accessorKey: "name",
|
|
178
|
+
header: () => t("menu.subcategory.columns.title"),
|
|
179
|
+
enableSorting: !1,
|
|
180
|
+
meta: {
|
|
181
|
+
width: "auto"
|
|
182
|
+
},
|
|
183
|
+
cell: (s) => {
|
|
184
|
+
const r = s.row.original, e = s.getValue(), m = Object.keys(r.name_locale ?? {}).map((o) => A(o));
|
|
185
|
+
return M("div", {
|
|
186
|
+
class: "flex items-center gap-8"
|
|
187
|
+
}, [M("span", {
|
|
188
|
+
class: "break-all"
|
|
189
|
+
}, e), ...m.map((o) => M("div", {
|
|
190
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
191
|
+
}, o))]);
|
|
192
|
+
}
|
|
193
|
+
}, {
|
|
194
|
+
id: "actions",
|
|
195
|
+
size: 52,
|
|
196
|
+
meta: {
|
|
197
|
+
cellClass: "pl-16",
|
|
198
|
+
headerContentClass: "-mx-16"
|
|
199
|
+
},
|
|
200
|
+
header: "",
|
|
201
|
+
cell: (s) => {
|
|
202
|
+
const r = s.row.original;
|
|
203
|
+
return M("div", {
|
|
204
|
+
class: "flex justify-end"
|
|
205
|
+
}, [M(H.FmButton, {
|
|
206
|
+
icon: "delete",
|
|
207
|
+
disabled: !r._id,
|
|
208
|
+
variant: "tertiary",
|
|
209
|
+
textColor: "neutral-gray-400",
|
|
210
|
+
onClick: G(async () => {
|
|
211
|
+
await u(r);
|
|
212
|
+
}, ["stop", "prevent"])
|
|
213
|
+
})]);
|
|
214
|
+
}
|
|
215
|
+
}]);
|
|
216
|
+
async function u(s) {
|
|
217
|
+
if (!s._id) {
|
|
218
|
+
b.open({
|
|
219
|
+
message: t("menu.subcategory.dialog.remove.error"),
|
|
220
|
+
type: "warning"
|
|
221
|
+
});
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
V.open({
|
|
225
|
+
title: t("menu.subcategory.dialog.remove.title"),
|
|
226
|
+
message: t("menu.common.dialog.remove_confirmation", {
|
|
227
|
+
name: s.name
|
|
228
|
+
}),
|
|
229
|
+
primaryActions: {
|
|
230
|
+
text: "Remove",
|
|
231
|
+
close: !0,
|
|
232
|
+
variant: J.Destructive
|
|
233
|
+
},
|
|
234
|
+
secondaryActions: {
|
|
235
|
+
text: "Cancel",
|
|
236
|
+
close: !0
|
|
237
|
+
}
|
|
238
|
+
}).onPrimary(async () => {
|
|
239
|
+
await w.updateMenu({
|
|
240
|
+
module: Z.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
241
|
+
operation: X.F_OPERATION_TYPE.delete,
|
|
242
|
+
data: s._id
|
|
243
|
+
}, s.name, !0);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
async function E(s) {
|
|
247
|
+
const r = s.map((e) => e._id).filter((e) => !!e);
|
|
248
|
+
await S.rearrange(r);
|
|
249
|
+
}
|
|
250
|
+
const i = te();
|
|
251
|
+
async function N(s) {
|
|
252
|
+
me(i, Ce, {
|
|
253
|
+
initialValue: s
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const U = le(), B = k(() => U.breakpoints.value.xs);
|
|
257
|
+
return (s, r) => {
|
|
258
|
+
const e = x("FmSearch"), a = x("FmTable"), m = x("FmButton");
|
|
259
|
+
return B.value ? (f(), C("div", Fe, [c("div", Le, [d(e, {
|
|
260
|
+
autofocus: "",
|
|
261
|
+
modelValue: l.value,
|
|
262
|
+
"onUpdate:modelValue": r[2] || (r[2] = (o) => l.value = o),
|
|
263
|
+
class: "w-full",
|
|
264
|
+
placeholder: n(t)("menu.common.labels.search_placeholder", {
|
|
265
|
+
type: "categories"
|
|
266
|
+
})
|
|
267
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", $e, [(f(!0), C(j, null, Q(F.value, (o) => (f(), C("div", {
|
|
268
|
+
key: o._id || "",
|
|
269
|
+
class: "flex flex-row py-12 px-16",
|
|
270
|
+
onClick: (_) => N(o)
|
|
271
|
+
}, [c("div", Ee, [c("p", Me, T(o.name), 1)]), d(m, {
|
|
272
|
+
"text-color": n(se).NeutralGray400,
|
|
273
|
+
variant: n(J).Tertiary,
|
|
274
|
+
"prepend-icon": "delete",
|
|
275
|
+
disabled: !o._id,
|
|
276
|
+
onClick: G((_) => u(o), ["stop"])
|
|
277
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Se))), 128))])])) : (f(), C("div", ke, [c("div", Ve, [c("div", we, [d(e, {
|
|
278
|
+
modelValue: l.value,
|
|
279
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => l.value = o),
|
|
280
|
+
autofocus: "",
|
|
281
|
+
class: "mb-8",
|
|
282
|
+
placeholder: n(t)("menu.common.labels.search_placeholder", {
|
|
283
|
+
type: n(t)("menu.subcategory.title")
|
|
284
|
+
})
|
|
285
|
+
}, null, 8, ["modelValue", "placeholder"])])]), d(ue, null, {
|
|
286
|
+
default: y(() => [d(a, {
|
|
287
|
+
"column-defs": L.value,
|
|
288
|
+
draggable: !0,
|
|
289
|
+
"page-size": p.value.length,
|
|
290
|
+
"row-data": p.value,
|
|
291
|
+
"search-value": l.value,
|
|
292
|
+
"shrink-at": !1,
|
|
293
|
+
"hide-footer": "",
|
|
294
|
+
"pin-header-row": "",
|
|
295
|
+
onDndChanged: E,
|
|
296
|
+
onRowClick: r[1] || (r[1] = (o) => N(o.original))
|
|
297
|
+
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
298
|
+
_: 1
|
|
299
|
+
})]));
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
}), Ne = { class: "flex-1 flex justify-between gap-8 pl-8" }, Oe = { class: "flex items-center" }, De = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ue = { class: "fm-typo-en-body-md-600 font-semibold" }, Xe = /* @__PURE__ */ I({
|
|
303
|
+
__name: "Subcategory",
|
|
304
|
+
setup(D) {
|
|
305
|
+
const V = W(), b = R(), $ = P(b), w = K($), S = ee({ dialog: V, menuLoader: w }), p = k(() => Y().subcategories), { t: l } = z();
|
|
306
|
+
function F() {
|
|
307
|
+
S.create();
|
|
308
|
+
}
|
|
309
|
+
const t = k(() => p.value.length);
|
|
310
|
+
return ve().resetOnMount(), (L, u) => (f(), O(ce, {
|
|
311
|
+
heading: n(l)("menu.subcategory.title")
|
|
312
|
+
}, {
|
|
313
|
+
default: y(() => [
|
|
314
|
+
p.value.length > 0 ? (f(), O(Te, { key: 0 })) : (f(), O(n(re), {
|
|
315
|
+
key: 1,
|
|
316
|
+
action: {
|
|
317
|
+
text: n(l)("menu.subcategory.add"),
|
|
318
|
+
callback: F
|
|
319
|
+
},
|
|
320
|
+
subtitle: n(l)("menu.subcategory.empty.subtitle"),
|
|
321
|
+
title: n(l)("menu.subcategory.empty.title")
|
|
322
|
+
}, null, 8, ["action", "subtitle", "title"]))
|
|
323
|
+
]),
|
|
324
|
+
"append-heading": y(() => [
|
|
325
|
+
c("div", Ne, [
|
|
326
|
+
c("div", Oe, [
|
|
327
|
+
c("div", De, [
|
|
328
|
+
c("p", Ue, T(t.value), 1)
|
|
329
|
+
])
|
|
330
|
+
]),
|
|
331
|
+
p.value.length > 0 ? (f(), O(ie, {
|
|
332
|
+
key: 0,
|
|
333
|
+
label: n(l)("menu.subcategory.add"),
|
|
334
|
+
"prepend-icon": "add",
|
|
335
|
+
onClick: F
|
|
336
|
+
}, null, 8, ["label"])) : ne("", !0)
|
|
337
|
+
])
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}, 8, ["heading"]));
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
export {
|
|
344
|
+
Xe as default
|
|
345
|
+
};
|
|
@@ -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-HZXySVXs.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-DK2Cp2Dg.js";
|
|
8
|
+
import { T as S, l as L } from "./index-CFbB7bM3.js";
|
|
9
|
+
import { a as O } from "./menu-BWsDRctK.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) {
|