@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.10
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-NHdXEdrJ.js → App-DLoBsgTh.js} +79 -33
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js} +20 -20
- package/dist/{Catalog-B0fV6Yje.js → Catalog-CEvqDKD0.js} +80 -80
- package/dist/{Category-CJZs9I7F.js → Category-CPrXxkVI.js} +41 -41
- package/dist/{Category-CUKZ10xq.js → Category-CnsBFgvu.js} +37 -33
- package/dist/{CookingGuide-kVclP--T.js → CookingGuide-Day6eG7h.js} +66 -66
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzrjTv0X.js +113 -0
- package/dist/{Group-Bgkye2LL.js → Group-HAAm8its.js} +1 -1
- package/dist/{Group-CAS6o4Fo.js → Group-_G2GnGz-.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-CTDR_kMg.js +686 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-KuT-w6bF.js +367 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js} +4982 -5081
- package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BerGQ0W3.js} +23 -23
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js} +2 -2
- package/dist/LinkProductSideSheet-32r2l60j.js +297 -0
- package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
- package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-DmyEGemp.js} +20 -20
- package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-8gipiFdT.js} +99 -98
- package/dist/{Product-BPIUTn0_.js → Product-Cqvq9DAA.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js +1578 -0
- package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools--w7YOgx2.js} +17 -17
- package/dist/Products-BIRGYu47.js +283 -0
- package/dist/{Publish-DDzpmm72.js → Publish-BcbzhAa5.js} +3 -3
- package/dist/{Recipe-DHYzO0IS.js → Recipe-z1zhmblA.js} +13 -13
- package/dist/{Scheduler-DBad2mO3.js → Scheduler-Cv9Y5M6i.js} +7 -7
- package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-DWFJD-1y.js} +24 -24
- package/dist/Setting-BgCssMcE.js +259 -0
- package/dist/{Subcategory-DHjc7WeF.js → Subcategory-D4BYtWMN.js} +10 -10
- package/dist/{Takeaway-CJRTaygj.js → Takeaway-126rJXs4.js} +9 -9
- package/dist/{Takeaway-CAIAHpA-.js → Takeaway-D-UZAzfn.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsyWrTL.js} +12 -12
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js +5990 -0
- package/dist/{Unit-DSMSKE6_.js → Unit-7APP9HLD.js} +13 -13
- package/dist/{Variant-DMXxUWnj.js → Variant-lJW6pFqT.js} +14 -14
- package/dist/_id_-R-pHc7HA.js +202 -0
- package/dist/{app-D23N7tJ0.js → app-CAhJXoa3.js} +390 -377
- package/dist/{app-BTgdGTYz.js → app-DoJgznLl.js} +1 -1
- 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/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/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
- 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/router/shared.d.ts +2 -1
- 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/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- 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-BbJj0WW0.js +24 -0
- package/dist/assets/override-menu-CRaqJDr8.js +24 -0
- package/dist/assets/validate-menu-BQ2BFUmD.js +24 -0
- package/dist/{catalog-DcciqmWK.js → catalog-C1fna-Yk.js} +1 -1
- package/dist/catalogSetting-BKP36lej.js +71 -0
- package/dist/{category-bhqVqDzJ.js → category-DK_MXlvY.js} +5 -5
- package/dist/{currency-Clgvy00I.js → currency-D2fl1Bk0.js} +1 -1
- package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-Bk9ZYtg9.js} +1 -1
- package/dist/{index-BHbYu_OM.js → index-BJ3_8aUL.js} +14 -14
- package/dist/{index-CTUaJyIh.js → index-CSuF-4Sa.js} +14 -14
- package/dist/{index-DZZJjEOs.js → index-Cc2J6T0N.js} +28 -28
- package/dist/index-D7yR1j9C.js +215 -0
- package/dist/{item-DH1xf2Sa.js → item-DX44khy2.js} +201 -199
- package/dist/{jszip.min-CMM2HN8J.js → jszip.min-Dbu7MIcI.js} +427 -427
- package/dist/{menu-Dx39P1vR.js → menu-DT5c-FqY.js} +4 -4
- package/dist/menu-D_Cckz_p.js +133287 -0
- package/dist/menuV2-DTBH_-tm.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-3M5cxSYX.js → priceTier-wLQ8p4bJ.js} +1 -1
- package/dist/{scheduler-BT3EJBK6.js → scheduler-D6UbXLXR.js} +36 -37
- package/dist/subcategory-DjN3X1BI.js +148 -0
- package/dist/{toExcel-BLoj4Wqb.js → toExcel-CWyoDcRd.js} +15 -15
- package/dist/{unit-BsNOQHvZ.js → unit-CLa8caCJ.js} +11 -10
- package/package.json +5 -5
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js +0 -7949
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js +0 -206
- package/dist/LinkProductSideSheet-CEClo07H.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js +0 -1560
- package/dist/Products-dWmgQ_di.js +0 -270
- package/dist/Setting-CPjvUYU9.js +0 -258
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js +0 -6149
- package/dist/_id_-CTq4qK7z.js +0 -200
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/assets/linked-status-Cfc9wZst.js +0 -24
- package/dist/assets/override-menu-BNZggtO_.js +0 -24
- package/dist/assets/validate-menu-CPwUvy9F.js +0 -24
- package/dist/catalogSetting-D4iwoJLb.js +0 -65
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/menu-DcGo3sn5.js +0 -108039
- package/dist/subcategory-B5atmACN.js +0 -817
- /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as J,
|
|
1
|
+
import { defineComponent as P, computed as T, ref as F, watch as H, createVNode as n, resolveComponent as c, createBlock as V, openBlock as d, unref as e, withCtx as p, createElementVNode as _, createElementBlock as k, createCommentVNode as y, Fragment as K, renderList as q, toDisplayString as U } from "vue";
|
|
2
|
+
import { u as J, G as Q, B as R, H as M } from "./menu-D_Cckz_p.js";
|
|
3
3
|
import { useI18n as W, useCoreStore as X } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Y, components as Z, FmButtonVariant as ee, FmButtonColorThemeVariant as te } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as le } from "./app-
|
|
5
|
+
import { _ as A } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
6
|
+
import { _ as le } from "./app-CAhJXoa3.js";
|
|
7
7
|
import { _ as ne } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
8
|
-
import { C as b, a as m } from "./catalogSetting-
|
|
9
|
-
import { u as oe } from "./priceTier-
|
|
8
|
+
import { C as b, a as m } from "./catalogSetting-BKP36lej.js";
|
|
9
|
+
import { u as oe } from "./priceTier-wLQ8p4bJ.js";
|
|
10
10
|
const ae = {
|
|
11
11
|
class: "py-16"
|
|
12
12
|
}, se = {
|
|
@@ -25,13 +25,13 @@ const ae = {
|
|
|
25
25
|
class: "fm-typo-en-title-md-600"
|
|
26
26
|
}, de = {
|
|
27
27
|
class: "text-fm-color-typo-secondary"
|
|
28
|
-
}, ye = /* @__PURE__ */
|
|
28
|
+
}, ye = /* @__PURE__ */ P({
|
|
29
29
|
__name: "MenuSetting",
|
|
30
30
|
setup(pe) {
|
|
31
31
|
var h;
|
|
32
32
|
const {
|
|
33
33
|
t
|
|
34
|
-
} = W(), v = J(), w = X(),
|
|
34
|
+
} = W(), v = J(), w = X(), B = Y(), N = Q(B), u = T(() => ({
|
|
35
35
|
lowStock: v.state.menu.lowStockThreshold,
|
|
36
36
|
taxSetting: v.state.menu.masterCatalogSetting,
|
|
37
37
|
priceTierSettings: v.state.menu.priceTierSettings
|
|
@@ -58,7 +58,7 @@ const ae = {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
function L(a) {
|
|
61
|
-
const l = i.value, s = l.mode === m.AUTO ? b.manualTax(S.value) :
|
|
61
|
+
const l = i.value, s = l.mode === m.AUTO ? b.manualTax(S.value) : M(l);
|
|
62
62
|
s.inclusive ?? (s.inclusive = []);
|
|
63
63
|
const r = s.inclusive.findIndex((g) => g.systemCode === a.systemCode);
|
|
64
64
|
r < 0 ? s.inclusive.push(a) : s.inclusive.splice(r, 1, a), i.value = s;
|
|
@@ -66,8 +66,8 @@ const ae = {
|
|
|
66
66
|
async function O() {
|
|
67
67
|
if (u.value.lowStock !== null && u.value.lowStock !== void 0 && !Number.isInteger(u.value.lowStock))
|
|
68
68
|
return;
|
|
69
|
-
const a = i.value.mode === m.AUTO ? null :
|
|
70
|
-
await
|
|
69
|
+
const a = i.value.mode === m.AUTO ? null : M(i.value.inclusive);
|
|
70
|
+
await N.minor(async () => {
|
|
71
71
|
const l = u.value.lowStock === null || u.value.lowStock === void 0 || u.value.lowStock === 0;
|
|
72
72
|
await v.updateMenuSetting({
|
|
73
73
|
masterCatalogSetting: {
|
|
@@ -97,7 +97,7 @@ const ae = {
|
|
|
97
97
|
}, null)])
|
|
98
98
|
}];
|
|
99
99
|
return (a, l) => {
|
|
100
|
-
const s = c("FmTabs"), r = c("fm-radio"), g = c("fm-radio-group"),
|
|
100
|
+
const s = c("FmTabs"), r = c("fm-radio"), g = c("fm-radio-group"), E = c("fm-checkbox"), $ = c("FormItem"), j = c("FmStepperField"), C = c("FmButton"), D = c("FmTable");
|
|
101
101
|
return d(), V(ne, {
|
|
102
102
|
heading: e(t)("menu.menu_setting.title")
|
|
103
103
|
}, {
|
|
@@ -105,10 +105,10 @@ const ae = {
|
|
|
105
105
|
items: I.value,
|
|
106
106
|
modelValue: x.value,
|
|
107
107
|
"onUpdate:modelValue": l[0] || (l[0] = (o) => x.value = o)
|
|
108
|
-
}, null, 8, ["items", "modelValue"]), _("div", ae, [x.value === "conf" ? (d(), k("div", se, [n(
|
|
108
|
+
}, null, 8, ["items", "modelValue"]), _("div", ae, [x.value === "conf" ? (d(), k("div", se, [n(A, {
|
|
109
109
|
title: "Tax setting"
|
|
110
110
|
}, {
|
|
111
|
-
default: p(() => [n(
|
|
111
|
+
default: p(() => [n($, {
|
|
112
112
|
label: e(t)("menu.setting.tax.title")
|
|
113
113
|
}, {
|
|
114
114
|
default: p(() => [n(g, {
|
|
@@ -127,26 +127,26 @@ const ae = {
|
|
|
127
127
|
sublabel: e(t)("menu.setting.tax.modes.manual.sublabel")
|
|
128
128
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
129
129
|
_: 1
|
|
130
|
-
}, 8, ["model-value"]), i.value.mode === e(m).MANUAL ? (d(), k("div", ue, [(d(!0), k(K, null, q(S.value, (o) => (d(), V(
|
|
130
|
+
}, 8, ["model-value"]), i.value.mode === e(m).MANUAL ? (d(), k("div", ue, [(d(!0), k(K, null, q(S.value, (o) => (d(), V(E, {
|
|
131
131
|
key: o.systemCode,
|
|
132
132
|
"model-value": o.inclusive,
|
|
133
133
|
value: !0,
|
|
134
134
|
label: o.systemCode + " inclusive",
|
|
135
|
-
"onUpdate:modelValue": (
|
|
135
|
+
"onUpdate:modelValue": (G) => {
|
|
136
136
|
L({
|
|
137
137
|
...o,
|
|
138
|
-
inclusive:
|
|
138
|
+
inclusive: G
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : y("", !0)]),
|
|
142
142
|
_: 1
|
|
143
143
|
}, 8, ["label"])]),
|
|
144
144
|
_: 1
|
|
145
|
-
}), n(
|
|
145
|
+
}), n(A, {
|
|
146
146
|
title: e(t)("menu.menu_setting.fields.low_stock.title"),
|
|
147
147
|
"sub-title": e(t)("menu.menu_setting.fields.low_stock.subtitle")
|
|
148
148
|
}, {
|
|
149
|
-
default: p(() => [n(
|
|
149
|
+
default: p(() => [n(j, {
|
|
150
150
|
"model-value": u.value.lowStock || null,
|
|
151
151
|
min: 0,
|
|
152
152
|
max: 1e3,
|
|
@@ -167,7 +167,7 @@ const ae = {
|
|
|
167
167
|
icon: "add",
|
|
168
168
|
onClick: e(f).create
|
|
169
169
|
}, null, 8, ["label", "onClick"])]), n(le, null, {
|
|
170
|
-
default: p(() => [n(
|
|
170
|
+
default: p(() => [n(D, {
|
|
171
171
|
"column-defs": z,
|
|
172
172
|
"row-data": e(f).priceTiers.value,
|
|
173
173
|
"page-size": e(f).priceTiers.value.length,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as T, computed as f, resolveComponent as g, createBlock as P, openBlock as p, unref as l, withCtx as m, createElementVNode as i, createVNode as c, createCommentVNode as J, toDisplayString as S, createElementBlock as L, Fragment as A, renderList as B, h as _, withModifiers as q } from "vue";
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
|
-
import { components as W, useSnackbar as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { H as j, I as
|
|
7
|
-
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { L as ue } from "./LinkProductSideSheet-CEClo07H.js";
|
|
3
|
+
import { components as W, useSnackbar as te, useDialog as oe } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { _ as ae } from "./app-CAhJXoa3.js";
|
|
6
|
+
import { H as j, I as le, J as Y, A as C, u as re, O as se, G as ie } from "./menu-D_Cckz_p.js";
|
|
9
7
|
import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
8
|
+
import { u as ue } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
+
import { L as de } from "./LinkProductSideSheet-32r2l60j.js";
|
|
10
|
+
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
11
|
+
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
|
+
const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, fe = { class: "space-y-16" }, ve = { class: "flex items-center gap-8" }, ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "flex-1" }, he = { class: "grow overflow-y-auto" }, be = { class: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-fm-color-neutral-gray-200" }, xe = { class: "px-16 py-8 flex-1" }, ke = { class: "py-8" }, Fe = { class: "flex gap-8 items-center justify-start" }, Ie = /* @__PURE__ */ H({
|
|
13
13
|
__name: "PrintDepartmentDialog",
|
|
14
14
|
props: {
|
|
15
15
|
categorizedItems: {
|
|
@@ -25,8 +25,8 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
25
25
|
setup(v, { expose: t, emit: h }) {
|
|
26
26
|
const N = v;
|
|
27
27
|
t({
|
|
28
|
-
showModal:
|
|
29
|
-
hideModal:
|
|
28
|
+
showModal: z,
|
|
29
|
+
hideModal: V
|
|
30
30
|
});
|
|
31
31
|
function b() {
|
|
32
32
|
return {
|
|
@@ -35,15 +35,15 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
35
35
|
applyToItems: []
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
const x =
|
|
39
|
-
function
|
|
38
|
+
const x = T(!1), M = T(void 0);
|
|
39
|
+
function z(r) {
|
|
40
40
|
M.value = r ? j(r) : b(), n.value = j(M.value), x.value = !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function V() {
|
|
43
43
|
x.value = !1;
|
|
44
44
|
}
|
|
45
|
-
const n =
|
|
46
|
-
function
|
|
45
|
+
const n = T(b());
|
|
46
|
+
function k({ items: r }) {
|
|
47
47
|
n.value = {
|
|
48
48
|
...n.value,
|
|
49
49
|
applyToItems: r.map((a) => a._id)
|
|
@@ -55,31 +55,27 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
55
55
|
applyToItems: n.value.applyToItems.filter((a) => a !== r)
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")),
|
|
58
|
+
const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")), F = f(() => n.value._id ? u("menu.print_route.department_dialog.update.action") : u("menu.print_route.department_dialog.add.action")), U = f(() => n.value.applyToItems.length), K = f(
|
|
59
59
|
() => n.value.applyToItems.reduce((r, a) => (r[a] = [], r), {})
|
|
60
|
-
), e =
|
|
60
|
+
), e = T(""), o = f(() => {
|
|
61
61
|
const r = e.value.toLowerCase();
|
|
62
62
|
return N.categorizedItems.reduce((a, d) => {
|
|
63
|
-
const
|
|
64
|
-
(
|
|
63
|
+
const D = d.items.filter(
|
|
64
|
+
(I) => (!r || I.name.toLowerCase().includes(r)) && !!K.value[I._id]
|
|
65
65
|
);
|
|
66
|
-
return
|
|
66
|
+
return D.length && a.push({ ...d, items: D }), a;
|
|
67
67
|
}, []);
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
const y = h;
|
|
71
|
-
k();
|
|
72
|
-
const E = ie(
|
|
73
|
-
() => !ae.isEqual(M.value, n.value),
|
|
68
|
+
}), y = h, w = ue(
|
|
69
|
+
() => !le.isEqual(M.value, n.value),
|
|
74
70
|
() => {
|
|
75
71
|
x.value = !1;
|
|
76
72
|
}
|
|
77
73
|
);
|
|
78
|
-
function
|
|
79
|
-
|
|
74
|
+
function E() {
|
|
75
|
+
V(), y("onSave", n.value);
|
|
80
76
|
}
|
|
81
77
|
return (r, a) => {
|
|
82
|
-
const d = g("FmTextField"),
|
|
78
|
+
const d = g("FmTextField"), D = g("FmSpacer"), I = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
|
|
83
79
|
return p(), P(Z, {
|
|
84
80
|
modelValue: x.value,
|
|
85
81
|
"onUpdate:modelValue": a[3] || (a[3] = (s) => x.value = s),
|
|
@@ -87,33 +83,33 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
87
83
|
"max-width": 560,
|
|
88
84
|
"is-container": l(W).FmForm,
|
|
89
85
|
"is-container-props": {
|
|
90
|
-
onValidationSuccess:
|
|
86
|
+
onValidationSuccess: E,
|
|
91
87
|
blameFormChildOnValidationFailed: !0,
|
|
92
88
|
class: "flex flex-col h-full"
|
|
93
89
|
},
|
|
94
|
-
"onOn:clickedAway": l(
|
|
90
|
+
"onOn:clickedAway": l(w)
|
|
95
91
|
}, {
|
|
96
92
|
"side-sheet-header": m(() => [
|
|
97
|
-
i("span",
|
|
93
|
+
i("span", pe, S(O.value), 1)
|
|
98
94
|
]),
|
|
99
95
|
"side-sheet-footer": m(() => [
|
|
100
96
|
i("div", Fe, [
|
|
101
|
-
c(
|
|
102
|
-
label:
|
|
97
|
+
c(I, {
|
|
98
|
+
label: F.value,
|
|
103
99
|
size: "lg",
|
|
104
100
|
variant: "primary",
|
|
105
101
|
type: "submit"
|
|
106
102
|
}, null, 8, ["label"]),
|
|
107
|
-
c(
|
|
103
|
+
c(I, {
|
|
108
104
|
label: l(u)("menu.print_route.department_dialog.actions.cancel"),
|
|
109
105
|
size: "lg",
|
|
110
106
|
variant: "tertiary",
|
|
111
|
-
onClick:
|
|
107
|
+
onClick: V
|
|
112
108
|
}, null, 8, ["label"])
|
|
113
109
|
])
|
|
114
110
|
]),
|
|
115
111
|
default: m(() => [
|
|
116
|
-
i("div",
|
|
112
|
+
i("div", _e, [
|
|
117
113
|
c(G, {
|
|
118
114
|
title: l(u)("menu.print_route.department_dialog.sections.route_detail.title")
|
|
119
115
|
}, {
|
|
@@ -136,16 +132,16 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
136
132
|
title: l(u)("menu.print_route.department_dialog.sections.link_product.title")
|
|
137
133
|
}, {
|
|
138
134
|
"append-title": m(() => [
|
|
139
|
-
c(
|
|
140
|
-
c(
|
|
135
|
+
c(D),
|
|
136
|
+
c(de, {
|
|
141
137
|
"categorized-items": v.categorizedItems,
|
|
142
138
|
"initial-value": n.value.applyToItems.map((s) => ({
|
|
143
139
|
_id: s
|
|
144
140
|
})),
|
|
145
|
-
onSubmit: a[1] || (a[1] = (s) =>
|
|
141
|
+
onSubmit: a[1] || (a[1] = (s) => k(s))
|
|
146
142
|
}, {
|
|
147
143
|
default: m(({ trigger: s }) => [
|
|
148
|
-
c(
|
|
144
|
+
c(I, {
|
|
149
145
|
icon: "link",
|
|
150
146
|
label: l(u)("menu.scheduler.dialog.sections.products.link"),
|
|
151
147
|
variant: "secondary",
|
|
@@ -158,12 +154,12 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
158
154
|
}, 8, ["categorized-items", "initial-value"])
|
|
159
155
|
]),
|
|
160
156
|
default: m(() => [
|
|
161
|
-
i("div",
|
|
162
|
-
i("div",
|
|
163
|
-
i("div",
|
|
164
|
-
count:
|
|
157
|
+
i("div", fe, [
|
|
158
|
+
i("div", ve, [
|
|
159
|
+
i("div", ye, S(l(u)("menu.print_route.department_dialog.sections.link_product.products_linked", {
|
|
160
|
+
count: U.value
|
|
165
161
|
})), 1),
|
|
166
|
-
i("div",
|
|
162
|
+
i("div", ge, [
|
|
167
163
|
c(X, {
|
|
168
164
|
modelValue: e.value,
|
|
169
165
|
"onUpdate:modelValue": a[2] || (a[2] = (s) => e.value = s),
|
|
@@ -171,21 +167,26 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
171
167
|
}, null, 8, ["modelValue", "placeholder"])
|
|
172
168
|
])
|
|
173
169
|
]),
|
|
174
|
-
i("div",
|
|
175
|
-
(p(!0), L(A, null,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
170
|
+
i("div", he, [
|
|
171
|
+
(p(!0), L(A, null, B(o.value, (s, ee) => (p(), L("div", {
|
|
172
|
+
key: s.id || ee
|
|
173
|
+
}, [
|
|
174
|
+
i("div", be, S(s.name), 1),
|
|
175
|
+
(p(!0), L(A, null, B(s.items, (R) => (p(), L("div", {
|
|
176
|
+
key: R._id,
|
|
177
|
+
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
178
|
+
}, [
|
|
179
|
+
i("div", xe, S(R.name), 1),
|
|
179
180
|
i("div", ke, [
|
|
180
|
-
c(
|
|
181
|
+
c(I, {
|
|
181
182
|
icon: "delete",
|
|
182
183
|
variant: "tertiary",
|
|
183
184
|
"text-color": "neutral-gray-400",
|
|
184
|
-
onClick: () => $(
|
|
185
|
+
onClick: () => $(R._id)
|
|
185
186
|
}, null, 8, ["onClick"])
|
|
186
187
|
])
|
|
187
|
-
]))),
|
|
188
|
-
]))),
|
|
188
|
+
]))), 128))
|
|
189
|
+
]))), 128))
|
|
189
190
|
])
|
|
190
191
|
])
|
|
191
192
|
]),
|
|
@@ -200,30 +201,30 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
200
201
|
});
|
|
201
202
|
function Ce(v, t) {
|
|
202
203
|
return {
|
|
203
|
-
module:
|
|
204
|
-
operation:
|
|
205
|
-
data:
|
|
204
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
205
|
+
operation: Y.F_OPERATION_TYPE.create,
|
|
206
|
+
data: C.FdoMenuPrintDepartment.parse(v),
|
|
206
207
|
link: t.map((h) => ({
|
|
207
|
-
module:
|
|
208
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
208
209
|
id: h
|
|
209
210
|
}))
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
213
|
function Ve(v, t) {
|
|
213
214
|
return {
|
|
214
|
-
module:
|
|
215
|
-
operation:
|
|
216
|
-
data:
|
|
215
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
216
|
+
operation: Y.F_OPERATION_TYPE.update,
|
|
217
|
+
data: C.FdoMenuPrintDepartment.parse(v),
|
|
217
218
|
link: t.map((h) => ({
|
|
218
|
-
module:
|
|
219
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
219
220
|
id: h
|
|
220
221
|
}))
|
|
221
222
|
};
|
|
222
223
|
}
|
|
223
224
|
function we(v) {
|
|
224
225
|
return {
|
|
225
|
-
module:
|
|
226
|
-
operation:
|
|
226
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
227
|
+
operation: Y.F_OPERATION_TYPE.delete,
|
|
227
228
|
data: v._id
|
|
228
229
|
};
|
|
229
230
|
}
|
|
@@ -242,13 +243,13 @@ const Ee = {
|
|
|
242
243
|
setup(v) {
|
|
243
244
|
const {
|
|
244
245
|
t
|
|
245
|
-
} = Q(), h =
|
|
246
|
+
} = Q(), h = re(), N = f(() => h.categorizedItems), b = f(() => {
|
|
246
247
|
const e = h.state.menu.modules.item;
|
|
247
248
|
return h.printDepartments.map((y) => ({
|
|
248
249
|
...y,
|
|
249
|
-
applyToItems: e.reduce((
|
|
250
|
+
applyToItems: e.reduce((w, E) => {
|
|
250
251
|
var r;
|
|
251
|
-
return (r =
|
|
252
|
+
return (r = E.print) != null && r.department.includes(y._id) && w.push(E), w;
|
|
252
253
|
}, [])
|
|
253
254
|
}), []);
|
|
254
255
|
}), x = f(() => b.value.length > 0), M = f(() => [{
|
|
@@ -286,25 +287,25 @@ const Ee = {
|
|
|
286
287
|
}, ["stop", "prevent"])
|
|
287
288
|
})])
|
|
288
289
|
}]);
|
|
289
|
-
function
|
|
290
|
+
function z() {
|
|
290
291
|
var e;
|
|
291
|
-
|
|
292
|
+
k.value || (e = U.value) == null || e.showModal();
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
+
function V(e) {
|
|
294
295
|
var o;
|
|
295
|
-
|
|
296
|
+
k.value || (o = U.value) == null || o.showModal({
|
|
296
297
|
...e,
|
|
297
298
|
applyToItems: e.applyToItems.map(({
|
|
298
299
|
_id: y
|
|
299
300
|
}) => y)
|
|
300
301
|
});
|
|
301
302
|
}
|
|
302
|
-
const n =
|
|
303
|
+
const n = se(ie(te())), k = f(() => n.checkMenuIsLoading());
|
|
303
304
|
async function $(e) {
|
|
304
305
|
const o = e._id ? Ve(e, e.applyToItems) : Ce(e, e.applyToItems);
|
|
305
306
|
await n.updateMenu(o, e.name);
|
|
306
307
|
}
|
|
307
|
-
const u =
|
|
308
|
+
const u = oe();
|
|
308
309
|
function O(e) {
|
|
309
310
|
let o = [_("span", t("menu.print_route.dialogs.remove.message.prefix")), _("span", {
|
|
310
311
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -331,63 +332,63 @@ const Ee = {
|
|
|
331
332
|
await n.updateMenu(we(e), e.name, !0);
|
|
332
333
|
});
|
|
333
334
|
}
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
336
|
-
const e =
|
|
335
|
+
const F = T(""), U = T(), K = f(() => {
|
|
336
|
+
if (!F.value) return b.value;
|
|
337
|
+
const e = F.value.toLowerCase();
|
|
337
338
|
return b.value.filter((o) => o.name.toLowerCase().includes(e));
|
|
338
339
|
});
|
|
339
340
|
return (e, o) => {
|
|
340
|
-
const y = g("FmSearch"),
|
|
341
|
-
return p(), P(
|
|
341
|
+
const y = g("FmSearch"), w = g("FmTable"), E = g("FmButton"), r = g("FmListItem"), a = g("FmList");
|
|
342
|
+
return p(), P(me, {
|
|
342
343
|
heading: l(t)("menu.print_route.title")
|
|
343
344
|
}, {
|
|
344
|
-
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(
|
|
345
|
+
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(ne, {
|
|
345
346
|
key: 0,
|
|
346
|
-
disabled:
|
|
347
|
+
disabled: k.value,
|
|
347
348
|
icon: "add",
|
|
348
349
|
label: l(t)("menu.print_route.actions.add"),
|
|
349
350
|
variant: "primary",
|
|
350
|
-
onClick:
|
|
351
|
+
onClick: z
|
|
351
352
|
}, null, 8, ["disabled", "label"])) : J("", !0)])]),
|
|
352
353
|
default: m(() => [x.value ? (p(), L(A, {
|
|
353
354
|
key: 1
|
|
354
355
|
}, [i("div", Te, [c(y, {
|
|
355
356
|
autofocus: "",
|
|
356
|
-
modelValue:
|
|
357
|
-
"onUpdate:modelValue": o[0] || (o[0] = (d) =>
|
|
357
|
+
modelValue: F.value,
|
|
358
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => F.value = d),
|
|
358
359
|
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
359
360
|
placeholder: l(t)("menu.print_route.table.search.placeholder")
|
|
360
|
-
}, null, 8, ["modelValue", "placeholder"])]), c(
|
|
361
|
+
}, null, 8, ["modelValue", "placeholder"])]), c(ae, {
|
|
361
362
|
class: "xs:hidden block"
|
|
362
363
|
}, {
|
|
363
|
-
default: m(() => [c(
|
|
364
|
+
default: m(() => [c(w, {
|
|
364
365
|
"column-defs": M.value,
|
|
365
|
-
loading:
|
|
366
|
+
loading: k.value,
|
|
366
367
|
"page-size": b.value.length,
|
|
367
368
|
"row-data": b.value,
|
|
368
|
-
"search-value":
|
|
369
|
+
"search-value": F.value,
|
|
369
370
|
shrinkAt: !1,
|
|
370
371
|
"hide-footer": "",
|
|
371
372
|
"pin-header-row": "",
|
|
372
|
-
onRowClick: o[1] || (o[1] = (d) =>
|
|
373
|
+
onRowClick: o[1] || (o[1] = (d) => V(d.original))
|
|
373
374
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
374
375
|
_: 1
|
|
375
376
|
}), c(a, {
|
|
376
377
|
class: "w-full px-16 xs:block hidden flex-1 min-h-0 overflow-scroll pb-64",
|
|
377
378
|
separator: ""
|
|
378
379
|
}, {
|
|
379
|
-
default: m(() => [(p(!0), L(A, null,
|
|
380
|
+
default: m(() => [(p(!0), L(A, null, B(K.value, (d) => (p(), P(r, {
|
|
380
381
|
key: d._id,
|
|
381
382
|
label: d.name,
|
|
382
383
|
style: {
|
|
383
384
|
padding: "12px 0 !important"
|
|
384
385
|
},
|
|
385
|
-
onClick: () =>
|
|
386
|
+
onClick: () => V(d)
|
|
386
387
|
}, {
|
|
387
388
|
default: m(() => [i("div", Pe, [i("div", Se, S(d.name), 1), i("div", Le, S(l(t)("menu.print_route.table.mobile.products_linked", {
|
|
388
389
|
count: d.applyToItems.length
|
|
389
|
-
})), 1)]), c(
|
|
390
|
-
disabled:
|
|
390
|
+
})), 1)]), c(E, {
|
|
391
|
+
disabled: k.value,
|
|
391
392
|
icon: "delete",
|
|
392
393
|
variant: "tertiary",
|
|
393
394
|
"text-color": "neutral-gray-400",
|
|
@@ -396,17 +397,17 @@ const Ee = {
|
|
|
396
397
|
_: 2
|
|
397
398
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
398
399
|
_: 1
|
|
399
|
-
})], 64)) : (p(), P(l(
|
|
400
|
+
})], 64)) : (p(), P(l(ce), {
|
|
400
401
|
key: 0,
|
|
401
402
|
action: {
|
|
402
403
|
text: l(t)("menu.print_route.empty.action"),
|
|
403
|
-
callback:
|
|
404
|
+
callback: z
|
|
404
405
|
},
|
|
405
406
|
subtitle: l(t)("menu.print_route.empty.subtitle"),
|
|
406
407
|
title: l(t)("menu.print_route.empty.title")
|
|
407
408
|
}, null, 8, ["action", "subtitle", "title"])), c(Ie, {
|
|
408
409
|
ref_key: "printDepartmentRef",
|
|
409
|
-
ref:
|
|
410
|
+
ref: U,
|
|
410
411
|
"categorized-items": N.value,
|
|
411
412
|
onOnSave: $
|
|
412
413
|
}, null, 8, ["categorized-items"])]),
|