@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,14 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { D as X } from "./dayjs.min-
|
|
1
|
+
import { defineComponent as K, ref as I, computed as S, onMounted as ne, resolveComponent as C, createElementBlock as R, openBlock as h, createVNode as n, createElementVNode as o, toDisplayString as F, unref as i, Fragment as E, renderList as j, createBlock as O, withCtx as L, createCommentVNode as ue, withModifiers as N, h as H } from "vue";
|
|
2
|
+
import { D as X } from "./dayjs.min-BsfKOrNo.js";
|
|
3
3
|
import { useRouter as ie } from "vue-router";
|
|
4
|
-
import { A as
|
|
5
|
-
import { useI18n as Y, useCoreStore as
|
|
6
|
-
import { useSnackbar as ee, useDialogChild as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { a as
|
|
10
|
-
import { Pos as ke } from "@feedmepos/core";
|
|
11
|
-
import { F_FEATURE as we } from "@feedmepos/core/entity";
|
|
4
|
+
import { A as re, e as ce, D as Z, a9 as de, H as J, I as me, u as pe, G as ge, a1 as ve } from "./menu-Btcr0nsk.js";
|
|
5
|
+
import { useI18n as Y, useCoreStore as be, RestaurantSelector as fe } from "@feedmepos/mf-common";
|
|
6
|
+
import { useSnackbar as ee, useDialogChild as _e, useDialog as he, components as Q } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as ye } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
+
import { _ as Ce } from "./app-DiizQWjo.js";
|
|
9
|
+
import { a as ke, w as we } from "./tooltip-B5BiPMx9.js";
|
|
12
10
|
import { u as xe } from "./discardConfirm-BHni0LNu.js";
|
|
13
11
|
import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
14
12
|
function ae(x) {
|
|
@@ -21,7 +19,7 @@ function Se(x, V, l) {
|
|
|
21
19
|
};
|
|
22
20
|
return x.map((r) => {
|
|
23
21
|
var p;
|
|
24
|
-
const m = (p = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : p.posVersion, y = !!m && !!
|
|
22
|
+
const m = (p = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : p.posVersion, y = !!m && !!re.Pos.canUse({ feature: ce.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: m }), f = c(r.catalogId);
|
|
25
23
|
return {
|
|
26
24
|
...r,
|
|
27
25
|
_default: f,
|
|
@@ -40,7 +38,7 @@ const Fe = {
|
|
|
40
38
|
}, Ie = {
|
|
41
39
|
key: 1,
|
|
42
40
|
class: "space-y-16"
|
|
43
|
-
}, $e = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Me = /* @__PURE__ */
|
|
41
|
+
}, $e = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Me = /* @__PURE__ */ K({
|
|
44
42
|
__name: "RevertDialog",
|
|
45
43
|
props: {
|
|
46
44
|
restaurant: {}
|
|
@@ -51,7 +49,7 @@ const Fe = {
|
|
|
51
49
|
await c(
|
|
52
50
|
async () => {
|
|
53
51
|
var d;
|
|
54
|
-
m.value = await
|
|
52
|
+
m.value = await de.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
|
|
55
53
|
},
|
|
56
54
|
{ isLoading: r }
|
|
57
55
|
);
|
|
@@ -76,7 +74,7 @@ const Fe = {
|
|
|
76
74
|
catalogId: d.catalogId || null
|
|
77
75
|
}
|
|
78
76
|
],
|
|
79
|
-
|
|
77
|
+
be().restaurants.value,
|
|
80
78
|
f.value
|
|
81
79
|
)[0];
|
|
82
80
|
return [
|
|
@@ -95,7 +93,7 @@ const Fe = {
|
|
|
95
93
|
];
|
|
96
94
|
});
|
|
97
95
|
ne(async () => y());
|
|
98
|
-
const { emitData: U } =
|
|
96
|
+
const { emitData: U } = _e();
|
|
99
97
|
return (d, _) => {
|
|
100
98
|
const k = C("FmCircularProgress");
|
|
101
99
|
return r.value ? (h(), R("div", Fe, [
|
|
@@ -103,7 +101,7 @@ const Fe = {
|
|
|
103
101
|
])) : (h(), R("div", Ie, [
|
|
104
102
|
o("div", $e, F(i(p)("menu.revert.description", { name: V.restaurant.name })), 1),
|
|
105
103
|
o("div", Ae, [
|
|
106
|
-
(h(!0), R(E, null,
|
|
104
|
+
(h(!0), R(E, null, j(t.value, ($) => (h(), O(ke, {
|
|
107
105
|
key: $.label,
|
|
108
106
|
name: $.label,
|
|
109
107
|
value: $.value || "--"
|
|
@@ -112,7 +110,7 @@ const Fe = {
|
|
|
112
110
|
]));
|
|
113
111
|
};
|
|
114
112
|
}
|
|
115
|
-
}), De = { class: "fm-typo-en-title-md-600" }, Re = { class: "mt-40" }, Ue = { class: "fm-typo-en-title-sm-600" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Pe = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */
|
|
113
|
+
}), De = { class: "fm-typo-en-title-md-600" }, Re = { class: "mt-40" }, Ue = { class: "fm-typo-en-title-sm-600" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Pe = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */ K({
|
|
116
114
|
__name: "UpdateCatalogDialog",
|
|
117
115
|
props: {
|
|
118
116
|
catalogs: {
|
|
@@ -163,7 +161,7 @@ const Fe = {
|
|
|
163
161
|
U.value = !1;
|
|
164
162
|
}
|
|
165
163
|
const $ = xe(
|
|
166
|
-
() => !
|
|
164
|
+
() => !me.isEqual(d.value, t.value),
|
|
167
165
|
() => {
|
|
168
166
|
k();
|
|
169
167
|
}
|
|
@@ -222,7 +220,7 @@ const Fe = {
|
|
|
222
220
|
o("div", Re, [
|
|
223
221
|
o("div", Ue, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
224
222
|
o("div", Le, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
|
|
225
|
-
(h(!0), R(E, null,
|
|
223
|
+
(h(!0), R(E, null, j(x.catalogs, (b) => (h(), R("div", {
|
|
226
224
|
key: b._id
|
|
227
225
|
}, [
|
|
228
226
|
n(z, {
|
|
@@ -248,11 +246,11 @@ const Fe = {
|
|
|
248
246
|
class: "fm-typo-en-title-md-600"
|
|
249
247
|
}, Ne = {
|
|
250
248
|
class: "xs:hidden"
|
|
251
|
-
},
|
|
249
|
+
}, He = {
|
|
252
250
|
class: "pb-8 flex justify-between xs:flex-col gap-8"
|
|
253
|
-
},
|
|
251
|
+
}, Ke = {
|
|
254
252
|
class: "grow flex flex-col gap-4"
|
|
255
|
-
},
|
|
253
|
+
}, je = {
|
|
256
254
|
class: "flex gap-8 items-center"
|
|
257
255
|
}, Ye = {
|
|
258
256
|
class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
|
|
@@ -266,7 +264,7 @@ const Fe = {
|
|
|
266
264
|
class: "flex gap-8"
|
|
267
265
|
}, Qe = {
|
|
268
266
|
class: "xs:block hidden fixed bottom-72 right-16"
|
|
269
|
-
}, Xe = 40,
|
|
267
|
+
}, Xe = 40, ca = /* @__PURE__ */ K({
|
|
270
268
|
__name: "Publish",
|
|
271
269
|
setup(x) {
|
|
272
270
|
const V = ie(), {
|
|
@@ -275,7 +273,7 @@ const Fe = {
|
|
|
275
273
|
row: e
|
|
276
274
|
}) => {
|
|
277
275
|
const a = c(e);
|
|
278
|
-
return n(
|
|
276
|
+
return n(ye, {
|
|
279
277
|
label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
|
|
280
278
|
variant: a ? "success" : "warning"
|
|
281
279
|
}, null);
|
|
@@ -322,15 +320,15 @@ const Fe = {
|
|
|
322
320
|
enableSorting: !1,
|
|
323
321
|
cell: (e) => {
|
|
324
322
|
const a = e.row.original;
|
|
325
|
-
return t.state.menu.updatedAt, a.updatedAt,
|
|
323
|
+
return t.state.menu.updatedAt, a.updatedAt, H("div", {
|
|
326
324
|
class: "flex justify-end gap-8"
|
|
327
|
-
}, [d.value && a.revertConfig ?
|
|
325
|
+
}, [d.value && a.revertConfig ? we(H(Q.FmButton, {
|
|
328
326
|
prependIcon: "undo",
|
|
329
327
|
variant: "secondary",
|
|
330
328
|
onClick: N(async () => {
|
|
331
329
|
await _(e.row.original);
|
|
332
330
|
}, ["stop", "prevent"])
|
|
333
|
-
}), l("menu.publish.actions.revert")) : null,
|
|
331
|
+
}), l("menu.publish.actions.revert")) : null, H(Q.FmButton, {
|
|
334
332
|
label: l("menu.publish.actions.publish"),
|
|
335
333
|
icon: "ios_share",
|
|
336
334
|
variant: "secondary",
|
|
@@ -343,7 +341,7 @@ const Fe = {
|
|
|
343
341
|
meta: {
|
|
344
342
|
width: "150px"
|
|
345
343
|
}
|
|
346
|
-
}], f = I(""), p = I(), t =
|
|
344
|
+
}], f = I(""), p = I(), t = pe(), U = he(), d = S(() => t.version !== ge.F_MENU_VERSION.enum.v3);
|
|
347
345
|
async function _(e) {
|
|
348
346
|
e.revertConfig && U.open({
|
|
349
347
|
title: "Revert menu",
|
|
@@ -423,7 +421,7 @@ const Fe = {
|
|
|
423
421
|
async function q(e) {
|
|
424
422
|
const a = I("");
|
|
425
423
|
await M.minor(async () => {
|
|
426
|
-
await
|
|
424
|
+
await ve({
|
|
427
425
|
items: e,
|
|
428
426
|
processor: async (s) => {
|
|
429
427
|
const D = A(s);
|
|
@@ -466,7 +464,7 @@ const Fe = {
|
|
|
466
464
|
label: i(l)("menu.publish.actions.publish_all"),
|
|
467
465
|
variant: "primary",
|
|
468
466
|
onClick: a[0] || (a[0] = () => G())
|
|
469
|
-
}, null, 8, ["disabled", "label"])])]), o("div",
|
|
467
|
+
}, null, 8, ["disabled", "label"])])]), o("div", He, [n(i(fe), {
|
|
470
468
|
multiple: "",
|
|
471
469
|
modelValue: b.value,
|
|
472
470
|
"onUpdate:modelValue": a[2] || (a[2] = (u) => b.value = u)
|
|
@@ -489,7 +487,7 @@ const Fe = {
|
|
|
489
487
|
placeholder: i(l)("menu.publish.table.search.placeholder")
|
|
490
488
|
}, null, 8, ["modelValue", "placeholder"])]), w.value.length > 0 ? (h(), R(E, {
|
|
491
489
|
key: 0
|
|
492
|
-
}, [n(
|
|
490
|
+
}, [n(Ce, {
|
|
493
491
|
class: "xs:hidden block"
|
|
494
492
|
}, {
|
|
495
493
|
default: L(() => [n(le, {
|
|
@@ -511,7 +509,7 @@ const Fe = {
|
|
|
511
509
|
class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
|
|
512
510
|
separator: ""
|
|
513
511
|
}, {
|
|
514
|
-
default: L(() => [(h(!0), R(E, null,
|
|
512
|
+
default: L(() => [(h(!0), R(E, null, j(te.value, (u) => (h(), O(oe, {
|
|
515
513
|
key: u._id,
|
|
516
514
|
label: u.name,
|
|
517
515
|
style: {
|
|
@@ -519,7 +517,7 @@ const Fe = {
|
|
|
519
517
|
},
|
|
520
518
|
onClick: () => z(u)
|
|
521
519
|
}, {
|
|
522
|
-
default: L(() => [o("div",
|
|
520
|
+
default: L(() => [o("div", Ke, [o("div", je, [o("div", Ye, F($(u.updatedAt)), 1), n(r, {
|
|
523
521
|
row: u
|
|
524
522
|
}, null, 8, ["row"])]), o("div", qe, [o("div", Ge, F(u.name), 1), o("div", We, [o("div", null, "Default: " + F(u.catalog.default), 1), o("div", null, "POS takeaway: " + F(u.catalog.takeaway), 1), o("div", null, "Pickup: " + F(u.catalog.pickup), 1)])])]), o("div", Je, [d.value && u.revertConfig ? (h(), O(P, {
|
|
525
523
|
key: 0,
|
|
@@ -565,5 +563,5 @@ const Fe = {
|
|
|
565
563
|
}
|
|
566
564
|
});
|
|
567
565
|
export {
|
|
568
|
-
|
|
566
|
+
ca as default
|
|
569
567
|
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as W, resolveComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as
|
|
1
|
+
import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as W, resolveComponent as V, createElementBlock as F, openBlock as g, Fragment as C, renderSlot as X, createVNode as d, unref as e, withCtx as x, createElementVNode as r, toDisplayString as S, getCurrentInstance as Z, h as D, withModifiers as L, createBlock as O, createCommentVNode as ee, normalizeClass as K, renderList as te } from "vue";
|
|
2
|
+
import { useI18n as U } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as $, components as j, useDialog as ne, FmButtonVariant as G, useBreakpoints as oe } 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 {
|
|
5
|
+
import { _ as le } from "./app-DiizQWjo.js";
|
|
6
|
+
import { O as q, D as A, H as ie, B as P, I as se, e as B, J as I, G as T, u as H } from "./menu-Btcr0nsk.js";
|
|
7
7
|
import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
8
8
|
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { defineStore as ue } from "pinia";
|
|
10
|
-
import { _ as
|
|
11
|
-
import { F_INVENTORY_BINDING_TYPE as Y } from "@feedmepos/core/entity";
|
|
10
|
+
import { _ as Y, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js";
|
|
12
11
|
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
13
12
|
import { c as pe } from "./check-C9mY6LiX.js";
|
|
14
|
-
import "
|
|
15
|
-
import "./unit-B4zscxzo.js";
|
|
13
|
+
import "./unit-C4ghZU8x.js";
|
|
16
14
|
import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
17
15
|
const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40" }, ye = { class: "flex flex-row gap-16" }, ge = { class: "flex gap-8 items-center justify-start" }, be = /* @__PURE__ */ z({
|
|
18
16
|
__name: "Form",
|
|
@@ -20,14 +18,14 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
20
18
|
initialValue: { default: void 0 },
|
|
21
19
|
invalidSkuAndRecipe: {}
|
|
22
20
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const { t: u } =
|
|
21
|
+
setup(R, { expose: c }) {
|
|
22
|
+
const { t: u } = U(), p = R, f = q(A($())), b = h(() => p.initialValue ? u("menu.recipe.update") : u("menu.recipe.add")), _ = h(
|
|
25
23
|
() => p.initialValue ? u("menu.common.actions.update") : u("menu.common.actions.add")
|
|
26
|
-
), v = w(!1), a = w(!1),
|
|
24
|
+
), v = w(!1), a = w(!1), k = (t) => {
|
|
27
25
|
pe.isBoolean(t) ? a.value = t : a.value = !a.value;
|
|
28
26
|
}, n = Q(
|
|
29
27
|
p.initialValue ? ie(p.initialValue) : P.generator.initRecipe()
|
|
30
|
-
),
|
|
28
|
+
), E = h(() => p.invalidSkuAndRecipe.skus), o = h(() => p.invalidSkuAndRecipe.recipes), y = de(
|
|
31
29
|
() => !se.isEqual(n, p.initialValue || P.generator.initRecipe()),
|
|
32
30
|
() => {
|
|
33
31
|
a.value = !1;
|
|
@@ -40,19 +38,19 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
40
38
|
};
|
|
41
39
|
p.initialValue ? await f.updateMenu(
|
|
42
40
|
{
|
|
43
|
-
module:
|
|
44
|
-
operation:
|
|
41
|
+
module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
|
|
42
|
+
operation: I.F_OPERATION_TYPE.update,
|
|
45
43
|
data: t
|
|
46
44
|
},
|
|
47
45
|
t.name
|
|
48
46
|
) : await f.updateMenu(
|
|
49
47
|
{
|
|
50
|
-
module:
|
|
51
|
-
operation:
|
|
48
|
+
module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
|
|
49
|
+
operation: I.F_OPERATION_TYPE.create,
|
|
52
50
|
data: t
|
|
53
51
|
},
|
|
54
52
|
t.name
|
|
55
|
-
),
|
|
53
|
+
), k(!1);
|
|
56
54
|
} finally {
|
|
57
55
|
v.value = !1;
|
|
58
56
|
}
|
|
@@ -63,11 +61,11 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
63
61
|
}
|
|
64
62
|
), c({
|
|
65
63
|
show: a,
|
|
66
|
-
trigger:
|
|
64
|
+
trigger: k
|
|
67
65
|
}), (t, i) => {
|
|
68
|
-
const
|
|
69
|
-
return g(), F(
|
|
70
|
-
X(t.$slots, "default", { trigger:
|
|
66
|
+
const N = V("FmTextField"), M = V("FmFormGroup"), s = V("fm-button"), J = V("fm-side-sheet");
|
|
67
|
+
return g(), F(C, null, [
|
|
68
|
+
X(t.$slots, "default", { trigger: k }),
|
|
71
69
|
d(J, {
|
|
72
70
|
id: "unit-form",
|
|
73
71
|
modelValue: a.value,
|
|
@@ -103,7 +101,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
103
101
|
default: x(() => [
|
|
104
102
|
r("div", ve, [
|
|
105
103
|
r("div", ye, [
|
|
106
|
-
d(
|
|
104
|
+
d(N, {
|
|
107
105
|
class: "flex-2",
|
|
108
106
|
label: e(u)("menu.recipe.columns.name"),
|
|
109
107
|
modelValue: n.name,
|
|
@@ -116,23 +114,23 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
116
114
|
]
|
|
117
115
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
118
116
|
]),
|
|
119
|
-
d(
|
|
117
|
+
d(M, {
|
|
120
118
|
modelValue: n.contains,
|
|
121
119
|
"onUpdate:modelValue": i[3] || (i[3] = (m) => n.contains = m),
|
|
122
120
|
rules: [(m) => m.length > 0 || e(u)("menu.recipe.validation.bind_required")]
|
|
123
121
|
}, {
|
|
124
122
|
default: x(() => [
|
|
125
|
-
d(
|
|
123
|
+
d(Y, {
|
|
126
124
|
modelValue: n.contains,
|
|
127
125
|
"onUpdate:modelValue": i[1] || (i[1] = (m) => n.contains = m),
|
|
128
|
-
type: e(
|
|
126
|
+
type: e(B.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
|
|
129
127
|
"filter-option-ids": o.value
|
|
130
128
|
}, null, 8, ["modelValue", "type", "filter-option-ids"]),
|
|
131
|
-
d(
|
|
129
|
+
d(Y, {
|
|
132
130
|
modelValue: n.contains,
|
|
133
131
|
"onUpdate:modelValue": i[2] || (i[2] = (m) => n.contains = m),
|
|
134
|
-
type: e(
|
|
135
|
-
"filter-option-ids":
|
|
132
|
+
type: e(B.F_INVENTORY_BINDING_TYPE).enum.SKU,
|
|
133
|
+
"filter-option-ids": E.value
|
|
136
134
|
}, null, 8, ["modelValue", "type", "filter-option-ids"])
|
|
137
135
|
]),
|
|
138
136
|
_: 1
|
|
@@ -144,8 +142,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
144
142
|
], 64);
|
|
145
143
|
};
|
|
146
144
|
}
|
|
147
|
-
}), he = be,
|
|
148
|
-
const
|
|
145
|
+
}), he = be, Ve = ue("recipe-manager", () => {
|
|
146
|
+
const R = ne(), c = $(), u = A(c), p = q(u), f = H(), b = Z(), { t: _ } = U(), v = (o) => {
|
|
149
147
|
var l, t;
|
|
150
148
|
const { vNode: y } = fe(
|
|
151
149
|
he,
|
|
@@ -164,14 +162,14 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
164
162
|
}) : { skus: [], recipes: [] }
|
|
165
163
|
});
|
|
166
164
|
}
|
|
167
|
-
async function
|
|
165
|
+
async function k() {
|
|
168
166
|
a();
|
|
169
167
|
}
|
|
170
168
|
async function n(o) {
|
|
171
169
|
a(o);
|
|
172
170
|
}
|
|
173
|
-
async function
|
|
174
|
-
|
|
171
|
+
async function E(o) {
|
|
172
|
+
R.open({
|
|
175
173
|
title: _("menu.common.dialog.remove.recipe.title"),
|
|
176
174
|
message: _("menu.common.dialog.remove.recipe.message", { name: o.name }),
|
|
177
175
|
primaryActions: {
|
|
@@ -186,8 +184,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
186
184
|
}).onPrimary(async () => {
|
|
187
185
|
await p.updateMenu(
|
|
188
186
|
{
|
|
189
|
-
module:
|
|
190
|
-
operation:
|
|
187
|
+
module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
|
|
188
|
+
operation: I.F_OPERATION_TYPE.delete,
|
|
191
189
|
data: o._id
|
|
192
190
|
},
|
|
193
191
|
o.name,
|
|
@@ -196,41 +194,41 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
196
194
|
});
|
|
197
195
|
}
|
|
198
196
|
return {
|
|
199
|
-
createRecipe:
|
|
197
|
+
createRecipe: k,
|
|
200
198
|
updateRecipe: n,
|
|
201
|
-
deleteRecipe:
|
|
199
|
+
deleteRecipe: E
|
|
202
200
|
};
|
|
203
|
-
}),
|
|
201
|
+
}), ke = {
|
|
204
202
|
key: 0,
|
|
205
203
|
class: "h-[600px]"
|
|
206
204
|
}, xe = {
|
|
207
205
|
class: "flex justify-end items-center"
|
|
208
206
|
}, Fe = {
|
|
209
207
|
class: "flex justify-end items-center my-8 px-16"
|
|
210
|
-
},
|
|
208
|
+
}, Ee = {
|
|
211
209
|
class: /* @__PURE__ */ K(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
212
|
-
},
|
|
210
|
+
}, Re = ["onClick"], Ce = {
|
|
213
211
|
class: "flex-1"
|
|
214
212
|
}, Se = {
|
|
215
213
|
class: "fm-typo-en-body-lg-600 mb-4"
|
|
216
214
|
}, we = {
|
|
217
215
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
218
|
-
},
|
|
216
|
+
}, Ne = {
|
|
219
217
|
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
220
|
-
},
|
|
218
|
+
}, Me = {
|
|
221
219
|
class: "flex items-center"
|
|
222
|
-
}, Ne = {
|
|
223
|
-
class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
|
|
224
220
|
}, Oe = {
|
|
221
|
+
class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
|
|
222
|
+
}, Ie = {
|
|
225
223
|
class: "fm-typo-en-body-md-600 font-semibold"
|
|
226
|
-
},
|
|
224
|
+
}, He = /* @__PURE__ */ z({
|
|
227
225
|
__name: "Recipe",
|
|
228
|
-
setup(
|
|
226
|
+
setup(R) {
|
|
229
227
|
const {
|
|
230
228
|
t: c
|
|
231
|
-
} =
|
|
232
|
-
|
|
233
|
-
const p = H(), f =
|
|
229
|
+
} = U(), u = $();
|
|
230
|
+
A(u);
|
|
231
|
+
const p = H(), f = Ve(), b = h(() => p.recipes), _ = h(() => b.value.filter((y) => `${y.name}`.toLowerCase().includes(v.value.toLowerCase()))), v = w(""), a = w([{
|
|
234
232
|
accessorKey: "name",
|
|
235
233
|
header: () => c("menu.recipe.table.columns.name"),
|
|
236
234
|
enableSorting: !1
|
|
@@ -254,22 +252,22 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
254
252
|
icon: "delete",
|
|
255
253
|
textColor: "neutral-gray-400",
|
|
256
254
|
variant: "tertiary",
|
|
257
|
-
onClick:
|
|
255
|
+
onClick: L(async () => {
|
|
258
256
|
f.deleteRecipe(l);
|
|
259
257
|
}, ["stop", "prevent"])
|
|
260
258
|
})]);
|
|
261
259
|
}
|
|
262
260
|
}]);
|
|
263
|
-
function
|
|
261
|
+
function k(y) {
|
|
264
262
|
f.updateRecipe(y);
|
|
265
263
|
}
|
|
266
|
-
const n = h(() => b.value.length),
|
|
264
|
+
const n = h(() => b.value.length), E = oe(), o = h(() => E.breakpoints.value.xs);
|
|
267
265
|
return (y, l) => {
|
|
268
|
-
const t =
|
|
269
|
-
return g(),
|
|
266
|
+
const t = V("FmSearch"), i = V("FmTable"), N = V("fm-button"), M = V("FmSpacer");
|
|
267
|
+
return g(), O(re, {
|
|
270
268
|
heading: e(c)("menu.recipe.title")
|
|
271
269
|
}, {
|
|
272
|
-
default: x(() => [b.value.length === 0 ? (g(),
|
|
270
|
+
default: x(() => [b.value.length === 0 ? (g(), O(e(ce), {
|
|
273
271
|
key: 0,
|
|
274
272
|
action: {
|
|
275
273
|
text: e(c)("menu.recipe.empty.action"),
|
|
@@ -279,9 +277,9 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
279
277
|
},
|
|
280
278
|
subtitle: e(c)("menu.recipe.empty.subtitle"),
|
|
281
279
|
title: e(c)("menu.recipe.empty.title")
|
|
282
|
-
}, null, 8, ["action", "subtitle", "title"])) : (g(), F(
|
|
280
|
+
}, null, 8, ["action", "subtitle", "title"])) : (g(), F(C, {
|
|
283
281
|
key: 1
|
|
284
|
-
}, [o.value ? (g(), F(
|
|
282
|
+
}, [o.value ? (g(), F(C, {
|
|
285
283
|
key: 1
|
|
286
284
|
}, [r("div", Fe, [d(t, {
|
|
287
285
|
modelValue: v.value,
|
|
@@ -289,16 +287,16 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
289
287
|
autofocus: "",
|
|
290
288
|
class: "w-full",
|
|
291
289
|
placeholder: e(c)("menu.recipe.table.search.placeholder")
|
|
292
|
-
}, null, 8, ["modelValue", "placeholder"])]), r("div",
|
|
290
|
+
}, null, 8, ["modelValue", "placeholder"])]), r("div", Ee, [(g(!0), F(C, null, te(_.value, (s) => (g(), F("div", {
|
|
293
291
|
key: s._id,
|
|
294
292
|
class: K(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
|
|
295
293
|
onClick: () => e(f).updateRecipe(s)
|
|
296
|
-
}, [r("div",
|
|
294
|
+
}, [r("div", Ce, [r("p", Se, S(s.name), 1), r("p", we, S(s.ingredients), 1)]), d(N, {
|
|
297
295
|
variant: e(G).Tertiary,
|
|
298
296
|
"prepend-icon": "delete",
|
|
299
297
|
"text-color": "neutral-gray-400",
|
|
300
|
-
onClick:
|
|
301
|
-
}, null, 8, ["variant", "onClick"])], 8,
|
|
298
|
+
onClick: L(() => e(f).deleteRecipe(s), ["stop"])
|
|
299
|
+
}, null, 8, ["variant", "onClick"])], 8, Re))), 128))])], 64)) : (g(), F("div", ke, [r("div", xe, [d(t, {
|
|
302
300
|
modelValue: v.value,
|
|
303
301
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => v.value = s),
|
|
304
302
|
autofocus: "",
|
|
@@ -312,11 +310,11 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
312
310
|
"shrink-at": !1,
|
|
313
311
|
"hide-footer": "",
|
|
314
312
|
"pin-header-row": "",
|
|
315
|
-
onRowClick: l[1] || (l[1] = (s) =>
|
|
313
|
+
onRowClick: l[1] || (l[1] = (s) => k(s.original))
|
|
316
314
|
}, null, 8, ["column-defs", "page-size", "row-data"])]),
|
|
317
315
|
_: 1
|
|
318
316
|
})]))], 64))]),
|
|
319
|
-
"append-heading": x(() => [r("div",
|
|
317
|
+
"append-heading": x(() => [r("div", Ne, [r("div", Me, [r("div", Oe, [r("p", Ie, S(n.value), 1)])]), d(M), b.value.length > 0 ? (g(), O(ae, {
|
|
320
318
|
key: 0,
|
|
321
319
|
label: e(c)("menu.recipe.actions.add"),
|
|
322
320
|
"prepend-icon": "add",
|
|
@@ -328,5 +326,5 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
328
326
|
}
|
|
329
327
|
});
|
|
330
328
|
export {
|
|
331
|
-
|
|
329
|
+
He as default
|
|
332
330
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as N, computed as y, h as c, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as d, unref as m, withCtx as h, createElementBlock as D, createVNode as f, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as N, computed as y, h as c, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as d, unref as m, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
|
|
2
|
+
import { G as i, O as W, u as G, D as Q } from "./menu-Btcr0nsk.js";
|
|
3
3
|
import { useI18n as J } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as X, useDialog as Z, useSnackbar as ee } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as te } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
-
import { _ as ne } from "./app-
|
|
7
|
-
import { d as ae, _ as oe, u as se, c as le } from "./scheduler-
|
|
6
|
+
import { _ as ne } from "./app-DiizQWjo.js";
|
|
7
|
+
import { d as ae, _ as oe, u as se, c as le } from "./scheduler-C76blUlS.js";
|
|
8
8
|
import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
10
10
|
const ce = {
|
|
@@ -28,7 +28,7 @@ const ce = {
|
|
|
28
28
|
setup(he) {
|
|
29
29
|
const {
|
|
30
30
|
t: a
|
|
31
|
-
} = J(),
|
|
31
|
+
} = J(), M = y(() => [{
|
|
32
32
|
accessorKey: "name",
|
|
33
33
|
header: () => a("menu.scheduler.table.columns.name"),
|
|
34
34
|
cell: (e) => e.getValue(),
|
|
@@ -76,7 +76,7 @@ const ce = {
|
|
|
76
76
|
outline: !0,
|
|
77
77
|
color: "neutral-gray-400",
|
|
78
78
|
onClick: U(() => {
|
|
79
|
-
|
|
79
|
+
j(e.row.original);
|
|
80
80
|
}, ["stop", "prevent"])
|
|
81
81
|
})])
|
|
82
82
|
}]), r = {
|
|
@@ -116,14 +116,14 @@ const ce = {
|
|
|
116
116
|
var t;
|
|
117
117
|
C.value || (t = x.value) == null || t.show(e);
|
|
118
118
|
}
|
|
119
|
-
const
|
|
120
|
-
function
|
|
119
|
+
const O = Z();
|
|
120
|
+
function j(e) {
|
|
121
121
|
let t = [c("span", a("menu.scheduler.dialogs.remove.message", {
|
|
122
122
|
name: e.name
|
|
123
123
|
})), c("span", {
|
|
124
124
|
class: "fm-typo-en-body-lg-600"
|
|
125
125
|
}, e.name), c("span", "?")];
|
|
126
|
-
|
|
126
|
+
O.open({
|
|
127
127
|
title: a("menu.scheduler.dialogs.remove.title"),
|
|
128
128
|
contentComponent: c("div", t),
|
|
129
129
|
primaryActions: {
|
|
@@ -139,11 +139,11 @@ const ce = {
|
|
|
139
139
|
await w.updateMenu(ae(e), e.name, !0);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function q(e) {
|
|
143
143
|
const t = e._id ? se(e) : le(e);
|
|
144
144
|
await w.updateMenu(t, e.name);
|
|
145
145
|
}
|
|
146
|
-
const
|
|
146
|
+
const A = G(), B = y(() => A.categorizedRawMenuItems), p = y(() => A.state.menu.modules.scheduler), w = W(Q(ee())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
|
|
147
147
|
const e = g.value.toLowerCase();
|
|
148
148
|
return e ? p.value.filter((t) => t.name.toLowerCase().includes(e)) : p.value;
|
|
149
149
|
});
|
|
@@ -159,7 +159,7 @@ const ce = {
|
|
|
159
159
|
label: m(a)("menu.scheduler.empty.action"),
|
|
160
160
|
variant: "primary",
|
|
161
161
|
onClick: L
|
|
162
|
-
}, null, 8, ["disabled", "label"])) :
|
|
162
|
+
}, null, 8, ["disabled", "label"])) : I("", !0)])]),
|
|
163
163
|
default: h(() => [p.value.length === 0 ? (d(), k(m(re), {
|
|
164
164
|
key: 0,
|
|
165
165
|
action: {
|
|
@@ -168,7 +168,7 @@ const ce = {
|
|
|
168
168
|
},
|
|
169
169
|
subtitle: m(a)("menu.scheduler.empty.subtitle"),
|
|
170
170
|
title: m(a)("menu.scheduler.empty.title")
|
|
171
|
-
}, null, 8, ["action", "subtitle", "title"])) : (d(), D(
|
|
171
|
+
}, null, 8, ["action", "subtitle", "title"])) : (d(), D(H, {
|
|
172
172
|
key: 1
|
|
173
173
|
}, [l("div", ie, [l("div", de, [f(s, {
|
|
174
174
|
modelValue: g.value,
|
|
@@ -180,7 +180,7 @@ const ce = {
|
|
|
180
180
|
class: "xs:hidden block"
|
|
181
181
|
}, {
|
|
182
182
|
default: h(() => [f(o, {
|
|
183
|
-
"column-defs":
|
|
183
|
+
"column-defs": M.value,
|
|
184
184
|
"page-size": p.value.length,
|
|
185
185
|
"row-data": p.value,
|
|
186
186
|
"search-value": g.value,
|
|
@@ -194,7 +194,7 @@ const ce = {
|
|
|
194
194
|
class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full px-16 pb-64",
|
|
195
195
|
separator: ""
|
|
196
196
|
}, {
|
|
197
|
-
default: h(() => [(d(!0), D(
|
|
197
|
+
default: h(() => [(d(!0), D(H, null, T(K.value, (n) => (d(), k(R, {
|
|
198
198
|
key: n._id,
|
|
199
199
|
label: n.name,
|
|
200
200
|
style: {
|
|
@@ -202,11 +202,11 @@ const ce = {
|
|
|
202
202
|
},
|
|
203
203
|
onClick: () => $(n)
|
|
204
204
|
}, {
|
|
205
|
-
default: h(() => [l("div", me, [l("div", pe, S(n.name), 1), l("div", null, [l("div", fe, S(Object.keys(n.items).length) + " product(s) linked ", 1), l("div", ye, [l("div", null, " Repeat: " + S(F(n.repeat, n.weekDay)), 1), n.timePeriod.length > 0 ? (d(), D("span", _e, "Period: ")) :
|
|
205
|
+
default: h(() => [l("div", me, [l("div", pe, S(n.name), 1), l("div", null, [l("div", fe, S(Object.keys(n.items).length) + " product(s) linked ", 1), l("div", ye, [l("div", null, " Repeat: " + S(F(n.repeat, n.weekDay)), 1), n.timePeriod.length > 0 ? (d(), D("span", _e, "Period: ")) : I("", !0), l("span", null, S(n.timePeriod.map((b) => `${b.start} - ${b.end}`).join(", ")), 1)])])]), f(v, {
|
|
206
206
|
icon: "delete",
|
|
207
207
|
variant: "tertiary",
|
|
208
208
|
"text-color": "neutral-gray-400",
|
|
209
|
-
onClick: U(() =>
|
|
209
|
+
onClick: U(() => j(n), ["stop"])
|
|
210
210
|
}, null, 8, ["onClick"])]),
|
|
211
211
|
_: 2
|
|
212
212
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
@@ -214,8 +214,8 @@ const ce = {
|
|
|
214
214
|
})], 64)), f(oe, {
|
|
215
215
|
ref_key: "schedulerDialogRef",
|
|
216
216
|
ref: x,
|
|
217
|
-
"categorized-items":
|
|
218
|
-
onOnComplete:
|
|
217
|
+
"categorized-items": B.value,
|
|
218
|
+
onOnComplete: q
|
|
219
219
|
}, null, 8, ["categorized-items"])]),
|
|
220
220
|
_: 1
|
|
221
221
|
}, 8, ["heading"]);
|