@feedmepos/mf-menu 0.32.17 → 0.32.18-dev.1
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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as $, resolveComponent as
|
|
2
|
-
import { J as
|
|
3
|
-
import {
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { FmButtonVariant as z, useSnackbar as V, useDialog as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { u as
|
|
8
|
-
import { a as
|
|
9
|
-
import { t as be, v as ve, w as _e } from "./item-K01xd1Z0.js";
|
|
1
|
+
import { defineComponent as Z, ref as v, computed as $, resolveComponent as W, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as R, createBlock as oe, withCtx as A } from "vue";
|
|
2
|
+
import { J as O, F as ne } from "./jszip.min-CO2_Gf69.js";
|
|
3
|
+
import { a as le, u as ie, n as D, r as re, s as ce, t as de, v as me, w as ue, x as ge, y as pe } from "./App-Cfl37TTw.js";
|
|
4
|
+
import { useI18n as fe } from "@feedmepos/mf-common";
|
|
5
|
+
import { FmButtonVariant as z, useSnackbar as V, useDialog as he, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
6
|
+
import { _ as ye } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { u as be, a as ve } from "./menu-Brxar171.js";
|
|
8
|
+
import { a as _e } from "./Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js";
|
|
10
9
|
const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
|
|
11
10
|
key: 0,
|
|
12
11
|
class: "h-full flex flex-col"
|
|
@@ -19,16 +18,16 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
19
18
|
}, Me = { class: "space-y-12" }, $e = { class: "fm-typo-en-body-sm font-medium" }, ze = { class: "flex" }, Pe = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden flex items-center justify-center" }, Le = ["src", "alt"], Ne = {
|
|
20
19
|
key: 1,
|
|
21
20
|
class: "text-gray-400 text-xs"
|
|
22
|
-
}, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"],
|
|
21
|
+
}, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"], Re = {
|
|
23
22
|
key: 1,
|
|
24
23
|
class: "h-full flex flex-col"
|
|
25
|
-
},
|
|
24
|
+
}, Ae = {
|
|
26
25
|
key: 0,
|
|
27
26
|
class: "flex-1 flex items-center justify-center"
|
|
28
|
-
},
|
|
27
|
+
}, Oe = {
|
|
29
28
|
key: 1,
|
|
30
29
|
class: "flex-1 overflow-y-auto p-16"
|
|
31
|
-
}, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" },
|
|
30
|
+
}, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__PURE__ */ Z({
|
|
32
31
|
__name: "ImageUpdatePreview",
|
|
33
32
|
props: {
|
|
34
33
|
matchedImages: {},
|
|
@@ -44,7 +43,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
44
43
|
F("update", u.matchedImages);
|
|
45
44
|
}
|
|
46
45
|
return (w, l) => {
|
|
47
|
-
const x =
|
|
46
|
+
const x = W("fm-button");
|
|
48
47
|
return r(), c("div", we, [
|
|
49
48
|
s("div", xe, [
|
|
50
49
|
l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
|
|
@@ -92,7 +91,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
92
91
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
|
|
93
92
|
], -1)),
|
|
94
93
|
s("div", Me, [
|
|
95
|
-
(r(!0), c(P, null,
|
|
94
|
+
(r(!0), c(P, null, R(u.matchedImages, (m, C) => (r(), c("div", {
|
|
96
95
|
key: C,
|
|
97
96
|
class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
|
|
98
97
|
}, [
|
|
@@ -119,27 +118,27 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
119
118
|
]))), 128))
|
|
120
119
|
])
|
|
121
120
|
]))
|
|
122
|
-
])) : y.value === "unmatched" ? (r(), c("div",
|
|
123
|
-
k.value === 0 ? (r(), c("div",
|
|
121
|
+
])) : y.value === "unmatched" ? (r(), c("div", Re, [
|
|
122
|
+
k.value === 0 ? (r(), c("div", Ae, l[5] || (l[5] = [
|
|
124
123
|
B('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">All images matched!</p><p class="fm-typo-en-body-sm text-gray-400 mt-4">No unmatched images found</p></div>', 1)
|
|
125
|
-
]))) : (r(), c("div",
|
|
124
|
+
]))) : (r(), c("div", Oe, [
|
|
126
125
|
l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
|
|
127
126
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Filename"),
|
|
128
127
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
|
|
129
128
|
], -1)),
|
|
130
129
|
s("div", De, [
|
|
131
|
-
(r(!0), c(P, null,
|
|
130
|
+
(r(!0), c(P, null, R(u.unmatchedImages, (m, C) => (r(), c("div", {
|
|
132
131
|
key: C,
|
|
133
132
|
class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
|
|
134
133
|
}, [
|
|
135
134
|
s("div", Ve, U(m.filename), 1),
|
|
136
135
|
s("div", Ze, [
|
|
137
|
-
s("div",
|
|
136
|
+
s("div", We, [
|
|
138
137
|
s("img", {
|
|
139
138
|
src: m.imageUrl,
|
|
140
139
|
alt: m.filename,
|
|
141
140
|
class: "w-full h-full object-cover"
|
|
142
|
-
}, null, 8,
|
|
141
|
+
}, null, 8, qe)
|
|
143
142
|
])
|
|
144
143
|
])
|
|
145
144
|
]))), 128))
|
|
@@ -151,32 +150,32 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
151
150
|
};
|
|
152
151
|
}
|
|
153
152
|
});
|
|
154
|
-
var
|
|
153
|
+
var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
|
|
155
154
|
const He = {
|
|
156
155
|
key: 0,
|
|
157
156
|
class: "h-screen"
|
|
158
|
-
}, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" },
|
|
157
|
+
}, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, ct = /* @__PURE__ */ Z({
|
|
159
158
|
__name: "ProductInternalTools",
|
|
160
159
|
setup(L) {
|
|
161
|
-
const { t: j } =
|
|
160
|
+
const { t: j } = fe(), u = le(V()), F = V(), y = he(), b = ie(), { selectedCategories: k } = be(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
|
|
162
161
|
const e = D.flatten(k.value.map((a) => a.items));
|
|
163
162
|
return D.uniqBy(e, (a) => a._id);
|
|
164
163
|
}), m = $(() => x.value.length);
|
|
165
164
|
async function C(e, a) {
|
|
166
|
-
return await
|
|
165
|
+
return await me(e, {
|
|
167
166
|
withTimestamp: !0,
|
|
168
167
|
filename: a
|
|
169
168
|
});
|
|
170
169
|
}
|
|
171
|
-
async function
|
|
172
|
-
const o = new
|
|
170
|
+
async function q(e, a = "images.zip") {
|
|
171
|
+
const o = new O();
|
|
173
172
|
e.forEach(({ blob: d, filename: n }) => {
|
|
174
173
|
d && o.file(n, d);
|
|
175
174
|
});
|
|
176
175
|
const g = await o.generateAsync({ type: "blob" });
|
|
177
176
|
ne.saveAs(g, a);
|
|
178
177
|
}
|
|
179
|
-
async function
|
|
178
|
+
async function G() {
|
|
180
179
|
const e = x.value.filter((a) => a.thumbnail);
|
|
181
180
|
if (e.length === 0) {
|
|
182
181
|
F.open({ type: "error", title: "No downloadable images found" });
|
|
@@ -206,7 +205,7 @@ const He = {
|
|
|
206
205
|
};
|
|
207
206
|
});
|
|
208
207
|
a.value = `Starting download of ${o.length} images...`;
|
|
209
|
-
const d = (await
|
|
208
|
+
const d = (await re(o, C, {
|
|
210
209
|
batchSize: 5,
|
|
211
210
|
// Download 5 images at a time
|
|
212
211
|
batchDelay: 200,
|
|
@@ -215,7 +214,7 @@ const He = {
|
|
|
215
214
|
})).filter((n) => n !== null);
|
|
216
215
|
if (a.value = "Creating ZIP file...", d.length > 0) {
|
|
217
216
|
const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
|
|
218
|
-
await
|
|
217
|
+
await q(d, n);
|
|
219
218
|
} else
|
|
220
219
|
throw new Error("Failed to fetch any images");
|
|
221
220
|
},
|
|
@@ -227,8 +226,8 @@ const He = {
|
|
|
227
226
|
);
|
|
228
227
|
});
|
|
229
228
|
}
|
|
230
|
-
async function
|
|
231
|
-
const o = await new
|
|
229
|
+
async function J(e) {
|
|
230
|
+
const o = await new O().loadAsync(e), g = [];
|
|
232
231
|
for (const [d, n] of Object.entries(o.files)) {
|
|
233
232
|
if (n.dir || d.includes("__MACOSX/") || !N(d))
|
|
234
233
|
continue;
|
|
@@ -262,7 +261,7 @@ const He = {
|
|
|
262
261
|
const a = [];
|
|
263
262
|
for (const t of e)
|
|
264
263
|
if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
|
|
265
|
-
const i = await
|
|
264
|
+
const i = await J(t);
|
|
266
265
|
a.push(...i);
|
|
267
266
|
} else N(t.name) && a.push(t);
|
|
268
267
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -308,12 +307,12 @@ const He = {
|
|
|
308
307
|
await u.minor(
|
|
309
308
|
async () => {
|
|
310
309
|
const o = async (t) => {
|
|
311
|
-
const i =
|
|
310
|
+
const i = ue(t.productId);
|
|
312
311
|
let f = "";
|
|
313
|
-
return t.newImage && (await
|
|
312
|
+
return t.newImage && (await ge.update(i, t.newImage, Je.firebase.storageBucket), f = pe(i)), { productId: t.productId, newImageUrl: f };
|
|
314
313
|
};
|
|
315
314
|
a.value = `Starting upload of ${e.length} product images...`;
|
|
316
|
-
const g = await
|
|
315
|
+
const g = await ce({
|
|
317
316
|
items: e,
|
|
318
317
|
processor: o,
|
|
319
318
|
batchSize: 5,
|
|
@@ -325,7 +324,7 @@ const He = {
|
|
|
325
324
|
}
|
|
326
325
|
});
|
|
327
326
|
a.value = "Updating product data...";
|
|
328
|
-
const d = b.state.menu, n =
|
|
327
|
+
const d = b.state.menu, n = de(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
|
|
329
328
|
n.modules.item = n.modules.item.map((t) => {
|
|
330
329
|
const i = p.get(t._id);
|
|
331
330
|
return i && i.newImageUrl ? { ...t, thumbnail: i.newImageUrl } : t;
|
|
@@ -353,24 +352,24 @@ const He = {
|
|
|
353
352
|
}
|
|
354
353
|
a.value = "";
|
|
355
354
|
}
|
|
356
|
-
return
|
|
357
|
-
const o =
|
|
355
|
+
return ve().resetOnMount(), (e, a) => {
|
|
356
|
+
const o = W("fm-button");
|
|
358
357
|
return r(), c(P, null, [
|
|
359
358
|
_.value ? (r(), c("div", He, [
|
|
360
|
-
I(
|
|
359
|
+
I(Ge, {
|
|
361
360
|
"matched-images": w.value,
|
|
362
361
|
"unmatched-images": l.value,
|
|
363
362
|
onCancel: te,
|
|
364
363
|
onUpdate: ee
|
|
365
364
|
}, null, 8, ["matched-images", "unmatched-images"])
|
|
366
|
-
])) : (r(), oe(
|
|
365
|
+
])) : (r(), oe(ye, {
|
|
367
366
|
key: 1,
|
|
368
367
|
heading: h(j)("menu.productInternalTools.title")
|
|
369
368
|
}, {
|
|
370
|
-
default:
|
|
371
|
-
I(
|
|
369
|
+
default: A(() => [
|
|
370
|
+
I(_e)
|
|
372
371
|
]),
|
|
373
|
-
"append-heading":
|
|
372
|
+
"append-heading": A(() => [
|
|
374
373
|
s("div", Xe, [
|
|
375
374
|
s("div", Ke, [
|
|
376
375
|
s("div", Qe, [
|
|
@@ -383,7 +382,7 @@ const He = {
|
|
|
383
382
|
"text-color": h(M).TypoSecondary,
|
|
384
383
|
variant: h(z).Primary,
|
|
385
384
|
label: "Download Images",
|
|
386
|
-
onClick:
|
|
385
|
+
onClick: G
|
|
387
386
|
}, null, 8, ["bg-color", "text-color", "variant"]),
|
|
388
387
|
I(o, {
|
|
389
388
|
"bg-color": h(M).NeutralGray100,
|
|
@@ -411,5 +410,5 @@ const He = {
|
|
|
411
410
|
}
|
|
412
411
|
});
|
|
413
412
|
export {
|
|
414
|
-
|
|
413
|
+
ct as default
|
|
415
414
|
};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { defineComponent as E, computed as g, ref as
|
|
2
|
-
import { D as F } from "./dayjs.min-
|
|
3
|
-
import { J as
|
|
4
|
-
import { u as J,
|
|
5
|
-
import { w as
|
|
6
|
-
import { useCoreStore as K, useI18n as
|
|
7
|
-
import { useDialog as Q, useDialogChild as
|
|
1
|
+
import { defineComponent as E, computed as g, ref as q, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as O, createVNode as n, createCommentVNode as G, createElementBlock as P, Fragment as A } from "vue";
|
|
2
|
+
import { D as F } from "./dayjs.min-DNPTnUFp.js";
|
|
3
|
+
import { J as ne, F as oe } from "./jszip.min-CO2_Gf69.js";
|
|
4
|
+
import { u as J, a as W, i as R, j as U, e as Z, k as ae, l as re, c as se, n as z, o as ie, p as le, L as H, q as ue } from "./App-Cfl37TTw.js";
|
|
5
|
+
import { w as ce } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js";
|
|
6
|
+
import { useCoreStore as K, useI18n as me } from "@feedmepos/mf-common";
|
|
7
|
+
import { useDialog as Q, useDialogChild as de, useSnackbar as X, useBreakpoints as pe, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
|
|
8
8
|
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { L as O } from "./LinkProductSideSheet-DFDYEUBh.js";
|
|
15
|
-
import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js";
|
|
16
|
-
import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js";
|
|
17
|
-
import { m as ye } from "./toExcel-BZkbXlHv.js";
|
|
9
|
+
import { _ as _e, a as L } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
+
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
+
import { u as ve, a as ge } from "./menu-Brxar171.js";
|
|
12
|
+
import { _ as j, a as be } from "./Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js";
|
|
13
|
+
import { m as ye } from "./toExcel-CRJIU0NC.js";
|
|
18
14
|
const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "flex justify-end gap-8" }, Se = /* @__PURE__ */ E({
|
|
19
15
|
__name: "ConfirmActionDialog",
|
|
20
16
|
props: {
|
|
@@ -23,36 +19,36 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
23
19
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
24
20
|
},
|
|
25
21
|
setup(C) {
|
|
26
|
-
const t = C,
|
|
27
|
-
return (d,
|
|
28
|
-
const p =
|
|
22
|
+
const t = C, S = g(() => t.message.replace("[[value]]", t.value)), k = q(""), r = Q(), { emitAction: x } = de();
|
|
23
|
+
return (d, s) => {
|
|
24
|
+
const p = M("FmTextField"), _ = M("FmButton"), f = M("FmForm");
|
|
29
25
|
return m(), y(f, {
|
|
30
26
|
"on-validation-success": () => e(x)("primary"),
|
|
31
27
|
"blame-form-child-on-validation-failed": ""
|
|
32
28
|
}, {
|
|
33
29
|
default: c(() => [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
i("div", ke, [
|
|
31
|
+
i("div", null, O(d.description), 1),
|
|
32
|
+
i("div", { innerHTML: S.value }, null, 8, xe),
|
|
33
|
+
i("div", null, [
|
|
34
|
+
n(p, {
|
|
39
35
|
modelValue: k.value,
|
|
40
36
|
"onUpdate:modelValue": [
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
s[0] || (s[0] = (l) => k.value = l),
|
|
38
|
+
s[1] || (s[1] = () => {
|
|
43
39
|
})
|
|
44
40
|
],
|
|
45
41
|
placeholder: d.value,
|
|
46
|
-
rules: [(
|
|
42
|
+
rules: [(l) => l === d.value || "Value does not match"]
|
|
47
43
|
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
48
44
|
]),
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
i("div", he, [
|
|
46
|
+
n(_, {
|
|
51
47
|
label: "Cancel",
|
|
52
48
|
variant: "secondary",
|
|
53
|
-
onClick:
|
|
49
|
+
onClick: s[2] || (s[2] = (l) => e(r).close())
|
|
54
50
|
}),
|
|
55
|
-
|
|
51
|
+
n(_, {
|
|
56
52
|
label: "Confirm",
|
|
57
53
|
type: "submit"
|
|
58
54
|
})
|
|
@@ -66,8 +62,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
66
62
|
}), Me = /* @__PURE__ */ E({
|
|
67
63
|
__name: "Migrate",
|
|
68
64
|
setup(C) {
|
|
69
|
-
const t = J(),
|
|
70
|
-
async function
|
|
65
|
+
const t = J(), S = K(), k = X(), { minor: r } = W(k), x = q(!1), d = Q();
|
|
66
|
+
async function s() {
|
|
71
67
|
p.value || x.value || d.open({
|
|
72
68
|
title: "Migrate to new version",
|
|
73
69
|
contentComponent: Se,
|
|
@@ -76,7 +72,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
76
72
|
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
77
73
|
}
|
|
78
74
|
}).onPrimary(async () => {
|
|
79
|
-
d.close(), await
|
|
75
|
+
d.close(), await r(
|
|
80
76
|
async () => {
|
|
81
77
|
await t.migrate(), setTimeout(() => {
|
|
82
78
|
window.location.reload();
|
|
@@ -92,14 +88,14 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
92
88
|
});
|
|
93
89
|
}
|
|
94
90
|
const p = g(() => {
|
|
95
|
-
const _ =
|
|
91
|
+
const _ = S.restaurants.value;
|
|
96
92
|
if (!_.length) return "Required at least one restaurant to migrate";
|
|
97
|
-
const f = _.filter((b) => !b.posVersion || !R.Pos.canUse({ feature:
|
|
98
|
-
return f.length ? `Upgrade POS to V${R.Pos.minVersionToUse(
|
|
93
|
+
const f = _.filter((b) => !b.posVersion || !R.Pos.canUse({ feature: U.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
|
|
94
|
+
return f.length ? `Upgrade POS to V${R.Pos.minVersionToUse(U.F_FEATURE.enum.menuV4)} to use new menu: ${f.map((b) => b.profile.name).join(", ")}` : null;
|
|
99
95
|
});
|
|
100
96
|
return g(() => p.value ? p.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (_, f) => {
|
|
101
|
-
const
|
|
102
|
-
return !p.value && e(t).version !== e(Z.F_MENU_VERSION).enum.v4 ? (m(), y(
|
|
97
|
+
const l = M("FmSnackbar");
|
|
98
|
+
return !p.value && e(t).version !== e(Z.F_MENU_VERSION).enum.v4 ? (m(), y(l, {
|
|
103
99
|
key: 0,
|
|
104
100
|
class: "!max-w-full",
|
|
105
101
|
title: "New version of menu is out now!",
|
|
@@ -107,48 +103,47 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
107
103
|
variant: "info",
|
|
108
104
|
action: "Migrate",
|
|
109
105
|
"z-index": 0,
|
|
110
|
-
onOnAction:
|
|
106
|
+
onOnAction: s
|
|
111
107
|
})) : G("", !0);
|
|
112
108
|
};
|
|
113
109
|
}
|
|
114
|
-
}), we = "/assets/menu-export-
|
|
110
|
+
}), we = "/assets/menu-export-DcINiK28.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, je = /* @__PURE__ */ E({
|
|
115
111
|
__name: "Products",
|
|
116
112
|
setup(C) {
|
|
117
|
-
const { t } =
|
|
118
|
-
...
|
|
119
|
-
_id:
|
|
120
|
-
_rev:
|
|
113
|
+
const { t } = me(), S = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = ae(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = ve(), _ = g(() => ({
|
|
114
|
+
...re.menuV4ToV3(se(r.state.menu)),
|
|
115
|
+
_id: r.state.menu._id,
|
|
116
|
+
_rev: r.state.menu._rev
|
|
121
117
|
})), f = g(() => {
|
|
122
|
-
const
|
|
123
|
-
return
|
|
118
|
+
const u = z.flatten(p.value.map((o) => o.items));
|
|
119
|
+
return z.uniqBy(u, (o) => o._id).length;
|
|
124
120
|
});
|
|
125
|
-
async function u
|
|
126
|
-
const
|
|
127
|
-
for (let
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
121
|
+
async function l(u, o) {
|
|
122
|
+
const v = new ne();
|
|
123
|
+
for (let w = 0; w < u.length; w++)
|
|
124
|
+
v.file(`${o[w]}.xlsx`, u[w]);
|
|
125
|
+
const a = await v.generateAsync({ type: "blob" });
|
|
126
|
+
oe.saveAs(a, `books_${F().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
131
127
|
}
|
|
132
128
|
async function b() {
|
|
133
129
|
await k.minor(
|
|
134
130
|
async () => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
`
|
|
139
|
-
`
|
|
140
|
-
|
|
141
|
-
], h = await se(
|
|
131
|
+
if (await r.readMenu(), r.version === Z.F_MENU_VERSION.enum.v4) {
|
|
132
|
+
const u = r.state.menu, o = F().format("DD-MM-YYYY_HH-mm"), v = [
|
|
133
|
+
`menu_${o}`,
|
|
134
|
+
`addonGroup_${o}`,
|
|
135
|
+
`itemLinkedAddon_${o}`
|
|
136
|
+
], a = await ue(
|
|
142
137
|
we,
|
|
143
138
|
JSON.stringify({
|
|
144
|
-
menu:
|
|
145
|
-
attributeSettings:
|
|
139
|
+
menu: u,
|
|
140
|
+
attributeSettings: S.itemAttributeSettings.value
|
|
146
141
|
})
|
|
147
142
|
);
|
|
148
|
-
await
|
|
143
|
+
await l(a, v);
|
|
149
144
|
} else {
|
|
150
|
-
const
|
|
151
|
-
await
|
|
145
|
+
const u = ye(_.value), o = `menu_${F().format("DD-MM-YYYY_HH-mm")}`;
|
|
146
|
+
await ce(u, `${o}.xlsx`, {
|
|
152
147
|
bookType: "xlsx",
|
|
153
148
|
bookSST: !0,
|
|
154
149
|
type: "array",
|
|
@@ -156,45 +151,45 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
156
151
|
});
|
|
157
152
|
}
|
|
158
153
|
},
|
|
159
|
-
{ successMessage: "Menu exported", customId:
|
|
154
|
+
{ successMessage: "Menu exported", customId: r.state.menu._id }
|
|
160
155
|
);
|
|
161
156
|
}
|
|
162
157
|
const {
|
|
163
158
|
menuItems: T,
|
|
164
|
-
categories:
|
|
165
|
-
linkItemRules:
|
|
159
|
+
categories: I,
|
|
160
|
+
linkItemRules: D,
|
|
166
161
|
handleSubmit: N,
|
|
167
162
|
catalogManager: Y,
|
|
168
163
|
schedulerManager: B
|
|
169
|
-
} =
|
|
170
|
-
return
|
|
171
|
-
const
|
|
172
|
-
return m(), y(
|
|
164
|
+
} = ie(!1), ee = pe(), te = g(() => ee.breakpoints.value.xs);
|
|
165
|
+
return ge().resetOnMount(), (u, o) => {
|
|
166
|
+
const v = M("fm-button");
|
|
167
|
+
return m(), y(fe, {
|
|
173
168
|
heading: e(t)("menu.products.title")
|
|
174
169
|
}, {
|
|
175
170
|
default: c(() => [
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
n(Me),
|
|
172
|
+
n(be)
|
|
178
173
|
]),
|
|
179
174
|
"append-heading": c(() => [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
i("div", Ce, [
|
|
176
|
+
i("div", Fe, [
|
|
177
|
+
i("div", $e, [
|
|
178
|
+
i("p", Ve, O(f.value), 1)
|
|
184
179
|
])
|
|
185
180
|
]),
|
|
186
|
-
|
|
187
|
-
te.value ? (m(), y(
|
|
188
|
-
default: c(({ trigger:
|
|
189
|
-
|
|
181
|
+
i("div", Ee, [
|
|
182
|
+
te.value ? (m(), y(j, { key: 1 }, {
|
|
183
|
+
default: c(({ trigger: a }) => [
|
|
184
|
+
n(_e, null, {
|
|
190
185
|
default: c(() => [
|
|
191
|
-
|
|
186
|
+
n(L, {
|
|
192
187
|
label: e(t)("menu.products.actions.export"),
|
|
193
188
|
onClick: b
|
|
194
189
|
}, null, 8, ["label"]),
|
|
195
|
-
|
|
190
|
+
n(L, {
|
|
196
191
|
label: e(t)("menu.products.actions.import"),
|
|
197
|
-
onClick:
|
|
192
|
+
onClick: a
|
|
198
193
|
}, null, 8, ["label", "onClick"])
|
|
199
194
|
]),
|
|
200
195
|
_: 2
|
|
@@ -202,33 +197,33 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
202
197
|
]),
|
|
203
198
|
_: 1
|
|
204
199
|
})) : (m(), P(A, { key: 0 }, [
|
|
205
|
-
|
|
206
|
-
default: c(({ trigger:
|
|
207
|
-
|
|
200
|
+
n(le, null, {
|
|
201
|
+
default: c(({ trigger: a }) => [
|
|
202
|
+
n(v, {
|
|
208
203
|
label: e(t)("menu.tree_editor.title"),
|
|
209
|
-
"bg-color": e(
|
|
210
|
-
"text-color": e(
|
|
204
|
+
"bg-color": e(h).NeutralGray100,
|
|
205
|
+
"text-color": e(h).TypoSecondary,
|
|
211
206
|
variant: e($).Primary,
|
|
212
|
-
onClick:
|
|
207
|
+
onClick: a
|
|
213
208
|
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
214
209
|
]),
|
|
215
210
|
_: 1
|
|
216
211
|
}),
|
|
217
|
-
|
|
218
|
-
"bg-color": e(
|
|
219
|
-
"text-color": e(
|
|
212
|
+
n(v, {
|
|
213
|
+
"bg-color": e(h).NeutralGray100,
|
|
214
|
+
"text-color": e(h).TypoSecondary,
|
|
220
215
|
variant: e($).Primary,
|
|
221
216
|
label: e(t)("menu.products.actions.export"),
|
|
222
217
|
onClick: b
|
|
223
218
|
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
224
|
-
|
|
225
|
-
default: c(({ trigger:
|
|
226
|
-
|
|
227
|
-
"bg-color": e(
|
|
228
|
-
"text-color": e(
|
|
219
|
+
n(j, null, {
|
|
220
|
+
default: c(({ trigger: a }) => [
|
|
221
|
+
n(v, {
|
|
222
|
+
"bg-color": e(h).NeutralGray100,
|
|
223
|
+
"text-color": e(h).TypoSecondary,
|
|
229
224
|
variant: e($).Primary,
|
|
230
225
|
label: e(t)("menu.products.actions.import"),
|
|
231
|
-
onClick:
|
|
226
|
+
onClick: a
|
|
232
227
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
233
228
|
]),
|
|
234
229
|
_: 1
|
|
@@ -239,41 +234,41 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
239
234
|
key: 0,
|
|
240
235
|
label: e(t)("menu.products.actions.add"),
|
|
241
236
|
"prepend-icon": "add",
|
|
242
|
-
onClick:
|
|
243
|
-
}, null, 8, ["label"])) :
|
|
237
|
+
onClick: o[0] || (o[0] = (a) => e(d).create(null))
|
|
238
|
+
}, null, 8, ["label"])) : s.value ? (m(), y(H, {
|
|
244
239
|
key: 1,
|
|
245
240
|
"categorized-items": e(Y).linkableItems.value,
|
|
246
241
|
"initial-value": e(Y).currentItems.value,
|
|
247
242
|
"show-variant": !1,
|
|
248
243
|
"menu-items": e(T),
|
|
249
|
-
categories: e(
|
|
250
|
-
"link-item-rules": e(
|
|
251
|
-
"no-scheduler":
|
|
244
|
+
categories: e(I),
|
|
245
|
+
"link-item-rules": e(D),
|
|
246
|
+
"no-scheduler": s.value,
|
|
252
247
|
onSubmit: e(N)
|
|
253
248
|
}, {
|
|
254
|
-
default: c(({ trigger:
|
|
255
|
-
|
|
249
|
+
default: c(({ trigger: a }) => [
|
|
250
|
+
n(V, {
|
|
256
251
|
label: e(t)("menu.products.actions.link"),
|
|
257
252
|
"prepend-icon": "link",
|
|
258
|
-
onClick:
|
|
253
|
+
onClick: a
|
|
259
254
|
}, null, 8, ["label", "onClick"])
|
|
260
255
|
]),
|
|
261
256
|
_: 1
|
|
262
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(
|
|
257
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(H, {
|
|
263
258
|
key: 2,
|
|
264
259
|
"categorized-items": e(B).linkableItems.value,
|
|
265
260
|
"initial-value": e(B).currentItems.value,
|
|
266
261
|
"show-variant": !1,
|
|
267
262
|
"menu-items": e(T),
|
|
268
|
-
categories: e(
|
|
269
|
-
"link-item-rules": e(
|
|
270
|
-
"no-scheduler":
|
|
263
|
+
categories: e(I),
|
|
264
|
+
"link-item-rules": e(D),
|
|
265
|
+
"no-scheduler": s.value,
|
|
271
266
|
onSubmit: e(N)
|
|
272
267
|
}, {
|
|
273
|
-
default: c(({ trigger:
|
|
274
|
-
|
|
268
|
+
default: c(({ trigger: a }) => [
|
|
269
|
+
n(V, {
|
|
275
270
|
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
276
|
-
onClick:
|
|
271
|
+
onClick: a
|
|
277
272
|
}, null, 8, ["label", "onClick"])
|
|
278
273
|
]),
|
|
279
274
|
_: 1
|
|
@@ -288,5 +283,5 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
288
283
|
}
|
|
289
284
|
});
|
|
290
285
|
export {
|
|
291
|
-
|
|
286
|
+
je as default
|
|
292
287
|
};
|