@feedmepos/mf-inventory-portal 0.0.25-dev.35 → 0.0.25-dev.37
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-C0_9-oDP.js +277 -0
- package/dist/{ApprovalView-lHxxupqD.js → ApprovalView-BDUbQAH0.js} +12 -18
- package/dist/{BindingsDialog-BYXxxF3D.js → BindingsDialog-BvKDyWAP.js} +4 -4
- package/dist/{BindingsPicker-BiOmhG63.js → BindingsPicker-zAexcP3H.js} +5 -5
- package/dist/{BindingsTable-C2CG0Wzx.js → BindingsTable-6dPndhbk.js} +5 -5
- package/dist/{ClosingDraftView-BO8Fg9uW.js → ClosingDraftView-NwwxcHA-.js} +2 -2
- package/dist/{ClosingTemplateView-DmBvstOM.js → ClosingTemplateView-Cfh0BZXH.js} +2 -2
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKxW0e2c.js +211 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CQB9QYnf.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CD0p0eOE.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DditohRx.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-eGofs51J.js} +1 -1
- package/dist/{IngredientGroupView-D5SpwtqP.js → IngredientGroupView-Cz4zcWgF.js} +1 -1
- package/dist/{IngredientsView-Dgw0nCeT.js → IngredientsView-Ctmor1Ds.js} +622 -605
- package/dist/{IntegrationView-BPkBh8lR.js → IntegrationView-DYV2ISmc.js} +23 -23
- package/dist/{InventoryBindingForm-COpLVAaA.js → InventoryBindingForm-Be75Cpzd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BkyQOb8e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-D8dK7h0Z.js} +11 -11
- package/dist/{InventoryBindingSummary-D6lmFeFs.js → InventoryBindingSummary-Cw1Woc3L.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKzL_obr.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BhKk5nMz.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CRrDyI6N.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DECtXs-3.js} +1 -1
- package/dist/{PublishView-DRLVREhD.js → PublishView-D9mnP1d8.js} +11 -11
- package/dist/{PurchaseOrderPrintPreview-DvaJAeNk.js → PurchaseOrderPrintPreview-2DOgQczG.js} +1 -1
- package/dist/ReceiveRequestView-Ss803mII.js +2547 -0
- package/dist/{RecipeView-BFVpv5zA.js → RecipeView-DTwkk7M_.js} +3 -3
- package/dist/{StockView-BOzx7POz.js → StockView-cd047f5L.js} +7 -7
- package/dist/{SupplierView-DA3-b1sK.js → SupplierView-CkYiC3sV.js} +4 -4
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CE3vSlpG.js +1540 -0
- package/dist/{TransferTemplateView-V4C_flzB.js → TransferTemplateView-C6-6Db2r.js} +7 -7
- package/dist/{UnitView-CfQSRLN9.js → UnitView-C-1I-kVv.js} +3 -3
- package/dist/{WarehouseView-B5mEXts4.js → WarehouseView-CJTtNzco.js} +1 -1
- package/dist/api/purchase-order.d.ts +2 -2
- package/dist/{app-tDCjbNqA.js → app-C720GM9g.js} +6632 -6672
- package/dist/app.js +1 -1
- package/dist/components/FmMultiselectDialog.d.ts +1 -24
- package/dist/{decimal-BXNZd-qR.js → decimal-BCdHyq3s.js} +1 -1
- package/dist/{feature-RoIIaF13.js → feature-Df0TfAlQ.js} +227 -231
- package/dist/{format-unit-display-B2P_1U8-.js → format-unit-display-DhVGfJ3A.js} +2 -2
- package/dist/{index-0DbWAreR.js → index-BcO0U3XD.js} +2 -2
- package/dist/{stock-BkYwqicV.js → stock-AgQ9Kd12.js} +1 -1
- package/dist/stores/feature.d.ts +2 -3
- package/dist/{supplier-2qlZME6l.js → supplier-y6wN-U1P.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-D9bLhIPr.js → use-ingredient-select-dialog-DedAlRiZ.js} +1 -1
- package/dist/{use-inventory-binding-dialog-FprlSH51.js → use-inventory-binding-dialog-D6ESCCxB.js} +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +0 -1375
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -3
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +0 -3
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +3022 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -1
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +9 -27
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +9 -22
- package/dist/views/receive-request/helper/print-po.d.ts +2 -9
- package/dist/{vue-i18n-C2CwX0tc.js → vue-i18n-C4yPgaCz.js} +397 -397
- package/package.json +1 -1
- package/dist/App-DPw6U_NJ.js +0 -280
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CJ7BgFh6.js +0 -215
- package/dist/ReceiveRequestView-C9Hqtit6.js +0 -2661
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DRUroMZS.js +0 -1843
- package/dist/components/MountListener.vue.d.ts +0 -15
- package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +0 -1
- package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +0 -75
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { i as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { defineStore as
|
|
7
|
-
import { g as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { u as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
1
|
+
import { ref as Y, defineComponent as ne, computed as S, resolveComponent as C, openBlock as f, createBlock as P, withCtx as V, createVNode as c, unref as d, createElementBlock as T, Fragment as X, createElementVNode as m, createCommentVNode as O, renderSlot as pe, createTextVNode as $e, toDisplayString as A, normalizeClass as ee, onMounted as rt, watch as Ge, renderList as ie, isRef as Be, createSlots as We, normalizeStyle as st, Teleport as Ne, normalizeProps as it, guardReactiveProps as dt } from "vue";
|
|
2
|
+
import { a as oe, d as W, e as Ke, S as ut, f as mt, D as ze, h as he, A as _e, b as Ee, i as Ze, j as xe, t as Je, k as fe, l as Ve, U as ct, m as pt, M as vt, n as Le, C as Se, o as He, p as Qe, q as ft, r as Xe, s as yt, v as gt, I as bt, w as ht, x as _t, u as xt, y as kt, _ as Vt, z as St, B as Ct, E as Oe } from "./app-C720GM9g.js";
|
|
3
|
+
import { useDialog as et, useSnackbar as ke, useProxiedModel as Ye, useDialogChild as wt, useBreakpoints as Ft } from "@feedmepos/ui-library";
|
|
4
|
+
import { i as Mt, _ as It } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { useI18n as le, useCoreStore as ye } from "@feedmepos/mf-common";
|
|
6
|
+
import { defineStore as $t, storeToRefs as Et } from "pinia";
|
|
7
|
+
import { g as Ut, _ as Ce, S as we } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
8
|
+
import { _ as Rt } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-D8dK7h0Z.js";
|
|
9
|
+
import { _ as Fe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-eGofs51J.js";
|
|
10
|
+
import { u as tt } from "./feature-Df0TfAlQ.js";
|
|
11
|
+
import { _ as Me } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
12
|
+
import { _ as Tt } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
13
13
|
import "./array-hChJVZLE.js";
|
|
14
|
-
const
|
|
15
|
-
const o =
|
|
14
|
+
const Ie = $t("ingredientForm", function() {
|
|
15
|
+
const o = et(), y = ke(), r = oe(), n = Y(!1), { t: l } = le(), i = Y();
|
|
16
16
|
function a() {
|
|
17
17
|
const b = {
|
|
18
18
|
unit: {},
|
|
19
|
-
mode:
|
|
19
|
+
mode: W.CREATE,
|
|
20
20
|
show: !0,
|
|
21
|
-
"onUpdate:show"(
|
|
22
|
-
i.value.show =
|
|
21
|
+
"onUpdate:show"(s) {
|
|
22
|
+
i.value.show = s;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
i.value = b;
|
|
26
26
|
}
|
|
27
27
|
async function h(b) {
|
|
28
|
-
const
|
|
29
|
-
unit:
|
|
30
|
-
mode:
|
|
28
|
+
const s = {
|
|
29
|
+
unit: Ke(b),
|
|
30
|
+
mode: W.UPDATE,
|
|
31
31
|
show: !0,
|
|
32
32
|
"onUpdate:show"(_) {
|
|
33
33
|
i.value.show = _;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
i.value =
|
|
36
|
+
i.value = s;
|
|
37
37
|
}
|
|
38
38
|
async function k(b) {
|
|
39
39
|
n.value = !0;
|
|
40
40
|
try {
|
|
41
|
-
await
|
|
41
|
+
await r.deleteSku(b), y.open({
|
|
42
42
|
title: "Success",
|
|
43
43
|
message: `Deleted ${b.name}`,
|
|
44
44
|
type: "success"
|
|
45
45
|
});
|
|
46
|
-
} catch (
|
|
47
|
-
|
|
46
|
+
} catch (s) {
|
|
47
|
+
s instanceof ut && Mt(s) ? o.open({
|
|
48
48
|
title: "Cannot delete ingredient",
|
|
49
|
-
contentComponent:
|
|
49
|
+
contentComponent: It,
|
|
50
50
|
contentComponentProps: {
|
|
51
51
|
subject: (b == null ? void 0 : b.name) ?? "",
|
|
52
|
-
items:
|
|
52
|
+
items: s.errorResponse.message
|
|
53
53
|
},
|
|
54
54
|
secondaryActions: {
|
|
55
55
|
text: "Close",
|
|
56
56
|
close: !0
|
|
57
57
|
}
|
|
58
|
-
}) : console.log("unable to delete ingredient",
|
|
58
|
+
}) : console.log("unable to delete ingredient", s), y.open({
|
|
59
59
|
title: `Cannot delete ${b.name}`,
|
|
60
60
|
message: "Please try again.",
|
|
61
61
|
type: "error"
|
|
62
|
-
}), console.error("failed to delete ingredient",
|
|
62
|
+
}), console.error("failed to delete ingredient", s);
|
|
63
63
|
} finally {
|
|
64
64
|
n.value = !1;
|
|
65
65
|
}
|
|
@@ -88,15 +88,15 @@ const Fe = Ft("ingredientForm", function() {
|
|
|
88
88
|
ingredientViewLoading: n
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
|
-
function
|
|
92
|
-
const { updateIngredient:
|
|
93
|
-
async function
|
|
94
|
-
const a =
|
|
95
|
-
if (l ===
|
|
96
|
-
await
|
|
91
|
+
function At() {
|
|
92
|
+
const { updateIngredient: u, deleteIngredient: o } = Ie(), { t: y } = le();
|
|
93
|
+
async function r(l, i) {
|
|
94
|
+
const a = Ke(i);
|
|
95
|
+
if (l === he.Edit) {
|
|
96
|
+
await u(a);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (l ===
|
|
99
|
+
if (l === he.Delete) {
|
|
100
100
|
await o(a);
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
@@ -136,10 +136,10 @@ function Ut() {
|
|
|
136
136
|
id: "action",
|
|
137
137
|
header: "",
|
|
138
138
|
cell(l) {
|
|
139
|
-
return
|
|
140
|
-
[
|
|
139
|
+
return mt(
|
|
140
|
+
[ze[he.Edit], ze[he.Delete]],
|
|
141
141
|
(i) => {
|
|
142
|
-
|
|
142
|
+
r(i, l.row.original);
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
},
|
|
@@ -152,7 +152,7 @@ function Ut() {
|
|
|
152
152
|
}
|
|
153
153
|
] };
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const Dt = /* @__PURE__ */ ne({
|
|
156
156
|
__name: "ConvertForm",
|
|
157
157
|
props: {
|
|
158
158
|
modelValue: {},
|
|
@@ -161,74 +161,74 @@ const Rt = /* @__PURE__ */ oe({
|
|
|
161
161
|
readonly: { type: Boolean }
|
|
162
162
|
},
|
|
163
163
|
emits: ["update:modelValue"],
|
|
164
|
-
setup(
|
|
165
|
-
const y =
|
|
166
|
-
var
|
|
167
|
-
return (
|
|
164
|
+
setup(u, { emit: o }) {
|
|
165
|
+
const y = u, r = S(() => {
|
|
166
|
+
var s;
|
|
167
|
+
return (s = y.rootValue) == null ? void 0 : s.unit;
|
|
168
168
|
}), n = S(() => {
|
|
169
|
-
var
|
|
170
|
-
return (
|
|
171
|
-
}), l = o, { t: i } =
|
|
169
|
+
var s;
|
|
170
|
+
return (s = y.rootValue) == null ? void 0 : s._id;
|
|
171
|
+
}), l = o, { t: i } = le(), a = S({
|
|
172
172
|
get() {
|
|
173
173
|
return !!y.modelValue;
|
|
174
174
|
},
|
|
175
|
-
set(
|
|
176
|
-
|
|
175
|
+
set(s) {
|
|
176
|
+
s ? l("update:modelValue", {
|
|
177
177
|
measurement: null,
|
|
178
178
|
inventoryBindings: []
|
|
179
179
|
}) : l("update:modelValue", null);
|
|
180
180
|
}
|
|
181
|
-
}), h = S(() =>
|
|
182
|
-
function k(
|
|
181
|
+
}), h = S(() => Ut(r.value));
|
|
182
|
+
function k(s) {
|
|
183
183
|
const _ = y.modelValue ?? {};
|
|
184
|
-
_.measurement =
|
|
184
|
+
_.measurement = s ? `${s}` : null, l("update:modelValue", _);
|
|
185
185
|
}
|
|
186
|
-
function g(
|
|
186
|
+
function g(s) {
|
|
187
187
|
const _ = y.modelValue ?? {};
|
|
188
|
-
_.inventoryBindings =
|
|
188
|
+
_.inventoryBindings = s, l("update:modelValue", _);
|
|
189
189
|
}
|
|
190
190
|
const b = S(() => {
|
|
191
191
|
if (!y.modelValue) return null;
|
|
192
|
-
const
|
|
193
|
-
return
|
|
192
|
+
const s = y.modelValue;
|
|
193
|
+
return s.measurement ? h.value.find((_) => _.value === s.measurement) ?? null : h.value.find((_) => _.value === null) ?? null;
|
|
194
194
|
});
|
|
195
|
-
return (
|
|
196
|
-
const U = C("FmSwitch"), I = C("FmSelect"),
|
|
197
|
-
return f(), B
|
|
195
|
+
return (s, _) => {
|
|
196
|
+
const U = C("FmSwitch"), I = C("FmSelect"), B = C("FmCard");
|
|
197
|
+
return f(), P(B, {
|
|
198
198
|
variant: "outlined",
|
|
199
199
|
class: "p-16 flex flex-col gap-16"
|
|
200
200
|
}, {
|
|
201
201
|
default: V(() => {
|
|
202
|
-
var
|
|
202
|
+
var F, v;
|
|
203
203
|
return [
|
|
204
|
-
|
|
204
|
+
c(U, {
|
|
205
205
|
value: "",
|
|
206
206
|
"model-value": a.value,
|
|
207
207
|
"onUpdate:modelValue": _[0] || (_[0] = (R) => a.value = R),
|
|
208
|
-
label:
|
|
209
|
-
sublabel:
|
|
208
|
+
label: d(i)("inventory.ingredient.convertible.title"),
|
|
209
|
+
sublabel: d(i)("inventory.ingredient.convertible.subtitle"),
|
|
210
210
|
labelPlacement: "right",
|
|
211
|
-
disabled:
|
|
211
|
+
disabled: s.readonly
|
|
212
212
|
}, null, 8, ["model-value", "label", "sublabel", "disabled"]),
|
|
213
|
-
a.value ? (f(),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
label:
|
|
217
|
-
modelValue: (
|
|
213
|
+
a.value ? (f(), T(X, { key: 0 }, [
|
|
214
|
+
m("div", null, [
|
|
215
|
+
c(I, {
|
|
216
|
+
label: d(i)("inventory.ingredient.convertible.convertTo"),
|
|
217
|
+
modelValue: (F = b.value) == null ? void 0 : F.value,
|
|
218
218
|
"onUpdate:modelValue": k,
|
|
219
219
|
items: h.value,
|
|
220
|
-
disabled:
|
|
220
|
+
disabled: s.readonly
|
|
221
221
|
}, null, 8, ["label", "modelValue", "items", "disabled"])
|
|
222
222
|
]),
|
|
223
|
-
|
|
223
|
+
c(Rt, {
|
|
224
224
|
id: n.value,
|
|
225
|
-
"model-value": ((v =
|
|
225
|
+
"model-value": ((v = s.modelValue) == null ? void 0 : v.inventoryBindings) ?? [],
|
|
226
226
|
"onUpdate:modelValue": g,
|
|
227
227
|
"exclude-binding-id": n.value,
|
|
228
|
-
rules: [
|
|
229
|
-
readonly:
|
|
228
|
+
rules: [d(_e)(1)],
|
|
229
|
+
readonly: s.readonly
|
|
230
230
|
}, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
|
|
231
|
-
], 64)) :
|
|
231
|
+
], 64)) : O("", !0)
|
|
232
232
|
];
|
|
233
233
|
}),
|
|
234
234
|
_: 1
|
|
@@ -236,16 +236,16 @@ const Rt = /* @__PURE__ */ oe({
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
|
-
function
|
|
239
|
+
function se() {
|
|
240
240
|
return {
|
|
241
241
|
low: 6,
|
|
242
242
|
mid: 14
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const Pt = {
|
|
246
246
|
key: 0,
|
|
247
247
|
class: "flex flex-col gap-4"
|
|
248
|
-
},
|
|
248
|
+
}, ve = /* @__PURE__ */ ne({
|
|
249
249
|
__name: "FmLockableField",
|
|
250
250
|
props: {
|
|
251
251
|
locked: { type: Boolean },
|
|
@@ -257,68 +257,68 @@ const Tt = {
|
|
|
257
257
|
tooltipPlacement: {},
|
|
258
258
|
tooltipZIndex: {}
|
|
259
259
|
},
|
|
260
|
-
setup(
|
|
260
|
+
setup(u) {
|
|
261
261
|
return (o, y) => {
|
|
262
|
-
const
|
|
263
|
-
return o.locked ? (f(),
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
const r = C("FmLabel"), n = C("FmIcon"), l = C("FmTooltip"), i = C("FmField");
|
|
263
|
+
return o.locked ? (f(), T("div", Pt, [
|
|
264
|
+
pe(o.$slots, "label", {}, () => [
|
|
265
|
+
c(r, {
|
|
266
266
|
label: o.label,
|
|
267
267
|
disabled: o.disabled
|
|
268
268
|
}, null, 8, ["label", "disabled"])
|
|
269
269
|
]),
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
pe(o.$slots, "field", {}, () => [
|
|
271
|
+
c(i, { disabled: o.disabled }, {
|
|
272
272
|
prepend: V(() => [
|
|
273
|
-
o.tooltipMessage ? (f(),
|
|
273
|
+
o.tooltipMessage ? (f(), P(l, {
|
|
274
274
|
key: 0,
|
|
275
275
|
placement: o.tooltipPlacement,
|
|
276
276
|
"z-index": o.tooltipZIndex
|
|
277
277
|
}, {
|
|
278
278
|
content: V(() => [
|
|
279
|
-
|
|
279
|
+
$e(A(o.tooltipMessage), 1)
|
|
280
280
|
]),
|
|
281
281
|
default: V(() => [
|
|
282
|
-
|
|
282
|
+
c(n, {
|
|
283
283
|
name: "lock",
|
|
284
284
|
color: "neutral-gray-400"
|
|
285
285
|
})
|
|
286
286
|
]),
|
|
287
287
|
_: 1
|
|
288
|
-
}, 8, ["placement", "z-index"])) : (f(),
|
|
288
|
+
}, 8, ["placement", "z-index"])) : (f(), P(n, {
|
|
289
289
|
key: 1,
|
|
290
290
|
name: "lock",
|
|
291
291
|
color: "neutral-gray-400"
|
|
292
292
|
}))
|
|
293
293
|
]),
|
|
294
294
|
default: V(() => [
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
class:
|
|
295
|
+
pe(o.$slots, "modelValue", {}, () => [
|
|
296
|
+
m("div", {
|
|
297
|
+
class: ee([
|
|
298
298
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary",
|
|
299
299
|
"line-clamp-1 text-ellipsis break-all"
|
|
300
300
|
])
|
|
301
|
-
},
|
|
301
|
+
}, A(o.modelValue), 3)
|
|
302
302
|
])
|
|
303
303
|
]),
|
|
304
304
|
_: 3
|
|
305
305
|
}, 8, ["disabled"])
|
|
306
306
|
]),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
class:
|
|
307
|
+
pe(o.$slots, "helper-text", {}, () => [
|
|
308
|
+
m("div", {
|
|
309
|
+
class: ee([
|
|
310
310
|
"fm-typo-en-body-sm-400 line-clamp-1",
|
|
311
311
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
312
312
|
])
|
|
313
|
-
},
|
|
313
|
+
}, A(o.helperText), 3)
|
|
314
314
|
])
|
|
315
|
-
])) :
|
|
315
|
+
])) : pe(o.$slots, "default", { key: 1 });
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
}),
|
|
318
|
+
}), Bt = { class: "flex gap-8" }, Nt = { class: "flex-1" }, zt = { class: "flex-1" }, Lt = { class: "text-fm-color-typo-secondary" }, Ht = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Ot = {
|
|
319
319
|
key: 2,
|
|
320
320
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
321
|
-
},
|
|
321
|
+
}, Yt = { class: "flex flex-col gap-12" }, jt = { class: "flex flex-col gap-4" }, qt = { class: "fm-typo-en-title-sm-600" }, Gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Wt = { class: "flex flex-col gap-4" }, Kt = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, Zt = { class: "flex-1 p-12 flex flex-col gap-8" }, Jt = { class: "mx-auto" }, Qt = { class: "flex flex-col" }, Xt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, en = { class: "flex-1 p-12 flex flex-col gap-8" }, tn = { class: "mx-auto" }, nn = { class: "flex flex-col" }, on = { class: "fm-typo-en-body-sm-600 translate-y-4" }, ln = { class: "flex-1 p-12 flex flex-col gap-8" }, an = { class: "mx-auto" }, rn = { class: "flex flex-col" }, sn = { class: "fm-typo-en-body-sm-600 translate-y-4" }, dn = /* @__PURE__ */ ne({
|
|
322
322
|
__name: "IngredientForm",
|
|
323
323
|
props: {
|
|
324
324
|
mode: {},
|
|
@@ -326,22 +326,22 @@ const Tt = {
|
|
|
326
326
|
disabled: { type: Boolean }
|
|
327
327
|
},
|
|
328
328
|
emits: ["update:modelValue", "click:submit"],
|
|
329
|
-
setup(
|
|
329
|
+
setup(u, { expose: o, emit: y }) {
|
|
330
330
|
var me;
|
|
331
|
-
const { t:
|
|
331
|
+
const { t: r } = le(), n = u, l = y, i = oe(), a = ye(), h = tt(), k = Ee(), g = S(() => k.isEnabled);
|
|
332
332
|
function b(e) {
|
|
333
333
|
if (e.length === 0) return;
|
|
334
|
-
const t = e[0],
|
|
334
|
+
const t = e[0], p = n.modelValue ?? {
|
|
335
335
|
unit: i.units.find((x) => x)
|
|
336
336
|
};
|
|
337
|
-
|
|
337
|
+
p.unit || (p.unit = t, l("update:modelValue", p));
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
rt(() => {
|
|
340
340
|
b(i.units);
|
|
341
|
-
}),
|
|
341
|
+
}), Ge([() => i.units], ([e]) => {
|
|
342
342
|
b(e);
|
|
343
343
|
});
|
|
344
|
-
function
|
|
344
|
+
function s() {
|
|
345
345
|
l("click:submit");
|
|
346
346
|
}
|
|
347
347
|
const _ = S({
|
|
@@ -368,12 +368,12 @@ const Tt = {
|
|
|
368
368
|
}
|
|
369
369
|
}), I = S({
|
|
370
370
|
get() {
|
|
371
|
-
var t,
|
|
372
|
-
const e = (
|
|
373
|
-
return e ? +
|
|
371
|
+
var t, p;
|
|
372
|
+
const e = (p = (t = n.modelValue) == null ? void 0 : t.defaultCost) == null ? void 0 : p.costPerUnit;
|
|
373
|
+
return e ? +Ze(e) : 0;
|
|
374
374
|
},
|
|
375
375
|
set(e) {
|
|
376
|
-
var
|
|
376
|
+
var p, x, E, w;
|
|
377
377
|
const t = n.modelValue ? {
|
|
378
378
|
...n.modelValue
|
|
379
379
|
} : {};
|
|
@@ -381,72 +381,72 @@ const Tt = {
|
|
|
381
381
|
costPerUnit: {
|
|
382
382
|
amount: 0,
|
|
383
383
|
precision: 2,
|
|
384
|
-
currency: ((
|
|
384
|
+
currency: ((p = xe(a.currentCountry.value)) == null ? void 0 : p.currency) ?? "MYR"
|
|
385
385
|
},
|
|
386
|
-
measurement: (
|
|
387
|
-
(
|
|
388
|
-
var
|
|
389
|
-
return
|
|
386
|
+
measurement: (w = (E = (x = n.modelValue) == null ? void 0 : x.unit) == null ? void 0 : E.measurements) == null ? void 0 : w.find(
|
|
387
|
+
(q) => {
|
|
388
|
+
var Q;
|
|
389
|
+
return q.id === ((Q = n.modelValue) == null ? void 0 : Q.trackingMeasurement);
|
|
390
390
|
}
|
|
391
391
|
)
|
|
392
392
|
}), t.defaultCost.costPerUnit = {
|
|
393
393
|
...t.defaultCost.costPerUnit,
|
|
394
|
-
...
|
|
394
|
+
...Je(+e, 4)
|
|
395
395
|
}, l("update:modelValue", t);
|
|
396
396
|
}
|
|
397
|
-
}),
|
|
398
|
-
var t,
|
|
397
|
+
}), B = S(() => {
|
|
398
|
+
var t, p, x;
|
|
399
399
|
const e = ((t = n.modelValue) == null ? void 0 : t.unit) ?? i.units.find((E) => E);
|
|
400
400
|
return e ? {
|
|
401
401
|
_id: e._id,
|
|
402
|
-
measurement: (
|
|
402
|
+
measurement: (p = n.modelValue) == null ? void 0 : p.trackingMeasurement,
|
|
403
403
|
name: ((x = e.measurements.find((E) => {
|
|
404
|
-
var
|
|
405
|
-
return E.id === ((
|
|
404
|
+
var w;
|
|
405
|
+
return E.id === ((w = n.modelValue) == null ? void 0 : w.trackingMeasurement);
|
|
406
406
|
})) == null ? void 0 : x.name) ?? e.name
|
|
407
407
|
} : null;
|
|
408
|
-
}),
|
|
409
|
-
() => i.units.flatMap(({ name: e, _id: t, abbrev:
|
|
408
|
+
}), F = S(
|
|
409
|
+
() => i.units.flatMap(({ name: e, _id: t, abbrev: p, measurements: x }) => [
|
|
410
410
|
{
|
|
411
411
|
label: `${e}`,
|
|
412
412
|
value: null,
|
|
413
413
|
displayAsSection: !0
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
|
-
label: `${e} (${
|
|
416
|
+
label: `${e} (${p})`,
|
|
417
417
|
value: { _id: t },
|
|
418
418
|
displayAsSection: !1
|
|
419
419
|
},
|
|
420
|
-
...x.map(({ id: E, name:
|
|
421
|
-
label: `${
|
|
420
|
+
...x.map(({ id: E, name: w, abbrev: q }) => ({
|
|
421
|
+
label: `${w} (${q})`,
|
|
422
422
|
value: { _id: t, measurement: E },
|
|
423
423
|
displayAsSection: !1
|
|
424
424
|
}))
|
|
425
425
|
])
|
|
426
426
|
);
|
|
427
427
|
function v(e) {
|
|
428
|
-
var t,
|
|
429
|
-
return ((
|
|
428
|
+
var t, p, x, E, w;
|
|
429
|
+
return ((p = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : p._id) === ((x = e.value) == null ? void 0 : x._id) && ((E = n.modelValue) == null ? void 0 : E.trackingMeasurement) === ((w = e.value) == null ? void 0 : w.measurement);
|
|
430
430
|
}
|
|
431
431
|
function R(e) {
|
|
432
|
-
var
|
|
432
|
+
var q, Q;
|
|
433
433
|
if (!e) return;
|
|
434
|
-
const { _id: t, measurement:
|
|
434
|
+
const { _id: t, measurement: p } = e, x = p || void 0, E = i.units.find((ce) => ce._id === t);
|
|
435
435
|
if (!E)
|
|
436
436
|
return;
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
measurement: E.measurements.find((
|
|
437
|
+
const w = n.modelValue ?? {};
|
|
438
|
+
w.unit = E, w.trackingMeasurement = x, w.convert && (w.convert.measurement = x || null), h.enableTotalCost && (w.defaultCost = {
|
|
439
|
+
measurement: E.measurements.find((ce) => ce.id === x),
|
|
440
440
|
costPerUnit: {
|
|
441
|
-
...((
|
|
441
|
+
...((q = w.defaultCost) == null ? void 0 : q.costPerUnit) ?? {
|
|
442
442
|
amount: 0,
|
|
443
443
|
precision: 2,
|
|
444
|
-
currency: ((
|
|
444
|
+
currency: ((Q = xe(a.currentCountry.value)) == null ? void 0 : Q.currency) ?? "MYR"
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
}), l("update:modelValue",
|
|
447
|
+
}), l("update:modelValue", w);
|
|
448
448
|
}
|
|
449
|
-
const
|
|
449
|
+
const Z = S({
|
|
450
450
|
get() {
|
|
451
451
|
var e;
|
|
452
452
|
return ((e = n.modelValue) == null ? void 0 : e.convert) ?? null;
|
|
@@ -457,13 +457,12 @@ const Tt = {
|
|
|
457
457
|
} : {};
|
|
458
458
|
e ? t.convert = e : t.convert = null, l("update:modelValue", t);
|
|
459
459
|
}
|
|
460
|
-
})
|
|
461
|
-
|
|
462
|
-
(e) => e === pe.enum.FIFO || e === pe.enum.WAVG
|
|
460
|
+
}), K = S(() => fe.options.filter(
|
|
461
|
+
(e) => e === fe.enum.FIFO || e === fe.enum.WAVG
|
|
463
462
|
).map((e) => ({
|
|
464
|
-
label:
|
|
463
|
+
label: r(`inventory.ingredient.valuationMethod.${e}`),
|
|
465
464
|
value: e
|
|
466
|
-
}))), S({
|
|
465
|
+
}))), L = S({
|
|
467
466
|
get() {
|
|
468
467
|
var e;
|
|
469
468
|
return ((e = n.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
|
|
@@ -474,8 +473,7 @@ const Tt = {
|
|
|
474
473
|
} : {};
|
|
475
474
|
t.valuation = e, l("update:modelValue", t);
|
|
476
475
|
}
|
|
477
|
-
})
|
|
478
|
-
const Z = S({
|
|
476
|
+
}), j = S({
|
|
479
477
|
get() {
|
|
480
478
|
var e;
|
|
481
479
|
return ((e = n.modelValue) == null ? void 0 : e.customAttributes) ?? {};
|
|
@@ -486,155 +484,155 @@ const Tt = {
|
|
|
486
484
|
} : {};
|
|
487
485
|
t.customAttributes = e, l("update:modelValue", t);
|
|
488
486
|
}
|
|
489
|
-
}),
|
|
487
|
+
}), H = Y();
|
|
490
488
|
o({
|
|
491
489
|
validateInputs: () => {
|
|
492
490
|
var e, t;
|
|
493
|
-
(t = (e =
|
|
491
|
+
(t = (e = H.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
|
|
494
492
|
},
|
|
495
493
|
resetInputsValidation: () => {
|
|
496
494
|
var e, t;
|
|
497
|
-
(t = (e =
|
|
495
|
+
(t = (e = H.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
|
|
498
496
|
},
|
|
499
497
|
resetInputs: () => {
|
|
500
498
|
var e, t;
|
|
501
|
-
(t = (e =
|
|
499
|
+
(t = (e = H.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
|
|
502
500
|
}
|
|
503
501
|
});
|
|
504
|
-
const
|
|
502
|
+
const J = Y(!1), de = S(
|
|
505
503
|
() => {
|
|
506
|
-
var e, t,
|
|
507
|
-
return (e = n.modelValue) != null && e._id ? ((
|
|
504
|
+
var e, t, p;
|
|
505
|
+
return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter(
|
|
508
506
|
(x) => x.from === "INGREDIENT"
|
|
509
507
|
)) ?? [] : [];
|
|
510
508
|
}
|
|
511
|
-
),
|
|
509
|
+
), ge = S(
|
|
512
510
|
() => {
|
|
513
|
-
var e, t,
|
|
514
|
-
return (e = n.modelValue) != null && e._id ? ((
|
|
511
|
+
var e, t, p;
|
|
512
|
+
return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter(
|
|
515
513
|
(x) => x.from === "RECIPE"
|
|
516
514
|
)) ?? [] : [];
|
|
517
515
|
}
|
|
518
|
-
),
|
|
516
|
+
), D = S(
|
|
519
517
|
() => {
|
|
520
|
-
var e, t,
|
|
521
|
-
return (e = n.modelValue) != null && e._id ? ((
|
|
518
|
+
var e, t, p;
|
|
519
|
+
return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter((x) => x.from === "MENU")) ?? [] : [];
|
|
522
520
|
}
|
|
523
|
-
),
|
|
521
|
+
), $ = S(
|
|
524
522
|
() => i.skus.map((e) => ({ label: e.name, value: e.code }))
|
|
525
|
-
),
|
|
526
|
-
function
|
|
527
|
-
var
|
|
523
|
+
), ue = Y((me = n.modelValue) == null ? void 0 : me.code);
|
|
524
|
+
function ae(e) {
|
|
525
|
+
var p;
|
|
528
526
|
const t = e.el;
|
|
529
|
-
t && ((
|
|
527
|
+
t && ((p = t.querySelector("[x-should-scroll-into=true]")) == null || p.scrollIntoView());
|
|
530
528
|
}
|
|
531
529
|
function re(e) {
|
|
532
530
|
switch (e) {
|
|
533
|
-
case
|
|
531
|
+
case Se.MY:
|
|
534
532
|
return "MYR";
|
|
535
|
-
case
|
|
533
|
+
case Se.SG:
|
|
536
534
|
return "SGD";
|
|
537
|
-
case
|
|
535
|
+
case Se.ID:
|
|
538
536
|
return "IDR";
|
|
539
537
|
default:
|
|
540
538
|
return "MYR";
|
|
541
539
|
}
|
|
542
540
|
}
|
|
543
|
-
const
|
|
541
|
+
const N = S(
|
|
544
542
|
() => {
|
|
545
|
-
var e, t,
|
|
546
|
-
return ((x = (
|
|
547
|
-
(
|
|
548
|
-
var
|
|
549
|
-
return
|
|
543
|
+
var e, t, p, x, E, w;
|
|
544
|
+
return ((x = (p = (t = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : p.find(
|
|
545
|
+
(q) => {
|
|
546
|
+
var Q;
|
|
547
|
+
return q.id === ((Q = n.modelValue) == null ? void 0 : Q.trackingMeasurement);
|
|
550
548
|
}
|
|
551
|
-
)) == null ? void 0 : x.abbrev) ?? ((
|
|
549
|
+
)) == null ? void 0 : x.abbrev) ?? ((w = (E = n.modelValue) == null ? void 0 : E.unit) == null ? void 0 : w.abbrev);
|
|
552
550
|
}
|
|
553
|
-
),
|
|
551
|
+
), z = S({
|
|
554
552
|
get() {
|
|
555
553
|
var e, t;
|
|
556
|
-
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.low) ??
|
|
554
|
+
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.low) ?? se().low;
|
|
557
555
|
},
|
|
558
556
|
set(e) {
|
|
559
557
|
var x;
|
|
560
|
-
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ??
|
|
558
|
+
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? se();
|
|
561
559
|
t.low = e;
|
|
562
|
-
const
|
|
560
|
+
const p = n.modelValue ? {
|
|
563
561
|
...n.modelValue
|
|
564
562
|
} : {};
|
|
565
|
-
|
|
563
|
+
p.thresholds = t, l("update:modelValue", p);
|
|
566
564
|
}
|
|
567
|
-
}),
|
|
565
|
+
}), te = S({
|
|
568
566
|
get() {
|
|
569
567
|
var e, t;
|
|
570
|
-
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ??
|
|
568
|
+
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ?? se().mid;
|
|
571
569
|
},
|
|
572
570
|
set(e) {
|
|
573
571
|
var x;
|
|
574
|
-
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ??
|
|
572
|
+
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? se();
|
|
575
573
|
t.mid = e;
|
|
576
|
-
const
|
|
574
|
+
const p = n.modelValue ? {
|
|
577
575
|
...n.modelValue
|
|
578
576
|
} : {};
|
|
579
|
-
|
|
577
|
+
p.thresholds = t, l("update:modelValue", p);
|
|
580
578
|
}
|
|
581
579
|
});
|
|
582
|
-
function
|
|
580
|
+
function be() {
|
|
583
581
|
return function(t) {
|
|
584
582
|
return typeof (t == null ? void 0 : t.low) != "number" || typeof (t == null ? void 0 : t.mid) != "number" ? "Required" : t.low >= t.mid ? "Days for red indicator should be less than yellow indicator." : !0;
|
|
585
583
|
};
|
|
586
584
|
}
|
|
587
585
|
return (e, t) => {
|
|
588
|
-
const
|
|
589
|
-
return f(),
|
|
586
|
+
const p = C("FmTextField"), x = C("FmLabel"), E = C("FmField"), w = C("FmMenuHeader"), q = C("FmMenuDivider"), Q = C("FmMenuItem"), ce = C("FmMenu"), Ue = C("FmFormGroup"), ot = C("FmSelect"), lt = C("FmSwitch"), Re = C("FmStepperField"), at = C("FmForm");
|
|
587
|
+
return f(), P(at, {
|
|
590
588
|
disabled: e.disabled,
|
|
591
589
|
ref_key: "formRef",
|
|
592
|
-
ref:
|
|
590
|
+
ref: H,
|
|
593
591
|
class: "flex flex-col gap-32",
|
|
594
|
-
onValidationSuccess:
|
|
592
|
+
onValidationSuccess: s
|
|
595
593
|
}, {
|
|
596
594
|
default: V(() => {
|
|
597
|
-
var
|
|
595
|
+
var Te, Ae, De, Pe;
|
|
598
596
|
return [
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
597
|
+
m("div", Bt, [
|
|
598
|
+
m("div", Nt, [
|
|
599
|
+
c(ve, {
|
|
602
600
|
"tooltip-message": "This field is managed by NetSuite",
|
|
603
601
|
"tooltip-z-index": 50,
|
|
604
|
-
label:
|
|
602
|
+
label: d(r)("inventory.ingredient.code"),
|
|
605
603
|
"model-value": _.value,
|
|
606
604
|
"onUpdate:modelValue": t[1] || (t[1] = (M) => _.value = M),
|
|
607
605
|
locked: g.value,
|
|
608
606
|
disabled: e.disabled
|
|
609
607
|
}, {
|
|
610
608
|
default: V(() => [
|
|
611
|
-
p
|
|
612
|
-
label:
|
|
609
|
+
c(p, {
|
|
610
|
+
label: d(r)("inventory.ingredient.code"),
|
|
613
611
|
"model-value": _.value,
|
|
614
612
|
"onUpdate:modelValue": t[0] || (t[0] = (M) => _.value = M),
|
|
615
|
-
rules: [
|
|
613
|
+
rules: [d(Ve)(), d(ct)($.value, ue.value)],
|
|
616
614
|
"label-mark": "required"
|
|
617
615
|
}, null, 8, ["label", "model-value", "rules"])
|
|
618
616
|
]),
|
|
619
617
|
_: 1
|
|
620
618
|
}, 8, ["label", "model-value", "locked", "disabled"])
|
|
621
619
|
]),
|
|
622
|
-
|
|
623
|
-
|
|
620
|
+
m("div", zt, [
|
|
621
|
+
c(ve, {
|
|
624
622
|
"tooltip-message": "This field is managed by NetSuite",
|
|
625
623
|
"tooltip-z-index": 50,
|
|
626
|
-
label:
|
|
624
|
+
label: d(r)("inventory.ingredient.name"),
|
|
627
625
|
"model-value": U.value,
|
|
628
626
|
"onUpdate:modelValue": t[3] || (t[3] = (M) => U.value = M),
|
|
629
627
|
locked: g.value,
|
|
630
628
|
disabled: e.disabled
|
|
631
629
|
}, {
|
|
632
630
|
default: V(() => [
|
|
633
|
-
p
|
|
634
|
-
label:
|
|
631
|
+
c(p, {
|
|
632
|
+
label: d(r)("inventory.ingredient.name"),
|
|
635
633
|
"model-value": U.value,
|
|
636
634
|
"onUpdate:modelValue": t[2] || (t[2] = (M) => U.value = M),
|
|
637
|
-
rules: [
|
|
635
|
+
rules: [d(Ve)()],
|
|
638
636
|
"label-mark": "required"
|
|
639
637
|
}, null, 8, ["label", "model-value", "rules"])
|
|
640
638
|
]),
|
|
@@ -642,31 +640,31 @@ const Tt = {
|
|
|
642
640
|
}, 8, ["label", "model-value", "locked", "disabled"])
|
|
643
641
|
])
|
|
644
642
|
]),
|
|
645
|
-
|
|
643
|
+
c(ve, {
|
|
646
644
|
"tooltip-message": "This field is managed by NetSuite",
|
|
647
645
|
"tooltip-z-index": 50,
|
|
648
|
-
label:
|
|
649
|
-
"helper-text": (
|
|
650
|
-
"model-value": (
|
|
646
|
+
label: d(r)("inventory.ingredient.unit"),
|
|
647
|
+
"helper-text": (Te = e.modelValue) != null && Te.trackingMeasurement ? `Base unit: ${(De = (Ae = e.modelValue) == null ? void 0 : Ae.unit) == null ? void 0 : De.name}` : void 0,
|
|
648
|
+
"model-value": (Pe = B.value) == null ? void 0 : Pe.name,
|
|
651
649
|
locked: g.value,
|
|
652
650
|
disabled: e.disabled
|
|
653
651
|
}, {
|
|
654
652
|
default: V(() => [
|
|
655
|
-
|
|
656
|
-
"model-value":
|
|
657
|
-
rules: [
|
|
653
|
+
c(Ue, {
|
|
654
|
+
"model-value": B.value,
|
|
655
|
+
rules: [d(Ve)()],
|
|
658
656
|
"label-mark": "required"
|
|
659
657
|
}, {
|
|
660
658
|
label: V(() => [
|
|
661
|
-
|
|
662
|
-
label:
|
|
659
|
+
c(x, {
|
|
660
|
+
label: d(r)("inventory.ingredient.unit")
|
|
663
661
|
}, null, 8, ["label"])
|
|
664
662
|
]),
|
|
665
663
|
default: V(({ invalid: M }) => [
|
|
666
|
-
|
|
664
|
+
c(ce, null, {
|
|
667
665
|
"menu-button": V(() => [
|
|
668
|
-
|
|
669
|
-
class:
|
|
666
|
+
c(E, {
|
|
667
|
+
class: ee([
|
|
670
668
|
"fm-typo-en-body-lg-400",
|
|
671
669
|
{
|
|
672
670
|
"text-fm-color-typo-primary": !e.disabled,
|
|
@@ -677,33 +675,33 @@ const Tt = {
|
|
|
677
675
|
"append-icon": "expand_more"
|
|
678
676
|
}, {
|
|
679
677
|
default: V(() => {
|
|
680
|
-
var
|
|
678
|
+
var G;
|
|
681
679
|
return [
|
|
682
|
-
|
|
680
|
+
$e(A((G = B.value) == null ? void 0 : G.name), 1)
|
|
683
681
|
];
|
|
684
682
|
}),
|
|
685
683
|
_: 2
|
|
686
684
|
}, 1032, ["class", "invalid"])
|
|
687
685
|
]),
|
|
688
686
|
default: V(() => [
|
|
689
|
-
|
|
687
|
+
m("div", {
|
|
690
688
|
class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
|
|
691
|
-
onVnodeMounted:
|
|
689
|
+
onVnodeMounted: ae
|
|
692
690
|
}, [
|
|
693
|
-
(f(!0),
|
|
694
|
-
key:
|
|
691
|
+
(f(!0), T(X, null, ie(F.value, (G) => (f(), T(X, {
|
|
692
|
+
key: G.label
|
|
695
693
|
}, [
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
label:
|
|
694
|
+
G.displayAsSection ? (f(), T(X, { key: 0 }, [
|
|
695
|
+
c(w, {
|
|
696
|
+
label: G.label
|
|
699
697
|
}, null, 8, ["label"]),
|
|
700
|
-
|
|
701
|
-
], 64)) : (f(),
|
|
698
|
+
c(q)
|
|
699
|
+
], 64)) : (f(), P(Q, {
|
|
702
700
|
key: 1,
|
|
703
|
-
label:
|
|
704
|
-
"model-value": v(
|
|
705
|
-
onClick: (
|
|
706
|
-
"x-should-scroll-into": `${v(
|
|
701
|
+
label: G.label,
|
|
702
|
+
"model-value": v(G),
|
|
703
|
+
onClick: (Yn) => R(G.value),
|
|
704
|
+
"x-should-scroll-into": `${v(G)}`
|
|
707
705
|
}, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
|
|
708
706
|
], 64))), 128))
|
|
709
707
|
], 512)
|
|
@@ -716,119 +714,138 @@ const Tt = {
|
|
|
716
714
|
]),
|
|
717
715
|
_: 1
|
|
718
716
|
}, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
|
|
719
|
-
|
|
717
|
+
c(ve, {
|
|
718
|
+
"tooltip-message": "This field is managed by NetSuite",
|
|
719
|
+
"tooltip-z-index": 50,
|
|
720
|
+
label: d(r)("inventory.ingredient.valuationMethod.title"),
|
|
721
|
+
"model-value": d(r)("inventory.ingredient.valuationMethod." + L.value),
|
|
722
|
+
locked: g.value,
|
|
723
|
+
disabled: e.disabled
|
|
724
|
+
}, {
|
|
725
|
+
default: V(() => [
|
|
726
|
+
c(ot, {
|
|
727
|
+
class: "col-span-2",
|
|
728
|
+
"model-value": L.value,
|
|
729
|
+
"onUpdate:modelValue": t[4] || (t[4] = (M) => L.value = M),
|
|
730
|
+
label: d(r)("inventory.ingredient.valuationMethod.title"),
|
|
731
|
+
items: K.value
|
|
732
|
+
}, null, 8, ["model-value", "label", "items"])
|
|
733
|
+
]),
|
|
734
|
+
_: 1
|
|
735
|
+
}, 8, ["label", "model-value", "locked", "disabled"]),
|
|
736
|
+
d(h).enableTotalCost ? (f(), P(ve, {
|
|
720
737
|
key: 0,
|
|
721
738
|
"tooltip-message": "This field is managed by NetSuite",
|
|
722
739
|
"tooltip-z-index": 50,
|
|
723
|
-
"model-value": `${
|
|
740
|
+
"model-value": `${d(pt)()} ${I.value}`,
|
|
724
741
|
locked: g.value,
|
|
725
742
|
disabled: e.disabled
|
|
726
743
|
}, {
|
|
727
744
|
label: V(() => [
|
|
728
|
-
|
|
745
|
+
c(Me, { "z-index": 50 }, {
|
|
729
746
|
default: V(() => [
|
|
730
|
-
|
|
731
|
-
label:
|
|
747
|
+
c(x, {
|
|
748
|
+
label: d(r)("inventory.ingredient.pricePerUnit")
|
|
732
749
|
}, null, 8, ["label"])
|
|
733
750
|
]),
|
|
734
751
|
_: 1
|
|
735
752
|
})
|
|
736
753
|
]),
|
|
737
754
|
default: V(() => [
|
|
738
|
-
|
|
755
|
+
d(h).enableTotalCost ? (f(), P(p, {
|
|
739
756
|
key: 0,
|
|
740
757
|
"model-value": I.value,
|
|
741
|
-
"onUpdate:modelValue": t[
|
|
742
|
-
rules: [
|
|
758
|
+
"onUpdate:modelValue": t[5] || (t[5] = (M) => I.value = M),
|
|
759
|
+
rules: [d(_e)(0), d(vt)(4)]
|
|
743
760
|
}, {
|
|
744
761
|
label: V(() => [
|
|
745
|
-
|
|
762
|
+
c(Me, { "z-index": 50 }, {
|
|
746
763
|
default: V(() => [
|
|
747
|
-
|
|
748
|
-
label:
|
|
764
|
+
c(x, {
|
|
765
|
+
label: d(r)("inventory.ingredient.pricePerUnit")
|
|
749
766
|
}, null, 8, ["label"])
|
|
750
767
|
]),
|
|
751
768
|
_: 1
|
|
752
769
|
})
|
|
753
770
|
]),
|
|
754
771
|
prepend: V(() => {
|
|
755
|
-
var M,
|
|
772
|
+
var M, G;
|
|
756
773
|
return [
|
|
757
|
-
|
|
774
|
+
m("div", Lt, A(re(((M = d(a).currentCountry) == null ? void 0 : M.value) ?? d(Le)) === "MYR" ? "RM" : re(((G = d(a).currentCountry) == null ? void 0 : G.value) ?? d(Le))), 1)
|
|
758
775
|
];
|
|
759
776
|
}),
|
|
760
777
|
append: V(() => [
|
|
761
|
-
|
|
778
|
+
m("div", Ht, " / " + A(N.value), 1)
|
|
762
779
|
]),
|
|
763
780
|
_: 1
|
|
764
|
-
}, 8, ["model-value", "rules"])) :
|
|
781
|
+
}, 8, ["model-value", "rules"])) : O("", !0)
|
|
765
782
|
]),
|
|
766
783
|
_: 1
|
|
767
|
-
}, 8, ["model-value", "locked", "disabled"])) :
|
|
768
|
-
!g.value ||
|
|
784
|
+
}, 8, ["model-value", "locked", "disabled"])) : O("", !0),
|
|
785
|
+
!g.value || Z.value ? (f(), P(Dt, {
|
|
769
786
|
key: 1,
|
|
770
|
-
"model-value":
|
|
771
|
-
"onUpdate:modelValue": t[
|
|
787
|
+
"model-value": Z.value,
|
|
788
|
+
"onUpdate:modelValue": t[6] || (t[6] = (M) => Z.value = M),
|
|
772
789
|
"root-value": e.modelValue,
|
|
773
790
|
readonly: g.value
|
|
774
|
-
}, null, 8, ["model-value", "root-value", "readonly"])) :
|
|
775
|
-
e.mode !==
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
label:
|
|
779
|
-
modelValue:
|
|
780
|
-
"onUpdate:modelValue": t[
|
|
791
|
+
}, null, 8, ["model-value", "root-value", "readonly"])) : O("", !0),
|
|
792
|
+
e.mode !== d(W).CREATE ? (f(), T("div", Ot, [
|
|
793
|
+
m("div", null, [
|
|
794
|
+
c(lt, {
|
|
795
|
+
label: d(r)("inventory.ingredient.bindedItems.title"),
|
|
796
|
+
modelValue: J.value,
|
|
797
|
+
"onUpdate:modelValue": t[7] || (t[7] = (M) => J.value = M),
|
|
781
798
|
"label-placement": "right"
|
|
782
799
|
}, null, 8, ["label", "modelValue"])
|
|
783
800
|
]),
|
|
784
|
-
|
|
801
|
+
J.value && de.value.length ? (f(), P(Fe, {
|
|
785
802
|
key: 0,
|
|
786
|
-
name:
|
|
787
|
-
bindings:
|
|
788
|
-
}, null, 8, ["name", "bindings"])) :
|
|
789
|
-
|
|
803
|
+
name: d(r)("inventory.ingredient.bindedItems.ingredient"),
|
|
804
|
+
bindings: de.value
|
|
805
|
+
}, null, 8, ["name", "bindings"])) : O("", !0),
|
|
806
|
+
J.value && ge.value.length ? (f(), P(Fe, {
|
|
790
807
|
key: 1,
|
|
791
|
-
name:
|
|
792
|
-
bindings:
|
|
793
|
-
}, null, 8, ["name", "bindings"])) :
|
|
794
|
-
|
|
808
|
+
name: d(r)("inventory.ingredient.bindedItems.recipe"),
|
|
809
|
+
bindings: ge.value
|
|
810
|
+
}, null, 8, ["name", "bindings"])) : O("", !0),
|
|
811
|
+
J.value && D.value.length ? (f(), P(Fe, {
|
|
795
812
|
key: 2,
|
|
796
|
-
name:
|
|
797
|
-
bindings:
|
|
798
|
-
}, null, 8, ["name", "bindings"])) :
|
|
799
|
-
])) :
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
813
|
+
name: d(r)("inventory.ingredient.bindedItems.menu"),
|
|
814
|
+
bindings: D.value
|
|
815
|
+
}, null, 8, ["name", "bindings"])) : O("", !0)
|
|
816
|
+
])) : O("", !0),
|
|
817
|
+
m("div", Yt, [
|
|
818
|
+
m("div", jt, [
|
|
819
|
+
c(Me, null, {
|
|
803
820
|
default: V(() => [
|
|
804
|
-
|
|
821
|
+
m("div", qt, A(d(r)("inventory.ingredient.threshold.title")), 1)
|
|
805
822
|
]),
|
|
806
823
|
_: 1
|
|
807
824
|
}),
|
|
808
|
-
|
|
825
|
+
m("div", Gt, A(d(r)("inventory.ingredient.threshold.subtitle")), 1)
|
|
809
826
|
]),
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
"model-value": { low:
|
|
813
|
-
rules: [
|
|
827
|
+
m("div", Wt, [
|
|
828
|
+
c(Ue, {
|
|
829
|
+
"model-value": { low: z.value, mid: te.value },
|
|
830
|
+
rules: [be()]
|
|
814
831
|
}, null, 8, ["model-value", "rules"]),
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
days:
|
|
820
|
-
level:
|
|
832
|
+
m("div", Kt, [
|
|
833
|
+
m("div", Zt, [
|
|
834
|
+
m("div", Jt, [
|
|
835
|
+
c(Ce, {
|
|
836
|
+
days: z.value,
|
|
837
|
+
level: d(we).low
|
|
821
838
|
}, null, 8, ["days", "level"])
|
|
822
839
|
]),
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
modelValue:
|
|
827
|
-
"onUpdate:modelValue": t[
|
|
828
|
-
rules: [
|
|
840
|
+
m("div", Qt, [
|
|
841
|
+
m("div", Xt, A(d(r)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
842
|
+
c(Re, {
|
|
843
|
+
modelValue: z.value,
|
|
844
|
+
"onUpdate:modelValue": t[8] || (t[8] = (M) => z.value = M),
|
|
845
|
+
rules: [d(_e)(0)]
|
|
829
846
|
}, {
|
|
830
|
-
append: V(() => t[
|
|
831
|
-
|
|
847
|
+
append: V(() => t[11] || (t[11] = [
|
|
848
|
+
m("div", {
|
|
832
849
|
class: "text-fm-color-typo-secondary",
|
|
833
850
|
style: { "padding-right": "32px" }
|
|
834
851
|
}, "days", -1)
|
|
@@ -837,31 +854,31 @@ const Tt = {
|
|
|
837
854
|
}, 8, ["modelValue", "rules"])
|
|
838
855
|
])
|
|
839
856
|
]),
|
|
840
|
-
t[
|
|
857
|
+
t[13] || (t[13] = m("div", {
|
|
841
858
|
class: "h-full bg-fm-color-neutral-gray-200 relative",
|
|
842
859
|
style: { width: "1px" }
|
|
843
860
|
}, [
|
|
844
|
-
|
|
861
|
+
m("div", {
|
|
845
862
|
class: "absolute bg-white",
|
|
846
863
|
style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
|
|
847
864
|
}, " < ")
|
|
848
865
|
], -1)),
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
days:
|
|
853
|
-
level:
|
|
866
|
+
m("div", en, [
|
|
867
|
+
m("div", tn, [
|
|
868
|
+
c(Ce, {
|
|
869
|
+
days: te.value,
|
|
870
|
+
level: d(we).mid
|
|
854
871
|
}, null, 8, ["days", "level"])
|
|
855
872
|
]),
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
modelValue:
|
|
860
|
-
"onUpdate:modelValue": t[
|
|
861
|
-
rules: [
|
|
873
|
+
m("div", nn, [
|
|
874
|
+
m("div", on, A(d(r)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
875
|
+
c(Re, {
|
|
876
|
+
modelValue: te.value,
|
|
877
|
+
"onUpdate:modelValue": t[9] || (t[9] = (M) => te.value = M),
|
|
878
|
+
rules: [d(_e)(0)]
|
|
862
879
|
}, {
|
|
863
|
-
append: V(() => t[
|
|
864
|
-
|
|
880
|
+
append: V(() => t[12] || (t[12] = [
|
|
881
|
+
m("div", {
|
|
865
882
|
class: "text-fm-color-typo-secondary",
|
|
866
883
|
style: { "padding-right": "32px" }
|
|
867
884
|
}, "days", -1)
|
|
@@ -870,34 +887,34 @@ const Tt = {
|
|
|
870
887
|
}, 8, ["modelValue", "rules"])
|
|
871
888
|
])
|
|
872
889
|
]),
|
|
873
|
-
t[
|
|
890
|
+
t[14] || (t[14] = m("div", {
|
|
874
891
|
class: "h-full bg-fm-color-neutral-gray-200 relative",
|
|
875
892
|
style: { width: "1px" }
|
|
876
893
|
}, [
|
|
877
|
-
|
|
894
|
+
m("div", {
|
|
878
895
|
class: "absolute bg-white",
|
|
879
896
|
style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
|
|
880
897
|
}, " < ")
|
|
881
898
|
], -1)),
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
days:
|
|
886
|
-
level:
|
|
899
|
+
m("div", ln, [
|
|
900
|
+
m("div", an, [
|
|
901
|
+
c(Ce, {
|
|
902
|
+
days: te.value + 1,
|
|
903
|
+
level: d(we).high
|
|
887
904
|
}, null, 8, ["days", "level"])
|
|
888
905
|
]),
|
|
889
|
-
|
|
890
|
-
|
|
906
|
+
m("div", rn, [
|
|
907
|
+
m("div", sn, A(d(r)("inventory.ingredient.threshold.stockIsStaple")), 1)
|
|
891
908
|
])
|
|
892
909
|
])
|
|
893
910
|
])
|
|
894
911
|
])
|
|
895
912
|
]),
|
|
896
|
-
|
|
897
|
-
|
|
913
|
+
m("div", null, [
|
|
914
|
+
c(Tt, {
|
|
898
915
|
entity: "inventorySku",
|
|
899
|
-
modelValue:
|
|
900
|
-
"onUpdate:modelValue": t[
|
|
916
|
+
modelValue: j.value,
|
|
917
|
+
"onUpdate:modelValue": t[10] || (t[10] = (M) => j.value = M)
|
|
901
918
|
}, null, 8, ["modelValue"])
|
|
902
919
|
])
|
|
903
920
|
];
|
|
@@ -906,46 +923,46 @@ const Tt = {
|
|
|
906
923
|
}, 8, ["disabled"]);
|
|
907
924
|
};
|
|
908
925
|
}
|
|
909
|
-
}),
|
|
926
|
+
}), un = { class: "flex flex-col gap-32" }, mn = {
|
|
910
927
|
key: 0,
|
|
911
928
|
class: "flex flex-col gap-12"
|
|
912
|
-
},
|
|
929
|
+
}, cn = { class: "flex flex-col gap-4" }, pn = { class: "flex-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, vn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, fn = { class: "flex gap-4" }, yn = /* @__PURE__ */ ne({
|
|
913
930
|
__name: "IngredientDialog",
|
|
914
931
|
props: {
|
|
915
932
|
show: { type: Boolean },
|
|
916
933
|
unit: {},
|
|
917
|
-
mode: { default:
|
|
934
|
+
mode: { default: W.READ }
|
|
918
935
|
},
|
|
919
936
|
emits: ["update:show"],
|
|
920
|
-
setup(
|
|
921
|
-
const o =
|
|
937
|
+
setup(u) {
|
|
938
|
+
const o = u, y = oe(), r = Ee(), n = ke(), { t: l } = le(), i = Ye(o, "show"), a = Ye(o, "unit"), h = S(
|
|
922
939
|
() => {
|
|
923
940
|
var v;
|
|
924
|
-
return
|
|
941
|
+
return r.isEnabled && r.netSuiteItemBySkuId.has((v = o.unit) == null ? void 0 : v._id);
|
|
925
942
|
}
|
|
926
943
|
), k = S(() => {
|
|
927
944
|
switch (o.mode) {
|
|
928
|
-
case
|
|
945
|
+
case W.READ:
|
|
929
946
|
return "";
|
|
930
|
-
case
|
|
947
|
+
case W.UPDATE:
|
|
931
948
|
return l("inventory.ingredient.update.title");
|
|
932
|
-
case
|
|
949
|
+
case W.CREATE:
|
|
933
950
|
return l("inventory.ingredient.create.title");
|
|
934
951
|
}
|
|
935
952
|
return "";
|
|
936
953
|
}), g = S(() => {
|
|
937
954
|
switch (o.mode) {
|
|
938
|
-
case
|
|
955
|
+
case W.READ:
|
|
939
956
|
return "";
|
|
940
|
-
case
|
|
957
|
+
case W.UPDATE:
|
|
941
958
|
return l("common.save");
|
|
942
|
-
case
|
|
959
|
+
case W.CREATE:
|
|
943
960
|
return l("common.add");
|
|
944
961
|
}
|
|
945
962
|
return "";
|
|
946
|
-
}), b =
|
|
963
|
+
}), b = Y(), s = Y(!1);
|
|
947
964
|
async function _() {
|
|
948
|
-
|
|
965
|
+
s.value = !0;
|
|
949
966
|
try {
|
|
950
967
|
await y.createSku(a.value), i.value = !1, n.open({
|
|
951
968
|
title: l("inventory.common.success"),
|
|
@@ -953,120 +970,120 @@ const Tt = {
|
|
|
953
970
|
type: "success"
|
|
954
971
|
});
|
|
955
972
|
} catch (v) {
|
|
956
|
-
v instanceof
|
|
973
|
+
v instanceof He || n.open({
|
|
957
974
|
title: l("inventory.ingredient.create.error.title"),
|
|
958
975
|
message: l("inventory.ingredient.create.error.message"),
|
|
959
976
|
type: "error"
|
|
960
977
|
});
|
|
961
978
|
} finally {
|
|
962
|
-
|
|
979
|
+
s.value = !1;
|
|
963
980
|
}
|
|
964
981
|
}
|
|
965
982
|
async function U() {
|
|
966
|
-
|
|
983
|
+
s.value = !0;
|
|
967
984
|
try {
|
|
968
|
-
await y.updateSku(a.value),
|
|
985
|
+
await y.updateSku(a.value), s.value = !1, i.value = !1, n.open({
|
|
969
986
|
title: l("inventory.common.success"),
|
|
970
987
|
message: l("inventory.ingredient.update.success", { name: a.value.name }),
|
|
971
988
|
type: "success"
|
|
972
989
|
});
|
|
973
990
|
} catch (v) {
|
|
974
|
-
v instanceof
|
|
991
|
+
v instanceof He || n.open({
|
|
975
992
|
title: l("inventory.ingredient.update.error.title"),
|
|
976
993
|
message: l("inventory.ingredient.update.error.message"),
|
|
977
994
|
type: "error"
|
|
978
995
|
});
|
|
979
996
|
} finally {
|
|
980
|
-
|
|
997
|
+
s.value = !1;
|
|
981
998
|
}
|
|
982
999
|
}
|
|
983
1000
|
function I() {
|
|
984
1001
|
var v, R;
|
|
985
1002
|
(R = (v = b.value) == null ? void 0 : v.validateInputs) == null || R.call(v);
|
|
986
1003
|
}
|
|
987
|
-
function
|
|
1004
|
+
function B() {
|
|
988
1005
|
switch (o.mode) {
|
|
989
|
-
case
|
|
1006
|
+
case W.READ:
|
|
990
1007
|
return;
|
|
991
|
-
case
|
|
1008
|
+
case W.UPDATE:
|
|
992
1009
|
return U();
|
|
993
|
-
case
|
|
1010
|
+
case W.CREATE:
|
|
994
1011
|
return _();
|
|
995
1012
|
}
|
|
996
1013
|
}
|
|
997
|
-
const
|
|
998
|
-
var
|
|
999
|
-
if (!
|
|
1000
|
-
const v = (
|
|
1001
|
-
return v ?
|
|
1014
|
+
const F = S(() => {
|
|
1015
|
+
var Z, K;
|
|
1016
|
+
if (!r.isEnabled || !((Z = o.unit) != null && Z._id)) return null;
|
|
1017
|
+
const v = (K = r.netSuiteItemBySkuId.get(o.unit._id)) == null ? void 0 : K[0];
|
|
1018
|
+
return v ? r.state.setting.childItems.filter(
|
|
1002
1019
|
(L) => L.parentNetSuiteId === v.netSuiteId
|
|
1003
1020
|
).map((L) => {
|
|
1004
|
-
var
|
|
1005
|
-
const
|
|
1006
|
-
return
|
|
1021
|
+
var H;
|
|
1022
|
+
const j = (H = r.measurementByNetsuiteId.get(L.unitOfMeasureId)) == null ? void 0 : H[0];
|
|
1023
|
+
return j ? {
|
|
1007
1024
|
externalId: L.externalId,
|
|
1008
|
-
...
|
|
1025
|
+
...j
|
|
1009
1026
|
} : null;
|
|
1010
1027
|
}).filter((L) => L).map((L) => L) : null;
|
|
1011
1028
|
});
|
|
1012
1029
|
return (v, R) => {
|
|
1013
|
-
const
|
|
1014
|
-
return f(),
|
|
1015
|
-
"model-value":
|
|
1016
|
-
"onUpdate:modelValue": R[3] || (R[3] = (
|
|
1030
|
+
const Z = C("FmChip"), K = C("FmButton"), L = C("FmSideSheet");
|
|
1031
|
+
return f(), P(L, {
|
|
1032
|
+
"model-value": d(i),
|
|
1033
|
+
"onUpdate:modelValue": R[3] || (R[3] = (j) => Be(i) ? i.value = j : null),
|
|
1017
1034
|
header: k.value,
|
|
1018
1035
|
"close-button": "",
|
|
1019
1036
|
"dismiss-away": "",
|
|
1020
1037
|
"max-width": 500
|
|
1021
1038
|
}, {
|
|
1022
1039
|
"side-sheet-footer": V(() => [
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
loading:
|
|
1040
|
+
m("div", fn, [
|
|
1041
|
+
c(K, {
|
|
1042
|
+
loading: s.value,
|
|
1026
1043
|
label: g.value,
|
|
1027
1044
|
onClick: I
|
|
1028
1045
|
}, null, 8, ["loading", "label"]),
|
|
1029
|
-
|
|
1030
|
-
disabled:
|
|
1031
|
-
label:
|
|
1046
|
+
c(K, {
|
|
1047
|
+
disabled: s.value,
|
|
1048
|
+
label: d(l)("common.close"),
|
|
1032
1049
|
variant: "tertiary",
|
|
1033
|
-
onClick: R[2] || (R[2] = (
|
|
1050
|
+
onClick: R[2] || (R[2] = (j) => i.value = !1)
|
|
1034
1051
|
}, null, 8, ["disabled", "label"])
|
|
1035
1052
|
])
|
|
1036
1053
|
]),
|
|
1037
1054
|
default: V(() => {
|
|
1038
|
-
var
|
|
1055
|
+
var j;
|
|
1039
1056
|
return [
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
h.value ? (f(),
|
|
1057
|
+
m("div", un, [
|
|
1058
|
+
m("div", null, [
|
|
1059
|
+
h.value ? (f(), P(Z, {
|
|
1043
1060
|
key: 0,
|
|
1044
1061
|
label: "Netsuite",
|
|
1045
1062
|
compact: ""
|
|
1046
|
-
})) :
|
|
1063
|
+
})) : O("", !0)
|
|
1047
1064
|
]),
|
|
1048
|
-
|
|
1065
|
+
c(dn, {
|
|
1049
1066
|
class: "w-full",
|
|
1050
1067
|
ref_key: "hasValidationExpose",
|
|
1051
1068
|
ref: b,
|
|
1052
|
-
modelValue:
|
|
1053
|
-
"onUpdate:modelValue": R[0] || (R[0] = (
|
|
1069
|
+
modelValue: d(a),
|
|
1070
|
+
"onUpdate:modelValue": R[0] || (R[0] = (H) => Be(a) ? a.value = H : null),
|
|
1054
1071
|
mode: v.mode,
|
|
1055
|
-
disabled:
|
|
1056
|
-
"onClick:submit": R[1] || (R[1] = (
|
|
1072
|
+
disabled: s.value,
|
|
1073
|
+
"onClick:submit": R[1] || (R[1] = (H) => B())
|
|
1057
1074
|
}, null, 8, ["modelValue", "mode", "disabled"]),
|
|
1058
|
-
(
|
|
1059
|
-
R[4] || (R[4] =
|
|
1060
|
-
|
|
1061
|
-
(f(!0),
|
|
1062
|
-
key:
|
|
1075
|
+
(j = F.value) != null && j.length ? (f(), T("div", mn, [
|
|
1076
|
+
R[4] || (R[4] = m("div", { class: "fm-typo-en-title-sm-600" }, A("NetSuite info"), -1)),
|
|
1077
|
+
m("div", cn, [
|
|
1078
|
+
(f(!0), T(X, null, ie(F.value, (H, J) => (f(), T("div", {
|
|
1079
|
+
key: J,
|
|
1063
1080
|
class: "flex items-center"
|
|
1064
1081
|
}, [
|
|
1065
|
-
|
|
1066
|
-
|
|
1082
|
+
m("div", pn, A(H.externalId), 1),
|
|
1083
|
+
m("div", vn, A(H.abbrev), 1)
|
|
1067
1084
|
]))), 128))
|
|
1068
1085
|
])
|
|
1069
|
-
])) :
|
|
1086
|
+
])) : O("", !0)
|
|
1070
1087
|
])
|
|
1071
1088
|
];
|
|
1072
1089
|
}),
|
|
@@ -1075,39 +1092,39 @@ const Tt = {
|
|
|
1075
1092
|
};
|
|
1076
1093
|
}
|
|
1077
1094
|
});
|
|
1078
|
-
function*
|
|
1095
|
+
function* gn(u) {
|
|
1079
1096
|
for (; ; )
|
|
1080
|
-
yield
|
|
1097
|
+
yield u[Math.floor(Math.random() * u.length)];
|
|
1081
1098
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return Array.from({ length:
|
|
1099
|
+
function bn(u = 4, o = gn("qwertyuiopasdfghjklzxcvbnm".split(""))) {
|
|
1100
|
+
return Array.from({ length: u }).map(() => o.next().value).join("");
|
|
1084
1101
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${
|
|
1102
|
+
function hn() {
|
|
1103
|
+
return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${bn()}`;
|
|
1087
1104
|
}
|
|
1088
|
-
const
|
|
1105
|
+
const _n = {
|
|
1089
1106
|
_id: "",
|
|
1090
1107
|
name: "",
|
|
1091
1108
|
abbrev: "",
|
|
1092
1109
|
precision: 0,
|
|
1093
1110
|
measurements: []
|
|
1094
1111
|
};
|
|
1095
|
-
function
|
|
1096
|
-
var y,
|
|
1112
|
+
function xn(u) {
|
|
1113
|
+
var y, r, n, l, i;
|
|
1097
1114
|
return {
|
|
1098
|
-
code:
|
|
1099
|
-
name:
|
|
1100
|
-
unit: ((y =
|
|
1101
|
-
baseUnit:
|
|
1102
|
-
valuationMethod:
|
|
1103
|
-
pricePerUnit: (
|
|
1104
|
-
thresholdLow: ((l =
|
|
1105
|
-
thresholdMid: ((i =
|
|
1115
|
+
code: u.code,
|
|
1116
|
+
name: u.name,
|
|
1117
|
+
unit: ((y = u.unit.measurements.find((a) => a.id === u.trackingMeasurement)) == null ? void 0 : y.abbrev) ?? u.unit.abbrev,
|
|
1118
|
+
baseUnit: u.unit.abbrev,
|
|
1119
|
+
valuationMethod: u.valuation ?? "WAVG",
|
|
1120
|
+
pricePerUnit: (r = u.defaultCost) != null && r.costPerUnit ? +Ze((n = u.defaultCost) == null ? void 0 : n.costPerUnit) : 0,
|
|
1121
|
+
thresholdLow: ((l = u.thresholds) == null ? void 0 : l.low) ?? se().low,
|
|
1122
|
+
thresholdMid: ((i = u.thresholds) == null ? void 0 : i.mid) ?? se().mid
|
|
1106
1123
|
};
|
|
1107
1124
|
}
|
|
1108
|
-
function
|
|
1125
|
+
function nt() {
|
|
1109
1126
|
var n;
|
|
1110
|
-
const
|
|
1127
|
+
const u = [
|
|
1111
1128
|
{
|
|
1112
1129
|
id: "code",
|
|
1113
1130
|
name: "Code"
|
|
@@ -1124,17 +1141,17 @@ function et() {
|
|
|
1124
1141
|
id: "baseUnit",
|
|
1125
1142
|
name: "Base unit"
|
|
1126
1143
|
}
|
|
1127
|
-
], o =
|
|
1128
|
-
return o.enableTotalCost &&
|
|
1144
|
+
], o = tt(), y = ye(), r = xe(y.currentCountry.value);
|
|
1145
|
+
return o.enableTotalCost && u.push(
|
|
1129
1146
|
{
|
|
1130
1147
|
id: "valuationMethod",
|
|
1131
1148
|
name: "Valuation method"
|
|
1132
1149
|
},
|
|
1133
1150
|
{
|
|
1134
1151
|
id: "pricePerUnit",
|
|
1135
|
-
name: `Price per unit (${
|
|
1152
|
+
name: `Price per unit (${r == null ? void 0 : r.currency})`
|
|
1136
1153
|
}
|
|
1137
|
-
), ((n = y.currentBusiness.value) == null ? void 0 : n.menuVersion) === "v4" &&
|
|
1154
|
+
), ((n = y.currentBusiness.value) == null ? void 0 : n.menuVersion) === "v4" && u.push(
|
|
1138
1155
|
{
|
|
1139
1156
|
id: "thresholdLow",
|
|
1140
1157
|
name: "Show RED when remaining"
|
|
@@ -1143,51 +1160,51 @@ function et() {
|
|
|
1143
1160
|
id: "thresholdMid",
|
|
1144
1161
|
name: "Show YELLOW when remaining"
|
|
1145
1162
|
}
|
|
1146
|
-
),
|
|
1163
|
+
), u;
|
|
1147
1164
|
}
|
|
1148
|
-
function
|
|
1149
|
-
const o =
|
|
1150
|
-
["Business name:",
|
|
1151
|
-
["Business ID:",
|
|
1152
|
-
["Menu version",
|
|
1165
|
+
function kn() {
|
|
1166
|
+
const o = oe().skus.map(xn), r = ye().currentBusiness.value, n = nt(), l = [
|
|
1167
|
+
["Business name:", r == null ? void 0 : r.name],
|
|
1168
|
+
["Business ID:", r == null ? void 0 : r._id],
|
|
1169
|
+
["Menu version", r == null ? void 0 : r.menuVersion],
|
|
1153
1170
|
[],
|
|
1154
1171
|
n.map((k) => k.name),
|
|
1155
1172
|
...o.map((k) => n.map((g) => k[g.id]))
|
|
1156
|
-
], i = n.map((k) => `system:${k.id}`), a =
|
|
1157
|
-
return
|
|
1173
|
+
], i = n.map((k) => `system:${k.id}`), a = Qe(l, i), h = `${r == null ? void 0 : r.name} ingredients (${ft(/* @__PURE__ */ new Date())}).xlsx`;
|
|
1174
|
+
return Xe(a, h), h;
|
|
1158
1175
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const o =
|
|
1176
|
+
function Vn() {
|
|
1177
|
+
const o = ye().currentBusiness.value, y = nt(), r = [
|
|
1161
1178
|
["Business name:", o == null ? void 0 : o.name],
|
|
1162
1179
|
["Business ID:", o == null ? void 0 : o._id],
|
|
1163
1180
|
["Menu version", o == null ? void 0 : o.menuVersion],
|
|
1164
1181
|
[],
|
|
1165
1182
|
y.map((a) => a.name)
|
|
1166
|
-
], n = y.map((a) => `system:${a.id}`), l =
|
|
1167
|
-
return
|
|
1183
|
+
], n = y.map((a) => `system:${a.id}`), l = Qe(r, n), i = "FeedMe ingredients template.xlsx";
|
|
1184
|
+
return Xe(l, i), i;
|
|
1168
1185
|
}
|
|
1169
|
-
function
|
|
1186
|
+
function Sn(u) {
|
|
1170
1187
|
const [
|
|
1171
1188
|
o,
|
|
1172
1189
|
y,
|
|
1173
|
-
|
|
1190
|
+
r,
|
|
1174
1191
|
n,
|
|
1175
1192
|
l,
|
|
1176
1193
|
i,
|
|
1177
1194
|
...a
|
|
1178
|
-
] =
|
|
1179
|
-
if (!o || !o.length || o.some((
|
|
1195
|
+
] = gt(u);
|
|
1196
|
+
if (!o || !o.length || o.some((s) => s.length && !s.startsWith("system:")))
|
|
1180
1197
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
1181
|
-
const h = o.map((
|
|
1198
|
+
const h = o.map((s) => s.split(":")[1]), g = ["code", "name", "unit", "baseUnit"].filter((s) => !h.includes(s));
|
|
1182
1199
|
if (g.length)
|
|
1183
1200
|
throw new Error(
|
|
1184
1201
|
`Missing meta headers (${g.join()}). Excel file does not come from the template.`
|
|
1185
1202
|
);
|
|
1186
|
-
return a.map((
|
|
1203
|
+
return a.map((s, _) => {
|
|
1187
1204
|
const U = {};
|
|
1188
1205
|
for (const I in h) {
|
|
1189
|
-
const
|
|
1190
|
-
Object.assign(U, { [
|
|
1206
|
+
const B = h[I];
|
|
1207
|
+
Object.assign(U, { [B]: s[I] });
|
|
1191
1208
|
}
|
|
1192
1209
|
return {
|
|
1193
1210
|
index: _,
|
|
@@ -1195,42 +1212,42 @@ function xn(d) {
|
|
|
1195
1212
|
};
|
|
1196
1213
|
});
|
|
1197
1214
|
}
|
|
1198
|
-
function
|
|
1199
|
-
var
|
|
1200
|
-
const n =
|
|
1215
|
+
function je(u, o, y) {
|
|
1216
|
+
var F;
|
|
1217
|
+
const n = oe().units, l = new Array(), i = y.filter((v) => v.data.code === u.code);
|
|
1201
1218
|
i.length > 1 && l.push(
|
|
1202
|
-
`Code ${
|
|
1219
|
+
`Code ${u.code} is already used in row ${i.map((v) => v.index + 6).join()}.`
|
|
1203
1220
|
);
|
|
1204
|
-
const a = n.find((v) => v.abbrev ===
|
|
1221
|
+
const a = n.find((v) => v.abbrev === u.baseUnit), h = a == null ? void 0 : a.measurements.find((v) => v.abbrev === u.unit);
|
|
1205
1222
|
if (!a)
|
|
1206
|
-
l.push(`Cannot find base unit of symbol ${
|
|
1207
|
-
else if (
|
|
1208
|
-
const v = `Cannot find unit conversion for ${
|
|
1223
|
+
l.push(`Cannot find base unit of symbol ${u.baseUnit}.`);
|
|
1224
|
+
else if (u.baseUnit !== u.unit && !h) {
|
|
1225
|
+
const v = `Cannot find unit conversion for ${u.baseUnit} with symbol ${u.unit || "[empty]"}.`;
|
|
1209
1226
|
l.push(v);
|
|
1210
1227
|
}
|
|
1211
|
-
const k =
|
|
1212
|
-
(v) => v ===
|
|
1228
|
+
const k = fe.options.find(
|
|
1229
|
+
(v) => v === u.valuationMethod
|
|
1213
1230
|
);
|
|
1214
|
-
|
|
1215
|
-
`Expected valuation method to be one of ${
|
|
1231
|
+
u.valuationMethod && !k && l.push(
|
|
1232
|
+
`Expected valuation method to be one of ${fe.options.join()} but got ${u.valuationMethod} instead.`
|
|
1216
1233
|
);
|
|
1217
|
-
const b =
|
|
1234
|
+
const b = ye().currentCountry.value, s = (v) => `${v}`.length && bt()(v) === !0, _ = s(`${u.pricePerUnit}`) === !0 ? {
|
|
1218
1235
|
costPerUnit: {
|
|
1219
|
-
...
|
|
1220
|
-
currency: ((
|
|
1236
|
+
...Je(Number(u.pricePerUnit) || 0),
|
|
1237
|
+
currency: ((F = xe(b)) == null ? void 0 : F.currency) ?? "MYR"
|
|
1221
1238
|
},
|
|
1222
1239
|
measurement: h
|
|
1223
|
-
} : void 0, U =
|
|
1224
|
-
low: Number(
|
|
1225
|
-
mid: Number(
|
|
1240
|
+
} : void 0, U = s(`${u.thresholdLow}`) && s(`${u.thresholdMid}`) ? {
|
|
1241
|
+
low: Number(u.thresholdLow) || 0,
|
|
1242
|
+
mid: Number(u.thresholdMid) || 0
|
|
1226
1243
|
} : void 0;
|
|
1227
1244
|
return {
|
|
1228
1245
|
type: "create",
|
|
1229
1246
|
sku: {
|
|
1230
|
-
_id:
|
|
1231
|
-
code:
|
|
1232
|
-
name:
|
|
1233
|
-
unit: a ?? n.find((v) => v) ??
|
|
1247
|
+
_id: hn(),
|
|
1248
|
+
code: u.code,
|
|
1249
|
+
name: u.name,
|
|
1250
|
+
unit: a ?? n.find((v) => v) ?? _n,
|
|
1234
1251
|
trackingMeasurement: h == null ? void 0 : h.id,
|
|
1235
1252
|
valuation: k,
|
|
1236
1253
|
defaultCost: _,
|
|
@@ -1240,12 +1257,12 @@ function Ye(d, o, y) {
|
|
|
1240
1257
|
excelRowNumber: o + 6
|
|
1241
1258
|
};
|
|
1242
1259
|
}
|
|
1243
|
-
function
|
|
1260
|
+
function Cn(u) {
|
|
1244
1261
|
try {
|
|
1245
|
-
const o =
|
|
1246
|
-
(k) =>
|
|
1262
|
+
const o = Sn(u).filter((k) => k.data.code), r = oe().skus, n = yt(r, "code"), l = o.filter((k) => !n[k.data.code]), i = o.filter((k) => n[k.data.code]), a = l.map(
|
|
1263
|
+
(k) => je(k.data, k.index, o)
|
|
1247
1264
|
), h = i.map((k) => {
|
|
1248
|
-
const g =
|
|
1265
|
+
const g = je(k.data, k.index, o), b = n[k.data.code];
|
|
1249
1266
|
return {
|
|
1250
1267
|
...g,
|
|
1251
1268
|
type: "update",
|
|
@@ -1277,10 +1294,10 @@ function kn(d) {
|
|
|
1277
1294
|
};
|
|
1278
1295
|
}
|
|
1279
1296
|
}
|
|
1280
|
-
const
|
|
1297
|
+
const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-col" }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, In = {
|
|
1281
1298
|
key: 0,
|
|
1282
1299
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1283
|
-
},
|
|
1300
|
+
}, $n = { key: 0 }, qe = /* @__PURE__ */ ne({
|
|
1284
1301
|
__name: "ImportIngredientItem",
|
|
1285
1302
|
props: {
|
|
1286
1303
|
type: {},
|
|
@@ -1288,30 +1305,30 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1288
1305
|
name: {},
|
|
1289
1306
|
errors: {}
|
|
1290
1307
|
},
|
|
1291
|
-
setup(
|
|
1308
|
+
setup(u) {
|
|
1292
1309
|
return (o, y) => {
|
|
1293
|
-
const
|
|
1294
|
-
return f(),
|
|
1295
|
-
y[0] || (y[0] =
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
class:
|
|
1310
|
+
const r = C("FmIcon"), n = C("FmTooltip");
|
|
1311
|
+
return f(), T("div", wn, [
|
|
1312
|
+
y[0] || (y[0] = m("div", null, "•", -1)),
|
|
1313
|
+
m("div", Fn, [
|
|
1314
|
+
m("div", Mn, [
|
|
1315
|
+
m("div", {
|
|
1316
|
+
class: ee({
|
|
1300
1317
|
"text-fm-color-system-error-300": o.errors.length
|
|
1301
1318
|
})
|
|
1302
1319
|
}, [
|
|
1303
|
-
|
|
1304
|
-
o.type === "create" ? (f(),
|
|
1320
|
+
$e(A(o.name) + " ", 1),
|
|
1321
|
+
o.type === "create" ? (f(), T("span", In, "(new)")) : O("", !0)
|
|
1305
1322
|
], 2),
|
|
1306
|
-
o.errors.length ? (f(),
|
|
1307
|
-
|
|
1323
|
+
o.errors.length ? (f(), T("div", $n, [
|
|
1324
|
+
c(n, { "z-index": 50 }, {
|
|
1308
1325
|
content: V(() => [
|
|
1309
|
-
|
|
1310
|
-
(f(!0),
|
|
1326
|
+
m("ol", null, [
|
|
1327
|
+
(f(!0), T(X, null, ie(o.errors, (l, i) => (f(), T("li", { key: i }, A(l), 1))), 128))
|
|
1311
1328
|
])
|
|
1312
1329
|
]),
|
|
1313
1330
|
default: V(() => [
|
|
1314
|
-
|
|
1331
|
+
c(r, {
|
|
1315
1332
|
name: "error",
|
|
1316
1333
|
size: "sm",
|
|
1317
1334
|
color: "system-error-300"
|
|
@@ -1319,52 +1336,52 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1319
1336
|
]),
|
|
1320
1337
|
_: 1
|
|
1321
1338
|
})
|
|
1322
|
-
])) :
|
|
1339
|
+
])) : O("", !0)
|
|
1323
1340
|
]),
|
|
1324
|
-
|
|
1325
|
-
class:
|
|
1341
|
+
m("div", {
|
|
1342
|
+
class: ee([
|
|
1326
1343
|
"fm-typo-en-body-sm-400",
|
|
1327
1344
|
{
|
|
1328
1345
|
"text-fm-color-system-error-200": o.errors.length,
|
|
1329
1346
|
"text-fm-color-typo-secondary": !o.errors.length
|
|
1330
1347
|
}
|
|
1331
1348
|
])
|
|
1332
|
-
},
|
|
1349
|
+
}, A(o.code), 3)
|
|
1333
1350
|
])
|
|
1334
1351
|
]);
|
|
1335
1352
|
};
|
|
1336
1353
|
}
|
|
1337
|
-
}),
|
|
1354
|
+
}), En = { class: "flex flex-col gap-24" }, Un = { class: "fm-typo-en-body-md-400" }, Rn = { class: "flex flex-col gap-8" }, Tn = { class: "line-clamp-2 text-ellipsis break-all" }, An = {
|
|
1338
1355
|
key: 2,
|
|
1339
1356
|
class: "shrink-0"
|
|
1340
|
-
},
|
|
1357
|
+
}, Dn = {
|
|
1341
1358
|
key: 0,
|
|
1342
1359
|
class: "flex flex-col"
|
|
1343
|
-
},
|
|
1360
|
+
}, Pn = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Bn = {
|
|
1344
1361
|
key: 0,
|
|
1345
1362
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
1346
|
-
},
|
|
1363
|
+
}, Nn = { class: "fm-typo-en-body-lg-600" }, zn = /* @__PURE__ */ ne({
|
|
1347
1364
|
__name: "ImportIngredients",
|
|
1348
|
-
setup(
|
|
1349
|
-
const o =
|
|
1350
|
-
() => !!l.value.length || i.value.some((
|
|
1365
|
+
setup(u) {
|
|
1366
|
+
const o = Y(null), y = wt(), r = ke(), n = Y(!1), l = Y(new Array()), i = Y([]), a = Y([]), h = S(
|
|
1367
|
+
() => !!l.value.length || i.value.some((s) => s.errors.length) || a.value.some((s) => s.errors.length)
|
|
1351
1368
|
), k = S(
|
|
1352
1369
|
() => !!i.value.length || !!a.value.length
|
|
1353
|
-
), { t: g } =
|
|
1354
|
-
async function b(
|
|
1370
|
+
), { t: g } = le();
|
|
1371
|
+
async function b(s) {
|
|
1355
1372
|
l.value = [], i.value = [], a.value = [];
|
|
1356
1373
|
try {
|
|
1357
1374
|
n.value = !0;
|
|
1358
1375
|
const [_] = await Promise.all([
|
|
1359
|
-
|
|
1376
|
+
_t(s),
|
|
1360
1377
|
// fake buffer
|
|
1361
|
-
new Promise((
|
|
1362
|
-
]), U = _.SheetNames.find((
|
|
1378
|
+
new Promise((B) => setTimeout(B, 1e3))
|
|
1379
|
+
]), U = _.SheetNames.find((B) => B);
|
|
1363
1380
|
if (!U) {
|
|
1364
1381
|
l.value.push(g("inventory.ingredient.import.fileError.noSheet"));
|
|
1365
1382
|
return;
|
|
1366
1383
|
}
|
|
1367
|
-
const I =
|
|
1384
|
+
const I = Cn(_.Sheets[U]);
|
|
1368
1385
|
if (I.invalidExcel) {
|
|
1369
1386
|
l.value.push(I.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel"));
|
|
1370
1387
|
return;
|
|
@@ -1375,40 +1392,40 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1375
1392
|
}
|
|
1376
1393
|
y.emitData(I);
|
|
1377
1394
|
} catch (_) {
|
|
1378
|
-
|
|
1395
|
+
r.open({
|
|
1379
1396
|
title: g("inventory.ingredient.import.fileError.unableToRead"),
|
|
1380
1397
|
message: _ == null ? void 0 : _.message,
|
|
1381
1398
|
type: "error"
|
|
1382
1399
|
}), console.error("Error in reading file", _);
|
|
1383
1400
|
} finally {
|
|
1384
|
-
l.value.length &&
|
|
1401
|
+
l.value.length && r.open({
|
|
1385
1402
|
title: g("inventory.ingredient.import.fileError.invalidExcel"),
|
|
1386
1403
|
type: "error"
|
|
1387
1404
|
}), n.value = !1;
|
|
1388
1405
|
}
|
|
1389
1406
|
}
|
|
1390
|
-
return
|
|
1391
|
-
|
|
1392
|
-
}), (
|
|
1393
|
-
const U = C("FmCircularProgress"), I = C("FmIcon"),
|
|
1394
|
-
return f(),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
class:
|
|
1407
|
+
return Ge(o, (s) => {
|
|
1408
|
+
s && b(s);
|
|
1409
|
+
}), (s, _) => {
|
|
1410
|
+
const U = C("FmCircularProgress"), I = C("FmIcon"), B = C("FmButton");
|
|
1411
|
+
return f(), T("div", En, [
|
|
1412
|
+
m("div", Un, A(d(g)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1413
|
+
c(ht, {
|
|
1414
|
+
class: ee({
|
|
1398
1415
|
"w-full": !0,
|
|
1399
1416
|
"h-[200px]": !o.value
|
|
1400
1417
|
}),
|
|
1401
1418
|
accept: ".xlsx",
|
|
1402
|
-
onFileUpload: _[0] || (_[0] = (
|
|
1403
|
-
label:
|
|
1404
|
-
"button-label":
|
|
1405
|
-
},
|
|
1419
|
+
onFileUpload: _[0] || (_[0] = (F) => o.value = F),
|
|
1420
|
+
label: d(g)("inventory.ingredient.import.uploadTemplate"),
|
|
1421
|
+
"button-label": d(g)("inventory.ingredient.import.selectFile")
|
|
1422
|
+
}, We({ _: 2 }, [
|
|
1406
1423
|
o.value ? {
|
|
1407
1424
|
name: "default",
|
|
1408
|
-
fn: V(({ openFileDialog:
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
class:
|
|
1425
|
+
fn: V(({ openFileDialog: F }) => [
|
|
1426
|
+
m("div", Rn, [
|
|
1427
|
+
m("div", {
|
|
1428
|
+
class: ee([
|
|
1412
1429
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
1413
1430
|
{
|
|
1414
1431
|
"border border-fm-color-neutral-gray-100": n.value,
|
|
@@ -1417,18 +1434,18 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1417
1434
|
}
|
|
1418
1435
|
])
|
|
1419
1436
|
}, [
|
|
1420
|
-
n.value ? (f(),
|
|
1437
|
+
n.value ? (f(), P(U, {
|
|
1421
1438
|
key: 0,
|
|
1422
1439
|
size: "md",
|
|
1423
1440
|
color: "neutral-gray-200"
|
|
1424
|
-
})) : (f(),
|
|
1441
|
+
})) : (f(), P(I, {
|
|
1425
1442
|
key: 1,
|
|
1426
1443
|
name: h.value ? "error" : "attach_file",
|
|
1427
1444
|
outline: "",
|
|
1428
1445
|
color: h.value ? "system-error-300" : void 0
|
|
1429
1446
|
}, null, 8, ["name", "color"])),
|
|
1430
|
-
|
|
1431
|
-
class:
|
|
1447
|
+
m("div", {
|
|
1448
|
+
class: ee([
|
|
1432
1449
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
1433
1450
|
{
|
|
1434
1451
|
"text-fm-color-typo-disabled": n.value,
|
|
@@ -1436,70 +1453,70 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1436
1453
|
}
|
|
1437
1454
|
])
|
|
1438
1455
|
}, [
|
|
1439
|
-
|
|
1456
|
+
m("div", Tn, A(o.value.name), 1)
|
|
1440
1457
|
], 2),
|
|
1441
|
-
n.value ?
|
|
1442
|
-
|
|
1443
|
-
label:
|
|
1458
|
+
n.value ? O("", !0) : (f(), T("div", An, [
|
|
1459
|
+
c(B, {
|
|
1460
|
+
label: d(g)("inventory.ingredient.import.replaceFile"),
|
|
1444
1461
|
variant: h.value ? "destructive" : "secondary",
|
|
1445
1462
|
"prepend-icon": h.value ? void 0 : "autorenew",
|
|
1446
|
-
onClick:
|
|
1463
|
+
onClick: F
|
|
1447
1464
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
1448
1465
|
]))
|
|
1449
1466
|
], 2),
|
|
1450
|
-
l.value.length ? (f(),
|
|
1451
|
-
(f(!0),
|
|
1467
|
+
l.value.length ? (f(), T("div", Dn, [
|
|
1468
|
+
(f(!0), T(X, null, ie(l.value, (v, R) => (f(), T("div", {
|
|
1452
1469
|
key: R,
|
|
1453
1470
|
class: "flex gap-8 items-center"
|
|
1454
1471
|
}, [
|
|
1455
|
-
|
|
1472
|
+
c(I, {
|
|
1456
1473
|
name: "error",
|
|
1457
1474
|
size: "sm",
|
|
1458
1475
|
color: "system-error-300"
|
|
1459
1476
|
}),
|
|
1460
|
-
|
|
1477
|
+
m("div", Pn, A(v), 1)
|
|
1461
1478
|
]))), 128))
|
|
1462
|
-
])) :
|
|
1479
|
+
])) : O("", !0)
|
|
1463
1480
|
])
|
|
1464
1481
|
]),
|
|
1465
1482
|
key: "0"
|
|
1466
1483
|
} : void 0
|
|
1467
1484
|
]), 1032, ["class", "label", "button-label"]),
|
|
1468
|
-
k.value ? (f(),
|
|
1469
|
-
|
|
1470
|
-
(f(!0),
|
|
1471
|
-
key:
|
|
1472
|
-
code:
|
|
1473
|
-
name:
|
|
1474
|
-
errors:
|
|
1485
|
+
k.value ? (f(), T("div", Bn, [
|
|
1486
|
+
m("div", Nn, A(d(g)("inventory.ingredient.import.summary")), 1),
|
|
1487
|
+
(f(!0), T(X, null, ie(i.value, (F) => (f(), P(qe, {
|
|
1488
|
+
key: F.sku._id,
|
|
1489
|
+
code: F.sku.code,
|
|
1490
|
+
name: F.sku.name,
|
|
1491
|
+
errors: F.errors,
|
|
1475
1492
|
type: "create"
|
|
1476
1493
|
}, null, 8, ["code", "name", "errors"]))), 128)),
|
|
1477
|
-
(f(!0),
|
|
1478
|
-
key:
|
|
1479
|
-
code:
|
|
1480
|
-
name:
|
|
1481
|
-
errors:
|
|
1494
|
+
(f(!0), T(X, null, ie(a.value, (F) => (f(), P(qe, {
|
|
1495
|
+
key: F.sku._id,
|
|
1496
|
+
code: F.sku.code,
|
|
1497
|
+
name: F.sku.name,
|
|
1498
|
+
errors: F.errors,
|
|
1482
1499
|
type: "update"
|
|
1483
1500
|
}, null, 8, ["code", "name", "errors"]))), 128))
|
|
1484
|
-
])) :
|
|
1501
|
+
])) : O("", !0)
|
|
1485
1502
|
]);
|
|
1486
1503
|
};
|
|
1487
1504
|
}
|
|
1488
|
-
}),
|
|
1505
|
+
}), Ln = { class: "flex flex-col py-8" }, Hn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, On = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lo = /* @__PURE__ */ ne({
|
|
1489
1506
|
__name: "IngredientsView",
|
|
1490
|
-
setup(
|
|
1491
|
-
const o =
|
|
1492
|
-
function _(
|
|
1493
|
-
switch (
|
|
1507
|
+
setup(u) {
|
|
1508
|
+
const o = oe(), y = S(() => o.skus), r = xt(), n = et(), l = ke(), i = Ee(), { t: a } = le(), { createIngredient: h, updateIngredient: k } = Ie(), { ingredientDialogProps: g, ingredientViewLoading: b } = Et(Ie()), { columnDefs: s } = At();
|
|
1509
|
+
function _(D) {
|
|
1510
|
+
switch (D) {
|
|
1494
1511
|
case "add":
|
|
1495
1512
|
return i.isEnabled ? void 0 : h();
|
|
1496
1513
|
case "import":
|
|
1497
|
-
return
|
|
1514
|
+
return de();
|
|
1498
1515
|
case "export":
|
|
1499
|
-
return
|
|
1516
|
+
return J();
|
|
1500
1517
|
}
|
|
1501
1518
|
}
|
|
1502
|
-
const U =
|
|
1519
|
+
const U = Y(""), I = Y(!1), B = S(() => I.value || b.value), { breakpoints: F } = Ft(), v = S(() => F.value.xs || F.value.sm), R = S(() => v.value ? 10 : 20), Z = kt(), K = Y(!1), L = [
|
|
1503
1520
|
{
|
|
1504
1521
|
value: "import",
|
|
1505
1522
|
label: a("common.import")
|
|
@@ -1509,15 +1526,15 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1509
1526
|
label: a("common.export")
|
|
1510
1527
|
}
|
|
1511
1528
|
];
|
|
1512
|
-
function
|
|
1513
|
-
switch (
|
|
1529
|
+
function j(D) {
|
|
1530
|
+
switch (K.value = !1, D) {
|
|
1514
1531
|
case "import":
|
|
1515
|
-
return
|
|
1532
|
+
return de();
|
|
1516
1533
|
case "export":
|
|
1517
|
-
return
|
|
1534
|
+
return J();
|
|
1518
1535
|
}
|
|
1519
1536
|
}
|
|
1520
|
-
const
|
|
1537
|
+
const H = S(() => [
|
|
1521
1538
|
...i.isEnabled ? [] : [
|
|
1522
1539
|
{
|
|
1523
1540
|
label: a("inventory.ingredient.create.title"),
|
|
@@ -1529,18 +1546,18 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1529
1546
|
],
|
|
1530
1547
|
{ label: a("common.export"), value: "export" }
|
|
1531
1548
|
]);
|
|
1532
|
-
function
|
|
1533
|
-
const
|
|
1549
|
+
function J() {
|
|
1550
|
+
const D = kn();
|
|
1534
1551
|
l.open({
|
|
1535
1552
|
title: a("inventory.ingredient.export.success"),
|
|
1536
|
-
message: a("inventory.ingredient.export.filename", [
|
|
1553
|
+
message: a("inventory.ingredient.export.filename", [D]),
|
|
1537
1554
|
type: "success"
|
|
1538
1555
|
});
|
|
1539
1556
|
}
|
|
1540
|
-
function
|
|
1557
|
+
function de() {
|
|
1541
1558
|
n.open({
|
|
1542
1559
|
title: a("inventory.ingredient.import.title"),
|
|
1543
|
-
contentComponent:
|
|
1560
|
+
contentComponent: zn,
|
|
1544
1561
|
overlay: !0,
|
|
1545
1562
|
closeButton: !0,
|
|
1546
1563
|
primaryActions: {
|
|
@@ -1556,15 +1573,15 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1556
1573
|
close: !1,
|
|
1557
1574
|
variant: "plain"
|
|
1558
1575
|
}
|
|
1559
|
-
}).onPrimary((
|
|
1560
|
-
if (!
|
|
1576
|
+
}).onPrimary((D) => {
|
|
1577
|
+
if (!D) {
|
|
1561
1578
|
l.open({
|
|
1562
1579
|
title: a("inventory.ingredient.import.error.noData"),
|
|
1563
1580
|
type: "error"
|
|
1564
1581
|
});
|
|
1565
1582
|
return;
|
|
1566
1583
|
}
|
|
1567
|
-
if (!
|
|
1584
|
+
if (!D.importCreateResult.length && !D.importUpdateResult.length) {
|
|
1568
1585
|
l.open({
|
|
1569
1586
|
title: a("inventory.ingredient.import.error.invalidContent"),
|
|
1570
1587
|
message: a("inventory.ingredient.import.error.noImportData"),
|
|
@@ -1572,7 +1589,7 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1572
1589
|
});
|
|
1573
1590
|
return;
|
|
1574
1591
|
}
|
|
1575
|
-
if (
|
|
1592
|
+
if (D.importCreateResult.some(($) => $.errors.length) || D.importUpdateResult.some(($) => $.errors.length)) {
|
|
1576
1593
|
l.open({
|
|
1577
1594
|
title: a("inventory.ingredient.import.error.invalidContent"),
|
|
1578
1595
|
message: a("inventory.ingredient.import.error.hasErrors"),
|
|
@@ -1580,29 +1597,29 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1580
1597
|
});
|
|
1581
1598
|
return;
|
|
1582
1599
|
}
|
|
1583
|
-
n.close(),
|
|
1584
|
-
}).onTertiary(
|
|
1600
|
+
n.close(), ge(D);
|
|
1601
|
+
}).onTertiary(Vn);
|
|
1585
1602
|
}
|
|
1586
|
-
async function
|
|
1603
|
+
async function ge(D) {
|
|
1587
1604
|
I.value = !0;
|
|
1588
1605
|
try {
|
|
1589
1606
|
const $ = [
|
|
1590
|
-
...
|
|
1591
|
-
...
|
|
1592
|
-
],
|
|
1593
|
-
let
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1607
|
+
...D.importCreateResult.map(({ sku: N }) => ({ type: "create", sku: N })),
|
|
1608
|
+
...D.importUpdateResult.map(({ sku: N }) => ({ type: "update", sku: N }))
|
|
1609
|
+
], ue = 100;
|
|
1610
|
+
let ae = 0;
|
|
1611
|
+
const re = () => {
|
|
1612
|
+
ae += ue, l.open({
|
|
1596
1613
|
title: a("inventory.ingredient.import.progress", [
|
|
1597
|
-
Math.min(
|
|
1614
|
+
Math.min(ae, $.length),
|
|
1598
1615
|
$.length
|
|
1599
1616
|
])
|
|
1600
1617
|
});
|
|
1601
1618
|
};
|
|
1602
|
-
for (const
|
|
1603
|
-
|
|
1604
|
-
create:
|
|
1605
|
-
update:
|
|
1619
|
+
for (const N of $.chunk(100))
|
|
1620
|
+
re(), await o.importSkus({
|
|
1621
|
+
create: N.filter((z) => z.type === "create").map((z) => z.sku),
|
|
1622
|
+
update: N.filter((z) => z.type === "update").map((z) => z.sku)
|
|
1606
1623
|
});
|
|
1607
1624
|
l.open({
|
|
1608
1625
|
title: a("inventory.ingredient.import.success"),
|
|
@@ -1613,21 +1630,21 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1613
1630
|
title: a("inventory.ingredient.import.error.failed"),
|
|
1614
1631
|
message: a("inventory.ingredient.import.error.systemMessage", [$ == null ? void 0 : $.message]),
|
|
1615
1632
|
type: "error"
|
|
1616
|
-
}), console.error("Error in importing skus",
|
|
1633
|
+
}), console.error("Error in importing skus", D, $);
|
|
1617
1634
|
} finally {
|
|
1618
1635
|
I.value = !1;
|
|
1619
1636
|
}
|
|
1620
1637
|
}
|
|
1621
|
-
return (
|
|
1622
|
-
const
|
|
1623
|
-
return f(),
|
|
1624
|
-
title:
|
|
1625
|
-
actions:
|
|
1638
|
+
return (D, $) => {
|
|
1639
|
+
const ue = C("FmTable"), ae = C("FmCollapsibleTabs"), re = C("FmBottomSheet");
|
|
1640
|
+
return f(), P(Vt, {
|
|
1641
|
+
title: d(a)("inventory.ingredient.title"),
|
|
1642
|
+
actions: H.value,
|
|
1626
1643
|
"onClick:action": _
|
|
1627
1644
|
}, {
|
|
1628
1645
|
default: V(() => [
|
|
1629
|
-
|
|
1630
|
-
class:
|
|
1646
|
+
m("div", {
|
|
1647
|
+
class: ee([
|
|
1631
1648
|
"flex flex-col gap-8 max-h-full",
|
|
1632
1649
|
{
|
|
1633
1650
|
"p-0": v.value,
|
|
@@ -1635,40 +1652,40 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1635
1652
|
}
|
|
1636
1653
|
])
|
|
1637
1654
|
}, [
|
|
1638
|
-
|
|
1655
|
+
c(St, {
|
|
1639
1656
|
searchable: "",
|
|
1640
1657
|
search: U.value,
|
|
1641
|
-
"onUpdate:search": $[0] || ($[0] = (
|
|
1658
|
+
"onUpdate:search": $[0] || ($[0] = (N) => U.value = N)
|
|
1642
1659
|
}, null, 8, ["search"]),
|
|
1643
|
-
|
|
1644
|
-
style:
|
|
1645
|
-
"column-defs":
|
|
1660
|
+
c(ue, {
|
|
1661
|
+
style: st(d(Z).tableHeight),
|
|
1662
|
+
"column-defs": d(s),
|
|
1646
1663
|
"row-data": y.value,
|
|
1647
1664
|
"search-value": U.value,
|
|
1648
|
-
loading: !
|
|
1665
|
+
loading: !d(r)._currentLocation || B.value,
|
|
1649
1666
|
"loading-text": "Loading",
|
|
1650
|
-
onRowClick: $[1] || ($[1] = (
|
|
1667
|
+
onRowClick: $[1] || ($[1] = (N) => d(k)(N.original)),
|
|
1651
1668
|
"page-size": R.value
|
|
1652
1669
|
}, {
|
|
1653
|
-
"list-row": V((
|
|
1654
|
-
|
|
1655
|
-
row:
|
|
1656
|
-
onRowClick:
|
|
1657
|
-
},
|
|
1658
|
-
default: V((
|
|
1659
|
-
var me, e, t,
|
|
1670
|
+
"list-row": V((N) => [
|
|
1671
|
+
c(Ct, {
|
|
1672
|
+
row: N,
|
|
1673
|
+
onRowClick: d(k)
|
|
1674
|
+
}, We({
|
|
1675
|
+
default: V((z) => {
|
|
1676
|
+
var te, be, me, e, t, p, x, E, w, q;
|
|
1660
1677
|
return [
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
render: (
|
|
1665
|
-
props: (
|
|
1678
|
+
m("div", Ln, [
|
|
1679
|
+
m("div", Hn, [
|
|
1680
|
+
c(d(Oe), {
|
|
1681
|
+
render: (me = (be = (te = z.code) == null ? void 0 : te.column) == null ? void 0 : be.columnDef) == null ? void 0 : me.cell,
|
|
1682
|
+
props: (t = (e = z.code) == null ? void 0 : e.getContext) == null ? void 0 : t.call(e)
|
|
1666
1683
|
}, null, 8, ["render", "props"])
|
|
1667
1684
|
]),
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
render: (
|
|
1671
|
-
props: (
|
|
1685
|
+
m("div", On, [
|
|
1686
|
+
c(d(Oe), {
|
|
1687
|
+
render: (E = (x = (p = z.name) == null ? void 0 : p.column) == null ? void 0 : x.columnDef) == null ? void 0 : E.cell,
|
|
1688
|
+
props: (q = (w = z.name) == null ? void 0 : w.getContext) == null ? void 0 : q.call(w)
|
|
1672
1689
|
}, null, 8, ["render", "props"])
|
|
1673
1690
|
])
|
|
1674
1691
|
])
|
|
@@ -1679,7 +1696,7 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1679
1696
|
I.value ? {
|
|
1680
1697
|
name: "loading-text",
|
|
1681
1698
|
fn: V(() => [
|
|
1682
|
-
|
|
1699
|
+
m("div", null, A(d(a)("inventory.ingredient.table.importing")), 1)
|
|
1683
1700
|
]),
|
|
1684
1701
|
key: "0"
|
|
1685
1702
|
} : void 0
|
|
@@ -1688,20 +1705,20 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1688
1705
|
_: 1
|
|
1689
1706
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
1690
1707
|
], 2),
|
|
1691
|
-
(f(),
|
|
1692
|
-
|
|
1708
|
+
(f(), P(Ne, { to: "body" }, [
|
|
1709
|
+
c(yn, it(dt(d(g))), null, 16)
|
|
1693
1710
|
])),
|
|
1694
|
-
(f(),
|
|
1695
|
-
|
|
1711
|
+
(f(), P(Ne, { to: "body" }, [
|
|
1712
|
+
c(re, {
|
|
1696
1713
|
"dismiss-away": "",
|
|
1697
|
-
modelValue:
|
|
1698
|
-
"onUpdate:modelValue": $[3] || ($[3] = (
|
|
1714
|
+
modelValue: K.value,
|
|
1715
|
+
"onUpdate:modelValue": $[3] || ($[3] = (N) => K.value = N)
|
|
1699
1716
|
}, {
|
|
1700
1717
|
default: V(() => [
|
|
1701
|
-
|
|
1718
|
+
c(ae, {
|
|
1702
1719
|
class: "pb-8",
|
|
1703
1720
|
items: L,
|
|
1704
|
-
"onUpdate:modelValue": $[2] || ($[2] = (
|
|
1721
|
+
"onUpdate:modelValue": $[2] || ($[2] = (N) => j(N))
|
|
1705
1722
|
})
|
|
1706
1723
|
]),
|
|
1707
1724
|
_: 1
|
|
@@ -1714,5 +1731,5 @@ const Vn = { class: "flex items-center gap-12 pl-8" }, Sn = { class: "flex flex-
|
|
|
1714
1731
|
}
|
|
1715
1732
|
});
|
|
1716
1733
|
export {
|
|
1717
|
-
|
|
1734
|
+
lo as default
|
|
1718
1735
|
};
|