@feedmepos/mf-menu 0.32.41-dev → 0.32.41-dev.2
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-BBcgfTlG.js → App-mCGGnjeS.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-OrSFDz8s.js → ApplyProduct.vue_vue_type_script_setup_true_lang-MWoYiClD.js} +3 -3
- package/dist/{Catalog-16-XsXPU.js → Catalog-CM2wnQ4l.js} +44 -44
- package/dist/{Category-CTntkYfO.js → Category-Bp9tGWwJ.js} +24 -24
- package/dist/{Category-CZGmamNx.js → Category-bsL9IQ5n.js} +24 -24
- package/dist/{CookingGuide-DbMIe9_K.js → CookingGuide-Cy0Kt6Ys.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-KbbZAmIv.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CX4s7NYy.js} +1 -1
- package/dist/{Group-DIIuJACV.js → Group-0hMArGNs.js} +1 -1
- package/dist/{Group-BZd7YYFK.js → Group-BKFZMvZg.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BrjgJ3NE.js → Group.vue_vue_type_script_setup_true_lang-st4plK2R.js} +18 -18
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DxjmWrLI.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-8zW2KIMn.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DOaMHGe_.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-UhuYuL-A.js} +2986 -2985
- package/dist/{Ingredient-Bmt5K9iD.js → Ingredient-CvE0xujL.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-GsuKEhFQ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-iEhZ4_5G.js} +2 -2
- package/dist/{LinkProductSideSheet-bUXGmrKI.js → LinkProductSideSheet-CbppLDSB.js} +45 -45
- package/dist/{MenuSetting-BX0ptcTg.js → MenuSetting-CQ9HnQKx.js} +47 -47
- package/dist/{PrintRoute-Diwh3HTz.js → PrintRoute-Cc81zV6Q.js} +39 -39
- package/dist/{Product-Dujeig8N.js → Product-kFoTn7zI.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CYkZCser.js → Product.vue_vue_type_script_setup_true_lang-BVF9SBEL.js} +128 -128
- package/dist/{ProductInternalTools-klTjOQCE.js → ProductInternalTools-CwxPRqTy.js} +66 -66
- package/dist/Products-IBe-R8XN.js +334 -0
- package/dist/{Publish-NZPrvmyi.js → Publish-BE-PPNO8.js} +29 -29
- package/dist/{Recipe-Dlw0C6gW.js → Recipe-Ddts2It2.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CYx6T762.js → RuleView.vue_vue_type_script_setup_true_lang-DQjE4JRi.js} +295 -295
- package/dist/{Scheduler-DsQdgoLu.js → Scheduler-CqP0Ha2K.js} +11 -11
- package/dist/{ServingSequence-B9z8EaGP.js → ServingSequence-WpneAUiB.js} +44 -44
- package/dist/{Setting-ec0DdRF7.js → Setting-CNGZaUUT.js} +17 -17
- package/dist/{Subcategory-ChpQhSVG.js → Subcategory-BVN0OH_q.js} +51 -51
- package/dist/{Takeaway-D3FlVQp7.js → Takeaway-BtnGTcvW.js} +1 -1
- package/dist/{Takeaway-D4DEkAmo.js → Takeaway-LFslRotB.js} +13 -13
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DSao2Kxm.js → Takeaway.vue_vue_type_script_setup_true_lang-CJZfd5JB.js} +28 -28
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Deu4-qaj.js → Thumbnail.vue_vue_type_script_setup_true_lang-CI8eK98T.js} +27 -27
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Dglm0-9O.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CfA400oN.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DVJb9jBY.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-SNBrW4Or.js} +12 -12
- package/dist/{Unit-odR08MnE.js → Unit-kL0Wjfb6.js} +8 -8
- package/dist/{Variant-4KiJoM6w.js → Variant-Cj82yGYE.js} +24 -24
- package/dist/{_id_-Catkkx7h.js → _id_-B-guZ25K.js} +28 -28
- package/dist/app-D4se7Sr4.js +1643 -0
- package/dist/{app-Ba81wWHP.js → app-DiVDYcc9.js} +1 -1
- package/dist/app.js +2 -2
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-pcUpPyqX.js → linked-status-C4nECq-3.js} +2 -2
- package/dist/assets/{menu-export-jKixYJMZ.js → menu-export-PPICN1VA.js} +2 -2
- package/dist/assets/{override-menu-B7PRcoFy.js → override-menu-BaYdZfDk.js} +2 -2
- package/dist/assets/{validate-menu-BP-GZf3a.js → validate-menu-DCyVSa7R.js} +2 -2
- package/dist/{catalog-DzVVQnuB.js → catalog-BTsgJdVe.js} +1 -1
- package/dist/{catalogSetting-CVpP5Ffj.js → catalogSetting-BNYPChMH.js} +1 -1
- package/dist/{currency-BvFATAPr.js → currency-2KuoTCt5.js} +1 -1
- package/dist/dayjs.min-BE8PtbAQ.js +7 -0
- package/dist/{index-DX-MOpoZ.js → index-GaHNc4iH.js} +43 -43
- package/dist/{index-BxTVwMqI.js → index-UthDVOpX.js} +31 -31
- package/dist/{index-CLbcP_tB.js → index-fLVJt8Pt.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-kAgODQk6.js → index.vue_vue_type_script_setup_true_lang-CsnEYmWv.js} +242 -267
- package/dist/{item-DybTsHw-.js → item-DYsNPLH9.js} +14 -14
- package/dist/{jszip.min-BqfTPXF5.js → jszip.min-CLQSAAHL.js} +388 -387
- package/dist/{menu-DM97MTPH.js → menu-Btb1sPTh.js} +1 -1
- package/dist/{menuV2-MAWvzZYI.js → menuV2-Bfj5ljzI.js} +71 -71
- package/dist/{priceTier-DtbwffZ8.js → priceTier-DHp_DiBo.js} +1 -1
- package/dist/{rules-DjL44XM2.js → rules-B5QEx6OC.js} +11 -11
- package/dist/{scheduler-DdfAPCOy.js → scheduler-CI-LJfho.js} +29 -29
- package/dist/{toExcel-Bj7g8zi5.js → toExcel-CHdQxEnw.js} +2 -2
- package/dist/{unit-SsjSaoZy.js → unit-D53f5n16.js} +35 -35
- package/package.json +2 -1
- package/dist/Products-DrWglbo9.js +0 -291
- package/dist/app-DmWoLe5_.js +0 -363
- package/dist/dayjs.min-BdQPTGQm.js +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
2
|
-
import { u as Z,
|
|
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 I, toDisplayString as A, withModifiers as oe } from "vue";
|
|
2
|
+
import { u as Z, H as K, a2 as ae, B as ne, z as re, G as le } from "./index.vue_vue_type_script_setup_true_lang-CsnEYmWv.js";
|
|
3
3
|
import { useI18n as ee, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as te, FmButtonVariant as N, useDialog as ce, useSnackbar as ue, useBreakpoints as me, FmButtonColorThemeVariant as W } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as se } from "./app-
|
|
5
|
+
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-DQjE4JRi.js";
|
|
6
|
+
import { _ as se } from "./app-D4se7Sr4.js";
|
|
7
7
|
import { u as ve } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
-
import { C as
|
|
10
|
-
import { u as ge } from "./priceTier-
|
|
9
|
+
import { C as O, a as B } from "./catalogSetting-BNYPChMH.js";
|
|
10
|
+
import { u as ge } from "./priceTier-DHp_DiBo.js";
|
|
11
11
|
const be = {
|
|
12
12
|
class: "fm-typo-en-title-md-600 mr-auto"
|
|
13
13
|
}, ye = {
|
|
@@ -34,10 +34,10 @@ const be = {
|
|
|
34
34
|
editingGroup: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "submit"],
|
|
37
|
-
setup(
|
|
37
|
+
setup(H, {
|
|
38
38
|
emit: n
|
|
39
39
|
}) {
|
|
40
|
-
const x =
|
|
40
|
+
const x = H, G = n, {
|
|
41
41
|
t: i
|
|
42
42
|
} = ee(), T = Z(), l = C({
|
|
43
43
|
name: "",
|
|
@@ -119,7 +119,7 @@ const be = {
|
|
|
119
119
|
function D(s) {
|
|
120
120
|
l.value.rules = l.value.rules.filter((e) => e._id !== s);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function M() {
|
|
123
123
|
m.value = !1;
|
|
124
124
|
}
|
|
125
125
|
const v = ve(() => !K.isEqual(V.value, l.value), () => {
|
|
@@ -159,7 +159,7 @@ const be = {
|
|
|
159
159
|
label: t(i)("common.cancel"),
|
|
160
160
|
size: "lg",
|
|
161
161
|
variant: "tertiary",
|
|
162
|
-
onClick:
|
|
162
|
+
onClick: M
|
|
163
163
|
}, null, 8, ["label"])])]),
|
|
164
164
|
default: y(() => [r("div", ye, [u(Q, {
|
|
165
165
|
title: t(i)("menu.rule_groups.form.basic_info")
|
|
@@ -193,14 +193,14 @@ const be = {
|
|
|
193
193
|
}, {
|
|
194
194
|
default: y(() => [l.value.rules.length > 0 ? (d(!0), h(q, {
|
|
195
195
|
key: 0
|
|
196
|
-
}, Y(l.value.rules, (o,
|
|
197
|
-
key:
|
|
196
|
+
}, Y(l.value.rules, (o, z) => (d(), h(q, {
|
|
197
|
+
key: z
|
|
198
198
|
}, [r("div", xe, [r("div", ke, [u(pe, {
|
|
199
199
|
"model-value": o,
|
|
200
|
-
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${
|
|
201
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
202
|
-
onDeleteRule: e[4] || (e[4] = (
|
|
203
|
-
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 &&
|
|
200
|
+
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${z + 1}`,
|
|
201
|
+
"onUpdate:modelValue": e[3] || (e[3] = (J) => c(J)),
|
|
202
|
+
onDeleteRule: e[4] || (e[4] = (J) => D(J))
|
|
203
|
+
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 && z < l.value.rules.length - 1 ? (d(), h("div", Se, [r("span", we, A(t(i)("menu.rule_groups.condition_view.or")), 1)])) : I("", !0)], 64))), 128)) : (d(), L(ae, {
|
|
204
204
|
key: 1,
|
|
205
205
|
title: "",
|
|
206
206
|
subtitle: t(i)("menu.rule_groups.condition_view.empty_data.no_rule_available"),
|
|
@@ -226,7 +226,7 @@ const be = {
|
|
|
226
226
|
label: t(i)("menu.link_product.rules.add_rule"),
|
|
227
227
|
"prepend-icon": "add",
|
|
228
228
|
onClick: oe(o, ["stop"])
|
|
229
|
-
}, null, 8, ["variant", "label", "onClick"])) :
|
|
229
|
+
}, null, 8, ["variant", "label", "onClick"])) : I("", !0)]),
|
|
230
230
|
_: 1
|
|
231
231
|
}, 8, ["model-value"])])]),
|
|
232
232
|
_: 1
|
|
@@ -253,22 +253,22 @@ const be = {
|
|
|
253
253
|
}, Ue = {
|
|
254
254
|
key: 1,
|
|
255
255
|
class: "flex-1 flex flex-col min-h-0"
|
|
256
|
-
}, Ie = {
|
|
257
|
-
class: "flex items-center justify-between p-8"
|
|
258
256
|
}, Me = {
|
|
259
|
-
class: "flex-
|
|
257
|
+
class: "flex items-center justify-between p-8"
|
|
260
258
|
}, Be = {
|
|
259
|
+
class: "flex-1 mr-8"
|
|
260
|
+
}, Ie = {
|
|
261
261
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
262
262
|
}, Ne = ["onClick"], De = {
|
|
263
263
|
class: "flex-1 space-y-4"
|
|
264
|
-
}, Oe = {
|
|
265
|
-
class: "fm-typo-en-body-lg-600"
|
|
266
264
|
}, ze = {
|
|
265
|
+
class: "fm-typo-en-body-lg-600"
|
|
266
|
+
}, Oe = {
|
|
267
267
|
key: 0,
|
|
268
268
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
269
269
|
}, Le = /* @__PURE__ */ X({
|
|
270
270
|
__name: "LinkProductRuleGroups",
|
|
271
|
-
setup(
|
|
271
|
+
setup(H) {
|
|
272
272
|
const {
|
|
273
273
|
t: n
|
|
274
274
|
} = ee(), x = ce(), G = ue(), i = ne(G), T = Z(), l = C(T.state.menu.ruleGroupSettings || {
|
|
@@ -306,7 +306,7 @@ const be = {
|
|
|
306
306
|
function D(e) {
|
|
307
307
|
v(e.original);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function M() {
|
|
310
310
|
R.value = null, b.value = !0;
|
|
311
311
|
}
|
|
312
312
|
function v(e) {
|
|
@@ -351,7 +351,7 @@ const be = {
|
|
|
351
351
|
e || (R.value = null);
|
|
352
352
|
}), (e, a) => {
|
|
353
353
|
const _ = g("FmButton"), k = g("FmSearch"), F = g("FmTable");
|
|
354
|
-
return d(), h("div", null, [V.value ? (d(), h("div", Ue, [r("div",
|
|
354
|
+
return d(), h("div", null, [V.value ? (d(), h("div", Ue, [r("div", Me, [r("div", Be, [u(k, {
|
|
355
355
|
modelValue: S.value,
|
|
356
356
|
"onUpdate:modelValue": a[1] || (a[1] = (f) => S.value = f),
|
|
357
357
|
autofocus: "",
|
|
@@ -360,12 +360,12 @@ const be = {
|
|
|
360
360
|
}, null, 8, ["modelValue", "placeholder"])]), u(_, {
|
|
361
361
|
icon: "add",
|
|
362
362
|
variant: t(N).Secondary,
|
|
363
|
-
onClick:
|
|
364
|
-
}, null, 8, ["variant"])]), r("div",
|
|
363
|
+
onClick: M
|
|
364
|
+
}, null, 8, ["variant"])]), r("div", Ie, [(d(!0), h(q, null, Y(U.value, (f) => (d(), h("div", {
|
|
365
365
|
key: f._id,
|
|
366
366
|
class: "flex flex-row py-12 px-16 cursor-pointer",
|
|
367
367
|
onClick: (o) => v(f)
|
|
368
|
-
}, [r("div", De, [r("p",
|
|
368
|
+
}, [r("div", De, [r("p", ze, A(f.name), 1), f.description ? (d(), h("p", Oe, A(f.description), 1)) : I("", !0)]), u(_, {
|
|
369
369
|
"text-color": t(W).NeutralGray400,
|
|
370
370
|
variant: t(N).Tertiary,
|
|
371
371
|
icon: "delete",
|
|
@@ -373,7 +373,7 @@ const be = {
|
|
|
373
373
|
}, null, 8, ["text-color", "variant", "onClick"])], 8, Ne))), 128))])])) : (d(), h("div", Re, [r("div", Ve, [r("div", null, [r("h1", Fe, A(t(n)("menu.rule_groups.title")), 1), r("p", Ae, A(t(n)("menu.rule_groups.description")), 1)]), u(_, {
|
|
374
374
|
label: t(n)("menu.rule_groups.create_group"),
|
|
375
375
|
icon: "add",
|
|
376
|
-
onClick:
|
|
376
|
+
onClick: M
|
|
377
377
|
}, null, 8, ["label"])]), r("div", $e, [r("div", Ge, [u(k, {
|
|
378
378
|
modelValue: S.value,
|
|
379
379
|
"onUpdate:modelValue": a[0] || (a[0] = (f) => S.value = f),
|
|
@@ -411,16 +411,16 @@ const be = {
|
|
|
411
411
|
class: "space-y-8"
|
|
412
412
|
}, Qe = {
|
|
413
413
|
class: "flex items-center justify-between"
|
|
414
|
-
}, Je = {
|
|
415
|
-
class: "fm-typo-en-title-md-600"
|
|
416
414
|
}, He = {
|
|
415
|
+
class: "fm-typo-en-title-md-600"
|
|
416
|
+
}, Je = {
|
|
417
417
|
class: "text-fm-color-typo-secondary"
|
|
418
418
|
}, We = {
|
|
419
419
|
key: 2
|
|
420
420
|
}, at = /* @__PURE__ */ X({
|
|
421
421
|
__name: "MenuSetting",
|
|
422
|
-
setup(
|
|
423
|
-
var
|
|
422
|
+
setup(H) {
|
|
423
|
+
var M;
|
|
424
424
|
const {
|
|
425
425
|
t: n
|
|
426
426
|
} = ee(), x = Z(), G = ie(), i = ue(), T = ne(i), l = $(() => ({
|
|
@@ -436,14 +436,14 @@ const be = {
|
|
|
436
436
|
}, {
|
|
437
437
|
label: n("menu.menu_setting.tabs.link_product_rule_groups"),
|
|
438
438
|
value: "link-product-rule-groups"
|
|
439
|
-
}] : []]), m = C(
|
|
439
|
+
}] : []]), m = C(O.transformTax((M = l.value.taxSetting) == null ? void 0 : M.inclusiveTaxes));
|
|
440
440
|
j(() => l.value, (v) => {
|
|
441
441
|
var c;
|
|
442
|
-
m.value =
|
|
442
|
+
m.value = O.transformTax((c = v.taxSetting) == null ? void 0 : c.inclusiveTaxes);
|
|
443
443
|
});
|
|
444
444
|
const V = $(() => {
|
|
445
445
|
if (!G.currentCountry.value) return [];
|
|
446
|
-
const v = m.value.mode ===
|
|
446
|
+
const v = m.value.mode === B.MANUAL ? m.value.inclusive ?? [] : [];
|
|
447
447
|
return re.Country.getCountry(G.currentCountry.value).taxSystems.map((p) => {
|
|
448
448
|
const s = v.find((e) => e.systemCode === p.code);
|
|
449
449
|
return {
|
|
@@ -453,7 +453,7 @@ const be = {
|
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
455
|
function S(v) {
|
|
456
|
-
const c = m.value, p = c.mode ===
|
|
456
|
+
const c = m.value, p = c.mode === B.AUTO ? O.manualTax(V.value) : le(c);
|
|
457
457
|
p.inclusive ?? (p.inclusive = []);
|
|
458
458
|
const s = p.inclusive.findIndex((e) => e.systemCode === v.systemCode);
|
|
459
459
|
s < 0 ? p.inclusive.push(v) : p.inclusive.splice(s, 1, v), m.value = p;
|
|
@@ -461,7 +461,7 @@ const be = {
|
|
|
461
461
|
async function U() {
|
|
462
462
|
if (l.value.lowStock !== null && l.value.lowStock !== void 0 && !Number.isInteger(l.value.lowStock))
|
|
463
463
|
return;
|
|
464
|
-
const v = m.value.mode ===
|
|
464
|
+
const v = m.value.mode === B.AUTO ? null : le(m.value.inclusive);
|
|
465
465
|
await T.minor(async () => {
|
|
466
466
|
const c = l.value.lowStock === null || l.value.lowStock === void 0 || l.value.lowStock === 0;
|
|
467
467
|
await x.updateMenuSetting({
|
|
@@ -509,31 +509,31 @@ const be = {
|
|
|
509
509
|
default: y(() => [u(e, {
|
|
510
510
|
"model-value": m.value.mode,
|
|
511
511
|
"onUpdate:modelValue": c[1] || (c[1] = (o) => {
|
|
512
|
-
o === t(
|
|
512
|
+
o === t(B).AUTO ? m.value = t(O).autoTax() : m.value = t(O).manualTax(V.value);
|
|
513
513
|
})
|
|
514
514
|
}, {
|
|
515
515
|
default: y(() => [u(s, {
|
|
516
|
-
value: t(
|
|
516
|
+
value: t(B).AUTO,
|
|
517
517
|
label: t(n)("menu.setting.tax.modes.auto.label"),
|
|
518
518
|
sublabel: t(n)("menu.setting.tax.modes.auto.sublabel")
|
|
519
519
|
}, null, 8, ["value", "label", "sublabel"]), u(s, {
|
|
520
|
-
value: t(
|
|
520
|
+
value: t(B).MANUAL,
|
|
521
521
|
label: t(n)("menu.setting.tax.modes.manual.label"),
|
|
522
522
|
sublabel: t(n)("menu.setting.tax.modes.manual.sublabel")
|
|
523
523
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
524
524
|
_: 1
|
|
525
|
-
}, 8, ["model-value"]), m.value.mode === t(
|
|
525
|
+
}, 8, ["model-value"]), m.value.mode === t(B).MANUAL ? (d(), h("div", Pe, [(d(!0), h(q, null, Y(V.value, (o) => (d(), L(a, {
|
|
526
526
|
key: o.systemCode,
|
|
527
527
|
"model-value": o.inclusive,
|
|
528
528
|
value: !0,
|
|
529
529
|
label: o.systemCode + " inclusive",
|
|
530
|
-
"onUpdate:modelValue": (
|
|
530
|
+
"onUpdate:modelValue": (z) => {
|
|
531
531
|
S({
|
|
532
532
|
...o,
|
|
533
|
-
inclusive:
|
|
533
|
+
inclusive: z
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) :
|
|
536
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : I("", !0)]),
|
|
537
537
|
_: 1
|
|
538
538
|
}, 8, ["label"])]),
|
|
539
539
|
_: 1
|
|
@@ -557,7 +557,7 @@ const be = {
|
|
|
557
557
|
}, 8, ["title", "sub-title"]), u(F, {
|
|
558
558
|
onClick: U,
|
|
559
559
|
label: t(n)("common.save")
|
|
560
|
-
}, null, 8, ["label"])])) :
|
|
560
|
+
}, null, 8, ["label"])])) : I("", !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(F, {
|
|
561
561
|
label: t(n)("menu.price_tier.add_price_group"),
|
|
562
562
|
icon: "add",
|
|
563
563
|
onClick: t(w).create
|
|
@@ -569,7 +569,7 @@ const be = {
|
|
|
569
569
|
"hide-footer": !0
|
|
570
570
|
}, null, 8, ["row-data", "page-size"])]),
|
|
571
571
|
_: 1
|
|
572
|
-
})])])) :
|
|
572
|
+
})])])) : I("", !0), b.value === "link-product-rule-groups" ? (d(), h("div", We, [u(Le)])) : I("", !0)])]),
|
|
573
573
|
_: 1
|
|
574
574
|
}, 8, ["heading"]);
|
|
575
575
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as H, ref as T, computed as p, resolveComponent as g, createBlock as k, openBlock as c, unref as l, withCtx as _, createElementVNode as d, createVNode as m, createCommentVNode as J, toDisplayString as P, createElementBlock as S, Fragment as A, renderList as R, h as f, withModifiers as q } from "vue";
|
|
2
|
+
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as W, useBreakpoints as te, useSnackbar as oe, useDialog as ne } 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 {
|
|
7
|
-
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as le } from "./app-D4se7Sr4.js";
|
|
6
|
+
import { G as j, H as re, J as Y, y as V, u as se, O as ie, B as ue, a2 as de } from "./index.vue_vue_type_script_setup_true_lang-CsnEYmWv.js";
|
|
7
|
+
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-DQjE4JRi.js";
|
|
8
8
|
import { u as ce } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { L as me } from "./LinkProductSideSheet-
|
|
9
|
+
import { L as me } from "./LinkProductSideSheet-CbppLDSB.js";
|
|
10
10
|
import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, ve = { class: "space-y-16" }, ye = { class: "flex items-center gap-8" }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, he = { class: "flex-1" }, be = { class: "grow overflow-y-auto" }, ke = { 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" }, Fe = { class: "py-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, Ce = /* @__PURE__ */
|
|
11
|
+
const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, ve = { class: "space-y-16" }, ye = { class: "flex items-center gap-8" }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, he = { class: "flex-1" }, be = { class: "grow overflow-y-auto" }, ke = { 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" }, Fe = { class: "py-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, Ce = /* @__PURE__ */ H({
|
|
12
12
|
__name: "PrintDepartmentDialog",
|
|
13
13
|
props: {
|
|
14
14
|
categorizedItems: {
|
|
@@ -22,10 +22,10 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["onSave"],
|
|
24
24
|
setup(v, { expose: t, emit: x }) {
|
|
25
|
-
const
|
|
25
|
+
const B = v;
|
|
26
26
|
t({
|
|
27
27
|
showModal: O,
|
|
28
|
-
hideModal:
|
|
28
|
+
hideModal: L
|
|
29
29
|
});
|
|
30
30
|
function w() {
|
|
31
31
|
return {
|
|
@@ -38,7 +38,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
38
38
|
function O(s) {
|
|
39
39
|
h.value = s ? j(s) : w(), r.value = j(h.value), F.value = !0;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function L() {
|
|
42
42
|
F.value = !1;
|
|
43
43
|
}
|
|
44
44
|
const r = T(w());
|
|
@@ -48,17 +48,17 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
48
48
|
applyToItems: s.map((o) => o._id)
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function M(s) {
|
|
52
52
|
r.value = {
|
|
53
53
|
...r.value,
|
|
54
54
|
applyToItems: r.value.applyToItems.filter((o) => o !== s)
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const { t: a } =
|
|
57
|
+
const { t: a } = Q(), z = p(() => r.value._id ? a("menu.print_route.department_dialog.update.title") : a("menu.print_route.department_dialog.add.title")), N = p(() => r.value._id ? a("menu.print_route.department_dialog.update.action") : a("menu.print_route.department_dialog.add.action")), D = p(() => r.value.applyToItems.length), I = p(
|
|
58
58
|
() => r.value.applyToItems.reduce((s, o) => (s[o] = [], s), {})
|
|
59
|
-
), C = T(""),
|
|
59
|
+
), C = T(""), $ = p(() => {
|
|
60
60
|
const s = C.value.toLowerCase();
|
|
61
|
-
return
|
|
61
|
+
return B.categorizedItems.reduce((o, b) => {
|
|
62
62
|
const E = b.items.filter(
|
|
63
63
|
(i) => (!s || i.name.toLowerCase().includes(s)) && !!I.value[i._id]
|
|
64
64
|
);
|
|
@@ -71,7 +71,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
function y() {
|
|
74
|
-
|
|
74
|
+
L(), e("onSave", r.value);
|
|
75
75
|
}
|
|
76
76
|
return (s, o) => {
|
|
77
77
|
const b = g("FmTextField"), E = g("FmSpacer"), i = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
|
|
@@ -94,7 +94,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
94
94
|
"side-sheet-footer": _(() => [
|
|
95
95
|
d("div", Ie, [
|
|
96
96
|
m(i, {
|
|
97
|
-
label:
|
|
97
|
+
label: N.value,
|
|
98
98
|
size: "lg",
|
|
99
99
|
variant: "primary",
|
|
100
100
|
type: "submit"
|
|
@@ -103,7 +103,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
103
103
|
label: l(a)("menu.print_route.department_dialog.actions.cancel"),
|
|
104
104
|
size: "lg",
|
|
105
105
|
variant: "tertiary",
|
|
106
|
-
onClick:
|
|
106
|
+
onClick: L
|
|
107
107
|
}, null, 8, ["label"])
|
|
108
108
|
])
|
|
109
109
|
]),
|
|
@@ -167,11 +167,11 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
167
167
|
])
|
|
168
168
|
]),
|
|
169
169
|
d("div", be, [
|
|
170
|
-
(c(!0),
|
|
170
|
+
(c(!0), S(A, null, R($.value, (u, ee) => (c(), S("div", {
|
|
171
171
|
key: u.id || ee
|
|
172
172
|
}, [
|
|
173
173
|
d("div", ke, P(u.name), 1),
|
|
174
|
-
(c(!0),
|
|
174
|
+
(c(!0), S(A, null, R(u.items, (K) => (c(), S("div", {
|
|
175
175
|
key: K._id,
|
|
176
176
|
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
177
177
|
}, [
|
|
@@ -181,7 +181,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
181
181
|
icon: "delete",
|
|
182
182
|
variant: "tertiary",
|
|
183
183
|
"text-color": "neutral-gray-400",
|
|
184
|
-
onClick: () =>
|
|
184
|
+
onClick: () => M(K._id)
|
|
185
185
|
}, null, 8, ["onClick"])
|
|
186
186
|
])
|
|
187
187
|
]))), 128))
|
|
@@ -190,7 +190,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
193
|
-
}, 8, ["title"])) :
|
|
193
|
+
}, 8, ["title"])) : J("", !0)
|
|
194
194
|
])
|
|
195
195
|
]),
|
|
196
196
|
_: 1
|
|
@@ -231,18 +231,18 @@ const Te = {
|
|
|
231
231
|
class: "flex flex-1 justify-end"
|
|
232
232
|
}, Pe = {
|
|
233
233
|
class: "flex justify-end items-center"
|
|
234
|
-
}, Me = {
|
|
235
|
-
class: "grow space-y-4"
|
|
236
234
|
}, Se = {
|
|
237
|
-
class: "
|
|
235
|
+
class: "grow space-y-4"
|
|
238
236
|
}, Le = {
|
|
237
|
+
class: "fm-typo-en-body-lg-600"
|
|
238
|
+
}, Me = {
|
|
239
239
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
240
|
-
}, Ye = /* @__PURE__ */
|
|
240
|
+
}, Ye = /* @__PURE__ */ H({
|
|
241
241
|
__name: "PrintRoute",
|
|
242
242
|
setup(v) {
|
|
243
243
|
const {
|
|
244
244
|
t
|
|
245
|
-
} =
|
|
245
|
+
} = Q(), x = te(), B = p(() => x.breakpoints.value.xs), w = se(), F = p(() => w.categorizedItems), h = p(() => {
|
|
246
246
|
const e = w.state.menu.modules.item;
|
|
247
247
|
return w.printDepartments.map((y) => ({
|
|
248
248
|
...y,
|
|
@@ -251,7 +251,7 @@ const Te = {
|
|
|
251
251
|
return (b = o.print) != null && b.department.includes(y._id) && s.push(o), s;
|
|
252
252
|
}, [])
|
|
253
253
|
}), []);
|
|
254
|
-
}), O = p(() => h.value.length > 0),
|
|
254
|
+
}), O = p(() => h.value.length > 0), L = p(() => [{
|
|
255
255
|
accessorKey: "name",
|
|
256
256
|
header: () => t("menu.print_route.table.columns.name"),
|
|
257
257
|
cell: (e) => e.getValue(),
|
|
@@ -299,12 +299,12 @@ const Te = {
|
|
|
299
299
|
}) => y)
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const M = ie(ue(oe())), a = p(() => M.checkMenuIsLoading());
|
|
303
303
|
async function z(e) {
|
|
304
304
|
const n = e._id ? we(e, e.applyToItems) : Ve(e, e.applyToItems);
|
|
305
|
-
await
|
|
305
|
+
await M.updateMenu(n, e.name);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const N = ne();
|
|
308
308
|
function D(e) {
|
|
309
309
|
let n = [f("span", t("menu.print_route.dialogs.remove.message.prefix")), f("span", {
|
|
310
310
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -315,7 +315,7 @@ const Te = {
|
|
|
315
315
|
class: "mt-8 fm-typo-en-body-md-400"
|
|
316
316
|
}, e.applyToItems.map((y) => f("li", {
|
|
317
317
|
class: "mt-4"
|
|
318
|
-
}, y.name)))]),
|
|
318
|
+
}, y.name)))]), N.open({
|
|
319
319
|
title: t("menu.print_route.dialogs.remove.title"),
|
|
320
320
|
contentComponent: f("div", n),
|
|
321
321
|
primaryActions: {
|
|
@@ -328,10 +328,10 @@ const Te = {
|
|
|
328
328
|
close: !0
|
|
329
329
|
}
|
|
330
330
|
}).onPrimary(async () => {
|
|
331
|
-
await
|
|
331
|
+
await M.updateMenu(Ee(e), e.name, !0);
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
const I = T(""), C = T(),
|
|
334
|
+
const I = T(""), C = T(), $ = p(() => {
|
|
335
335
|
if (!I.value) return h.value;
|
|
336
336
|
const e = I.value.toLowerCase();
|
|
337
337
|
return h.value.filter((n) => n.name.toLowerCase().includes(e));
|
|
@@ -348,8 +348,8 @@ const Te = {
|
|
|
348
348
|
label: l(t)("menu.print_route.actions.add"),
|
|
349
349
|
variant: "primary",
|
|
350
350
|
onClick: r
|
|
351
|
-
}, null, 8, ["disabled", "label"])) :
|
|
352
|
-
default: _(() => [O.value ? (c(),
|
|
351
|
+
}, null, 8, ["disabled", "label"])) : J("", !0)])]),
|
|
352
|
+
default: _(() => [O.value ? (c(), S(A, {
|
|
353
353
|
key: 1
|
|
354
354
|
}, [d("div", Pe, [m(y, {
|
|
355
355
|
autofocus: "",
|
|
@@ -357,12 +357,12 @@ const Te = {
|
|
|
357
357
|
"onUpdate:modelValue": n[0] || (n[0] = (i) => I.value = i),
|
|
358
358
|
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
359
359
|
placeholder: l(t)("menu.print_route.table.search.placeholder")
|
|
360
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
360
|
+
}, null, 8, ["modelValue", "placeholder"])]), B.value ? (c(), k(E, {
|
|
361
361
|
key: 1,
|
|
362
362
|
class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
|
|
363
363
|
separator: ""
|
|
364
364
|
}, {
|
|
365
|
-
default: _(() => [(c(!0),
|
|
365
|
+
default: _(() => [(c(!0), S(A, null, R($.value, (i) => (c(), k(b, {
|
|
366
366
|
key: i._id,
|
|
367
367
|
label: i.name,
|
|
368
368
|
style: {
|
|
@@ -370,7 +370,7 @@ const Te = {
|
|
|
370
370
|
},
|
|
371
371
|
onClick: () => U(i)
|
|
372
372
|
}, {
|
|
373
|
-
default: _(() => [d("div",
|
|
373
|
+
default: _(() => [d("div", Se, [d("div", Le, P(i.name), 1), d("div", Me, P(l(t)("menu.print_route.table.mobile.products_linked", {
|
|
374
374
|
count: i.applyToItems.length
|
|
375
375
|
})), 1)]), m(o, {
|
|
376
376
|
disabled: a.value,
|
|
@@ -386,7 +386,7 @@ const Te = {
|
|
|
386
386
|
key: 0
|
|
387
387
|
}, {
|
|
388
388
|
default: _(() => [m(s, {
|
|
389
|
-
"column-defs":
|
|
389
|
+
"column-defs": L.value,
|
|
390
390
|
loading: a.value,
|
|
391
391
|
"page-size": h.value.length,
|
|
392
392
|
"row-data": h.value,
|