@feedmepos/mf-menu 0.31.71-prod → 0.31.72-remy
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-B5R51HHK.js → App-27TpQ9Rh.js} +1442 -2546
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Dflill79.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CumuJ63E.js} +3 -3
- package/dist/{Catalog-yv_fwu1h.js → Catalog-qUXEGPwx.js} +26 -26
- package/dist/{Category-lOaUwRrB.js → Category-C9sdulfS.js} +35 -35
- package/dist/{Category-DEkZ-IWE.js → Category-DGUI1Glw.js} +22 -22
- package/dist/{CookingGuide-Db8VQK5V.js → CookingGuide-DIVESXs6.js} +113 -113
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DwsVvlUq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-B48GyN96.js} +1 -1
- package/dist/{Group-CFS8D5Uf.js → Group-C8gRQIjf.js} +3 -3
- package/dist/{Group-B2EXYbcn.js → Group-CTzxLznN.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BdZ9K2Ht.js → Group.vue_vue_type_script_setup_true_lang-BPCjOiTv.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CtlyZlos.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-M7EU3tby.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C-RPhKoA.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-h09saJxj.js} +21 -22
- package/dist/{Ingredient-C3B8G0Fd.js → Ingredient-DaWcvad4.js} +23 -23
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BrhhXwp8.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C9VpUX0B.js} +1052 -1052
- package/dist/{LinkProductSideSheet-DPn7KN3l.js → LinkProductSideSheet-b_gN9u5S.js} +3 -3
- package/dist/{MenuSetting-Mph9Pc9s.js → MenuSetting-B32RCTN9.js} +31 -31
- package/dist/{PrintRoute-BwboeALA.js → PrintRoute-BEXM1XO1.js} +26 -26
- package/dist/{Product-CNKnPt-z.js → Product-Dg6vmxu4.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BksTc5Gm.js → Product.vue_vue_type_script_setup_true_lang-m1D4IZS3.js} +71 -71
- package/dist/{ProductInternalTools-DGkoIc6T.js → ProductInternalTools-DiG53QXf.js} +17 -17
- package/dist/{Products-CkLZYybB.js → Products-Bp4RN2tP.js} +11 -11
- package/dist/{Publish-Bzq9aREC.js → Publish-DHrjYAJO.js} +56 -57
- package/dist/{Recipe-K55Bnscl.js → Recipe-CPpiiwTj.js} +13 -13
- package/dist/{Scheduler-ChAmTqSR.js → Scheduler-BVgOUrgq.js} +16 -16
- package/dist/{ServingSequence-ywa7-8rG.js → ServingSequence-BvvQ7iAu.js} +20 -20
- package/dist/{Setting-CHUNtVho.js → Setting-C828ShhE.js} +20 -20
- package/dist/{Subcategory-0-99_i06.js → Subcategory-Bw4NC1zr.js} +19 -19
- package/dist/{Takeaway-CsJf5I8I.js → Takeaway-BP9vO3uO.js} +1 -1
- package/dist/{Takeaway-BzvxZ_dA.js → Takeaway-CZBbeNL8.js} +10 -10
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Bh8mjdk4.js → Takeaway.vue_vue_type_script_setup_true_lang-Bf6h1oOm.js} +20 -20
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CbxgtwVa.js → Thumbnail.vue_vue_type_script_setup_true_lang-BCqjdxf-.js} +20 -20
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dh_CA5gZ.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CTouhy0y.js} +16 -17
- package/dist/{Unit-CbTkNhj2.js → Unit-C0XP2gQF.js} +13 -13
- package/dist/{Variant-NkbzEbF-.js → Variant-CR6fNlW6.js} +15 -15
- package/dist/{_id_-mr4_eirX.js → _id_-DPpuWlln.js} +14 -14
- package/dist/{app-DVB67WHZ.js → app-CtQEOIp5.js} +471 -468
- package/dist/{app-BzsHQwP_.js → app-xaGd6_oS.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +1626 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +72 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +218 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +110 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +81 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +55 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +144 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +165 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +55 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +375 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/tree.d.ts +18 -18
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +81 -0
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +55 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +430 -0
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +375 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +375 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +165 -0
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +81 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +375 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +110 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +220 -0
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +52 -0
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +52 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-Ds3VKRNn.js +13 -0
- package/dist/assets/override-menu-BVPA9mG0.js +13 -0
- package/dist/assets/validate-menu-Ctwk0tSN.js +13 -0
- package/dist/{catalog-C_6TM4e_.js → catalog-B1AtGIOR.js} +1 -1
- package/dist/{catalogSetting-pTMi5i6h.js → catalogSetting-D76y7yoz.js} +1 -1
- package/dist/{category-CHNICcWp.js → category-B3MkQ7Pp.js} +5 -5
- package/dist/{currency-Dx-pn9tw.js → currency-DYj4YAoX.js} +1 -1
- package/dist/{customAttributes-DvHKcDWb.js → customAttributes-CfwqBwao.js} +1 -1
- package/dist/{index-DqIorABw.js → index-8_TFzfuI.js} +1 -1
- package/dist/{index-CA3_R55p.js → index-CAQqh5h4.js} +13 -13
- package/dist/{index-X3RliLfv.js → index-DNhoEElA.js} +26 -26
- package/dist/{index-DGtoqrTo.js → index-DUUtEjnd.js} +1 -1
- package/dist/{item-JhHKgoMj.js → item-MTfRKilm.js} +378 -378
- package/dist/iteration-DXXAmTGt.js +27 -0
- package/dist/{jszip.min-BQReTtS0.js → jszip.min-y7wFpnaP.js} +245 -245
- package/dist/{menu-Bhfx50bt.js → menu-C_m3ZEIK.js} +1 -1
- package/dist/{menu-2ymqQnFE.js → menu-DQurCWMa.js} +27902 -27334
- package/dist/{menuV2-ZaA_QLdj.js → menuV2-0FFzegP7.js} +92 -92
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/packages/shared/src/components/info/TextChip.vue.d.ts +1 -1
- package/dist/{priceTier-IZtw6WUa.js → priceTier-DMFtjpmw.js} +1 -1
- package/dist/{scheduler-CzuGjuw5.js → scheduler-D0IlDwT3.js} +20 -20
- package/dist/{subcategory-Dt6tFvIu.js → subcategory-D32FJH5D.js} +6 -6
- package/dist/{toExcel-CUrEHCjB.js → toExcel-CsQ_y0DF.js} +2 -2
- package/dist/{unit-Ibbp0wZT.js → unit-Bthb3r-g.js} +9 -9
- package/package.json +4 -4
- package/dist/apps/mf-menu/src/components/Announcements.vue.d.ts +0 -19
- package/dist/apps/mf-menu/src/stores/announcement/announcement.d.ts +0 -11
- package/dist/assets/linked-status-Dwqdwyog.js +0 -13
- package/dist/assets/override-menu-CGexvHxV.js +0 -13
- package/dist/assets/validate-menu-C2daBpKY.js +0 -13
- package/dist/dayjs.min-BZu87fXJ.js +0 -6
- package/dist/iteration-BoeoXAHD.js +0 -23
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as G, ref as V, computed as R, onMounted as re, resolveComponent as w, createElementBlock as U, openBlock as y, createVNode as i, createElementVNode as o, toDisplayString as A, unref as r, Fragment as O, renderList as W, createBlock as T, withCtx as L, createCommentVNode as ce, withModifiers as
|
|
2
|
-
import { D as ae } from "./
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { O as
|
|
5
|
-
import {
|
|
6
|
-
import { useI18n as J, useCoreStore as
|
|
7
|
-
import { useSnackbar as le, useDialogChild as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { c as Se } from "./iteration-BoeoXAHD.js";
|
|
1
|
+
import { defineComponent as G, ref as V, computed as R, onMounted as re, resolveComponent as w, createElementBlock as U, openBlock as y, createVNode as i, createElementVNode as o, toDisplayString as A, unref as r, Fragment as O, renderList as W, createBlock as T, withCtx as L, createCommentVNode as ce, withModifiers as N, h as Y } from "vue";
|
|
2
|
+
import { D as ae, c as de } from "./iteration-DXXAmTGt.js";
|
|
3
|
+
import { useRouter as me } from "vue-router";
|
|
4
|
+
import { O as pe, b as ge } from "./app-5fxKLAzS.js";
|
|
5
|
+
import { A as be, G as ve, D as te, a7 as fe, H as Z, I as _e, u as he, z as ye } from "./menu-DQurCWMa.js";
|
|
6
|
+
import { useI18n as J, useCoreStore as Ce, RestaurantSelector as ke } from "@feedmepos/mf-common";
|
|
7
|
+
import { useSnackbar as le, useDialogChild as we, useDialog as xe, components as ee } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as Ve } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
9
|
+
import { _ as Se } from "./app-CtQEOIp5.js";
|
|
11
10
|
import { a as Fe, w as Ie, p as Ae } from "./tooltip-CQW9YRO5.js";
|
|
12
11
|
import { u as Me } from "./discardConfirm-BHni0LNu.js";
|
|
13
12
|
import { _ as $e } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
@@ -15,22 +14,22 @@ function se(S) {
|
|
|
15
14
|
return S ? ae(S).format("DD/MM/YY HH:mm") : "-";
|
|
16
15
|
}
|
|
17
16
|
function Re(S, F, l) {
|
|
18
|
-
const c = (u,
|
|
19
|
-
var
|
|
20
|
-
return u === void 0 && !
|
|
17
|
+
const c = (u, f = !1) => {
|
|
18
|
+
var v;
|
|
19
|
+
return u === void 0 && !f ? "-" : ((v = l.find((x) => x.value === (u || null))) == null ? void 0 : v.label) || "-";
|
|
21
20
|
};
|
|
22
21
|
return S.map((u) => {
|
|
23
22
|
var t;
|
|
24
|
-
const
|
|
23
|
+
const f = (t = F.find(({ _id: d }) => d === u._id)) == null ? void 0 : t.posVersion, v = !!f && !!be.Pos.canUse({ feature: ve.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: f }), x = c(u.catalogId);
|
|
25
24
|
return {
|
|
26
25
|
...u,
|
|
27
26
|
_default: x,
|
|
28
27
|
_posTakeaway: u.takeawayCatalog ? c(u.takeawayCatalog) : x,
|
|
29
28
|
_additionalCatalogs: (u.additionalCatalogs || []).map((d) => c(d)),
|
|
30
29
|
_lastUpdate: se(u.updatedAt),
|
|
31
|
-
_pickup:
|
|
32
|
-
_canUsePickup:
|
|
33
|
-
_posVersion:
|
|
30
|
+
_pickup: v ? c(u.pickupCatalog, !0) : "-",
|
|
31
|
+
_canUsePickup: v,
|
|
32
|
+
_posVersion: f || "-"
|
|
34
33
|
};
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -46,12 +45,12 @@ const De = {
|
|
|
46
45
|
restaurant: {}
|
|
47
46
|
},
|
|
48
47
|
setup(S) {
|
|
49
|
-
const F = S, l = le(), { custom: c } = te(l), u = V(!1),
|
|
50
|
-
async function
|
|
48
|
+
const F = S, l = le(), { custom: c } = te(l), u = V(!1), f = V(null);
|
|
49
|
+
async function v() {
|
|
51
50
|
await c(
|
|
52
51
|
async () => {
|
|
53
52
|
var m;
|
|
54
|
-
|
|
53
|
+
f.value = await fe.readMenuById(((m = F.restaurant.revertConfig) == null ? void 0 : m._id) || "");
|
|
55
54
|
},
|
|
56
55
|
{ isLoading: u }
|
|
57
56
|
);
|
|
@@ -60,7 +59,7 @@ const De = {
|
|
|
60
59
|
var m;
|
|
61
60
|
return [
|
|
62
61
|
{ label: "Main", value: null },
|
|
63
|
-
...(((m =
|
|
62
|
+
...(((m = f.value) == null ? void 0 : m.modules.catalog) || []).map((C) => ({
|
|
64
63
|
label: C.name,
|
|
65
64
|
value: C._id
|
|
66
65
|
}))
|
|
@@ -76,14 +75,14 @@ const De = {
|
|
|
76
75
|
catalogId: m.catalogId || null
|
|
77
76
|
}
|
|
78
77
|
],
|
|
79
|
-
|
|
78
|
+
Ce().restaurants.value,
|
|
80
79
|
x.value
|
|
81
80
|
)[0];
|
|
82
81
|
return [
|
|
83
82
|
{ label: t("menu.revert.labels.restaurant"), value: F.restaurant.name },
|
|
84
83
|
{
|
|
85
84
|
label: t("menu.revert.labels.revert_to"),
|
|
86
|
-
value: se((_ =
|
|
85
|
+
value: se((_ = f.value) == null ? void 0 : _.updatedAt)
|
|
87
86
|
},
|
|
88
87
|
{ label: t("menu.revert.labels.default"), value: C._default },
|
|
89
88
|
{ label: t("menu.revert.labels.pos_takeaway"), value: C._posTakeaway },
|
|
@@ -94,8 +93,8 @@ const De = {
|
|
|
94
93
|
}
|
|
95
94
|
];
|
|
96
95
|
});
|
|
97
|
-
re(async () =>
|
|
98
|
-
const { emitData: D } =
|
|
96
|
+
re(async () => v());
|
|
97
|
+
const { emitData: D } = we();
|
|
99
98
|
return (m, C) => {
|
|
100
99
|
const _ = w("FmCircularProgress");
|
|
101
100
|
return u.value ? (y(), U("div", De, [
|
|
@@ -112,7 +111,7 @@ const De = {
|
|
|
112
111
|
]));
|
|
113
112
|
};
|
|
114
113
|
}
|
|
115
|
-
}), Ee = { class: "fm-typo-en-title-md-600" }, Oe = { class: "mt-40" }, Te = { class: "fm-typo-en-title-sm-600" },
|
|
114
|
+
}), Ee = { class: "fm-typo-en-title-md-600" }, Oe = { class: "mt-40" }, Te = { class: "fm-typo-en-title-sm-600" }, ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Ne = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ G({
|
|
116
115
|
__name: "UpdateCatalogDialog",
|
|
117
116
|
props: {
|
|
118
117
|
catalogs: {
|
|
@@ -127,8 +126,8 @@ const De = {
|
|
|
127
126
|
show: C,
|
|
128
127
|
hide: _
|
|
129
128
|
});
|
|
130
|
-
const
|
|
131
|
-
function
|
|
129
|
+
const f = l;
|
|
130
|
+
function v() {
|
|
132
131
|
return {
|
|
133
132
|
restaurantId: "",
|
|
134
133
|
catalogId: void 0,
|
|
@@ -155,24 +154,24 @@ const De = {
|
|
|
155
154
|
label: h.name,
|
|
156
155
|
value: h._id
|
|
157
156
|
}))
|
|
158
|
-
]), d = V(
|
|
157
|
+
]), d = V(v()), D = V(!1), m = V(void 0);
|
|
159
158
|
function C(h) {
|
|
160
|
-
m.value = h ? Z(h) :
|
|
159
|
+
m.value = h ? Z(h) : v(), d.value = Z(m.value), D.value = !0;
|
|
161
160
|
}
|
|
162
161
|
function _() {
|
|
163
162
|
D.value = !1;
|
|
164
163
|
}
|
|
165
164
|
const P = Me(
|
|
166
|
-
() => !
|
|
165
|
+
() => !_e.isEqual(m.value, d.value),
|
|
167
166
|
() => {
|
|
168
167
|
_();
|
|
169
168
|
}
|
|
170
169
|
);
|
|
171
170
|
function M() {
|
|
172
|
-
_(),
|
|
171
|
+
_(), f("onComplete", d.value);
|
|
173
172
|
}
|
|
174
173
|
return (h, g) => {
|
|
175
|
-
const B = w("FmSelect"),
|
|
174
|
+
const B = w("FmSelect"), z = w("FmCheckbox"), $ = w("FmButton"), E = w("FmSideSheet");
|
|
176
175
|
return y(), T(E, {
|
|
177
176
|
modelValue: D.value,
|
|
178
177
|
"onUpdate:modelValue": g[5] || (g[5] = (b) => D.value = b),
|
|
@@ -183,7 +182,7 @@ const De = {
|
|
|
183
182
|
o("span", Ee, A(r(c)("menu.publish.update_catalog_dialog.title")), 1)
|
|
184
183
|
]),
|
|
185
184
|
"side-sheet-footer": L(() => [
|
|
186
|
-
o("div",
|
|
185
|
+
o("div", Ne, [
|
|
187
186
|
i($, {
|
|
188
187
|
label: r(c)("menu.publish.update_catalog_dialog.actions.update"),
|
|
189
188
|
size: "lg",
|
|
@@ -221,11 +220,11 @@ const De = {
|
|
|
221
220
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
222
221
|
o("div", Oe, [
|
|
223
222
|
o("div", Te, A(r(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
224
|
-
o("div",
|
|
223
|
+
o("div", ze, A(r(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
|
|
225
224
|
(y(!0), U(O, null, W(S.catalogs, (b) => (y(), U("div", {
|
|
226
225
|
key: b._id
|
|
227
226
|
}, [
|
|
228
|
-
i(
|
|
227
|
+
i(z, {
|
|
229
228
|
modelValue: d.value.additionalCatalogs,
|
|
230
229
|
"onUpdate:modelValue": g[3] || (g[3] = (k) => d.value.additionalCatalogs = k),
|
|
231
230
|
label: b.name,
|
|
@@ -268,20 +267,20 @@ const De = {
|
|
|
268
267
|
class: "flex gap-8"
|
|
269
268
|
}, sa = {
|
|
270
269
|
class: "xs:block hidden fixed bottom-72 right-16"
|
|
271
|
-
}, q = 40,
|
|
270
|
+
}, q = 40, fa = /* @__PURE__ */ G({
|
|
272
271
|
__name: "Publish",
|
|
273
272
|
setup(S) {
|
|
274
|
-
const F =
|
|
273
|
+
const F = me(), {
|
|
275
274
|
t: l
|
|
276
275
|
} = J(), c = ({
|
|
277
276
|
row: e
|
|
278
277
|
}) => {
|
|
279
278
|
const a = e.status === "latest";
|
|
280
|
-
return i(
|
|
279
|
+
return i(Ve, {
|
|
281
280
|
label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
|
|
282
281
|
variant: a ? "success" : "warning"
|
|
283
282
|
}, null);
|
|
284
|
-
}, u = V({}),
|
|
283
|
+
}, u = V({}), f = [{
|
|
285
284
|
accessorKey: "name",
|
|
286
285
|
header: () => l("menu.publish.table.columns.restaurant"),
|
|
287
286
|
cell: (e) => e.getValue(),
|
|
@@ -328,14 +327,14 @@ const De = {
|
|
|
328
327
|
}, [D.value && a.revertConfig ? Ie(Y(ee.FmButton, {
|
|
329
328
|
prependIcon: "undo",
|
|
330
329
|
variant: "secondary",
|
|
331
|
-
onClick:
|
|
330
|
+
onClick: N(async () => {
|
|
332
331
|
await m(e.row.original);
|
|
333
332
|
}, ["stop", "prevent"])
|
|
334
333
|
}), l("menu.publish.actions.revert")) : null, Y(ee.FmButton, {
|
|
335
334
|
label: l("menu.publish.actions.publish"),
|
|
336
335
|
icon: "ios_share",
|
|
337
336
|
variant: "secondary",
|
|
338
|
-
onClick:
|
|
337
|
+
onClick: N(async () => {
|
|
339
338
|
const s = g(e.row.original);
|
|
340
339
|
await E(s);
|
|
341
340
|
}, ["stop", "prevent"])
|
|
@@ -344,7 +343,7 @@ const De = {
|
|
|
344
343
|
meta: {
|
|
345
344
|
width: "150px"
|
|
346
345
|
}
|
|
347
|
-
}],
|
|
346
|
+
}], v = V(""), x = V(), t = he(), d = xe(), D = R(() => t.version !== ye.F_MENU_VERSION.enum.v3);
|
|
348
347
|
async function m(e) {
|
|
349
348
|
e.revertConfig && d.open({
|
|
350
349
|
title: "Revert menu",
|
|
@@ -394,7 +393,7 @@ const De = {
|
|
|
394
393
|
const a = g(e);
|
|
395
394
|
(s = x.value) == null || s.show(a);
|
|
396
395
|
}
|
|
397
|
-
const
|
|
396
|
+
const z = le(), $ = te(z);
|
|
398
397
|
async function E(e) {
|
|
399
398
|
var s;
|
|
400
399
|
const a = (s = k.value.find((p) => p._id === e.restaurantId)) == null ? void 0 : s.name;
|
|
@@ -405,7 +404,7 @@ const De = {
|
|
|
405
404
|
});
|
|
406
405
|
}
|
|
407
406
|
const b = V(null), k = R(() => {
|
|
408
|
-
const e =
|
|
407
|
+
const e = v.value.toLowerCase(), a = t.state.menu.updatedAt;
|
|
409
408
|
return t.state.restaurants.filter((s) => {
|
|
410
409
|
var p;
|
|
411
410
|
return !b.value || ((p = b.value) == null ? void 0 : p.includes(s._id));
|
|
@@ -417,7 +416,7 @@ const De = {
|
|
|
417
416
|
pickup: h(s.pickupCatalog)
|
|
418
417
|
},
|
|
419
418
|
status: a === s.updatedAt ? "latest" : "outdated"
|
|
420
|
-
})).filter((s) =>
|
|
419
|
+
})).filter((s) => pe(s, H.value)).filter(({
|
|
421
420
|
name: s,
|
|
422
421
|
catalog: p
|
|
423
422
|
}) => e ? s.toLowerCase().includes(e) || p.default.toLowerCase().includes(e) || p.takeaway.toLowerCase().includes(e) || p.pickup.toLowerCase().includes(e) : !0);
|
|
@@ -431,7 +430,7 @@ const De = {
|
|
|
431
430
|
values: ["latest", "outdated"]
|
|
432
431
|
}];
|
|
433
432
|
async function ne(e) {
|
|
434
|
-
const a = e.map((I) => I._id), s =
|
|
433
|
+
const a = e.map((I) => I._id), s = de(a, q), p = V("");
|
|
435
434
|
await $.minor(async () => {
|
|
436
435
|
await Ae({
|
|
437
436
|
items: s,
|
|
@@ -463,7 +462,7 @@ const De = {
|
|
|
463
462
|
async function Q() {
|
|
464
463
|
if (M.value) return;
|
|
465
464
|
const e = Object.keys(u.value).filter((p) => u.value[p]), a = e.length === 0 || e.length === k.value.length ? k.value : k.value.filter((p) => e.includes(p._id));
|
|
466
|
-
k.value.length === t.state.restaurants.length && (e.length === 0 || e.length === k.value.length) ? t.state.restaurants.length > q ? (t.publishAllMenu(),
|
|
465
|
+
k.value.length === t.state.restaurants.length && (e.length === 0 || e.length === k.value.length) ? t.state.restaurants.length > q ? (t.publishAllMenu(), z.open({
|
|
467
466
|
type: "info",
|
|
468
467
|
title: "Publish menu request sent"
|
|
469
468
|
})) : await $.minor(async () => await t.publishAllMenu(), {
|
|
@@ -488,33 +487,33 @@ const De = {
|
|
|
488
487
|
label: r(l)("menu.publish.actions.publish_all"),
|
|
489
488
|
variant: "primary",
|
|
490
489
|
onClick: a[1] || (a[1] = () => Q())
|
|
491
|
-
}, null, 8, ["disabled", "label"])])]), o("div", Je, [i(r(
|
|
490
|
+
}, null, 8, ["disabled", "label"])])]), o("div", Je, [i(r(ke), {
|
|
492
491
|
multiple: "",
|
|
493
492
|
modelValue: b.value,
|
|
494
493
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => b.value = n)
|
|
495
494
|
}, {
|
|
496
|
-
"append-right": L(() => [i(r(
|
|
495
|
+
"append-right": L(() => [i(r(ge), {
|
|
497
496
|
modelValue: H.value,
|
|
498
497
|
"onUpdate:modelValue": a[2] || (a[2] = (n) => H.value = n),
|
|
499
498
|
attributes: oe
|
|
500
499
|
}, null, 8, ["modelValue"])]),
|
|
501
500
|
_: 1
|
|
502
501
|
}, 8, ["modelValue"]), i(K, {
|
|
503
|
-
modelValue:
|
|
504
|
-
"onUpdate:modelValue": a[4] || (a[4] = (n) =>
|
|
502
|
+
modelValue: v.value,
|
|
503
|
+
"onUpdate:modelValue": a[4] || (a[4] = (n) => v.value = n),
|
|
505
504
|
autofocus: "",
|
|
506
505
|
class: "w-[320px] xs:w-full",
|
|
507
506
|
placeholder: r(l)("menu.publish.table.search.placeholder")
|
|
508
507
|
}, null, 8, ["modelValue", "placeholder"])]), k.value.length > 0 ? (y(), U(O, {
|
|
509
508
|
key: 0
|
|
510
|
-
}, [i(
|
|
509
|
+
}, [i(Se, {
|
|
511
510
|
class: "xs:hidden block"
|
|
512
511
|
}, {
|
|
513
512
|
default: L(() => [i(X, {
|
|
514
513
|
modelValue: u.value,
|
|
515
514
|
"onUpdate:modelValue": a[5] || (a[5] = (n) => u.value = n),
|
|
516
515
|
"get-row-id": (n) => n._id,
|
|
517
|
-
"column-defs":
|
|
516
|
+
"column-defs": f,
|
|
518
517
|
loading: M.value,
|
|
519
518
|
"page-size": k.value.length,
|
|
520
519
|
"row-data": k.value,
|
|
@@ -545,12 +544,12 @@ const De = {
|
|
|
545
544
|
disabled: M.value,
|
|
546
545
|
icon: "undo",
|
|
547
546
|
variant: "tertiary",
|
|
548
|
-
onClick:
|
|
547
|
+
onClick: N(() => m(n), ["stop"])
|
|
549
548
|
}, null, 8, ["disabled", "onClick"])) : ce("", !0), i(I, {
|
|
550
549
|
disabled: M.value,
|
|
551
550
|
icon: "ios_share",
|
|
552
551
|
variant: "tertiary",
|
|
553
|
-
onClick:
|
|
552
|
+
onClick: N(() => E(g(n)), ["stop"])
|
|
554
553
|
}, null, 8, ["disabled", "onClick"])])]),
|
|
555
554
|
_: 2
|
|
556
555
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
@@ -584,5 +583,5 @@ const De = {
|
|
|
584
583
|
}
|
|
585
584
|
});
|
|
586
585
|
export {
|
|
587
|
-
|
|
586
|
+
fa as default
|
|
588
587
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
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
2
|
import { useI18n as U } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as
|
|
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 { O as q,
|
|
5
|
+
import { _ as le } from "./app-CtQEOIp5.js";
|
|
6
|
+
import { O as q, D as A, H as ie, B as P, I as se, G as B, J as I, z as T, u as H } from "./menu-DQurCWMa.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
|
|
10
|
+
import { _ as Y, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-C9VpUX0B.js";
|
|
11
11
|
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
12
12
|
import { c as pe } from "./check-C9mY6LiX.js";
|
|
13
|
-
import "./unit-
|
|
13
|
+
import "./unit-Bthb3r-g.js";
|
|
14
14
|
import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
15
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({
|
|
16
16
|
__name: "Form",
|
|
@@ -19,7 +19,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
19
19
|
invalidSkuAndRecipe: {}
|
|
20
20
|
},
|
|
21
21
|
setup(R, { expose: c }) {
|
|
22
|
-
const { t: u } = U(), p = R, f = q($(
|
|
22
|
+
const { t: u } = U(), p = R, f = q(A($())), b = h(() => p.initialValue ? u("menu.recipe.update") : u("menu.recipe.add")), _ = h(
|
|
23
23
|
() => p.initialValue ? u("menu.common.actions.update") : u("menu.common.actions.add")
|
|
24
24
|
), v = w(!1), a = w(!1), k = (t) => {
|
|
25
25
|
pe.isBoolean(t) ? a.value = t : a.value = !a.value;
|
|
@@ -120,16 +120,16 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
120
120
|
rules: [(m) => m.length > 0 || e(u)("menu.recipe.validation.bind_required")]
|
|
121
121
|
}, {
|
|
122
122
|
default: x(() => [
|
|
123
|
-
d(
|
|
123
|
+
d(Y, {
|
|
124
124
|
modelValue: n.contains,
|
|
125
125
|
"onUpdate:modelValue": i[1] || (i[1] = (m) => n.contains = m),
|
|
126
|
-
type: e(
|
|
126
|
+
type: e(B.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
|
|
127
127
|
"filter-option-ids": o.value
|
|
128
128
|
}, null, 8, ["modelValue", "type", "filter-option-ids"]),
|
|
129
|
-
d(
|
|
129
|
+
d(Y, {
|
|
130
130
|
modelValue: n.contains,
|
|
131
131
|
"onUpdate:modelValue": i[2] || (i[2] = (m) => n.contains = m),
|
|
132
|
-
type: e(
|
|
132
|
+
type: e(B.F_INVENTORY_BINDING_TYPE).enum.SKU,
|
|
133
133
|
"filter-option-ids": E.value
|
|
134
134
|
}, null, 8, ["modelValue", "type", "filter-option-ids"])
|
|
135
135
|
]),
|
|
@@ -143,7 +143,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
}), he = be, Ve = ue("recipe-manager", () => {
|
|
146
|
-
const R = ne(), c =
|
|
146
|
+
const R = ne(), c = $(), u = A(c), p = q(u), f = H(), b = Z(), { t: _ } = U(), v = (o) => {
|
|
147
147
|
var l, t;
|
|
148
148
|
const { vNode: y } = fe(
|
|
149
149
|
he,
|
|
@@ -226,8 +226,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
|
|
|
226
226
|
setup(R) {
|
|
227
227
|
const {
|
|
228
228
|
t: c
|
|
229
|
-
} = U(), u =
|
|
230
|
-
|
|
229
|
+
} = U(), u = $();
|
|
230
|
+
A(u);
|
|
231
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([{
|
|
232
232
|
accessorKey: "name",
|
|
233
233
|
header: () => c("menu.recipe.table.columns.name"),
|
|
@@ -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 z, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as H } from "vue";
|
|
2
|
+
import { z as i, O as W, u as Q, D as G } from "./menu-DQurCWMa.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-CtQEOIp5.js";
|
|
7
|
+
import { d as ae, _ as oe, u as se, c as le } from "./scheduler-D0IlDwT3.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(), I = 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 = {
|
|
@@ -87,7 +87,7 @@ const ce = {
|
|
|
87
87
|
[i.F_SCHEDULE_DAY.enum.friday]: "Friday",
|
|
88
88
|
[i.F_SCHEDULE_DAY.enum.saturday]: "Saturday",
|
|
89
89
|
[i.F_SCHEDULE_DAY.enum.sunday]: "Sunday"
|
|
90
|
-
},
|
|
90
|
+
}, M = Object.keys(r).slice(0, 5), Y = Object.keys(r).slice(5);
|
|
91
91
|
function F(e, t) {
|
|
92
92
|
if (e === i.F_SCHEDULE_FREQUENCY.enum.daily || t.length === Object.keys(r).length)
|
|
93
93
|
return "Daily";
|
|
@@ -98,7 +98,7 @@ const ce = {
|
|
|
98
98
|
includes: [],
|
|
99
99
|
excludes: []
|
|
100
100
|
});
|
|
101
|
-
return v.length === 1 ? `Daily except ${r[v[0]]}` : E(o,
|
|
101
|
+
return v.length === 1 ? `Daily except ${r[v[0]]}` : E(o, M) ? "Weekdays" : E(o, Y) ? "Weekends" : o.every((u, n) => {
|
|
102
102
|
if (n === 0) return !0;
|
|
103
103
|
const b = s.findIndex((P) => P === u);
|
|
104
104
|
return o[n - 1] === s[b - 1];
|
|
@@ -117,7 +117,7 @@ const ce = {
|
|
|
117
117
|
C.value || (t = x.value) == null || t.show(e);
|
|
118
118
|
}
|
|
119
119
|
const O = Z();
|
|
120
|
-
function
|
|
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", {
|
|
@@ -143,7 +143,7 @@ const ce = {
|
|
|
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 = Q(), B = y(() => A.categorizedRawMenuItems), p = y(() => A.state.menu.modules.scheduler), w = W(G(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"])) : H("", !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(z, {
|
|
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": I.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(z, 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: ")) : H("", !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))]),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as J, ref as L, computed as O, resolveComponent as h, createElementBlock as g, openBlock as d, Fragment as x, renderSlot as ae, createVNode as l, unref as t, withCtx as m, createElementVNode as y, toDisplayString as
|
|
1
|
+
import { defineComponent as J, ref as L, computed as O, resolveComponent as h, createElementBlock as g, openBlock as d, Fragment as x, renderSlot as ae, createVNode as l, unref as t, withCtx as m, createElementVNode as y, toDisplayString as A, onBeforeMount as oe, watch as F, watchEffect as se, h as $, getCurrentInstance as le, onMounted as re, createBlock as j, createCommentVNode as G, isRef as ie, normalizeClass as Q, renderList as ue } from "vue";
|
|
2
2
|
import { useRouter as ce } from "vue-router";
|
|
3
|
-
import { H, u as W,
|
|
3
|
+
import { H, u as W, D as X, O as Z, J as I, z as S } from "./menu-DQurCWMa.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as de, useCoreStore as me } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as ne, components as Y, useDialog as pe, FmButtonVariant as
|
|
5
|
+
import { useSnackbar as ne, components as Y, useDialog as pe, FmButtonVariant as z, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as fe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
7
|
-
import { _ as ge, R as ve } from "./app-
|
|
7
|
+
import { _ as ge, R as ve } from "./app-CtQEOIp5.js";
|
|
8
8
|
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
10
10
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
11
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
12
|
-
import { u as xe } from "./app-
|
|
12
|
+
import { u as xe } from "./app-xaGd6_oS.js";
|
|
13
13
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
14
14
|
const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex flex-col h-full" }, Ee = { class: "flex gap-8 items-center justify-start" }, Ve = /* @__PURE__ */ J({
|
|
15
15
|
__name: "Form",
|
|
@@ -18,15 +18,15 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
18
18
|
initialValue: {}
|
|
19
19
|
},
|
|
20
20
|
emits: ["submitted"],
|
|
21
|
-
setup(K, { expose: b, emit:
|
|
22
|
-
const { t: r } = ee(), p = K,
|
|
21
|
+
setup(K, { expose: b, emit: D }) {
|
|
22
|
+
const { t: r } = ee(), p = K, N = D, s = L(
|
|
23
23
|
p.initialValue ? H(p.initialValue) : {
|
|
24
24
|
_id: "",
|
|
25
25
|
name: "",
|
|
26
26
|
position: 0,
|
|
27
27
|
items: []
|
|
28
28
|
}
|
|
29
|
-
), C = W(), i = ne(),
|
|
29
|
+
), C = W(), i = ne(), R = X(i), q = Z(R), c = L(!1), u = L(!1), _ = (f) => {
|
|
30
30
|
ye.isBoolean(f) ? u.value = f : u.value = !u.value;
|
|
31
31
|
}, E = O(() => p.action === "add" ? r("menu.serving_sequence.add") : r("menu.serving_sequence.update"));
|
|
32
32
|
async function P() {
|
|
@@ -55,7 +55,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
55
55
|
else
|
|
56
56
|
throw new Error("Invalid action");
|
|
57
57
|
} finally {
|
|
58
|
-
u.value = !1,
|
|
58
|
+
u.value = !1, N("submitted");
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
b({
|
|
@@ -82,7 +82,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
82
82
|
"max-width": 560
|
|
83
83
|
}, {
|
|
84
84
|
"side-sheet-header": m(() => [
|
|
85
|
-
y("p", Ce,
|
|
85
|
+
y("p", Ce, A(E.value), 1)
|
|
86
86
|
]),
|
|
87
87
|
"side-sheet-footer": m(() => [
|
|
88
88
|
y("div", Ee, [
|
|
@@ -142,15 +142,15 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
142
142
|
class: "flex-1 space-y-4"
|
|
143
143
|
}, Ie = {
|
|
144
144
|
class: "fm-typo-en-body-lg-600"
|
|
145
|
-
},
|
|
145
|
+
}, De = {
|
|
146
146
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
147
147
|
}, Je = /* @__PURE__ */ J({
|
|
148
148
|
__name: "ServingSequence",
|
|
149
149
|
setup(K) {
|
|
150
150
|
const {
|
|
151
151
|
searchKey: b,
|
|
152
|
-
filter:
|
|
153
|
-
} = ke(), r = W(), p = ne(),
|
|
152
|
+
filter: D
|
|
153
|
+
} = ke(), r = W(), p = ne(), N = X(p), s = Z(N), C = pe(), i = me(), R = xe(), q = ce(), {
|
|
154
154
|
t: c
|
|
155
155
|
} = ee(), u = (e) => {
|
|
156
156
|
e && e !== S.F_MENU_VERSION.enum.v4 && q.push({
|
|
@@ -166,7 +166,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
166
166
|
}, (e) => {
|
|
167
167
|
u(e);
|
|
168
168
|
}), F(() => i.sessionUser.value, (e) => {
|
|
169
|
-
e &&
|
|
169
|
+
e && R.getPublicSetting();
|
|
170
170
|
}), F(() => i.currentBusiness.value, async (e, n) => {
|
|
171
171
|
e && e._id !== (n == null ? void 0 : n._id) && await r.readRestaurants();
|
|
172
172
|
}), F(() => i.currentRestaurant.value, async (e, n) => {
|
|
@@ -176,7 +176,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
176
176
|
});
|
|
177
177
|
const _ = O(() => r.serveSequence.filter(({
|
|
178
178
|
name: e
|
|
179
|
-
}) =>
|
|
179
|
+
}) => D([e])) ?? []);
|
|
180
180
|
function E(e) {
|
|
181
181
|
C.open({
|
|
182
182
|
title: "Delete sequence",
|
|
@@ -184,7 +184,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
184
184
|
primaryActions: {
|
|
185
185
|
text: "Delete",
|
|
186
186
|
close: !0,
|
|
187
|
-
variant:
|
|
187
|
+
variant: z.Destructive
|
|
188
188
|
},
|
|
189
189
|
secondaryActions: {
|
|
190
190
|
text: "Cancel",
|
|
@@ -202,7 +202,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
202
202
|
servingSequence: e
|
|
203
203
|
}) => $(Y.FmButton, {
|
|
204
204
|
prependIcon: "delete",
|
|
205
|
-
variant:
|
|
205
|
+
variant: z.Tertiary,
|
|
206
206
|
textColor: "neutral-gray-400",
|
|
207
207
|
onClick: (n) => {
|
|
208
208
|
n.stopPropagation(), E(e);
|
|
@@ -237,7 +237,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
237
237
|
class: "w-full flex justify-end items-center"
|
|
238
238
|
}, [$(Y.FmButton, {
|
|
239
239
|
prependIcon: "delete",
|
|
240
|
-
variant:
|
|
240
|
+
variant: z.Tertiary,
|
|
241
241
|
textColor: "neutral-gray-400",
|
|
242
242
|
onClick: (n) => {
|
|
243
243
|
n.stopPropagation(), E(e.row.original);
|
|
@@ -296,8 +296,8 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
296
296
|
}, null, 8, ["modelValue", "placeholder"])]), V.value ? (d(), g("div", Fe, [(d(!0), g(x, null, ue(_.value, (o) => (d(), g("div", {
|
|
297
297
|
key: o._id,
|
|
298
298
|
class: Q(["py-12 px-16", "flex items-center space-x-8"]),
|
|
299
|
-
onClick: (
|
|
300
|
-
}, [y("div", Oe, [y("p", Ie,
|
|
299
|
+
onClick: (Ne) => a(o)
|
|
300
|
+
}, [y("div", Oe, [y("p", Ie, A(o.name), 1), y("p", De, A(t(c)("menu.common.labels.products_linked", {
|
|
301
301
|
count: o.items.length
|
|
302
302
|
})), 1)]), l(P, {
|
|
303
303
|
servingSequence: o
|