@feedmepos/mf-menu 0.31.31-beta.1 → 0.31.31-prod
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-1TX8v7ZA.js → App-Cvgz2kQV.js} +22 -24
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bq84uuiq.js} +22 -22
- package/dist/{Catalog-DWClc58s.js → Catalog-Ye-KpQ31.js} +74 -75
- package/dist/{Category-BqKFvFam.js → Category-BPChBqVR.js} +60 -60
- package/dist/{Category-IYMtMoT-.js → Category-CHcxix2b.js} +28 -28
- package/dist/{CookingGuide-BayJ6zj4.js → CookingGuide-DgygBSoB.js} +101 -103
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-ClV6LD2-.js} +1 -1
- package/dist/{Group-LqSX7ue6.js → Group-223G1Edd.js} +1 -1
- package/dist/{Group-RujTPTns.js → Group-B7EU1xmY.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js → Group.vue_vue_type_script_setup_true_lang-CAZuyOPy.js} +137 -138
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdjRWC9z.js} +13 -13
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BRQm-UTk.js} +5067 -5049
- package/dist/{Ingredient-_tc8llr1.js → Ingredient-Dl1Z5Qt2.js} +64 -65
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js} +1061 -1063
- package/dist/{LinkProductSideSheet-C6rF-G1v.js → LinkProductSideSheet-Y-Z9_9Kp.js} +12 -14
- package/dist/{MenuSetting-xDHeeROY.js → MenuSetting-Be44fmVj.js} +26 -27
- package/dist/{PrintRoute-B_TFMn5e.js → PrintRoute-BURAEZ6X.js} +15 -17
- package/dist/{Product-DdEEqrtc.js → Product-DSlVHbgr.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-zcistmwh.js → Product.vue_vue_type_script_setup_true_lang-DtYarO0L.js} +256 -257
- package/dist/{ProductInternalTools-BcC7BF6W.js → ProductInternalTools-gW57aUAO.js} +45 -45
- package/dist/{Products-Cu0cJshV.js → Products-Czr-70M8.js} +72 -74
- package/dist/{Publish-Bm3Xiks1.js → Publish-XCowNW_z.js} +32 -34
- package/dist/{Recipe-DWK-luIZ.js → Recipe-6oNz21AB.js} +63 -65
- package/dist/{Scheduler-Cb1TeBhW.js → Scheduler-UYFuFk5E.js} +19 -19
- package/dist/{ServingSequence-evSIET_8.js → ServingSequence-w66ujU4D.js} +34 -34
- package/dist/{Setting-Cn3kwC9F.js → Setting-Dgn3lOx7.js} +53 -54
- package/dist/{Subcategory-q4m4qHsU.js → Subcategory-lnzuxCCH.js} +34 -34
- package/dist/{Takeaway-ClepHYGu.js → Takeaway-C5Up5Odr.js} +14 -14
- package/dist/{Takeaway-D-rdUZuh.js → Takeaway-DP1GJUPF.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js → Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js} +40 -41
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-yEIxG4F2.js} +1108 -1109
- package/dist/{Unit-IM8Naj82.js → Unit-Bt8aRidX.js} +12 -12
- package/dist/{Variant-fzGvwaMo.js → Variant-DXoOAa9M.js} +16 -16
- package/dist/{_id_-BsKNG9Qv.js → _id_-D9tvinax.js} +22 -22
- package/dist/{app-BzQRUMTK.js → app-Cnlv4rmj.js} +3 -3
- package/dist/{app-CoVUUCa_.js → app-DiizQWjo.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +88 -16
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +360 -184
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +80 -28
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +4 -4
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +218 -150
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +142 -82
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +108 -74
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +80 -28
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +176 -32
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +324 -222
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +108 -74
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +108 -74
- package/dist/apps/mf-menu/src/helper/menu.d.ts +1523 -1155
- package/dist/apps/mf-menu/src/manager/menu/category.d.ts +4 -4
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +4 -4
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +324 -222
- package/dist/apps/mf-menu/src/stores/manager/recipe.d.ts +12 -12
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +142 -82
- package/dist/apps/mf-menu/src/stores/manager/sku.d.ts +60 -60
- package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +6 -6
- package/dist/apps/mf-menu/src/stores/manager/unit.d.ts +12 -12
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1375 -1041
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +4 -4
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +352 -132
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +84 -32
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +84 -32
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-D7AwcSC5.js +24 -0
- package/dist/assets/override-menu-Y9T4wxEn.js +24 -0
- package/dist/assets/validate-menu-DiAW2jY1.js +24 -0
- package/dist/{catalog-CaXceaA2.js → catalog-DUSCax4J.js} +1 -1
- package/dist/{catalogSetting-BGvckFdh.js → catalogSetting-18FJ5pkA.js} +1 -1
- package/dist/{category-u5eo_Vjd.js → category-B9XvlPFy.js} +3 -5
- package/dist/currency-Sno8fZYc.js +7 -0
- package/dist/{dayjs.min-Bsr3tJCn.js → dayjs.min-BsfKOrNo.js} +1 -1
- package/dist/{index-tRQb7RN_.js → index-BDpkSKDX.js} +1 -1
- package/dist/{index-Bbx4iZ6n.js → index-Eomwf2OO.js} +27 -27
- package/dist/{index-DSAG0yWh.js → index-ltyOwsRO.js} +20 -22
- package/dist/{item-BAqzKh4O.js → item-5Kkzf_eF.js} +1069 -1071
- package/dist/{jszip.min-BKJtvCjM.js → jszip.min-CRfpGjN8.js} +545 -545
- package/dist/menu-Btcr0nsk.js +108040 -0
- package/dist/{menu-CDrsBjmr.js → menu-DYs_VNfB.js} +9 -11
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DfbHonGe.js → priceTier-DvUjWwCM.js} +4 -4
- package/dist/{scheduler-DTWaBudB.js → scheduler-C76blUlS.js} +11 -13
- package/dist/{subcategory-D-R5r1Tr.js → subcategory-C44qN5Vk.js} +133 -135
- package/dist/{toExcel-84VTtSA7.js → toExcel--vNjpF-b.js} +2 -2
- package/dist/{unit-B4zscxzo.js → unit-C4ghZU8x.js} +23 -24
- package/package.json +5 -5
- package/dist/assets/linked-status-eQqjvOq_.js +0 -24
- package/dist/assets/override-menu-C8NTBJgN.js +0 -24
- package/dist/assets/validate-menu-Dn-OO7Ed.js +0 -24
- package/dist/currency-BPHwez-E.js +0 -7
- package/dist/menu-CsIzrBEr.js +0 -74044
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { defineComponent as ie, computed as b, ref as $, reactive as Ve, watch as Ce, resolveComponent as d, createElementBlock as y, openBlock as m, Fragment as V, renderSlot as Me, createVNode as s, unref as e, withCtx as k, createBlock as
|
|
1
|
+
import { defineComponent as ie, computed as b, ref as $, reactive as Ve, watch as Ce, resolveComponent as d, createElementBlock as y, openBlock as m, Fragment as V, renderSlot as Me, createVNode as s, unref as e, withCtx as k, createBlock as I, createCommentVNode as G, createElementVNode as v, renderList as j, normalizeClass as J, createTextVNode as we, toDisplayString as U, getCurrentInstance as Ee, h as te, withModifiers as oe } from "vue";
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as W, components as se, useDialog as $e, FmButtonVariant as ue, useBreakpoints as Ue } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
4
|
+
import { _ as Ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { O as re, D as X, u as Z, H as Oe, B as K, I as Be, e as le, J as q, G as H } from "./menu-Btcr0nsk.js";
|
|
6
|
+
import { _ as Ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
7
|
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
8
|
import { defineStore as Te } from "pinia";
|
|
9
|
-
import { _ as
|
|
10
|
-
import { F_INVENTORY_BINDING_TYPE as ae } from "@feedmepos/core/entity";
|
|
9
|
+
import { _ as ae, g as Le } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js";
|
|
11
10
|
import { u as De } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { c as
|
|
13
|
-
import { u as
|
|
14
|
-
import { c as
|
|
15
|
-
const
|
|
11
|
+
import { c as Pe } from "./check-C9mY6LiX.js";
|
|
12
|
+
import { u as Re } from "./unit-C4ghZU8x.js";
|
|
13
|
+
import { c as Ae } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
14
|
+
const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
|
|
16
15
|
key: 0,
|
|
17
16
|
class: "pt-8 flex flex-col gap-8"
|
|
18
17
|
}, Ke = {
|
|
19
18
|
key: 1,
|
|
20
19
|
class: "pt-8 space-y-40"
|
|
21
|
-
},
|
|
20
|
+
}, Ge = { class: "flex flex-row gap-16" }, je = { class: "overflow-x-hidden overflow-y-auto max-h-[300px]" }, qe = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ie({
|
|
22
21
|
__name: "Form",
|
|
23
22
|
props: {
|
|
24
23
|
initialValue: { default: void 0 },
|
|
25
24
|
usedCodes: { default: () => [] },
|
|
26
25
|
invalidSkuAndRecipe: {}
|
|
27
26
|
},
|
|
28
|
-
setup(T, { expose:
|
|
29
|
-
const { t: l } = Q(), r = T, u = re(X(W())), S =
|
|
27
|
+
setup(T, { expose: N }) {
|
|
28
|
+
const { t: l } = Q(), r = T, u = re(X(W())), S = Re(), h = b(() => r.initialValue ? l("menu.sku.update") : l("menu.sku.add")), x = b(
|
|
30
29
|
() => r.initialValue ? l("menu.common.actions.update") : l("menu.common.actions.add")
|
|
31
30
|
), C = $(!1), f = $(!1), M = (t) => {
|
|
32
|
-
|
|
33
|
-
}, O = Z(), a = b(() => O.units), i = b(() => a.value.map(({ name: t, _id: o, abbrev: g, measurements:
|
|
31
|
+
Pe.isBoolean(t) ? f.value = t : f.value = !f.value;
|
|
32
|
+
}, O = Z(), a = b(() => O.units), i = b(() => a.value.map(({ name: t, _id: o, abbrev: g, measurements: B }) => ({
|
|
34
33
|
label: t,
|
|
35
34
|
value: o,
|
|
36
35
|
options: [
|
|
@@ -38,9 +37,9 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
38
37
|
label: `${t} (${g})`,
|
|
39
38
|
value: null
|
|
40
39
|
},
|
|
41
|
-
...
|
|
42
|
-
label: `${
|
|
43
|
-
value:
|
|
40
|
+
...B.map(({ name: A, id: Y, abbrev: z }) => ({
|
|
41
|
+
label: `${A} (${z})`,
|
|
42
|
+
value: Y
|
|
44
43
|
}))
|
|
45
44
|
]
|
|
46
45
|
}))), c = b(() => a.value.length > 0), n = Ve(
|
|
@@ -48,14 +47,14 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
48
47
|
...K.generator.initSku(),
|
|
49
48
|
unit: a.value[0] || K.generator.initUnit()
|
|
50
49
|
}
|
|
51
|
-
), F = $(!!n.convert),
|
|
50
|
+
), F = $(!!n.convert), L = b(() => {
|
|
52
51
|
var o;
|
|
53
52
|
const t = i.value.find((g) => g.value === n.unit._id);
|
|
54
53
|
return ((o = ((t == null ? void 0 : t.options) || []).find((g) => g.value === (n.trackingMeasurement || null))) == null ? void 0 : o.label) || "";
|
|
55
54
|
}), D = (t) => n.unit._id === t.value && n.trackingMeasurement === (t.value || null);
|
|
56
55
|
function _(t, o) {
|
|
57
56
|
const g = o || void 0;
|
|
58
|
-
n.unit._id === t && n.trackingMeasurement === g || (n.unit = a.value.find((
|
|
57
|
+
n.unit._id === t && n.trackingMeasurement === g || (n.unit = a.value.find((B) => B._id === t), n.trackingMeasurement = g, n.convert && (n.convert.measurement = g));
|
|
59
58
|
}
|
|
60
59
|
const de = b(() => {
|
|
61
60
|
const t = i.value.find((o) => o.value === n.unit._id);
|
|
@@ -76,17 +75,17 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
76
75
|
F.value && (n.convert = {
|
|
77
76
|
...n.convert,
|
|
78
77
|
inventoryBindings: t
|
|
79
|
-
}),
|
|
78
|
+
}), R.value = !1;
|
|
80
79
|
}
|
|
81
80
|
const pe = b(() => r.invalidSkuAndRecipe.skus), ve = b(() => r.invalidSkuAndRecipe.recipes);
|
|
82
81
|
l("menu.sku.errors.select_recipe_ingredient");
|
|
83
|
-
const
|
|
82
|
+
const R = $(!1);
|
|
84
83
|
function _e() {
|
|
85
84
|
var t;
|
|
86
|
-
return
|
|
85
|
+
return R.value = (((t = n.convert) == null ? void 0 : t.inventoryBindings) || []).length === 0, !R.value;
|
|
87
86
|
}
|
|
88
87
|
const fe = De(
|
|
89
|
-
() => !
|
|
88
|
+
() => !Be.isEqual(n, r.initialValue || K.generator.initSku()),
|
|
90
89
|
() => {
|
|
91
90
|
f.value = !1;
|
|
92
91
|
}
|
|
@@ -100,14 +99,14 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
100
99
|
r.initialValue ? await u.updateMenu(
|
|
101
100
|
{
|
|
102
101
|
module: H.F_MENU_MODULE_V4_KEY.enum.sku,
|
|
103
|
-
operation:
|
|
102
|
+
operation: q.F_OPERATION_TYPE.update,
|
|
104
103
|
data: o
|
|
105
104
|
},
|
|
106
105
|
o.name
|
|
107
106
|
) : await u.updateMenu(
|
|
108
107
|
{
|
|
109
108
|
module: H.F_MENU_MODULE_V4_KEY.enum.sku,
|
|
110
|
-
operation:
|
|
109
|
+
operation: q.F_OPERATION_TYPE.create,
|
|
111
110
|
data: o
|
|
112
111
|
},
|
|
113
112
|
o.name
|
|
@@ -120,11 +119,11 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
120
119
|
() => f.value,
|
|
121
120
|
(t) => {
|
|
122
121
|
}
|
|
123
|
-
),
|
|
122
|
+
), N({
|
|
124
123
|
show: f,
|
|
125
124
|
trigger: M
|
|
126
125
|
}), (t, o) => {
|
|
127
|
-
const g = d("FmTextField"),
|
|
126
|
+
const g = d("FmTextField"), B = d("FmLabel"), A = d("FmField"), Y = d("FmMenuHeader"), z = d("FmMenuDivider"), ge = d("FmMenuItem"), ye = d("FmMenu"), ke = d("FmFormGroup"), he = d("FmSwitch"), xe = d("FmSelect"), Fe = d("FmCard"), ne = d("fm-button"), Se = d("fm-side-sheet");
|
|
128
127
|
return m(), y(V, null, [
|
|
129
128
|
Me(t.$slots, "default", { trigger: M }),
|
|
130
129
|
s(Se, {
|
|
@@ -140,10 +139,10 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
140
139
|
"onOn:clickedAway": e(fe)
|
|
141
140
|
}, {
|
|
142
141
|
"side-sheet-header": k(() => [
|
|
143
|
-
v("p",
|
|
142
|
+
v("p", Ye, U(h.value), 1)
|
|
144
143
|
]),
|
|
145
144
|
"side-sheet-footer": k(() => [
|
|
146
|
-
v("div",
|
|
145
|
+
v("div", qe, [
|
|
147
146
|
s(ne, {
|
|
148
147
|
label: x.value,
|
|
149
148
|
loading: C.value,
|
|
@@ -161,7 +160,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
161
160
|
]),
|
|
162
161
|
default: k(() => [
|
|
163
162
|
c.value ? (m(), y("div", Ke, [
|
|
164
|
-
v("div",
|
|
163
|
+
v("div", Ge, [
|
|
165
164
|
s(g, {
|
|
166
165
|
class: "flex-2",
|
|
167
166
|
label: e(l)("menu.sku.columns.code"),
|
|
@@ -189,17 +188,17 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
189
188
|
s(ke, {
|
|
190
189
|
class: "col-span-2",
|
|
191
190
|
"label-mark": "required",
|
|
192
|
-
"model-value":
|
|
191
|
+
"model-value": L.value
|
|
193
192
|
}, {
|
|
194
193
|
label: k(() => [
|
|
195
|
-
s(
|
|
194
|
+
s(B, {
|
|
196
195
|
label: e(l)("menu.sku.columns.unit")
|
|
197
196
|
}, null, 8, ["label"])
|
|
198
197
|
]),
|
|
199
198
|
default: k(({ invalid: p }) => [
|
|
200
199
|
s(ye, { "z-index": 101 }, {
|
|
201
200
|
"menu-button": k(() => [
|
|
202
|
-
s(
|
|
201
|
+
s(A, {
|
|
203
202
|
class: J([
|
|
204
203
|
"fm-typo-en-body-lg-400",
|
|
205
204
|
{
|
|
@@ -210,19 +209,19 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
210
209
|
"append-icon": "expand_more"
|
|
211
210
|
}, {
|
|
212
211
|
default: k(() => [
|
|
213
|
-
we(U(
|
|
212
|
+
we(U(L.value), 1)
|
|
214
213
|
]),
|
|
215
214
|
_: 2
|
|
216
215
|
}, 1032, ["invalid"])
|
|
217
216
|
]),
|
|
218
217
|
default: k(() => [
|
|
219
|
-
v("div",
|
|
220
|
-
(m(!0), y(V, null,
|
|
221
|
-
s(
|
|
218
|
+
v("div", je, [
|
|
219
|
+
(m(!0), y(V, null, j(i.value, (w, P) => (m(), y(V, { key: P }, [
|
|
220
|
+
s(Y, {
|
|
222
221
|
label: w.label
|
|
223
222
|
}, null, 8, ["label"]),
|
|
224
|
-
s(
|
|
225
|
-
(m(!0), y(V, null,
|
|
223
|
+
s(z),
|
|
224
|
+
(m(!0), y(V, null, j(w.options, (E, dn) => (m(), I(ge, {
|
|
226
225
|
label: E.label,
|
|
227
226
|
"model-value": D(E),
|
|
228
227
|
onClick: (mn) => _(w.value, E.value),
|
|
@@ -241,7 +240,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
241
240
|
class: "p-16 flex flex-col gap-16"
|
|
242
241
|
}, {
|
|
243
242
|
default: k(() => {
|
|
244
|
-
var p, w,
|
|
243
|
+
var p, w, P;
|
|
245
244
|
return [
|
|
246
245
|
s(he, {
|
|
247
246
|
value: "",
|
|
@@ -260,25 +259,25 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
260
259
|
items: de.value
|
|
261
260
|
}, null, 8, ["label", "modelValue", "items"])
|
|
262
261
|
]),
|
|
263
|
-
s(
|
|
262
|
+
s(ae, {
|
|
264
263
|
"model-value": ((w = n.convert) == null ? void 0 : w.inventoryBindings) || [],
|
|
265
|
-
type: e(
|
|
264
|
+
type: e(le.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
|
|
266
265
|
"filter-option-ids": ve.value,
|
|
267
266
|
"onUpdate:modelValue": ee
|
|
268
267
|
}, null, 8, ["model-value", "type", "filter-option-ids"]),
|
|
269
|
-
s(
|
|
270
|
-
"model-value": ((
|
|
271
|
-
type: e(
|
|
268
|
+
s(ae, {
|
|
269
|
+
"model-value": ((P = n.convert) == null ? void 0 : P.inventoryBindings) || [],
|
|
270
|
+
type: e(le.F_INVENTORY_BINDING_TYPE).enum.SKU,
|
|
272
271
|
"filter-option-ids": pe.value,
|
|
273
272
|
"onUpdate:modelValue": ee
|
|
274
273
|
}, null, 8, ["model-value", "type", "filter-option-ids"])
|
|
275
|
-
], 64)) :
|
|
274
|
+
], 64)) : G("", !0)
|
|
276
275
|
];
|
|
277
276
|
}),
|
|
278
277
|
_: 1
|
|
279
278
|
})
|
|
280
|
-
])) : (m(), y("div",
|
|
281
|
-
a.value.length === 0 ? (m(),
|
|
279
|
+
])) : (m(), y("div", ze, [
|
|
280
|
+
a.value.length === 0 ? (m(), I(e(ce), {
|
|
282
281
|
key: 0,
|
|
283
282
|
action: {
|
|
284
283
|
text: e(l)("menu.unit.add"),
|
|
@@ -288,7 +287,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
288
287
|
},
|
|
289
288
|
subtitle: e(l)("menu.sku.empty.subtitle"),
|
|
290
289
|
title: e(l)("menu.sku.empty.no_unit")
|
|
291
|
-
}, null, 8, ["action", "subtitle", "title"])) :
|
|
290
|
+
}, null, 8, ["action", "subtitle", "title"])) : G("", !0)
|
|
292
291
|
]))
|
|
293
292
|
]),
|
|
294
293
|
_: 1
|
|
@@ -297,9 +296,9 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
297
296
|
};
|
|
298
297
|
}
|
|
299
298
|
}), Je = He, Qe = Te("sku-manager", () => {
|
|
300
|
-
const T = $e(),
|
|
299
|
+
const T = $e(), N = W(), l = X(N), r = re(l), u = Z(), S = Ee(), { t: h } = Q(), x = (a) => {
|
|
301
300
|
var c, n;
|
|
302
|
-
const { vNode: i } =
|
|
301
|
+
const { vNode: i } = Ae(
|
|
303
302
|
Je,
|
|
304
303
|
S,
|
|
305
304
|
a
|
|
@@ -310,7 +309,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
310
309
|
x({
|
|
311
310
|
initialValue: a,
|
|
312
311
|
usedCodes: u.skus.filter(({ _id: i }) => i !== (a == null ? void 0 : a._id)).map((i) => i.code),
|
|
313
|
-
invalidSkuAndRecipe: a ?
|
|
312
|
+
invalidSkuAndRecipe: a ? Le({
|
|
314
313
|
id: a._id,
|
|
315
314
|
skus: u.skus,
|
|
316
315
|
recipes: u.state.menu.modules.recipe
|
|
@@ -340,7 +339,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
340
339
|
await r.updateMenu(
|
|
341
340
|
{
|
|
342
341
|
module: H.F_MENU_MODULE_V4_KEY.enum.sku,
|
|
343
|
-
operation:
|
|
342
|
+
operation: q.F_OPERATION_TYPE.delete,
|
|
344
343
|
data: a._id
|
|
345
344
|
},
|
|
346
345
|
a.name,
|
|
@@ -378,11 +377,11 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
378
377
|
class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
|
|
379
378
|
}, cn = {
|
|
380
379
|
class: "fm-typo-en-body-md-600 font-semibold"
|
|
381
|
-
},
|
|
380
|
+
}, Cn = /* @__PURE__ */ ie({
|
|
382
381
|
__name: "Ingredient",
|
|
383
382
|
setup(T) {
|
|
384
|
-
const
|
|
385
|
-
X(
|
|
383
|
+
const N = W();
|
|
384
|
+
X(N);
|
|
386
385
|
const l = Z(), r = Qe(), {
|
|
387
386
|
t: u
|
|
388
387
|
} = Q(), S = b(() => l.skus), h = b(() => S.value.filter((i) => `${i.name} ${i.code} ${i._unit} (${i._abbrev})`.toLowerCase().includes(x.value.toLowerCase()))), x = $(""), C = $([{
|
|
@@ -428,11 +427,11 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
428
427
|
}
|
|
429
428
|
const M = b(() => S.value.length), O = Ue(), a = b(() => O.breakpoints.value.xs);
|
|
430
429
|
return (i, c) => {
|
|
431
|
-
const n = d("FmSearch"), F = d("FmTable"),
|
|
432
|
-
return m(),
|
|
430
|
+
const n = d("FmSearch"), F = d("FmTable"), L = d("fm-button"), D = d("FmSpacer");
|
|
431
|
+
return m(), I(Ie, {
|
|
433
432
|
heading: e(u)("menu.ingredient.title")
|
|
434
433
|
}, {
|
|
435
|
-
default: k(() => [S.value.length === 0 ? (m(),
|
|
434
|
+
default: k(() => [S.value.length === 0 ? (m(), I(e(ce), {
|
|
436
435
|
key: 0,
|
|
437
436
|
action: {
|
|
438
437
|
text: e(u)("menu.ingredient.empty.action"),
|
|
@@ -452,7 +451,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
452
451
|
"onUpdate:modelValue": c[2] || (c[2] = (_) => x.value = _),
|
|
453
452
|
placeholder: e(u)("menu.ingredient.table.search.placeholder"),
|
|
454
453
|
class: "w-full"
|
|
455
|
-
}, null, 8, ["modelValue", "placeholder"])]), v("div", en, [(m(!0), y(V, null,
|
|
454
|
+
}, null, 8, ["modelValue", "placeholder"])]), v("div", en, [(m(!0), y(V, null, j(h.value, (_) => (m(), y("div", {
|
|
456
455
|
key: _._id,
|
|
457
456
|
class: J(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
458
457
|
onClick: () => e(r).updateSku(_)
|
|
@@ -460,7 +459,7 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
460
459
|
code: _.code
|
|
461
460
|
})), 1), v("p", an, U(e(u)("menu.ingredient.table.mobile.unit", {
|
|
462
461
|
unit: `${_._unit} (${_._abbrev})`
|
|
463
|
-
})), 1)]), s(
|
|
462
|
+
})), 1)]), s(L, {
|
|
464
463
|
variant: e(ue).Tertiary,
|
|
465
464
|
"prepend-icon": "delete",
|
|
466
465
|
"text-color": "neutral-gray-400",
|
|
@@ -480,17 +479,17 @@ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
|
|
|
480
479
|
"pin-header-row": "",
|
|
481
480
|
onRowClick: c[1] || (c[1] = (_) => f(_.original))
|
|
482
481
|
}, null, 8, ["column-defs", "row-data", "page-size"])]))], 64))]),
|
|
483
|
-
"append-heading": k(() => [v("div", sn, [v("div", un, [v("div", rn, [v("p", cn, U(M.value), 1)])]), s(D), S.value.length > 0 ? (m(),
|
|
482
|
+
"append-heading": k(() => [v("div", sn, [v("div", un, [v("div", rn, [v("p", cn, U(M.value), 1)])]), s(D), S.value.length > 0 ? (m(), I(Ne, {
|
|
484
483
|
key: 0,
|
|
485
484
|
label: e(u)("menu.ingredient.actions.add"),
|
|
486
485
|
"prepend-icon": "add",
|
|
487
486
|
onClick: e(r).createSku
|
|
488
|
-
}, null, 8, ["label", "onClick"])) :
|
|
487
|
+
}, null, 8, ["label", "onClick"])) : G("", !0)])]),
|
|
489
488
|
_: 1
|
|
490
489
|
}, 8, ["heading"]);
|
|
491
490
|
};
|
|
492
491
|
}
|
|
493
492
|
});
|
|
494
493
|
export {
|
|
495
|
-
|
|
494
|
+
Cn as default
|
|
496
495
|
};
|