@feedmepos/mf-menu 0.31.33-beta.1 → 0.31.33-beta.6
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-B4rnpCXN.js → App-Dt6RQiUh.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-LtwWMoPW.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js} +2 -2
- package/dist/{Catalog-Cd7J8de0.js → Catalog-CFx7t_Nu.js} +79 -79
- package/dist/{Category-p8UUDEiv.js → Category-CPMx86rY.js} +23 -19
- package/dist/{Category-D3WDm9Fe.js → Category-OjK-v--G.js} +5 -5
- package/dist/{CookingGuide-hFtxmtGj.js → CookingGuide-ANnXKBjc.js} +3 -3
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js +113 -0
- package/dist/{Group-Bv0dyi8v.js → Group--DJjkGab.js} +1 -1
- package/dist/{Group-BTrqZgFd.js → Group-K4925_bP.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-36O78xv0.js +684 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +372 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js} +13987 -13378
- package/dist/{Ingredient-BCostN4Y.js → Ingredient-G4Txx6_0.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MAqpI7ZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js} +2 -2
- package/dist/{LinkProductSideSheet-abzVzmo3.js → LinkProductSideSheet-CWNarCEs.js} +1 -1
- package/dist/{MenuSetting-TfAo82-E.js → MenuSetting-Cx-EHG-6.js} +4 -4
- package/dist/{PrintRoute-B43rP5A9.js → PrintRoute-IxHGvGzF.js} +3 -3
- package/dist/{Product-C7cYyDHH.js → Product-D1gqn5J6.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +1641 -0
- package/dist/{ProductInternalTools-CkswVuAF.js → ProductInternalTools-GJ2OE5gU.js} +5 -5
- package/dist/Products-DJqgSe-Y.js +270 -0
- package/dist/{Publish-DIKqaH2f.js → Publish-C86rd413.js} +3 -3
- package/dist/{Recipe-_ApT00c_.js → Recipe-BbQKou9p.js} +4 -4
- package/dist/{Scheduler-DWY1kKHO.js → Scheduler-DUeTkyGQ.js} +3 -3
- package/dist/{ServingSequence-Z1S9zOTO.js → ServingSequence-BROo5rC_.js} +3 -3
- package/dist/Setting-D-ueTlwO.js +259 -0
- package/dist/{Subcategory-Lqq6XHz2.js → Subcategory-DVewA8HX.js} +4 -4
- package/dist/{Takeaway-DiGzrarg.js → Takeaway-B4lDGQDh.js} +4 -4
- package/dist/{Takeaway-DGvM9SBP.js → Takeaway-DyPjHuCl.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BfWy217t.js → Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js} +6 -6
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2wC_Mf0.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js} +642 -642
- package/dist/{Unit-D11rRFAf.js → Unit-CVF0dom4.js} +2 -2
- package/dist/{Variant-LaKYPxDe.js → Variant-DmccAgFU.js} +3 -3
- package/dist/_id_-CWtK62Fy.js +178 -0
- package/dist/{app-C5UXrJGj.js → app-CV_q8OdE.js} +75 -75
- package/dist/{app-Br9mC24D.js → app-ClinzawZ.js} +1 -1
- package/dist/app-DvG3mOom.js +8024 -0
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -1
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +77 -0
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +88 -0
- package/dist/apps/mf-menu/src/helper/{menuImport.d.ts → import-export.d.ts} +204 -3
- package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
- package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-fZD691Js.js +24 -0
- package/dist/assets/override-menu-Cjy1BJuz.js +24 -0
- package/dist/assets/validate-menu-uwysUwDP.js +24 -0
- package/dist/{catalog-BDyG_i9q.js → catalog-Wx88K6iI.js} +1 -1
- package/dist/catalogSetting-DTEHDSAd.js +71 -0
- package/dist/{category-Bi6gpIYU.js → category-BRTw76Vf.js} +1 -1
- package/dist/{currency-DDseyYg1.js → currency-562bPc2l.js} +1 -1
- package/dist/customAttributes-CXzd5ud1.js +33 -0
- package/dist/{dayjs.min-DoQgN0KD.js → dayjs.min-Cnfm8bQm.js} +1 -1
- package/dist/{index-DxrEwDTr.js → index-4hf9vONw.js} +2 -2
- package/dist/{index-C-zLHAG1.js → index-Crs_eZ0i.js} +28 -28
- package/dist/{index-DTUmry92.js → index-DJXrJdeQ.js} +3 -3
- package/dist/{item-DqXzPUy9.js → item-CuIxc9FT.js} +377 -377
- package/dist/{jszip.min-iAC5WNVU.js → jszip.min-C9xLIvo4.js} +245 -245
- package/dist/menu-ILWxqJQe.js +133263 -0
- package/dist/{menu-D6df9rcz.js → menu-Mkzv9c8C.js} +4 -4
- package/dist/{priceTier-C56BYecC.js → priceTier-D4joq_kN.js} +1 -1
- package/dist/{scheduler-DCSpt65t.js → scheduler-DuxWoNVb.js} +3 -3
- package/dist/{subcategory-CydaPy_X.js → subcategory-CLLMagXY.js} +43 -43
- package/dist/{toExcel-Bil8CwJs.js → toExcel-hGfpS_Uo.js} +2 -2
- package/dist/{unit-8DyuBx-X.js → unit-9fycj1fu.js} +1 -1
- package/package.json +4 -4
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cf17Iy5i.js +0 -7949
- package/dist/Group.vue_vue_type_script_setup_true_lang-vk1J9IxK.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js +0 -206
- package/dist/Product.vue_vue_type_script_setup_true_lang-BOq8wMzq.js +0 -1560
- package/dist/Products-C7BtAjhB.js +0 -659
- package/dist/Setting-Bfuf26Gc.js +0 -258
- package/dist/_id_-Q_Tyhr4U.js +0 -200
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +0 -123
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +0 -32
- package/dist/assets/linked-status-BhGrXd73.js +0 -24
- package/dist/assets/override-menu-CUNDHOWA.js +0 -24
- package/dist/assets/validate-menu-BqOizHsX.js +0 -24
- package/dist/catalogSetting-C33p_dck.js +0 -65
- package/dist/menu-Cir-22ei.js +0 -108039
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as v, computed as $, resolveComponent as W, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as R, createBlock as oe, withCtx as A } from "vue";
|
|
2
|
-
import { J as O, F as ne } from "./jszip.min-
|
|
3
|
-
import { D as le, u as ie, I as D, a1 as re, a0 as ce, K as de, M as me, N as ue } from "./menu-
|
|
2
|
+
import { J as O, F as ne } from "./jszip.min-C9xLIvo4.js";
|
|
3
|
+
import { D as le, u as ie, I as D, a1 as re, a0 as ce, K as de, M as me, N as ue } from "./menu-ILWxqJQe.js";
|
|
4
4
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
5
5
|
import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { u as he, a as ye } from "./menu-
|
|
8
|
-
import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { v as ve, w as _e } from "./item-
|
|
7
|
+
import { u as he, a as ye } from "./menu-Mkzv9c8C.js";
|
|
8
|
+
import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js";
|
|
9
|
+
import { v as ve, w as _e } from "./item-CuIxc9FT.js";
|
|
10
10
|
const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "h-full flex flex-col"
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { defineComponent as Y, computed as g, ref as z, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as m, createElementVNode as u, toDisplayString as U, createVNode as a, createCommentVNode as L, createElementBlock as D, Fragment as T } from "vue";
|
|
2
|
+
import { D as C } from "./dayjs.min-Cnfm8bQm.js";
|
|
3
|
+
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js";
|
|
4
|
+
import { J as oe, F as ne } from "./jszip.min-C9xLIvo4.js";
|
|
5
|
+
import { u as q, D as G, A as I, e as H, G as O, B as ae, H as N, I as B } from "./menu-ILWxqJQe.js";
|
|
6
|
+
import { useCoreStore as re, useI18n as se } from "@feedmepos/mf-common";
|
|
7
|
+
import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as $, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { _ as ue, a as P } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
+
import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
+
import { u as me, a as de } from "./menu-Mkzv9c8C.js";
|
|
12
|
+
import { u as pe } from "./item-CuIxc9FT.js";
|
|
13
|
+
import { _ as A, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js";
|
|
14
|
+
import { L as R } from "./LinkProductSideSheet-CWNarCEs.js";
|
|
15
|
+
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js";
|
|
16
|
+
import { m as ve } from "./toExcel-hGfpS_Uo.js";
|
|
17
|
+
const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, xe = /* @__PURE__ */ Y({
|
|
18
|
+
__name: "ConfirmActionDialog",
|
|
19
|
+
props: {
|
|
20
|
+
description: {},
|
|
21
|
+
value: {},
|
|
22
|
+
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
23
|
+
},
|
|
24
|
+
setup(F) {
|
|
25
|
+
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = z(""), w = j(), { emitAction: x } = ie();
|
|
26
|
+
return (p, s) => {
|
|
27
|
+
const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
|
|
28
|
+
return d(), y(b, {
|
|
29
|
+
"on-validation-success": () => e(x)("primary"),
|
|
30
|
+
"blame-form-child-on-validation-failed": ""
|
|
31
|
+
}, {
|
|
32
|
+
default: m(() => [
|
|
33
|
+
u("div", ge, [
|
|
34
|
+
u("div", null, U(p.description), 1),
|
|
35
|
+
u("div", { innerHTML: S.value }, null, 8, be),
|
|
36
|
+
u("div", null, [
|
|
37
|
+
a(i, {
|
|
38
|
+
modelValue: r.value,
|
|
39
|
+
"onUpdate:modelValue": [
|
|
40
|
+
s[0] || (s[0] = (l) => r.value = l),
|
|
41
|
+
s[1] || (s[1] = () => {
|
|
42
|
+
})
|
|
43
|
+
],
|
|
44
|
+
placeholder: p.value,
|
|
45
|
+
rules: [(l) => l === p.value || "Value does not match"]
|
|
46
|
+
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
47
|
+
]),
|
|
48
|
+
u("div", ye, [
|
|
49
|
+
a(f, {
|
|
50
|
+
label: "Cancel",
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
onClick: s[2] || (s[2] = (l) => e(w).close())
|
|
53
|
+
}),
|
|
54
|
+
a(f, {
|
|
55
|
+
label: "Confirm",
|
|
56
|
+
type: "submit"
|
|
57
|
+
})
|
|
58
|
+
])
|
|
59
|
+
])
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["on-validation-success"]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}), ke = /* @__PURE__ */ Y({
|
|
66
|
+
__name: "Migrate",
|
|
67
|
+
setup(F) {
|
|
68
|
+
const t = q(), S = re(), r = J(), { minor: w } = G(r), x = z(!1), p = j();
|
|
69
|
+
async function s() {
|
|
70
|
+
i.value || x.value || p.open({
|
|
71
|
+
title: "Migrate to new version",
|
|
72
|
+
contentComponent: xe,
|
|
73
|
+
contentComponentProps: {
|
|
74
|
+
value: "MIGRATE",
|
|
75
|
+
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
76
|
+
}
|
|
77
|
+
}).onPrimary(async () => {
|
|
78
|
+
p.close(), await w(
|
|
79
|
+
async () => {
|
|
80
|
+
await t.migrate(), setTimeout(() => {
|
|
81
|
+
window.location.reload();
|
|
82
|
+
}, 2e3);
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
isLoading: x,
|
|
86
|
+
customId: t.state.menu._id,
|
|
87
|
+
message: "Migrating menu",
|
|
88
|
+
successMessage: "Migration completed"
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const i = g(() => {
|
|
94
|
+
const f = S.restaurants.value;
|
|
95
|
+
if (!f.length) return "Required at least one restaurant to migrate";
|
|
96
|
+
const b = f.filter((k) => !k.posVersion || !I.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: k.posVersion }));
|
|
97
|
+
return b.length ? `Upgrade POS to V${I.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((k) => k.profile.name).join(", ")}` : null;
|
|
98
|
+
});
|
|
99
|
+
return g(() => i.value ? i.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, b) => {
|
|
100
|
+
const l = h("FmSnackbar");
|
|
101
|
+
return !i.value && e(t).version !== e(O.F_MENU_VERSION).enum.v4 ? (d(), y(l, {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "!max-w-full",
|
|
104
|
+
title: "New version of menu is out now!",
|
|
105
|
+
description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
|
|
106
|
+
variant: "info",
|
|
107
|
+
action: "Migrate",
|
|
108
|
+
"z-index": 0,
|
|
109
|
+
onOnAction: s
|
|
110
|
+
})) : L("", !0);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Le = /* @__PURE__ */ Y({
|
|
114
|
+
__name: "Products",
|
|
115
|
+
setup(F) {
|
|
116
|
+
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), x = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = me(), b = g(() => ({
|
|
117
|
+
...ae.menuV4ToV3(N(r.state.menu)),
|
|
118
|
+
_id: r.state.menu._id,
|
|
119
|
+
_rev: r.state.menu._rev
|
|
120
|
+
})), l = g(() => {
|
|
121
|
+
const c = B.flatten(f.value.map((o) => o.items));
|
|
122
|
+
return B.uniqBy(c, (o) => o._id).length;
|
|
123
|
+
});
|
|
124
|
+
async function k(c, o) {
|
|
125
|
+
const _ = new oe();
|
|
126
|
+
for (let v = 0; v < c.length; v++) {
|
|
127
|
+
const Q = await c[v].xlsx.writeBuffer();
|
|
128
|
+
_.file(`${o[v]}.xlsx`, Q);
|
|
129
|
+
}
|
|
130
|
+
const n = await _.generateAsync({ type: "blob" });
|
|
131
|
+
ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
|
+
}
|
|
133
|
+
async function E() {
|
|
134
|
+
await S.minor(
|
|
135
|
+
async () => {
|
|
136
|
+
if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
|
|
137
|
+
const c = N(r.state.menu), o = new ee(c).exportToExcel(), _ = [
|
|
138
|
+
`menu_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
139
|
+
`addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
140
|
+
`itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
|
|
141
|
+
];
|
|
142
|
+
k(o, _);
|
|
143
|
+
} else {
|
|
144
|
+
const c = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
|
|
145
|
+
await te(c, `${o}.xlsx`, {
|
|
146
|
+
bookType: "xlsx",
|
|
147
|
+
bookSST: !1,
|
|
148
|
+
type: "array"
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{ successMessage: "Menu exported", customId: r.state.menu._id }
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
const Z = le(), K = g(() => Z.breakpoints.value.xs);
|
|
156
|
+
return de().resetOnMount(), (c, o) => {
|
|
157
|
+
const _ = h("fm-button");
|
|
158
|
+
return d(), y(ce, {
|
|
159
|
+
heading: e(t)("menu.products.title")
|
|
160
|
+
}, {
|
|
161
|
+
default: m(() => [
|
|
162
|
+
a(ke),
|
|
163
|
+
a(fe)
|
|
164
|
+
]),
|
|
165
|
+
"append-heading": m(() => [
|
|
166
|
+
u("div", Me, [
|
|
167
|
+
u("div", Se, [
|
|
168
|
+
u("div", we, [
|
|
169
|
+
u("p", Ce, U(l.value), 1)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
u("div", he, [
|
|
173
|
+
K.value ? (d(), y(A, { key: 1 }, {
|
|
174
|
+
default: m(({ trigger: n }) => [
|
|
175
|
+
a(ue, null, {
|
|
176
|
+
default: m(() => [
|
|
177
|
+
a(P, {
|
|
178
|
+
label: e(t)("menu.products.actions.export"),
|
|
179
|
+
onClick: E
|
|
180
|
+
}, null, 8, ["label"]),
|
|
181
|
+
a(P, {
|
|
182
|
+
label: e(t)("menu.products.actions.import"),
|
|
183
|
+
onClick: n
|
|
184
|
+
}, null, 8, ["label", "onClick"])
|
|
185
|
+
]),
|
|
186
|
+
_: 2
|
|
187
|
+
}, 1024)
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
})) : (d(), D(T, { key: 0 }, [
|
|
191
|
+
a(_e, null, {
|
|
192
|
+
default: m(({ trigger: n }) => [
|
|
193
|
+
a(_, {
|
|
194
|
+
label: e(t)("menu.tree_editor.title"),
|
|
195
|
+
"bg-color": e(M).NeutralGray100,
|
|
196
|
+
"text-color": e(M).TypoSecondary,
|
|
197
|
+
variant: e($).Primary,
|
|
198
|
+
onClick: n
|
|
199
|
+
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}),
|
|
203
|
+
a(_, {
|
|
204
|
+
"bg-color": e(M).NeutralGray100,
|
|
205
|
+
"text-color": e(M).TypoSecondary,
|
|
206
|
+
variant: e($).Primary,
|
|
207
|
+
label: e(t)("menu.products.actions.export"),
|
|
208
|
+
onClick: E
|
|
209
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
210
|
+
a(A, null, {
|
|
211
|
+
default: m(({ trigger: n }) => [
|
|
212
|
+
a(_, {
|
|
213
|
+
"bg-color": e(M).NeutralGray100,
|
|
214
|
+
"text-color": e(M).TypoSecondary,
|
|
215
|
+
variant: e($).Primary,
|
|
216
|
+
label: e(t)("menu.products.actions.import"),
|
|
217
|
+
onClick: n
|
|
218
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
})
|
|
222
|
+
], 64)),
|
|
223
|
+
l.value > 0 ? (d(), D(T, { key: 2 }, [
|
|
224
|
+
w.value.create ? (d(), y(V, {
|
|
225
|
+
key: 0,
|
|
226
|
+
label: e(t)("menu.products.actions.add"),
|
|
227
|
+
"prepend-icon": "add",
|
|
228
|
+
onClick: o[0] || (o[0] = (n) => e(x).create(null))
|
|
229
|
+
}, null, 8, ["label"])) : p.value ? (d(), y(R, {
|
|
230
|
+
key: 1,
|
|
231
|
+
"categorized-items": e(s).linkableItems.value,
|
|
232
|
+
"initial-value": e(s).currentItems.value,
|
|
233
|
+
"show-variant": !1,
|
|
234
|
+
onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
|
|
235
|
+
}, {
|
|
236
|
+
default: m(({ trigger: n }) => [
|
|
237
|
+
a(V, {
|
|
238
|
+
label: e(t)("menu.products.actions.link"),
|
|
239
|
+
"prepend-icon": "link",
|
|
240
|
+
onClick: n
|
|
241
|
+
}, null, 8, ["label", "onClick"])
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
}, 8, ["categorized-items", "initial-value"])) : (d(), y(R, {
|
|
245
|
+
key: 2,
|
|
246
|
+
"categorized-items": e(i).linkableItems.value,
|
|
247
|
+
"initial-value": e(i).currentItems.value,
|
|
248
|
+
"show-variant": !1,
|
|
249
|
+
onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
|
|
250
|
+
}, {
|
|
251
|
+
default: m(({ trigger: n }) => [
|
|
252
|
+
a(V, {
|
|
253
|
+
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
254
|
+
onClick: n
|
|
255
|
+
}, null, 8, ["label", "onClick"])
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["categorized-items", "initial-value"]))
|
|
259
|
+
], 64)) : L("", !0)
|
|
260
|
+
])
|
|
261
|
+
])
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["heading"]);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
export {
|
|
269
|
+
Le as default
|
|
270
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as K, ref as I, computed as S, onMounted as ne, resolveComponent as C, createElementBlock as R, openBlock as h, createVNode as n, createElementVNode as o, toDisplayString as F, unref as i, Fragment as E, renderList as j, createBlock as O, withCtx as L, createCommentVNode as ue, withModifiers as N, h as H } from "vue";
|
|
2
|
-
import { D as X } from "./dayjs.min-
|
|
2
|
+
import { D as X } from "./dayjs.min-Cnfm8bQm.js";
|
|
3
3
|
import { useRouter as ie } from "vue-router";
|
|
4
|
-
import { A as re, e as ce, D as Z, a9 as de, H as J, I as me, u as pe, G as ge, a1 as ve } from "./menu-
|
|
4
|
+
import { A as re, e as ce, D as Z, a9 as de, H as J, I as me, u as pe, G as ge, a1 as ve } from "./menu-ILWxqJQe.js";
|
|
5
5
|
import { useI18n as Y, useCoreStore as be, RestaurantSelector as fe } from "@feedmepos/mf-common";
|
|
6
6
|
import { useSnackbar as ee, useDialogChild as _e, useDialog as he, components as Q } from "@feedmepos/ui-library";
|
|
7
7
|
import { _ as ye } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
-
import { _ as Ce } from "./app-
|
|
8
|
+
import { _ as Ce } from "./app-CV_q8OdE.js";
|
|
9
9
|
import { a as ke, w as we } from "./tooltip-B5BiPMx9.js";
|
|
10
10
|
import { u as xe } from "./discardConfirm-BHni0LNu.js";
|
|
11
11
|
import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
@@ -2,15 +2,15 @@ import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as
|
|
|
2
2
|
import { useI18n as U } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as $, components as j, useDialog as ne, FmButtonVariant as G, useBreakpoints as oe } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ae } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as le } from "./app-
|
|
6
|
-
import { O as q, D as A, H as ie, B as P, I as se, e as B, J as I, G as T, u as H } from "./menu-
|
|
5
|
+
import { _ as le } from "./app-CV_q8OdE.js";
|
|
6
|
+
import { O as q, D as A, H as ie, B as P, I as se, e as B, J as I, G as T, u as H } from "./menu-ILWxqJQe.js";
|
|
7
7
|
import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
8
8
|
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { defineStore as ue } from "pinia";
|
|
10
|
-
import { _ as Y, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as Y, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js";
|
|
11
11
|
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
12
12
|
import { c as pe } from "./check-C9mY6LiX.js";
|
|
13
|
-
import "./unit-
|
|
13
|
+
import "./unit-9fycj1fu.js";
|
|
14
14
|
import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
15
15
|
const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40" }, ye = { class: "flex flex-row gap-16" }, ge = { class: "flex gap-8 items-center justify-start" }, be = /* @__PURE__ */ z({
|
|
16
16
|
__name: "Form",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as N, computed as y, h as c, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as d, unref as m, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
|
|
2
|
-
import { G as i, O as W, u as G, D as Q } from "./menu-
|
|
2
|
+
import { G as i, O as W, u as G, D as Q } from "./menu-ILWxqJQe.js";
|
|
3
3
|
import { useI18n as J } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as X, useDialog as Z, useSnackbar as ee } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as te } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
-
import { _ as ne } from "./app-
|
|
7
|
-
import { d as ae, _ as oe, u as se, c as le } from "./scheduler-
|
|
6
|
+
import { _ as ne } from "./app-CV_q8OdE.js";
|
|
7
|
+
import { d as ae, _ as oe, u as se, c as le } from "./scheduler-DuxWoNVb.js";
|
|
8
8
|
import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
10
10
|
const ce = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as J, ref as L, computed as O, 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 A, 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 Q, renderList as ue } from "vue";
|
|
2
2
|
import { useRouter as ce } from "vue-router";
|
|
3
|
-
import { H, u as W, D as X, O as Z, J as I, G as S } from "./menu-
|
|
3
|
+
import { H, u as W, D as X, O as Z, J as I, G as S } from "./menu-ILWxqJQe.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as de, useCoreStore as me } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as ne, components as Y, useDialog as pe, FmButtonVariant as T, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as fe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
7
|
-
import { _ as ge, R as ve } from "./app-
|
|
7
|
+
import { _ as ge, R as ve } from "./app-CV_q8OdE.js";
|
|
8
8
|
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
10
10
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
11
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
12
|
-
import { u as xe } from "./app-
|
|
12
|
+
import { u as xe } from "./app-ClinzawZ.js";
|
|
13
13
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
14
14
|
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__ */ J({
|
|
15
15
|
__name: "Form",
|
|
@@ -0,0 +1,259 @@
|
|
|
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 z, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as L, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
|
|
2
|
+
import { u as me, D as ce, G as f, O as de, A as pe, H as w } from "./menu-ILWxqJQe.js";
|
|
3
|
+
import { useCoreStore as ve, useI18n as ge } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as fe, useDialog as _e, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as be } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
+
import { _ as ye } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
7
|
+
import { _ as H, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-DTEHDSAd.js";
|
|
9
|
+
import { C as xe } from "./catalog-Wx88K6iI.js";
|
|
10
|
+
const Ce = {
|
|
11
|
+
class: /* @__PURE__ */ z(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
|
|
12
|
+
}, Oe = {
|
|
13
|
+
class: "space-y-32"
|
|
14
|
+
}, Se = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "pl-32 space-x-8"
|
|
17
|
+
}, Me = {
|
|
18
|
+
class: "pl-[60px] space-y-16"
|
|
19
|
+
}, Ve = {
|
|
20
|
+
class: "space-x-16 flex items-center"
|
|
21
|
+
}, Fe = {
|
|
22
|
+
class: "flex-1 space-y-4"
|
|
23
|
+
}, Re = {
|
|
24
|
+
class: "fm-typo-en-body-lg-400"
|
|
25
|
+
}, Ue = {
|
|
26
|
+
class: "fm-typo-en-body-md-400"
|
|
27
|
+
}, he = {
|
|
28
|
+
class: "flex justify-end"
|
|
29
|
+
}, He = /* @__PURE__ */ ne({
|
|
30
|
+
__name: "Setting",
|
|
31
|
+
setup(Ne) {
|
|
32
|
+
const F = ve(), u = me(), j = fe(), A = ce(j), {
|
|
33
|
+
minor: q
|
|
34
|
+
} = A, G = _e(), {
|
|
35
|
+
t: n
|
|
36
|
+
} = ge(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
|
|
37
|
+
updateMenu: J
|
|
38
|
+
} = de(A), l = se(_.initCatalogSetting()), W = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), Y = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((o) => o.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
|
|
39
|
+
function T() {
|
|
40
|
+
return Y.value.length > 0 ? s("div", {
|
|
41
|
+
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
42
|
+
}, [s(be.FmIcon, {
|
|
43
|
+
color: "system-warning-300",
|
|
44
|
+
name: "warning"
|
|
45
|
+
}, null), s("p", {
|
|
46
|
+
class: "fm-typo-en-body-lg-400"
|
|
47
|
+
}, [n("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
48
|
+
}
|
|
49
|
+
function I() {
|
|
50
|
+
const t = O.value;
|
|
51
|
+
l.value = t ? _.fromCatalog(t, S.value) : _.fromMainCatalog(u.state.menu.masterCatalogSetting);
|
|
52
|
+
}
|
|
53
|
+
ue(() => u.state.currentCatalogId, I);
|
|
54
|
+
const R = p(() => {
|
|
55
|
+
if (!F.currentCountry.value) return [];
|
|
56
|
+
const t = l.value.taxSetting.mode === x.MANUAL ? l.value.taxSetting.inclusive ?? [] : [];
|
|
57
|
+
return pe.Country.getCountry(F.currentCountry.value).taxSystems.map((i) => {
|
|
58
|
+
const d = t.find((C) => C.systemCode === i.code);
|
|
59
|
+
return {
|
|
60
|
+
inclusive: (d == null ? void 0 : d.inclusive) || !1,
|
|
61
|
+
systemCode: i.code
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
function K(t) {
|
|
66
|
+
const o = l.value.taxSetting, i = o.mode === x.AUTO ? _.manualTax(R.value) : w(o);
|
|
67
|
+
i.inclusive ?? (i.inclusive = []);
|
|
68
|
+
const d = i.inclusive.findIndex((C) => C.systemCode === t.systemCode);
|
|
69
|
+
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), U.value = i;
|
|
70
|
+
}
|
|
71
|
+
ie(async () => {
|
|
72
|
+
F.currentBusiness.value && (b.value && !u.state.menu._id || I());
|
|
73
|
+
});
|
|
74
|
+
const U = p({
|
|
75
|
+
get: () => l.value.taxSetting,
|
|
76
|
+
set: (t) => {
|
|
77
|
+
l.value.taxSetting = t;
|
|
78
|
+
}
|
|
79
|
+
}), Q = async () => {
|
|
80
|
+
const t = _.toCatalog(l.value);
|
|
81
|
+
O.value ? await new xe({
|
|
82
|
+
...O.value,
|
|
83
|
+
...t
|
|
84
|
+
}, u, J, G).update() : await q(async () => {
|
|
85
|
+
await u.updateMainCatalogSetting({
|
|
86
|
+
inclusiveTaxes: t.inclusiveTaxes
|
|
87
|
+
});
|
|
88
|
+
}, {
|
|
89
|
+
successMessage: "Main catalog updated",
|
|
90
|
+
customId: u.state.menu._id
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
function X(t, o) {
|
|
94
|
+
const i = w(l.value);
|
|
95
|
+
i.markupOptions && (i.markupOptions[t] = o, l.value = i);
|
|
96
|
+
}
|
|
97
|
+
function Z(t) {
|
|
98
|
+
const o = w(l.value);
|
|
99
|
+
o.markupOptions && (o.markupOptions.splice(t, 1), l.value = o);
|
|
100
|
+
}
|
|
101
|
+
return (t, o) => {
|
|
102
|
+
const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), D = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"), oe = m("fm-form");
|
|
103
|
+
return r(), V("div", Ce, [s(oe, {
|
|
104
|
+
class: z(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
105
|
+
"blame-form-child-on-validation-failed": "",
|
|
106
|
+
onValidationSuccess: Q
|
|
107
|
+
}, {
|
|
108
|
+
default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ye, {
|
|
109
|
+
key: 0,
|
|
110
|
+
title: e(n)("menu.setting.catalog.title")
|
|
111
|
+
}, {
|
|
112
|
+
default: c(() => [s(i, {
|
|
113
|
+
modelValue: l.value.name,
|
|
114
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.value.name = a),
|
|
115
|
+
rules: [(a) => !W.value.includes(a.trim()) || e(n)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(n)("menu.setting.catalog.fields.name.required")],
|
|
116
|
+
label: e(n)("menu.setting.catalog.fields.name.label")
|
|
117
|
+
}, null, 8, ["modelValue", "rules", "label"]), s(T)]),
|
|
118
|
+
_: 1
|
|
119
|
+
}, 8, ["title"])), s(E, {
|
|
120
|
+
label: e(n)("menu.setting.tax.title")
|
|
121
|
+
}, {
|
|
122
|
+
default: c(() => [s(C, {
|
|
123
|
+
"model-value": l.value.taxSetting.mode,
|
|
124
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => {
|
|
125
|
+
a === e(x).AUTO ? U.value = e(_).autoTax() : U.value = e(_).manualTax(R.value);
|
|
126
|
+
})
|
|
127
|
+
}, {
|
|
128
|
+
default: c(() => [s(d, {
|
|
129
|
+
value: e(x).AUTO,
|
|
130
|
+
label: e(n)("menu.setting.tax.modes.auto.label"),
|
|
131
|
+
sublabel: e(n)("menu.setting.tax.modes.auto.sublabel")
|
|
132
|
+
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
133
|
+
value: e(x).MANUAL,
|
|
134
|
+
label: e(n)("menu.setting.tax.modes.manual.label"),
|
|
135
|
+
sublabel: e(n)("menu.setting.tax.modes.manual.sublabel")
|
|
136
|
+
}, null, 8, ["value", "label", "sublabel"])]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), V("div", Se, [(r(!0), V(L, null, B(R.value, (a) => (r(), g(ee, {
|
|
139
|
+
key: a.systemCode,
|
|
140
|
+
"model-value": a.inclusive,
|
|
141
|
+
value: !0,
|
|
142
|
+
label: a.systemCode + " inclusive",
|
|
143
|
+
"onUpdate:modelValue": (y) => {
|
|
144
|
+
K({
|
|
145
|
+
...a,
|
|
146
|
+
inclusive: y
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : k("", !0)]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["label"]), !b.value && S.value ? (r(), g(E, {
|
|
152
|
+
key: 1,
|
|
153
|
+
label: e(n)("menu.setting.link.title")
|
|
154
|
+
}, {
|
|
155
|
+
default: c(() => [s(D, {
|
|
156
|
+
"model-value": l.value.orderFrom && l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE,
|
|
157
|
+
label: e(n)("menu.setting.link.auto_link.label"),
|
|
158
|
+
"label-placement": "right",
|
|
159
|
+
sublabel: e(n)("menu.setting.link.auto_link.sublabel"),
|
|
160
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => l.value.orderFrom = a ? e(f.F_ORDER_FROM).enum.ALL : e(f.F_ORDER_FROM).enum.NONE)
|
|
161
|
+
}, null, 8, ["model-value", "label", "sublabel"]), l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE ? (r(), g(te, {
|
|
162
|
+
key: 0,
|
|
163
|
+
class: "ml-[60px]",
|
|
164
|
+
items: [{
|
|
165
|
+
label: "Available for all",
|
|
166
|
+
value: e(f.F_ORDER_FROM).enum.ALL
|
|
167
|
+
}, {
|
|
168
|
+
label: "Order on POS only",
|
|
169
|
+
value: e(f.F_ORDER_FROM).enum.POS_ONLY
|
|
170
|
+
}],
|
|
171
|
+
"model-value": l.value.orderFrom,
|
|
172
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => l.value.orderFrom = a)
|
|
173
|
+
}, null, 8, ["items", "model-value"])) : k("", !0)]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(E, {
|
|
176
|
+
key: 2,
|
|
177
|
+
label: e(n)("menu.setting.markup.title")
|
|
178
|
+
}, {
|
|
179
|
+
default: c(() => [s(D, {
|
|
180
|
+
"model-value": !!l.value.markupOptions,
|
|
181
|
+
label: e(n)("menu.setting.markup.auto_markup.label"),
|
|
182
|
+
"label-placement": "right",
|
|
183
|
+
sublabel: e(n)("menu.setting.markup.auto_markup.sublabel"),
|
|
184
|
+
"onUpdate:modelValue": o[4] || (o[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
185
|
+
}, null, 8, ["model-value", "label", "sublabel"]), v("div", Me, [s(H, {
|
|
186
|
+
categories: e(u).categories,
|
|
187
|
+
items: e(u).items,
|
|
188
|
+
action: "add",
|
|
189
|
+
"onUpdate:modelValue": o[5] || (o[5] = (a) => {
|
|
190
|
+
a && (l.value.markupOptions = [...l.value.markupOptions ?? [], a]);
|
|
191
|
+
})
|
|
192
|
+
}, {
|
|
193
|
+
default: c(({
|
|
194
|
+
trigger: a
|
|
195
|
+
}) => [s(h, {
|
|
196
|
+
"text-color": e(P).ColorPrimary,
|
|
197
|
+
"border-color": e(P).ColorPrimary,
|
|
198
|
+
variant: e($).Secondary,
|
|
199
|
+
label: "Add markup configuration",
|
|
200
|
+
"prepend-icon": "add",
|
|
201
|
+
onClick: a
|
|
202
|
+
}, null, 8, ["text-color", "border-color", "variant", "onClick"])]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["categories", "items"]), (r(!0), V(L, null, B(l.value.markupOptions, (a, y) => (r(), g(H, {
|
|
205
|
+
key: y,
|
|
206
|
+
categories: e(u).categories,
|
|
207
|
+
items: e(u).items,
|
|
208
|
+
"model-value": a,
|
|
209
|
+
action: "update",
|
|
210
|
+
"onUpdate:modelValue": (M) => {
|
|
211
|
+
M && X(y, M);
|
|
212
|
+
}
|
|
213
|
+
}, {
|
|
214
|
+
default: c(({
|
|
215
|
+
trigger: M
|
|
216
|
+
}) => [s(le, {
|
|
217
|
+
id: JSON.stringify(a),
|
|
218
|
+
class: "py-12 px-16 cursor-pointer",
|
|
219
|
+
variant: "outlined",
|
|
220
|
+
onClick: M
|
|
221
|
+
}, {
|
|
222
|
+
default: c(() => [v("div", Ve, [v("div", Fe, [s(ae, {
|
|
223
|
+
class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold"
|
|
224
|
+
}, {
|
|
225
|
+
default: c(() => [re(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
226
|
+
_: 2
|
|
227
|
+
}, 1024), v("p", Re, N(e(n)("menu.setting.markup.config", {
|
|
228
|
+
number: y + 1
|
|
229
|
+
})), 1), v("p", Ue, N(a.includeItems ? e(n)("menu.setting.markup.products.linked", {
|
|
230
|
+
count: a.includeItems.length
|
|
231
|
+
}) : e(n)("menu.setting.markup.products.all")), 1)]), s(h, {
|
|
232
|
+
variant: e($).Tertiary,
|
|
233
|
+
"prepend-icon": "delete",
|
|
234
|
+
onClick: (we) => Z(y)
|
|
235
|
+
}, null, 8, ["variant", "onClick"])])]),
|
|
236
|
+
_: 2
|
|
237
|
+
}, 1032, ["id", "onClick"])]),
|
|
238
|
+
_: 2
|
|
239
|
+
}, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["label"])) : k("", !0), s(ke, {
|
|
242
|
+
modelValue: l.value,
|
|
243
|
+
"onUpdate:modelValue": o[6] || (o[6] = (a) => l.value = a),
|
|
244
|
+
"is-main-catalog": b.value,
|
|
245
|
+
"is-v4": S.value
|
|
246
|
+
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(T, {
|
|
247
|
+
key: 3
|
|
248
|
+
})) : k("", !0)]), v("div", he, [s(h, {
|
|
249
|
+
label: e(n)("common.save"),
|
|
250
|
+
type: "submit"
|
|
251
|
+
}, null, 8, ["label"])])]),
|
|
252
|
+
_: 1
|
|
253
|
+
})]);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
export {
|
|
258
|
+
He as default
|
|
259
|
+
};
|
|
@@ -2,17 +2,17 @@ import { defineComponent as L, ref as w, watch as W, resolveComponent as y, crea
|
|
|
2
2
|
import { useI18n as T } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as B, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { D, u as N, O as U, J as K, G } from "./menu-
|
|
5
|
+
import { D, u as N, O as U, J as K, G } from "./menu-ILWxqJQe.js";
|
|
6
6
|
import { _ as le } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as se } from "./app-
|
|
7
|
+
import { _ as se } from "./app-CV_q8OdE.js";
|
|
8
8
|
import { c as re } from "./createForm-BoUQeZTd.js";
|
|
9
9
|
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
10
10
|
import { c as I } from "./object-DVUNCr7w.js";
|
|
11
11
|
import { r as ce } from "./rules-CIWTZQfh.js";
|
|
12
12
|
import { c as ue } from "./check-C9mY6LiX.js";
|
|
13
|
-
import { a as q } from "./subcategory-
|
|
13
|
+
import { a as q } from "./subcategory-CLLMagXY.js";
|
|
14
14
|
import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
15
|
-
import { a as me } from "./menu-
|
|
15
|
+
import { a as me } from "./menu-Mkzv9c8C.js";
|
|
16
16
|
const pe = {
|
|
17
17
|
class: "fm-typo-en-title-md-600"
|
|
18
18
|
}, _e = {
|