@feedmepos/mf-inventory-portal 0.0.22-dev.43 → 0.0.22-dev.44
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/ApprovalView-DJhk8ORX.js +140 -0
- package/dist/{BindingsDialog-CKjAs5mJ.js → BindingsDialog-CNY83IzG.js} +1 -1
- package/dist/{BindingsPicker-BAVZ-3dF.js → BindingsPicker-BCeGBlTl.js} +1 -1
- package/dist/{BindingsTable-qq8M9fzG.js → BindingsTable-DwN0rUr_.js} +1 -1
- package/dist/{ClosingTemplateView-DOLuHmy8.js → ClosingTemplateView-BE1JMBGd.js} +342 -349
- package/dist/{FmDroppableField-BBpVEZs4.js → FmDroppableField-DeZRIGOb.js} +13 -13
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ChRPq-Ok.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CptHxbFO.js} +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js +435 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DrL5a2Pn.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C0liaZ9Y.js} +1 -1
- package/dist/{IngredientsView-m5K8MlM2.js → IngredientsView-B6BPG_MN.js} +414 -417
- package/dist/{IntegrationView-BE5P68EJ.js → IntegrationView-CXurxj5t.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cCv--C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C4np_znK.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CcM04Veu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CvSRvT_i.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-D40E9qZt.js → PurchaseOrderPrintPreview-BYSkl_zL.js} +3 -3
- package/dist/{ReceiveRequestView-Ci7FgSjU.js → ReceiveRequestView-DWKEL17S.js} +31 -27
- package/dist/{RecipeView-Bp7iBiy7.js → RecipeView-DEZblbQT.js} +91 -88
- package/dist/{StockView-BzowFcFA.js → StockView-hijQ7wQL.js} +533 -525
- package/dist/{SupplierView-CbRnAb8G.js → SupplierView-B2xKGKCF.js} +776 -802
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMikyrhA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CBwT8yGC.js} +5 -5
- package/dist/TransferTemplateView--2vvQWBW.js +1258 -0
- package/dist/{UnitView-B-058oRk.js → UnitView-B30FwZGg.js} +4 -4
- package/dist/{WarehouseView-RtU3sWKx.js → WarehouseView-BwbqpKwn.js} +14 -14
- package/dist/{app-By3PLx0q.js → app-DXZpbt33.js} +7334 -7251
- package/dist/app.js +1 -1
- package/dist/{decimal-CtriZ1S6.js → decimal-BVO6jH4l.js} +1 -1
- package/dist/{defineDeepModel-ClK3S9xx.js → defineDeepModel-DlkycC_t.js} +1 -1
- package/dist/{format-time-from-id-CGLKzJJO.js → format-time-from-id-Dhgv47T9.js} +1 -1
- package/dist/{format-unit-display-COeZSqdS.js → format-unit-display-D4D1b9F7.js} +15 -15
- package/dist/{supplier-BxBMThPQ.js → supplier-Beauc4QC.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-BIgPnzRW.js → use-template-enabled-locations-2-DbnvkOM9.js} +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
- package/dist/{xlsx-X_0qJPDg.js → xlsx-DXqCVrb5.js} +1 -1
- package/dist/{xlsx.util-BOPzVbUa.js → xlsx.util-7VhQushh.js} +1 -1
- package/package.json +1 -1
- package/dist/ApprovalView-1ZKaZJ2Z.js +0 -128
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js +0 -359
- package/dist/TransferTemplateView-BwamiSyk.js +0 -1302
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as
|
|
1
|
+
import { ref as N, defineComponent as ae, computed as C, resolveComponent as U, openBlock as g, createBlock as D, withCtx as S, createVNode as p, unref as u, createElementBlock as T, Fragment as q, createElementVNode as d, createCommentVNode as O, onMounted as nt, watch as ze, normalizeClass as Z, createTextVNode as He, toDisplayString as B, renderList as ee, isRef as Ee, createSlots as Oe, normalizeStyle as ot, Teleport as Re, normalizeProps as lt, guardReactiveProps as rt } from "vue";
|
|
2
|
+
import { u as te, c as je, S as at, _ as st, A as ge, a as Ye, g as be, t as Ge, F as de, R as xe, U as it, M as ut, d as Ae, b as qe, C as Ve, e as De, f as dt, h as mt, I as ct, i as pt } from "./app-DXZpbt33.js";
|
|
3
3
|
import { useDialog as We, useSnackbar as he, useProxiedModel as Te, useDialogChild as vt, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as yt, _ as gt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
-
import { F as
|
|
6
|
-
import { useI18n as
|
|
5
|
+
import { F as j, D as Pe, R as ye } from "./row-action.enum-PMKMRrZR.js";
|
|
6
|
+
import { useI18n as ne, useCoreStore as me } from "@feedmepos/mf-common";
|
|
7
7
|
import { defineStore as bt, storeToRefs as ht } from "pinia";
|
|
8
8
|
import { c as _t, _ as xt, F as Be } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { u as Vt, _ as kt, a as Ct } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { u as Vt, _ as kt, a as Ct } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js";
|
|
10
10
|
import { g as wt, _ as ke, S as Ce } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
11
|
-
import { _ as we } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as we } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-C0liaZ9Y.js";
|
|
12
12
|
import { _ as Se } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
13
|
-
import { t as Ke, d as Je, s as St, r as Ft } from "./xlsx.util-
|
|
14
|
-
import { F as Mt } from "./FmDroppableField-
|
|
13
|
+
import { t as Ke, d as Je, s as St, r as Ft } from "./xlsx.util-7VhQushh.js";
|
|
14
|
+
import { F as Mt } from "./FmDroppableField-DeZRIGOb.js";
|
|
15
15
|
const Fe = bt("ingredientForm", function() {
|
|
16
|
-
const a = We(), f = he(), s =
|
|
17
|
-
function
|
|
16
|
+
const a = We(), f = he(), s = te(), n = N(!1), { t: l } = ne(), o = N();
|
|
17
|
+
function c() {
|
|
18
18
|
const b = {
|
|
19
19
|
unit: {},
|
|
20
|
-
mode:
|
|
20
|
+
mode: j.CREATE,
|
|
21
21
|
show: !0,
|
|
22
22
|
"onUpdate:show"(i) {
|
|
23
23
|
o.value.show = i;
|
|
@@ -28,7 +28,7 @@ const Fe = bt("ingredientForm", function() {
|
|
|
28
28
|
async function y(b) {
|
|
29
29
|
const i = {
|
|
30
30
|
unit: je(b),
|
|
31
|
-
mode:
|
|
31
|
+
mode: j.UPDATE,
|
|
32
32
|
show: !0,
|
|
33
33
|
"onUpdate:show"(_) {
|
|
34
34
|
o.value.show = _;
|
|
@@ -82,7 +82,7 @@ const Fe = bt("ingredientForm", function() {
|
|
|
82
82
|
}).onPrimary(() => h(b));
|
|
83
83
|
}
|
|
84
84
|
return {
|
|
85
|
-
createIngredient:
|
|
85
|
+
createIngredient: c,
|
|
86
86
|
updateIngredient: y,
|
|
87
87
|
deleteIngredient: v,
|
|
88
88
|
ingredientDialogProps: o,
|
|
@@ -90,15 +90,15 @@ const Fe = bt("ingredientForm", function() {
|
|
|
90
90
|
};
|
|
91
91
|
});
|
|
92
92
|
function It() {
|
|
93
|
-
const { updateIngredient: r, deleteIngredient: a } = Fe(), { t: f } =
|
|
93
|
+
const { updateIngredient: r, deleteIngredient: a } = Fe(), { t: f } = ne();
|
|
94
94
|
async function s(l, o) {
|
|
95
|
-
const
|
|
95
|
+
const c = je(o);
|
|
96
96
|
if (l === ye.Edit) {
|
|
97
|
-
await r(
|
|
97
|
+
await r(c);
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
if (l === ye.Delete) {
|
|
101
|
-
await a(
|
|
101
|
+
await a(c);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -119,10 +119,10 @@ function It() {
|
|
|
119
119
|
id: "unit",
|
|
120
120
|
header: () => f("inventory.ingredient.unit"),
|
|
121
121
|
cell(l) {
|
|
122
|
-
var
|
|
122
|
+
var c;
|
|
123
123
|
const o = l.row.original;
|
|
124
124
|
if (o.trackingMeasurement) {
|
|
125
|
-
const y = (
|
|
125
|
+
const y = (c = o.unit.measurements) == null ? void 0 : c.find(
|
|
126
126
|
(h) => h.id === o.trackingMeasurement
|
|
127
127
|
);
|
|
128
128
|
if (y)
|
|
@@ -153,7 +153,7 @@ function It() {
|
|
|
153
153
|
}
|
|
154
154
|
] };
|
|
155
155
|
}
|
|
156
|
-
const Ut = /* @__PURE__ */
|
|
156
|
+
const Ut = /* @__PURE__ */ ae({
|
|
157
157
|
__name: "ConvertForm",
|
|
158
158
|
props: {
|
|
159
159
|
modelValue: {},
|
|
@@ -168,7 +168,7 @@ const Ut = /* @__PURE__ */ le({
|
|
|
168
168
|
}), n = C(() => {
|
|
169
169
|
var i;
|
|
170
170
|
return (i = f.rootValue) == null ? void 0 : i._id;
|
|
171
|
-
}), l = a, { t: o } =
|
|
171
|
+
}), l = a, { t: o } = ne(), c = C({
|
|
172
172
|
get() {
|
|
173
173
|
return !!f.modelValue;
|
|
174
174
|
},
|
|
@@ -193,23 +193,23 @@ const Ut = /* @__PURE__ */ le({
|
|
|
193
193
|
return i.measurement ? y.value.find((_) => _.value === i.measurement) ?? null : y.value.find((_) => _.value === null) ?? null;
|
|
194
194
|
});
|
|
195
195
|
return (i, _) => {
|
|
196
|
-
const
|
|
197
|
-
return g(),
|
|
196
|
+
const R = U("FmSwitch"), V = U("FmSelect"), F = U("FmCard");
|
|
197
|
+
return g(), D(F, {
|
|
198
198
|
variant: "outlined",
|
|
199
199
|
class: "p-16 flex flex-col gap-16"
|
|
200
200
|
}, {
|
|
201
201
|
default: S(() => {
|
|
202
202
|
var w, I;
|
|
203
203
|
return [
|
|
204
|
-
p(
|
|
204
|
+
p(R, {
|
|
205
205
|
value: "",
|
|
206
|
-
"model-value":
|
|
207
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
206
|
+
"model-value": c.value,
|
|
207
|
+
"onUpdate:modelValue": _[0] || (_[0] = (z) => c.value = z),
|
|
208
208
|
label: u(o)("inventory.ingredient.convertible.title"),
|
|
209
209
|
sublabel: u(o)("inventory.ingredient.convertible.subtitle"),
|
|
210
210
|
labelPlacement: "right"
|
|
211
211
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
212
|
-
|
|
212
|
+
c.value ? (g(), T(q, { key: 0 }, [
|
|
213
213
|
d("div", null, [
|
|
214
214
|
p(V, {
|
|
215
215
|
label: u(o)("inventory.ingredient.convertible.convertTo"),
|
|
@@ -225,7 +225,7 @@ const Ut = /* @__PURE__ */ le({
|
|
|
225
225
|
"exclude-binding-id": n.value,
|
|
226
226
|
rules: [u(ge)(1)]
|
|
227
227
|
}, null, 8, ["id", "model-value", "exclude-binding-id", "rules"])
|
|
228
|
-
], 64)) :
|
|
228
|
+
], 64)) : O("", !0)
|
|
229
229
|
];
|
|
230
230
|
}),
|
|
231
231
|
_: 1
|
|
@@ -233,7 +233,7 @@ const Ut = /* @__PURE__ */ le({
|
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
|
-
function
|
|
236
|
+
function re() {
|
|
237
237
|
return {
|
|
238
238
|
low: 6,
|
|
239
239
|
mid: 14
|
|
@@ -247,7 +247,7 @@ const $t = { class: "flex gap-8" }, Et = { class: "flex-1" }, Rt = { class: "fle
|
|
|
247
247
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
248
248
|
}, Bt = { class: "flex flex-col gap-12" }, Lt = { class: "flex flex-col gap-4" }, Nt = { class: "fm-typo-en-title-sm-800" }, zt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ht = { class: "flex flex-col gap-4" }, Ot = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, jt = { class: "flex-1 p-12 flex flex-col gap-8" }, Yt = { class: "mx-auto" }, Gt = { class: "flex flex-col" }, qt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, Wt = { class: "flex-1 p-12 flex flex-col gap-8" }, Kt = { class: "mx-auto" }, Jt = { class: "flex flex-col" }, Qt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, Xt = { class: "flex-1 p-12 flex flex-col gap-8" }, Zt = { class: "mx-auto" }, en = { class: "flex flex-col" }, tn = { class: "fm-typo-en-body-sm-600 translate-y-4" };
|
|
249
249
|
var Me = /* @__PURE__ */ ((r) => (r.Daily = "Daily", r.Consumables = "Consumables", r.ShortTerm = "Short term", r.Kitchen = "Kitchen", r))(Me || {});
|
|
250
|
-
const nn = /* @__PURE__ */
|
|
250
|
+
const nn = /* @__PURE__ */ ae({
|
|
251
251
|
__name: "IngredientForm",
|
|
252
252
|
props: {
|
|
253
253
|
mode: {},
|
|
@@ -256,220 +256,220 @@ const nn = /* @__PURE__ */ le({
|
|
|
256
256
|
},
|
|
257
257
|
emits: ["update:modelValue", "click:submit"],
|
|
258
258
|
setup(r, { expose: a, emit: f }) {
|
|
259
|
-
var
|
|
260
|
-
const { t: s } =
|
|
261
|
-
function h(
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
259
|
+
var X;
|
|
260
|
+
const { t: s } = ne(), n = r, l = f, o = te(), c = me(), y = qe();
|
|
261
|
+
function h(e) {
|
|
262
|
+
if (e.length === 0) return;
|
|
263
|
+
const t = e[0], m = n.modelValue ?? {
|
|
264
264
|
unit: o.units.find((x) => x)
|
|
265
265
|
};
|
|
266
|
-
|
|
266
|
+
m.unit || (m.unit = t, l("update:modelValue", m));
|
|
267
267
|
}
|
|
268
268
|
nt(() => {
|
|
269
269
|
h(o.units);
|
|
270
|
-
}), ze([() => o.units], ([
|
|
271
|
-
h(
|
|
270
|
+
}), ze([() => o.units], ([e]) => {
|
|
271
|
+
h(e);
|
|
272
272
|
});
|
|
273
273
|
function v() {
|
|
274
274
|
l("click:submit");
|
|
275
275
|
}
|
|
276
276
|
const b = C({
|
|
277
277
|
get() {
|
|
278
|
-
var
|
|
279
|
-
return ((
|
|
278
|
+
var e;
|
|
279
|
+
return ((e = n.modelValue) == null ? void 0 : e.code) ?? "";
|
|
280
280
|
},
|
|
281
|
-
set(
|
|
282
|
-
const
|
|
281
|
+
set(e) {
|
|
282
|
+
const t = n.modelValue ? {
|
|
283
283
|
...n.modelValue
|
|
284
284
|
} : {};
|
|
285
|
-
|
|
285
|
+
t.code = e, l("update:modelValue", t);
|
|
286
286
|
}
|
|
287
287
|
}), i = C({
|
|
288
288
|
get() {
|
|
289
|
-
var
|
|
290
|
-
return ((
|
|
289
|
+
var e;
|
|
290
|
+
return ((e = n.modelValue) == null ? void 0 : e.name) ?? "";
|
|
291
291
|
},
|
|
292
|
-
set(
|
|
293
|
-
const
|
|
292
|
+
set(e) {
|
|
293
|
+
const t = n.modelValue ? {
|
|
294
294
|
...n.modelValue
|
|
295
295
|
} : {};
|
|
296
|
-
|
|
296
|
+
t.name = e, l("update:modelValue", t);
|
|
297
297
|
}
|
|
298
298
|
}), _ = C({
|
|
299
299
|
get() {
|
|
300
|
-
var
|
|
301
|
-
const
|
|
302
|
-
return
|
|
300
|
+
var t, m;
|
|
301
|
+
const e = (m = (t = n.modelValue) == null ? void 0 : t.defaultCost) == null ? void 0 : m.costPerUnit;
|
|
302
|
+
return e ? +Ye(e) : 0;
|
|
303
303
|
},
|
|
304
|
-
set(
|
|
305
|
-
var
|
|
306
|
-
const
|
|
304
|
+
set(e) {
|
|
305
|
+
var m, x, $, M;
|
|
306
|
+
const t = n.modelValue ? {
|
|
307
307
|
...n.modelValue
|
|
308
308
|
} : {};
|
|
309
|
-
|
|
309
|
+
t.defaultCost ?? (t.defaultCost = {
|
|
310
310
|
costPerUnit: {
|
|
311
311
|
amount: 0,
|
|
312
312
|
precision: 2,
|
|
313
|
-
currency: ((
|
|
313
|
+
currency: ((m = be(c.currentCountry.value)) == null ? void 0 : m.currency) ?? "MYR"
|
|
314
314
|
},
|
|
315
|
-
measurement: (M = (
|
|
316
|
-
(
|
|
317
|
-
var
|
|
318
|
-
return
|
|
315
|
+
measurement: (M = ($ = (x = n.modelValue) == null ? void 0 : x.unit) == null ? void 0 : $.measurements) == null ? void 0 : M.find(
|
|
316
|
+
(G) => {
|
|
317
|
+
var Y;
|
|
318
|
+
return G.id === ((Y = n.modelValue) == null ? void 0 : Y.trackingMeasurement);
|
|
319
319
|
}
|
|
320
320
|
)
|
|
321
|
-
}),
|
|
322
|
-
...
|
|
323
|
-
...Ge(+
|
|
324
|
-
}, l("update:modelValue",
|
|
321
|
+
}), t.defaultCost.costPerUnit = {
|
|
322
|
+
...t.defaultCost.costPerUnit,
|
|
323
|
+
...Ge(+e, 4)
|
|
324
|
+
}, l("update:modelValue", t);
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
327
|
-
var
|
|
328
|
-
const
|
|
329
|
-
return
|
|
330
|
-
_id:
|
|
331
|
-
measurement: (
|
|
332
|
-
name: ((x =
|
|
326
|
+
}), R = C(() => {
|
|
327
|
+
var t, m, x;
|
|
328
|
+
const e = ((t = n.modelValue) == null ? void 0 : t.unit) ?? o.units.find(($) => $);
|
|
329
|
+
return e ? {
|
|
330
|
+
_id: e._id,
|
|
331
|
+
measurement: (m = n.modelValue) == null ? void 0 : m.trackingMeasurement,
|
|
332
|
+
name: ((x = e.measurements.find(($) => {
|
|
333
333
|
var M;
|
|
334
|
-
return
|
|
335
|
-
})) == null ? void 0 : x.name) ??
|
|
334
|
+
return $.id === ((M = n.modelValue) == null ? void 0 : M.trackingMeasurement);
|
|
335
|
+
})) == null ? void 0 : x.name) ?? e.name
|
|
336
336
|
} : null;
|
|
337
337
|
}), V = C({
|
|
338
338
|
get() {
|
|
339
|
-
var
|
|
340
|
-
return ((
|
|
339
|
+
var e;
|
|
340
|
+
return ((e = n.modelValue) == null ? void 0 : e.operationalGroup) ?? null;
|
|
341
341
|
},
|
|
342
|
-
set(
|
|
343
|
-
const
|
|
342
|
+
set(e) {
|
|
343
|
+
const t = n.modelValue ? {
|
|
344
344
|
...n.modelValue
|
|
345
345
|
} : {};
|
|
346
|
-
|
|
346
|
+
t.operationalGroup = e, l("update:modelValue", t);
|
|
347
347
|
}
|
|
348
348
|
}), F = C(
|
|
349
349
|
() => [
|
|
350
350
|
...new Set(
|
|
351
|
-
o.skus.map((
|
|
351
|
+
o.skus.map((e) => e.operationalGroup ?? "").filter((e) => e && !Object.values(Me).includes(e))
|
|
352
352
|
)
|
|
353
353
|
].sort()
|
|
354
354
|
), w = C({
|
|
355
355
|
get() {
|
|
356
356
|
return V.value !== null;
|
|
357
357
|
},
|
|
358
|
-
set(
|
|
359
|
-
|
|
358
|
+
set(e) {
|
|
359
|
+
e ? V.value = "" : V.value = null;
|
|
360
360
|
}
|
|
361
361
|
}), I = C(
|
|
362
|
-
() => o.units.flatMap(({ name:
|
|
362
|
+
() => o.units.flatMap(({ name: e, _id: t, abbrev: m, measurements: x }) => [
|
|
363
363
|
{
|
|
364
|
-
label: `${
|
|
364
|
+
label: `${e}`,
|
|
365
365
|
value: null,
|
|
366
366
|
displayAsSection: !0
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
|
-
label: `${
|
|
370
|
-
value: { _id:
|
|
369
|
+
label: `${e} (${m})`,
|
|
370
|
+
value: { _id: t },
|
|
371
371
|
displayAsSection: !1
|
|
372
372
|
},
|
|
373
|
-
...x.map(({ id:
|
|
374
|
-
label: `${M} (${
|
|
375
|
-
value: { _id:
|
|
373
|
+
...x.map(({ id: $, name: M, abbrev: G }) => ({
|
|
374
|
+
label: `${M} (${G})`,
|
|
375
|
+
value: { _id: t, measurement: $ },
|
|
376
376
|
displayAsSection: !1
|
|
377
377
|
}))
|
|
378
378
|
])
|
|
379
379
|
);
|
|
380
|
-
function
|
|
381
|
-
var
|
|
382
|
-
return ((
|
|
380
|
+
function z(e) {
|
|
381
|
+
var t, m, x, $, M;
|
|
382
|
+
return ((m = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : m._id) === ((x = e.value) == null ? void 0 : x._id) && (($ = n.modelValue) == null ? void 0 : $.trackingMeasurement) === ((M = e.value) == null ? void 0 : M.measurement);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
var
|
|
386
|
-
if (!
|
|
387
|
-
const { _id:
|
|
388
|
-
if (
|
|
384
|
+
function se(e) {
|
|
385
|
+
var G, Y;
|
|
386
|
+
if (!e) return;
|
|
387
|
+
const { _id: t, measurement: m } = e, x = m || void 0, $ = o.units.find((le) => le._id === t);
|
|
388
|
+
if (!$)
|
|
389
389
|
return;
|
|
390
390
|
const M = n.modelValue ?? {};
|
|
391
|
-
M.unit =
|
|
392
|
-
measurement:
|
|
391
|
+
M.unit = $, M.trackingMeasurement = x, M.convert && (M.convert.measurement = x || null), y.enableTotalCost && (M.defaultCost = {
|
|
392
|
+
measurement: $.measurements.find((le) => le.id === x),
|
|
393
393
|
costPerUnit: {
|
|
394
|
-
...((
|
|
394
|
+
...((G = M.defaultCost) == null ? void 0 : G.costPerUnit) ?? {
|
|
395
395
|
amount: 0,
|
|
396
396
|
precision: 2,
|
|
397
|
-
currency: ((
|
|
397
|
+
currency: ((Y = be(c.currentCountry.value)) == null ? void 0 : Y.currency) ?? "MYR"
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}), l("update:modelValue", M);
|
|
401
401
|
}
|
|
402
402
|
const ce = C({
|
|
403
403
|
get() {
|
|
404
|
-
var
|
|
405
|
-
return ((
|
|
404
|
+
var e;
|
|
405
|
+
return ((e = n.modelValue) == null ? void 0 : e.convert) ?? null;
|
|
406
406
|
},
|
|
407
|
-
set(
|
|
408
|
-
const
|
|
407
|
+
set(e) {
|
|
408
|
+
const t = n.modelValue ? {
|
|
409
409
|
...n.modelValue
|
|
410
410
|
} : {};
|
|
411
|
-
|
|
411
|
+
e ? t.convert = e : t.convert = null, l("update:modelValue", t);
|
|
412
412
|
}
|
|
413
|
-
}), _e = C(() =>
|
|
414
|
-
(
|
|
415
|
-
).map((
|
|
416
|
-
label: s(`inventory.ingredient.valuationMethod.${
|
|
417
|
-
value:
|
|
418
|
-
}))),
|
|
413
|
+
}), _e = C(() => de.options.filter(
|
|
414
|
+
(e) => e === de.enum.FIFO || e === de.enum.WAVG
|
|
415
|
+
).map((e) => ({
|
|
416
|
+
label: s(`inventory.ingredient.valuationMethod.${e}`),
|
|
417
|
+
value: e
|
|
418
|
+
}))), pe = C({
|
|
419
419
|
get() {
|
|
420
|
-
var
|
|
421
|
-
return ((
|
|
420
|
+
var e;
|
|
421
|
+
return ((e = n.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
|
|
422
422
|
},
|
|
423
|
-
set(
|
|
424
|
-
const
|
|
423
|
+
set(e) {
|
|
424
|
+
const t = n.modelValue ? {
|
|
425
425
|
...n.modelValue
|
|
426
426
|
} : {};
|
|
427
|
-
|
|
427
|
+
t.valuation = e, l("update:modelValue", t);
|
|
428
428
|
}
|
|
429
|
-
}),
|
|
429
|
+
}), J = N();
|
|
430
430
|
a({
|
|
431
431
|
validateInputs: () => {
|
|
432
|
-
var
|
|
433
|
-
(
|
|
432
|
+
var e, t;
|
|
433
|
+
(t = (e = J.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
|
|
434
434
|
},
|
|
435
435
|
resetInputsValidation: () => {
|
|
436
|
-
var
|
|
437
|
-
(
|
|
436
|
+
var e, t;
|
|
437
|
+
(t = (e = J.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
|
|
438
438
|
},
|
|
439
439
|
resetInputs: () => {
|
|
440
|
-
var
|
|
441
|
-
(
|
|
440
|
+
var e, t;
|
|
441
|
+
(t = (e = J.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
|
|
442
442
|
}
|
|
443
443
|
});
|
|
444
|
-
const W =
|
|
444
|
+
const W = N(!1), ve = C(
|
|
445
445
|
() => {
|
|
446
|
-
var
|
|
447
|
-
return (
|
|
446
|
+
var e, t, m;
|
|
447
|
+
return (e = n.modelValue) != null && e._id ? ((m = o.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : m.filter(
|
|
448
448
|
(x) => x.from === "INGREDIENT"
|
|
449
449
|
)) ?? [] : [];
|
|
450
450
|
}
|
|
451
|
-
),
|
|
451
|
+
), A = C(
|
|
452
452
|
() => {
|
|
453
|
-
var
|
|
454
|
-
return (
|
|
453
|
+
var e, t, m;
|
|
454
|
+
return (e = n.modelValue) != null && e._id ? ((m = o.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : m.filter(
|
|
455
455
|
(x) => x.from === "RECIPE"
|
|
456
456
|
)) ?? [] : [];
|
|
457
457
|
}
|
|
458
|
-
),
|
|
458
|
+
), E = C(
|
|
459
459
|
() => {
|
|
460
|
-
var
|
|
461
|
-
return (
|
|
460
|
+
var e, t, m;
|
|
461
|
+
return (e = n.modelValue) != null && e._id ? ((m = o.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : m.filter((x) => x.from === "MENU")) ?? [] : [];
|
|
462
462
|
}
|
|
463
|
-
),
|
|
464
|
-
() => o.skus.map((
|
|
465
|
-
),
|
|
466
|
-
function
|
|
467
|
-
var
|
|
468
|
-
const
|
|
469
|
-
|
|
463
|
+
), ie = C(
|
|
464
|
+
() => o.skus.map((e) => ({ label: e.name, value: e.code }))
|
|
465
|
+
), oe = N((X = n.modelValue) == null ? void 0 : X.code);
|
|
466
|
+
function ue(e) {
|
|
467
|
+
var m;
|
|
468
|
+
const t = e.el;
|
|
469
|
+
t && ((m = t.querySelector("[x-should-scroll-into=true]")) == null || m.scrollIntoView());
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
switch (
|
|
471
|
+
function P(e) {
|
|
472
|
+
switch (e) {
|
|
473
473
|
case Ve.MY:
|
|
474
474
|
return "MYR";
|
|
475
475
|
case Ve.SG:
|
|
@@ -480,82 +480,82 @@ const nn = /* @__PURE__ */ le({
|
|
|
480
480
|
return "MYR";
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const H = C(
|
|
484
484
|
() => {
|
|
485
|
-
var
|
|
486
|
-
return ((x = (
|
|
487
|
-
(
|
|
488
|
-
var
|
|
489
|
-
return
|
|
485
|
+
var e, t, m, x, $, M;
|
|
486
|
+
return ((x = (m = (t = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : m.find(
|
|
487
|
+
(G) => {
|
|
488
|
+
var Y;
|
|
489
|
+
return G.id === ((Y = n.modelValue) == null ? void 0 : Y.trackingMeasurement);
|
|
490
490
|
}
|
|
491
|
-
)) == null ? void 0 : x.abbrev) ?? ((M = (
|
|
491
|
+
)) == null ? void 0 : x.abbrev) ?? ((M = ($ = n.modelValue) == null ? void 0 : $.unit) == null ? void 0 : M.abbrev);
|
|
492
492
|
}
|
|
493
|
-
),
|
|
493
|
+
), Q = C({
|
|
494
494
|
get() {
|
|
495
|
-
var
|
|
496
|
-
return ((
|
|
495
|
+
var e, t;
|
|
496
|
+
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.low) ?? re().low;
|
|
497
497
|
},
|
|
498
|
-
set(
|
|
498
|
+
set(e) {
|
|
499
499
|
var x;
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
const
|
|
500
|
+
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? re();
|
|
501
|
+
t.low = e;
|
|
502
|
+
const m = n.modelValue ? {
|
|
503
503
|
...n.modelValue
|
|
504
504
|
} : {};
|
|
505
|
-
|
|
505
|
+
m.thresholds = t, l("update:modelValue", m);
|
|
506
506
|
}
|
|
507
|
-
}),
|
|
507
|
+
}), K = C({
|
|
508
508
|
get() {
|
|
509
|
-
var
|
|
510
|
-
return ((
|
|
509
|
+
var e, t;
|
|
510
|
+
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ?? re().mid;
|
|
511
511
|
},
|
|
512
|
-
set(
|
|
512
|
+
set(e) {
|
|
513
513
|
var x;
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
const
|
|
514
|
+
const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? re();
|
|
515
|
+
t.mid = e;
|
|
516
|
+
const m = n.modelValue ? {
|
|
517
517
|
...n.modelValue
|
|
518
518
|
} : {};
|
|
519
|
-
|
|
519
|
+
m.thresholds = t, l("update:modelValue", m);
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
522
|
function fe() {
|
|
523
|
-
return function(
|
|
524
|
-
return typeof (
|
|
523
|
+
return function(t) {
|
|
524
|
+
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;
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
|
-
return (
|
|
528
|
-
const
|
|
529
|
-
return g(),
|
|
530
|
-
disabled:
|
|
527
|
+
return (e, t) => {
|
|
528
|
+
const m = U("FmTextField"), x = U("FmLabel"), $ = U("FmField"), M = U("FmMenuHeader"), G = U("FmMenuDivider"), Y = U("FmMenuItem"), le = U("FmMenu"), Ie = U("FmFormGroup"), Xe = U("FmSelect"), Ue = U("FmSwitch"), Ze = U("FmIcon"), et = U("FmCard"), $e = U("FmStepperField"), tt = U("FmForm");
|
|
529
|
+
return g(), D(tt, {
|
|
530
|
+
disabled: e.disabled,
|
|
531
531
|
ref_key: "formRef",
|
|
532
|
-
ref:
|
|
532
|
+
ref: J,
|
|
533
533
|
class: "flex flex-col gap-32",
|
|
534
534
|
onValidationSuccess: v
|
|
535
535
|
}, {
|
|
536
536
|
default: S(() => [
|
|
537
537
|
d("div", $t, [
|
|
538
538
|
d("div", Et, [
|
|
539
|
-
p(
|
|
539
|
+
p(m, {
|
|
540
540
|
label: u(s)("inventory.ingredient.code"),
|
|
541
541
|
"model-value": b.value,
|
|
542
|
-
"onUpdate:modelValue":
|
|
543
|
-
rules: [u(xe)(), u(it)(
|
|
542
|
+
"onUpdate:modelValue": t[0] || (t[0] = (k) => b.value = k),
|
|
543
|
+
rules: [u(xe)(), u(it)(ie.value, oe.value)],
|
|
544
544
|
"label-mark": "required"
|
|
545
545
|
}, null, 8, ["label", "model-value", "rules"])
|
|
546
546
|
]),
|
|
547
547
|
d("div", Rt, [
|
|
548
|
-
p(
|
|
548
|
+
p(m, {
|
|
549
549
|
label: u(s)("inventory.ingredient.name"),
|
|
550
550
|
"model-value": i.value,
|
|
551
|
-
"onUpdate:modelValue":
|
|
551
|
+
"onUpdate:modelValue": t[1] || (t[1] = (k) => i.value = k),
|
|
552
552
|
rules: [u(xe)()],
|
|
553
553
|
"label-mark": "required"
|
|
554
554
|
}, null, 8, ["label", "model-value", "rules"])
|
|
555
555
|
])
|
|
556
556
|
]),
|
|
557
557
|
p(Ie, {
|
|
558
|
-
"model-value":
|
|
558
|
+
"model-value": R.value,
|
|
559
559
|
rules: [u(xe)()],
|
|
560
560
|
"label-mark": "required"
|
|
561
561
|
}, {
|
|
@@ -565,23 +565,23 @@ const nn = /* @__PURE__ */ le({
|
|
|
565
565
|
}, null, 8, ["label"])
|
|
566
566
|
]),
|
|
567
567
|
default: S(({ invalid: k }) => [
|
|
568
|
-
p(
|
|
568
|
+
p(le, null, {
|
|
569
569
|
"menu-button": S(() => [
|
|
570
|
-
p(
|
|
571
|
-
class:
|
|
570
|
+
p($, {
|
|
571
|
+
class: Z([
|
|
572
572
|
"fm-typo-en-body-lg-400",
|
|
573
573
|
{
|
|
574
|
-
"text-fm-color-typo-primary": !
|
|
575
|
-
"text-fm-color-typo-disabled":
|
|
574
|
+
"text-fm-color-typo-primary": !e.disabled,
|
|
575
|
+
"text-fm-color-typo-disabled": e.disabled
|
|
576
576
|
}
|
|
577
577
|
]),
|
|
578
578
|
invalid: k,
|
|
579
579
|
"append-icon": "expand_more"
|
|
580
580
|
}, {
|
|
581
581
|
default: S(() => {
|
|
582
|
-
var
|
|
582
|
+
var L;
|
|
583
583
|
return [
|
|
584
|
-
He(
|
|
584
|
+
He(B((L = R.value) == null ? void 0 : L.name), 1)
|
|
585
585
|
];
|
|
586
586
|
}),
|
|
587
587
|
_: 2
|
|
@@ -590,22 +590,22 @@ const nn = /* @__PURE__ */ le({
|
|
|
590
590
|
default: S(() => [
|
|
591
591
|
d("div", {
|
|
592
592
|
class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
|
|
593
|
-
onVnodeMounted:
|
|
593
|
+
onVnodeMounted: ue
|
|
594
594
|
}, [
|
|
595
|
-
(g(!0),
|
|
596
|
-
key:
|
|
595
|
+
(g(!0), T(q, null, ee(I.value, (L) => (g(), T(q, {
|
|
596
|
+
key: L.label
|
|
597
597
|
}, [
|
|
598
|
-
|
|
598
|
+
L.displayAsSection ? (g(), T(q, { key: 0 }, [
|
|
599
599
|
p(M, {
|
|
600
|
-
label:
|
|
600
|
+
label: L.label
|
|
601
601
|
}, null, 8, ["label"]),
|
|
602
|
-
p(
|
|
603
|
-
], 64)) : (g(),
|
|
602
|
+
p(G)
|
|
603
|
+
], 64)) : (g(), D(Y, {
|
|
604
604
|
key: 1,
|
|
605
|
-
label:
|
|
606
|
-
"model-value":
|
|
607
|
-
onClick: (Rn) =>
|
|
608
|
-
"x-should-scroll-into": `${
|
|
605
|
+
label: L.label,
|
|
606
|
+
"model-value": z(L),
|
|
607
|
+
onClick: (Rn) => se(L.value),
|
|
608
|
+
"x-should-scroll-into": `${z(L)}`
|
|
609
609
|
}, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
|
|
610
610
|
], 64))), 128))
|
|
611
611
|
], 512)
|
|
@@ -615,11 +615,11 @@ const nn = /* @__PURE__ */ le({
|
|
|
615
615
|
]),
|
|
616
616
|
_: 1
|
|
617
617
|
}, 8, ["model-value", "rules"]),
|
|
618
|
-
u(y).enableTotalCost ? (g(),
|
|
618
|
+
u(y).enableTotalCost ? (g(), D(Xe, {
|
|
619
619
|
key: 0,
|
|
620
620
|
class: "col-span-1",
|
|
621
|
-
"model-value":
|
|
622
|
-
"onUpdate:modelValue":
|
|
621
|
+
"model-value": pe.value,
|
|
622
|
+
"onUpdate:modelValue": t[2] || (t[2] = (k) => pe.value = k),
|
|
623
623
|
items: _e.value
|
|
624
624
|
}, {
|
|
625
625
|
label: S(() => [
|
|
@@ -633,11 +633,11 @@ const nn = /* @__PURE__ */ le({
|
|
|
633
633
|
})
|
|
634
634
|
]),
|
|
635
635
|
_: 1
|
|
636
|
-
}, 8, ["model-value", "items"])) :
|
|
637
|
-
u(y).enableTotalCost ? (g(),
|
|
636
|
+
}, 8, ["model-value", "items"])) : O("", !0),
|
|
637
|
+
u(y).enableTotalCost ? (g(), D(m, {
|
|
638
638
|
key: 1,
|
|
639
639
|
"model-value": _.value,
|
|
640
|
-
"onUpdate:modelValue":
|
|
640
|
+
"onUpdate:modelValue": t[3] || (t[3] = (k) => _.value = k),
|
|
641
641
|
rules: [u(ge)(0), u(ut)(4)]
|
|
642
642
|
}, {
|
|
643
643
|
label: S(() => [
|
|
@@ -651,16 +651,16 @@ const nn = /* @__PURE__ */ le({
|
|
|
651
651
|
})
|
|
652
652
|
]),
|
|
653
653
|
prepend: S(() => {
|
|
654
|
-
var k,
|
|
654
|
+
var k, L;
|
|
655
655
|
return [
|
|
656
|
-
d("div", At,
|
|
656
|
+
d("div", At, B(P(((k = u(c).currentCountry) == null ? void 0 : k.value) ?? u(Ae)) === "MYR" ? "RM" : P(((L = u(c).currentCountry) == null ? void 0 : L.value) ?? u(Ae))), 1)
|
|
657
657
|
];
|
|
658
658
|
}),
|
|
659
659
|
append: S(() => [
|
|
660
|
-
d("div", Dt, " / " +
|
|
660
|
+
d("div", Dt, " / " + B(H.value), 1)
|
|
661
661
|
]),
|
|
662
662
|
_: 1
|
|
663
|
-
}, 8, ["model-value", "rules"])) :
|
|
663
|
+
}, 8, ["model-value", "rules"])) : O("", !0),
|
|
664
664
|
p(et, {
|
|
665
665
|
variant: "outlined",
|
|
666
666
|
class: "p-16 flex flex-col gap-16"
|
|
@@ -669,17 +669,17 @@ const nn = /* @__PURE__ */ le({
|
|
|
669
669
|
p(Ue, {
|
|
670
670
|
value: "",
|
|
671
671
|
"model-value": w.value,
|
|
672
|
-
"onUpdate:modelValue":
|
|
672
|
+
"onUpdate:modelValue": t[4] || (t[4] = (k) => w.value = k),
|
|
673
673
|
label: u(s)("inventory.ingredient.operational.applyOperationalGroup"),
|
|
674
674
|
sublabel: u(s)("inventory.ingredient.operational.subtitle"),
|
|
675
675
|
labelPlacement: "right"
|
|
676
676
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
677
|
-
w.value ? (g(),
|
|
677
|
+
w.value ? (g(), D(le, { key: 0 }, {
|
|
678
678
|
"menu-button": S(() => [
|
|
679
|
-
p(
|
|
679
|
+
p(m, {
|
|
680
680
|
label: "Operational label",
|
|
681
681
|
modelValue: V.value,
|
|
682
|
-
"onUpdate:modelValue":
|
|
682
|
+
"onUpdate:modelValue": t[5] || (t[5] = (k) => V.value = k),
|
|
683
683
|
placeholder: "Input text or select preset"
|
|
684
684
|
}, {
|
|
685
685
|
append: S(() => [
|
|
@@ -692,89 +692,89 @@ const nn = /* @__PURE__ */ le({
|
|
|
692
692
|
]),
|
|
693
693
|
default: S(() => [
|
|
694
694
|
p(M, { label: "Preset" }),
|
|
695
|
-
(g(!0),
|
|
695
|
+
(g(!0), T(q, null, ee(Object.values(Me), (k) => (g(), D(Y, {
|
|
696
696
|
key: k,
|
|
697
697
|
label: k,
|
|
698
698
|
"model-value": V.value === k,
|
|
699
|
-
onClick: (
|
|
699
|
+
onClick: (L) => V.value = k
|
|
700
700
|
}, null, 8, ["label", "model-value", "onClick"]))), 128)),
|
|
701
|
-
F.value.length ? (g(),
|
|
701
|
+
F.value.length ? (g(), D(M, {
|
|
702
702
|
key: 0,
|
|
703
703
|
label: "Custom"
|
|
704
|
-
})) :
|
|
705
|
-
(g(!0),
|
|
704
|
+
})) : O("", !0),
|
|
705
|
+
(g(!0), T(q, null, ee(F.value, (k) => (g(), D(Y, {
|
|
706
706
|
key: k,
|
|
707
707
|
label: k,
|
|
708
708
|
"model-value": V.value === k,
|
|
709
|
-
onClick: (
|
|
709
|
+
onClick: (L) => V.value = k
|
|
710
710
|
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
711
711
|
]),
|
|
712
712
|
_: 1
|
|
713
|
-
})) :
|
|
713
|
+
})) : O("", !0)
|
|
714
714
|
]),
|
|
715
715
|
_: 1
|
|
716
716
|
}),
|
|
717
717
|
p(Ut, {
|
|
718
718
|
"model-value": ce.value,
|
|
719
|
-
"onUpdate:modelValue":
|
|
720
|
-
"root-value":
|
|
719
|
+
"onUpdate:modelValue": t[6] || (t[6] = (k) => ce.value = k),
|
|
720
|
+
"root-value": e.modelValue
|
|
721
721
|
}, null, 8, ["model-value", "root-value"]),
|
|
722
|
-
|
|
722
|
+
e.mode !== u(j).CREATE ? (g(), T("div", Pt, [
|
|
723
723
|
d("div", null, [
|
|
724
724
|
p(Ue, {
|
|
725
725
|
label: u(s)("inventory.ingredient.bindedItems.title"),
|
|
726
726
|
modelValue: W.value,
|
|
727
|
-
"onUpdate:modelValue":
|
|
727
|
+
"onUpdate:modelValue": t[7] || (t[7] = (k) => W.value = k),
|
|
728
728
|
"label-placement": "right"
|
|
729
729
|
}, null, 8, ["label", "modelValue"])
|
|
730
730
|
]),
|
|
731
|
-
W.value &&
|
|
731
|
+
W.value && ve.value.length ? (g(), D(we, {
|
|
732
732
|
key: 0,
|
|
733
733
|
name: u(s)("inventory.ingredient.bindedItems.ingredient"),
|
|
734
|
-
bindings:
|
|
735
|
-
}, null, 8, ["name", "bindings"])) :
|
|
736
|
-
W.value &&
|
|
734
|
+
bindings: ve.value
|
|
735
|
+
}, null, 8, ["name", "bindings"])) : O("", !0),
|
|
736
|
+
W.value && A.value.length ? (g(), D(we, {
|
|
737
737
|
key: 1,
|
|
738
738
|
name: u(s)("inventory.ingredient.bindedItems.recipe"),
|
|
739
|
-
bindings:
|
|
740
|
-
}, null, 8, ["name", "bindings"])) :
|
|
741
|
-
W.value &&
|
|
739
|
+
bindings: A.value
|
|
740
|
+
}, null, 8, ["name", "bindings"])) : O("", !0),
|
|
741
|
+
W.value && E.value.length ? (g(), D(we, {
|
|
742
742
|
key: 2,
|
|
743
743
|
name: u(s)("inventory.ingredient.bindedItems.menu"),
|
|
744
|
-
bindings:
|
|
745
|
-
}, null, 8, ["name", "bindings"])) :
|
|
746
|
-
])) :
|
|
744
|
+
bindings: E.value
|
|
745
|
+
}, null, 8, ["name", "bindings"])) : O("", !0)
|
|
746
|
+
])) : O("", !0),
|
|
747
747
|
d("div", Bt, [
|
|
748
748
|
d("div", Lt, [
|
|
749
749
|
p(Se, null, {
|
|
750
750
|
default: S(() => [
|
|
751
|
-
d("div", Nt,
|
|
751
|
+
d("div", Nt, B(u(s)("inventory.ingredient.threshold.title")), 1)
|
|
752
752
|
]),
|
|
753
753
|
_: 1
|
|
754
754
|
}),
|
|
755
|
-
d("div", zt,
|
|
755
|
+
d("div", zt, B(u(s)("inventory.ingredient.threshold.subtitle")), 1)
|
|
756
756
|
]),
|
|
757
757
|
d("div", Ht, [
|
|
758
758
|
p(Ie, {
|
|
759
|
-
"model-value": { low:
|
|
759
|
+
"model-value": { low: Q.value, mid: K.value },
|
|
760
760
|
rules: [fe()]
|
|
761
761
|
}, null, 8, ["model-value", "rules"]),
|
|
762
762
|
d("div", Ot, [
|
|
763
763
|
d("div", jt, [
|
|
764
764
|
d("div", Yt, [
|
|
765
765
|
p(ke, {
|
|
766
|
-
days:
|
|
766
|
+
days: Q.value,
|
|
767
767
|
level: u(Ce).low
|
|
768
768
|
}, null, 8, ["days", "level"])
|
|
769
769
|
]),
|
|
770
770
|
d("div", Gt, [
|
|
771
|
-
d("div", qt,
|
|
771
|
+
d("div", qt, B(u(s)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
772
772
|
p($e, {
|
|
773
|
-
modelValue:
|
|
774
|
-
"onUpdate:modelValue":
|
|
773
|
+
modelValue: Q.value,
|
|
774
|
+
"onUpdate:modelValue": t[8] || (t[8] = (k) => Q.value = k),
|
|
775
775
|
rules: [u(ge)(0)]
|
|
776
776
|
}, {
|
|
777
|
-
append: S(() =>
|
|
777
|
+
append: S(() => t[10] || (t[10] = [
|
|
778
778
|
d("div", {
|
|
779
779
|
class: "text-fm-color-typo-secondary",
|
|
780
780
|
style: { "padding-right": "32px" }
|
|
@@ -784,7 +784,7 @@ const nn = /* @__PURE__ */ le({
|
|
|
784
784
|
}, 8, ["modelValue", "rules"])
|
|
785
785
|
])
|
|
786
786
|
]),
|
|
787
|
-
|
|
787
|
+
t[12] || (t[12] = d("div", {
|
|
788
788
|
class: "h-full bg-fm-color-neutral-gray-200 relative",
|
|
789
789
|
style: { width: "1px" }
|
|
790
790
|
}, [
|
|
@@ -796,18 +796,18 @@ const nn = /* @__PURE__ */ le({
|
|
|
796
796
|
d("div", Wt, [
|
|
797
797
|
d("div", Kt, [
|
|
798
798
|
p(ke, {
|
|
799
|
-
days:
|
|
799
|
+
days: K.value,
|
|
800
800
|
level: u(Ce).mid
|
|
801
801
|
}, null, 8, ["days", "level"])
|
|
802
802
|
]),
|
|
803
803
|
d("div", Jt, [
|
|
804
|
-
d("div", Qt,
|
|
804
|
+
d("div", Qt, B(u(s)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
805
805
|
p($e, {
|
|
806
|
-
modelValue:
|
|
807
|
-
"onUpdate:modelValue":
|
|
806
|
+
modelValue: K.value,
|
|
807
|
+
"onUpdate:modelValue": t[9] || (t[9] = (k) => K.value = k),
|
|
808
808
|
rules: [u(ge)(0)]
|
|
809
809
|
}, {
|
|
810
|
-
append: S(() =>
|
|
810
|
+
append: S(() => t[11] || (t[11] = [
|
|
811
811
|
d("div", {
|
|
812
812
|
class: "text-fm-color-typo-secondary",
|
|
813
813
|
style: { "padding-right": "32px" }
|
|
@@ -817,7 +817,7 @@ const nn = /* @__PURE__ */ le({
|
|
|
817
817
|
}, 8, ["modelValue", "rules"])
|
|
818
818
|
])
|
|
819
819
|
]),
|
|
820
|
-
|
|
820
|
+
t[13] || (t[13] = d("div", {
|
|
821
821
|
class: "h-full bg-fm-color-neutral-gray-200 relative",
|
|
822
822
|
style: { width: "1px" }
|
|
823
823
|
}, [
|
|
@@ -829,12 +829,12 @@ const nn = /* @__PURE__ */ le({
|
|
|
829
829
|
d("div", Xt, [
|
|
830
830
|
d("div", Zt, [
|
|
831
831
|
p(ke, {
|
|
832
|
-
days:
|
|
832
|
+
days: K.value + 1,
|
|
833
833
|
level: u(Ce).high
|
|
834
834
|
}, null, 8, ["days", "level"])
|
|
835
835
|
]),
|
|
836
836
|
d("div", en, [
|
|
837
|
-
d("div", tn,
|
|
837
|
+
d("div", tn, B(u(s)("inventory.ingredient.threshold.stockIsStaple")), 1)
|
|
838
838
|
])
|
|
839
839
|
])
|
|
840
840
|
])
|
|
@@ -845,36 +845,36 @@ const nn = /* @__PURE__ */ le({
|
|
|
845
845
|
}, 8, ["disabled"]);
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
}), on = { class: "flex gap-4" }, ln = /* @__PURE__ */
|
|
848
|
+
}), on = { class: "flex gap-4" }, ln = /* @__PURE__ */ ae({
|
|
849
849
|
__name: "IngredientDialog",
|
|
850
850
|
props: {
|
|
851
851
|
show: { type: Boolean },
|
|
852
852
|
unit: {},
|
|
853
|
-
mode: { default:
|
|
853
|
+
mode: { default: j.READ }
|
|
854
854
|
},
|
|
855
855
|
emits: ["update:show"],
|
|
856
856
|
setup(r) {
|
|
857
|
-
const a = r, f =
|
|
857
|
+
const a = r, f = te(), s = he(), { t: n } = ne(), l = Te(a, "show"), o = Te(a, "unit"), c = C(() => {
|
|
858
858
|
switch (a.mode) {
|
|
859
|
-
case
|
|
859
|
+
case j.READ:
|
|
860
860
|
return "";
|
|
861
|
-
case
|
|
861
|
+
case j.UPDATE:
|
|
862
862
|
return n("inventory.ingredient.update.title");
|
|
863
|
-
case
|
|
863
|
+
case j.CREATE:
|
|
864
864
|
return n("inventory.ingredient.create.title");
|
|
865
865
|
}
|
|
866
866
|
return "";
|
|
867
867
|
}), y = C(() => {
|
|
868
868
|
switch (a.mode) {
|
|
869
|
-
case
|
|
869
|
+
case j.READ:
|
|
870
870
|
return "";
|
|
871
|
-
case
|
|
871
|
+
case j.UPDATE:
|
|
872
872
|
return n("common.save");
|
|
873
|
-
case
|
|
873
|
+
case j.CREATE:
|
|
874
874
|
return n("common.add");
|
|
875
875
|
}
|
|
876
876
|
return "";
|
|
877
|
-
}), h =
|
|
877
|
+
}), h = N(), v = N(!1);
|
|
878
878
|
async function b() {
|
|
879
879
|
v.value = !0;
|
|
880
880
|
try {
|
|
@@ -915,22 +915,22 @@ const nn = /* @__PURE__ */ le({
|
|
|
915
915
|
var V, F;
|
|
916
916
|
(F = (V = h.value) == null ? void 0 : V.validateInputs) == null || F.call(V);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function R() {
|
|
919
919
|
switch (a.mode) {
|
|
920
|
-
case
|
|
920
|
+
case j.READ:
|
|
921
921
|
return;
|
|
922
|
-
case
|
|
922
|
+
case j.UPDATE:
|
|
923
923
|
return i();
|
|
924
|
-
case
|
|
924
|
+
case j.CREATE:
|
|
925
925
|
return b();
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
return (V, F) => {
|
|
929
929
|
const w = U("FmButton"), I = U("FmSideSheet");
|
|
930
|
-
return g(),
|
|
930
|
+
return g(), D(I, {
|
|
931
931
|
"model-value": u(l),
|
|
932
|
-
"onUpdate:modelValue": F[3] || (F[3] = (
|
|
933
|
-
header:
|
|
932
|
+
"onUpdate:modelValue": F[3] || (F[3] = (z) => Ee(l) ? l.value = z : null),
|
|
933
|
+
header: c.value,
|
|
934
934
|
"close-button": "",
|
|
935
935
|
"dismiss-away": "",
|
|
936
936
|
"max-width": 500
|
|
@@ -946,7 +946,7 @@ const nn = /* @__PURE__ */ le({
|
|
|
946
946
|
disabled: v.value,
|
|
947
947
|
label: u(n)("common.close"),
|
|
948
948
|
variant: "tertiary",
|
|
949
|
-
onClick: F[2] || (F[2] = (
|
|
949
|
+
onClick: F[2] || (F[2] = (z) => l.value = !1)
|
|
950
950
|
}, null, 8, ["disabled", "label"])
|
|
951
951
|
])
|
|
952
952
|
]),
|
|
@@ -956,10 +956,10 @@ const nn = /* @__PURE__ */ le({
|
|
|
956
956
|
ref_key: "hasValidationExpose",
|
|
957
957
|
ref: h,
|
|
958
958
|
modelValue: u(o),
|
|
959
|
-
"onUpdate:modelValue": F[0] || (F[0] = (
|
|
959
|
+
"onUpdate:modelValue": F[0] || (F[0] = (z) => Ee(o) ? o.value = z : null),
|
|
960
960
|
mode: V.mode,
|
|
961
961
|
disabled: v.value,
|
|
962
|
-
"onClick:submit": F[1] || (F[1] = (
|
|
962
|
+
"onClick:submit": F[1] || (F[1] = (z) => R())
|
|
963
963
|
}, null, 8, ["modelValue", "mode", "disabled"])
|
|
964
964
|
]),
|
|
965
965
|
_: 1
|
|
@@ -989,12 +989,12 @@ function dn(r) {
|
|
|
989
989
|
return {
|
|
990
990
|
code: r.code,
|
|
991
991
|
name: r.name,
|
|
992
|
-
unit: ((f = r.unit.measurements.find((
|
|
992
|
+
unit: ((f = r.unit.measurements.find((c) => c.id === r.trackingMeasurement)) == null ? void 0 : f.abbrev) ?? r.unit.abbrev,
|
|
993
993
|
baseUnit: r.unit.abbrev,
|
|
994
994
|
valuationMethod: r.valuation ?? "WAVG",
|
|
995
995
|
pricePerUnit: (s = r.defaultCost) != null && s.costPerUnit ? +Ye((n = r.defaultCost) == null ? void 0 : n.costPerUnit) : 0,
|
|
996
|
-
thresholdLow: ((l = r.thresholds) == null ? void 0 : l.low) ??
|
|
997
|
-
thresholdMid: ((o = r.thresholds) == null ? void 0 : o.mid) ??
|
|
996
|
+
thresholdLow: ((l = r.thresholds) == null ? void 0 : l.low) ?? re().low,
|
|
997
|
+
thresholdMid: ((o = r.thresholds) == null ? void 0 : o.mid) ?? re().mid
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
1000
|
function Qe() {
|
|
@@ -1016,7 +1016,7 @@ function Qe() {
|
|
|
1016
1016
|
id: "baseUnit",
|
|
1017
1017
|
name: "Base unit"
|
|
1018
1018
|
}
|
|
1019
|
-
], a = qe(), f =
|
|
1019
|
+
], a = qe(), f = me(), s = be(f.currentCountry.value);
|
|
1020
1020
|
return a.enableTotalCost && r.push(
|
|
1021
1021
|
{
|
|
1022
1022
|
id: "valuationMethod",
|
|
@@ -1037,25 +1037,25 @@ function Qe() {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
), r;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const a =
|
|
1040
|
+
function mn() {
|
|
1041
|
+
const a = te().skus.map(dn), s = me().currentBusiness.value, n = Qe(), l = [
|
|
1042
1042
|
["Business name:", s == null ? void 0 : s.name],
|
|
1043
1043
|
["Business ID:", s == null ? void 0 : s._id],
|
|
1044
1044
|
["Menu version", s == null ? void 0 : s.menuVersion],
|
|
1045
1045
|
[],
|
|
1046
1046
|
n.map((h) => h.name),
|
|
1047
1047
|
...a.map((h) => n.map((v) => h[v.id]))
|
|
1048
|
-
], o = n.map((h) => `system:${h.id}`),
|
|
1049
|
-
return Je(
|
|
1048
|
+
], o = n.map((h) => `system:${h.id}`), c = Ke(l, o), y = `${s == null ? void 0 : s.name} ingredients (${dt(/* @__PURE__ */ new Date())}).xlsx`;
|
|
1049
|
+
return Je(c, y), y;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
const a =
|
|
1051
|
+
function cn() {
|
|
1052
|
+
const a = me().currentBusiness.value, f = Qe(), s = [
|
|
1053
1053
|
["Business name:", a == null ? void 0 : a.name],
|
|
1054
1054
|
["Business ID:", a == null ? void 0 : a._id],
|
|
1055
1055
|
["Menu version", a == null ? void 0 : a.menuVersion],
|
|
1056
1056
|
[],
|
|
1057
|
-
f.map((
|
|
1058
|
-
], n = f.map((
|
|
1057
|
+
f.map((c) => c.name)
|
|
1058
|
+
], n = f.map((c) => `system:${c.id}`), l = Ke(s, n), o = "FeedMe ingredients template.xlsx";
|
|
1059
1059
|
return Je(l, o), o;
|
|
1060
1060
|
}
|
|
1061
1061
|
function pn(r) {
|
|
@@ -1066,7 +1066,7 @@ function pn(r) {
|
|
|
1066
1066
|
n,
|
|
1067
1067
|
l,
|
|
1068
1068
|
o,
|
|
1069
|
-
...
|
|
1069
|
+
...c
|
|
1070
1070
|
] = St(r);
|
|
1071
1071
|
if (!a || !a.length || a.some((i) => i.length && !i.startsWith("system:")))
|
|
1072
1072
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
@@ -1075,44 +1075,44 @@ function pn(r) {
|
|
|
1075
1075
|
throw new Error(
|
|
1076
1076
|
`Missing meta headers (${v.join()}). Excel file does not come from the template.`
|
|
1077
1077
|
);
|
|
1078
|
-
return
|
|
1079
|
-
const
|
|
1078
|
+
return c.map((i, _) => {
|
|
1079
|
+
const R = {};
|
|
1080
1080
|
for (const V in y) {
|
|
1081
1081
|
const F = y[V];
|
|
1082
|
-
Object.assign(
|
|
1082
|
+
Object.assign(R, { [F]: i[V] });
|
|
1083
1083
|
}
|
|
1084
1084
|
return {
|
|
1085
1085
|
index: _,
|
|
1086
|
-
data:
|
|
1086
|
+
data: R
|
|
1087
1087
|
};
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
function Le(r, a, f) {
|
|
1091
1091
|
var w;
|
|
1092
|
-
const n =
|
|
1092
|
+
const n = te().units, l = new Array(), o = f.filter((I) => I.data.code === r.code);
|
|
1093
1093
|
o.length > 1 && l.push(
|
|
1094
1094
|
`Code ${r.code} is already used in row ${o.map((I) => I.index + 6).join()}.`
|
|
1095
1095
|
);
|
|
1096
|
-
const
|
|
1097
|
-
if (!
|
|
1096
|
+
const c = n.find((I) => I.abbrev === r.baseUnit), y = c == null ? void 0 : c.measurements.find((I) => I.abbrev === r.unit);
|
|
1097
|
+
if (!c)
|
|
1098
1098
|
l.push(`Cannot find base unit of symbol ${r.baseUnit}.`);
|
|
1099
1099
|
else if (r.baseUnit !== r.unit && !y) {
|
|
1100
1100
|
const I = `Cannot find unit conversion for ${r.baseUnit} with symbol ${r.unit || "[empty]"}.`;
|
|
1101
1101
|
l.push(I);
|
|
1102
1102
|
}
|
|
1103
|
-
const h =
|
|
1103
|
+
const h = de.options.find(
|
|
1104
1104
|
(I) => I === r.valuationMethod
|
|
1105
1105
|
);
|
|
1106
1106
|
r.valuationMethod && !h && l.push(
|
|
1107
|
-
`Expected valuation method to be one of ${
|
|
1107
|
+
`Expected valuation method to be one of ${de.options.join()} but got ${r.valuationMethod} instead.`
|
|
1108
1108
|
);
|
|
1109
|
-
const b =
|
|
1109
|
+
const b = me().currentCountry.value, i = (I) => `${I}`.length && ct()(I) === !0, _ = i(`${r.pricePerUnit}`) === !0 ? {
|
|
1110
1110
|
costPerUnit: {
|
|
1111
1111
|
...Ge(Number(r.pricePerUnit) || 0),
|
|
1112
1112
|
currency: ((w = be(b)) == null ? void 0 : w.currency) ?? "MYR"
|
|
1113
1113
|
},
|
|
1114
1114
|
measurement: y
|
|
1115
|
-
} : void 0,
|
|
1115
|
+
} : void 0, R = i(`${r.thresholdLow}`) && i(`${r.thresholdMid}`) ? {
|
|
1116
1116
|
low: Number(r.thresholdLow) || 0,
|
|
1117
1117
|
mid: Number(r.thresholdMid) || 0
|
|
1118
1118
|
} : void 0;
|
|
@@ -1122,11 +1122,11 @@ function Le(r, a, f) {
|
|
|
1122
1122
|
_id: sn(),
|
|
1123
1123
|
code: r.code,
|
|
1124
1124
|
name: r.name,
|
|
1125
|
-
unit:
|
|
1125
|
+
unit: c ?? n.find((I) => I) ?? un,
|
|
1126
1126
|
trackingMeasurement: y == null ? void 0 : y.id,
|
|
1127
1127
|
valuation: h,
|
|
1128
1128
|
defaultCost: _,
|
|
1129
|
-
thresholds:
|
|
1129
|
+
thresholds: R
|
|
1130
1130
|
},
|
|
1131
1131
|
errors: l,
|
|
1132
1132
|
excelRowNumber: a + 6
|
|
@@ -1134,7 +1134,7 @@ function Le(r, a, f) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
function vn(r) {
|
|
1136
1136
|
try {
|
|
1137
|
-
const a = pn(r).filter((h) => h.data.code), s =
|
|
1137
|
+
const a = pn(r).filter((h) => h.data.code), s = te().skus, n = mt(s, "code"), l = a.filter((h) => !n[h.data.code]), o = a.filter((h) => n[h.data.code]), c = l.map(
|
|
1138
1138
|
(h) => Le(h.data, h.index, a)
|
|
1139
1139
|
), y = o.map((h) => {
|
|
1140
1140
|
const v = Le(h.data, h.index, a), b = n[h.data.code];
|
|
@@ -1157,7 +1157,7 @@ function vn(r) {
|
|
|
1157
1157
|
});
|
|
1158
1158
|
return {
|
|
1159
1159
|
invalidExcel: !1,
|
|
1160
|
-
importCreateResult:
|
|
1160
|
+
importCreateResult: c,
|
|
1161
1161
|
importUpdateResult: y
|
|
1162
1162
|
};
|
|
1163
1163
|
} catch (a) {
|
|
@@ -1172,7 +1172,7 @@ function vn(r) {
|
|
|
1172
1172
|
const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-col" }, gn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, bn = {
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1175
|
-
}, hn = { key: 0 }, Ne = /* @__PURE__ */
|
|
1175
|
+
}, hn = { key: 0 }, Ne = /* @__PURE__ */ ae({
|
|
1176
1176
|
__name: "ImportIngredientItem",
|
|
1177
1177
|
props: {
|
|
1178
1178
|
type: {},
|
|
@@ -1183,23 +1183,23 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1183
1183
|
setup(r) {
|
|
1184
1184
|
return (a, f) => {
|
|
1185
1185
|
const s = U("FmIcon"), n = U("FmTooltip");
|
|
1186
|
-
return g(),
|
|
1186
|
+
return g(), T("div", fn, [
|
|
1187
1187
|
f[0] || (f[0] = d("div", null, "•", -1)),
|
|
1188
1188
|
d("div", yn, [
|
|
1189
1189
|
d("div", gn, [
|
|
1190
1190
|
d("div", {
|
|
1191
|
-
class:
|
|
1191
|
+
class: Z({
|
|
1192
1192
|
"text-fm-color-system-error-300": a.errors.length
|
|
1193
1193
|
})
|
|
1194
1194
|
}, [
|
|
1195
|
-
He(
|
|
1196
|
-
a.type === "create" ? (g(),
|
|
1195
|
+
He(B(a.name) + " ", 1),
|
|
1196
|
+
a.type === "create" ? (g(), T("span", bn, "(new)")) : O("", !0)
|
|
1197
1197
|
], 2),
|
|
1198
|
-
a.errors.length ? (g(),
|
|
1198
|
+
a.errors.length ? (g(), T("div", hn, [
|
|
1199
1199
|
p(n, { "z-index": 50 }, {
|
|
1200
1200
|
content: S(() => [
|
|
1201
1201
|
d("ol", null, [
|
|
1202
|
-
(g(!0),
|
|
1202
|
+
(g(!0), T(q, null, ee(a.errors, (l, o) => (g(), T("li", { key: o }, B(l), 1))), 128))
|
|
1203
1203
|
])
|
|
1204
1204
|
]),
|
|
1205
1205
|
default: S(() => [
|
|
@@ -1211,17 +1211,17 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1211
1211
|
]),
|
|
1212
1212
|
_: 1
|
|
1213
1213
|
})
|
|
1214
|
-
])) :
|
|
1214
|
+
])) : O("", !0)
|
|
1215
1215
|
]),
|
|
1216
1216
|
d("div", {
|
|
1217
|
-
class:
|
|
1217
|
+
class: Z([
|
|
1218
1218
|
"fm-typo-en-body-sm-400",
|
|
1219
1219
|
{
|
|
1220
1220
|
"text-fm-color-system-error-200": a.errors.length,
|
|
1221
1221
|
"text-fm-color-typo-secondary": !a.errors.length
|
|
1222
1222
|
}
|
|
1223
1223
|
])
|
|
1224
|
-
},
|
|
1224
|
+
}, B(a.code), 3)
|
|
1225
1225
|
])
|
|
1226
1226
|
]);
|
|
1227
1227
|
};
|
|
@@ -1235,33 +1235,33 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1235
1235
|
}, Sn = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Fn = {
|
|
1236
1236
|
key: 0,
|
|
1237
1237
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
1238
|
-
}, Mn = { class: "fm-typo-en-body-lg-600" }, In = /* @__PURE__ */
|
|
1238
|
+
}, Mn = { class: "fm-typo-en-body-lg-600" }, In = /* @__PURE__ */ ae({
|
|
1239
1239
|
__name: "ImportIngredients",
|
|
1240
1240
|
setup(r) {
|
|
1241
|
-
const a =
|
|
1242
|
-
() => !!l.value.length || o.value.some((i) => i.errors.length) ||
|
|
1241
|
+
const a = N(null), f = vt(), s = he(), n = N(!1), l = N(new Array()), o = N([]), c = N([]), y = C(
|
|
1242
|
+
() => !!l.value.length || o.value.some((i) => i.errors.length) || c.value.some((i) => i.errors.length)
|
|
1243
1243
|
), h = C(
|
|
1244
|
-
() => !!o.value.length || !!
|
|
1245
|
-
), { t: v } =
|
|
1244
|
+
() => !!o.value.length || !!c.value.length
|
|
1245
|
+
), { t: v } = ne();
|
|
1246
1246
|
async function b(i) {
|
|
1247
|
-
l.value = [], o.value = [],
|
|
1247
|
+
l.value = [], o.value = [], c.value = [];
|
|
1248
1248
|
try {
|
|
1249
1249
|
n.value = !0;
|
|
1250
1250
|
const [_] = await Promise.all([
|
|
1251
1251
|
Ft(i),
|
|
1252
1252
|
// fake buffer
|
|
1253
1253
|
new Promise((F) => setTimeout(F, 1e3))
|
|
1254
|
-
]),
|
|
1255
|
-
if (!
|
|
1254
|
+
]), R = _.SheetNames.find((F) => F);
|
|
1255
|
+
if (!R) {
|
|
1256
1256
|
l.value.push(v("inventory.ingredient.import.fileError.noSheet"));
|
|
1257
1257
|
return;
|
|
1258
1258
|
}
|
|
1259
|
-
const V = vn(_.Sheets[
|
|
1259
|
+
const V = vn(_.Sheets[R]);
|
|
1260
1260
|
if (V.invalidExcel) {
|
|
1261
1261
|
l.value.push(V.invalidExcelMessage ?? v("inventory.ingredient.import.fileError.invalidExcel"));
|
|
1262
1262
|
return;
|
|
1263
1263
|
}
|
|
1264
|
-
if (o.value = V.importCreateResult,
|
|
1264
|
+
if (o.value = V.importCreateResult, c.value = V.importUpdateResult, !o.value.length && !c.value.length) {
|
|
1265
1265
|
l.value.push(v("inventory.ingredient.import.fileError.noData"));
|
|
1266
1266
|
return;
|
|
1267
1267
|
}
|
|
@@ -1282,11 +1282,11 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1282
1282
|
return ze(a, (i) => {
|
|
1283
1283
|
i && b(i);
|
|
1284
1284
|
}), (i, _) => {
|
|
1285
|
-
const
|
|
1286
|
-
return g(),
|
|
1287
|
-
d("div", xn,
|
|
1285
|
+
const R = U("FmCircularProgress"), V = U("FmIcon"), F = U("FmButton");
|
|
1286
|
+
return g(), T("div", _n, [
|
|
1287
|
+
d("div", xn, B(u(v)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1288
1288
|
p(Mt, {
|
|
1289
|
-
class:
|
|
1289
|
+
class: Z({
|
|
1290
1290
|
"w-full": !0,
|
|
1291
1291
|
"h-[200px]": !a.value
|
|
1292
1292
|
}),
|
|
@@ -1300,7 +1300,7 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1300
1300
|
fn: S(({ openFileDialog: w }) => [
|
|
1301
1301
|
d("div", Vn, [
|
|
1302
1302
|
d("div", {
|
|
1303
|
-
class:
|
|
1303
|
+
class: Z([
|
|
1304
1304
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
1305
1305
|
{
|
|
1306
1306
|
"border border-fm-color-neutral-gray-100": n.value,
|
|
@@ -1309,18 +1309,18 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1309
1309
|
}
|
|
1310
1310
|
])
|
|
1311
1311
|
}, [
|
|
1312
|
-
n.value ? (g(),
|
|
1312
|
+
n.value ? (g(), D(R, {
|
|
1313
1313
|
key: 0,
|
|
1314
1314
|
size: "md",
|
|
1315
1315
|
color: "neutral-gray-200"
|
|
1316
|
-
})) : (g(),
|
|
1316
|
+
})) : (g(), D(V, {
|
|
1317
1317
|
key: 1,
|
|
1318
1318
|
name: y.value ? "error" : "attach_file",
|
|
1319
1319
|
outline: "",
|
|
1320
1320
|
color: y.value ? "system-error-300" : void 0
|
|
1321
1321
|
}, null, 8, ["name", "color"])),
|
|
1322
1322
|
d("div", {
|
|
1323
|
-
class:
|
|
1323
|
+
class: Z([
|
|
1324
1324
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
1325
1325
|
{
|
|
1326
1326
|
"text-fm-color-typo-disabled": n.value,
|
|
@@ -1328,9 +1328,9 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1328
1328
|
}
|
|
1329
1329
|
])
|
|
1330
1330
|
}, [
|
|
1331
|
-
d("div", kn,
|
|
1331
|
+
d("div", kn, B(a.value.name), 1)
|
|
1332
1332
|
], 2),
|
|
1333
|
-
n.value ?
|
|
1333
|
+
n.value ? O("", !0) : (g(), T("div", Cn, [
|
|
1334
1334
|
p(F, {
|
|
1335
1335
|
label: u(v)("inventory.ingredient.import.replaceFile"),
|
|
1336
1336
|
variant: y.value ? "destructive" : "secondary",
|
|
@@ -1339,9 +1339,9 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1339
1339
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
1340
1340
|
]))
|
|
1341
1341
|
], 2),
|
|
1342
|
-
l.value.length ? (g(),
|
|
1343
|
-
(g(!0),
|
|
1344
|
-
key:
|
|
1342
|
+
l.value.length ? (g(), T("div", wn, [
|
|
1343
|
+
(g(!0), T(q, null, ee(l.value, (I, z) => (g(), T("div", {
|
|
1344
|
+
key: z,
|
|
1345
1345
|
class: "flex gap-8 items-center"
|
|
1346
1346
|
}, [
|
|
1347
1347
|
p(V, {
|
|
@@ -1349,47 +1349,49 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1349
1349
|
size: "sm",
|
|
1350
1350
|
color: "system-error-300"
|
|
1351
1351
|
}),
|
|
1352
|
-
d("div", Sn,
|
|
1352
|
+
d("div", Sn, B(I), 1)
|
|
1353
1353
|
]))), 128))
|
|
1354
|
-
])) :
|
|
1354
|
+
])) : O("", !0)
|
|
1355
1355
|
])
|
|
1356
1356
|
]),
|
|
1357
1357
|
key: "0"
|
|
1358
1358
|
} : void 0
|
|
1359
1359
|
]), 1032, ["class", "label", "button-label"]),
|
|
1360
|
-
h.value ? (g(),
|
|
1361
|
-
d("div", Mn,
|
|
1362
|
-
(g(!0),
|
|
1360
|
+
h.value ? (g(), T("div", Fn, [
|
|
1361
|
+
d("div", Mn, B(u(v)("inventory.ingredient.import.summary")), 1),
|
|
1362
|
+
(g(!0), T(q, null, ee(o.value, (w) => (g(), D(Ne, {
|
|
1363
1363
|
key: w.sku._id,
|
|
1364
1364
|
code: w.sku.code,
|
|
1365
1365
|
name: w.sku.name,
|
|
1366
1366
|
errors: w.errors,
|
|
1367
1367
|
type: "create"
|
|
1368
1368
|
}, null, 8, ["code", "name", "errors"]))), 128)),
|
|
1369
|
-
(g(!0),
|
|
1369
|
+
(g(!0), T(q, null, ee(c.value, (w) => (g(), D(Ne, {
|
|
1370
1370
|
key: w.sku._id,
|
|
1371
1371
|
code: w.sku.code,
|
|
1372
1372
|
name: w.sku.name,
|
|
1373
1373
|
errors: w.errors,
|
|
1374
1374
|
type: "update"
|
|
1375
1375
|
}, null, 8, ["code", "name", "errors"]))), 128))
|
|
1376
|
-
])) :
|
|
1376
|
+
])) : O("", !0)
|
|
1377
1377
|
]);
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
-
}), Un = { class: "flex flex-col py-8" }, $n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, En = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wn = /* @__PURE__ */
|
|
1380
|
+
}), Un = { class: "flex flex-col py-8" }, $n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, En = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wn = /* @__PURE__ */ ae({
|
|
1381
1381
|
__name: "IngredientsView",
|
|
1382
1382
|
setup(r) {
|
|
1383
|
-
const a =
|
|
1384
|
-
function i(
|
|
1385
|
-
switch (
|
|
1383
|
+
const a = te(), f = C(() => a.skus), s = pt(), n = We(), l = he(), { t: o } = ne(), { createIngredient: c, updateIngredient: y } = Fe(), { ingredientDialogProps: h, ingredientViewLoading: v } = ht(Fe()), { columnDefs: b } = It();
|
|
1384
|
+
function i(A) {
|
|
1385
|
+
switch (A) {
|
|
1386
1386
|
case "add":
|
|
1387
|
-
return
|
|
1387
|
+
return c();
|
|
1388
1388
|
case "import":
|
|
1389
|
-
return
|
|
1389
|
+
return W();
|
|
1390
|
+
case "export":
|
|
1391
|
+
return J();
|
|
1390
1392
|
}
|
|
1391
1393
|
}
|
|
1392
|
-
const _ =
|
|
1394
|
+
const _ = N(""), R = N(!1), V = C(() => R.value || v.value), { breakpoints: F } = ft(), w = C(() => F.value.xs || F.value.sm), I = C(() => w.value ? 10 : 20), z = Vt(), se = N(!1), ce = [
|
|
1393
1395
|
{
|
|
1394
1396
|
value: "import",
|
|
1395
1397
|
label: o("common.import")
|
|
@@ -1399,34 +1401,33 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1399
1401
|
label: o("common.export")
|
|
1400
1402
|
}
|
|
1401
1403
|
];
|
|
1402
|
-
function _e(
|
|
1403
|
-
switch (
|
|
1404
|
+
function _e(A) {
|
|
1405
|
+
switch (se.value = !1, A) {
|
|
1404
1406
|
case "import":
|
|
1405
|
-
return re();
|
|
1406
|
-
case "export":
|
|
1407
1407
|
return W();
|
|
1408
|
+
case "export":
|
|
1409
|
+
return J();
|
|
1408
1410
|
}
|
|
1409
1411
|
}
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
const E = cn();
|
|
1412
|
+
const pe = C(() => [
|
|
1413
|
+
{
|
|
1414
|
+
label: o("inventory.ingredient.create.title"),
|
|
1415
|
+
value: "add",
|
|
1416
|
+
isPrimary: !0,
|
|
1417
|
+
prependIcon: "add"
|
|
1418
|
+
},
|
|
1419
|
+
{ label: o("common.import"), value: "import" },
|
|
1420
|
+
{ label: o("common.export"), value: "export" }
|
|
1421
|
+
]);
|
|
1422
|
+
function J() {
|
|
1423
|
+
const A = mn();
|
|
1423
1424
|
l.open({
|
|
1424
1425
|
title: o("inventory.ingredient.export.success"),
|
|
1425
|
-
message: o("inventory.ingredient.export.filename", [
|
|
1426
|
+
message: o("inventory.ingredient.export.filename", [A]),
|
|
1426
1427
|
type: "success"
|
|
1427
1428
|
});
|
|
1428
1429
|
}
|
|
1429
|
-
function
|
|
1430
|
+
function W() {
|
|
1430
1431
|
n.open({
|
|
1431
1432
|
title: o("inventory.ingredient.import.title"),
|
|
1432
1433
|
contentComponent: In,
|
|
@@ -1445,15 +1446,15 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1445
1446
|
close: !1,
|
|
1446
1447
|
variant: "plain"
|
|
1447
1448
|
}
|
|
1448
|
-
}).onPrimary((
|
|
1449
|
-
if (!
|
|
1449
|
+
}).onPrimary((A) => {
|
|
1450
|
+
if (!A) {
|
|
1450
1451
|
l.open({
|
|
1451
1452
|
title: o("inventory.ingredient.import.error.noData"),
|
|
1452
1453
|
type: "error"
|
|
1453
1454
|
});
|
|
1454
1455
|
return;
|
|
1455
1456
|
}
|
|
1456
|
-
if (!
|
|
1457
|
+
if (!A.importCreateResult.length && !A.importUpdateResult.length) {
|
|
1457
1458
|
l.open({
|
|
1458
1459
|
title: o("inventory.ingredient.import.error.invalidContent"),
|
|
1459
1460
|
message: o("inventory.ingredient.import.error.noImportData"),
|
|
@@ -1461,7 +1462,7 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1461
1462
|
});
|
|
1462
1463
|
return;
|
|
1463
1464
|
}
|
|
1464
|
-
if (
|
|
1465
|
+
if (A.importCreateResult.some((E) => E.errors.length) || A.importUpdateResult.some((E) => E.errors.length)) {
|
|
1465
1466
|
l.open({
|
|
1466
1467
|
title: o("inventory.ingredient.import.error.invalidContent"),
|
|
1467
1468
|
message: o("inventory.ingredient.import.error.hasErrors"),
|
|
@@ -1469,57 +1470,54 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1469
1470
|
});
|
|
1470
1471
|
return;
|
|
1471
1472
|
}
|
|
1472
|
-
n.close(),
|
|
1473
|
-
}).onTertiary(
|
|
1473
|
+
n.close(), ve(A);
|
|
1474
|
+
}).onTertiary(cn);
|
|
1474
1475
|
}
|
|
1475
|
-
async function
|
|
1476
|
-
|
|
1476
|
+
async function ve(A) {
|
|
1477
|
+
R.value = !0;
|
|
1477
1478
|
try {
|
|
1478
|
-
const
|
|
1479
|
-
...
|
|
1480
|
-
...
|
|
1481
|
-
],
|
|
1482
|
-
let
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1479
|
+
const E = [
|
|
1480
|
+
...A.importCreateResult.map(({ sku: P }) => ({ type: "create", sku: P })),
|
|
1481
|
+
...A.importUpdateResult.map(({ sku: P }) => ({ type: "update", sku: P }))
|
|
1482
|
+
], ie = 100;
|
|
1483
|
+
let oe = 0;
|
|
1484
|
+
const ue = () => {
|
|
1485
|
+
oe += ie, l.open({
|
|
1485
1486
|
title: o("inventory.ingredient.import.progress", [
|
|
1486
|
-
Math.min(
|
|
1487
|
-
|
|
1487
|
+
Math.min(oe, E.length),
|
|
1488
|
+
E.length
|
|
1488
1489
|
])
|
|
1489
1490
|
});
|
|
1490
1491
|
};
|
|
1491
|
-
for (const
|
|
1492
|
-
|
|
1493
|
-
create:
|
|
1494
|
-
update:
|
|
1492
|
+
for (const P of E.chunk(100))
|
|
1493
|
+
ue(), await a.importSkus({
|
|
1494
|
+
create: P.filter((H) => H.type === "create").map((H) => H.sku),
|
|
1495
|
+
update: P.filter((H) => H.type === "update").map((H) => H.sku)
|
|
1495
1496
|
});
|
|
1496
1497
|
l.open({
|
|
1497
1498
|
title: o("inventory.ingredient.import.success"),
|
|
1498
1499
|
type: "success"
|
|
1499
1500
|
});
|
|
1500
|
-
} catch (
|
|
1501
|
+
} catch (E) {
|
|
1501
1502
|
l.open({
|
|
1502
1503
|
title: o("inventory.ingredient.import.error.failed"),
|
|
1503
|
-
message: o("inventory.ingredient.import.error.systemMessage", [
|
|
1504
|
+
message: o("inventory.ingredient.import.error.systemMessage", [E == null ? void 0 : E.message]),
|
|
1504
1505
|
type: "error"
|
|
1505
|
-
}), console.error("Error in importing skus",
|
|
1506
|
+
}), console.error("Error in importing skus", A, E);
|
|
1506
1507
|
} finally {
|
|
1507
|
-
|
|
1508
|
+
R.value = !1;
|
|
1508
1509
|
}
|
|
1509
1510
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
return (E, $) => {
|
|
1514
|
-
const ae = U("FmTable"), K = U("FmCollapsibleTabs"), se = U("FmBottomSheet");
|
|
1515
|
-
return g(), T(kt, {
|
|
1511
|
+
return (A, E) => {
|
|
1512
|
+
const ie = U("FmTable"), oe = U("FmCollapsibleTabs"), ue = U("FmBottomSheet");
|
|
1513
|
+
return g(), D(kt, {
|
|
1516
1514
|
title: u(o)("inventory.ingredient.title"),
|
|
1517
|
-
actions:
|
|
1515
|
+
actions: pe.value,
|
|
1518
1516
|
"onClick:action": i
|
|
1519
1517
|
}, {
|
|
1520
1518
|
default: S(() => [
|
|
1521
1519
|
d("div", {
|
|
1522
|
-
class:
|
|
1520
|
+
class: Z([
|
|
1523
1521
|
"flex flex-col gap-8 max-h-full",
|
|
1524
1522
|
{
|
|
1525
1523
|
"p-0": w.value,
|
|
@@ -1530,38 +1528,37 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1530
1528
|
p(Ct, {
|
|
1531
1529
|
searchable: "",
|
|
1532
1530
|
search: _.value,
|
|
1533
|
-
"onUpdate:search":
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
style: ot(u(j).tableHeight),
|
|
1531
|
+
"onUpdate:search": E[0] || (E[0] = (P) => _.value = P)
|
|
1532
|
+
}, null, 8, ["search"]),
|
|
1533
|
+
p(ie, {
|
|
1534
|
+
style: ot(u(z).tableHeight),
|
|
1538
1535
|
"column-defs": u(b),
|
|
1539
1536
|
"row-data": f.value,
|
|
1540
1537
|
"search-value": _.value,
|
|
1541
1538
|
loading: !u(s)._currentLocation || V.value,
|
|
1542
1539
|
"loading-text": "Loading",
|
|
1543
|
-
onRowClick:
|
|
1540
|
+
onRowClick: E[1] || (E[1] = (P) => u(y)(P.original)),
|
|
1544
1541
|
"page-size": I.value
|
|
1545
1542
|
}, {
|
|
1546
|
-
"list-row": S((
|
|
1543
|
+
"list-row": S((P) => [
|
|
1547
1544
|
p(xt, {
|
|
1548
|
-
row:
|
|
1545
|
+
row: P,
|
|
1549
1546
|
onRowClick: u(y)
|
|
1550
1547
|
}, Oe({
|
|
1551
|
-
default: S((
|
|
1552
|
-
var
|
|
1548
|
+
default: S((H) => {
|
|
1549
|
+
var Q, K, fe, X, e, t, m, x, $, M;
|
|
1553
1550
|
return [
|
|
1554
1551
|
d("div", Un, [
|
|
1555
1552
|
d("div", $n, [
|
|
1556
1553
|
p(u(Be), {
|
|
1557
|
-
render: (
|
|
1558
|
-
props: (
|
|
1554
|
+
render: (fe = (K = (Q = H.code) == null ? void 0 : Q.column) == null ? void 0 : K.columnDef) == null ? void 0 : fe.cell,
|
|
1555
|
+
props: (e = (X = H.code) == null ? void 0 : X.getContext) == null ? void 0 : e.call(X)
|
|
1559
1556
|
}, null, 8, ["render", "props"])
|
|
1560
1557
|
]),
|
|
1561
1558
|
d("div", En, [
|
|
1562
1559
|
p(u(Be), {
|
|
1563
|
-
render: (
|
|
1564
|
-
props: (
|
|
1560
|
+
render: (x = (m = (t = H.name) == null ? void 0 : t.column) == null ? void 0 : m.columnDef) == null ? void 0 : x.cell,
|
|
1561
|
+
props: (M = ($ = H.name) == null ? void 0 : $.getContext) == null ? void 0 : M.call($)
|
|
1565
1562
|
}, null, 8, ["render", "props"])
|
|
1566
1563
|
])
|
|
1567
1564
|
])
|
|
@@ -1569,10 +1566,10 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1569
1566
|
}),
|
|
1570
1567
|
_: 2
|
|
1571
1568
|
}, [
|
|
1572
|
-
|
|
1569
|
+
R.value ? {
|
|
1573
1570
|
name: "loading-text",
|
|
1574
1571
|
fn: S(() => [
|
|
1575
|
-
d("div", null,
|
|
1572
|
+
d("div", null, B(u(o)("inventory.ingredient.table.importing")), 1)
|
|
1576
1573
|
]),
|
|
1577
1574
|
key: "0"
|
|
1578
1575
|
} : void 0
|
|
@@ -1581,20 +1578,20 @@ const fn = { class: "flex items-center gap-12 pl-8" }, yn = { class: "flex flex-
|
|
|
1581
1578
|
_: 1
|
|
1582
1579
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
1583
1580
|
], 2),
|
|
1584
|
-
(g(),
|
|
1581
|
+
(g(), D(Re, { to: "body" }, [
|
|
1585
1582
|
p(ln, lt(rt(u(h))), null, 16)
|
|
1586
1583
|
])),
|
|
1587
|
-
(g(),
|
|
1588
|
-
p(
|
|
1584
|
+
(g(), D(Re, { to: "body" }, [
|
|
1585
|
+
p(ue, {
|
|
1589
1586
|
"dismiss-away": "",
|
|
1590
|
-
modelValue:
|
|
1591
|
-
"onUpdate:modelValue":
|
|
1587
|
+
modelValue: se.value,
|
|
1588
|
+
"onUpdate:modelValue": E[3] || (E[3] = (P) => se.value = P)
|
|
1592
1589
|
}, {
|
|
1593
1590
|
default: S(() => [
|
|
1594
|
-
p(
|
|
1591
|
+
p(oe, {
|
|
1595
1592
|
class: "pb-8",
|
|
1596
1593
|
items: ce,
|
|
1597
|
-
"onUpdate:modelValue":
|
|
1594
|
+
"onUpdate:modelValue": E[2] || (E[2] = (P) => _e(P))
|
|
1598
1595
|
})
|
|
1599
1596
|
]),
|
|
1600
1597
|
_: 1
|