@feedmepos/mf-menu 0.32.17 → 0.32.18-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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as q, renderList as Y, createCommentVNode as B, toDisplayString as A, withModifiers as oe } from "vue";
|
|
2
|
-
import { u as Z,
|
|
3
|
-
import { useI18n as ee, useCoreStore as
|
|
4
|
-
import { components as te, FmButtonVariant as N, useDialog as
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
-
import { C as z, a as M } from "./catalogSetting-BHgsBDTl.js";
|
|
10
|
-
import { u as ge } from "./priceTier-Beavb91W.js";
|
|
2
|
+
import { u as Z, a2 as ae, a3 as E, n as K, F as re, G as Q, a4 as ie, _ as ce, a5 as me, a6 as P, a as ne, i as de, a7 as pe, c as le } from "./App-Cfl37TTw.js";
|
|
3
|
+
import { useI18n as ee, useCoreStore as _e } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as te, FmButtonVariant as N, useDialog as ve, useSnackbar as ue, useBreakpoints as fe, FmButtonColorThemeVariant as W } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as se } from "./app-Z0KWH9-d.js";
|
|
6
|
+
import { _ as ge } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { C as z, a as I } from "./catalogSetting-Bf66H-j7.js";
|
|
11
8
|
const be = {
|
|
12
9
|
class: "fm-typo-en-title-md-600 mr-auto"
|
|
13
10
|
}, ye = {
|
|
@@ -34,10 +31,10 @@ const be = {
|
|
|
34
31
|
editingGroup: {}
|
|
35
32
|
},
|
|
36
33
|
emits: ["update:modelValue", "submit"],
|
|
37
|
-
setup(
|
|
34
|
+
setup(H, {
|
|
38
35
|
emit: n
|
|
39
36
|
}) {
|
|
40
|
-
const x =
|
|
37
|
+
const x = H, G = n, {
|
|
41
38
|
t: i
|
|
42
39
|
} = ee(), T = Z(), l = C({
|
|
43
40
|
name: "",
|
|
@@ -46,13 +43,13 @@ const be = {
|
|
|
46
43
|
}), {
|
|
47
44
|
convertCategoryIdToName: b,
|
|
48
45
|
convertCategoryNameToId: R
|
|
49
|
-
} =
|
|
46
|
+
} = ae({
|
|
50
47
|
menuItems: $(() => T.state.menu.modules.item || []),
|
|
51
48
|
categories: $(() => T.categories || [])
|
|
52
49
|
}), m = $({
|
|
53
50
|
get: () => x.modelValue,
|
|
54
51
|
set: (s) => G("update:modelValue", s)
|
|
55
|
-
}),
|
|
52
|
+
}), F = C(null);
|
|
56
53
|
j(() => x.editingGroup, (s) => {
|
|
57
54
|
s ? l.value = {
|
|
58
55
|
name: s.name,
|
|
@@ -72,7 +69,7 @@ const be = {
|
|
|
72
69
|
name: "",
|
|
73
70
|
description: "",
|
|
74
71
|
rules: []
|
|
75
|
-
},
|
|
72
|
+
}, F.value = K.cloneDeep(l.value);
|
|
76
73
|
}, {
|
|
77
74
|
immediate: !0
|
|
78
75
|
}), j(() => x.modelValue, (s) => {
|
|
@@ -119,10 +116,10 @@ const be = {
|
|
|
119
116
|
function D(s) {
|
|
120
117
|
l.value.rules = l.value.rules.filter((e) => e._id !== s);
|
|
121
118
|
}
|
|
122
|
-
function
|
|
119
|
+
function M() {
|
|
123
120
|
m.value = !1;
|
|
124
121
|
}
|
|
125
|
-
const v =
|
|
122
|
+
const v = re(() => !K.isEqual(F.value, l.value), () => {
|
|
126
123
|
m.value = !1;
|
|
127
124
|
});
|
|
128
125
|
function c(s) {
|
|
@@ -132,7 +129,7 @@ const be = {
|
|
|
132
129
|
}
|
|
133
130
|
const p = C();
|
|
134
131
|
return (s, e) => {
|
|
135
|
-
const a = g("fm-button"), _ = g("FmTextField"), k = g("FmButton"),
|
|
132
|
+
const a = g("fm-button"), _ = g("FmTextField"), k = g("FmButton"), V = g("FmFormGroup"), f = g("fm-side-sheet");
|
|
136
133
|
return d(), L(f, {
|
|
137
134
|
modelValue: m.value,
|
|
138
135
|
"onUpdate:modelValue": e[6] || (e[6] = (o) => m.value = o),
|
|
@@ -159,7 +156,7 @@ const be = {
|
|
|
159
156
|
label: t(i)("common.cancel"),
|
|
160
157
|
size: "lg",
|
|
161
158
|
variant: "tertiary",
|
|
162
|
-
onClick:
|
|
159
|
+
onClick: M
|
|
163
160
|
}, null, 8, ["label"])])]),
|
|
164
161
|
default: y(() => [r("div", ye, [u(Q, {
|
|
165
162
|
title: t(i)("menu.rule_groups.form.basic_info")
|
|
@@ -182,7 +179,7 @@ const be = {
|
|
|
182
179
|
rows: 3
|
|
183
180
|
}, null, 8, ["label", "modelValue", "placeholder"])])]),
|
|
184
181
|
_: 1
|
|
185
|
-
}, 8, ["title"]), u(
|
|
182
|
+
}, 8, ["title"]), u(V, {
|
|
186
183
|
tag: "div",
|
|
187
184
|
"model-value": l.value.rules,
|
|
188
185
|
rules: [(o) => o.length > 0 || t(i)("menu.rule_groups.validation.at_least_one_rule_required")]
|
|
@@ -195,12 +192,12 @@ const be = {
|
|
|
195
192
|
key: 0
|
|
196
193
|
}, Y(l.value.rules, (o, O) => (d(), h(q, {
|
|
197
194
|
key: O
|
|
198
|
-
}, [r("div", xe, [r("div", ke, [u(
|
|
195
|
+
}, [r("div", xe, [r("div", ke, [u(ie, {
|
|
199
196
|
"model-value": o,
|
|
200
197
|
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${O + 1}`,
|
|
201
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
202
|
-
onDeleteRule: e[4] || (e[4] = (
|
|
203
|
-
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 && O < l.value.rules.length - 1 ? (d(), h("div", Se, [r("span", we, A(t(i)("menu.rule_groups.condition_view.or")), 1)])) : B("", !0)], 64))), 128)) : (d(), L(
|
|
198
|
+
"onUpdate:modelValue": e[3] || (e[3] = (J) => c(J)),
|
|
199
|
+
onDeleteRule: e[4] || (e[4] = (J) => D(J))
|
|
200
|
+
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 && O < l.value.rules.length - 1 ? (d(), h("div", Se, [r("span", we, A(t(i)("menu.rule_groups.condition_view.or")), 1)])) : B("", !0)], 64))), 128)) : (d(), L(ce, {
|
|
204
201
|
key: 1,
|
|
205
202
|
title: "",
|
|
206
203
|
subtitle: t(i)("menu.rule_groups.condition_view.empty_data.no_rule_available"),
|
|
@@ -211,7 +208,7 @@ const be = {
|
|
|
211
208
|
(o = p.value) == null || o.trigger();
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
|
-
}, null, 8, ["subtitle", "action"])), r("div", null, [u(
|
|
211
|
+
}, null, 8, ["subtitle", "action"])), r("div", null, [u(me, {
|
|
215
212
|
ref_key: "ruleFormRef",
|
|
216
213
|
ref: p,
|
|
217
214
|
"is-edit-mode": !0,
|
|
@@ -240,9 +237,9 @@ const be = {
|
|
|
240
237
|
}), Re = {
|
|
241
238
|
key: 0,
|
|
242
239
|
class: "space-y-8"
|
|
243
|
-
}, Ve = {
|
|
244
|
-
class: "flex items-center justify-between"
|
|
245
240
|
}, Fe = {
|
|
241
|
+
class: "flex items-center justify-between"
|
|
242
|
+
}, Ve = {
|
|
246
243
|
class: "fm-typo-en-title-md-600"
|
|
247
244
|
}, Ae = {
|
|
248
245
|
class: "text-fm-color-typo-secondary"
|
|
@@ -253,9 +250,9 @@ const be = {
|
|
|
253
250
|
}, Ue = {
|
|
254
251
|
key: 1,
|
|
255
252
|
class: "flex-1 flex flex-col min-h-0"
|
|
256
|
-
}, Ie = {
|
|
257
|
-
class: "flex items-center justify-between p-8"
|
|
258
253
|
}, Me = {
|
|
254
|
+
class: "flex items-center justify-between p-8"
|
|
255
|
+
}, Ie = {
|
|
259
256
|
class: "flex-1 mr-8"
|
|
260
257
|
}, Be = {
|
|
261
258
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
@@ -268,10 +265,10 @@ const be = {
|
|
|
268
265
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
269
266
|
}, Le = /* @__PURE__ */ X({
|
|
270
267
|
__name: "LinkProductRuleGroups",
|
|
271
|
-
setup(
|
|
268
|
+
setup(H) {
|
|
272
269
|
const {
|
|
273
270
|
t: n
|
|
274
|
-
} = ee(), x =
|
|
271
|
+
} = ee(), x = ve(), G = ue(), i = ne(G), T = Z(), l = C(T.state.menu.ruleGroupSettings || {
|
|
275
272
|
groups: []
|
|
276
273
|
});
|
|
277
274
|
j(() => T.state.menu.ruleGroupSettings, (e) => {
|
|
@@ -281,7 +278,7 @@ const be = {
|
|
|
281
278
|
}, {
|
|
282
279
|
deep: !0
|
|
283
280
|
});
|
|
284
|
-
const b = C(!1), R = C(null), m =
|
|
281
|
+
const b = C(!1), R = C(null), m = fe(), F = $(() => m.breakpoints.value.xs), S = C(""), U = $(() => l.value.groups.filter((e) => e.name.toLowerCase().includes(S.value.toLowerCase()))), w = [{
|
|
285
282
|
header: n("menu.rule_groups.table.columns.name"),
|
|
286
283
|
accessorKey: "name",
|
|
287
284
|
enableSorting: !0
|
|
@@ -306,7 +303,7 @@ const be = {
|
|
|
306
303
|
function D(e) {
|
|
307
304
|
v(e.original);
|
|
308
305
|
}
|
|
309
|
-
function
|
|
306
|
+
function M() {
|
|
310
307
|
R.value = null, b.value = !0;
|
|
311
308
|
}
|
|
312
309
|
function v(e) {
|
|
@@ -344,14 +341,14 @@ const be = {
|
|
|
344
341
|
}
|
|
345
342
|
async function s(e) {
|
|
346
343
|
var k;
|
|
347
|
-
const a = (k = l.value.groups) == null ? void 0 : k.findIndex((
|
|
344
|
+
const a = (k = l.value.groups) == null ? void 0 : k.findIndex((V) => V._id === e._id), _ = K.cloneDeep(l.value);
|
|
348
345
|
a >= 0 ? _.groups[a] = e : _.groups.push(e), await p(_), b.value = !1;
|
|
349
346
|
}
|
|
350
347
|
return j(() => b.value, (e) => {
|
|
351
348
|
e || (R.value = null);
|
|
352
349
|
}), (e, a) => {
|
|
353
|
-
const _ = g("FmButton"), k = g("FmSearch"),
|
|
354
|
-
return d(), h("div", null, [
|
|
350
|
+
const _ = g("FmButton"), k = g("FmSearch"), V = g("FmTable");
|
|
351
|
+
return d(), h("div", null, [F.value ? (d(), h("div", Ue, [r("div", Me, [r("div", Ie, [u(k, {
|
|
355
352
|
modelValue: S.value,
|
|
356
353
|
"onUpdate:modelValue": a[1] || (a[1] = (f) => S.value = f),
|
|
357
354
|
autofocus: "",
|
|
@@ -360,7 +357,7 @@ const be = {
|
|
|
360
357
|
}, null, 8, ["modelValue", "placeholder"])]), u(_, {
|
|
361
358
|
icon: "add",
|
|
362
359
|
variant: t(N).Secondary,
|
|
363
|
-
onClick:
|
|
360
|
+
onClick: M
|
|
364
361
|
}, null, 8, ["variant"])]), r("div", Be, [(d(!0), h(q, null, Y(U.value, (f) => (d(), h("div", {
|
|
365
362
|
key: f._id,
|
|
366
363
|
class: "flex flex-row py-12 px-16 cursor-pointer",
|
|
@@ -370,10 +367,10 @@ const be = {
|
|
|
370
367
|
variant: t(N).Tertiary,
|
|
371
368
|
icon: "delete",
|
|
372
369
|
onClick: oe((o) => c(f._id), ["stop"])
|
|
373
|
-
}, null, 8, ["text-color", "variant", "onClick"])], 8, Ne))), 128))])])) : (d(), h("div", Re, [r("div",
|
|
370
|
+
}, null, 8, ["text-color", "variant", "onClick"])], 8, Ne))), 128))])])) : (d(), h("div", Re, [r("div", Fe, [r("div", null, [r("h1", Ve, A(t(n)("menu.rule_groups.title")), 1), r("p", Ae, A(t(n)("menu.rule_groups.description")), 1)]), u(_, {
|
|
374
371
|
label: t(n)("menu.rule_groups.create_group"),
|
|
375
372
|
icon: "add",
|
|
376
|
-
onClick:
|
|
373
|
+
onClick: M
|
|
377
374
|
}, null, 8, ["label"])]), r("div", $e, [r("div", Ge, [u(k, {
|
|
378
375
|
modelValue: S.value,
|
|
379
376
|
"onUpdate:modelValue": a[0] || (a[0] = (f) => S.value = f),
|
|
@@ -381,7 +378,7 @@ const be = {
|
|
|
381
378
|
class: "mb-8",
|
|
382
379
|
placeholder: t(n)("menu.rule_groups.search_placeholder")
|
|
383
380
|
}, null, 8, ["modelValue", "placeholder"])])]), u(se, null, {
|
|
384
|
-
default: y(() => [u(
|
|
381
|
+
default: y(() => [u(V, {
|
|
385
382
|
"column-defs": w,
|
|
386
383
|
"row-data": U.value,
|
|
387
384
|
"page-size": U.value.length,
|
|
@@ -411,19 +408,19 @@ const be = {
|
|
|
411
408
|
class: "space-y-8"
|
|
412
409
|
}, Qe = {
|
|
413
410
|
class: "flex items-center justify-between"
|
|
414
|
-
}, Je = {
|
|
415
|
-
class: "fm-typo-en-title-md-600"
|
|
416
411
|
}, He = {
|
|
412
|
+
class: "fm-typo-en-title-md-600"
|
|
413
|
+
}, Je = {
|
|
417
414
|
class: "text-fm-color-typo-secondary"
|
|
418
415
|
}, We = {
|
|
419
416
|
key: 2
|
|
420
|
-
},
|
|
417
|
+
}, nt = /* @__PURE__ */ X({
|
|
421
418
|
__name: "MenuSetting",
|
|
422
|
-
setup(
|
|
423
|
-
var
|
|
419
|
+
setup(H) {
|
|
420
|
+
var M;
|
|
424
421
|
const {
|
|
425
422
|
t: n
|
|
426
|
-
} = ee(), x = Z(), G =
|
|
423
|
+
} = ee(), x = Z(), G = _e(), i = ue(), T = ne(i), l = $(() => ({
|
|
427
424
|
lowStock: x.state.menu.lowStockThreshold,
|
|
428
425
|
taxSetting: x.state.menu.masterCatalogSetting,
|
|
429
426
|
priceTierSettings: x.state.menu.priceTierSettings
|
|
@@ -436,15 +433,15 @@ const be = {
|
|
|
436
433
|
}, {
|
|
437
434
|
label: n("menu.menu_setting.tabs.link_product_rule_groups"),
|
|
438
435
|
value: "link-product-rule-groups"
|
|
439
|
-
}] : []]), m = C(z.transformTax((
|
|
436
|
+
}] : []]), m = C(z.transformTax((M = l.value.taxSetting) == null ? void 0 : M.inclusiveTaxes));
|
|
440
437
|
j(() => l.value, (v) => {
|
|
441
438
|
var c;
|
|
442
439
|
m.value = z.transformTax((c = v.taxSetting) == null ? void 0 : c.inclusiveTaxes);
|
|
443
440
|
});
|
|
444
|
-
const
|
|
441
|
+
const F = $(() => {
|
|
445
442
|
if (!G.currentCountry.value) return [];
|
|
446
|
-
const v = m.value.mode ===
|
|
447
|
-
return
|
|
443
|
+
const v = m.value.mode === I.MANUAL ? m.value.inclusive ?? [] : [];
|
|
444
|
+
return de.Country.getCountry(G.currentCountry.value).taxSystems.map((p) => {
|
|
448
445
|
const s = v.find((e) => e.systemCode === p.code);
|
|
449
446
|
return {
|
|
450
447
|
inclusive: (s == null ? void 0 : s.inclusive) || !1,
|
|
@@ -453,7 +450,7 @@ const be = {
|
|
|
453
450
|
});
|
|
454
451
|
});
|
|
455
452
|
function S(v) {
|
|
456
|
-
const c = m.value, p = c.mode ===
|
|
453
|
+
const c = m.value, p = c.mode === I.AUTO ? z.manualTax(F.value) : le(c);
|
|
457
454
|
p.inclusive ?? (p.inclusive = []);
|
|
458
455
|
const s = p.inclusive.findIndex((e) => e.systemCode === v.systemCode);
|
|
459
456
|
s < 0 ? p.inclusive.push(v) : p.inclusive.splice(s, 1, v), m.value = p;
|
|
@@ -461,7 +458,7 @@ const be = {
|
|
|
461
458
|
async function U() {
|
|
462
459
|
if (l.value.lowStock !== null && l.value.lowStock !== void 0 && !Number.isInteger(l.value.lowStock))
|
|
463
460
|
return;
|
|
464
|
-
const v = m.value.mode ===
|
|
461
|
+
const v = m.value.mode === I.AUTO ? null : le(m.value.inclusive);
|
|
465
462
|
await T.minor(async () => {
|
|
466
463
|
const c = l.value.lowStock === null || l.value.lowStock === void 0 || l.value.lowStock === 0;
|
|
467
464
|
await x.updateMenuSetting({
|
|
@@ -475,7 +472,7 @@ const be = {
|
|
|
475
472
|
successMessage: n("menu.menu_setting.fields.low_stock.updated")
|
|
476
473
|
});
|
|
477
474
|
}
|
|
478
|
-
const w =
|
|
475
|
+
const w = pe(), D = [{
|
|
479
476
|
header: n("menu.price_tier.settings_table.columns.name"),
|
|
480
477
|
accessorKey: "key",
|
|
481
478
|
enableSorting: !1
|
|
@@ -492,8 +489,8 @@ const be = {
|
|
|
492
489
|
}, null)])
|
|
493
490
|
}];
|
|
494
491
|
return (v, c) => {
|
|
495
|
-
const p = g("FmTabs"), s = g("fm-radio"), e = g("fm-radio-group"), a = g("fm-checkbox"), _ = g("FormItem"), k = g("FmStepperField"),
|
|
496
|
-
return d(), L(
|
|
492
|
+
const p = g("FmTabs"), s = g("fm-radio"), e = g("fm-radio-group"), a = g("fm-checkbox"), _ = g("FormItem"), k = g("FmStepperField"), V = g("FmButton"), f = g("FmTable");
|
|
493
|
+
return d(), L(ge, {
|
|
497
494
|
heading: t(n)("menu.menu_setting.title")
|
|
498
495
|
}, {
|
|
499
496
|
default: y(() => [u(p, {
|
|
@@ -509,20 +506,20 @@ const be = {
|
|
|
509
506
|
default: y(() => [u(e, {
|
|
510
507
|
"model-value": m.value.mode,
|
|
511
508
|
"onUpdate:modelValue": c[1] || (c[1] = (o) => {
|
|
512
|
-
o === t(
|
|
509
|
+
o === t(I).AUTO ? m.value = t(z).autoTax() : m.value = t(z).manualTax(F.value);
|
|
513
510
|
})
|
|
514
511
|
}, {
|
|
515
512
|
default: y(() => [u(s, {
|
|
516
|
-
value: t(
|
|
513
|
+
value: t(I).AUTO,
|
|
517
514
|
label: t(n)("menu.setting.tax.modes.auto.label"),
|
|
518
515
|
sublabel: t(n)("menu.setting.tax.modes.auto.sublabel")
|
|
519
516
|
}, null, 8, ["value", "label", "sublabel"]), u(s, {
|
|
520
|
-
value: t(
|
|
517
|
+
value: t(I).MANUAL,
|
|
521
518
|
label: t(n)("menu.setting.tax.modes.manual.label"),
|
|
522
519
|
sublabel: t(n)("menu.setting.tax.modes.manual.sublabel")
|
|
523
520
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
524
521
|
_: 1
|
|
525
|
-
}, 8, ["model-value"]), m.value.mode === t(
|
|
522
|
+
}, 8, ["model-value"]), m.value.mode === t(I).MANUAL ? (d(), h("div", Pe, [(d(!0), h(q, null, Y(F.value, (o) => (d(), L(a, {
|
|
526
523
|
key: o.systemCode,
|
|
527
524
|
"model-value": o.inclusive,
|
|
528
525
|
value: !0,
|
|
@@ -554,10 +551,10 @@ const be = {
|
|
|
554
551
|
"helper-text": t(n)("menu.menu_setting.fields.low_stock.helper_text")
|
|
555
552
|
}, null, 8, ["model-value", "placeholder", "rules", "helper-text"])]),
|
|
556
553
|
_: 1
|
|
557
|
-
}, 8, ["title", "sub-title"]), u(
|
|
554
|
+
}, 8, ["title", "sub-title"]), u(V, {
|
|
558
555
|
onClick: U,
|
|
559
556
|
label: t(n)("common.save")
|
|
560
|
-
}, null, 8, ["label"])])) : B("", !0), b.value === "price-group" ? (d(), h("div", qe, [r("div", Ke, [r("div", Qe, [r("div", null, [r("h1",
|
|
557
|
+
}, null, 8, ["label"])])) : B("", !0), b.value === "price-group" ? (d(), h("div", qe, [r("div", Ke, [r("div", Qe, [r("div", null, [r("h1", He, A(t(n)("menu.price_tier.price_group")), 1), r("p", Je, A(t(n)("menu.price_tier.description")), 1)]), u(V, {
|
|
561
558
|
label: t(n)("menu.price_tier.add_price_group"),
|
|
562
559
|
icon: "add",
|
|
563
560
|
onClick: t(w).create
|
|
@@ -576,5 +573,5 @@ const be = {
|
|
|
576
573
|
}
|
|
577
574
|
});
|
|
578
575
|
export {
|
|
579
|
-
|
|
576
|
+
nt as default
|
|
580
577
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { components as W, useSnackbar as te, useDialog as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as ae } from "./app-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js";
|
|
8
|
-
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { L as ce } from "./LinkProductSideSheet-DFDYEUBh.js";
|
|
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
|
+
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
|
+
import { components as W, useSnackbar as te, useDialog as ne } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as oe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { _ as ae } from "./app-Z0KWH9-d.js";
|
|
6
|
+
import { c as j, F as le, G, L as re, n as se, m as Y, e as C, u as ie, d as ue, a as de, _ as ce } from "./App-Cfl37TTw.js";
|
|
10
7
|
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
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__ */
|
|
8
|
+
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({
|
|
12
9
|
__name: "PrintDepartmentDialog",
|
|
13
10
|
props: {
|
|
14
11
|
categorizedItems: {
|
|
@@ -36,27 +33,27 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
36
33
|
}
|
|
37
34
|
const x = T(!1), M = T(void 0);
|
|
38
35
|
function z(r) {
|
|
39
|
-
M.value = r ? j(r) : b(),
|
|
36
|
+
M.value = r ? j(r) : b(), o.value = j(M.value), x.value = !0;
|
|
40
37
|
}
|
|
41
38
|
function V() {
|
|
42
39
|
x.value = !1;
|
|
43
40
|
}
|
|
44
|
-
const
|
|
41
|
+
const o = T(b());
|
|
45
42
|
function k({ items: r }) {
|
|
46
|
-
|
|
47
|
-
...
|
|
43
|
+
o.value = {
|
|
44
|
+
...o.value,
|
|
48
45
|
applyToItems: r.map((a) => a._id)
|
|
49
46
|
};
|
|
50
47
|
}
|
|
51
48
|
function $(r) {
|
|
52
|
-
|
|
53
|
-
...
|
|
54
|
-
applyToItems:
|
|
49
|
+
o.value = {
|
|
50
|
+
...o.value,
|
|
51
|
+
applyToItems: o.value.applyToItems.filter((a) => a !== r)
|
|
55
52
|
};
|
|
56
53
|
}
|
|
57
|
-
const { t: u } =
|
|
58
|
-
() =>
|
|
59
|
-
), e = T(""),
|
|
54
|
+
const { t: u } = Q(), O = f(() => o.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")), F = f(() => o.value._id ? u("menu.print_route.department_dialog.update.action") : u("menu.print_route.department_dialog.add.action")), U = f(() => o.value.applyToItems.length), K = f(
|
|
55
|
+
() => o.value.applyToItems.reduce((r, a) => (r[a] = [], r), {})
|
|
56
|
+
), e = T(""), n = f(() => {
|
|
60
57
|
const r = e.value.toLowerCase();
|
|
61
58
|
return N.categorizedItems.reduce((a, d) => {
|
|
62
59
|
const D = d.items.filter(
|
|
@@ -64,14 +61,14 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
64
61
|
);
|
|
65
62
|
return D.length && a.push({ ...d, items: D }), a;
|
|
66
63
|
}, []);
|
|
67
|
-
}), y = h, w =
|
|
68
|
-
() => !
|
|
64
|
+
}), y = h, w = le(
|
|
65
|
+
() => !se.isEqual(M.value, o.value),
|
|
69
66
|
() => {
|
|
70
67
|
x.value = !1;
|
|
71
68
|
}
|
|
72
69
|
);
|
|
73
70
|
function E() {
|
|
74
|
-
V(), y("onSave",
|
|
71
|
+
V(), y("onSave", o.value);
|
|
75
72
|
}
|
|
76
73
|
return (r, a) => {
|
|
77
74
|
const d = g("FmTextField"), D = g("FmSpacer"), I = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
|
|
@@ -115,8 +112,8 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
115
112
|
default: m(() => [
|
|
116
113
|
c(d, {
|
|
117
114
|
autofocus: "",
|
|
118
|
-
modelValue:
|
|
119
|
-
"onUpdate:modelValue": a[0] || (a[0] = (s) =>
|
|
115
|
+
modelValue: o.value.name,
|
|
116
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.value.name = s),
|
|
120
117
|
rules: [
|
|
121
118
|
(s) => !!s || l(u)("menu.print_route.department_dialog.sections.route_detail.name.required")
|
|
122
119
|
],
|
|
@@ -132,9 +129,9 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
132
129
|
}, {
|
|
133
130
|
"append-title": m(() => [
|
|
134
131
|
c(D),
|
|
135
|
-
c(
|
|
132
|
+
c(re, {
|
|
136
133
|
"categorized-items": v.categorizedItems,
|
|
137
|
-
"initial-value":
|
|
134
|
+
"initial-value": o.value.applyToItems.map((s) => ({
|
|
138
135
|
_id: s
|
|
139
136
|
})),
|
|
140
137
|
onSubmit: a[1] || (a[1] = (s) => k(s))
|
|
@@ -167,7 +164,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
167
164
|
])
|
|
168
165
|
]),
|
|
169
166
|
i("div", he, [
|
|
170
|
-
(p(!0), L(A, null, B(
|
|
167
|
+
(p(!0), L(A, null, B(n.value, (s, ee) => (p(), L("div", {
|
|
171
168
|
key: s.id || ee
|
|
172
169
|
}, [
|
|
173
170
|
i("div", be, S(s.name), 1),
|
|
@@ -190,7 +187,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
190
187
|
])
|
|
191
188
|
]),
|
|
192
189
|
_: 1
|
|
193
|
-
}, 8, ["title"])) :
|
|
190
|
+
}, 8, ["title"])) : J("", !0)
|
|
194
191
|
])
|
|
195
192
|
]),
|
|
196
193
|
_: 1
|
|
@@ -237,12 +234,12 @@ const Ee = {
|
|
|
237
234
|
class: "fm-typo-en-body-lg-600"
|
|
238
235
|
}, Le = {
|
|
239
236
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
240
|
-
},
|
|
237
|
+
}, $e = /* @__PURE__ */ H({
|
|
241
238
|
__name: "PrintRoute",
|
|
242
239
|
setup(v) {
|
|
243
240
|
const {
|
|
244
241
|
t
|
|
245
|
-
} =
|
|
242
|
+
} = Q(), h = ie(), N = f(() => h.categorizedItems), b = f(() => {
|
|
246
243
|
const e = h.state.menu.modules.item;
|
|
247
244
|
return h.printDepartments.map((y) => ({
|
|
248
245
|
...y,
|
|
@@ -260,9 +257,9 @@ const Ee = {
|
|
|
260
257
|
accessorKey: "applyToItems",
|
|
261
258
|
header: () => t("menu.print_route.table.columns.products"),
|
|
262
259
|
cell: (e) => {
|
|
263
|
-
const
|
|
260
|
+
const n = e.getValue();
|
|
264
261
|
return t("menu.print_route.table.columns.products_count", {
|
|
265
|
-
count:
|
|
262
|
+
count: n.length
|
|
266
263
|
});
|
|
267
264
|
},
|
|
268
265
|
enableSorting: !1
|
|
@@ -291,33 +288,33 @@ const Ee = {
|
|
|
291
288
|
k.value || (e = U.value) == null || e.showModal();
|
|
292
289
|
}
|
|
293
290
|
function V(e) {
|
|
294
|
-
var
|
|
295
|
-
k.value || (
|
|
291
|
+
var n;
|
|
292
|
+
k.value || (n = U.value) == null || n.showModal({
|
|
296
293
|
...e,
|
|
297
294
|
applyToItems: e.applyToItems.map(({
|
|
298
295
|
_id: y
|
|
299
296
|
}) => y)
|
|
300
297
|
});
|
|
301
298
|
}
|
|
302
|
-
const
|
|
299
|
+
const o = ue(de(te())), k = f(() => o.checkMenuIsLoading());
|
|
303
300
|
async function $(e) {
|
|
304
|
-
const
|
|
305
|
-
await
|
|
301
|
+
const n = e._id ? Ve(e, e.applyToItems) : Ce(e, e.applyToItems);
|
|
302
|
+
await o.updateMenu(n, e.name);
|
|
306
303
|
}
|
|
307
|
-
const u =
|
|
304
|
+
const u = ne();
|
|
308
305
|
function O(e) {
|
|
309
|
-
let
|
|
306
|
+
let n = [_("span", t("menu.print_route.dialogs.remove.message.prefix")), _("span", {
|
|
310
307
|
class: "fm-typo-en-body-lg-600"
|
|
311
308
|
}, e.name), _("span", "?")];
|
|
312
|
-
e.applyToItems.length && (
|
|
309
|
+
e.applyToItems.length && (n = [_("span", t("menu.print_route.dialogs.remove.message.products_using")), _("span", {
|
|
313
310
|
class: "fm-typo-en-body-lg-600"
|
|
314
|
-
}, e.applyToItems.length), _("span", t("menu.print_route.dialogs.remove.message.products_count")), ...
|
|
311
|
+
}, e.applyToItems.length), _("span", t("menu.print_route.dialogs.remove.message.products_count")), ...n, _("div", {
|
|
315
312
|
class: "mt-8 fm-typo-en-body-md-400"
|
|
316
313
|
}, e.applyToItems.map((y) => _("li", {
|
|
317
314
|
class: "mt-4"
|
|
318
315
|
}, y.name)))]), u.open({
|
|
319
316
|
title: t("menu.print_route.dialogs.remove.title"),
|
|
320
|
-
contentComponent: _("div",
|
|
317
|
+
contentComponent: _("div", n),
|
|
321
318
|
primaryActions: {
|
|
322
319
|
text: t("menu.print_route.actions.remove"),
|
|
323
320
|
close: !0,
|
|
@@ -328,33 +325,33 @@ const Ee = {
|
|
|
328
325
|
close: !0
|
|
329
326
|
}
|
|
330
327
|
}).onPrimary(async () => {
|
|
331
|
-
await
|
|
328
|
+
await o.updateMenu(we(e), e.name, !0);
|
|
332
329
|
});
|
|
333
330
|
}
|
|
334
331
|
const F = T(""), U = T(), K = f(() => {
|
|
335
332
|
if (!F.value) return b.value;
|
|
336
333
|
const e = F.value.toLowerCase();
|
|
337
|
-
return b.value.filter((
|
|
334
|
+
return b.value.filter((n) => n.name.toLowerCase().includes(e));
|
|
338
335
|
});
|
|
339
|
-
return (e,
|
|
336
|
+
return (e, n) => {
|
|
340
337
|
const y = g("FmSearch"), w = g("FmTable"), E = g("FmButton"), r = g("FmListItem"), a = g("FmList");
|
|
341
338
|
return p(), P(me, {
|
|
342
339
|
heading: l(t)("menu.print_route.title")
|
|
343
340
|
}, {
|
|
344
|
-
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(
|
|
341
|
+
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(oe, {
|
|
345
342
|
key: 0,
|
|
346
343
|
disabled: k.value,
|
|
347
344
|
icon: "add",
|
|
348
345
|
label: l(t)("menu.print_route.actions.add"),
|
|
349
346
|
variant: "primary",
|
|
350
347
|
onClick: z
|
|
351
|
-
}, null, 8, ["disabled", "label"])) :
|
|
348
|
+
}, null, 8, ["disabled", "label"])) : J("", !0)])]),
|
|
352
349
|
default: m(() => [x.value ? (p(), L(A, {
|
|
353
350
|
key: 1
|
|
354
351
|
}, [i("div", Te, [c(y, {
|
|
355
352
|
autofocus: "",
|
|
356
353
|
modelValue: F.value,
|
|
357
|
-
"onUpdate:modelValue":
|
|
354
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => F.value = d),
|
|
358
355
|
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
359
356
|
placeholder: l(t)("menu.print_route.table.search.placeholder")
|
|
360
357
|
}, null, 8, ["modelValue", "placeholder"])]), c(ae, {
|
|
@@ -369,7 +366,7 @@ const Ee = {
|
|
|
369
366
|
shrinkAt: !1,
|
|
370
367
|
"hide-footer": "",
|
|
371
368
|
"pin-header-row": "",
|
|
372
|
-
onRowClick:
|
|
369
|
+
onRowClick: n[1] || (n[1] = (d) => V(d.original))
|
|
373
370
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
374
371
|
_: 1
|
|
375
372
|
}), c(a, {
|
|
@@ -396,7 +393,7 @@ const Ee = {
|
|
|
396
393
|
_: 2
|
|
397
394
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
398
395
|
_: 1
|
|
399
|
-
})], 64)) : (p(), P(l(
|
|
396
|
+
})], 64)) : (p(), P(l(ce), {
|
|
400
397
|
key: 0,
|
|
401
398
|
action: {
|
|
402
399
|
text: l(t)("menu.print_route.empty.action"),
|
|
@@ -416,5 +413,5 @@ const Ee = {
|
|
|
416
413
|
}
|
|
417
414
|
});
|
|
418
415
|
export {
|
|
419
|
-
|
|
416
|
+
$e as default
|
|
420
417
|
};
|