@feedmepos/mf-inventory-portal 1.2.7-dev.5 → 1.2.7-dev.6
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-D-KXb_V4.js → App-B4nreEjd.js} +1 -1
- package/dist/{ApprovalView-CsKOxurA.js → ApprovalView-BEWmetGr.js} +2 -2
- package/dist/{BindingsDialog-kjERSnxa.js → BindingsDialog-CV5CHq0A.js} +2 -2
- package/dist/{BindingsPicker-EVKOOG5B.js → BindingsPicker-CJ6YuIO_.js} +1 -1
- package/dist/{BindingsTable-B1JqtkAz.js → BindingsTable-B5qmvSON.js} +1 -1
- package/dist/{ClosingDraftView-DHMT4v-d.js → ClosingDraftView-DcYrPHmC.js} +2 -2
- package/dist/{ClosingTemplateView-BOkJvuFp.js → ClosingTemplateView-DBX9DLF2.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CPKPeJQI.js → DeliveryOrderPrintPreview-Dd8Z_oJX.js} +1 -1
- package/dist/{FmAdminBadge-pU1X5Yn4.js → FmAdminBadge-nUE-Uwkt.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BqmttydS.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRTPdSjq.js} +3 -3
- package/dist/{FmMultiselectDialog-CwqvhCpx.js → FmMultiselectDialog-6NnaNM69.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dbej6KBu.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BAM0Fl5H.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-XjYJ03c6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BifABTYI.js} +1 -1
- package/dist/{IngredientGroupView-Dj1wbUXi.js → IngredientGroupView-DHFOfraH.js} +2 -2
- package/dist/{IngredientsView-B7AKdwz5.js → IngredientsView-DhhgIHK9.js} +166 -163
- package/dist/{IntegrationView-Dyb-shZZ.js → IntegrationView-FZQO-eq9.js} +4 -4
- package/dist/{InventoryBindingForm-8Mo0N4ti.js → InventoryBindingForm-Cv8_IjGu.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-3Q8zHn_i.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CpysGFX-.js} +3 -3
- package/dist/{InventoryBindingSummary-B9-I5Jo_.js → InventoryBindingSummary-DoMDUnzN.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-8vhGMGrt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBy4cZIn.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B-wDdcG4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DtWphfCy.js} +1 -1
- package/dist/{PublishView-BsTvJ-rb.js → PublishView-rGpWxJ2Z.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B4S020Dy.js → PurchaseOrderPrintPreview-Ca-uCoOs.js} +1 -1
- package/dist/{ReceiveRequestView-BpH2TvAE.js → ReceiveRequestView-gZWPn8W7.js} +8 -8
- package/dist/{RecipeView-CnE96AES.js → RecipeView-CgED4XAg.js} +3 -3
- package/dist/{StockView-DSxsDKW2.js → StockView-BykTXP3X.js} +8 -8
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bc0fwGq2.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-pWaVz8ye.js} +1 -1
- package/dist/{SupplierView-Cv-FJVM7.js → SupplierView-BMNRQEX6.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DDnhftMb.js → TransferDetails.vue_vue_type_script_setup_true_lang-V9gy4pr6.js} +6 -6
- package/dist/{TransferTemplateView-CpguVi60.js → TransferTemplateView-DnWZ18yS.js} +7 -7
- package/dist/{UnitView-CbtWqtXO.js → UnitView-BO6nG93s.js} +3 -3
- package/dist/{WarehouseView-JYKSCpwD.js → WarehouseView-CEk4yyoz.js} +1 -1
- package/dist/{app-CoQo_jq8.js → app-ps5buMDz.js} +14 -14
- package/dist/app.js +1 -1
- package/dist/{decimal-IHcKpXSH.js → decimal-Bw7W8Rls.js} +1 -1
- package/dist/{format-unit-display-I8vKcqcG.js → format-unit-display-Br364rNI.js} +3 -3
- package/dist/{index-Dr4zDNEV.js → index-BXYkTV1E.js} +1 -1
- package/dist/{index-C5WsQ8SM.js → index-D0OpdgKo.js} +1 -1
- package/dist/{purchase-order-template-R8t_fJYZ.js → purchase-order-template-Cs5hlug7.js} +1 -1
- package/dist/{stock-BRaT53YB.js → stock-CNXehEEm.js} +1 -1
- package/dist/{supplier-C6KmsrC2.js → supplier-Cr40xpgh.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DkjF8Xtg.js → use-ingredient-select-dialog-DCD-eQNb.js} +1 -1
- package/dist/{use-inventory-binding-dialog-mzDIl-dW.js → use-inventory-binding-dialog-CFqlEVQS.js} +1 -1
- package/package.json +2 -2
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { ref as D, h as Y, defineComponent as ge, computed as k, resolveComponent as I, openBlock as
|
|
2
|
-
import { a as ce, e as
|
|
1
|
+
import { ref as D, h as Y, defineComponent as ge, computed as k, resolveComponent as I, openBlock as g, createBlock as B, withCtx as x, createVNode as p, unref as a, createElementBlock as E, Fragment as re, createElementVNode as i, createCommentVNode as L, renderSlot as Fe, createTextVNode as We, toDisplayString as R, normalizeClass as ue, mergeModels as ot, onMounted as Pt, watch as gt, useModel as Ot, renderList as ye, isRef as lt, createSlots as bt, normalizeStyle as Bt, Teleport as at, normalizeProps as Dt, guardReactiveProps as Nt } from "vue";
|
|
2
|
+
import { a as ce, e as j, f as ht, S as zt, b as De, h as Lt, D as st, i as Re, A as Oe, j as _t, k as xt, l as Be, t as kt, m as jt, n as Ee, o as Ne, U as Ht, p as Wt, M as Yt, q as rt, r as it, c as Vt, s as ut, v as dt, w as qt, x as ct, y as wt, z as Gt, B as St, C as Kt, E as Jt, I as Qt, G as Zt, H as Xt, N as en, J as tn, u as nn, K as on, _ as ln, L as an, O as sn, P as mt, Q as rn } from "./app-ps5buMDz.js";
|
|
3
3
|
import { useDialog as Ye, useSnackbar as $e, components as Pe, useProxiedModel as pt, useDialogChild as un, useBreakpoints as dn } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as cn, _ as mn } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { useI18n as be, useCoreStore as Ue } from "@feedmepos/mf-common";
|
|
6
6
|
import { defineStore as pn, storeToRefs as vn } from "pinia";
|
|
7
|
-
import { g as fn, _ as ze, S as Le, a as yn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as gn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as je } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { g as fn, _ as ze, S as Le, a as yn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-pWaVz8ye.js";
|
|
8
|
+
import { _ as gn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CpysGFX-.js";
|
|
9
|
+
import { _ as je } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-BifABTYI.js";
|
|
10
10
|
import { _ as ke } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { _ as bn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
12
|
-
import { u as Tt } from "./purchase-order-template-
|
|
12
|
+
import { u as Tt } from "./purchase-order-template-Cs5hlug7.js";
|
|
13
13
|
import { r as hn } from "./random-CSbEbElR.js";
|
|
14
14
|
import "./array-Ca8T3f_G.js";
|
|
15
|
-
import { u as _n } from "./FmMultiselectDialog-
|
|
15
|
+
import { u as _n } from "./FmMultiselectDialog-6NnaNM69.js";
|
|
16
16
|
const He = pn("ingredientForm", function() {
|
|
17
|
-
const o = Ye(), v = $e(), l = ce(), d = D(!1), { t: y } = be(),
|
|
17
|
+
const o = Ye(), v = $e(), l = ce(), d = D(!1), { t: y } = be(), b = D();
|
|
18
18
|
function t() {
|
|
19
19
|
const s = {
|
|
20
20
|
unit: {},
|
|
21
|
-
mode:
|
|
21
|
+
mode: j.CREATE,
|
|
22
22
|
show: !0,
|
|
23
23
|
"onUpdate:show"(m) {
|
|
24
|
-
|
|
24
|
+
b.value.show = m;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
b.value = s;
|
|
28
28
|
}
|
|
29
29
|
async function u(s) {
|
|
30
30
|
const m = {
|
|
31
31
|
unit: ht(s),
|
|
32
|
-
mode:
|
|
32
|
+
mode: j.UPDATE,
|
|
33
33
|
show: !0,
|
|
34
34
|
"onUpdate:show"(_) {
|
|
35
|
-
|
|
35
|
+
b.value.show = _;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
b.value = m;
|
|
39
39
|
}
|
|
40
40
|
async function c(s) {
|
|
41
41
|
d.value = !0;
|
|
@@ -86,7 +86,7 @@ const He = pn("ingredientForm", function() {
|
|
|
86
86
|
createIngredient: t,
|
|
87
87
|
updateIngredient: u,
|
|
88
88
|
deleteIngredient: f,
|
|
89
|
-
ingredientDialogProps:
|
|
89
|
+
ingredientDialogProps: b,
|
|
90
90
|
ingredientViewLoading: d
|
|
91
91
|
};
|
|
92
92
|
});
|
|
@@ -180,7 +180,7 @@ function xn() {
|
|
|
180
180
|
enableSorting: !0
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
|
-
accessorKey: "
|
|
183
|
+
accessorKey: "netsuiteSubsidiary",
|
|
184
184
|
header: () => "NetSuite Subsidiary",
|
|
185
185
|
cell(t) {
|
|
186
186
|
const u = t.row.original, { includeChildren: c, subsidiaryNames: f } = l.getSkuSubsidiaries(u._id);
|
|
@@ -193,7 +193,7 @@ function xn() {
|
|
|
193
193
|
{
|
|
194
194
|
class: "flex-auto line-clamp-2 text-ellipsis break-all whitespace-pre-wrap"
|
|
195
195
|
},
|
|
196
|
-
f
|
|
196
|
+
f.join(", ")
|
|
197
197
|
),
|
|
198
198
|
content: () => Y("div", { class: "flex flex-col" }, [
|
|
199
199
|
Y("div", { class: "font-semibold" }, [
|
|
@@ -265,7 +265,7 @@ const kn = /* @__PURE__ */ ge({
|
|
|
265
265
|
}), d = k(() => {
|
|
266
266
|
var m;
|
|
267
267
|
return (m = v.rootValue) == null ? void 0 : m._id;
|
|
268
|
-
}), y = o, { t:
|
|
268
|
+
}), y = o, { t: b } = be(), t = k({
|
|
269
269
|
get() {
|
|
270
270
|
return !!v.modelValue;
|
|
271
271
|
},
|
|
@@ -290,8 +290,8 @@ const kn = /* @__PURE__ */ ge({
|
|
|
290
290
|
return m.measurement ? u.value.find((_) => _.value === m.measurement) ?? null : u.value.find((_) => _.value === null) ?? null;
|
|
291
291
|
});
|
|
292
292
|
return (m, _) => {
|
|
293
|
-
const N = I("FmSwitch"),
|
|
294
|
-
return
|
|
293
|
+
const N = I("FmSwitch"), $ = I("FmSelect"), U = I("FmCard");
|
|
294
|
+
return g(), B(U, {
|
|
295
295
|
variant: "outlined",
|
|
296
296
|
class: "p-16 flex flex-col gap-16"
|
|
297
297
|
}, {
|
|
@@ -302,15 +302,15 @@ const kn = /* @__PURE__ */ ge({
|
|
|
302
302
|
value: "",
|
|
303
303
|
"model-value": t.value,
|
|
304
304
|
"onUpdate:modelValue": _[0] || (_[0] = (C) => t.value = C),
|
|
305
|
-
label: a(
|
|
306
|
-
sublabel: a(
|
|
305
|
+
label: a(b)("inventory.ingredient.convertible.title"),
|
|
306
|
+
sublabel: a(b)("inventory.ingredient.convertible.subtitle"),
|
|
307
307
|
labelPlacement: "right",
|
|
308
308
|
disabled: m.readonly
|
|
309
309
|
}, null, 8, ["model-value", "label", "sublabel", "disabled"]),
|
|
310
|
-
t.value ? (
|
|
310
|
+
t.value ? (g(), E(re, { key: 0 }, [
|
|
311
311
|
i("div", null, [
|
|
312
|
-
p(
|
|
313
|
-
label: a(
|
|
312
|
+
p($, {
|
|
313
|
+
label: a(b)("inventory.ingredient.convertible.convertTo"),
|
|
314
314
|
modelValue: (P = s.value) == null ? void 0 : P.value,
|
|
315
315
|
"onUpdate:modelValue": c,
|
|
316
316
|
items: u.value,
|
|
@@ -325,7 +325,7 @@ const kn = /* @__PURE__ */ ge({
|
|
|
325
325
|
rules: [a(Oe)(1)],
|
|
326
326
|
readonly: m.readonly
|
|
327
327
|
}, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
|
|
328
|
-
], 64)) :
|
|
328
|
+
], 64)) : L("", !0)
|
|
329
329
|
];
|
|
330
330
|
}),
|
|
331
331
|
_: 1
|
|
@@ -356,8 +356,8 @@ const Vn = {
|
|
|
356
356
|
},
|
|
357
357
|
setup(r) {
|
|
358
358
|
return (o, v) => {
|
|
359
|
-
const l = I("FmLabel"), d = I("FmIcon"), y = I("FmTooltip"),
|
|
360
|
-
return o.locked ? (
|
|
359
|
+
const l = I("FmLabel"), d = I("FmIcon"), y = I("FmTooltip"), b = I("FmField");
|
|
360
|
+
return o.locked ? (g(), E("div", Vn, [
|
|
361
361
|
Fe(o.$slots, "label", {}, () => [
|
|
362
362
|
p(l, {
|
|
363
363
|
label: o.label,
|
|
@@ -365,9 +365,9 @@ const Vn = {
|
|
|
365
365
|
}, null, 8, ["label", "disabled"])
|
|
366
366
|
]),
|
|
367
367
|
Fe(o.$slots, "field", {}, () => [
|
|
368
|
-
p(
|
|
368
|
+
p(b, { disabled: o.disabled }, {
|
|
369
369
|
prepend: x(() => [
|
|
370
|
-
o.tooltipMessage ? (
|
|
370
|
+
o.tooltipMessage ? (g(), B(y, {
|
|
371
371
|
key: 0,
|
|
372
372
|
placement: o.tooltipPlacement,
|
|
373
373
|
"z-index": o.tooltipZIndex
|
|
@@ -382,7 +382,7 @@ const Vn = {
|
|
|
382
382
|
})
|
|
383
383
|
]),
|
|
384
384
|
_: 1
|
|
385
|
-
}, 8, ["placement", "z-index"])) : (
|
|
385
|
+
}, 8, ["placement", "z-index"])) : (g(), B(d, {
|
|
386
386
|
key: 1,
|
|
387
387
|
name: "lock",
|
|
388
388
|
color: "neutral-gray-400"
|
|
@@ -447,9 +447,9 @@ const Vn = {
|
|
|
447
447
|
var qe;
|
|
448
448
|
const { t: l } = be(), d = Ye();
|
|
449
449
|
$e();
|
|
450
|
-
const y = Tt(),
|
|
450
|
+
const y = Tt(), b = _t(), t = r, u = v, c = ce(), f = Ue(), s = Vt(), m = De(), _ = k(() => m.isEnabled);
|
|
451
451
|
D(void 0);
|
|
452
|
-
const N = D([]),
|
|
452
|
+
const N = D([]), $ = D([]), U = D(!1);
|
|
453
453
|
function P(e) {
|
|
454
454
|
if (e.length === 0) return;
|
|
455
455
|
const n = e[0], h = t.modelValue ?? {
|
|
@@ -458,7 +458,7 @@ const Vn = {
|
|
|
458
458
|
h.unit || (h.unit = n, u("update:modelValue", h));
|
|
459
459
|
}
|
|
460
460
|
Pt(() => {
|
|
461
|
-
P(c.units), s.mustUsePoTemplate && t.mode ===
|
|
461
|
+
P(c.units), s.mustUsePoTemplate && t.mode === j.CREATE && C(), s.enableWastageTemplate && t.mode === j.CREATE && we();
|
|
462
462
|
}), gt([() => c.units], ([e]) => {
|
|
463
463
|
P(e);
|
|
464
464
|
});
|
|
@@ -466,7 +466,7 @@ const Vn = {
|
|
|
466
466
|
u("click:submit");
|
|
467
467
|
}
|
|
468
468
|
async function C() {
|
|
469
|
-
N.value = [],
|
|
469
|
+
N.value = [], U.value = !0;
|
|
470
470
|
try {
|
|
471
471
|
const [e] = await Promise.all([y.readTemplates()]).delayed(
|
|
472
472
|
1e3
|
|
@@ -475,20 +475,20 @@ const Vn = {
|
|
|
475
475
|
} catch (e) {
|
|
476
476
|
console.log("Something went wrong when fetching templates:", e);
|
|
477
477
|
} finally {
|
|
478
|
-
|
|
478
|
+
U.value = !1;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
async function we() {
|
|
482
|
-
|
|
482
|
+
$.value = [], U.value = !0;
|
|
483
483
|
try {
|
|
484
|
-
const [e] = await Promise.all([
|
|
484
|
+
const [e] = await Promise.all([b.readTemplates()]).delayed(
|
|
485
485
|
1e3
|
|
486
486
|
);
|
|
487
|
-
|
|
487
|
+
$.value = e;
|
|
488
488
|
} catch (e) {
|
|
489
489
|
console.log("Something went wrong when fetching wastage templates:", e);
|
|
490
490
|
} finally {
|
|
491
|
-
|
|
491
|
+
U.value = !1;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
const ne = k({
|
|
@@ -727,12 +727,12 @@ const Vn = {
|
|
|
727
727
|
} : {};
|
|
728
728
|
h.thresholds = n, u("update:modelValue", h);
|
|
729
729
|
}
|
|
730
|
-
}), Se = k(() => s.mustUsePoTemplate && t.mode ===
|
|
730
|
+
}), Se = k(() => s.mustUsePoTemplate && t.mode === j.CREATE && N.value.length > 0 ? N.value.map((e) => ({
|
|
731
731
|
label: e.name || "Template",
|
|
732
732
|
value: e._id || "template_" + e.name
|
|
733
733
|
})) : []), Te = k(() => Se.value.filter(
|
|
734
734
|
(e) => (t.purchaseOrderTemplateIds ?? []).includes(e.value)
|
|
735
|
-
)), fe = k(() => s.enableWastageTemplate && t.mode ===
|
|
735
|
+
)), fe = k(() => s.enableWastageTemplate && t.mode === j.CREATE && $.value.length > 0 ? $.value.map((e) => ({
|
|
736
736
|
label: e.name || "Template",
|
|
737
737
|
value: e._id || "template_" + e.name
|
|
738
738
|
})) : []), Ie = k(() => fe.value.filter(
|
|
@@ -789,7 +789,7 @@ const Vn = {
|
|
|
789
789
|
}
|
|
790
790
|
return (e, n) => {
|
|
791
791
|
const h = I("FmTextField"), S = I("FmLabel"), z = I("FmField"), O = I("FmIcon"), ae = I("FmMenuHeader"), se = I("FmMenuDivider"), Ce = I("FmMenuItem"), $t = I("FmMenu"), Ge = I("FmFormGroup"), Ut = I("FmSelect"), Ke = I("FmSwitch"), Je = I("FmStepperField"), Qe = I("FmButton"), Ze = I("FmChip"), At = I("FmForm");
|
|
792
|
-
return
|
|
792
|
+
return g(), B(At, {
|
|
793
793
|
disabled: e.disabled,
|
|
794
794
|
ref_key: "formRef",
|
|
795
795
|
ref: ee,
|
|
@@ -904,13 +904,13 @@ const Vn = {
|
|
|
904
904
|
class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
|
|
905
905
|
onVnodeMounted: Ae
|
|
906
906
|
}, [
|
|
907
|
-
(
|
|
908
|
-
J.displayAsSection ? (
|
|
907
|
+
(g(!0), E(re, null, ye(Q.value, (J, Rt) => (g(), E(re, { key: Rt }, [
|
|
908
|
+
J.displayAsSection ? (g(), E(re, { key: 0 }, [
|
|
909
909
|
p(ae, {
|
|
910
910
|
label: J.label
|
|
911
911
|
}, null, 8, ["label"]),
|
|
912
912
|
p(se)
|
|
913
|
-
], 64)) : (
|
|
913
|
+
], 64)) : (g(), B(Ce, {
|
|
914
914
|
key: 1,
|
|
915
915
|
label: J.label,
|
|
916
916
|
"model-value": H(J),
|
|
@@ -929,7 +929,7 @@ const Vn = {
|
|
|
929
929
|
]),
|
|
930
930
|
_: 1
|
|
931
931
|
}, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
|
|
932
|
-
a(s).enableTotalCost ? (
|
|
932
|
+
a(s).enableTotalCost ? (g(), B(Me, {
|
|
933
933
|
key: 0,
|
|
934
934
|
"tooltip-message": "This field is managed by NetSuite",
|
|
935
935
|
"tooltip-z-index": 50,
|
|
@@ -958,8 +958,8 @@ const Vn = {
|
|
|
958
958
|
}, null, 8, ["label", "model-value", "items"])
|
|
959
959
|
]),
|
|
960
960
|
_: 1
|
|
961
|
-
}, 8, ["label", "model-value", "locked", "disabled"])) :
|
|
962
|
-
a(s).enableTotalCost ? (
|
|
961
|
+
}, 8, ["label", "model-value", "locked", "disabled"])) : L("", !0),
|
|
962
|
+
a(s).enableTotalCost ? (g(), B(Me, {
|
|
963
963
|
key: 1,
|
|
964
964
|
"tooltip-message": "This field is managed by NetSuite",
|
|
965
965
|
"tooltip-z-index": 50,
|
|
@@ -1006,15 +1006,15 @@ const Vn = {
|
|
|
1006
1006
|
}, 8, ["model-value", "rules"])
|
|
1007
1007
|
]),
|
|
1008
1008
|
_: 1
|
|
1009
|
-
}, 8, ["model-value", "locked", "disabled"])) :
|
|
1010
|
-
!_.value || he.value ? (
|
|
1009
|
+
}, 8, ["model-value", "locked", "disabled"])) : L("", !0),
|
|
1010
|
+
!_.value || he.value ? (g(), B(kn, {
|
|
1011
1011
|
key: 2,
|
|
1012
1012
|
"model-value": he.value,
|
|
1013
1013
|
"onUpdate:modelValue": n[7] || (n[7] = (T) => he.value = T),
|
|
1014
1014
|
"root-value": e.modelValue,
|
|
1015
1015
|
readonly: _.value
|
|
1016
|
-
}, null, 8, ["model-value", "root-value", "readonly"])) :
|
|
1017
|
-
e.mode !== a(
|
|
1016
|
+
}, null, 8, ["model-value", "root-value", "readonly"])) : L("", !0),
|
|
1017
|
+
e.mode !== a(j).CREATE ? (g(), E("div", Mn, [
|
|
1018
1018
|
p(Ke, {
|
|
1019
1019
|
label: a(l)("inventory.ingredient.status.inactive"),
|
|
1020
1020
|
"model-value": me.value,
|
|
@@ -1025,8 +1025,8 @@ const Vn = {
|
|
|
1025
1025
|
i("div", En, [
|
|
1026
1026
|
i("div", $n, R(a(l)("inventory.ingredient.status.preventFromOrder")), 1)
|
|
1027
1027
|
])
|
|
1028
|
-
])) :
|
|
1029
|
-
e.mode !== a(
|
|
1028
|
+
])) : L("", !0),
|
|
1029
|
+
e.mode !== a(j).CREATE ? (g(), E("div", Un, [
|
|
1030
1030
|
i("div", null, [
|
|
1031
1031
|
p(Ke, {
|
|
1032
1032
|
label: a(l)("inventory.ingredient.bindedItems.title"),
|
|
@@ -1035,22 +1035,22 @@ const Vn = {
|
|
|
1035
1035
|
"label-placement": "right"
|
|
1036
1036
|
}, null, 8, ["label", "modelValue"])
|
|
1037
1037
|
]),
|
|
1038
|
-
te.value && ie.value.length ? (
|
|
1038
|
+
te.value && ie.value.length ? (g(), B(je, {
|
|
1039
1039
|
key: 0,
|
|
1040
1040
|
name: a(l)("inventory.ingredient.bindedItems.ingredient"),
|
|
1041
1041
|
bindings: ie.value
|
|
1042
|
-
}, null, 8, ["name", "bindings"])) :
|
|
1043
|
-
te.value && M.value.length ? (
|
|
1042
|
+
}, null, 8, ["name", "bindings"])) : L("", !0),
|
|
1043
|
+
te.value && M.value.length ? (g(), B(je, {
|
|
1044
1044
|
key: 1,
|
|
1045
1045
|
name: a(l)("inventory.ingredient.bindedItems.recipe"),
|
|
1046
1046
|
bindings: M.value
|
|
1047
|
-
}, null, 8, ["name", "bindings"])) :
|
|
1048
|
-
te.value && W.value.length ? (
|
|
1047
|
+
}, null, 8, ["name", "bindings"])) : L("", !0),
|
|
1048
|
+
te.value && W.value.length ? (g(), B(je, {
|
|
1049
1049
|
key: 2,
|
|
1050
1050
|
name: a(l)("inventory.ingredient.bindedItems.menu"),
|
|
1051
1051
|
bindings: W.value
|
|
1052
|
-
}, null, 8, ["name", "bindings"])) :
|
|
1053
|
-
])) :
|
|
1052
|
+
}, null, 8, ["name", "bindings"])) : L("", !0)
|
|
1053
|
+
])) : L("", !0),
|
|
1054
1054
|
i("div", An, [
|
|
1055
1055
|
i("div", Rn, [
|
|
1056
1056
|
p(ke, null, {
|
|
@@ -1147,7 +1147,7 @@ const Vn = {
|
|
|
1147
1147
|
])
|
|
1148
1148
|
])
|
|
1149
1149
|
]),
|
|
1150
|
-
a(s).mustUsePoTemplate && e.mode === a(
|
|
1150
|
+
a(s).mustUsePoTemplate && e.mode === a(j).CREATE ? (g(), E("div", Zn, [
|
|
1151
1151
|
i("div", Xn, [
|
|
1152
1152
|
i("div", eo, [
|
|
1153
1153
|
p(ke, null, {
|
|
@@ -1166,18 +1166,18 @@ const Vn = {
|
|
|
1166
1166
|
]),
|
|
1167
1167
|
i("div", no, R(a(l)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
|
|
1168
1168
|
]),
|
|
1169
|
-
Te.value.length > 0 ? (
|
|
1169
|
+
Te.value.length > 0 ? (g(), E("div", oo, [
|
|
1170
1170
|
i("div", lo, [
|
|
1171
|
-
(
|
|
1171
|
+
(g(!0), E(re, null, ye(Te.value, (T) => (g(), B(Ze, {
|
|
1172
1172
|
key: T.value,
|
|
1173
1173
|
label: T.label,
|
|
1174
1174
|
variant: "info",
|
|
1175
1175
|
compact: ""
|
|
1176
1176
|
}, null, 8, ["label"]))), 128))
|
|
1177
1177
|
])
|
|
1178
|
-
])) :
|
|
1179
|
-
])) :
|
|
1180
|
-
a(s).enableWastageTemplate && e.mode === a(
|
|
1178
|
+
])) : L("", !0)
|
|
1179
|
+
])) : L("", !0),
|
|
1180
|
+
a(s).enableWastageTemplate && e.mode === a(j).CREATE ? (g(), E("div", ao, [
|
|
1181
1181
|
i("div", so, [
|
|
1182
1182
|
i("div", ro, [
|
|
1183
1183
|
p(ke, null, {
|
|
@@ -1196,17 +1196,17 @@ const Vn = {
|
|
|
1196
1196
|
]),
|
|
1197
1197
|
i("div", uo, R(a(l)("inventory.ingredient.wastageTemplates.description")), 1)
|
|
1198
1198
|
]),
|
|
1199
|
-
Ie.value.length > 0 ? (
|
|
1199
|
+
Ie.value.length > 0 ? (g(), E("div", co, [
|
|
1200
1200
|
i("div", mo, [
|
|
1201
|
-
(
|
|
1201
|
+
(g(!0), E(re, null, ye(Ie.value, (T) => (g(), B(Ze, {
|
|
1202
1202
|
key: T.value,
|
|
1203
1203
|
label: T.label,
|
|
1204
1204
|
variant: "info",
|
|
1205
1205
|
compact: ""
|
|
1206
1206
|
}, null, 8, ["label"]))), 128))
|
|
1207
1207
|
])
|
|
1208
|
-
])) :
|
|
1209
|
-
])) :
|
|
1208
|
+
])) : L("", !0)
|
|
1209
|
+
])) : L("", !0),
|
|
1210
1210
|
i("div", null, [
|
|
1211
1211
|
p(bn, {
|
|
1212
1212
|
entity: "inventorySku",
|
|
@@ -1225,72 +1225,72 @@ const Vn = {
|
|
|
1225
1225
|
props: {
|
|
1226
1226
|
show: { type: Boolean },
|
|
1227
1227
|
unit: {},
|
|
1228
|
-
mode: { default:
|
|
1228
|
+
mode: { default: j.READ }
|
|
1229
1229
|
},
|
|
1230
1230
|
emits: ["update:show"],
|
|
1231
1231
|
setup(r) {
|
|
1232
|
-
const o = r, v = ce(), l = De(), d = Tt(), y = _t(),
|
|
1232
|
+
const o = r, v = ce(), l = De(), d = Tt(), y = _t(), b = $e(), { t } = be(), u = pt(o, "show"), c = pt(o, "unit"), f = D([]), s = D([]), m = k(
|
|
1233
1233
|
() => {
|
|
1234
1234
|
var w;
|
|
1235
1235
|
return l.isEnabled && l.netSuiteItemBySkuId.has((w = o.unit) == null ? void 0 : w._id);
|
|
1236
1236
|
}
|
|
1237
1237
|
), _ = k(() => {
|
|
1238
1238
|
switch (o.mode) {
|
|
1239
|
-
case
|
|
1239
|
+
case j.READ:
|
|
1240
1240
|
return "";
|
|
1241
|
-
case
|
|
1241
|
+
case j.UPDATE:
|
|
1242
1242
|
return t("inventory.ingredient.update.title");
|
|
1243
|
-
case
|
|
1243
|
+
case j.CREATE:
|
|
1244
1244
|
return t("inventory.ingredient.create.title");
|
|
1245
1245
|
}
|
|
1246
1246
|
return "";
|
|
1247
1247
|
}), N = k(() => {
|
|
1248
1248
|
switch (o.mode) {
|
|
1249
|
-
case
|
|
1249
|
+
case j.READ:
|
|
1250
1250
|
return "";
|
|
1251
|
-
case
|
|
1251
|
+
case j.UPDATE:
|
|
1252
1252
|
return t("common.save");
|
|
1253
|
-
case
|
|
1253
|
+
case j.CREATE:
|
|
1254
1254
|
return t("common.add");
|
|
1255
1255
|
}
|
|
1256
1256
|
return "";
|
|
1257
|
-
}),
|
|
1257
|
+
}), $ = D(), U = D(!1);
|
|
1258
1258
|
async function P() {
|
|
1259
|
-
|
|
1259
|
+
U.value = !0;
|
|
1260
1260
|
try {
|
|
1261
1261
|
await v.createSku(c.value);
|
|
1262
1262
|
const w = v.skuByCode[c.value.code];
|
|
1263
|
-
f.value.length > 0 && await C(w), s.value.length > 0 && await we(w), u.value = !1,
|
|
1263
|
+
f.value.length > 0 && await C(w), s.value.length > 0 && await we(w), u.value = !1, b.open({
|
|
1264
1264
|
title: t("inventory.common.success"),
|
|
1265
1265
|
message: t("inventory.ingredient.create.success", { name: c.value.name }),
|
|
1266
1266
|
type: "success"
|
|
1267
1267
|
});
|
|
1268
1268
|
} catch (w) {
|
|
1269
|
-
w instanceof dt ||
|
|
1269
|
+
w instanceof dt || b.open({
|
|
1270
1270
|
title: t("inventory.ingredient.create.error.title"),
|
|
1271
1271
|
message: t("inventory.ingredient.create.error.message"),
|
|
1272
1272
|
type: "error"
|
|
1273
1273
|
});
|
|
1274
1274
|
} finally {
|
|
1275
|
-
|
|
1275
|
+
U.value = !1;
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
1278
|
async function G() {
|
|
1279
|
-
|
|
1279
|
+
U.value = !0;
|
|
1280
1280
|
try {
|
|
1281
|
-
await v.updateSku(c.value),
|
|
1281
|
+
await v.updateSku(c.value), U.value = !1, u.value = !1, b.open({
|
|
1282
1282
|
title: t("inventory.common.success"),
|
|
1283
1283
|
message: t("inventory.ingredient.update.success", { name: c.value.name }),
|
|
1284
1284
|
type: "success"
|
|
1285
1285
|
});
|
|
1286
1286
|
} catch (w) {
|
|
1287
|
-
w instanceof dt ||
|
|
1287
|
+
w instanceof dt || b.open({
|
|
1288
1288
|
title: t("inventory.ingredient.update.error.title"),
|
|
1289
1289
|
message: t("inventory.ingredient.update.error.message"),
|
|
1290
1290
|
type: "error"
|
|
1291
1291
|
});
|
|
1292
1292
|
} finally {
|
|
1293
|
-
|
|
1293
|
+
U.value = !1;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
async function C(w) {
|
|
@@ -1324,7 +1324,7 @@ const Vn = {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
1326
1326
|
} catch (H) {
|
|
1327
|
-
|
|
1327
|
+
b.open({
|
|
1328
1328
|
title: t("inventory.transfer.template.update.error"),
|
|
1329
1329
|
message: t("inventory.transfer.template.update.errorMessage"),
|
|
1330
1330
|
type: "error"
|
|
@@ -1354,7 +1354,7 @@ const Vn = {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
} catch (A) {
|
|
1357
|
-
|
|
1357
|
+
b.open({
|
|
1358
1358
|
title: t("inventory.wastage.template.update.error"),
|
|
1359
1359
|
message: t("inventory.wastage.template.update.errorMessage"),
|
|
1360
1360
|
type: "error"
|
|
@@ -1363,15 +1363,15 @@ const Vn = {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
function ne() {
|
|
1365
1365
|
var w, A;
|
|
1366
|
-
(A = (w =
|
|
1366
|
+
(A = (w = $.value) == null ? void 0 : w.validateInputs) == null || A.call(w);
|
|
1367
1367
|
}
|
|
1368
1368
|
function me() {
|
|
1369
1369
|
switch (o.mode) {
|
|
1370
|
-
case
|
|
1370
|
+
case j.READ:
|
|
1371
1371
|
return;
|
|
1372
|
-
case
|
|
1372
|
+
case j.UPDATE:
|
|
1373
1373
|
return G();
|
|
1374
|
-
case
|
|
1374
|
+
case j.CREATE:
|
|
1375
1375
|
return P();
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
@@ -1383,7 +1383,7 @@ const Vn = {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
return (w, A) => {
|
|
1385
1385
|
const K = I("FmChip"), le = I("FmButton"), Q = I("FmSideSheet");
|
|
1386
|
-
return
|
|
1386
|
+
return g(), B(Q, {
|
|
1387
1387
|
"model-value": a(u),
|
|
1388
1388
|
"onUpdate:modelValue": A[3] || (A[3] = (H) => lt(u) ? u.value = H : null),
|
|
1389
1389
|
header: _.value,
|
|
@@ -1394,12 +1394,12 @@ const Vn = {
|
|
|
1394
1394
|
"side-sheet-footer": x(() => [
|
|
1395
1395
|
i("div", fo, [
|
|
1396
1396
|
p(le, {
|
|
1397
|
-
loading:
|
|
1397
|
+
loading: U.value,
|
|
1398
1398
|
label: N.value,
|
|
1399
1399
|
onClick: ne
|
|
1400
1400
|
}, null, 8, ["loading", "label"]),
|
|
1401
1401
|
p(le, {
|
|
1402
|
-
disabled:
|
|
1402
|
+
disabled: U.value,
|
|
1403
1403
|
label: a(t)("common.close"),
|
|
1404
1404
|
variant: "tertiary",
|
|
1405
1405
|
onClick: A[2] || (A[2] = (H) => u.value = !1)
|
|
@@ -1409,20 +1409,20 @@ const Vn = {
|
|
|
1409
1409
|
default: x(() => [
|
|
1410
1410
|
i("div", vo, [
|
|
1411
1411
|
i("div", null, [
|
|
1412
|
-
m.value ? (
|
|
1412
|
+
m.value ? (g(), B(K, {
|
|
1413
1413
|
key: 0,
|
|
1414
1414
|
label: "Managed by Netsuite",
|
|
1415
1415
|
compact: ""
|
|
1416
|
-
})) :
|
|
1416
|
+
})) : L("", !0)
|
|
1417
1417
|
]),
|
|
1418
1418
|
p(po, {
|
|
1419
1419
|
class: "w-full",
|
|
1420
1420
|
ref_key: "hasValidationExpose",
|
|
1421
|
-
ref:
|
|
1421
|
+
ref: $,
|
|
1422
1422
|
modelValue: a(c),
|
|
1423
1423
|
"onUpdate:modelValue": A[0] || (A[0] = (H) => lt(c) ? c.value = H : null),
|
|
1424
1424
|
mode: w.mode,
|
|
1425
|
-
disabled:
|
|
1425
|
+
disabled: U.value,
|
|
1426
1426
|
purchaseOrderTemplateIds: f.value,
|
|
1427
1427
|
wastageTemplateIds: s.value,
|
|
1428
1428
|
"onClick:submit": A[1] || (A[1] = (H) => me()),
|
|
@@ -1456,14 +1456,14 @@ function It(r) {
|
|
|
1456
1456
|
for (const l of v) {
|
|
1457
1457
|
const d = l.indexOf(":");
|
|
1458
1458
|
if (d > 0) {
|
|
1459
|
-
const y = l.substring(0, d).trim(),
|
|
1460
|
-
y &&
|
|
1459
|
+
const y = l.substring(0, d).trim(), b = l.substring(d + 1).trim();
|
|
1460
|
+
y && b && (o[y] = b);
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
1464
1464
|
}
|
|
1465
1465
|
function _o(r) {
|
|
1466
|
-
var v, l, d, y,
|
|
1466
|
+
var v, l, d, y, b;
|
|
1467
1467
|
return {
|
|
1468
1468
|
code: r.code,
|
|
1469
1469
|
name: r.name,
|
|
@@ -1472,7 +1472,7 @@ function _o(r) {
|
|
|
1472
1472
|
valuationMethod: r.valuation ?? "WAVG",
|
|
1473
1473
|
pricePerUnit: (l = r.defaultCost) != null && l.costPerUnit ? +xt((d = r.defaultCost) == null ? void 0 : d.costPerUnit) : 0,
|
|
1474
1474
|
thresholdLow: ((y = r.thresholds) == null ? void 0 : y.low) ?? Ve().low,
|
|
1475
|
-
thresholdMid: ((
|
|
1475
|
+
thresholdMid: ((b = r.thresholds) == null ? void 0 : b.mid) ?? Ve().mid,
|
|
1476
1476
|
customAttributes: ho(r.customAttributes)
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
@@ -1527,7 +1527,7 @@ function xo() {
|
|
|
1527
1527
|
[],
|
|
1528
1528
|
d.map((c) => c.name),
|
|
1529
1529
|
...o.map((c) => d.map((f) => c[f.id]))
|
|
1530
|
-
],
|
|
1530
|
+
], b = d.map((c) => `system:${c.id}`), t = wt(y, b), u = `${l == null ? void 0 : l.name} ingredients (${Gt(/* @__PURE__ */ new Date())}).xlsx`;
|
|
1531
1531
|
return St(t, u), u;
|
|
1532
1532
|
}
|
|
1533
1533
|
function ko() {
|
|
@@ -1537,8 +1537,8 @@ function ko() {
|
|
|
1537
1537
|
["Menu version", o == null ? void 0 : o.menuVersion],
|
|
1538
1538
|
[],
|
|
1539
1539
|
v.map((t) => t.name)
|
|
1540
|
-
], d = v.map((t) => `system:${t.id}`), y = wt(l, d),
|
|
1541
|
-
return St(y,
|
|
1540
|
+
], d = v.map((t) => `system:${t.id}`), y = wt(l, d), b = "FeedMe ingredients template.xlsx";
|
|
1541
|
+
return St(y, b), b;
|
|
1542
1542
|
}
|
|
1543
1543
|
function Vo(r) {
|
|
1544
1544
|
const [
|
|
@@ -1547,7 +1547,7 @@ function Vo(r) {
|
|
|
1547
1547
|
l,
|
|
1548
1548
|
d,
|
|
1549
1549
|
y,
|
|
1550
|
-
|
|
1550
|
+
b,
|
|
1551
1551
|
...t
|
|
1552
1552
|
] = Jt(r);
|
|
1553
1553
|
if (!o || !o.length || o.some((m) => m.length && !m.startsWith("system:")))
|
|
@@ -1559,9 +1559,9 @@ function Vo(r) {
|
|
|
1559
1559
|
);
|
|
1560
1560
|
return t.map((m, _) => {
|
|
1561
1561
|
const N = {};
|
|
1562
|
-
for (const
|
|
1563
|
-
const
|
|
1564
|
-
Object.assign(N, { [
|
|
1562
|
+
for (const $ in u) {
|
|
1563
|
+
const U = u[$];
|
|
1564
|
+
Object.assign(N, { [U]: m[$] });
|
|
1565
1565
|
}
|
|
1566
1566
|
return {
|
|
1567
1567
|
index: _,
|
|
@@ -1571,9 +1571,9 @@ function Vo(r) {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
function ft(r, o, v) {
|
|
1573
1573
|
var G;
|
|
1574
|
-
const d = ce().units, y = new Array(),
|
|
1575
|
-
|
|
1576
|
-
`Code ${r.code} is already used in row ${
|
|
1574
|
+
const d = ce().units, y = new Array(), b = v.filter((C) => C.data.code === r.code);
|
|
1575
|
+
b.length > 1 && y.push(
|
|
1576
|
+
`Code ${r.code} is already used in row ${b.map((C) => C.index + 6).join()}.`
|
|
1577
1577
|
);
|
|
1578
1578
|
const t = d.find((C) => C.abbrev === r.baseUnit), u = t == null ? void 0 : t.measurements.find((C) => C.abbrev === r.unit);
|
|
1579
1579
|
if (!t)
|
|
@@ -1597,7 +1597,7 @@ function ft(r, o, v) {
|
|
|
1597
1597
|
} : void 0, N = m(`${r.thresholdLow}`) && m(`${r.thresholdMid}`) ? {
|
|
1598
1598
|
low: Number(r.thresholdLow) || 0,
|
|
1599
1599
|
mid: Number(r.thresholdMid) || 0
|
|
1600
|
-
} : void 0,
|
|
1600
|
+
} : void 0, $ = "customAttributes" in r ? It(r.customAttributes) : null;
|
|
1601
1601
|
return {
|
|
1602
1602
|
type: "create",
|
|
1603
1603
|
sku: {
|
|
@@ -1609,7 +1609,7 @@ function ft(r, o, v) {
|
|
|
1609
1609
|
valuation: c,
|
|
1610
1610
|
defaultCost: _,
|
|
1611
1611
|
thresholds: N,
|
|
1612
|
-
|
|
1612
|
+
...$ !== null && { customAttributes: $ }
|
|
1613
1613
|
},
|
|
1614
1614
|
errors: y,
|
|
1615
1615
|
excelRowNumber: o + 6
|
|
@@ -1617,9 +1617,9 @@ function ft(r, o, v) {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
function wo(r) {
|
|
1619
1619
|
try {
|
|
1620
|
-
const o = Vo(r).filter((c) => c.data.code), l = ce().skus, d = Kt(l, "code"), y = o.filter((c) => !d[c.data.code]),
|
|
1620
|
+
const o = Vo(r).filter((c) => c.data.code), l = ce().skus, d = Kt(l, "code"), y = o.filter((c) => !d[c.data.code]), b = o.filter((c) => d[c.data.code]), t = y.map(
|
|
1621
1621
|
(c) => ft(c.data, c.index, o)
|
|
1622
|
-
), u =
|
|
1622
|
+
), u = b.map((c) => {
|
|
1623
1623
|
const f = ft(c.data, c.index, o), s = d[c.data.code];
|
|
1624
1624
|
let m = s.customAttributes;
|
|
1625
1625
|
return "customAttributes" in c.data && (m = It(c.data.customAttributes)), {
|
|
@@ -1668,7 +1668,7 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1668
1668
|
setup(r) {
|
|
1669
1669
|
return (o, v) => {
|
|
1670
1670
|
const l = I("FmIcon"), d = I("FmTooltip");
|
|
1671
|
-
return
|
|
1671
|
+
return g(), E("div", So, [
|
|
1672
1672
|
v[0] || (v[0] = i("div", null, "•", -1)),
|
|
1673
1673
|
i("div", To, [
|
|
1674
1674
|
i("div", Io, [
|
|
@@ -1678,13 +1678,13 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1678
1678
|
})
|
|
1679
1679
|
}, [
|
|
1680
1680
|
We(R(o.name) + " ", 1),
|
|
1681
|
-
o.type === "create" ? (
|
|
1681
|
+
o.type === "create" ? (g(), E("span", Co, "(new)")) : L("", !0)
|
|
1682
1682
|
], 2),
|
|
1683
|
-
o.errors.length ? (
|
|
1683
|
+
o.errors.length ? (g(), E("div", Fo, [
|
|
1684
1684
|
p(d, { "z-index": 50 }, {
|
|
1685
1685
|
content: x(() => [
|
|
1686
1686
|
i("ol", null, [
|
|
1687
|
-
(
|
|
1687
|
+
(g(!0), E(re, null, ye(o.errors, (y, b) => (g(), E("li", { key: b }, R(y), 1))), 128))
|
|
1688
1688
|
])
|
|
1689
1689
|
]),
|
|
1690
1690
|
default: x(() => [
|
|
@@ -1696,7 +1696,7 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1696
1696
|
]),
|
|
1697
1697
|
_: 1
|
|
1698
1698
|
})
|
|
1699
|
-
])) :
|
|
1699
|
+
])) : L("", !0)
|
|
1700
1700
|
]),
|
|
1701
1701
|
i("div", {
|
|
1702
1702
|
class: ue([
|
|
@@ -1723,34 +1723,34 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1723
1723
|
}, Bo = { class: "fm-typo-en-body-lg-600" }, Do = /* @__PURE__ */ ge({
|
|
1724
1724
|
__name: "ImportIngredients",
|
|
1725
1725
|
setup(r) {
|
|
1726
|
-
const o = D(null), v = un(), l = $e(), d = D(!1), y = D(new Array()),
|
|
1727
|
-
() => !!y.value.length ||
|
|
1726
|
+
const o = D(null), v = un(), l = $e(), d = D(!1), y = D(new Array()), b = D([]), t = D([]), u = k(
|
|
1727
|
+
() => !!y.value.length || b.value.some((m) => m.errors.length) || t.value.some((m) => m.errors.length)
|
|
1728
1728
|
), c = k(
|
|
1729
|
-
() => !!
|
|
1729
|
+
() => !!b.value.length || !!t.value.length
|
|
1730
1730
|
), { t: f } = be();
|
|
1731
1731
|
async function s(m) {
|
|
1732
|
-
y.value = [],
|
|
1732
|
+
y.value = [], b.value = [], t.value = [];
|
|
1733
1733
|
try {
|
|
1734
1734
|
d.value = !0;
|
|
1735
1735
|
const [_] = await Promise.all([
|
|
1736
1736
|
Xt(m),
|
|
1737
1737
|
// fake buffer
|
|
1738
|
-
new Promise((
|
|
1739
|
-
]), N = _.SheetNames.find((
|
|
1738
|
+
new Promise((U) => setTimeout(U, 1e3))
|
|
1739
|
+
]), N = _.SheetNames.find((U) => U);
|
|
1740
1740
|
if (!N) {
|
|
1741
1741
|
y.value.push(f("inventory.ingredient.import.fileError.noSheet"));
|
|
1742
1742
|
return;
|
|
1743
1743
|
}
|
|
1744
|
-
const
|
|
1745
|
-
if (
|
|
1746
|
-
y.value.push(
|
|
1744
|
+
const $ = wo(_.Sheets[N]);
|
|
1745
|
+
if ($.invalidExcel) {
|
|
1746
|
+
y.value.push($.invalidExcelMessage ?? f("inventory.ingredient.import.fileError.invalidExcel"));
|
|
1747
1747
|
return;
|
|
1748
1748
|
}
|
|
1749
|
-
if (
|
|
1749
|
+
if (b.value = $.importCreateResult, t.value = $.importUpdateResult, !b.value.length && !t.value.length) {
|
|
1750
1750
|
y.value.push(f("inventory.ingredient.import.fileError.noData"));
|
|
1751
1751
|
return;
|
|
1752
1752
|
}
|
|
1753
|
-
v.emitData(
|
|
1753
|
+
v.emitData($);
|
|
1754
1754
|
} catch (_) {
|
|
1755
1755
|
l.open({
|
|
1756
1756
|
title: f("inventory.ingredient.import.fileError.unableToRead"),
|
|
@@ -1767,8 +1767,8 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1767
1767
|
return gt(o, (m) => {
|
|
1768
1768
|
m && s(m);
|
|
1769
1769
|
}), (m, _) => {
|
|
1770
|
-
const N = I("FmCircularProgress"),
|
|
1771
|
-
return
|
|
1770
|
+
const N = I("FmCircularProgress"), $ = I("FmIcon"), U = I("FmButton");
|
|
1771
|
+
return g(), E("div", Mo, [
|
|
1772
1772
|
i("div", Eo, R(a(f)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1773
1773
|
p(Zt, {
|
|
1774
1774
|
class: ue({
|
|
@@ -1794,11 +1794,11 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1794
1794
|
}
|
|
1795
1795
|
])
|
|
1796
1796
|
}, [
|
|
1797
|
-
d.value ? (
|
|
1797
|
+
d.value ? (g(), B(N, {
|
|
1798
1798
|
key: 0,
|
|
1799
1799
|
size: "md",
|
|
1800
1800
|
color: "neutral-gray-200"
|
|
1801
|
-
})) : (
|
|
1801
|
+
})) : (g(), B($, {
|
|
1802
1802
|
key: 1,
|
|
1803
1803
|
name: u.value ? "error" : "attach_file",
|
|
1804
1804
|
outline: "",
|
|
@@ -1815,8 +1815,8 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1815
1815
|
}, [
|
|
1816
1816
|
i("div", Uo, R(o.value.name), 1)
|
|
1817
1817
|
], 2),
|
|
1818
|
-
d.value ?
|
|
1819
|
-
p(
|
|
1818
|
+
d.value ? L("", !0) : (g(), E("div", Ao, [
|
|
1819
|
+
p(U, {
|
|
1820
1820
|
label: a(f)("inventory.ingredient.import.replaceFile"),
|
|
1821
1821
|
variant: u.value ? "destructive" : "secondary",
|
|
1822
1822
|
"prepend-icon": u.value ? void 0 : "autorenew",
|
|
@@ -1824,45 +1824,48 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1824
1824
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
1825
1825
|
]))
|
|
1826
1826
|
], 2),
|
|
1827
|
-
y.value.length ? (
|
|
1828
|
-
(
|
|
1827
|
+
y.value.length ? (g(), E("div", Ro, [
|
|
1828
|
+
(g(!0), E(re, null, ye(y.value, (G, C) => (g(), E("div", {
|
|
1829
1829
|
key: C,
|
|
1830
1830
|
class: "flex gap-8 items-center"
|
|
1831
1831
|
}, [
|
|
1832
|
-
p(
|
|
1832
|
+
p($, {
|
|
1833
1833
|
name: "error",
|
|
1834
1834
|
size: "sm",
|
|
1835
1835
|
color: "system-error-300"
|
|
1836
1836
|
}),
|
|
1837
1837
|
i("div", Po, R(G), 1)
|
|
1838
1838
|
]))), 128))
|
|
1839
|
-
])) :
|
|
1839
|
+
])) : L("", !0)
|
|
1840
1840
|
])
|
|
1841
1841
|
]),
|
|
1842
1842
|
key: "0"
|
|
1843
1843
|
} : void 0
|
|
1844
1844
|
]), 1032, ["class", "label", "button-label"]),
|
|
1845
|
-
c.value ? (
|
|
1845
|
+
c.value ? (g(), E("div", Oo, [
|
|
1846
1846
|
i("div", Bo, R(a(f)("inventory.ingredient.import.summary")), 1),
|
|
1847
|
-
(
|
|
1847
|
+
(g(!0), E(re, null, ye(b.value, (P) => (g(), B(yt, {
|
|
1848
1848
|
key: P.sku._id,
|
|
1849
1849
|
code: P.sku.code,
|
|
1850
1850
|
name: P.sku.name,
|
|
1851
1851
|
errors: P.errors,
|
|
1852
1852
|
type: "create"
|
|
1853
1853
|
}, null, 8, ["code", "name", "errors"]))), 128)),
|
|
1854
|
-
(
|
|
1854
|
+
(g(!0), E(re, null, ye(t.value, (P) => (g(), B(yt, {
|
|
1855
1855
|
key: P.sku._id,
|
|
1856
1856
|
code: P.sku.code,
|
|
1857
1857
|
name: P.sku.name,
|
|
1858
1858
|
errors: P.errors,
|
|
1859
1859
|
type: "update"
|
|
1860
1860
|
}, null, 8, ["code", "name", "errors"]))), 128))
|
|
1861
|
-
])) :
|
|
1861
|
+
])) : L("", !0)
|
|
1862
1862
|
]);
|
|
1863
1863
|
};
|
|
1864
1864
|
}
|
|
1865
|
-
}), No = {
|
|
1865
|
+
}), No = {
|
|
1866
|
+
key: 0,
|
|
1867
|
+
class: "flex items-center gap-1"
|
|
1868
|
+
}, zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lo = { class: "flex flex-col py-8" }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ho = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, rl = /* @__PURE__ */ ge({
|
|
1866
1869
|
__name: "IngredientsView",
|
|
1867
1870
|
setup(r) {
|
|
1868
1871
|
const o = ce(), v = De(), l = k(() => [
|
|
@@ -1896,11 +1899,11 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1896
1899
|
]
|
|
1897
1900
|
}), y = k(
|
|
1898
1901
|
() => new Set(v.getAvailableItems(v.businessSubsidiaryId))
|
|
1899
|
-
),
|
|
1902
|
+
), b = k(() => {
|
|
1900
1903
|
if (!d.value)
|
|
1901
1904
|
return o.skus;
|
|
1902
1905
|
const F = en.build(d.value);
|
|
1903
|
-
return o.skus.filter((V) => ne.value && y.value && !y.value.has(V._id) ? !1 : tn(
|
|
1906
|
+
return o.skus.filter((V) => v.isEnabled && ne.value && y.value && !y.value.has(V._id) ? !1 : tn(
|
|
1904
1907
|
{
|
|
1905
1908
|
skuCode: V.code,
|
|
1906
1909
|
skuUnitAbbrev: V.unit.abbrev,
|
|
@@ -1908,7 +1911,7 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1908
1911
|
},
|
|
1909
1912
|
F
|
|
1910
1913
|
));
|
|
1911
|
-
}), t = nn(), u = Ye(), c = _n(), f = $e(), { t: s } = be(), { createIngredient: m, updateIngredient: _ } = He(), { ingredientDialogProps: N, ingredientViewLoading:
|
|
1914
|
+
}), t = nn(), u = Ye(), c = _n(), f = $e(), { t: s } = be(), { createIngredient: m, updateIngredient: _ } = He(), { ingredientDialogProps: N, ingredientViewLoading: $ } = vn(He()), { columnDefs: U } = xn();
|
|
1912
1915
|
function P(F) {
|
|
1913
1916
|
switch (F) {
|
|
1914
1917
|
case "add":
|
|
@@ -1919,7 +1922,7 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
1919
1922
|
return H();
|
|
1920
1923
|
}
|
|
1921
1924
|
}
|
|
1922
|
-
const G = D(""), C = D(!1), we = k(() => C.value ||
|
|
1925
|
+
const G = D(""), C = D(!1), we = k(() => C.value || $.value), ne = D(!0), { breakpoints: me } = dn(), oe = k(() => me.value.xs || me.value.sm), pe = k(() => oe.value ? 10 : 20), w = on(), A = D(!1), K = [
|
|
1923
1926
|
{
|
|
1924
1927
|
value: "import",
|
|
1925
1928
|
label: s("common.import")
|
|
@@ -2076,7 +2079,7 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
2076
2079
|
}
|
|
2077
2080
|
return (F, V) => {
|
|
2078
2081
|
const X = I("FmSwitch"), ee = I("FmTable"), te = I("FmCollapsibleTabs"), ie = I("FmBottomSheet");
|
|
2079
|
-
return
|
|
2082
|
+
return g(), B(ln, {
|
|
2080
2083
|
title: a(s)("inventory.ingredient.title"),
|
|
2081
2084
|
actions: Q.value,
|
|
2082
2085
|
"onClick:action": P
|
|
@@ -2101,22 +2104,22 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
2101
2104
|
"onUpdate:filter": V[2] || (V[2] = (M) => d.value = M)
|
|
2102
2105
|
}, {
|
|
2103
2106
|
default: x(() => [
|
|
2104
|
-
|
|
2107
|
+
a(v).isEnabled ? (g(), E("div", No, [
|
|
2105
2108
|
i("span", zo, R(a(s)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2106
2109
|
p(yn),
|
|
2107
2110
|
p(X, {
|
|
2108
2111
|
modelValue: ne.value,
|
|
2109
2112
|
"onUpdate:modelValue": V[0] || (V[0] = (M) => ne.value = M)
|
|
2110
2113
|
}, null, 8, ["modelValue"])
|
|
2111
|
-
])
|
|
2114
|
+
])) : L("", !0)
|
|
2112
2115
|
]),
|
|
2113
2116
|
_: 1
|
|
2114
2117
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2115
|
-
(
|
|
2118
|
+
(g(), B(ee, {
|
|
2116
2119
|
key: JSON.stringify(d.value),
|
|
2117
2120
|
style: Bt(a(w).tableHeight),
|
|
2118
|
-
"column-defs": a(
|
|
2119
|
-
"row-data":
|
|
2121
|
+
"column-defs": a(U),
|
|
2122
|
+
"row-data": b.value,
|
|
2120
2123
|
"search-value": G.value,
|
|
2121
2124
|
columnVisibility: {
|
|
2122
2125
|
netsuiteSubsidiary: a(v).isEnabled
|
|
@@ -2164,10 +2167,10 @@ const So = { class: "flex items-center gap-12 pl-8" }, To = { class: "flex flex-
|
|
|
2164
2167
|
_: 1
|
|
2165
2168
|
}, 8, ["style", "column-defs", "row-data", "search-value", "columnVisibility", "loading", "page-size"]))
|
|
2166
2169
|
], 2),
|
|
2167
|
-
(
|
|
2170
|
+
(g(), B(at, { to: "body" }, [
|
|
2168
2171
|
p(yo, Dt(Nt(a(N))), null, 16)
|
|
2169
2172
|
])),
|
|
2170
|
-
(
|
|
2173
|
+
(g(), B(at, { to: "body" }, [
|
|
2171
2174
|
p(ie, {
|
|
2172
2175
|
"dismiss-away": "",
|
|
2173
2176
|
modelValue: A.value,
|