@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,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as M,
|
|
1
|
+
import { defineComponent as U, computed as i, h as u, ref as K, resolveComponent as g, openBlock as d, createElementBlock as p, createVNode as v, withCtx as h, createElementVNode as V, createBlock as j, unref as n, createCommentVNode as C, toDisplayString as A, isRef as D, Fragment as G, renderList as H } from "vue";
|
|
2
|
+
import { u as M, n as O, U as $ } from "./app-DnjfTTyH.js";
|
|
3
3
|
import { components as I, FmButtonVariant as B, FmButtonColorThemeVariant as b } from "@feedmepos/ui-library";
|
|
4
|
-
import { L as
|
|
5
|
-
import { _ as
|
|
4
|
+
import { L as q } from "./LinkProductSideSheet-Dr54Si8e.js";
|
|
5
|
+
import { _ as J } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
6
|
+
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
6
7
|
const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }, Y = {
|
|
7
8
|
key: 0,
|
|
8
9
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
9
|
-
},
|
|
10
|
+
}, ne = /* @__PURE__ */ U({
|
|
10
11
|
__name: "ApplyProduct",
|
|
11
12
|
props: {
|
|
12
13
|
title: {},
|
|
@@ -31,7 +32,7 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
31
32
|
const r = e ? (a = s.overrides) == null ? void 0 : a.filter((o) => !(o._id === t && o.combinationKey === e)) : (l = s.overrides) == null ? void 0 : l.filter((o) => o._id !== t);
|
|
32
33
|
_("update:overrides", r ?? []);
|
|
33
34
|
}
|
|
34
|
-
const { t: c } =
|
|
35
|
+
const { t: c } = Q(), N = i(
|
|
35
36
|
() => (t) => [
|
|
36
37
|
{
|
|
37
38
|
accessorKey: "label",
|
|
@@ -90,14 +91,14 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
]
|
|
93
|
-
), S =
|
|
94
|
+
), S = K({}), L = (t) => t.variant, T = i(() => k.value.reduce((t, e) => t + e.items.length, 0));
|
|
94
95
|
return (t, e) => {
|
|
95
96
|
const r = g("fm-button"), a = g("fm-search"), l = g("fm-table");
|
|
96
97
|
return d(), p("div", W, [
|
|
97
|
-
v(
|
|
98
|
+
v(J, { title: t.title }, {
|
|
98
99
|
"append-title": h(() => [
|
|
99
100
|
V("div", null, [
|
|
100
|
-
t.editable ? (d(), j(
|
|
101
|
+
t.editable ? (d(), j(q, {
|
|
101
102
|
key: 0,
|
|
102
103
|
"categorized-items": y.value,
|
|
103
104
|
"initial-value": t.overrides,
|
|
@@ -154,5 +155,5 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
157
|
export {
|
|
157
|
-
|
|
158
|
+
ne as _
|
|
158
159
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as T, ref as y, computed as k, resolveComponent as m, openBlock as p, createBlock as w, unref as G, withCtx as f, createElementVNode as s, createVNode as u, toDisplayString as g, createElementBlock as b, Fragment as F, renderList as B } from "vue";
|
|
2
|
-
import { d as V } from "./app-
|
|
2
|
+
import { d as V } from "./app-DnjfTTyH.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
|
-
import { u as H, l as J } from "./lodash-
|
|
5
|
+
import { u as H, l as J } from "./lodash-Dum3fDW4.js";
|
|
6
6
|
const M = { class: "flex items-center gap-8" }, Q = { class: "flex flex-col h-full" }, R = { class: "flex items-center gap-24 mb-16" }, W = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, X = { class: "flex-1" }, Y = { class: "grow overflow-y-auto py-16 space-y-24" }, Z = { class: "flex items-center" }, ee = { class: "ml-8 fm-card__title grow overflow-hidden text-nowrap text-ellipsis" }, te = { class: "ml-16" }, le = { class: "flex gap-8 items-center justify-start" }, ie = /* @__PURE__ */ T({
|
|
7
7
|
__name: "ApplyProducts",
|
|
8
8
|
props: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as ie, ref as I, computed as $, resolveComponent as g, openBlock as m, createElementBlock as b, Fragment as V, renderSlot as ye, createVNode as i, unref as e, withCtx as d, createElementVNode as f, renderList as w, createBlock as F, createCommentVNode as z, createTextVNode as be, toDisplayString as k, h as J, withModifiers as Q, normalizeClass as ee } from "vue";
|
|
2
|
-
import { useCoreStore as ce } from "@feedmepos/mf-common";
|
|
3
|
-
import { b as O, u as
|
|
4
|
-
import { C as Fe } from "./catalog-
|
|
2
|
+
import { useCoreStore as ce, useI18n as me } from "@feedmepos/mf-common";
|
|
3
|
+
import { b as O, u as de, i as pe, a as fe, m as oe, c as xe, g as ke, d as ae, h as ge, x as ne, _ as Ce, k as he, j as Oe, R as se } from "./app-DnjfTTyH.js";
|
|
4
|
+
import { C as Fe } from "./catalog-DEU4EW82.js";
|
|
5
5
|
import { useRouter as Me } from "vue-router";
|
|
6
6
|
import { useSnackbar as _e, components as le, FmButtonColorThemeVariant as W, FmButtonVariant as G, useDialog as De, useBreakpoints as Ve } from "@feedmepos/ui-library";
|
|
7
|
-
import { C as R, a as L, _ as re } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { C as R, a as L, _ as re } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B9CLSWLu.js";
|
|
8
8
|
import { _ as Se } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
9
9
|
import { _ as te } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
|
|
10
10
|
const Ae = { class: "space-y-32" }, Ne = {
|
|
@@ -18,7 +18,7 @@ const Ae = { class: "space-y-32" }, Ne = {
|
|
|
18
18
|
s ?? oe.generator.initMenuV4Catalog(),
|
|
19
19
|
N.value
|
|
20
20
|
));
|
|
21
|
-
}, N = $(() => D.version === O.F_MENU_VERSION.enum.v4), D =
|
|
21
|
+
}, N = $(() => D.version === O.F_MENU_VERSION.enum.v4), D = de(), P = ce(), p = pe(fe(_e())), r = I(
|
|
22
22
|
R.fromCatalog(oe.generator.initMenuV4Catalog(), N.value)
|
|
23
23
|
), Z = $(() => D.catalogs.map((c) => c.name)), S = $({
|
|
24
24
|
get: () => r.value.taxSetting,
|
|
@@ -70,7 +70,7 @@ const Ae = { class: "space-y-32" }, Ne = {
|
|
|
70
70
|
A.value = !1;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const { t: u } =
|
|
73
|
+
const { t: u } = me();
|
|
74
74
|
return X({ trigger: K }), (c, s) => {
|
|
75
75
|
const t = g("fm-text-field"), a = g("fm-radio"), o = g("fm-radio-group"), v = g("fm-checkbox"), x = g("fm-switch"), T = g("fm-select"), M = g("fm-button"), U = g("fm-chip"), E = g("fm-card"), l = g("fm-side-sheet");
|
|
76
76
|
return m(), b(V, null, [
|
|
@@ -311,9 +311,9 @@ const Ae = { class: "space-y-32" }, Ne = {
|
|
|
311
311
|
}, Ze = "main", ia = /* @__PURE__ */ ie({
|
|
312
312
|
__name: "Catalog",
|
|
313
313
|
setup(ve) {
|
|
314
|
-
const X = ce(), _ =
|
|
314
|
+
const X = ce(), _ = de(), A = _e(), K = fe(A), N = De(), D = pe(K), P = Me(), {
|
|
315
315
|
t: p
|
|
316
|
-
} =
|
|
316
|
+
} = me();
|
|
317
317
|
function r(t, a) {
|
|
318
318
|
var T, M, U, E;
|
|
319
319
|
const o = X.restaurants.value.find(({
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as j, ref as w, computed as B, watch as re, resolveComponent as y, openBlock as h, createElementBlock as T, Fragment as Z, renderSlot as ie, createVNode as u, unref as e, withCtx as v, createElementVNode as
|
|
2
|
-
import { u as K, a as me } from "./menu-
|
|
3
|
-
import { a as Y, u as pe,
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { u as ae } from "./category-
|
|
1
|
+
import { defineComponent as j, ref as w, computed as B, watch as re, resolveComponent as y, openBlock as h, createElementBlock as T, Fragment as Z, renderSlot as ie, createVNode as u, unref as e, withCtx as v, createElementVNode as o, toDisplayString as L, h as z, withModifiers as R, getCurrentInstance as ce, renderList as ue, createBlock as O, createCommentVNode as de } from "vue";
|
|
2
|
+
import { u as K, a as me } from "./menu-Bxe-VCgS.js";
|
|
3
|
+
import { a as Y, u as pe, b as A, g as fe, h as ee, i as q, j as ge, _ as _e, k as ye, f as ve } from "./app-DnjfTTyH.js";
|
|
4
|
+
import { useSnackbar as G, components as P, useDialog as te, FmButtonVariant as Q, useBreakpoints as he, FmButtonColorThemeVariant as be } from "@feedmepos/ui-library";
|
|
5
|
+
import { u as ae } from "./category-CBXUkjZW.js";
|
|
6
6
|
import { c as xe } from "./createForm-DPAQWnoK.js";
|
|
7
|
-
import { c as W } from "./object-
|
|
8
|
-
import { u as Ce } from "./item-
|
|
7
|
+
import { c as W } from "./object-BNFM25tr.js";
|
|
8
|
+
import { u as Ce } from "./item-BVtbX-DR.js";
|
|
9
9
|
import { _ as X } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
10
|
-
import { u as ke } from "./lodash-
|
|
10
|
+
import { u as ke } from "./lodash-Dum3fDW4.js";
|
|
11
|
+
import { useI18n as H } from "@feedmepos/mf-common";
|
|
11
12
|
function we(p, f = "This field can't be empty.") {
|
|
12
13
|
return p == null || Array.isArray(p) && p.length === 0 || typeof p == "string" && p.trim() === "" ? f : !0;
|
|
13
14
|
}
|
|
@@ -34,16 +35,16 @@ const Fe = {
|
|
|
34
35
|
expose: f,
|
|
35
36
|
emit: F
|
|
36
37
|
}) {
|
|
37
|
-
const x = p, k =
|
|
38
|
+
const x = p, k = G(), V = Y(k), g = q(V), s = pe(), b = Ce(), {
|
|
38
39
|
categories: i
|
|
39
40
|
} = K(), {
|
|
40
41
|
t: d
|
|
41
|
-
} =
|
|
42
|
+
} = H(), $ = w(!1), m = w(!1), M = (t) => {
|
|
42
43
|
fe.isBoolean(t) ? m.value = t : m.value = !m.value;
|
|
43
44
|
}, c = w(W(x.initialValue)), S = w(""), E = B(() => {
|
|
44
45
|
var t;
|
|
45
46
|
return ((t = i.value.find((a) => a.id === c.value.id)) == null ? void 0 : t.items) || [];
|
|
46
|
-
}),
|
|
47
|
+
}), n = [{
|
|
47
48
|
accessorKey: "name",
|
|
48
49
|
header: () => d("menu.category.products.columns.name"),
|
|
49
50
|
enableSorting: !1,
|
|
@@ -67,7 +68,7 @@ const Fe = {
|
|
|
67
68
|
outline: !0,
|
|
68
69
|
class: "cursor-pointer",
|
|
69
70
|
color: "neutral-gray-400",
|
|
70
|
-
onClick:
|
|
71
|
+
onClick: R(async () => {
|
|
71
72
|
await _(a);
|
|
72
73
|
}, ["stop", "prevent"])
|
|
73
74
|
})]);
|
|
@@ -79,7 +80,7 @@ const Fe = {
|
|
|
79
80
|
async function _(t) {
|
|
80
81
|
await b.update(t._id);
|
|
81
82
|
}
|
|
82
|
-
const N = B(() => s.version ===
|
|
83
|
+
const N = B(() => s.version === A.F_MENU_VERSION.enum.v4);
|
|
83
84
|
async function U(t) {
|
|
84
85
|
await b.rearrange(t.map((a) => a._id));
|
|
85
86
|
}
|
|
@@ -87,11 +88,11 @@ const Fe = {
|
|
|
87
88
|
m.value = !1;
|
|
88
89
|
});
|
|
89
90
|
async function D() {
|
|
90
|
-
const t = s.categories.find((
|
|
91
|
+
const t = s.categories.find((I) => I._id === c.value.id), {
|
|
91
92
|
updateMenu: a
|
|
92
93
|
} = g;
|
|
93
94
|
await a({
|
|
94
|
-
module:
|
|
95
|
+
module: A.F_MENU_MODULE_V4_KEY.enum.category,
|
|
95
96
|
operation: ee.F_OPERATION_TYPE.update,
|
|
96
97
|
data: {
|
|
97
98
|
...t,
|
|
@@ -105,7 +106,7 @@ const Fe = {
|
|
|
105
106
|
trigger: M,
|
|
106
107
|
show: m
|
|
107
108
|
}), (t, a) => {
|
|
108
|
-
const
|
|
109
|
+
const I = y("FmTextField"), oe = y("FmButton"), ne = y("FmSearch"), le = y("FmTable"), J = y("fm-button"), se = y("fm-side-sheet");
|
|
109
110
|
return h(), T(Z, null, [ie(t.$slots, "default", {
|
|
110
111
|
trigger: M
|
|
111
112
|
}), u(se, {
|
|
@@ -121,8 +122,8 @@ const Fe = {
|
|
|
121
122
|
"z-index": 50,
|
|
122
123
|
"onOn:clickedAway": e(r)
|
|
123
124
|
}, {
|
|
124
|
-
"side-sheet-header": v(() => [
|
|
125
|
-
"side-sheet-footer": v(() => [
|
|
125
|
+
"side-sheet-header": v(() => [o("p", Fe, L(e(d)("menu.category.title")), 1)]),
|
|
126
|
+
"side-sheet-footer": v(() => [o("div", Te, [u(J, {
|
|
126
127
|
label: e(d)("menu.common.actions.update"),
|
|
127
128
|
loading: $.value,
|
|
128
129
|
size: "lg",
|
|
@@ -135,10 +136,10 @@ const Fe = {
|
|
|
135
136
|
variant: "tertiary",
|
|
136
137
|
onClick: a[3] || (a[3] = () => m.value = !1)
|
|
137
138
|
}, null, 8, ["label"])])]),
|
|
138
|
-
default: v(() => [
|
|
139
|
+
default: v(() => [o("div", Ve, [u(X, {
|
|
139
140
|
title: e(d)("menu.category.detail")
|
|
140
141
|
}, {
|
|
141
|
-
default: v(() => [u(
|
|
142
|
+
default: v(() => [u(I, {
|
|
142
143
|
label: e(d)("menu.category.name"),
|
|
143
144
|
modelValue: c.value.name,
|
|
144
145
|
"onUpdate:modelValue": a[0] || (a[0] = (C) => c.value.name = C),
|
|
@@ -151,7 +152,7 @@ const Fe = {
|
|
|
151
152
|
class: "flex-1 min-h-0",
|
|
152
153
|
shrinkable: !0
|
|
153
154
|
}, {
|
|
154
|
-
"append-title": v(() => [u(
|
|
155
|
+
"append-title": v(() => [u(oe, {
|
|
155
156
|
label: e(d)("menu.category.products.add"),
|
|
156
157
|
variant: "secondary",
|
|
157
158
|
"prepend-icon": "add",
|
|
@@ -159,14 +160,14 @@ const Fe = {
|
|
|
159
160
|
"border-color": "primary",
|
|
160
161
|
onClick: l
|
|
161
162
|
}, null, 8, ["label"])]),
|
|
162
|
-
default: v(() => [
|
|
163
|
+
default: v(() => [o("div", $e, [o("div", Me, L(e(d)("menu.category.products.linked_count", {
|
|
163
164
|
count: E.value.length
|
|
164
|
-
})), 1),
|
|
165
|
+
})), 1), o("div", Se, [u(ne, {
|
|
165
166
|
placeholder: e(d)("menu.common.actions.search"),
|
|
166
167
|
modelValue: S.value,
|
|
167
168
|
"onUpdate:modelValue": a[1] || (a[1] = (C) => S.value = C)
|
|
168
|
-
}, null, 8, ["placeholder", "modelValue"])])]),
|
|
169
|
-
"column-defs":
|
|
169
|
+
}, null, 8, ["placeholder", "modelValue"])])]), o("div", Ee, [u(le, {
|
|
170
|
+
"column-defs": n,
|
|
170
171
|
draggable: N.value,
|
|
171
172
|
"page-size": E.value.length,
|
|
172
173
|
"row-data": E.value,
|
|
@@ -194,9 +195,9 @@ const Fe = {
|
|
|
194
195
|
class: "flex-1 flex flex-col min-h-0"
|
|
195
196
|
}, De = {
|
|
196
197
|
class: "p-8"
|
|
197
|
-
},
|
|
198
|
+
}, Ie = {
|
|
198
199
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
199
|
-
},
|
|
200
|
+
}, Re = ["onClick"], Ae = {
|
|
200
201
|
class: "flex-1 space-y-4"
|
|
201
202
|
}, Pe = {
|
|
202
203
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -205,14 +206,14 @@ const Fe = {
|
|
|
205
206
|
}, Ke = /* @__PURE__ */ j({
|
|
206
207
|
__name: "CategoryTable",
|
|
207
208
|
setup(p) {
|
|
208
|
-
const f = te(), F =
|
|
209
|
+
const f = te(), F = G(), x = Y(F), k = q(x), V = ae({
|
|
209
210
|
dialog: f,
|
|
210
211
|
menuLoader: k
|
|
211
212
|
}), {
|
|
212
213
|
categories: g
|
|
213
|
-
} = K(), s = w(""), b = B(() => g.value.filter((
|
|
214
|
+
} = K(), s = w(""), b = B(() => g.value.filter((n) => n.name.toLowerCase().includes(s.value.toLowerCase()))), {
|
|
214
215
|
t: i
|
|
215
|
-
} =
|
|
216
|
+
} = H(), d = w([{
|
|
216
217
|
accessorKey: "name",
|
|
217
218
|
header: () => i("menu.category.columns.title"),
|
|
218
219
|
enableSorting: !1,
|
|
@@ -224,8 +225,8 @@ const Fe = {
|
|
|
224
225
|
header: () => i("menu.category.columns.products"),
|
|
225
226
|
enableSorting: !1,
|
|
226
227
|
size: 200,
|
|
227
|
-
cell: (
|
|
228
|
-
const l =
|
|
228
|
+
cell: (n) => {
|
|
229
|
+
const l = n.row.original;
|
|
229
230
|
return i(l.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
230
231
|
count: l.items.length
|
|
231
232
|
});
|
|
@@ -238,8 +239,8 @@ const Fe = {
|
|
|
238
239
|
headerContentClass: "-mx-16"
|
|
239
240
|
},
|
|
240
241
|
header: "",
|
|
241
|
-
cell: (
|
|
242
|
-
const l =
|
|
242
|
+
cell: (n) => {
|
|
243
|
+
const l = n.row.original;
|
|
243
244
|
return z("div", {
|
|
244
245
|
class: "flex justify-end"
|
|
245
246
|
}, [z(P.FmButton, {
|
|
@@ -247,14 +248,14 @@ const Fe = {
|
|
|
247
248
|
disabled: !l.id,
|
|
248
249
|
variant: "tertiary",
|
|
249
250
|
textColor: "neutral-gray-400",
|
|
250
|
-
onClick:
|
|
251
|
+
onClick: R(async () => {
|
|
251
252
|
await $(l);
|
|
252
253
|
}, ["stop", "prevent"])
|
|
253
254
|
})]);
|
|
254
255
|
}
|
|
255
256
|
}]);
|
|
256
|
-
async function $(
|
|
257
|
-
if (!
|
|
257
|
+
async function $(n) {
|
|
258
|
+
if (!n.id) {
|
|
258
259
|
F.open({
|
|
259
260
|
message: i("menu.category.dialog.remove.error"),
|
|
260
261
|
type: "warning"
|
|
@@ -264,7 +265,7 @@ const Fe = {
|
|
|
264
265
|
f.open({
|
|
265
266
|
title: i("menu.category.dialog.remove.title"),
|
|
266
267
|
message: i("menu.common.dialog.remove_confirmation", {
|
|
267
|
-
name:
|
|
268
|
+
name: n.name
|
|
268
269
|
}),
|
|
269
270
|
primaryActions: {
|
|
270
271
|
text: "Remove",
|
|
@@ -277,26 +278,26 @@ const Fe = {
|
|
|
277
278
|
}
|
|
278
279
|
}).onPrimary(async () => {
|
|
279
280
|
await k.updateMenu({
|
|
280
|
-
module:
|
|
281
|
+
module: A.F_MENU_MODULE_V4_KEY.enum.category,
|
|
281
282
|
operation: ee.F_OPERATION_TYPE.delete,
|
|
282
|
-
data:
|
|
283
|
-
},
|
|
283
|
+
data: n.id
|
|
284
|
+
}, n.name, !0);
|
|
284
285
|
});
|
|
285
286
|
}
|
|
286
|
-
async function m(
|
|
287
|
-
const l =
|
|
287
|
+
async function m(n) {
|
|
288
|
+
const l = n.map((_) => _.id).filter((_) => !!_);
|
|
288
289
|
await V.rearrange(l);
|
|
289
290
|
}
|
|
290
291
|
const M = ce();
|
|
291
|
-
async function c(
|
|
292
|
+
async function c(n) {
|
|
292
293
|
xe(M, Le, {
|
|
293
|
-
initialValue:
|
|
294
|
+
initialValue: n
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
297
|
const S = he(), E = B(() => S.breakpoints.value.xs);
|
|
297
|
-
return (
|
|
298
|
+
return (n, l) => {
|
|
298
299
|
const _ = y("FmSearch"), N = y("FmTable"), U = y("FmButton");
|
|
299
|
-
return E.value ? (h(), T("div", Ue, [
|
|
300
|
+
return E.value ? (h(), T("div", Ue, [o("div", De, [u(_, {
|
|
300
301
|
autofocus: "",
|
|
301
302
|
modelValue: s.value,
|
|
302
303
|
"onUpdate:modelValue": l[2] || (l[2] = (r) => s.value = r),
|
|
@@ -304,19 +305,19 @@ const Fe = {
|
|
|
304
305
|
placeholder: e(i)("menu.common.labels.search_placeholder", {
|
|
305
306
|
type: "categories"
|
|
306
307
|
})
|
|
307
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
308
|
+
}, null, 8, ["modelValue", "placeholder"])]), o("div", Ie, [(h(!0), T(Z, null, ue(b.value, (r) => (h(), T("div", {
|
|
308
309
|
key: r.id || "",
|
|
309
310
|
class: "flex flex-row py-12 px-16",
|
|
310
311
|
onClick: (D) => c(r)
|
|
311
|
-
}, [
|
|
312
|
+
}, [o("div", Ae, [o("p", Pe, L(r.name), 1), o("p", je, L(e(i)(r.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
312
313
|
count: r.items.length
|
|
313
314
|
})), 1)]), u(U, {
|
|
314
315
|
"text-color": e(be).NeutralGray400,
|
|
315
316
|
variant: e(Q).Tertiary,
|
|
316
317
|
"prepend-icon": "delete",
|
|
317
318
|
disabled: !r.id,
|
|
318
|
-
onClick:
|
|
319
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
319
|
+
onClick: R((D) => $(r), ["stop"])
|
|
320
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Re))), 128))])])) : (h(), T("div", Oe, [o("div", ze, [o("div", Ne, [u(_, {
|
|
320
321
|
modelValue: s.value,
|
|
321
322
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => s.value = r),
|
|
322
323
|
autofocus: "",
|
|
@@ -341,10 +342,10 @@ const Fe = {
|
|
|
341
342
|
})]));
|
|
342
343
|
};
|
|
343
344
|
}
|
|
344
|
-
}), Ye = { class: "flex-1 flex justify-between gap-8 pl-8" }, qe = { class: "flex items-center" }, Ge = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, He = { class: "fm-typo-en-body-md-600 font-semibold" },
|
|
345
|
+
}), Ye = { class: "flex-1 flex justify-between gap-8 pl-8" }, qe = { class: "flex items-center" }, Ge = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, He = { class: "fm-typo-en-body-md-600 font-semibold" }, st = /* @__PURE__ */ j({
|
|
345
346
|
__name: "Category",
|
|
346
347
|
setup(p) {
|
|
347
|
-
const f = te(), F =
|
|
348
|
+
const f = te(), F = G(), x = Y(F), k = q(x), V = ae({ dialog: f, menuLoader: k }), { categories: g } = K(), { t: s } = H();
|
|
348
349
|
function b() {
|
|
349
350
|
V.create();
|
|
350
351
|
}
|
|
@@ -364,10 +365,10 @@ const Fe = {
|
|
|
364
365
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
365
366
|
]),
|
|
366
367
|
"append-heading": v(() => [
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
368
|
+
o("div", Ye, [
|
|
369
|
+
o("div", qe, [
|
|
370
|
+
o("div", Ge, [
|
|
371
|
+
o("p", He, L(i.value), 1)
|
|
371
372
|
])
|
|
372
373
|
]),
|
|
373
374
|
e(g).length > 0 ? (h(), O(ve, {
|
|
@@ -383,5 +384,5 @@ const Fe = {
|
|
|
383
384
|
}
|
|
384
385
|
});
|
|
385
386
|
export {
|
|
386
|
-
|
|
387
|
+
st as default
|
|
387
388
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as le, ref as h, computed as w, resolveComponent as x, openBlock as g, createBlock as P, unref as t, withCtx as c, createElementVNode as a, createVNode as i, toDisplayString as V, createElementBlock as $, Fragment as z, renderList as q, createTextVNode as be, withModifiers as se, createCommentVNode as ce, h as R } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { d as Z, b as ee, h as ue, u as ye, i as ke, a as he, _ as xe, f as Ce, k as we, j as Ve } from "./app-DnjfTTyH.js";
|
|
3
3
|
import { components as de, useSnackbar as Fe, useDialog as Se } from "@feedmepos/ui-library";
|
|
4
4
|
import { V as $e } from "./vuedraggable-WU01qJgi.js";
|
|
5
|
-
import { _ as Ie } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import "@feedmepos/mf-common";
|
|
5
|
+
import { _ as Ie } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-TE9kAVkO.js";
|
|
6
|
+
import { useI18n as ie } from "@feedmepos/mf-common";
|
|
7
7
|
import { _ as X } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
8
|
-
import { u as me, l as pe } from "./lodash-
|
|
8
|
+
import { u as me, l as pe } from "./lodash-Dum3fDW4.js";
|
|
9
9
|
const Oe = { class: "flex items-center gap-8" }, De = { class: "grow" }, Ne = { class: "space-y-32" }, Le = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, Ue = { class: "px-16 py-8 w-[40%]" }, Ge = { class: "px-16 py-8 grow" }, Ke = { class: "flex items-center border-b border-b-fm-color-neutral-gray-100" }, Be = { class: "px-16 py-8 w-[40%]" }, Ee = { class: "px-16 py-8 grow" }, Me = { class: "space-y-16" }, ze = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Te = { class: "flex gap-8 items-center justify-start" }, Re = /* @__PURE__ */ le({
|
|
10
10
|
__name: "CookingGuideStepDialog",
|
|
11
11
|
emits: ["onComplete"],
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import { A as
|
|
6
|
-
|
|
1
|
+
import { defineComponent as m, ref as c, openBlock as i, createBlock as d, unref as n, withCtx as a, createVNode as l, createElementVNode as e, toDisplayString as p, createCommentVNode as u } from "vue";
|
|
2
|
+
import { _ as f, f as _ } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { _ as g } from "./Group.vue_vue_type_script_setup_true_lang-D_YJ5tL_.js";
|
|
4
|
+
import { a as y } from "./menu-Bxe-VCgS.js";
|
|
5
|
+
import { A as b } from "./item-BVtbX-DR.js";
|
|
6
|
+
import { useI18n as h } from "@feedmepos/mf-common";
|
|
7
|
+
const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "flex items-center" }, k = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, C = { class: "fm-typo-en-body-md-600 font-semibold" }, S = /* @__PURE__ */ m({
|
|
7
8
|
__name: "Group",
|
|
8
9
|
setup(N) {
|
|
9
|
-
const t =
|
|
10
|
-
return
|
|
10
|
+
const t = c(0), { t: s } = h();
|
|
11
|
+
return y().resetOnMount(), (V, r) => (i(), d(f, {
|
|
11
12
|
heading: n(s)("menu.group.title")
|
|
12
13
|
}, {
|
|
13
14
|
default: a(() => [
|
|
14
|
-
l(
|
|
15
|
+
l(g, {
|
|
15
16
|
"onUpdate:count": r[0] || (r[0] = (o) => t.value = o)
|
|
16
17
|
})
|
|
17
18
|
]),
|
|
@@ -23,9 +24,9 @@ const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "fle
|
|
|
23
24
|
])
|
|
24
25
|
]),
|
|
25
26
|
e("div", null, [
|
|
26
|
-
t.value > 0 ? (
|
|
27
|
+
t.value > 0 ? (i(), d(n(b), { key: 0 }, {
|
|
27
28
|
default: a(({ trigger: o }) => [
|
|
28
|
-
l(
|
|
29
|
+
l(_, {
|
|
29
30
|
label: n(s)("menu.group.actions.add"),
|
|
30
31
|
"prepend-icon": "add",
|
|
31
32
|
type: "button",
|
|
@@ -42,5 +43,5 @@ const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "fle
|
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
S as default
|
|
46
47
|
};
|