@feedmepos/mf-menu 0.31.16-beta.1 → 0.31.17-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-Bsppf5CN.js → App-BUjwToat.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DTuPAGEJ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBPOCkmg.js} +2 -2
- package/dist/{Catalog-Bj3MNcLG.js → Catalog-BkfsckOV.js} +18 -18
- package/dist/{Category-CHvG2e6b.js → Category-C7EPAK0G.js} +36 -36
- package/dist/{Category-WLIH1Zyc.js → Category-DTKlxBpE.js} +24 -24
- package/dist/{CookingGuide-C8N45xnL.js → CookingGuide-DCazfCuz.js} +56 -56
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-GriZxAIw.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2hApsFMq.js} +1 -1
- package/dist/{Group-CR3LWKXE.js → Group-DLjkPLk9.js} +1 -1
- package/dist/{Group-Byj3qEBv.js → Group-DNBFvwk-.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-tecpeqJT.js → Group.vue_vue_type_script_setup_true_lang-8Upt5al2.js} +54 -54
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BkLHDcZV.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIWySrgb.js} +6 -6
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-YOzhk0a0.js +96257 -0
- package/dist/{Ingredient-BCfCDCFS.js → Ingredient-BUIIhzYV.js} +52 -52
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CpXnjduY.js → InventoryBinding.vue_vue_type_script_setup_true_lang-nqY-pxrW.js} +1052 -1052
- package/dist/{LinkProductSideSheet-BGlLnnm9.js → LinkProductSideSheet-xIuPAwp7.js} +14 -14
- package/dist/{MenuSetting-CdKhTxyc.js → MenuSetting-C3J66nHM.js} +11 -11
- package/dist/{PrintRoute-B-UlUlSD.js → PrintRoute-DnZrJ9IW.js} +26 -26
- package/dist/{Product-BggNPOwm.js → Product-jBcyCvO7.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DPOaafZ-.js → Product.vue_vue_type_script_setup_true_lang-CsaY9Kve.js} +113 -113
- package/dist/ProductInternalTools-CUZSrxvR.js +415 -0
- package/dist/Products-CRFXG-Du.js +270 -0
- package/dist/{Publish-BTPdN1Ub.js → Publish-Ch5QlJ9v.js} +37 -37
- package/dist/{Recipe-CibJRxHH.js → Recipe-BZJUndG3.js} +25 -25
- package/dist/{Scheduler-DAShXnol.js → Scheduler-BgMTPzhG.js} +13 -13
- package/dist/{ServingSequence-DFs7VR5V.js → ServingSequence-BISPWfTD.js} +36 -36
- package/dist/{Setting-aApApOKZ.js → Setting-4L-p0np0.js} +24 -24
- package/dist/{Subcategory-CGnGq5Kd.js → Subcategory-CptCl4cb.js} +39 -39
- package/dist/{Takeaway-rJDqoozq.js → Takeaway-BAM3XfIf.js} +1 -1
- package/dist/{Takeaway-C8M-Z4eK.js → Takeaway-DqiGDTfg.js} +12 -12
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CrFeCwvr.js → Takeaway.vue_vue_type_script_setup_true_lang-oZo0esEd.js} +25 -25
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CCVSPoDB.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C7QOuqzZ.js} +115 -115
- package/dist/{Unit-CcWjE73k.js → Unit-BYAvg037.js} +8 -8
- package/dist/{Variant-BDPjFaAa.js → Variant-uGUG4vH2.js} +18 -18
- package/dist/{_id_-mUBoDBKS.js → _id_-Uf140OcM.js} +19 -19
- package/dist/{app-BBoQR7rs.js → app-50bXo6rU.js} +262 -247
- package/dist/{app-sdhJyRKX.js → app-CUuWtEOn.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +1618 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUpdatePreview.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUploadDialog.vue.d.ts +28 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +15 -19
- package/dist/apps/mf-menu/src/utils/batchProcessor.d.ts +33 -0
- package/dist/apps/mf-menu/src/utils/images.d.ts +44 -0
- package/dist/apps/mf-menu/src/views/Product/ProductInternalTools.vue.d.ts +2 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BkX3Y-ws.js → linked-status-Dsak7omL.js} +2 -2
- package/dist/assets/{override-menu-Bo0ZNZ-U.js → override-menu-COqLF5sS.js} +2 -2
- package/dist/assets/{validate-menu-CIWz9YXT.js → validate-menu-DkLBw23v.js} +2 -2
- package/dist/{catalog-BbukcamZ.js → catalog-x_NpHc5w.js} +1 -1
- package/dist/{catalogSetting-7ZMZjqGs.js → catalogSetting-DU_dUoSh.js} +1 -1
- package/dist/{category-Cq2MmCBq.js → category-DJRGfRhf.js} +1 -1
- package/dist/{currency-OQd6moI9.js → currency-ljvNxerM.js} +1 -1
- package/dist/{dayjs.min-m51FMJgI.js → dayjs.min-DsjutQjn.js} +1 -1
- package/dist/{index-b9FcXU4s.js → index-Bb7-YO3o.js} +23 -23
- package/dist/{index-DlTid7hh.js → index-C58VTE70.js} +14 -14
- package/dist/{index-B5uSVMTf.js → index-CBnsZeF8.js} +1 -1
- package/dist/{item-96CGb3Kx.js → item-Cerfyitf.js} +1521 -1485
- package/dist/jszip.min-Co4cqzOU.js +2393 -0
- package/dist/{menu-Bqiz6B2P.js → menu-B7KFi80A.js} +154 -154
- package/dist/{menu-BmBsIlGC.js → menu-Bpul41jT.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-Ck8MqQWD.js → priceTier-CfW69h1F.js} +1 -1
- package/dist/{scheduler-DeOCwKnf.js → scheduler-DsO3qpTw.js} +3 -3
- package/dist/{subcategory-DbiQCCF5.js → subcategory-Cb_rqtHz.js} +84 -84
- package/dist/{toExcel-BsguLQA5.js → toExcel-P9X-WSN5.js} +15 -15
- package/dist/{unit-CnM6N-39.js → unit-Dej_sihQ.js} +24 -24
- package/package.json +3 -2
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BRlU0arf.js +0 -73010
- package/dist/Products-DZFgAKxB.js +0 -2660
|
@@ -0,0 +1,415 @@
|
|
|
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 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-Co4cqzOU.js";
|
|
3
|
+
import { B as le, u as ie, I as D, a0 as re, K as ce, M as de, N as me } from "./menu-B7KFi80A.js";
|
|
4
|
+
import { useI18n as ue } from "@feedmepos/mf-common";
|
|
5
|
+
import { FmButtonVariant as z, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
|
|
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-Bpul41jT.js";
|
|
8
|
+
import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-CsaY9Kve.js";
|
|
9
|
+
import { t as be, v as ve, w as _e } from "./item-Cerfyitf.js";
|
|
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
|
+
key: 0,
|
|
12
|
+
class: "h-full flex flex-col"
|
|
13
|
+
}, Fe = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "flex-1 flex items-center justify-center"
|
|
16
|
+
}, Me = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "flex-1 overflow-y-auto p-16"
|
|
19
|
+
}, Se = { 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
|
+
key: 1,
|
|
21
|
+
class: "text-gray-400 text-xs"
|
|
22
|
+
}, Te = { class: "flex" }, Be = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Ee = ["src", "alt"], Re = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "h-full flex flex-col"
|
|
25
|
+
}, Ae = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "flex-1 flex items-center justify-center"
|
|
28
|
+
}, Oe = {
|
|
29
|
+
key: 1,
|
|
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" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__PURE__ */ Z({
|
|
32
|
+
__name: "ImageUpdatePreview",
|
|
33
|
+
props: {
|
|
34
|
+
matchedImages: {},
|
|
35
|
+
unmatchedImages: {}
|
|
36
|
+
},
|
|
37
|
+
emits: ["cancel", "update"],
|
|
38
|
+
setup(L, { emit: j }) {
|
|
39
|
+
const u = L, F = j, y = v("matched"), b = $(() => u.matchedImages.length), k = $(() => u.unmatchedImages.length);
|
|
40
|
+
function _() {
|
|
41
|
+
F("cancel");
|
|
42
|
+
}
|
|
43
|
+
function M() {
|
|
44
|
+
F("update", u.matchedImages);
|
|
45
|
+
}
|
|
46
|
+
return (w, l) => {
|
|
47
|
+
const x = W("fm-button");
|
|
48
|
+
return r(), c("div", we, [
|
|
49
|
+
s("div", xe, [
|
|
50
|
+
l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
|
|
51
|
+
s("div", Ie, [
|
|
52
|
+
I(x, {
|
|
53
|
+
variant: h(z).Secondary,
|
|
54
|
+
label: "Cancel",
|
|
55
|
+
onClick: _
|
|
56
|
+
}, null, 8, ["variant"]),
|
|
57
|
+
I(x, {
|
|
58
|
+
variant: h(z).Primary,
|
|
59
|
+
label: "Update",
|
|
60
|
+
disabled: b.value === 0,
|
|
61
|
+
onClick: M
|
|
62
|
+
}, null, 8, ["variant", "disabled"])
|
|
63
|
+
])
|
|
64
|
+
]),
|
|
65
|
+
s("div", ke, [
|
|
66
|
+
s("div", Ce, [
|
|
67
|
+
s("button", {
|
|
68
|
+
class: B([
|
|
69
|
+
"px-16 py-12 font-medium text-sm border-b-2 transition-colors",
|
|
70
|
+
y.value === "matched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
71
|
+
]),
|
|
72
|
+
onClick: l[0] || (l[0] = (m) => y.value = "matched")
|
|
73
|
+
}, " Matched Images (" + U(b.value) + ") ", 3),
|
|
74
|
+
k.value > 0 ? (r(), c("button", {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: B([
|
|
77
|
+
"px-16 py-12 font-medium text-sm border-b-2 transition-colors",
|
|
78
|
+
y.value === "unmatched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
79
|
+
]),
|
|
80
|
+
onClick: l[1] || (l[1] = (m) => y.value = "unmatched")
|
|
81
|
+
}, " Unmatched Images (" + U(k.value) + ") ", 3)) : T("", !0)
|
|
82
|
+
])
|
|
83
|
+
]),
|
|
84
|
+
s("div", Ue, [
|
|
85
|
+
y.value === "matched" ? (r(), c("div", je, [
|
|
86
|
+
b.value === 0 ? (r(), c("div", Fe, l[3] || (l[3] = [
|
|
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
|
+
l[4] || (l[4] = s("div", { class: "grid grid-cols-3 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
|
|
90
|
+
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Product Name"),
|
|
91
|
+
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Current Image"),
|
|
92
|
+
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
|
|
93
|
+
], -1)),
|
|
94
|
+
s("div", Se, [
|
|
95
|
+
(r(!0), c(P, null, R(u.matchedImages, (m, C) => (r(), c("div", {
|
|
96
|
+
key: C,
|
|
97
|
+
class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
|
|
98
|
+
}, [
|
|
99
|
+
s("div", $e, U(m.productName), 1),
|
|
100
|
+
s("div", ze, [
|
|
101
|
+
s("div", Pe, [
|
|
102
|
+
m.originalThumbnail ? (r(), c("img", {
|
|
103
|
+
key: 0,
|
|
104
|
+
src: m.originalThumbnail,
|
|
105
|
+
alt: m.productName,
|
|
106
|
+
class: "w-full h-full object-cover"
|
|
107
|
+
}, null, 8, Le)) : (r(), c("span", Ne, "No image"))
|
|
108
|
+
])
|
|
109
|
+
]),
|
|
110
|
+
s("div", Te, [
|
|
111
|
+
s("div", Be, [
|
|
112
|
+
s("img", {
|
|
113
|
+
src: m.newImageUrl,
|
|
114
|
+
alt: m.newImage.name,
|
|
115
|
+
class: "w-full h-full object-cover"
|
|
116
|
+
}, null, 8, Ee)
|
|
117
|
+
])
|
|
118
|
+
])
|
|
119
|
+
]))), 128))
|
|
120
|
+
])
|
|
121
|
+
]))
|
|
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
|
+
l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
|
|
127
|
+
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Filename"),
|
|
128
|
+
s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
|
|
129
|
+
], -1)),
|
|
130
|
+
s("div", De, [
|
|
131
|
+
(r(!0), c(P, null, R(u.unmatchedImages, (m, C) => (r(), c("div", {
|
|
132
|
+
key: C,
|
|
133
|
+
class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
|
|
134
|
+
}, [
|
|
135
|
+
s("div", Ve, U(m.filename), 1),
|
|
136
|
+
s("div", Ze, [
|
|
137
|
+
s("div", We, [
|
|
138
|
+
s("img", {
|
|
139
|
+
src: m.imageUrl,
|
|
140
|
+
alt: m.filename,
|
|
141
|
+
class: "w-full h-full object-cover"
|
|
142
|
+
}, null, 8, qe)
|
|
143
|
+
])
|
|
144
|
+
])
|
|
145
|
+
]))), 128))
|
|
146
|
+
])
|
|
147
|
+
]))
|
|
148
|
+
])) : T("", !0)
|
|
149
|
+
])
|
|
150
|
+
]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
|
|
155
|
+
const He = {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "h-screen"
|
|
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
|
+
__name: "ProductInternalTools",
|
|
160
|
+
setup(L) {
|
|
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 = $(() => {
|
|
162
|
+
const e = D.flatten(k.value.map((a) => a.items));
|
|
163
|
+
return D.uniqBy(e, (a) => a._id);
|
|
164
|
+
}), m = $(() => x.value.length);
|
|
165
|
+
async function C(e, a) {
|
|
166
|
+
return await _e(e, {
|
|
167
|
+
withTimestamp: !0,
|
|
168
|
+
filename: a
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
async function q(e, a = "images.zip") {
|
|
172
|
+
const o = new O();
|
|
173
|
+
e.forEach(({ blob: d, filename: n }) => {
|
|
174
|
+
d && o.file(n, d);
|
|
175
|
+
});
|
|
176
|
+
const g = await o.generateAsync({ type: "blob" });
|
|
177
|
+
ne.saveAs(g, a);
|
|
178
|
+
}
|
|
179
|
+
async function G() {
|
|
180
|
+
const e = x.value.filter((a) => a.thumbnail);
|
|
181
|
+
if (e.length === 0) {
|
|
182
|
+
F.open({ type: "error", title: "No downloadable images found" });
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
y.open({
|
|
186
|
+
title: "Download Images",
|
|
187
|
+
message: `Found ${e.length} images, download as ZIP file?`,
|
|
188
|
+
primaryActions: {
|
|
189
|
+
text: "Download",
|
|
190
|
+
close: !0
|
|
191
|
+
},
|
|
192
|
+
secondaryActions: {
|
|
193
|
+
text: j("common.cancel"),
|
|
194
|
+
close: !0
|
|
195
|
+
}
|
|
196
|
+
}).onPrimary(async () => {
|
|
197
|
+
const a = v("Preparing download...");
|
|
198
|
+
await u.minor(
|
|
199
|
+
async () => {
|
|
200
|
+
const o = e.filter((n) => n.thumbnail).map((n, p) => {
|
|
201
|
+
let t = n.name || `image_${Date.now()}_${p}`;
|
|
202
|
+
return t += ".jpg", {
|
|
203
|
+
url: n.thumbnail,
|
|
204
|
+
filename: t,
|
|
205
|
+
index: p + 1
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
a.value = `Starting download of ${o.length} images...`;
|
|
209
|
+
const d = (await be(o, C, {
|
|
210
|
+
batchSize: 5,
|
|
211
|
+
// Download 5 images at a time
|
|
212
|
+
batchDelay: 200,
|
|
213
|
+
// 200ms delay between batches
|
|
214
|
+
progressMessage: a
|
|
215
|
+
})).filter((n) => n !== null);
|
|
216
|
+
if (a.value = "Creating ZIP file...", d.length > 0) {
|
|
217
|
+
const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
|
|
218
|
+
await q(d, n);
|
|
219
|
+
} else
|
|
220
|
+
throw new Error("Failed to fetch any images");
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
message: a,
|
|
224
|
+
successMessage: `Successfully downloaded ${e.length} images`,
|
|
225
|
+
customId: "download-images"
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
async function J(e) {
|
|
231
|
+
const o = await new O().loadAsync(e), g = [];
|
|
232
|
+
for (const [d, n] of Object.entries(o.files)) {
|
|
233
|
+
if (n.dir || d.includes("__MACOSX/") || !N(d))
|
|
234
|
+
continue;
|
|
235
|
+
const p = await n.async("blob"), t = d.split("/").pop() || d, i = new File([p], t, { type: H(t) });
|
|
236
|
+
g.push(i);
|
|
237
|
+
}
|
|
238
|
+
return g;
|
|
239
|
+
}
|
|
240
|
+
function N(e) {
|
|
241
|
+
const a = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"], o = e.toLowerCase().substring(e.lastIndexOf("."));
|
|
242
|
+
return a.includes(o);
|
|
243
|
+
}
|
|
244
|
+
function H(e) {
|
|
245
|
+
const a = e.toLowerCase().substring(e.lastIndexOf("."));
|
|
246
|
+
return {
|
|
247
|
+
".jpg": "image/jpeg",
|
|
248
|
+
".jpeg": "image/jpeg",
|
|
249
|
+
".png": "image/png",
|
|
250
|
+
".gif": "image/gif",
|
|
251
|
+
".webp": "image/webp",
|
|
252
|
+
".bmp": "image/bmp"
|
|
253
|
+
}[a] || "image/jpeg";
|
|
254
|
+
}
|
|
255
|
+
function K(e) {
|
|
256
|
+
return (e.substring(0, e.lastIndexOf(".")) || e).toLowerCase().trim().replace(/[_\-\s]+/g, " ");
|
|
257
|
+
}
|
|
258
|
+
function X(e) {
|
|
259
|
+
return e.toLowerCase().trim().replace(/[_\-\s]+/g, " ");
|
|
260
|
+
}
|
|
261
|
+
async function Q(e) {
|
|
262
|
+
const a = [];
|
|
263
|
+
for (const t of e)
|
|
264
|
+
if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
|
|
265
|
+
const i = await J(t);
|
|
266
|
+
a.push(...i);
|
|
267
|
+
} else N(t.name) && a.push(t);
|
|
268
|
+
const o = /* @__PURE__ */ new Map();
|
|
269
|
+
a.forEach((t) => {
|
|
270
|
+
const i = t.name.toLowerCase();
|
|
271
|
+
o.has(i) || o.set(i, t);
|
|
272
|
+
});
|
|
273
|
+
const g = Array.from(o.values()), d = [], n = [], p = /* @__PURE__ */ new Map();
|
|
274
|
+
x.value.forEach((t) => {
|
|
275
|
+
const i = X(t.name);
|
|
276
|
+
p.set(i, t);
|
|
277
|
+
});
|
|
278
|
+
for (const t of g) {
|
|
279
|
+
const i = K(t.name), f = p.get(i);
|
|
280
|
+
f ? d.push({
|
|
281
|
+
productId: f._id,
|
|
282
|
+
productName: f.name,
|
|
283
|
+
originalThumbnail: f.thumbnail,
|
|
284
|
+
newImage: t,
|
|
285
|
+
newImageUrl: URL.createObjectURL(t)
|
|
286
|
+
}) : n.push({
|
|
287
|
+
filename: t.name,
|
|
288
|
+
file: t,
|
|
289
|
+
imageUrl: URL.createObjectURL(t)
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return { matched: d, unmatched: n };
|
|
293
|
+
}
|
|
294
|
+
async function Y(e) {
|
|
295
|
+
await u.minor(
|
|
296
|
+
async () => {
|
|
297
|
+
const { matched: a, unmatched: o } = await Q(e);
|
|
298
|
+
w.value = a, l.value = o, _.value = !0;
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
message: "Processing uploaded images...",
|
|
302
|
+
customId: "process-images"
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
async function ee(e) {
|
|
307
|
+
const a = v("Preparing image updates...");
|
|
308
|
+
await u.minor(
|
|
309
|
+
async () => {
|
|
310
|
+
const o = async (t) => {
|
|
311
|
+
const i = ce(t.productId);
|
|
312
|
+
let f = "";
|
|
313
|
+
return t.newImage && (await de.update(i, t.newImage, Je.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
|
|
314
|
+
};
|
|
315
|
+
a.value = `Starting upload of ${e.length} product images...`;
|
|
316
|
+
const g = await ve({
|
|
317
|
+
items: e,
|
|
318
|
+
processor: o,
|
|
319
|
+
batchSize: 5,
|
|
320
|
+
// Upload 5 images at a time
|
|
321
|
+
batchDelay: 200,
|
|
322
|
+
// 200ms delay between batches
|
|
323
|
+
onProgress: ({ batchStart: t, batchEnd: i, total: f }) => {
|
|
324
|
+
a.value = `Uploading images ${t}-${i}/${f}...`;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
a.value = "Updating product data...";
|
|
328
|
+
const d = b.state.menu, n = re(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
|
|
329
|
+
n.modules.item = n.modules.item.map((t) => {
|
|
330
|
+
const i = p.get(t._id);
|
|
331
|
+
return i && i.newImageUrl ? { ...t, thumbnail: i.newImageUrl } : t;
|
|
332
|
+
}), await b.updateMenuSetting(n), await b.importMenu(n);
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
message: a,
|
|
336
|
+
successMessage: `Successfully updated ${e.length} product images`,
|
|
337
|
+
customId: "update-product-images"
|
|
338
|
+
}
|
|
339
|
+
), _.value = !1, w.value = [], l.value = [];
|
|
340
|
+
}
|
|
341
|
+
function te() {
|
|
342
|
+
w.value.forEach((e) => URL.revokeObjectURL(e.newImageUrl)), l.value.forEach((e) => URL.revokeObjectURL(e.imageUrl)), _.value = !1, w.value = [], l.value = [];
|
|
343
|
+
}
|
|
344
|
+
function ae() {
|
|
345
|
+
var e;
|
|
346
|
+
(e = M.value) == null || e.click();
|
|
347
|
+
}
|
|
348
|
+
function se(e) {
|
|
349
|
+
const a = e.target;
|
|
350
|
+
if (a.files && a.files.length > 0) {
|
|
351
|
+
const o = Array.from(a.files);
|
|
352
|
+
Y(o);
|
|
353
|
+
}
|
|
354
|
+
a.value = "";
|
|
355
|
+
}
|
|
356
|
+
return he().resetOnMount(), (e, a) => {
|
|
357
|
+
const o = W("fm-button");
|
|
358
|
+
return r(), c(P, null, [
|
|
359
|
+
_.value ? (r(), c("div", He, [
|
|
360
|
+
I(Ge, {
|
|
361
|
+
"matched-images": w.value,
|
|
362
|
+
"unmatched-images": l.value,
|
|
363
|
+
onCancel: te,
|
|
364
|
+
onUpdate: ee
|
|
365
|
+
}, null, 8, ["matched-images", "unmatched-images"])
|
|
366
|
+
])) : (r(), oe(pe, {
|
|
367
|
+
key: 1,
|
|
368
|
+
heading: h(j)("menu.productInternalTools.title")
|
|
369
|
+
}, {
|
|
370
|
+
default: A(() => [
|
|
371
|
+
I(ye)
|
|
372
|
+
]),
|
|
373
|
+
"append-heading": A(() => [
|
|
374
|
+
s("div", Ke, [
|
|
375
|
+
s("div", Xe, [
|
|
376
|
+
s("div", Qe, [
|
|
377
|
+
s("p", Ye, U(m.value), 1)
|
|
378
|
+
])
|
|
379
|
+
]),
|
|
380
|
+
s("div", et, [
|
|
381
|
+
I(o, {
|
|
382
|
+
"bg-color": h(S).NeutralGray100,
|
|
383
|
+
"text-color": h(S).TypoSecondary,
|
|
384
|
+
variant: h(z).Primary,
|
|
385
|
+
label: "Download Images",
|
|
386
|
+
onClick: G
|
|
387
|
+
}, null, 8, ["bg-color", "text-color", "variant"]),
|
|
388
|
+
I(o, {
|
|
389
|
+
"bg-color": h(S).NeutralGray100,
|
|
390
|
+
"text-color": h(S).TypoSecondary,
|
|
391
|
+
variant: h(z).Primary,
|
|
392
|
+
label: "Update Images",
|
|
393
|
+
onClick: ae
|
|
394
|
+
}, null, 8, ["bg-color", "text-color", "variant"])
|
|
395
|
+
])
|
|
396
|
+
])
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
}, 8, ["heading"])),
|
|
400
|
+
s("input", {
|
|
401
|
+
ref_key: "fileInput",
|
|
402
|
+
ref: M,
|
|
403
|
+
type: "file",
|
|
404
|
+
multiple: "",
|
|
405
|
+
accept: "image/*,.zip",
|
|
406
|
+
style: { display: "none" },
|
|
407
|
+
onChange: se
|
|
408
|
+
}, null, 544)
|
|
409
|
+
], 64);
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
export {
|
|
414
|
+
dt as default
|
|
415
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
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 m, createElementVNode as u, toDisplayString as U, createVNode as a, createCommentVNode as L, createElementBlock as D, Fragment as T } from "vue";
|
|
2
|
+
import { D as C } from "./dayjs.min-DsjutQjn.js";
|
|
3
|
+
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-YOzhk0a0.js";
|
|
4
|
+
import { J as oe, F as ne } from "./jszip.min-Co4cqzOU.js";
|
|
5
|
+
import { u as q, B as G, z as I, D as H, G as O, A as ae, H as N, I as B } from "./menu-B7KFi80A.js";
|
|
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 $, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { _ as ue, a as P } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
+
import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
+
import { u as me, a as de } from "./menu-Bpul41jT.js";
|
|
12
|
+
import { u as pe } from "./item-Cerfyitf.js";
|
|
13
|
+
import { _ as A, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-CsaY9Kve.js";
|
|
14
|
+
import { L as z } from "./LinkProductSideSheet-xIuPAwp7.js";
|
|
15
|
+
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C7QOuqzZ.js";
|
|
16
|
+
import { m as ve } from "./toExcel-P9X-WSN5.js";
|
|
17
|
+
const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, xe = /* @__PURE__ */ Y({
|
|
18
|
+
__name: "ConfirmActionDialog",
|
|
19
|
+
props: {
|
|
20
|
+
description: {},
|
|
21
|
+
value: {},
|
|
22
|
+
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
23
|
+
},
|
|
24
|
+
setup(F) {
|
|
25
|
+
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = R(""), w = j(), { emitAction: x } = ie();
|
|
26
|
+
return (p, s) => {
|
|
27
|
+
const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
|
|
28
|
+
return d(), y(b, {
|
|
29
|
+
"on-validation-success": () => e(x)("primary"),
|
|
30
|
+
"blame-form-child-on-validation-failed": ""
|
|
31
|
+
}, {
|
|
32
|
+
default: m(() => [
|
|
33
|
+
u("div", ge, [
|
|
34
|
+
u("div", null, U(p.description), 1),
|
|
35
|
+
u("div", { innerHTML: S.value }, null, 8, be),
|
|
36
|
+
u("div", null, [
|
|
37
|
+
a(i, {
|
|
38
|
+
modelValue: r.value,
|
|
39
|
+
"onUpdate:modelValue": [
|
|
40
|
+
s[0] || (s[0] = (l) => r.value = l),
|
|
41
|
+
s[1] || (s[1] = () => {
|
|
42
|
+
})
|
|
43
|
+
],
|
|
44
|
+
placeholder: p.value,
|
|
45
|
+
rules: [(l) => l === p.value || "Value does not match"]
|
|
46
|
+
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
47
|
+
]),
|
|
48
|
+
u("div", ye, [
|
|
49
|
+
a(f, {
|
|
50
|
+
label: "Cancel",
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
onClick: s[2] || (s[2] = (l) => e(w).close())
|
|
53
|
+
}),
|
|
54
|
+
a(f, {
|
|
55
|
+
label: "Confirm",
|
|
56
|
+
type: "submit"
|
|
57
|
+
})
|
|
58
|
+
])
|
|
59
|
+
])
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["on-validation-success"]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}), ke = /* @__PURE__ */ Y({
|
|
66
|
+
__name: "Migrate",
|
|
67
|
+
setup(F) {
|
|
68
|
+
const t = q(), S = re(), r = J(), { minor: w } = G(r), x = R(!1), p = j();
|
|
69
|
+
async function s() {
|
|
70
|
+
i.value || x.value || p.open({
|
|
71
|
+
title: "Migrate to new version",
|
|
72
|
+
contentComponent: xe,
|
|
73
|
+
contentComponentProps: {
|
|
74
|
+
value: "MIGRATE",
|
|
75
|
+
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
76
|
+
}
|
|
77
|
+
}).onPrimary(async () => {
|
|
78
|
+
p.close(), await w(
|
|
79
|
+
async () => {
|
|
80
|
+
await t.migrate(), setTimeout(() => {
|
|
81
|
+
window.location.reload();
|
|
82
|
+
}, 2e3);
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
isLoading: x,
|
|
86
|
+
customId: t.state.menu._id,
|
|
87
|
+
message: "Migrating menu",
|
|
88
|
+
successMessage: "Migration completed"
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const i = g(() => {
|
|
94
|
+
const f = S.restaurants.value;
|
|
95
|
+
if (!f.length) return "Required at least one restaurant to migrate";
|
|
96
|
+
const b = f.filter((k) => !k.posVersion || !I.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: k.posVersion }));
|
|
97
|
+
return b.length ? `Upgrade POS to V${I.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((k) => k.profile.name).join(", ")}` : null;
|
|
98
|
+
});
|
|
99
|
+
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
|
+
const l = h("FmSnackbar");
|
|
101
|
+
return !i.value && e(t).version !== e(O.F_MENU_VERSION).enum.v4 ? (d(), y(l, {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "!max-w-full",
|
|
104
|
+
title: "New version of menu is out now!",
|
|
105
|
+
description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
|
|
106
|
+
variant: "info",
|
|
107
|
+
action: "Migrate",
|
|
108
|
+
"z-index": 0,
|
|
109
|
+
onOnAction: s
|
|
110
|
+
})) : L("", !0);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
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" }, Le = /* @__PURE__ */ Y({
|
|
114
|
+
__name: "Products",
|
|
115
|
+
setup(F) {
|
|
116
|
+
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), x = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = me(), b = g(() => ({
|
|
117
|
+
...ae.menuV4ToV3(N(r.state.menu)),
|
|
118
|
+
_id: r.state.menu._id,
|
|
119
|
+
_rev: r.state.menu._rev
|
|
120
|
+
})), l = g(() => {
|
|
121
|
+
const c = B.flatten(f.value.map((o) => o.items));
|
|
122
|
+
return B.uniqBy(c, (o) => o._id).length;
|
|
123
|
+
});
|
|
124
|
+
async function k(c, o) {
|
|
125
|
+
const _ = new oe();
|
|
126
|
+
for (let v = 0; v < c.length; v++) {
|
|
127
|
+
const Q = await c[v].xlsx.writeBuffer();
|
|
128
|
+
_.file(`${o[v]}.xlsx`, Q);
|
|
129
|
+
}
|
|
130
|
+
const n = await _.generateAsync({ type: "blob" });
|
|
131
|
+
ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
|
+
}
|
|
133
|
+
async function E() {
|
|
134
|
+
await S.minor(
|
|
135
|
+
async () => {
|
|
136
|
+
if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
|
|
137
|
+
const c = N(r.state.menu), o = new ee(c).exportToExcel(), _ = [
|
|
138
|
+
`menu_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
139
|
+
`addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
140
|
+
`itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
|
|
141
|
+
];
|
|
142
|
+
k(o, _);
|
|
143
|
+
} else {
|
|
144
|
+
const c = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
|
|
145
|
+
await te(c, `${o}.xlsx`, {
|
|
146
|
+
bookType: "xlsx",
|
|
147
|
+
bookSST: !1,
|
|
148
|
+
type: "array"
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{ successMessage: "Menu exported", customId: r.state.menu._id }
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
const Z = le(), K = g(() => Z.breakpoints.value.xs);
|
|
156
|
+
return de().resetOnMount(), (c, o) => {
|
|
157
|
+
const _ = h("fm-button");
|
|
158
|
+
return d(), y(ce, {
|
|
159
|
+
heading: e(t)("menu.products.title")
|
|
160
|
+
}, {
|
|
161
|
+
default: m(() => [
|
|
162
|
+
a(ke),
|
|
163
|
+
a(fe)
|
|
164
|
+
]),
|
|
165
|
+
"append-heading": m(() => [
|
|
166
|
+
u("div", Me, [
|
|
167
|
+
u("div", Se, [
|
|
168
|
+
u("div", we, [
|
|
169
|
+
u("p", Ce, U(l.value), 1)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
u("div", he, [
|
|
173
|
+
K.value ? (d(), y(A, { key: 1 }, {
|
|
174
|
+
default: m(({ trigger: n }) => [
|
|
175
|
+
a(ue, null, {
|
|
176
|
+
default: m(() => [
|
|
177
|
+
a(P, {
|
|
178
|
+
label: e(t)("menu.products.actions.export"),
|
|
179
|
+
onClick: E
|
|
180
|
+
}, null, 8, ["label"]),
|
|
181
|
+
a(P, {
|
|
182
|
+
label: e(t)("menu.products.actions.import"),
|
|
183
|
+
onClick: n
|
|
184
|
+
}, null, 8, ["label", "onClick"])
|
|
185
|
+
]),
|
|
186
|
+
_: 2
|
|
187
|
+
}, 1024)
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
})) : (d(), D(T, { key: 0 }, [
|
|
191
|
+
a(_e, null, {
|
|
192
|
+
default: m(({ trigger: n }) => [
|
|
193
|
+
a(_, {
|
|
194
|
+
label: e(t)("menu.tree_editor.title"),
|
|
195
|
+
"bg-color": e(M).NeutralGray100,
|
|
196
|
+
"text-color": e(M).TypoSecondary,
|
|
197
|
+
variant: e($).Primary,
|
|
198
|
+
onClick: n
|
|
199
|
+
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}),
|
|
203
|
+
a(_, {
|
|
204
|
+
"bg-color": e(M).NeutralGray100,
|
|
205
|
+
"text-color": e(M).TypoSecondary,
|
|
206
|
+
variant: e($).Primary,
|
|
207
|
+
label: e(t)("menu.products.actions.export"),
|
|
208
|
+
onClick: E
|
|
209
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
210
|
+
a(A, null, {
|
|
211
|
+
default: m(({ trigger: n }) => [
|
|
212
|
+
a(_, {
|
|
213
|
+
"bg-color": e(M).NeutralGray100,
|
|
214
|
+
"text-color": e(M).TypoSecondary,
|
|
215
|
+
variant: e($).Primary,
|
|
216
|
+
label: e(t)("menu.products.actions.import"),
|
|
217
|
+
onClick: n
|
|
218
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
})
|
|
222
|
+
], 64)),
|
|
223
|
+
l.value > 0 ? (d(), D(T, { key: 2 }, [
|
|
224
|
+
w.value.create ? (d(), y(V, {
|
|
225
|
+
key: 0,
|
|
226
|
+
label: e(t)("menu.products.actions.add"),
|
|
227
|
+
"prepend-icon": "add",
|
|
228
|
+
onClick: o[0] || (o[0] = (n) => e(x).create(null))
|
|
229
|
+
}, null, 8, ["label"])) : p.value ? (d(), y(z, {
|
|
230
|
+
key: 1,
|
|
231
|
+
"categorized-items": e(s).linkableItems.value,
|
|
232
|
+
"initial-value": e(s).currentItems.value,
|
|
233
|
+
"show-variant": !1,
|
|
234
|
+
onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
|
|
235
|
+
}, {
|
|
236
|
+
default: m(({ trigger: n }) => [
|
|
237
|
+
a(V, {
|
|
238
|
+
label: e(t)("menu.products.actions.link"),
|
|
239
|
+
"prepend-icon": "link",
|
|
240
|
+
onClick: n
|
|
241
|
+
}, null, 8, ["label", "onClick"])
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
}, 8, ["categorized-items", "initial-value"])) : (d(), y(z, {
|
|
245
|
+
key: 2,
|
|
246
|
+
"categorized-items": e(i).linkableItems.value,
|
|
247
|
+
"initial-value": e(i).currentItems.value,
|
|
248
|
+
"show-variant": !1,
|
|
249
|
+
onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
|
|
250
|
+
}, {
|
|
251
|
+
default: m(({ trigger: n }) => [
|
|
252
|
+
a(V, {
|
|
253
|
+
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
254
|
+
onClick: n
|
|
255
|
+
}, null, 8, ["label", "onClick"])
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["categorized-items", "initial-value"]))
|
|
259
|
+
], 64)) : L("", !0)
|
|
260
|
+
])
|
|
261
|
+
])
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["heading"]);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
export {
|
|
269
|
+
Le as default
|
|
270
|
+
};
|