@feedmepos/mf-menu 0.19.0-beta.9 → 0.19.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/{ApplyProduct.vue_vue_type_script_setup_true_lang-Xba9MwkY.js → ApplyProduct.vue_vue_type_script_setup_true_lang-W3ALTrsj.js} +11 -10
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-C4235zyV.js → ApplyProducts.vue_vue_type_script_setup_true_lang-TE9kAVkO.js} +2 -2
- package/dist/{Catalog-0ckjo6Cm.js → Catalog-BL63lK7R.js} +8 -8
- package/dist/{Category-B5TbJTp7.js → Category-sJPghhZ_.js} +59 -58
- package/dist/{CookingGuide-BJcMPrI5.js → CookingGuide-DAE7bgcU.js} +4 -4
- package/dist/{Group-BdY6d9w2.js → Group-BxNeMr8F.js} +13 -12
- package/dist/{Group-RL9hvzCS.js → Group-DDxRUmm4.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DKj2wxnf.js → Group.vue_vue_type_script_setup_true_lang-D_YJ5tL_.js} +31 -30
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BADCN2fe.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B9CLSWLu.js} +20 -19
- package/dist/{Ingredient-DABna2iN.js → Ingredient-ClwK8EGA.js} +23 -15
- package/dist/{LinkProductSideSheet-KUKMnlt9.js → LinkProductSideSheet-Dr54Si8e.js} +19 -19
- package/dist/{PrintRoute-BGpV9629.js → PrintRoute-N_fICtn8.js} +9 -9
- package/dist/{Product-Cjoo-ZZ8.js → Product-BDwny0B3.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Vg7fo3g6.js → Product.vue_vue_type_script_setup_true_lang-DCypQ1N4.js} +46 -46
- package/dist/{Products-BJM8ZBcg.js → Products-B9jzE3MQ.js} +43 -43
- package/dist/{Publish-BZN3JO3j.js → Publish-D8xPK5PZ.js} +29 -29
- package/dist/{Recipe-DeMEAf7r.js → Recipe-CTrKvEiB.js} +40 -34
- package/dist/{Scheduler-BKUCHyac.js → Scheduler-Bw4Wjlnx.js} +35 -34
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-Bn3WzWmr.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-cU85Ebal.js} +12 -11
- package/dist/ServingSequence-CjrJ1oDe.js +4 -0
- package/dist/{Setting-C84nHhbB.js → Setting-lrWK1aCr.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-BVUe_2pD.js → Setting.vue_vue_type_script_setup_true_lang-BIKArP-6.js} +11 -11
- package/dist/{Takeaway-Brt9qfX4.js → Takeaway-BliapyfQ.js} +14 -14
- package/dist/{Takeaway-DDJp9sI2.js → Takeaway-C6ESjI6a.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BuxnExYT.js → Takeaway.vue_vue_type_script_setup_true_lang-_uYXHAgk.js} +17 -17
- package/dist/TaxSetting-B_OVaxnK.js +26 -0
- package/dist/{Unit-E9NLW5VO.js → Unit-BpPwsq-R.js} +25 -25
- package/dist/{Variant-CZkvJh72.js → Variant-DLnFjrKX.js} +14 -13
- package/dist/{_id_-DfPGsfBR.js → _id_-CpB9sDXs.js} +21 -20
- package/dist/{app-Cq-DFOLO.js → app-DnjfTTyH.js} +25203 -27930
- package/dist/app.js +4 -4
- package/dist/assets/{linked-status-CYjwveRv.js → linked-status-DS5Y3Qmg.js} +3 -3
- package/dist/assets/{validate-menu-ZRJOzM1B.js → validate-menu-B5z7rBbO.js} +3 -3
- package/dist/{catalog-DYX_c6bm.js → catalog-B3zKEMGs.js} +16 -16
- package/dist/{catalog-DjrR8z64.js → catalog-DEU4EW82.js} +1 -1
- package/dist/{category-LskjLp5B.js → category-CBXUkjZW.js} +7 -7
- package/dist/{currency-okf6Zpjf.js → currency-CyIMAuaF.js} +1 -1
- package/dist/{index-CYb95BT2.js → index-C0KmJcH7.js} +5 -4
- package/dist/{index-Db0m_jtN.js → index-F3JoSMjg.js} +19 -18
- package/dist/{item-BBueZjbb.js → item-BVtbX-DR.js} +369 -361
- package/dist/{lodash-tlbvqPuY.js → lodash-Dum3fDW4.js} +1 -1
- package/dist/{menu-BHHnot9G.js → menu-Bxe-VCgS.js} +1 -1
- package/dist/{object-CpqdRN0U.js → object-BNFM25tr.js} +4 -4
- package/dist/{scheduler-BrghaQlc.js → scheduler-DPTNLoCR.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{takeaway-IUqhoO1E.js → takeaway-GxwSTX8A.js} +18 -13
- package/dist/{toExcel-dpwLFARW.js → toExcel-B35ESJnK.js} +2 -2
- package/dist/{unit-CNRH1cAq.js → unit-zvgjgaPU.js} +37 -18
- package/package.json +2 -3
- package/dist/ServingSequence-DNESVxF_.js +0 -4
- package/dist/TaxSetting-Cwuof9KZ.js +0 -25
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { defineComponent as Q, ref as S, resolveComponent as D, openBlock as d, createElementBlock as G, Fragment as T, renderSlot as he, createVNode as m, unref as o, withCtx as k, createElementVNode as c, toDisplayString as P, computed as g, createBlock as V, renderList as te, normalizeClass as z, watch as ke, mergeProps as Oe, createCommentVNode as E, createSlots as we, withModifiers as De, isRef as ne, h as Ce, nextTick as Me } from "vue";
|
|
2
|
-
import { u as ae, g as xe, i as Ae, a as Fe,
|
|
3
|
-
import { _ as oe } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { M as le, S as
|
|
5
|
-
import { components as
|
|
6
|
-
import { C as
|
|
7
|
-
import { l as L, u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { V as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { c as
|
|
2
|
+
import { u as ae, g as xe, i as Ae, a as Fe, n as Ge, c as Ne, b as v, m as Pe, k as Ve, j as Re, h as Ue } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { _ as oe } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-cU85Ebal.js";
|
|
4
|
+
import { M as le, S as Ee, _ as Se, A as Te, e as Ie, a as $e } from "./item-BVtbX-DR.js";
|
|
5
|
+
import { components as Ye, useBreakpoints as ue, useSnackbar as Le, useDialog as ze, FmButtonVariant as je } from "@feedmepos/ui-library";
|
|
6
|
+
import { C as Ke } from "./catalog-DEU4EW82.js";
|
|
7
|
+
import { l as L, u as Be } from "./lodash-Dum3fDW4.js";
|
|
8
|
+
import { _ as qe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-W3ALTrsj.js";
|
|
9
|
+
import { V as He } from "./vuedraggable-WU01qJgi.js";
|
|
10
|
+
import { _ as Je, a as Qe } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
|
|
11
|
+
import { c as We } from "./object-BNFM25tr.js";
|
|
12
|
+
import { useI18n as Xe } from "@feedmepos/mf-common";
|
|
12
13
|
const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items-center justify-start" }, tt = /* @__PURE__ */ Q({
|
|
13
14
|
__name: "ApplyProductDialog",
|
|
14
15
|
props: {
|
|
@@ -19,7 +20,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
19
20
|
},
|
|
20
21
|
emits: ["apply:product"],
|
|
21
22
|
setup(j, { emit: I }) {
|
|
22
|
-
const u = j, C = I, x = u.initialValue.map((p) => ({ _id: p })), b = S(L.clone(x)), N =
|
|
23
|
+
const u = j, C = I, x = u.initialValue.map((p) => ({ _id: p })), b = S(L.clone(x)), N = Be(
|
|
23
24
|
() => !L.isEqual(b.value, x),
|
|
24
25
|
() => {
|
|
25
26
|
M.value = !1;
|
|
@@ -35,7 +36,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
35
36
|
id: "group-form",
|
|
36
37
|
modelValue: M.value,
|
|
37
38
|
"onUpdate:modelValue": s[1] || (s[1] = (r) => M.value = r),
|
|
38
|
-
"is-container": o(
|
|
39
|
+
"is-container": o(Ye).FmForm,
|
|
39
40
|
"is-container-props": {
|
|
40
41
|
onValidationSuccess: () => {
|
|
41
42
|
C("apply:product", b.value), O(!1);
|
|
@@ -66,7 +67,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
66
67
|
])
|
|
67
68
|
]),
|
|
68
69
|
default: k(() => [
|
|
69
|
-
m(
|
|
70
|
+
m(qe, {
|
|
70
71
|
overrides: b.value,
|
|
71
72
|
"onUpdate:overrides": s[0] || (s[0] = (r) => b.value = r),
|
|
72
73
|
"categorized-items": o(A).categorizedItems,
|
|
@@ -90,9 +91,9 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
90
91
|
const I = ue(), u = g(() => I.breakpoints.value.xs);
|
|
91
92
|
return (C, x) => {
|
|
92
93
|
const b = D("FmButton"), N = D("FmMenuItem"), M = D("FmMenu");
|
|
93
|
-
return u.value ? (d(), V(
|
|
94
|
+
return u.value ? (d(), V(Je, { key: 0 }, {
|
|
94
95
|
default: k(() => [
|
|
95
|
-
(d(!0), G(T, null, te(C.items, ({ icon: O, label: A, disabled: p, itemClass: s, onClick: _ }) => (d(), V(
|
|
96
|
+
(d(!0), G(T, null, te(C.items, ({ icon: O, label: A, disabled: p, itemClass: s, onClick: _ }) => (d(), V(Qe, {
|
|
96
97
|
key: A,
|
|
97
98
|
icon: O,
|
|
98
99
|
label: A,
|
|
@@ -163,13 +164,13 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
163
164
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
164
165
|
}, pt = {
|
|
165
166
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
166
|
-
},
|
|
167
|
+
}, Mt = /* @__PURE__ */ Q({
|
|
167
168
|
__name: "Group",
|
|
168
169
|
emits: ["update:count"],
|
|
169
170
|
setup(j, {
|
|
170
171
|
emit: I
|
|
171
172
|
}) {
|
|
172
|
-
const u = ae(), C = Ae(Fe(
|
|
173
|
+
const u = ae(), C = Ae(Fe(Le())), x = ze(), b = g(() => u.rules.group), N = g(() => new le(u, C.updateMenu, x)), M = g(() => N.value.mapGroups(u.groups, !1)), {
|
|
173
174
|
searchKey: O,
|
|
174
175
|
filter: A
|
|
175
176
|
} = Ge(), p = S(!1), s = S(null), _ = g(() => M.value.filter((t) => A([t.name, Object.values(t.items).flatMap((e) => `${e.code} ${e.name} ${Ne.Dinero.fromFdoDinero(e.price).toFormat()}`), t.type])).filter((t) => !s.value || t.type === s.value)), K = I;
|
|
@@ -240,7 +241,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
240
241
|
}
|
|
241
242
|
}).onPrimary(() => N.value.duplicateGroup(t));
|
|
242
243
|
}
|
|
243
|
-
const q = g(() => u.currentCatalog), $ = g(() => u.currentScheduler), Y = g(() => new
|
|
244
|
+
const q = g(() => u.currentCatalog), $ = g(() => u.currentScheduler), Y = g(() => new Ke(q.value, u, C.updateMenu, x)), H = g(() => new Ee($.value, u, C.updateMenu, x)), ce = (t) => {
|
|
244
245
|
let e = t;
|
|
245
246
|
if (r.value) {
|
|
246
247
|
let i = function(w) {
|
|
@@ -277,7 +278,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
277
278
|
primaryActions: {
|
|
278
279
|
text: n("menu.common.actions.delete"),
|
|
279
280
|
close: !0,
|
|
280
|
-
variant:
|
|
281
|
+
variant: je.Destructive
|
|
281
282
|
},
|
|
282
283
|
secondaryActions: {
|
|
283
284
|
text: n("menu.common.actions.cancel"),
|
|
@@ -290,7 +291,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
290
291
|
return Ce(tt, {
|
|
291
292
|
key: e._id,
|
|
292
293
|
initialValue: e.itemsLinked,
|
|
293
|
-
group:
|
|
294
|
+
group: Ie(e),
|
|
294
295
|
editable: b.value.applyProduct,
|
|
295
296
|
"onApply:product": async (l) => {
|
|
296
297
|
await N.value.applyItems(e, l.map((i) => i._id));
|
|
@@ -383,13 +384,13 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
383
384
|
}]), ve = g(() => ({
|
|
384
385
|
itemsLinked: b.value.showAppliedProduct
|
|
385
386
|
})), fe = async (t) => {
|
|
386
|
-
const e =
|
|
387
|
+
const e = $e(t), l = e.group;
|
|
387
388
|
if (r.value)
|
|
388
389
|
q.value ? ($.value ? Y.value.overrideCatalogSchedulerGroups([l], $.value._id) : Y.value.overrideCatalogGroups([l]), await Y.value.update()) : (H.value.overrideSchedulerGroups([l]), await H.value.update());
|
|
389
390
|
else {
|
|
390
391
|
const i = {
|
|
391
392
|
module: v.F_MENU_MODULE_V4_KEY.enum.group,
|
|
392
|
-
operation:
|
|
393
|
+
operation: Ue.F_OPERATION_TYPE.update,
|
|
393
394
|
data: l,
|
|
394
395
|
link: [{
|
|
395
396
|
module: v.F_MENU_MODULE_V4_KEY.enum.item,
|
|
@@ -401,17 +402,17 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
401
402
|
}
|
|
402
403
|
}, U = S(null), Z = S(null), ee = async (t) => {
|
|
403
404
|
var e;
|
|
404
|
-
U.value =
|
|
405
|
+
U.value = We(t), await Me(), (e = Z.value) == null || e.trigger(!0);
|
|
405
406
|
};
|
|
406
407
|
function _e(t) {
|
|
407
408
|
ee(t.original);
|
|
408
409
|
}
|
|
409
410
|
const ye = ue(), ge = g(() => ye.breakpoints.value.xs), {
|
|
410
411
|
t: n
|
|
411
|
-
} =
|
|
412
|
+
} = Xe();
|
|
412
413
|
return (t, e) => {
|
|
413
414
|
const l = D("fm-button"), i = D("fm-chip"), f = D("fm-menu-item"), w = D("fm-menu"), h = D("fm-search"), F = D("fm-table"), J = D("fm-bottom-sheet");
|
|
414
|
-
return d(), G(T, null, [U.value ? (d(), V(
|
|
415
|
+
return d(), G(T, null, [U.value ? (d(), V(Se, Oe({
|
|
415
416
|
ref_key: "groupManagerFormRef",
|
|
416
417
|
ref: Z,
|
|
417
418
|
key: U.value._id
|
|
@@ -421,14 +422,14 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
421
422
|
group: U.value,
|
|
422
423
|
"onUpdate:group": e[0] || (e[0] = (a) => U.value = a),
|
|
423
424
|
"onSubmit:group": e[1] || (e[1] = (a) => fe(a))
|
|
424
|
-
}), null, 16, ["title", "group"])) : E("", !0), M.value.length === 0 ? (d(), G("div", ot, [m(
|
|
425
|
+
}), null, 16, ["title", "group"])) : E("", !0), M.value.length === 0 ? (d(), G("div", ot, [m(Ve, {
|
|
425
426
|
subtitle: o(n)("menu.group.empty.subtitle"),
|
|
426
427
|
title: o(n)("menu.group.empty.title")
|
|
427
428
|
}, we({
|
|
428
429
|
_: 2
|
|
429
430
|
}, [b.value.create ? {
|
|
430
431
|
name: "action",
|
|
431
|
-
fn: k(() => [m(o(
|
|
432
|
+
fn: k(() => [m(o(Te), null, {
|
|
432
433
|
default: k(({
|
|
433
434
|
trigger: a
|
|
434
435
|
}) => [m(l, {
|
|
@@ -478,7 +479,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
478
479
|
onClick: e[12] || (e[12] = (a) => s.value = "DYNAMIC")
|
|
479
480
|
}, P(o(n)("menu.group.type.dynamic")), 1)])]),
|
|
480
481
|
_: 1
|
|
481
|
-
}, 8, ["modelValue"])) : E("", !0)]), m(o(
|
|
482
|
+
}, 8, ["modelValue"])) : E("", !0)]), m(o(He), {
|
|
482
483
|
class: z(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
483
484
|
"model-value": _.value,
|
|
484
485
|
group: "categories",
|
|
@@ -532,7 +533,7 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
532
533
|
modelValue: o(O),
|
|
533
534
|
"onUpdate:modelValue": e[6] || (e[6] = (a) => ne(O) ? O.value = a : null),
|
|
534
535
|
placeholder: o(n)("menu.group.search.placeholder")
|
|
535
|
-
}, null, 8, ["modelValue", "placeholder"])])]), m(
|
|
536
|
+
}, null, 8, ["modelValue", "placeholder"])])]), m(Re, null, {
|
|
536
537
|
default: k(() => [m(F, {
|
|
537
538
|
"column-defs": pe.value,
|
|
538
539
|
"column-visibility": ve.value,
|
|
@@ -554,5 +555,5 @@ const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items
|
|
|
554
555
|
}
|
|
555
556
|
});
|
|
556
557
|
export {
|
|
557
|
-
|
|
558
|
+
Mt as _
|
|
558
559
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { b as k, d as c, u as q,
|
|
2
|
-
import { defineComponent as H, computed as F, ref as V, watch as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { L as
|
|
1
|
+
import { b as k, d as c, u as q, H as G, g as C } from "./app-DnjfTTyH.js";
|
|
2
|
+
import { defineComponent as H, computed as F, ref as V, watch as j, onMounted as J, resolveComponent as s, openBlock as _, createElementBlock as y, Fragment as S, renderSlot as K, createVNode as i, unref as o, withCtx as d, createTextVNode as Q, toDisplayString as I, createElementVNode as O, renderList as W, createBlock as R, createCommentVNode as h } from "vue";
|
|
3
|
+
import { c as X } from "./string-DpfFixWH.js";
|
|
4
|
+
import { useDialog as Y, components as Z, FmButtonColorThemeVariant as L, FmButtonVariant as ee } from "@feedmepos/ui-library";
|
|
5
|
+
import { L as ae } from "./LinkProductSideSheet-Dr54Si8e.js";
|
|
6
|
+
import { useI18n as te } from "@feedmepos/mf-common";
|
|
6
7
|
var le = /* @__PURE__ */ ((p) => (p.AUTO = "auto", p.MANUAL = "manual", p))(le || {});
|
|
7
8
|
class T {
|
|
8
9
|
static fromCatalog(e, n) {
|
|
@@ -63,7 +64,7 @@ class T {
|
|
|
63
64
|
const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re = {
|
|
64
65
|
key: 0,
|
|
65
66
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
66
|
-
},
|
|
67
|
+
}, pe = /* @__PURE__ */ H({
|
|
67
68
|
__name: "GroupMarkupPriceDialog",
|
|
68
69
|
props: {
|
|
69
70
|
modelValue: {},
|
|
@@ -74,8 +75,8 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
74
75
|
emits: ["update:model-value"],
|
|
75
76
|
setup(p, { emit: e }) {
|
|
76
77
|
const n = p, g = q();
|
|
77
|
-
|
|
78
|
-
const { t: r } =
|
|
78
|
+
Y();
|
|
79
|
+
const { t: r } = te(), M = e, w = F(() => n.action === "add" ? r("menu.markup.dialog.title.add") : r("menu.markup.dialog.title.update")), m = V(!1), b = (t) => {
|
|
79
80
|
C.isBoolean(t) ? m.value = t : m.value = !m.value;
|
|
80
81
|
}, a = V(
|
|
81
82
|
n.modelValue ? c(n.modelValue) : {
|
|
@@ -83,7 +84,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
83
84
|
includeItems: null
|
|
84
85
|
}
|
|
85
86
|
);
|
|
86
|
-
|
|
87
|
+
j(
|
|
87
88
|
() => m.value,
|
|
88
89
|
(t) => {
|
|
89
90
|
t && (a.value = n.modelValue ? c(n.modelValue) : {
|
|
@@ -92,7 +93,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
), F(
|
|
95
|
-
() =>
|
|
96
|
+
() => G(g.variants, n.categories, n.items)
|
|
96
97
|
);
|
|
97
98
|
function z(t) {
|
|
98
99
|
a.value = {
|
|
@@ -125,23 +126,23 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
125
126
|
async function E() {
|
|
126
127
|
M("update:model-value", a.value), b(!1);
|
|
127
128
|
}
|
|
128
|
-
return
|
|
129
|
+
return J(() => {
|
|
129
130
|
f.value = a.value && a.value.includeItems === null ? 0 : 1;
|
|
130
131
|
}), (t, u) => {
|
|
131
132
|
const N = s("fm-icon"), B = s("fm-stepper-field"), U = s("fm-radio"), P = s("fm-radio-group"), x = s("fm-button"), $ = s("fm-dialog");
|
|
132
133
|
return _(), y(S, null, [
|
|
133
|
-
|
|
134
|
+
K(t.$slots, "default", { trigger: b }),
|
|
134
135
|
i($, {
|
|
135
136
|
modelValue: m.value,
|
|
136
137
|
"onUpdate:modelValue": u[3] || (u[3] = (v) => m.value = v),
|
|
137
|
-
"is-component": o(
|
|
138
|
+
"is-component": o(Z).FmForm,
|
|
138
139
|
"is-component-props": {
|
|
139
140
|
onValidationSuccess: E
|
|
140
141
|
},
|
|
141
142
|
"z-index": 101
|
|
142
143
|
}, {
|
|
143
144
|
"dialog-header": d(() => [
|
|
144
|
-
|
|
145
|
+
Q(I(w.value), 1)
|
|
145
146
|
]),
|
|
146
147
|
"dialog-footer": d(() => [
|
|
147
148
|
i(x, {
|
|
@@ -151,7 +152,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
151
152
|
onClick: u[2] || (u[2] = (v) => b(!1))
|
|
152
153
|
}),
|
|
153
154
|
i(x, {
|
|
154
|
-
label: o(
|
|
155
|
+
label: o(X)(t.action),
|
|
155
156
|
class: "sm:w-full xs:w-full",
|
|
156
157
|
size: "md",
|
|
157
158
|
type: "submit",
|
|
@@ -189,7 +190,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
189
190
|
class: "space-y-8"
|
|
190
191
|
}, {
|
|
191
192
|
default: d(() => [
|
|
192
|
-
(_(!0), y(S, null,
|
|
193
|
+
(_(!0), y(S, null, W(D.value, (l) => (_(), R(U, {
|
|
193
194
|
key: l.value,
|
|
194
195
|
label: l.label,
|
|
195
196
|
value: l.value
|
|
@@ -198,7 +199,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
198
199
|
_: 1
|
|
199
200
|
}, 8, ["modelValue"]),
|
|
200
201
|
O("div", ne, [
|
|
201
|
-
i(
|
|
202
|
+
i(ae, {
|
|
202
203
|
title: "Link products",
|
|
203
204
|
"categorized-items": o(g).categorizedItems,
|
|
204
205
|
"initial-value": a.value.includeItems || [],
|
|
@@ -210,7 +211,7 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
210
211
|
key: 0,
|
|
211
212
|
"text-color": o(L).ColorPrimary,
|
|
212
213
|
"border-color": o(L).ColorPrimary,
|
|
213
|
-
variant: o(
|
|
214
|
+
variant: o(ee).Secondary,
|
|
214
215
|
label: o(r)("menu.markup.dialog.products.link"),
|
|
215
216
|
"prepend-icon": "link",
|
|
216
217
|
onClick: l
|
|
@@ -232,6 +233,6 @@ const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re
|
|
|
232
233
|
});
|
|
233
234
|
export {
|
|
234
235
|
T as C,
|
|
235
|
-
|
|
236
|
+
pe as _,
|
|
236
237
|
le as a
|
|
237
238
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ie, computed as b, ref as E, reactive as Ve, watch as Ce, resolveComponent as d, openBlock as m, createElementBlock as y, Fragment as V, renderSlot as Me, createVNode as s, unref as e, withCtx as k, createElementVNode as v, toDisplayString as U, createBlock as B, createCommentVNode as j, normalizeClass as J, createTextVNode as we, renderList as q, getCurrentInstance as $e, h as te, withModifiers as le } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { useSnackbar as
|
|
4
|
-
import "@feedmepos/mf-common";
|
|
2
|
+
import { i as se, a as Q, u as W, d as Ee, m as K, k as ue, e as oe, g as Ue, b as G, h as H, l as Ne, _ as Oe, f as Te } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { useSnackbar as X, components as re, useDialog as Be, FmButtonVariant as ce, useBreakpoints as Ie } from "@feedmepos/ui-library";
|
|
4
|
+
import { useI18n as Z } from "@feedmepos/mf-common";
|
|
5
5
|
import "vue-router";
|
|
6
6
|
import { defineStore as Le } from "pinia";
|
|
7
|
-
import { u as Pe } from "./unit-
|
|
8
|
-
import { _ as ae, j as Re } from "./index-
|
|
9
|
-
import { u as De, l as Ae } from "./lodash-
|
|
7
|
+
import { u as Pe } from "./unit-zvgjgaPU.js";
|
|
8
|
+
import { _ as ae, j as Re } from "./index-C0KmJcH7.js";
|
|
9
|
+
import { u as De, l as Ae } from "./lodash-Dum3fDW4.js";
|
|
10
10
|
const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "pt-8 flex flex-col gap-8"
|
|
@@ -21,9 +21,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
|
21
21
|
invalidSkuAndRecipe: {}
|
|
22
22
|
},
|
|
23
23
|
setup(I, { expose: N }) {
|
|
24
|
-
const { t: o } =
|
|
24
|
+
const { t: o } = Z(), r = I, u = se(Q(X())), S = Pe(), h = b(() => r.initialValue ? o("menu.sku.update") : o("menu.sku.add")), x = b(
|
|
25
|
+
() => r.initialValue ? o("menu.common.actions.update") : o("menu.common.actions.add")
|
|
26
|
+
), C = E(!1), f = E(!1), M = (t) => {
|
|
25
27
|
Ue.isBoolean(t) ? f.value = t : f.value = !f.value;
|
|
26
|
-
}, O =
|
|
28
|
+
}, O = W(), a = b(() => O.units), i = b(() => a.value.map(({ name: t, _id: l, abbrev: g, measurements: T }) => ({
|
|
27
29
|
label: t,
|
|
28
30
|
value: l,
|
|
29
31
|
options: [
|
|
@@ -162,7 +164,9 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
|
162
164
|
modelValue: n.code,
|
|
163
165
|
"onUpdate:modelValue": l[0] || (l[0] = (p) => n.code = p),
|
|
164
166
|
rules: [
|
|
165
|
-
(p) => !!p || e(o)("menu.common.validation.required", {
|
|
167
|
+
(p) => !!p || e(o)("menu.common.validation.required", {
|
|
168
|
+
field: e(o)("menu.sku.columns.code").toLowerCase()
|
|
169
|
+
}),
|
|
166
170
|
(p) => !t.usedCodes.includes(p.trim()) || e(o)("menu.sku.validation.code_used")
|
|
167
171
|
]
|
|
168
172
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
@@ -171,7 +175,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
|
171
175
|
label: e(o)("menu.sku.columns.name"),
|
|
172
176
|
modelValue: n.name,
|
|
173
177
|
"onUpdate:modelValue": l[1] || (l[1] = (p) => n.name = p),
|
|
174
|
-
rules: [
|
|
178
|
+
rules: [
|
|
179
|
+
(p) => p ? !0 : e(o)("menu.common.validation.required", {
|
|
180
|
+
field: e(o)("menu.sku.columns.name").toLowerCase()
|
|
181
|
+
})
|
|
182
|
+
]
|
|
175
183
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
176
184
|
]),
|
|
177
185
|
s(ke, {
|
|
@@ -285,7 +293,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
|
285
293
|
};
|
|
286
294
|
}
|
|
287
295
|
}), Je = He, Qe = Le("sku-manager", () => {
|
|
288
|
-
const I = Be(), N =
|
|
296
|
+
const I = Be(), N = X(), o = Q(N), r = se(o), u = W(), S = $e(), { t: h } = Z(), x = (a) => {
|
|
289
297
|
var c, n;
|
|
290
298
|
const { vNode: i } = Ne(
|
|
291
299
|
Je,
|
|
@@ -369,11 +377,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
|
369
377
|
}, xn = /* @__PURE__ */ ie({
|
|
370
378
|
__name: "Ingredient",
|
|
371
379
|
setup(I) {
|
|
372
|
-
const N =
|
|
373
|
-
|
|
374
|
-
const o =
|
|
380
|
+
const N = X();
|
|
381
|
+
Q(N);
|
|
382
|
+
const o = W(), r = Qe(), {
|
|
375
383
|
t: u
|
|
376
|
-
} =
|
|
384
|
+
} = Z(), S = b(() => o.skus), h = b(() => S.value.filter((i) => `${i.name} ${i.code} ${i._unit} (${i._abbrev})`.toLowerCase().includes(x.value.toLowerCase()))), x = E(""), C = E([{
|
|
377
385
|
accessorKey: "code",
|
|
378
386
|
header: () => u("menu.ingredient.table.columns.code"),
|
|
379
387
|
enableSorting: !1
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as z, ref as
|
|
1
|
+
import { defineComponent as z, ref as p, computed as S, watch as F, resolveComponent as v, openBlock as V, createElementBlock as I, Fragment as D, renderSlot as E, createVNode as i, unref as n, withCtx as m, createBlock as N, createCommentVNode as O, createElementVNode as h, toDisplayString as L } from "vue";
|
|
2
2
|
import { components as j, FmButtonVariant as A } from "@feedmepos/ui-library";
|
|
3
|
-
import { d as
|
|
4
|
-
import "@feedmepos/mf-common";
|
|
5
|
-
import { u as x, l as M } from "./lodash-
|
|
3
|
+
import { d as _, V as P, g as U, N as $ } from "./app-DnjfTTyH.js";
|
|
4
|
+
import { useI18n as q } from "@feedmepos/mf-common";
|
|
5
|
+
import { u as x, l as M } from "./lodash-Dum3fDW4.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const T = { class: "fm-typo-en-title-md-600 mr-auto" },
|
|
7
|
+
const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8 items-center justify-start" }, H = /* @__PURE__ */ z({
|
|
8
8
|
__name: "LinkProductSideSheet",
|
|
9
9
|
props: {
|
|
10
10
|
initialValue: { default: () => [] },
|
|
@@ -15,32 +15,32 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, W = { class: "flex gap-8
|
|
|
15
15
|
useCloseBtn: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["submit"],
|
|
18
|
-
setup(
|
|
19
|
-
const s =
|
|
20
|
-
|
|
18
|
+
setup(b, { emit: g }) {
|
|
19
|
+
const s = b, k = g, a = p(!1), d = (e) => {
|
|
20
|
+
U.isBoolean(e) ? a.value = e : a.value = !a.value;
|
|
21
21
|
};
|
|
22
22
|
function r(e) {
|
|
23
23
|
return e.reduce((t, o) => (t[o._id] = [...t[o._id] ?? [], o], t), {});
|
|
24
24
|
}
|
|
25
|
-
const y = s.initialValue, l =
|
|
25
|
+
const y = s.initialValue, l = p(r(_(y))), f = S(() => Object.values(l.value).flatMap((e) => e)), w = x(
|
|
26
26
|
() => !M.isEqual(r(s.initialValue), l.value),
|
|
27
27
|
() => {
|
|
28
28
|
a.value = !1;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
function B() {
|
|
32
|
-
k("submit",
|
|
32
|
+
k("submit", f.value), a.value = !1;
|
|
33
33
|
}
|
|
34
34
|
F(
|
|
35
35
|
() => a.value,
|
|
36
36
|
() => {
|
|
37
|
-
l.value = r(
|
|
37
|
+
l.value = r(_(s.initialValue));
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
const { t: u } =
|
|
40
|
+
const { t: u } = q();
|
|
41
41
|
return (e, t) => {
|
|
42
42
|
const o = v("fm-button"), C = v("fm-side-sheet");
|
|
43
|
-
return V(),
|
|
43
|
+
return V(), I(D, null, [
|
|
44
44
|
E(e.$slots, "default", { trigger: d }, void 0, !0),
|
|
45
45
|
i(C, {
|
|
46
46
|
id: "group-form",
|
|
@@ -57,17 +57,17 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, W = { class: "flex gap-8
|
|
|
57
57
|
"onOn:clickedAway": n(w)
|
|
58
58
|
}, {
|
|
59
59
|
"side-sheet-header": m(() => [
|
|
60
|
-
e.useCloseBtn ?
|
|
60
|
+
e.useCloseBtn ? O("", !0) : (V(), N(o, {
|
|
61
61
|
key: 0,
|
|
62
62
|
variant: n(A).Tertiary,
|
|
63
63
|
class: "cursor-pointer mr-4",
|
|
64
64
|
"prepend-icon": "arrow_back",
|
|
65
65
|
onClick: d
|
|
66
66
|
}, null, 8, ["variant"])),
|
|
67
|
-
h("p", T,
|
|
67
|
+
h("p", T, L(e.title || n(u)("menu.link_product.title")), 1)
|
|
68
68
|
]),
|
|
69
69
|
"side-sheet-footer": m(() => [
|
|
70
|
-
h("div",
|
|
70
|
+
h("div", G, [
|
|
71
71
|
i(o, {
|
|
72
72
|
label: n(u)("menu.common.actions.confirm"),
|
|
73
73
|
size: "lg",
|
|
@@ -83,12 +83,12 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, W = { class: "flex gap-8
|
|
|
83
83
|
])
|
|
84
84
|
]),
|
|
85
85
|
default: m(() => [
|
|
86
|
-
i(
|
|
86
|
+
i(P, {
|
|
87
87
|
"auto-focus-search": !0,
|
|
88
88
|
"categorized-items": e.categorizedItems,
|
|
89
89
|
data: l.value,
|
|
90
90
|
"select-variant": e.selectVariant,
|
|
91
|
-
"selected-items":
|
|
91
|
+
"selected-items": f.value,
|
|
92
92
|
"show-variant": e.showVariant,
|
|
93
93
|
"onUpdate:data": t[0] || (t[0] = (c) => l.value = c)
|
|
94
94
|
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant"])
|
|
@@ -98,7 +98,7 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, W = { class: "flex gap-8
|
|
|
98
98
|
], 64);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
}), Y = /* @__PURE__ */
|
|
101
|
+
}), Y = /* @__PURE__ */ $(H, [["__scopeId", "data-v-c33d339f"]]);
|
|
102
102
|
export {
|
|
103
103
|
Y as L
|
|
104
104
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as Q, ref as k, computed as p, resolveComponent as g, openBlock as d, createElementBlock as w, Fragment as D, createVNode as i, unref as a, withCtx as _, createElementVNode as s, toDisplayString as M, createBlock as U, renderList as Y, createCommentVNode as W, h as m, withModifiers as G } from "vue";
|
|
2
|
-
import { d as H,
|
|
3
|
-
import { components as
|
|
4
|
-
import { _ as de } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import "@feedmepos/mf-common";
|
|
2
|
+
import { d as H, b as C, h as q, u as te, i as ne, a as oe, _ as ae, f as le, k as re, j as se } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { components as X, useSnackbar as ie, useDialog as ue } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as de } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-TE9kAVkO.js";
|
|
5
|
+
import { useI18n as Z } from "@feedmepos/mf-common";
|
|
6
6
|
import { _ as J } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
7
|
-
import { u as ce, l as me } from "./lodash-
|
|
7
|
+
import { u as ce, l as me } from "./lodash-Dum3fDW4.js";
|
|
8
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" }, ke = { class: "flex items-center border-b border-b-fm-color-neutral-gray-100" }, xe = { class: "px-16 py-8 flex-1" }, Fe = { class: "py-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ Q({
|
|
9
9
|
__name: "PrintDepartmentDialog",
|
|
10
10
|
props: {
|
|
@@ -51,7 +51,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
51
51
|
applyToItems: l.value.applyToItems.filter((u) => u !== t)
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
const { t: r } =
|
|
54
|
+
const { t: r } = Z(), S = p(() => l.value._id ? r("menu.print_route.department_dialog.update.title") : r("menu.print_route.department_dialog.add.title")), F = p(() => l.value._id ? r("menu.print_route.department_dialog.update.action") : r("menu.print_route.department_dialog.add.action")), O = p(() => l.value.applyToItems.length), $ = p(
|
|
55
55
|
() => l.value.applyToItems.reduce((t, u) => (t[u] = [], t), {})
|
|
56
56
|
), e = k(""), o = p(() => {
|
|
57
57
|
const t = e.value.toLowerCase();
|
|
@@ -85,7 +85,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
|
|
|
85
85
|
"onUpdate:modelValue": u[2] || (u[2] = (v) => b.value = v),
|
|
86
86
|
header: S.value,
|
|
87
87
|
"max-width": 560,
|
|
88
|
-
"is-container": a(
|
|
88
|
+
"is-container": a(X).FmForm,
|
|
89
89
|
"is-container-props": {
|
|
90
90
|
onValidationSuccess: B,
|
|
91
91
|
blameFormChildOnValidationFailed: !0,
|
|
@@ -239,7 +239,7 @@ const Te = {
|
|
|
239
239
|
setup(f) {
|
|
240
240
|
const {
|
|
241
241
|
t: n
|
|
242
|
-
} =
|
|
242
|
+
} = Z(), y = te(), N = p(() => y.categorizedRawMenuItems), h = p(() => {
|
|
243
243
|
const e = y.state.menu.modules.item;
|
|
244
244
|
return y.printDepartments.map((c) => ({
|
|
245
245
|
...c,
|
|
@@ -274,7 +274,7 @@ const Te = {
|
|
|
274
274
|
enableSorting: !1,
|
|
275
275
|
cell: (e) => m("div", {
|
|
276
276
|
class: "flex justify-end"
|
|
277
|
-
}, [m(
|
|
277
|
+
}, [m(X.FmButton, {
|
|
278
278
|
icon: "delete",
|
|
279
279
|
textColor: "neutral-gray-400",
|
|
280
280
|
variant: "tertiary",
|