@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.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-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
- package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
- package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
- package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
- package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
- package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
- package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
- package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
- package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
- package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
- package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
- package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
- package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
- package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
- package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
- package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
- package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
- package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
- package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
- package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
- package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
- package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
- package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
- package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
- package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
- package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
- package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
- package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
- package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
- package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
- package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
- package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
- package/dist/currency-BPHwez-E.js +7 -0
- package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
- package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
- package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
- package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
- package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
- package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
- package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
- package/dist/menu-CsIzrBEr.js +74044 -0
- package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
- package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
- package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
- package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
- package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
- package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
- package/package.json +1 -1
- package/dist/currency-BISImIgX.js +0 -7
- package/dist/menu-ibc-yXVt.js +0 -107745
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as
|
|
2
|
-
import { J as O, F as ne } from "./jszip.min-
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as Z, ref as v, computed as M, resolveComponent as G, 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 A, createBlock as oe, withCtx as R } from "vue";
|
|
2
|
+
import { J as O, F as ne } from "./jszip.min-BKJtvCjM.js";
|
|
3
|
+
import { A as le, u as ie, G as D, $ as re, Z as ce, I as de, J as me, K as ue } from "./menu-CsIzrBEr.js";
|
|
4
4
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
5
|
-
import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as
|
|
5
|
+
import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as $ } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { u as he, a as ye } from "./menu-
|
|
8
|
-
import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { v as ve, w as _e } from "./item-
|
|
7
|
+
import { u as he, a as ye } from "./menu-CDrsBjmr.js";
|
|
8
|
+
import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-zcistmwh.js";
|
|
9
|
+
import { v as ve, w as _e } from "./item-BAqzKh4O.js";
|
|
10
10
|
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
11
|
key: 0,
|
|
12
12
|
class: "h-full flex flex-col"
|
|
13
13
|
}, Fe = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex-1 flex items-center justify-center"
|
|
16
|
-
},
|
|
16
|
+
}, Se = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex-1 overflow-y-auto p-16"
|
|
19
|
-
},
|
|
19
|
+
}, $e = { class: "space-y-12" }, Me = { 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
20
|
key: 1,
|
|
21
21
|
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"],
|
|
22
|
+
}, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"], Ae = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "h-full flex flex-col"
|
|
25
|
-
},
|
|
25
|
+
}, Re = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "flex-1 flex items-center justify-center"
|
|
28
28
|
}, Oe = {
|
|
29
29
|
key: 1,
|
|
30
30
|
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" },
|
|
31
|
+
}, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, Ge = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Je = ["src", "alt"], We = /* @__PURE__ */ Z({
|
|
32
32
|
__name: "ImageUpdatePreview",
|
|
33
33
|
props: {
|
|
34
34
|
matchedImages: {},
|
|
@@ -36,15 +36,15 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["cancel", "update"],
|
|
38
38
|
setup(L, { emit: j }) {
|
|
39
|
-
const u = L, F = j, y = v("matched"), b =
|
|
39
|
+
const u = L, F = j, y = v("matched"), b = M(() => u.matchedImages.length), k = M(() => u.unmatchedImages.length);
|
|
40
40
|
function _() {
|
|
41
41
|
F("cancel");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function S() {
|
|
44
44
|
F("update", u.matchedImages);
|
|
45
45
|
}
|
|
46
46
|
return (w, l) => {
|
|
47
|
-
const x =
|
|
47
|
+
const x = G("fm-button");
|
|
48
48
|
return r(), c("div", we, [
|
|
49
49
|
s("div", xe, [
|
|
50
50
|
l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
|
|
@@ -58,7 +58,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
58
58
|
variant: h(z).Primary,
|
|
59
59
|
label: "Update",
|
|
60
60
|
disabled: b.value === 0,
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: S
|
|
62
62
|
}, null, 8, ["variant", "disabled"])
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
@@ -85,18 +85,18 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
85
85
|
y.value === "matched" ? (r(), c("div", je, [
|
|
86
86
|
b.value === 0 ? (r(), c("div", Fe, l[3] || (l[3] = [
|
|
87
87
|
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="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">No matched images found</p><p class="fm-typo-en-body-sm text-gray-400 mt-4"> Make sure your image filenames match product names </p></div>', 1)
|
|
88
|
-
]))) : (r(), c("div",
|
|
88
|
+
]))) : (r(), c("div", Se, [
|
|
89
89
|
l[4] || (l[4] = s("div", { class: "grid grid-cols-3 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
|
|
90
90
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Product Name"),
|
|
91
91
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Current Image"),
|
|
92
92
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
|
|
93
93
|
], -1)),
|
|
94
|
-
s("div",
|
|
95
|
-
(r(!0), c(P, null,
|
|
94
|
+
s("div", $e, [
|
|
95
|
+
(r(!0), c(P, null, A(u.matchedImages, (m, C) => (r(), c("div", {
|
|
96
96
|
key: C,
|
|
97
97
|
class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
|
|
98
98
|
}, [
|
|
99
|
-
s("div",
|
|
99
|
+
s("div", Me, U(m.productName), 1),
|
|
100
100
|
s("div", ze, [
|
|
101
101
|
s("div", Pe, [
|
|
102
102
|
m.originalThumbnail ? (r(), c("img", {
|
|
@@ -119,8 +119,8 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
119
119
|
]))), 128))
|
|
120
120
|
])
|
|
121
121
|
]))
|
|
122
|
-
])) : y.value === "unmatched" ? (r(), c("div",
|
|
123
|
-
k.value === 0 ? (r(), c("div",
|
|
122
|
+
])) : y.value === "unmatched" ? (r(), c("div", Ae, [
|
|
123
|
+
k.value === 0 ? (r(), c("div", Re, l[5] || (l[5] = [
|
|
124
124
|
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
125
|
]))) : (r(), c("div", Oe, [
|
|
126
126
|
l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
|
|
@@ -128,18 +128,18 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
128
128
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
|
|
129
129
|
], -1)),
|
|
130
130
|
s("div", De, [
|
|
131
|
-
(r(!0), c(P, null,
|
|
131
|
+
(r(!0), c(P, null, A(u.unmatchedImages, (m, C) => (r(), c("div", {
|
|
132
132
|
key: C,
|
|
133
133
|
class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
|
|
134
134
|
}, [
|
|
135
135
|
s("div", Ve, U(m.filename), 1),
|
|
136
136
|
s("div", Ze, [
|
|
137
|
-
s("div",
|
|
137
|
+
s("div", Ge, [
|
|
138
138
|
s("img", {
|
|
139
139
|
src: m.imageUrl,
|
|
140
140
|
alt: m.filename,
|
|
141
141
|
class: "w-full h-full object-cover"
|
|
142
|
-
}, null, 8,
|
|
142
|
+
}, null, 8, Je)
|
|
143
143
|
])
|
|
144
144
|
])
|
|
145
145
|
]))), 128))
|
|
@@ -151,24 +151,24 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
var
|
|
154
|
+
var qe = { firebase: { storageBucket: "image.feedmedev.cc" } };
|
|
155
155
|
const He = {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "h-screen"
|
|
158
158
|
}, Ke = { class: "flex-1 flex justify-between gap-8 pl-8" }, Xe = { 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" }, dt = /* @__PURE__ */ Z({
|
|
159
159
|
__name: "ProductInternalTools",
|
|
160
160
|
setup(L) {
|
|
161
|
-
const { t: j } = ge(), u = le(V()), F = V(), y = pe(), b = ie(), { selectedCategories: k } = he(), _ = v(!1),
|
|
161
|
+
const { t: j } = ge(), u = le(V()), F = V(), y = pe(), b = ie(), { selectedCategories: k } = he(), _ = v(!1), S = v(), w = v([]), l = v([]), x = M(() => {
|
|
162
162
|
const e = D.flatten(k.value.map((a) => a.items));
|
|
163
163
|
return D.uniqBy(e, (a) => a._id);
|
|
164
|
-
}), m =
|
|
164
|
+
}), m = M(() => x.value.length);
|
|
165
165
|
async function C(e, a) {
|
|
166
166
|
return await _e(e, {
|
|
167
167
|
withTimestamp: !0,
|
|
168
168
|
filename: a
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
171
|
+
async function J(e, a = "images.zip") {
|
|
172
172
|
const o = new O();
|
|
173
173
|
e.forEach(({ blob: d, filename: n }) => {
|
|
174
174
|
d && o.file(n, d);
|
|
@@ -176,7 +176,7 @@ const He = {
|
|
|
176
176
|
const g = await o.generateAsync({ type: "blob" });
|
|
177
177
|
ne.saveAs(g, a);
|
|
178
178
|
}
|
|
179
|
-
async function
|
|
179
|
+
async function W() {
|
|
180
180
|
const e = x.value.filter((a) => a.thumbnail);
|
|
181
181
|
if (e.length === 0) {
|
|
182
182
|
F.open({ type: "error", title: "No downloadable images found" });
|
|
@@ -215,7 +215,7 @@ const He = {
|
|
|
215
215
|
})).filter((n) => n !== null);
|
|
216
216
|
if (a.value = "Creating ZIP file...", d.length > 0) {
|
|
217
217
|
const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
|
|
218
|
-
await
|
|
218
|
+
await J(d, n);
|
|
219
219
|
} else
|
|
220
220
|
throw new Error("Failed to fetch any images");
|
|
221
221
|
},
|
|
@@ -227,7 +227,7 @@ const He = {
|
|
|
227
227
|
);
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
230
|
+
async function q(e) {
|
|
231
231
|
const o = await new O().loadAsync(e), g = [];
|
|
232
232
|
for (const [d, n] of Object.entries(o.files)) {
|
|
233
233
|
if (n.dir || d.includes("__MACOSX/") || !N(d))
|
|
@@ -262,7 +262,7 @@ const He = {
|
|
|
262
262
|
const a = [];
|
|
263
263
|
for (const t of e)
|
|
264
264
|
if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
|
|
265
|
-
const i = await
|
|
265
|
+
const i = await q(t);
|
|
266
266
|
a.push(...i);
|
|
267
267
|
} else N(t.name) && a.push(t);
|
|
268
268
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -310,7 +310,7 @@ const He = {
|
|
|
310
310
|
const o = async (t) => {
|
|
311
311
|
const i = de(t.productId);
|
|
312
312
|
let f = "";
|
|
313
|
-
return t.newImage && (await me.update(i, t.newImage,
|
|
313
|
+
return t.newImage && (await me.update(i, t.newImage, qe.firebase.storageBucket), f = ue(i)), { productId: t.productId, newImageUrl: f };
|
|
314
314
|
};
|
|
315
315
|
a.value = `Starting upload of ${e.length} product images...`;
|
|
316
316
|
const g = await re({
|
|
@@ -343,7 +343,7 @@ const He = {
|
|
|
343
343
|
}
|
|
344
344
|
function ae() {
|
|
345
345
|
var e;
|
|
346
|
-
(e =
|
|
346
|
+
(e = S.value) == null || e.click();
|
|
347
347
|
}
|
|
348
348
|
function se(e) {
|
|
349
349
|
const a = e.target;
|
|
@@ -354,10 +354,10 @@ const He = {
|
|
|
354
354
|
a.value = "";
|
|
355
355
|
}
|
|
356
356
|
return ye().resetOnMount(), (e, a) => {
|
|
357
|
-
const o =
|
|
357
|
+
const o = G("fm-button");
|
|
358
358
|
return r(), c(P, null, [
|
|
359
359
|
_.value ? (r(), c("div", He, [
|
|
360
|
-
I(
|
|
360
|
+
I(We, {
|
|
361
361
|
"matched-images": w.value,
|
|
362
362
|
"unmatched-images": l.value,
|
|
363
363
|
onCancel: te,
|
|
@@ -367,10 +367,10 @@ const He = {
|
|
|
367
367
|
key: 1,
|
|
368
368
|
heading: h(j)("menu.productInternalTools.title")
|
|
369
369
|
}, {
|
|
370
|
-
default:
|
|
370
|
+
default: R(() => [
|
|
371
371
|
I(be)
|
|
372
372
|
]),
|
|
373
|
-
"append-heading":
|
|
373
|
+
"append-heading": R(() => [
|
|
374
374
|
s("div", Ke, [
|
|
375
375
|
s("div", Xe, [
|
|
376
376
|
s("div", Qe, [
|
|
@@ -379,15 +379,15 @@ const He = {
|
|
|
379
379
|
]),
|
|
380
380
|
s("div", et, [
|
|
381
381
|
I(o, {
|
|
382
|
-
"bg-color": h(
|
|
383
|
-
"text-color": h(
|
|
382
|
+
"bg-color": h($).NeutralGray100,
|
|
383
|
+
"text-color": h($).TypoSecondary,
|
|
384
384
|
variant: h(z).Primary,
|
|
385
385
|
label: "Download Images",
|
|
386
|
-
onClick:
|
|
386
|
+
onClick: W
|
|
387
387
|
}, null, 8, ["bg-color", "text-color", "variant"]),
|
|
388
388
|
I(o, {
|
|
389
|
-
"bg-color": h(
|
|
390
|
-
"text-color": h(
|
|
389
|
+
"bg-color": h($).NeutralGray100,
|
|
390
|
+
"text-color": h($).TypoSecondary,
|
|
391
391
|
variant: h(z).Primary,
|
|
392
392
|
label: "Update Images",
|
|
393
393
|
onClick: ae
|
|
@@ -399,7 +399,7 @@ const He = {
|
|
|
399
399
|
}, 8, ["heading"])),
|
|
400
400
|
s("input", {
|
|
401
401
|
ref_key: "fileInput",
|
|
402
|
-
ref:
|
|
402
|
+
ref: S,
|
|
403
403
|
type: "file",
|
|
404
404
|
multiple: "",
|
|
405
405
|
accept: "image/*,.zip",
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { defineComponent as Y, computed as g, ref as
|
|
2
|
-
import { D as C } from "./dayjs.min-
|
|
3
|
-
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { J as oe, F as ne } from "./jszip.min-
|
|
5
|
-
import { u as q,
|
|
1
|
+
import { defineComponent as Y, computed as g, ref as R, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as c, createElementVNode as u, toDisplayString as L, createVNode as a, createCommentVNode as U, createElementBlock as T, Fragment as E } from "vue";
|
|
2
|
+
import { D as C } from "./dayjs.min-Bsr3tJCn.js";
|
|
3
|
+
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js";
|
|
4
|
+
import { J as oe, F as ne } from "./jszip.min-BKJtvCjM.js";
|
|
5
|
+
import { u as q, A as G, B as O, z as ae, D as I, G as N } from "./menu-CsIzrBEr.js";
|
|
6
6
|
import { useCoreStore as re, useI18n as se } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as ue, a as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as pe } from "./item-
|
|
13
|
-
import { _ as
|
|
14
|
-
import { L as
|
|
15
|
-
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import {
|
|
17
|
-
|
|
7
|
+
import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as V, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as $ } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { _ as ue, a as B } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
+
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
+
import { u as ce, a as de } from "./menu-CDrsBjmr.js";
|
|
12
|
+
import { u as pe } from "./item-BAqzKh4O.js";
|
|
13
|
+
import { _ as H, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-zcistmwh.js";
|
|
14
|
+
import { L as P } from "./LinkProductSideSheet-C6rF-G1v.js";
|
|
15
|
+
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js";
|
|
16
|
+
import { Pos as z } from "@feedmepos/core";
|
|
17
|
+
import { F_FEATURE as A } from "@feedmepos/core/entity";
|
|
18
|
+
import { m as ve } from "./toExcel-84VTtSA7.js";
|
|
19
|
+
const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, ke = /* @__PURE__ */ Y({
|
|
18
20
|
__name: "ConfirmActionDialog",
|
|
19
21
|
props: {
|
|
20
22
|
description: {},
|
|
@@ -22,16 +24,16 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
22
24
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
23
25
|
},
|
|
24
26
|
setup(F) {
|
|
25
|
-
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r =
|
|
27
|
+
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = R(""), w = j(), { emitAction: k } = ie();
|
|
26
28
|
return (p, s) => {
|
|
27
29
|
const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
|
|
28
30
|
return d(), y(b, {
|
|
29
|
-
"on-validation-success": () => e(
|
|
31
|
+
"on-validation-success": () => e(k)("primary"),
|
|
30
32
|
"blame-form-child-on-validation-failed": ""
|
|
31
33
|
}, {
|
|
32
|
-
default:
|
|
34
|
+
default: c(() => [
|
|
33
35
|
u("div", ge, [
|
|
34
|
-
u("div", null,
|
|
36
|
+
u("div", null, L(p.description), 1),
|
|
35
37
|
u("div", { innerHTML: S.value }, null, 8, be),
|
|
36
38
|
u("div", null, [
|
|
37
39
|
a(i, {
|
|
@@ -62,14 +64,14 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
62
64
|
}, 8, ["on-validation-success"]);
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
}),
|
|
67
|
+
}), xe = /* @__PURE__ */ Y({
|
|
66
68
|
__name: "Migrate",
|
|
67
69
|
setup(F) {
|
|
68
|
-
const t = q(), S = re(), r = J(), { minor: w } = G(r),
|
|
70
|
+
const t = q(), S = re(), r = J(), { minor: w } = G(r), k = R(!1), p = j();
|
|
69
71
|
async function s() {
|
|
70
|
-
i.value ||
|
|
72
|
+
i.value || k.value || p.open({
|
|
71
73
|
title: "Migrate to new version",
|
|
72
|
-
contentComponent:
|
|
74
|
+
contentComponent: ke,
|
|
73
75
|
contentComponentProps: {
|
|
74
76
|
value: "MIGRATE",
|
|
75
77
|
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
@@ -82,7 +84,7 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
82
84
|
}, 2e3);
|
|
83
85
|
},
|
|
84
86
|
{
|
|
85
|
-
isLoading:
|
|
87
|
+
isLoading: k,
|
|
86
88
|
customId: t.state.menu._id,
|
|
87
89
|
message: "Migrating menu",
|
|
88
90
|
successMessage: "Migration completed"
|
|
@@ -93,8 +95,8 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
93
95
|
const i = g(() => {
|
|
94
96
|
const f = S.restaurants.value;
|
|
95
97
|
if (!f.length) return "Required at least one restaurant to migrate";
|
|
96
|
-
const b = f.filter((
|
|
97
|
-
return b.length ? `Upgrade POS to V${
|
|
98
|
+
const b = f.filter((x) => !x.posVersion || !z.canUse({ feature: A.enum.menuV4, posVersion: x.posVersion }));
|
|
99
|
+
return b.length ? `Upgrade POS to V${z.minVersionToUse(A.enum.menuV4)} to use new menu: ${b.map((x) => x.profile.name).join(", ")}` : null;
|
|
98
100
|
});
|
|
99
101
|
return g(() => i.value ? i.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, b) => {
|
|
100
102
|
const l = h("FmSnackbar");
|
|
@@ -107,42 +109,42 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
107
109
|
action: "Migrate",
|
|
108
110
|
"z-index": 0,
|
|
109
111
|
onOnAction: s
|
|
110
|
-
})) :
|
|
112
|
+
})) : U("", !0);
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
|
-
}), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" },
|
|
115
|
+
}), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Ge = /* @__PURE__ */ Y({
|
|
114
116
|
__name: "Products",
|
|
115
117
|
setup(F) {
|
|
116
|
-
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item),
|
|
117
|
-
...ae.menuV4ToV3(
|
|
118
|
+
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), k = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = ce(), b = g(() => ({
|
|
119
|
+
...ae.menuV4ToV3(I(r.state.menu)),
|
|
118
120
|
_id: r.state.menu._id,
|
|
119
121
|
_rev: r.state.menu._rev
|
|
120
122
|
})), l = g(() => {
|
|
121
|
-
const
|
|
122
|
-
return
|
|
123
|
+
const m = N.flatten(f.value.map((o) => o.items));
|
|
124
|
+
return N.uniqBy(m, (o) => o._id).length;
|
|
123
125
|
});
|
|
124
|
-
async function
|
|
126
|
+
async function x(m, o) {
|
|
125
127
|
const _ = new oe();
|
|
126
|
-
for (let v = 0; v <
|
|
127
|
-
const Q = await
|
|
128
|
+
for (let v = 0; v < m.length; v++) {
|
|
129
|
+
const Q = await m[v].xlsx.writeBuffer();
|
|
128
130
|
_.file(`${o[v]}.xlsx`, Q);
|
|
129
131
|
}
|
|
130
132
|
const n = await _.generateAsync({ type: "blob" });
|
|
131
133
|
ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
134
|
}
|
|
133
|
-
async function
|
|
135
|
+
async function D() {
|
|
134
136
|
await S.minor(
|
|
135
137
|
async () => {
|
|
136
138
|
if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
|
|
137
|
-
const
|
|
139
|
+
const m = I(r.state.menu), o = new ee(m).exportToExcel(), _ = [
|
|
138
140
|
`menu_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
139
141
|
`addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
140
142
|
`itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
|
|
141
143
|
];
|
|
142
|
-
|
|
144
|
+
x(o, _);
|
|
143
145
|
} else {
|
|
144
|
-
const
|
|
145
|
-
await te(
|
|
146
|
+
const m = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
|
|
147
|
+
await te(m, `${o}.xlsx`, {
|
|
146
148
|
bookType: "xlsx",
|
|
147
149
|
bookSST: !1,
|
|
148
150
|
type: "array"
|
|
@@ -153,32 +155,32 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
153
155
|
);
|
|
154
156
|
}
|
|
155
157
|
const Z = le(), K = g(() => Z.breakpoints.value.xs);
|
|
156
|
-
return de().resetOnMount(), (
|
|
158
|
+
return de().resetOnMount(), (m, o) => {
|
|
157
159
|
const _ = h("fm-button");
|
|
158
|
-
return d(), y(
|
|
160
|
+
return d(), y(me, {
|
|
159
161
|
heading: e(t)("menu.products.title")
|
|
160
162
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
a(
|
|
163
|
+
default: c(() => [
|
|
164
|
+
a(xe),
|
|
163
165
|
a(fe)
|
|
164
166
|
]),
|
|
165
|
-
"append-heading":
|
|
167
|
+
"append-heading": c(() => [
|
|
166
168
|
u("div", Me, [
|
|
167
169
|
u("div", Se, [
|
|
168
170
|
u("div", we, [
|
|
169
|
-
u("p", Ce,
|
|
171
|
+
u("p", Ce, L(l.value), 1)
|
|
170
172
|
])
|
|
171
173
|
]),
|
|
172
174
|
u("div", he, [
|
|
173
|
-
K.value ? (d(), y(
|
|
174
|
-
default:
|
|
175
|
+
K.value ? (d(), y(H, { key: 1 }, {
|
|
176
|
+
default: c(({ trigger: n }) => [
|
|
175
177
|
a(ue, null, {
|
|
176
|
-
default:
|
|
177
|
-
a(
|
|
178
|
+
default: c(() => [
|
|
179
|
+
a(B, {
|
|
178
180
|
label: e(t)("menu.products.actions.export"),
|
|
179
|
-
onClick:
|
|
181
|
+
onClick: D
|
|
180
182
|
}, null, 8, ["label"]),
|
|
181
|
-
a(
|
|
183
|
+
a(B, {
|
|
182
184
|
label: e(t)("menu.products.actions.import"),
|
|
183
185
|
onClick: n
|
|
184
186
|
}, null, 8, ["label", "onClick"])
|
|
@@ -187,14 +189,14 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
187
189
|
}, 1024)
|
|
188
190
|
]),
|
|
189
191
|
_: 1
|
|
190
|
-
})) : (d(),
|
|
192
|
+
})) : (d(), T(E, { key: 0 }, [
|
|
191
193
|
a(_e, null, {
|
|
192
|
-
default:
|
|
194
|
+
default: c(({ trigger: n }) => [
|
|
193
195
|
a(_, {
|
|
194
196
|
label: e(t)("menu.tree_editor.title"),
|
|
195
197
|
"bg-color": e(M).NeutralGray100,
|
|
196
198
|
"text-color": e(M).TypoSecondary,
|
|
197
|
-
variant: e(
|
|
199
|
+
variant: e(V).Primary,
|
|
198
200
|
onClick: n
|
|
199
201
|
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
200
202
|
]),
|
|
@@ -203,16 +205,16 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
203
205
|
a(_, {
|
|
204
206
|
"bg-color": e(M).NeutralGray100,
|
|
205
207
|
"text-color": e(M).TypoSecondary,
|
|
206
|
-
variant: e(
|
|
208
|
+
variant: e(V).Primary,
|
|
207
209
|
label: e(t)("menu.products.actions.export"),
|
|
208
|
-
onClick:
|
|
210
|
+
onClick: D
|
|
209
211
|
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
210
|
-
a(
|
|
211
|
-
default:
|
|
212
|
+
a(H, null, {
|
|
213
|
+
default: c(({ trigger: n }) => [
|
|
212
214
|
a(_, {
|
|
213
215
|
"bg-color": e(M).NeutralGray100,
|
|
214
216
|
"text-color": e(M).TypoSecondary,
|
|
215
|
-
variant: e(
|
|
217
|
+
variant: e(V).Primary,
|
|
216
218
|
label: e(t)("menu.products.actions.import"),
|
|
217
219
|
onClick: n
|
|
218
220
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
@@ -220,43 +222,43 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
220
222
|
_: 1
|
|
221
223
|
})
|
|
222
224
|
], 64)),
|
|
223
|
-
l.value > 0 ? (d(),
|
|
224
|
-
w.value.create ? (d(), y(
|
|
225
|
+
l.value > 0 ? (d(), T(E, { key: 2 }, [
|
|
226
|
+
w.value.create ? (d(), y($, {
|
|
225
227
|
key: 0,
|
|
226
228
|
label: e(t)("menu.products.actions.add"),
|
|
227
229
|
"prepend-icon": "add",
|
|
228
|
-
onClick: o[0] || (o[0] = (n) => e(
|
|
229
|
-
}, null, 8, ["label"])) : p.value ? (d(), y(
|
|
230
|
+
onClick: o[0] || (o[0] = (n) => e(k).create(null))
|
|
231
|
+
}, null, 8, ["label"])) : p.value ? (d(), y(P, {
|
|
230
232
|
key: 1,
|
|
231
233
|
"categorized-items": e(s).linkableItems.value,
|
|
232
234
|
"initial-value": e(s).currentItems.value,
|
|
233
235
|
"show-variant": !1,
|
|
234
236
|
onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
|
|
235
237
|
}, {
|
|
236
|
-
default:
|
|
237
|
-
a(
|
|
238
|
+
default: c(({ trigger: n }) => [
|
|
239
|
+
a($, {
|
|
238
240
|
label: e(t)("menu.products.actions.link"),
|
|
239
241
|
"prepend-icon": "link",
|
|
240
242
|
onClick: n
|
|
241
243
|
}, null, 8, ["label", "onClick"])
|
|
242
244
|
]),
|
|
243
245
|
_: 1
|
|
244
|
-
}, 8, ["categorized-items", "initial-value"])) : (d(), y(
|
|
246
|
+
}, 8, ["categorized-items", "initial-value"])) : (d(), y(P, {
|
|
245
247
|
key: 2,
|
|
246
248
|
"categorized-items": e(i).linkableItems.value,
|
|
247
249
|
"initial-value": e(i).currentItems.value,
|
|
248
250
|
"show-variant": !1,
|
|
249
251
|
onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
|
|
250
252
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
a(
|
|
253
|
+
default: c(({ trigger: n }) => [
|
|
254
|
+
a($, {
|
|
253
255
|
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
254
256
|
onClick: n
|
|
255
257
|
}, null, 8, ["label", "onClick"])
|
|
256
258
|
]),
|
|
257
259
|
_: 1
|
|
258
260
|
}, 8, ["categorized-items", "initial-value"]))
|
|
259
|
-
], 64)) :
|
|
261
|
+
], 64)) : U("", !0)
|
|
260
262
|
])
|
|
261
263
|
])
|
|
262
264
|
]),
|
|
@@ -266,5 +268,5 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
|
|
|
266
268
|
}
|
|
267
269
|
});
|
|
268
270
|
export {
|
|
269
|
-
|
|
271
|
+
Ge as default
|
|
270
272
|
};
|