@feedmepos/mf-menu 0.32.45-dev → 0.32.46-dev.2
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-u5AOIdU4.js → App-DnmPW7GQ.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-RTdI8EVk.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js} +3 -3
- package/dist/{Catalog-DDMz6wD9.js → Catalog-gxj-MZB8.js} +44 -44
- package/dist/{Category-DoIleKPb.js → Category-CqWHFR6I.js} +19 -19
- package/dist/{Category-BE0d0_de.js → Category-JHb56PfQ.js} +24 -24
- package/dist/{CookingGuide-iP5hFtlB.js → CookingGuide-DNMfIDDf.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CSaMT7Gr.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BYdToHa3.js} +1 -1
- package/dist/{Group-AXDRjsKC.js → Group-DXEgfQ_e.js} +3 -3
- package/dist/{Group-xjimyqnO.js → Group-bxjyN23A.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DB_X7ws3.js → Group.vue_vue_type_script_setup_true_lang-DPhYCl15.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D_IUSYDa.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DAsxXqGu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Suib7m8i.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js} +1991 -1990
- package/dist/{Ingredient-yr2DWIMw.js → Ingredient-BAnjcaO0.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BpiU1gRP.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CppjxcTA.js} +2 -2
- package/dist/{LinkProductSideSheet-2MbaATTn.js → LinkProductSideSheet-CvWcioxX.js} +45 -45
- package/dist/{MenuSetting-BhkjzPiN.js → MenuSetting-DCQM7rh6.js} +47 -47
- package/dist/{PrintRoute-ChqpbVo4.js → PrintRoute-Be0WG4oQ.js} +39 -39
- package/dist/{Product-BpnGnMzm.js → Product-DfYmo4vJ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-COkk299w.js → Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js} +93 -93
- package/dist/{ProductInternalTools-BEwLYcEn.js → ProductInternalTools-D2QTAjE7.js} +66 -66
- package/dist/{Products-lONe7x_i.js → Products-BhY4Cwaz.js} +42 -42
- package/dist/{Publish-CXRgBz-S.js → Publish-BfEtLeeh.js} +29 -29
- package/dist/{Recipe-Bbt3hG6N.js → Recipe-ssNUNy2j.js} +24 -24
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DHnuxBck.js +144 -0
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DXisBADc.js → RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js} +2 -2
- package/dist/{Scheduler-DJsgP_Hi.js → Scheduler-CAUHWrZs.js} +11 -11
- package/dist/{ServingSequence-DALjVV2I.js → ServingSequence-D12rqxa8.js} +44 -44
- package/dist/{Setting-B23o5SoS.js → Setting-pJ06C7wS.js} +17 -17
- package/dist/{Subcategory-CS4MEgtM.js → Subcategory-Dfd-qx6m.js} +54 -54
- package/dist/{Takeaway-CI2Y-_LF.js → Takeaway-Bnat0taD.js} +13 -13
- package/dist/{Takeaway-D27iA6M6.js → Takeaway-Cv-kA3M_.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Ca3qK9zO.js → Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js} +33 -33
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Da2jQE45.js → Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js} +27 -27
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DUScE-82.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-E3-hgVdd.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js} +5 -5
- package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-BlACWsDs.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js} +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js +5767 -0
- package/dist/{Unit-5pv3oxSc.js → Unit-DeegDDRz.js} +8 -8
- package/dist/{Variant-CTAI6p6r.js → Variant-D8WwGu3E.js} +14 -14
- package/dist/{_id_-D09xegPQ.js → _id_-BfOGbmqs.js} +28 -28
- package/dist/app-BmAr9vNI.js +2283 -0
- package/dist/{app-8-JCz9b5.js → app-DhZxk0zL.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/index.d.ts +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +14 -5
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-dENy3aw3.js → linked-status-CxpcEFX9.js} +2 -2
- package/dist/assets/{menu-export-E9V7bg-T.js → menu-export-C09ZbTRq.js} +2 -2
- package/dist/assets/{override-menu-HaI7O9Fu.js → override-menu-0rFjySh6.js} +2 -2
- package/dist/assets/{validate-menu-C8LhbVSM.js → validate-menu-cO19zy8y.js} +2 -2
- package/dist/{catalog-DhXoYsFF.js → catalog-tNpB0Dhn.js} +1 -1
- package/dist/{catalogSetting-DyRqWzdW.js → catalogSetting-BRnA4v49.js} +1 -1
- package/dist/{currency-BkmIftYM.js → currency-CyKauaRc.js} +1 -1
- package/dist/dayjs.min-ipgoM27T.js +7 -0
- package/dist/{index-BQ95VVc6.js → index-BGm2uHNk.js} +31 -31
- package/dist/{index-BXWquw9Z.js → index-CXquA22H.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js → index.vue_vue_type_script_setup_true_lang-D6HyeIid.js} +6917 -6860
- package/dist/{item-DmTvGVsp.js → item-Cik-YX-L.js} +15 -15
- package/dist/{jszip.min-8Z5To_Pk.js → jszip.min-D22BefT1.js} +388 -387
- package/dist/{menu-Csu9X1_I.js → menu-ag-37Ofg.js} +1 -1
- package/dist/{menuV2-CC-vGiv5.js → menuV2-DZDWxmas.js} +135 -135
- package/dist/{priceTier-Bj9Y6SSr.js → priceTier-BmDl3J-3.js} +1 -1
- package/dist/{rules-Dod2cBHH.js → rules-pJdF9REd.js} +12 -12
- package/dist/{scheduler-B3M-715v.js → scheduler-DRHXK6kX.js} +29 -29
- package/dist/{toExcel-67ufpOxx.js → toExcel-5kDfvPVG.js} +2 -2
- package/dist/{unit-BQrnccs6.js → unit-CIlgFZ50.js} +35 -35
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DnuNFxC7.js +0 -6130
- package/dist/app-Bk0DN7oZ.js +0 -363
- package/dist/dayjs.min-nQqVHQcC.js +0 -6
- package/dist/index-28XF3UnN.js +0 -246
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as
|
|
2
|
-
import { J as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as Z, ref as v, computed as z, resolveComponent as W, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as B, toDisplayString as U, createStaticVNode as E, 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-D22BefT1.js";
|
|
3
|
+
import { B as le, u as ie, H as D, a0 as re, K as ce, M as de, N as me } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
4
4
|
import { useI18n as ue } from "@feedmepos/mf-common";
|
|
5
|
-
import { FmButtonVariant as $, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as
|
|
5
|
+
import { FmButtonVariant as $, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { u as fe, a as he } from "./menu-
|
|
8
|
-
import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { x as be, y as ve, z as _e } from "./item-
|
|
7
|
+
import { u as fe, a as he } from "./menu-ag-37Ofg.js";
|
|
8
|
+
import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js";
|
|
9
|
+
import { x as be, y as ve, z as _e } from "./item-Cik-YX-L.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
|
+
}, Me = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex-1 overflow-y-auto p-16"
|
|
19
|
-
},
|
|
19
|
+
}, Se = { class: "space-y-12" }, ze = { class: "fm-typo-en-body-sm font-medium" }, $e = { 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" },
|
|
22
|
+
}, Te = { class: "flex" }, Be = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Ee = ["src", "alt"], Re = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "h-full flex flex-col"
|
|
25
|
-
},
|
|
25
|
+
}, Ae = {
|
|
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" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__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 = z(() => u.matchedImages.length), k = z(() => u.unmatchedImages.length);
|
|
40
40
|
function _() {
|
|
41
41
|
F("cancel");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function M() {
|
|
44
44
|
F("update", u.matchedImages);
|
|
45
45
|
}
|
|
46
46
|
return (w, l) => {
|
|
47
|
-
const x =
|
|
47
|
+
const x = W("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,14 +58,14 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
58
58
|
variant: h($).Primary,
|
|
59
59
|
label: "Update",
|
|
60
60
|
disabled: b.value === 0,
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: M
|
|
62
62
|
}, null, 8, ["variant", "disabled"])
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
65
65
|
s("div", ke, [
|
|
66
66
|
s("div", Ce, [
|
|
67
67
|
s("button", {
|
|
68
|
-
class:
|
|
68
|
+
class: B([
|
|
69
69
|
"px-16 py-12 font-medium text-sm border-b-2 transition-colors",
|
|
70
70
|
y.value === "matched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
71
71
|
]),
|
|
@@ -73,7 +73,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
73
73
|
}, " Matched Images (" + U(b.value) + ") ", 3),
|
|
74
74
|
k.value > 0 ? (r(), c("button", {
|
|
75
75
|
key: 0,
|
|
76
|
-
class:
|
|
76
|
+
class: B([
|
|
77
77
|
"px-16 py-12 font-medium text-sm border-b-2 transition-colors",
|
|
78
78
|
y.value === "unmatched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
79
79
|
]),
|
|
@@ -84,19 +84,19 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
84
84
|
s("div", Ue, [
|
|
85
85
|
y.value === "matched" ? (r(), c("div", je, [
|
|
86
86
|
b.value === 0 ? (r(), c("div", Fe, l[3] || (l[3] = [
|
|
87
|
-
|
|
88
|
-
]))) : (r(), c("div",
|
|
87
|
+
E('<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", Me, [
|
|
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", Se, [
|
|
95
|
+
(r(!0), c(P, null, R(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", ze, U(m.productName), 1),
|
|
100
100
|
s("div", $e, [
|
|
101
101
|
s("div", Pe, [
|
|
102
102
|
m.originalThumbnail ? (r(), c("img", {
|
|
@@ -108,38 +108,38 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
108
108
|
])
|
|
109
109
|
]),
|
|
110
110
|
s("div", Te, [
|
|
111
|
-
s("div",
|
|
111
|
+
s("div", Be, [
|
|
112
112
|
s("img", {
|
|
113
113
|
src: m.newImageUrl,
|
|
114
114
|
alt: m.newImage.name,
|
|
115
115
|
class: "w-full h-full object-cover"
|
|
116
|
-
}, null, 8,
|
|
116
|
+
}, null, 8, Ee)
|
|
117
117
|
])
|
|
118
118
|
])
|
|
119
119
|
]))), 128))
|
|
120
120
|
])
|
|
121
121
|
]))
|
|
122
|
-
])) : y.value === "unmatched" ? (r(), c("div",
|
|
123
|
-
k.value === 0 ? (r(), c("div",
|
|
124
|
-
|
|
125
|
-
]))) : (r(), c("div",
|
|
122
|
+
])) : y.value === "unmatched" ? (r(), c("div", Re, [
|
|
123
|
+
k.value === 0 ? (r(), c("div", Ae, l[5] || (l[5] = [
|
|
124
|
+
E('<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", 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" }, [
|
|
127
127
|
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Filename"),
|
|
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, R(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", We, [
|
|
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, qe)
|
|
143
143
|
])
|
|
144
144
|
])
|
|
145
145
|
]))), 128))
|
|
@@ -151,32 +151,32 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
var
|
|
155
|
-
const
|
|
154
|
+
var He = { firebase: { storageBucket: "image.feedmedev.cc" } };
|
|
155
|
+
const Je = {
|
|
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 } = ue(), u = le(V()), F = V(), y = ge(), b = ie(), { selectedCategories: k } = fe(), _ = v(!1),
|
|
161
|
+
const { t: j } = ue(), u = le(V()), F = V(), y = ge(), b = ie(), { selectedCategories: k } = fe(), _ = v(!1), M = v(), w = v([]), l = v([]), x = z(() => {
|
|
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 = z(() => 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
|
|
172
|
-
const o = new
|
|
171
|
+
async function q(e, a = "images.zip") {
|
|
172
|
+
const o = new O();
|
|
173
173
|
e.forEach(({ blob: d, filename: n }) => {
|
|
174
174
|
d && o.file(n, d);
|
|
175
175
|
});
|
|
176
176
|
const g = await o.generateAsync({ type: "blob" });
|
|
177
177
|
ne.saveAs(g, a);
|
|
178
178
|
}
|
|
179
|
-
async function
|
|
179
|
+
async function G() {
|
|
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 q(d, n);
|
|
219
219
|
} else
|
|
220
220
|
throw new Error("Failed to fetch any images");
|
|
221
221
|
},
|
|
@@ -227,12 +227,12 @@ const He = {
|
|
|
227
227
|
);
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
231
|
-
const o = await new
|
|
230
|
+
async function H(e) {
|
|
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))
|
|
234
234
|
continue;
|
|
235
|
-
const p = await n.async("blob"), t = d.split("/").pop() || d, i = new File([p], t, { type:
|
|
235
|
+
const p = await n.async("blob"), t = d.split("/").pop() || d, i = new File([p], t, { type: J(t) });
|
|
236
236
|
g.push(i);
|
|
237
237
|
}
|
|
238
238
|
return g;
|
|
@@ -241,7 +241,7 @@ const He = {
|
|
|
241
241
|
const a = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"], o = e.toLowerCase().substring(e.lastIndexOf("."));
|
|
242
242
|
return a.includes(o);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function J(e) {
|
|
245
245
|
const a = e.toLowerCase().substring(e.lastIndexOf("."));
|
|
246
246
|
return {
|
|
247
247
|
".jpg": "image/jpeg",
|
|
@@ -252,17 +252,17 @@ const He = {
|
|
|
252
252
|
".bmp": "image/bmp"
|
|
253
253
|
}[a] || "image/jpeg";
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function K(e) {
|
|
256
256
|
return (e.substring(0, e.lastIndexOf(".")) || e).toLowerCase().trim().replace(/[_\-\s]+/g, " ");
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function X(e) {
|
|
259
259
|
return e.toLowerCase().trim().replace(/[_\-\s]+/g, " ");
|
|
260
260
|
}
|
|
261
261
|
async function Q(e) {
|
|
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 H(t);
|
|
266
266
|
a.push(...i);
|
|
267
267
|
} else N(t.name) && a.push(t);
|
|
268
268
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -272,11 +272,11 @@ const He = {
|
|
|
272
272
|
});
|
|
273
273
|
const g = Array.from(o.values()), d = [], n = [], p = /* @__PURE__ */ new Map();
|
|
274
274
|
x.value.forEach((t) => {
|
|
275
|
-
const i =
|
|
275
|
+
const i = X(t.name);
|
|
276
276
|
p.set(i, t);
|
|
277
277
|
});
|
|
278
278
|
for (const t of g) {
|
|
279
|
-
const i =
|
|
279
|
+
const i = K(t.name), f = p.get(i);
|
|
280
280
|
f ? d.push({
|
|
281
281
|
productId: f._id,
|
|
282
282
|
productName: f.name,
|
|
@@ -310,7 +310,7 @@ const He = {
|
|
|
310
310
|
const o = async (t) => {
|
|
311
311
|
const i = ce(t.productId);
|
|
312
312
|
let f = "";
|
|
313
|
-
return t.newImage && (await de.update(i, t.newImage,
|
|
313
|
+
return t.newImage && (await de.update(i, t.newImage, He.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
|
|
314
314
|
};
|
|
315
315
|
a.value = `Starting upload of ${e.length} product images...`;
|
|
316
316
|
const g = await ve({
|
|
@@ -343,7 +343,7 @@ const He = {
|
|
|
343
343
|
}
|
|
344
344
|
function ae() {
|
|
345
345
|
var e;
|
|
346
|
-
(e =
|
|
346
|
+
(e = M.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 he().resetOnMount(), (e, a) => {
|
|
357
|
-
const o =
|
|
357
|
+
const o = W("fm-button");
|
|
358
358
|
return r(), c(P, null, [
|
|
359
|
-
_.value ? (r(), c("div",
|
|
360
|
-
I(
|
|
359
|
+
_.value ? (r(), c("div", Je, [
|
|
360
|
+
I(Ge, {
|
|
361
361
|
"matched-images": w.value,
|
|
362
362
|
"unmatched-images": l.value,
|
|
363
363
|
onCancel: te,
|
|
@@ -367,27 +367,27 @@ const He = {
|
|
|
367
367
|
key: 1,
|
|
368
368
|
heading: h(j)("menu.productInternalTools.title")
|
|
369
369
|
}, {
|
|
370
|
-
default:
|
|
370
|
+
default: A(() => [
|
|
371
371
|
I(ye)
|
|
372
372
|
]),
|
|
373
|
-
"append-heading":
|
|
374
|
-
s("div",
|
|
375
|
-
s("div",
|
|
373
|
+
"append-heading": A(() => [
|
|
374
|
+
s("div", Ke, [
|
|
375
|
+
s("div", Xe, [
|
|
376
376
|
s("div", Qe, [
|
|
377
377
|
s("p", Ye, U(m.value), 1)
|
|
378
378
|
])
|
|
379
379
|
]),
|
|
380
380
|
s("div", et, [
|
|
381
381
|
I(o, {
|
|
382
|
-
"bg-color": h(
|
|
383
|
-
"text-color": h(
|
|
382
|
+
"bg-color": h(S).NeutralGray100,
|
|
383
|
+
"text-color": h(S).TypoSecondary,
|
|
384
384
|
variant: h($).Primary,
|
|
385
385
|
label: "Download Images",
|
|
386
|
-
onClick:
|
|
386
|
+
onClick: G
|
|
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(S).NeutralGray100,
|
|
390
|
+
"text-color": h(S).TypoSecondary,
|
|
391
391
|
variant: h($).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: M,
|
|
403
403
|
type: "file",
|
|
404
404
|
multiple: "",
|
|
405
405
|
accept: "image/*,.zip",
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as E, computed as g, ref as
|
|
2
|
-
import { D as F } from "./dayjs.min-
|
|
3
|
-
import { J as oe, F as ne } from "./jszip.min-
|
|
4
|
-
import { u as J,
|
|
5
|
-
import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as E, computed as g, ref as O, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as j, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
|
|
2
|
+
import { D as F } from "./dayjs.min-ipgoM27T.js";
|
|
3
|
+
import { J as oe, F as ne } from "./jszip.min-D22BefT1.js";
|
|
4
|
+
import { u as J, B as W, z as R, D as z, y as Z, A as ae, G as re, H, I as se } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
5
|
+
import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js";
|
|
6
6
|
import { useCoreStore as K, useI18n as le } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as me, a as
|
|
7
|
+
import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { _ as me, a as U } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
10
|
import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
import { u as pe, a as fe } from "./menu-
|
|
12
|
-
import { u as _e } from "./item-
|
|
13
|
-
import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { L as
|
|
15
|
-
import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { m as ye } from "./toExcel-
|
|
11
|
+
import { u as pe, a as fe } from "./menu-ag-37Ofg.js";
|
|
12
|
+
import { u as _e } from "./item-Cik-YX-L.js";
|
|
13
|
+
import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js";
|
|
14
|
+
import { L as q } from "./LinkProductSideSheet-CvWcioxX.js";
|
|
15
|
+
import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js";
|
|
16
|
+
import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js";
|
|
17
|
+
import { m as ye } from "./toExcel-5kDfvPVG.js";
|
|
18
18
|
const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "flex justify-end gap-8" }, Se = /* @__PURE__ */ E({
|
|
19
19
|
__name: "ConfirmActionDialog",
|
|
20
20
|
props: {
|
|
@@ -22,8 +22,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
22
22
|
value: {},
|
|
23
23
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const t =
|
|
25
|
+
setup(w) {
|
|
26
|
+
const t = w, S = g(() => t.message.replace("[[value]]", t.value)), k = O(""), r = Q(), { emitAction: x } = ue();
|
|
27
27
|
return (d, s) => {
|
|
28
28
|
const p = M("FmTextField"), f = M("FmButton"), _ = M("FmForm");
|
|
29
29
|
return m(), y(_, {
|
|
@@ -32,7 +32,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
32
32
|
}, {
|
|
33
33
|
default: c(() => [
|
|
34
34
|
i("div", ke, [
|
|
35
|
-
i("div", null,
|
|
35
|
+
i("div", null, j(d.description), 1),
|
|
36
36
|
i("div", { innerHTML: S.value }, null, 8, xe),
|
|
37
37
|
i("div", null, [
|
|
38
38
|
o(p, {
|
|
@@ -65,8 +65,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
65
65
|
}
|
|
66
66
|
}), Me = /* @__PURE__ */ E({
|
|
67
67
|
__name: "Migrate",
|
|
68
|
-
setup(
|
|
69
|
-
const t = J(), S = K(), k = X(), { minor: r } = W(k), x =
|
|
68
|
+
setup(w) {
|
|
69
|
+
const t = J(), S = K(), k = X(), { minor: r } = W(k), x = O(!1), d = Q();
|
|
70
70
|
async function s() {
|
|
71
71
|
p.value || x.value || d.open({
|
|
72
72
|
title: "Migrate to new version",
|
|
@@ -94,8 +94,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
94
94
|
const p = g(() => {
|
|
95
95
|
const f = S.restaurants.value;
|
|
96
96
|
if (!f.length) return "Required at least one restaurant to migrate";
|
|
97
|
-
const _ = f.filter((b) => !b.posVersion || !R.Pos.canUse({ feature:
|
|
98
|
-
return _.length ? `Upgrade POS to V${R.Pos.minVersionToUse(
|
|
97
|
+
const _ = f.filter((b) => !b.posVersion || !R.Pos.canUse({ feature: z.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
|
|
98
|
+
return _.length ? `Upgrade POS to V${R.Pos.minVersionToUse(z.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((b) => b.profile.name).join(", ")}` : null;
|
|
99
99
|
});
|
|
100
100
|
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
101
|
const l = M("FmSnackbar");
|
|
@@ -111,21 +111,21 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
111
111
|
})) : G("", !0);
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
}),
|
|
114
|
+
}), Ce = "/assets/menu-export-C09ZbTRq.js", we = { 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
115
|
__name: "Products",
|
|
116
|
-
setup(
|
|
116
|
+
setup(w) {
|
|
117
117
|
const { t } = le(), S = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = _e(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = pe(), f = g(() => ({
|
|
118
118
|
...ae.menuV4ToV3(re(r.state.menu)),
|
|
119
119
|
_id: r.state.menu._id,
|
|
120
120
|
_rev: r.state.menu._rev
|
|
121
121
|
})), _ = g(() => {
|
|
122
|
-
const u =
|
|
123
|
-
return
|
|
122
|
+
const u = H.flatten(p.value.map((n) => n.items));
|
|
123
|
+
return H.uniqBy(u, (n) => n._id).length;
|
|
124
124
|
});
|
|
125
125
|
async function l(u, n) {
|
|
126
126
|
const v = new oe();
|
|
127
|
-
for (let
|
|
128
|
-
v.file(`${n[
|
|
127
|
+
for (let C = 0; C < u.length; C++)
|
|
128
|
+
v.file(`${n[C]}.xlsx`, u[C]);
|
|
129
129
|
const a = await v.generateAsync({ type: "blob" });
|
|
130
130
|
ne.saveAs(a, `books_${F().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
131
131
|
}
|
|
@@ -138,7 +138,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
138
138
|
`addonGroup_${n}`,
|
|
139
139
|
`itemLinkedAddon_${n}`
|
|
140
140
|
], a = await se(
|
|
141
|
-
|
|
141
|
+
Ce,
|
|
142
142
|
JSON.stringify({
|
|
143
143
|
menu: u,
|
|
144
144
|
attributeSettings: S.itemAttributeSettings.value
|
|
@@ -176,10 +176,10 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
176
176
|
o(ve)
|
|
177
177
|
]),
|
|
178
178
|
"append-heading": c(() => [
|
|
179
|
-
i("div",
|
|
179
|
+
i("div", we, [
|
|
180
180
|
i("div", Fe, [
|
|
181
|
-
i("div",
|
|
182
|
-
i("p",
|
|
181
|
+
i("div", $e, [
|
|
182
|
+
i("p", Ve, j(_.value), 1)
|
|
183
183
|
])
|
|
184
184
|
]),
|
|
185
185
|
i("div", Ee, [
|
|
@@ -187,11 +187,11 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
187
187
|
default: c(({ trigger: a }) => [
|
|
188
188
|
o(me, null, {
|
|
189
189
|
default: c(() => [
|
|
190
|
-
o(
|
|
190
|
+
o(U, {
|
|
191
191
|
label: e(t)("menu.products.actions.export"),
|
|
192
192
|
onClick: b
|
|
193
193
|
}, null, 8, ["label"]),
|
|
194
|
-
o(
|
|
194
|
+
o(U, {
|
|
195
195
|
label: e(t)("menu.products.actions.import"),
|
|
196
196
|
onClick: a
|
|
197
197
|
}, null, 8, ["label", "onClick"])
|
|
@@ -207,7 +207,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
207
207
|
label: e(t)("menu.tree_editor.title"),
|
|
208
208
|
"bg-color": e(h).NeutralGray100,
|
|
209
209
|
"text-color": e(h).TypoSecondary,
|
|
210
|
-
variant: e(
|
|
210
|
+
variant: e($).Primary,
|
|
211
211
|
onClick: a
|
|
212
212
|
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
213
213
|
]),
|
|
@@ -216,7 +216,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
216
216
|
o(v, {
|
|
217
217
|
"bg-color": e(h).NeutralGray100,
|
|
218
218
|
"text-color": e(h).TypoSecondary,
|
|
219
|
-
variant: e(
|
|
219
|
+
variant: e($).Primary,
|
|
220
220
|
label: e(t)("menu.products.actions.export"),
|
|
221
221
|
onClick: b
|
|
222
222
|
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
@@ -225,7 +225,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
225
225
|
o(v, {
|
|
226
226
|
"bg-color": e(h).NeutralGray100,
|
|
227
227
|
"text-color": e(h).TypoSecondary,
|
|
228
|
-
variant: e(
|
|
228
|
+
variant: e($).Primary,
|
|
229
229
|
label: e(t)("menu.products.actions.import"),
|
|
230
230
|
onClick: a
|
|
231
231
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
@@ -234,12 +234,12 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
234
234
|
})
|
|
235
235
|
], 64)),
|
|
236
236
|
_.value > 0 ? (m(), A(P, { key: 2 }, [
|
|
237
|
-
x.value.create ? (m(), y(
|
|
237
|
+
x.value.create ? (m(), y(V, {
|
|
238
238
|
key: 0,
|
|
239
239
|
label: e(t)("menu.products.actions.add"),
|
|
240
240
|
"prepend-icon": "add",
|
|
241
241
|
onClick: n[0] || (n[0] = (a) => e(d).create(null))
|
|
242
|
-
}, null, 8, ["label"])) : s.value ? (m(), y(
|
|
242
|
+
}, null, 8, ["label"])) : s.value ? (m(), y(q, {
|
|
243
243
|
key: 1,
|
|
244
244
|
"categorized-items": e(Y).linkableItems.value,
|
|
245
245
|
"initial-value": e(Y).currentItems.value,
|
|
@@ -251,14 +251,14 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
251
251
|
onSubmit: e(N)
|
|
252
252
|
}, {
|
|
253
253
|
default: c(({ trigger: a }) => [
|
|
254
|
-
o(
|
|
254
|
+
o(V, {
|
|
255
255
|
label: e(t)("menu.products.actions.link"),
|
|
256
256
|
"prepend-icon": "link",
|
|
257
257
|
onClick: a
|
|
258
258
|
}, null, 8, ["label", "onClick"])
|
|
259
259
|
]),
|
|
260
260
|
_: 1
|
|
261
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(
|
|
261
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(q, {
|
|
262
262
|
key: 2,
|
|
263
263
|
"categorized-items": e(B).linkableItems.value,
|
|
264
264
|
"initial-value": e(B).currentItems.value,
|
|
@@ -270,7 +270,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
|
|
|
270
270
|
onSubmit: e(N)
|
|
271
271
|
}, {
|
|
272
272
|
default: c(({ trigger: a }) => [
|
|
273
|
-
o(
|
|
273
|
+
o(V, {
|
|
274
274
|
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
275
275
|
onClick: a
|
|
276
276
|
}, null, 8, ["label", "onClick"])
|