@feedmepos/mf-inventory-portal 1.2.8 → 1.2.9
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-D1IJlQS8.js → App-XpX30-FV.js} +1 -1
- package/dist/{ApprovalView-GnDYWZHY.js → ApprovalView-D2J7D_Nm.js} +2 -2
- package/dist/{BindingsDialog-Bs00N9mp.js → BindingsDialog-Uso69RV0.js} +2 -2
- package/dist/{BindingsPicker-LO15pMdZ.js → BindingsPicker-7w_Pih9R.js} +1 -1
- package/dist/{BindingsTable-g27KG9q4.js → BindingsTable-CbV4JqKs.js} +1 -1
- package/dist/{ClosingDraftView-Ddsgcrmg.js → ClosingDraftView-Cs1hLPBv.js} +2 -2
- package/dist/{ClosingTemplateView-G8Ya81UZ.js → ClosingTemplateView-CzDxdTM8.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-qq1rhFKV.js → DeliveryOrderPrintPreview-hVu8tti_.js} +1 -1
- package/dist/{FmAdminBadge-B2NpMmJi.js → FmAdminBadge-UDCFElb7.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C1i9CHE1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CeEFXW2z.js} +3 -3
- package/dist/{FmMultiselectDialog-u2dbuZUp.js → FmMultiselectDialog-Bevvx1r8.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-vpiiv6C1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C0mdy9Mc.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-3T-d1pIb.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BKIf5UrZ.js} +1 -1
- package/dist/{IngredientGroupView-CqB73-e4.js → IngredientGroupView-_eiXCYvr.js} +2 -2
- package/dist/{IngredientsView-Cq42ytcN.js → IngredientsView-okGkhfX0.js} +141 -141
- package/dist/{IntegrationView-OHnUGZst.js → IntegrationView-DYNRksif.js} +4 -4
- package/dist/{InventoryBindingForm-DorgxR-Y.js → InventoryBindingForm-DyFPXbNg.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CZy77tY7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-1AvpT307.js} +3 -3
- package/dist/{InventoryBindingSummary-B_YavyPb.js → InventoryBindingSummary-BnzY__W8.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XuEDo134.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-iCRT5ZID.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Blq1oE5l.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CxhPTM5O.js} +1 -1
- package/dist/{PublishView-Ds_ztGcV.js → PublishView-BGI8t6ZI.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-DnyqN_xE.js → PurchaseOrderPrintPreview-BY0m_m2t.js} +1 -1
- package/dist/{ReceiveRequestView-ChpKsDaF.js → ReceiveRequestView-BN63OwrJ.js} +8 -8
- package/dist/{RecipeView-Dyp9Xcme.js → RecipeView-C6SFIYEV.js} +3 -3
- package/dist/{StockView-D-iP52Zw.js → StockView-DxAqF_Uz.js} +7 -7
- package/dist/{SupplierView-BaEK3C8q.js → SupplierView-BGWP3TQ0.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_ravTwn.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dr6Bst81.js} +6 -6
- package/dist/{TransferTemplateView-3zS7hNZz.js → TransferTemplateView-CSMou2uQ.js} +7 -7
- package/dist/{UnitView-BP5eztAG.js → UnitView-Dvn2OFBI.js} +3 -3
- package/dist/{WarehouseView-DMY7Lgwq.js → WarehouseView-DFIFxlqz.js} +1 -1
- package/dist/{app-P6XaUzjP.js → app-cExTkfVB.js} +207 -207
- package/dist/app.js +1 -1
- package/dist/{closing-template-BGYZPBty.js → closing-template-CIbh7GpK.js} +1 -1
- package/dist/{decimal-wz5HXhQ8.js → decimal-DDB6xkYA.js} +1 -1
- package/dist/{format-unit-display-DOOJqLop.js → format-unit-display-C5nl2Pn9.js} +3 -3
- package/dist/{index-oR0svfBM.js → index-5McubZjo.js} +1 -1
- package/dist/{index-CHTB43Wl.js → index-CYvmWIx7.js} +1 -1
- package/dist/{purchase-order-template-BGunGekw.js → purchase-order-template-DqsMgrgI.js} +1 -1
- package/dist/{stock-TJayQnag.js → stock-DzSlKGZm.js} +1 -1
- package/dist/{supplier-C_vqpE92.js → supplier-m9aBkFoK.js} +1 -1
- package/dist/{use-ingredient-select-dialog-CIahwuTX.js → use-ingredient-select-dialog-et1B0WDI.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BiKRXVhY.js → use-inventory-binding-dialog-B7_YL7HE.js} +1 -1
- package/package.json +2 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as B, h as J, defineComponent as ye, computed as k, resolveComponent as S, openBlock as f, createBlock as D, withCtx as w, createVNode as p, unref as
|
|
2
|
-
import { a as de, e as W, f as Vt, S as Gt, b as Be, h as Kt, D as pt, i as $e, A as Pe, j as It, k as Ct, l as Oe, t as St, m as Jt, n as Ce, o as ze, U as Qt, p as Zt, M as Xt, q as vt, r as ft, c as Ge, s as Le, v as yt, w as en, x as gt, y as Ft, z as tn, B as Mt, C as nn, E as on, I as ln, G as an, H as sn, N as rn, J as un, u as dn, K as cn, _ as mn, L as pn, O as vn, P as bt, Q as fn } from "./app-
|
|
1
|
+
import { ref as B, h as J, defineComponent as ye, computed as k, resolveComponent as S, openBlock as f, createBlock as D, withCtx as w, createVNode as p, unref as s, createElementBlock as E, Fragment as X, createElementVNode as d, createCommentVNode as H, renderSlot as Ve, createTextVNode as qe, toDisplayString as $, normalizeClass as ae, mergeModels as dt, onMounted as jt, watch as wt, useModel as Ht, renderList as ue, isRef as ct, createSlots as Tt, normalizeStyle as Wt, Teleport as mt, normalizeProps as Yt, guardReactiveProps as qt } from "vue";
|
|
2
|
+
import { a as de, e as W, f as Vt, S as Gt, b as Be, h as Kt, D as pt, i as $e, A as Pe, j as It, k as Ct, l as Oe, t as St, m as Jt, n as Ce, o as ze, U as Qt, p as Zt, M as Xt, q as vt, r as ft, c as Ge, s as Le, v as yt, w as en, x as gt, y as Ft, z as tn, B as Mt, C as nn, E as on, I as ln, G as an, H as sn, N as rn, J as un, u as dn, K as cn, _ as mn, L as pn, O as vn, P as bt, Q as fn } from "./app-cExTkfVB.js";
|
|
3
3
|
import { useDialog as Ke, useSnackbar as Se, components as Re, useProxiedModel as ht, useDialogChild as yn, useBreakpoints as gn } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as bn, _ as hn } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { useI18n as ge, useCoreStore as Fe } from "@feedmepos/mf-common";
|
|
6
6
|
import { defineStore as _n, storeToRefs as xn } from "pinia";
|
|
7
7
|
import { g as kn, _ as je, S as He } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
8
|
-
import { _ as wn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as We } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as wn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-1AvpT307.js";
|
|
9
|
+
import { _ as We } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-BKIf5UrZ.js";
|
|
10
10
|
import { _ as fe } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { _ as Tn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
12
|
-
import { u as Et } from "./purchase-order-template-
|
|
13
|
-
import { u as At } from "./closing-template-
|
|
12
|
+
import { u as Et } from "./purchase-order-template-DqsMgrgI.js";
|
|
13
|
+
import { u as At } from "./closing-template-CIbh7GpK.js";
|
|
14
14
|
import { r as Vn } from "./random-CSbEbElR.js";
|
|
15
15
|
import "./array-Ca8T3f_G.js";
|
|
16
|
-
import { u as In } from "./FmMultiselectDialog-
|
|
16
|
+
import { u as In } from "./FmMultiselectDialog-Bevvx1r8.js";
|
|
17
17
|
const Ye = _n("ingredientForm", function() {
|
|
18
18
|
const o = Ke(), v = Se(), l = de(), c = B(!1), { t: g } = ge(), h = B();
|
|
19
19
|
function y() {
|
|
@@ -38,7 +38,7 @@ const Ye = _n("ingredientForm", function() {
|
|
|
38
38
|
};
|
|
39
39
|
h.value = r;
|
|
40
40
|
}
|
|
41
|
-
async function
|
|
41
|
+
async function a(i) {
|
|
42
42
|
c.value = !0;
|
|
43
43
|
try {
|
|
44
44
|
await l.deleteSku(i), v.open({
|
|
@@ -81,7 +81,7 @@ const Ye = _n("ingredientForm", function() {
|
|
|
81
81
|
text: g("common.cancel"),
|
|
82
82
|
close: !0
|
|
83
83
|
}
|
|
84
|
-
}).onPrimary(() =>
|
|
84
|
+
}).onPrimary(() => a(i));
|
|
85
85
|
}
|
|
86
86
|
return {
|
|
87
87
|
createIngredient: y,
|
|
@@ -94,13 +94,13 @@ const Ye = _n("ingredientForm", function() {
|
|
|
94
94
|
function Cn() {
|
|
95
95
|
const { updateIngredient: u, deleteIngredient: o } = Ye(), v = de(), l = Be(), { t: c } = ge();
|
|
96
96
|
async function g(y, n) {
|
|
97
|
-
const
|
|
97
|
+
const a = Vt(n);
|
|
98
98
|
if (y === $e.Edit) {
|
|
99
|
-
await u(
|
|
99
|
+
await u(a);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
if (y === $e.Delete) {
|
|
103
|
-
await o(
|
|
103
|
+
await o(a);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -117,7 +117,7 @@ function Cn() {
|
|
|
117
117
|
enableSorting: !0,
|
|
118
118
|
size: 300,
|
|
119
119
|
cell(y) {
|
|
120
|
-
const n = y.row.original,
|
|
120
|
+
const n = y.row.original, a = v.skuBindingFlattenCache[n._id], m = a == null ? void 0 : a.inventoryBindings.some(
|
|
121
121
|
(i) => "error" in i && i.reason === "circularDependency"
|
|
122
122
|
);
|
|
123
123
|
return J("div", { class: "flex items-center w-full gap-4" }, [
|
|
@@ -146,16 +146,16 @@ function Cn() {
|
|
|
146
146
|
header: () => c("inventory.ingredient.unit"),
|
|
147
147
|
accessorFn: (y) => _t(y),
|
|
148
148
|
cell(y) {
|
|
149
|
-
const n = y.row.original,
|
|
149
|
+
const n = y.row.original, a = _t(n);
|
|
150
150
|
return J(
|
|
151
151
|
Re.FmTooltip,
|
|
152
|
-
{ zIndex: 51, content:
|
|
152
|
+
{ zIndex: 51, content: a },
|
|
153
153
|
J(
|
|
154
154
|
"span",
|
|
155
155
|
{
|
|
156
156
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
157
157
|
},
|
|
158
|
-
|
|
158
|
+
a
|
|
159
159
|
)
|
|
160
160
|
);
|
|
161
161
|
},
|
|
@@ -184,7 +184,7 @@ function Cn() {
|
|
|
184
184
|
accessorKey: "netsuiteSubsidiary",
|
|
185
185
|
header: () => "NetSuite Subsidiary",
|
|
186
186
|
cell(y) {
|
|
187
|
-
const n = y.row.original, { includeChildren:
|
|
187
|
+
const n = y.row.original, { includeChildren: a, subsidiaryNames: m } = l.getSkuSubsidiaries(n._id);
|
|
188
188
|
return J(
|
|
189
189
|
Re.FmTooltip,
|
|
190
190
|
{ zIndex: 51, variant: "rich" },
|
|
@@ -198,7 +198,7 @@ function Cn() {
|
|
|
198
198
|
),
|
|
199
199
|
content: () => J("div", { class: "flex flex-col" }, [
|
|
200
200
|
J("div", { class: "font-semibold" }, [
|
|
201
|
-
|
|
201
|
+
a ? J("span", { class: "text-green-500" }, "Include ") : J("span", { class: "text-red-500" }, "Not Include "),
|
|
202
202
|
"Children Subsidiaries"
|
|
203
203
|
]),
|
|
204
204
|
J(
|
|
@@ -277,7 +277,7 @@ const Sn = /* @__PURE__ */ ye({
|
|
|
277
277
|
}) : g("update:modelValue", null);
|
|
278
278
|
}
|
|
279
279
|
}), n = k(() => kn(l.value));
|
|
280
|
-
function
|
|
280
|
+
function a(r) {
|
|
281
281
|
const T = v.modelValue ?? {};
|
|
282
282
|
T.measurement = r ? `${r}` : null, g("update:modelValue", T);
|
|
283
283
|
}
|
|
@@ -303,17 +303,17 @@ const Sn = /* @__PURE__ */ ye({
|
|
|
303
303
|
value: "",
|
|
304
304
|
"model-value": y.value,
|
|
305
305
|
"onUpdate:modelValue": T[0] || (T[0] = (V) => y.value = V),
|
|
306
|
-
label:
|
|
307
|
-
sublabel:
|
|
306
|
+
label: s(h)("inventory.ingredient.convertible.title"),
|
|
307
|
+
sublabel: s(h)("inventory.ingredient.convertible.subtitle"),
|
|
308
308
|
labelPlacement: "right",
|
|
309
309
|
disabled: r.readonly
|
|
310
310
|
}, null, 8, ["model-value", "label", "sublabel", "disabled"]),
|
|
311
311
|
y.value ? (f(), E(X, { key: 0 }, [
|
|
312
312
|
d("div", null, [
|
|
313
313
|
p(R, {
|
|
314
|
-
label:
|
|
314
|
+
label: s(h)("inventory.ingredient.convertible.convertTo"),
|
|
315
315
|
modelValue: (U = i.value) == null ? void 0 : U.value,
|
|
316
|
-
"onUpdate:modelValue":
|
|
316
|
+
"onUpdate:modelValue": a,
|
|
317
317
|
items: n.value,
|
|
318
318
|
disabled: r.readonly
|
|
319
319
|
}, null, 8, ["label", "modelValue", "items", "disabled"])
|
|
@@ -323,7 +323,7 @@ const Sn = /* @__PURE__ */ ye({
|
|
|
323
323
|
"model-value": ((j = r.modelValue) == null ? void 0 : j.inventoryBindings) ?? [],
|
|
324
324
|
"onUpdate:modelValue": m,
|
|
325
325
|
"exclude-binding-id": c.value,
|
|
326
|
-
rules: [
|
|
326
|
+
rules: [s(Pe)(1)],
|
|
327
327
|
readonly: r.readonly
|
|
328
328
|
}, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
|
|
329
329
|
], 64)) : H("", !0)
|
|
@@ -455,7 +455,7 @@ const Fn = {
|
|
|
455
455
|
var nt;
|
|
456
456
|
const { t: l } = ge(), c = Ke();
|
|
457
457
|
Se();
|
|
458
|
-
const g = Et(), h = It(), y = At(), n = u,
|
|
458
|
+
const g = Et(), h = It(), y = At(), n = u, a = v, m = de(), i = Fe(), r = Ge(), T = Be(), A = k(() => T.isEnabled);
|
|
459
459
|
B(void 0);
|
|
460
460
|
const R = B([]), G = B([]), U = B([]), j = B(!1);
|
|
461
461
|
function V(e) {
|
|
@@ -463,7 +463,7 @@ const Fn = {
|
|
|
463
463
|
const t = e[0], x = n.modelValue ?? {
|
|
464
464
|
unit: m.units.find((C) => C)
|
|
465
465
|
};
|
|
466
|
-
x.unit || (x.unit = t,
|
|
466
|
+
x.unit || (x.unit = t, a("update:modelValue", x));
|
|
467
467
|
}
|
|
468
468
|
jt(() => {
|
|
469
469
|
V(m.units), n.mode === W.CREATE && (r.mustUsePoTemplate && ke(), r.enableWastageTemplate && be(), r.enableClosingTemplate && ce());
|
|
@@ -471,7 +471,7 @@ const Fn = {
|
|
|
471
471
|
V(e);
|
|
472
472
|
});
|
|
473
473
|
function xe() {
|
|
474
|
-
|
|
474
|
+
a("click:submit");
|
|
475
475
|
}
|
|
476
476
|
async function ke() {
|
|
477
477
|
R.value = [], j.value = !0;
|
|
@@ -521,7 +521,7 @@ const Fn = {
|
|
|
521
521
|
const t = n.modelValue ? {
|
|
522
522
|
...n.modelValue
|
|
523
523
|
} : {};
|
|
524
|
-
t.code = e,
|
|
524
|
+
t.code = e, a("update:modelValue", t);
|
|
525
525
|
}
|
|
526
526
|
}), he = k({
|
|
527
527
|
get() {
|
|
@@ -532,7 +532,7 @@ const Fn = {
|
|
|
532
532
|
const t = n.modelValue ? {
|
|
533
533
|
...n.modelValue
|
|
534
534
|
} : {};
|
|
535
|
-
t.isInactive = e,
|
|
535
|
+
t.isInactive = e, a("update:modelValue", t);
|
|
536
536
|
}
|
|
537
537
|
}), ee = k({
|
|
538
538
|
get() {
|
|
@@ -543,7 +543,7 @@ const Fn = {
|
|
|
543
543
|
const t = n.modelValue ? {
|
|
544
544
|
...n.modelValue
|
|
545
545
|
} : {};
|
|
546
|
-
t.name = e,
|
|
546
|
+
t.name = e, a("update:modelValue", t);
|
|
547
547
|
}
|
|
548
548
|
}), me = k({
|
|
549
549
|
get() {
|
|
@@ -571,7 +571,7 @@ const Fn = {
|
|
|
571
571
|
}), t.defaultCost.costPerUnit = {
|
|
572
572
|
...t.defaultCost.costPerUnit,
|
|
573
573
|
...St(+e, 4)
|
|
574
|
-
},
|
|
574
|
+
}, a("update:modelValue", t);
|
|
575
575
|
}
|
|
576
576
|
}), pe = k(() => {
|
|
577
577
|
var t, x, C;
|
|
@@ -628,7 +628,7 @@ const Fn = {
|
|
|
628
628
|
currency: ((ne = Oe(i.currentCountry.value)) == null ? void 0 : ne.currency) ?? "MYR"
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
}),
|
|
631
|
+
}), a("update:modelValue", z);
|
|
632
632
|
}
|
|
633
633
|
const L = k({
|
|
634
634
|
get() {
|
|
@@ -639,7 +639,7 @@ const Fn = {
|
|
|
639
639
|
const t = n.modelValue ? {
|
|
640
640
|
...n.modelValue
|
|
641
641
|
} : {};
|
|
642
|
-
e ? t.convert = e : t.convert = null,
|
|
642
|
+
e ? t.convert = e : t.convert = null, a("update:modelValue", t);
|
|
643
643
|
}
|
|
644
644
|
}), Q = k(() => Ce.options.filter(
|
|
645
645
|
(e) => e === Ce.enum.FIFO || e === Ce.enum.WAVG
|
|
@@ -655,7 +655,7 @@ const Fn = {
|
|
|
655
655
|
const t = n.modelValue ? {
|
|
656
656
|
...n.modelValue
|
|
657
657
|
} : {};
|
|
658
|
-
t.valuation = e,
|
|
658
|
+
t.valuation = e, a("update:modelValue", t);
|
|
659
659
|
}
|
|
660
660
|
}), P = k({
|
|
661
661
|
get() {
|
|
@@ -666,7 +666,7 @@ const Fn = {
|
|
|
666
666
|
const t = n.modelValue ? {
|
|
667
667
|
...n.modelValue
|
|
668
668
|
} : {};
|
|
669
|
-
t.customAttributes = e,
|
|
669
|
+
t.customAttributes = e, a("update:modelValue", t);
|
|
670
670
|
}
|
|
671
671
|
}), N = B();
|
|
672
672
|
o({
|
|
@@ -732,7 +732,7 @@ const Fn = {
|
|
|
732
732
|
const x = n.modelValue ? {
|
|
733
733
|
...n.modelValue
|
|
734
734
|
} : {};
|
|
735
|
-
x.thresholds = t,
|
|
735
|
+
x.thresholds = t, a("update:modelValue", x);
|
|
736
736
|
}
|
|
737
737
|
}), ie = k({
|
|
738
738
|
get() {
|
|
@@ -746,7 +746,7 @@ const Fn = {
|
|
|
746
746
|
const x = n.modelValue ? {
|
|
747
747
|
...n.modelValue
|
|
748
748
|
} : {};
|
|
749
|
-
x.thresholds = t,
|
|
749
|
+
x.thresholds = t, a("update:modelValue", x);
|
|
750
750
|
}
|
|
751
751
|
}), Je = k(() => r.mustUsePoTemplate && n.mode === W.CREATE && R.value.length > 0 ? R.value.map((e) => ({
|
|
752
752
|
label: e.name || "Template",
|
|
@@ -783,7 +783,7 @@ const Fn = {
|
|
|
783
783
|
variant: "tertiary"
|
|
784
784
|
}
|
|
785
785
|
}).onPrimary((e) => {
|
|
786
|
-
|
|
786
|
+
a("update:purchaseOrderTemplateIds", e);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
function Pt() {
|
|
@@ -805,7 +805,7 @@ const Fn = {
|
|
|
805
805
|
variant: "tertiary"
|
|
806
806
|
}
|
|
807
807
|
}).onPrimary((e) => {
|
|
808
|
-
|
|
808
|
+
a("update:wastageTemplateIds", e);
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
811
|
function Ot() {
|
|
@@ -827,7 +827,7 @@ const Fn = {
|
|
|
827
827
|
variant: "tertiary"
|
|
828
828
|
}
|
|
829
829
|
}).onPrimary((e) => {
|
|
830
|
-
|
|
830
|
+
a("update:closingTemplateIds", e);
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
833
|
function Bt() {
|
|
@@ -852,7 +852,7 @@ const Fn = {
|
|
|
852
852
|
p(Ie, {
|
|
853
853
|
"tooltip-message": "This field is managed by NetSuite",
|
|
854
854
|
"tooltip-z-index": 50,
|
|
855
|
-
label:
|
|
855
|
+
label: s(l)("inventory.ingredient.code"),
|
|
856
856
|
"model-value": se.value,
|
|
857
857
|
"onUpdate:modelValue": t[1] || (t[1] = (I) => se.value = I),
|
|
858
858
|
locked: A.value,
|
|
@@ -860,10 +860,10 @@ const Fn = {
|
|
|
860
860
|
}, {
|
|
861
861
|
default: w(() => [
|
|
862
862
|
p(x, {
|
|
863
|
-
label:
|
|
863
|
+
label: s(l)("inventory.ingredient.code"),
|
|
864
864
|
"model-value": se.value,
|
|
865
865
|
"onUpdate:modelValue": t[0] || (t[0] = (I) => se.value = I),
|
|
866
|
-
rules: [
|
|
866
|
+
rules: [s(ze)(), s(Qt)(Me.value, Ee.value)],
|
|
867
867
|
"label-mark": "required"
|
|
868
868
|
}, null, 8, ["label", "model-value", "rules"])
|
|
869
869
|
]),
|
|
@@ -874,7 +874,7 @@ const Fn = {
|
|
|
874
874
|
p(Ie, {
|
|
875
875
|
"tooltip-message": "This field is managed by NetSuite",
|
|
876
876
|
"tooltip-z-index": 50,
|
|
877
|
-
label:
|
|
877
|
+
label: s(l)("inventory.ingredient.name"),
|
|
878
878
|
"model-value": ee.value,
|
|
879
879
|
"onUpdate:modelValue": t[3] || (t[3] = (I) => ee.value = I),
|
|
880
880
|
locked: A.value,
|
|
@@ -882,10 +882,10 @@ const Fn = {
|
|
|
882
882
|
}, {
|
|
883
883
|
default: w(() => [
|
|
884
884
|
p(x, {
|
|
885
|
-
label:
|
|
885
|
+
label: s(l)("inventory.ingredient.name"),
|
|
886
886
|
"model-value": ee.value,
|
|
887
887
|
"onUpdate:modelValue": t[2] || (t[2] = (I) => ee.value = I),
|
|
888
|
-
rules: [
|
|
888
|
+
rules: [s(ze)()],
|
|
889
889
|
"label-mark": "required"
|
|
890
890
|
}, null, 8, ["label", "model-value", "rules"])
|
|
891
891
|
]),
|
|
@@ -896,7 +896,7 @@ const Fn = {
|
|
|
896
896
|
p(Ie, {
|
|
897
897
|
"tooltip-message": "This field is managed by NetSuite",
|
|
898
898
|
"tooltip-z-index": 50,
|
|
899
|
-
label:
|
|
899
|
+
label: s(l)("inventory.ingredient.unit"),
|
|
900
900
|
"helper-text": (st = e.modelValue) != null && st.trackingMeasurement ? `Base unit: ${(it = (rt = e.modelValue) == null ? void 0 : rt.unit) == null ? void 0 : it.name}` : void 0,
|
|
901
901
|
"model-value": (ut = pe.value) == null ? void 0 : ut.name,
|
|
902
902
|
locked: A.value,
|
|
@@ -905,12 +905,12 @@ const Fn = {
|
|
|
905
905
|
default: w(() => [
|
|
906
906
|
p(ot, {
|
|
907
907
|
"model-value": pe.value,
|
|
908
|
-
rules: [
|
|
908
|
+
rules: [s(ze)()],
|
|
909
909
|
"label-mark": "required"
|
|
910
910
|
}, {
|
|
911
911
|
label: w(() => [
|
|
912
912
|
p(C, {
|
|
913
|
-
label:
|
|
913
|
+
label: s(l)("inventory.ingredient.unit")
|
|
914
914
|
}, null, 8, ["label"])
|
|
915
915
|
]),
|
|
916
916
|
default: w(({ invalid: I }) => [
|
|
@@ -977,12 +977,12 @@ const Fn = {
|
|
|
977
977
|
]),
|
|
978
978
|
_: 1
|
|
979
979
|
}, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
|
|
980
|
-
|
|
980
|
+
s(r).enableTotalCost ? (f(), D(Ie, {
|
|
981
981
|
key: 0,
|
|
982
982
|
"tooltip-message": "This field is managed by NetSuite",
|
|
983
983
|
"tooltip-z-index": 50,
|
|
984
|
-
label:
|
|
985
|
-
"model-value":
|
|
984
|
+
label: s(l)("inventory.ingredient.valuationMethod.title"),
|
|
985
|
+
"model-value": s(l)("inventory.ingredient.valuationMethod." + re.value),
|
|
986
986
|
locked: A.value,
|
|
987
987
|
disabled: e.disabled
|
|
988
988
|
}, {
|
|
@@ -990,7 +990,7 @@ const Fn = {
|
|
|
990
990
|
p(fe, { "z-index": 50 }, {
|
|
991
991
|
default: w(() => [
|
|
992
992
|
p(C, {
|
|
993
|
-
label:
|
|
993
|
+
label: s(l)("inventory.ingredient.valuationMethod.title")
|
|
994
994
|
}, null, 8, ["label"])
|
|
995
995
|
]),
|
|
996
996
|
_: 1
|
|
@@ -999,7 +999,7 @@ const Fn = {
|
|
|
999
999
|
default: w(() => [
|
|
1000
1000
|
p(Nt, {
|
|
1001
1001
|
class: "col-span-2",
|
|
1002
|
-
label:
|
|
1002
|
+
label: s(l)("inventory.ingredient.valuationMethod.title"),
|
|
1003
1003
|
"model-value": re.value,
|
|
1004
1004
|
"onUpdate:modelValue": t[5] || (t[5] = (I) => re.value = I),
|
|
1005
1005
|
items: Q.value
|
|
@@ -1007,11 +1007,11 @@ const Fn = {
|
|
|
1007
1007
|
]),
|
|
1008
1008
|
_: 1
|
|
1009
1009
|
}, 8, ["label", "model-value", "locked", "disabled"])) : H("", !0),
|
|
1010
|
-
|
|
1010
|
+
s(r).enableTotalCost ? (f(), D(Ie, {
|
|
1011
1011
|
key: 1,
|
|
1012
1012
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1013
1013
|
"tooltip-z-index": 50,
|
|
1014
|
-
"model-value": `${
|
|
1014
|
+
"model-value": `${s(Zt)()} ${me.value}`,
|
|
1015
1015
|
locked: A.value,
|
|
1016
1016
|
disabled: e.disabled
|
|
1017
1017
|
}, {
|
|
@@ -1019,7 +1019,7 @@ const Fn = {
|
|
|
1019
1019
|
p(fe, { "z-index": 50 }, {
|
|
1020
1020
|
default: w(() => [
|
|
1021
1021
|
p(C, {
|
|
1022
|
-
label:
|
|
1022
|
+
label: s(l)("inventory.ingredient.pricePerUnit")
|
|
1023
1023
|
}, null, 8, ["label"])
|
|
1024
1024
|
]),
|
|
1025
1025
|
_: 1
|
|
@@ -1029,13 +1029,13 @@ const Fn = {
|
|
|
1029
1029
|
p(x, {
|
|
1030
1030
|
"model-value": me.value,
|
|
1031
1031
|
"onUpdate:modelValue": t[6] || (t[6] = (I) => me.value = I),
|
|
1032
|
-
rules: [
|
|
1032
|
+
rules: [s(Pe)(0), s(Xt)(4)]
|
|
1033
1033
|
}, {
|
|
1034
1034
|
label: w(() => [
|
|
1035
1035
|
p(fe, { "z-index": 50 }, {
|
|
1036
1036
|
default: w(() => [
|
|
1037
1037
|
p(C, {
|
|
1038
|
-
label:
|
|
1038
|
+
label: s(l)("inventory.ingredient.pricePerUnit")
|
|
1039
1039
|
}, null, 8, ["label"])
|
|
1040
1040
|
]),
|
|
1041
1041
|
_: 1
|
|
@@ -1044,7 +1044,7 @@ const Fn = {
|
|
|
1044
1044
|
prepend: w(() => {
|
|
1045
1045
|
var I, Z;
|
|
1046
1046
|
return [
|
|
1047
|
-
d("div", $n, $(
|
|
1047
|
+
d("div", $n, $(s(vt)(((I = s(i).currentCountry) == null ? void 0 : I.value) ?? s(ft)) === "MYR" ? "RM" : s(vt)(((Z = s(i).currentCountry) == null ? void 0 : Z.value) ?? s(ft))), 1)
|
|
1048
1048
|
];
|
|
1049
1049
|
}),
|
|
1050
1050
|
append: w(() => [
|
|
@@ -1062,22 +1062,22 @@ const Fn = {
|
|
|
1062
1062
|
"root-value": e.modelValue,
|
|
1063
1063
|
readonly: A.value
|
|
1064
1064
|
}, null, 8, ["model-value", "root-value", "readonly"])) : H("", !0),
|
|
1065
|
-
e.mode !==
|
|
1065
|
+
e.mode !== s(W).CREATE ? (f(), E("div", Pn, [
|
|
1066
1066
|
p(lt, {
|
|
1067
|
-
label:
|
|
1067
|
+
label: s(l)("inventory.ingredient.status.inactive"),
|
|
1068
1068
|
"model-value": he.value,
|
|
1069
1069
|
"onUpdate:modelValue": t[8] || (t[8] = (I) => he.value = I),
|
|
1070
1070
|
"label-placement": "right",
|
|
1071
1071
|
disabled: A.value
|
|
1072
1072
|
}, null, 8, ["label", "model-value", "disabled"]),
|
|
1073
1073
|
d("div", On, [
|
|
1074
|
-
d("div", Bn, $(
|
|
1074
|
+
d("div", Bn, $(s(l)("inventory.ingredient.status.preventFromOrder")), 1)
|
|
1075
1075
|
])
|
|
1076
1076
|
])) : H("", !0),
|
|
1077
|
-
e.mode !==
|
|
1077
|
+
e.mode !== s(W).CREATE ? (f(), E("div", Dn, [
|
|
1078
1078
|
d("div", null, [
|
|
1079
1079
|
p(lt, {
|
|
1080
|
-
label:
|
|
1080
|
+
label: s(l)("inventory.ingredient.bindedItems.title"),
|
|
1081
1081
|
modelValue: O.value,
|
|
1082
1082
|
"onUpdate:modelValue": t[9] || (t[9] = (I) => O.value = I),
|
|
1083
1083
|
"label-placement": "right"
|
|
@@ -1085,17 +1085,17 @@ const Fn = {
|
|
|
1085
1085
|
]),
|
|
1086
1086
|
O.value && Y.value.length ? (f(), D(We, {
|
|
1087
1087
|
key: 0,
|
|
1088
|
-
name:
|
|
1088
|
+
name: s(l)("inventory.ingredient.bindedItems.ingredient"),
|
|
1089
1089
|
bindings: Y.value
|
|
1090
1090
|
}, null, 8, ["name", "bindings"])) : H("", !0),
|
|
1091
1091
|
O.value && oe.value.length ? (f(), D(We, {
|
|
1092
1092
|
key: 1,
|
|
1093
|
-
name:
|
|
1093
|
+
name: s(l)("inventory.ingredient.bindedItems.recipe"),
|
|
1094
1094
|
bindings: oe.value
|
|
1095
1095
|
}, null, 8, ["name", "bindings"])) : H("", !0),
|
|
1096
1096
|
O.value && ve.value.length ? (f(), D(We, {
|
|
1097
1097
|
key: 2,
|
|
1098
|
-
name:
|
|
1098
|
+
name: s(l)("inventory.ingredient.bindedItems.menu"),
|
|
1099
1099
|
bindings: ve.value
|
|
1100
1100
|
}, null, 8, ["name", "bindings"])) : H("", !0)
|
|
1101
1101
|
])) : H("", !0),
|
|
@@ -1103,11 +1103,11 @@ const Fn = {
|
|
|
1103
1103
|
d("div", zn, [
|
|
1104
1104
|
p(fe, null, {
|
|
1105
1105
|
default: w(() => [
|
|
1106
|
-
d("div", Ln, $(
|
|
1106
|
+
d("div", Ln, $(s(l)("inventory.ingredient.threshold.title")), 1)
|
|
1107
1107
|
]),
|
|
1108
1108
|
_: 1
|
|
1109
1109
|
}),
|
|
1110
|
-
d("div", jn, $(
|
|
1110
|
+
d("div", jn, $(s(l)("inventory.ingredient.threshold.subtitle")), 1)
|
|
1111
1111
|
]),
|
|
1112
1112
|
d("div", Hn, [
|
|
1113
1113
|
p(ot, {
|
|
@@ -1119,15 +1119,15 @@ const Fn = {
|
|
|
1119
1119
|
d("div", qn, [
|
|
1120
1120
|
p(je, {
|
|
1121
1121
|
days: le.value,
|
|
1122
|
-
level:
|
|
1122
|
+
level: s(He).low
|
|
1123
1123
|
}, null, 8, ["days", "level"])
|
|
1124
1124
|
]),
|
|
1125
1125
|
d("div", Gn, [
|
|
1126
|
-
d("div", Kn, $(
|
|
1126
|
+
d("div", Kn, $(s(l)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
1127
1127
|
p(at, {
|
|
1128
1128
|
modelValue: le.value,
|
|
1129
1129
|
"onUpdate:modelValue": t[10] || (t[10] = (I) => le.value = I),
|
|
1130
|
-
rules: [
|
|
1130
|
+
rules: [s(Pe)(0)]
|
|
1131
1131
|
}, {
|
|
1132
1132
|
append: w(() => t[13] || (t[13] = [
|
|
1133
1133
|
d("div", {
|
|
@@ -1152,15 +1152,15 @@ const Fn = {
|
|
|
1152
1152
|
d("div", Qn, [
|
|
1153
1153
|
p(je, {
|
|
1154
1154
|
days: ie.value,
|
|
1155
|
-
level:
|
|
1155
|
+
level: s(He).mid
|
|
1156
1156
|
}, null, 8, ["days", "level"])
|
|
1157
1157
|
]),
|
|
1158
1158
|
d("div", Zn, [
|
|
1159
|
-
d("div", Xn, $(
|
|
1159
|
+
d("div", Xn, $(s(l)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
1160
1160
|
p(at, {
|
|
1161
1161
|
modelValue: ie.value,
|
|
1162
1162
|
"onUpdate:modelValue": t[11] || (t[11] = (I) => ie.value = I),
|
|
1163
|
-
rules: [
|
|
1163
|
+
rules: [s(Pe)(0)]
|
|
1164
1164
|
}, {
|
|
1165
1165
|
append: w(() => t[14] || (t[14] = [
|
|
1166
1166
|
d("div", {
|
|
@@ -1185,22 +1185,22 @@ const Fn = {
|
|
|
1185
1185
|
d("div", to, [
|
|
1186
1186
|
p(je, {
|
|
1187
1187
|
days: ie.value + 1,
|
|
1188
|
-
level:
|
|
1188
|
+
level: s(He).high
|
|
1189
1189
|
}, null, 8, ["days", "level"])
|
|
1190
1190
|
]),
|
|
1191
1191
|
d("div", no, [
|
|
1192
|
-
d("div", oo, $(
|
|
1192
|
+
d("div", oo, $(s(l)("inventory.ingredient.threshold.stockIsStaple")), 1)
|
|
1193
1193
|
])
|
|
1194
1194
|
])
|
|
1195
1195
|
])
|
|
1196
1196
|
])
|
|
1197
1197
|
]),
|
|
1198
|
-
|
|
1198
|
+
s(r).mustUsePoTemplate && e.mode === s(W).CREATE ? (f(), E("div", lo, [
|
|
1199
1199
|
d("div", ao, [
|
|
1200
1200
|
d("div", so, [
|
|
1201
1201
|
p(fe, null, {
|
|
1202
1202
|
default: w(() => [
|
|
1203
|
-
d("div", ro, $(
|
|
1203
|
+
d("div", ro, $(s(l)("inventory.ingredient.purchaseOrderTemplates.title")), 1)
|
|
1204
1204
|
]),
|
|
1205
1205
|
_: 1
|
|
1206
1206
|
}),
|
|
@@ -1212,7 +1212,7 @@ const Fn = {
|
|
|
1212
1212
|
onClick: Rt
|
|
1213
1213
|
})
|
|
1214
1214
|
]),
|
|
1215
|
-
d("div", io, $(
|
|
1215
|
+
d("div", io, $(s(l)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
|
|
1216
1216
|
]),
|
|
1217
1217
|
Qe.value.length > 0 ? (f(), E("div", uo, [
|
|
1218
1218
|
d("div", co, [
|
|
@@ -1225,12 +1225,12 @@ const Fn = {
|
|
|
1225
1225
|
])
|
|
1226
1226
|
])) : H("", !0)
|
|
1227
1227
|
])) : H("", !0),
|
|
1228
|
-
|
|
1228
|
+
s(r).enableWastageTemplate && e.mode === s(W).CREATE ? (f(), E("div", mo, [
|
|
1229
1229
|
d("div", po, [
|
|
1230
1230
|
d("div", vo, [
|
|
1231
1231
|
p(fe, null, {
|
|
1232
1232
|
default: w(() => [
|
|
1233
|
-
d("div", fo, $(
|
|
1233
|
+
d("div", fo, $(s(l)("inventory.ingredient.wastageTemplates.title")), 1)
|
|
1234
1234
|
]),
|
|
1235
1235
|
_: 1
|
|
1236
1236
|
}),
|
|
@@ -1242,7 +1242,7 @@ const Fn = {
|
|
|
1242
1242
|
onClick: Pt
|
|
1243
1243
|
})
|
|
1244
1244
|
]),
|
|
1245
|
-
d("div", yo, $(
|
|
1245
|
+
d("div", yo, $(s(l)("inventory.ingredient.wastageTemplates.description")), 1)
|
|
1246
1246
|
]),
|
|
1247
1247
|
Xe.value.length > 0 ? (f(), E("div", go, [
|
|
1248
1248
|
d("div", bo, [
|
|
@@ -1255,12 +1255,12 @@ const Fn = {
|
|
|
1255
1255
|
])
|
|
1256
1256
|
])) : H("", !0)
|
|
1257
1257
|
])) : H("", !0),
|
|
1258
|
-
|
|
1258
|
+
s(r).enableClosingTemplate && e.mode === s(W).CREATE ? (f(), E("div", ho, [
|
|
1259
1259
|
d("div", _o, [
|
|
1260
1260
|
d("div", xo, [
|
|
1261
1261
|
p(fe, null, {
|
|
1262
1262
|
default: w(() => [
|
|
1263
|
-
d("div", ko, $(
|
|
1263
|
+
d("div", ko, $(s(l)("inventory.ingredient.closingTemplates.title")), 1)
|
|
1264
1264
|
]),
|
|
1265
1265
|
_: 1
|
|
1266
1266
|
}),
|
|
@@ -1272,7 +1272,7 @@ const Fn = {
|
|
|
1272
1272
|
onClick: Ot
|
|
1273
1273
|
})
|
|
1274
1274
|
]),
|
|
1275
|
-
d("div", wo, $(
|
|
1275
|
+
d("div", wo, $(s(l)("inventory.ingredient.closingTemplates.description")), 1)
|
|
1276
1276
|
]),
|
|
1277
1277
|
tt.value.length > 0 ? (f(), E("div", To, [
|
|
1278
1278
|
d("div", Vo, [
|
|
@@ -1307,7 +1307,7 @@ const Fn = {
|
|
|
1307
1307
|
},
|
|
1308
1308
|
emits: ["update:show"],
|
|
1309
1309
|
setup(u) {
|
|
1310
|
-
const o = u, v = de(), l = Ge(), c = Be(), g = Et(), h = It(), y = At(), n = Se(), { t:
|
|
1310
|
+
const o = u, v = de(), l = Ge(), c = Be(), g = Et(), h = It(), y = At(), n = Se(), { t: a } = ge(), m = ht(o, "show"), i = ht(o, "unit"), r = B([]), T = B([]), A = B([]), R = k(
|
|
1311
1311
|
() => {
|
|
1312
1312
|
var _;
|
|
1313
1313
|
return c.isEnabled && c.netSuiteItemBySkuId.has((_ = o.unit) == null ? void 0 : _._id);
|
|
@@ -1317,9 +1317,9 @@ const Fn = {
|
|
|
1317
1317
|
case W.READ:
|
|
1318
1318
|
return "";
|
|
1319
1319
|
case W.UPDATE:
|
|
1320
|
-
return
|
|
1320
|
+
return a("inventory.ingredient.update.title");
|
|
1321
1321
|
case W.CREATE:
|
|
1322
|
-
return
|
|
1322
|
+
return a("inventory.ingredient.create.title");
|
|
1323
1323
|
}
|
|
1324
1324
|
return "";
|
|
1325
1325
|
}), U = k(() => {
|
|
@@ -1327,9 +1327,9 @@ const Fn = {
|
|
|
1327
1327
|
case W.READ:
|
|
1328
1328
|
return "";
|
|
1329
1329
|
case W.UPDATE:
|
|
1330
|
-
return
|
|
1330
|
+
return a("common.save");
|
|
1331
1331
|
case W.CREATE:
|
|
1332
|
-
return
|
|
1332
|
+
return a("common.add");
|
|
1333
1333
|
}
|
|
1334
1334
|
return "";
|
|
1335
1335
|
}), j = B(), V = B(!1);
|
|
@@ -1339,14 +1339,14 @@ const Fn = {
|
|
|
1339
1339
|
await v.createSku(i.value);
|
|
1340
1340
|
const _ = v.skuByCode[i.value.code];
|
|
1341
1341
|
l.enablePoTemplate && r.value.length > 0 && await be(_), l.enableWastageTemplate && T.value.length > 0 && await ce(_), l.enableClosingTemplate && A.value.length > 0 && await se(_), m.value = !1, n.open({
|
|
1342
|
-
title:
|
|
1343
|
-
message:
|
|
1342
|
+
title: a("inventory.common.success"),
|
|
1343
|
+
message: a("inventory.ingredient.create.success", { name: i.value.name }),
|
|
1344
1344
|
type: "success"
|
|
1345
1345
|
});
|
|
1346
1346
|
} catch (_) {
|
|
1347
1347
|
_ instanceof yt || n.open({
|
|
1348
|
-
title:
|
|
1349
|
-
message:
|
|
1348
|
+
title: a("inventory.ingredient.create.error.title"),
|
|
1349
|
+
message: a("inventory.ingredient.create.error.message"),
|
|
1350
1350
|
type: "error"
|
|
1351
1351
|
});
|
|
1352
1352
|
} finally {
|
|
@@ -1357,14 +1357,14 @@ const Fn = {
|
|
|
1357
1357
|
V.value = !0;
|
|
1358
1358
|
try {
|
|
1359
1359
|
await v.updateSku(i.value), V.value = !1, m.value = !1, n.open({
|
|
1360
|
-
title:
|
|
1361
|
-
message:
|
|
1360
|
+
title: a("inventory.common.success"),
|
|
1361
|
+
message: a("inventory.ingredient.update.success", { name: i.value.name }),
|
|
1362
1362
|
type: "success"
|
|
1363
1363
|
});
|
|
1364
1364
|
} catch (_) {
|
|
1365
1365
|
_ instanceof yt || n.open({
|
|
1366
|
-
title:
|
|
1367
|
-
message:
|
|
1366
|
+
title: a("inventory.ingredient.update.error.title"),
|
|
1367
|
+
message: a("inventory.ingredient.update.error.message"),
|
|
1368
1368
|
type: "error"
|
|
1369
1369
|
});
|
|
1370
1370
|
} finally {
|
|
@@ -1403,8 +1403,8 @@ const Fn = {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
} catch (L) {
|
|
1405
1405
|
n.open({
|
|
1406
|
-
title:
|
|
1407
|
-
message:
|
|
1406
|
+
title: a("inventory.transfer.template.update.error"),
|
|
1407
|
+
message: a("inventory.transfer.template.update.errorMessage"),
|
|
1408
1408
|
type: "error"
|
|
1409
1409
|
}), console.error("Error in updating transfer template", L);
|
|
1410
1410
|
}
|
|
@@ -1433,8 +1433,8 @@ const Fn = {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
} catch (M) {
|
|
1435
1435
|
n.open({
|
|
1436
|
-
title:
|
|
1437
|
-
message:
|
|
1436
|
+
title: a("inventory.wastage.template.update.error"),
|
|
1437
|
+
message: a("inventory.wastage.template.update.errorMessage"),
|
|
1438
1438
|
type: "error"
|
|
1439
1439
|
}), console.error("Error in updating wastage template", M);
|
|
1440
1440
|
}
|
|
@@ -1459,8 +1459,8 @@ const Fn = {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
} catch (M) {
|
|
1461
1461
|
n.open({
|
|
1462
|
-
title:
|
|
1463
|
-
message:
|
|
1462
|
+
title: a("inventory.closing.template.update.error"),
|
|
1463
|
+
message: a("inventory.closing.template.update.errorMessage"),
|
|
1464
1464
|
type: "error"
|
|
1465
1465
|
}), console.error("Error in updating closing template", M);
|
|
1466
1466
|
}
|
|
@@ -1491,7 +1491,7 @@ const Fn = {
|
|
|
1491
1491
|
return (_, M) => {
|
|
1492
1492
|
const K = S("FmChip"), F = S("FmButton"), b = S("FmSideSheet");
|
|
1493
1493
|
return f(), D(b, {
|
|
1494
|
-
"model-value":
|
|
1494
|
+
"model-value": s(m),
|
|
1495
1495
|
"onUpdate:modelValue": M[3] || (M[3] = (L) => ct(m) ? m.value = L : null),
|
|
1496
1496
|
header: G.value,
|
|
1497
1497
|
"close-button": "",
|
|
@@ -1507,7 +1507,7 @@ const Fn = {
|
|
|
1507
1507
|
}, null, 8, ["loading", "label"]),
|
|
1508
1508
|
p(F, {
|
|
1509
1509
|
disabled: V.value,
|
|
1510
|
-
label: a
|
|
1510
|
+
label: s(a)("common.close"),
|
|
1511
1511
|
variant: "tertiary",
|
|
1512
1512
|
onClick: M[2] || (M[2] = (L) => m.value = !1)
|
|
1513
1513
|
}, null, 8, ["disabled", "label"])
|
|
@@ -1526,7 +1526,7 @@ const Fn = {
|
|
|
1526
1526
|
class: "w-full",
|
|
1527
1527
|
ref_key: "hasValidationExpose",
|
|
1528
1528
|
ref: j,
|
|
1529
|
-
modelValue:
|
|
1529
|
+
modelValue: s(i),
|
|
1530
1530
|
"onUpdate:modelValue": M[0] || (M[0] = (L) => ct(i) ? i.value = L : null),
|
|
1531
1531
|
mode: _.mode,
|
|
1532
1532
|
disabled: V.value,
|
|
@@ -1634,9 +1634,9 @@ function $o() {
|
|
|
1634
1634
|
["Business ID:", l == null ? void 0 : l._id],
|
|
1635
1635
|
["Menu version", l == null ? void 0 : l.menuVersion],
|
|
1636
1636
|
[],
|
|
1637
|
-
c.map((
|
|
1638
|
-
...o.map((
|
|
1639
|
-
], h = c.map((
|
|
1637
|
+
c.map((a) => a.name),
|
|
1638
|
+
...o.map((a) => c.map((m) => a[m.id]))
|
|
1639
|
+
], h = c.map((a) => `system:${a.id}`), y = Ft(g, h), n = `${l == null ? void 0 : l.name} ingredients (${tn(/* @__PURE__ */ new Date())}).xlsx`;
|
|
1640
1640
|
return Mt(y, n), n;
|
|
1641
1641
|
}
|
|
1642
1642
|
function Ro() {
|
|
@@ -1691,10 +1691,10 @@ function xt(u, o, v) {
|
|
|
1691
1691
|
const V = `Cannot find unit conversion for ${u.baseUnit} with symbol ${u.unit || "[empty]"}.`;
|
|
1692
1692
|
g.push(V);
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1694
|
+
const a = Ce.options.find(
|
|
1695
1695
|
(V) => V === u.valuationMethod
|
|
1696
1696
|
);
|
|
1697
|
-
u.valuationMethod && !
|
|
1697
|
+
u.valuationMethod && !a && g.push(
|
|
1698
1698
|
`Expected valuation method to be one of ${Ce.options.join()} but got ${u.valuationMethod} instead.`
|
|
1699
1699
|
);
|
|
1700
1700
|
const i = Fe().currentCountry.value, r = (V) => `${V}`.length && ln()(V) === !0, T = r(`${u.pricePerUnit}`) === !0 ? {
|
|
@@ -1715,7 +1715,7 @@ function xt(u, o, v) {
|
|
|
1715
1715
|
name: u.name,
|
|
1716
1716
|
unit: y ?? c.find((V) => V) ?? Eo,
|
|
1717
1717
|
trackingMeasurement: n == null ? void 0 : n.id,
|
|
1718
|
-
valuation:
|
|
1718
|
+
valuation: a,
|
|
1719
1719
|
defaultCost: T,
|
|
1720
1720
|
thresholds: A,
|
|
1721
1721
|
...R !== null && { customAttributes: R }
|
|
@@ -1726,12 +1726,12 @@ function xt(u, o, v) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
function Oo(u) {
|
|
1728
1728
|
try {
|
|
1729
|
-
const o = Po(u).filter((
|
|
1730
|
-
(
|
|
1731
|
-
), n = h.map((
|
|
1732
|
-
const m = xt(
|
|
1729
|
+
const o = Po(u).filter((a) => a.data.code), l = de().skus, c = nn(l, "code"), g = o.filter((a) => !c[a.data.code]), h = o.filter((a) => c[a.data.code]), y = g.map(
|
|
1730
|
+
(a) => xt(a.data, a.index, o)
|
|
1731
|
+
), n = h.map((a) => {
|
|
1732
|
+
const m = xt(a.data, a.index, o), i = c[a.data.code];
|
|
1733
1733
|
let r = i.customAttributes;
|
|
1734
|
-
return "customAttributes" in
|
|
1734
|
+
return "customAttributes" in a.data && (r = Ut(a.data.customAttributes)), {
|
|
1735
1735
|
...m,
|
|
1736
1736
|
type: "update",
|
|
1737
1737
|
original: i,
|
|
@@ -1834,7 +1834,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
1834
1834
|
setup(u) {
|
|
1835
1835
|
const o = B(null), v = yn(), l = Se(), c = B(!1), g = B(new Array()), h = B([]), y = B([]), n = k(
|
|
1836
1836
|
() => !!g.value.length || h.value.some((r) => r.errors.length) || y.value.some((r) => r.errors.length)
|
|
1837
|
-
),
|
|
1837
|
+
), a = k(
|
|
1838
1838
|
() => !!h.value.length || !!y.value.length
|
|
1839
1839
|
), { t: m } = ge();
|
|
1840
1840
|
async function i(r) {
|
|
@@ -1878,7 +1878,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
1878
1878
|
}), (r, T) => {
|
|
1879
1879
|
const A = S("FmCircularProgress"), R = S("FmIcon"), G = S("FmButton");
|
|
1880
1880
|
return f(), E("div", jo, [
|
|
1881
|
-
d("div", Ho, $(
|
|
1881
|
+
d("div", Ho, $(s(m)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1882
1882
|
p(an, {
|
|
1883
1883
|
class: ae({
|
|
1884
1884
|
"w-full": !0,
|
|
@@ -1886,8 +1886,8 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
1886
1886
|
}),
|
|
1887
1887
|
accept: ".xlsx",
|
|
1888
1888
|
onFileUpload: T[0] || (T[0] = (U) => o.value = U),
|
|
1889
|
-
label:
|
|
1890
|
-
"button-label":
|
|
1889
|
+
label: s(m)("inventory.ingredient.import.uploadTemplate"),
|
|
1890
|
+
"button-label": s(m)("inventory.ingredient.import.selectFile")
|
|
1891
1891
|
}, Tt({ _: 2 }, [
|
|
1892
1892
|
o.value ? {
|
|
1893
1893
|
name: "default",
|
|
@@ -1926,7 +1926,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
1926
1926
|
], 2),
|
|
1927
1927
|
c.value ? H("", !0) : (f(), E("div", qo, [
|
|
1928
1928
|
p(G, {
|
|
1929
|
-
label:
|
|
1929
|
+
label: s(m)("inventory.ingredient.import.replaceFile"),
|
|
1930
1930
|
variant: n.value ? "destructive" : "secondary",
|
|
1931
1931
|
"prepend-icon": n.value ? void 0 : "autorenew",
|
|
1932
1932
|
onClick: U
|
|
@@ -1951,8 +1951,8 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
1951
1951
|
key: "0"
|
|
1952
1952
|
} : void 0
|
|
1953
1953
|
]), 1032, ["class", "label", "button-label"]),
|
|
1954
|
-
|
|
1955
|
-
d("div", Qo, $(
|
|
1954
|
+
a.value ? (f(), E("div", Jo, [
|
|
1955
|
+
d("div", Qo, $(s(m)("inventory.ingredient.import.summary")), 1),
|
|
1956
1956
|
(f(!0), E(X, null, ue(h.value, (U) => (f(), D(kt, {
|
|
1957
1957
|
key: U.sku._id,
|
|
1958
1958
|
code: U.sku.code,
|
|
@@ -2017,7 +2017,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
2017
2017
|
},
|
|
2018
2018
|
F
|
|
2019
2019
|
));
|
|
2020
|
-
}), y = dn(), n = Ke(),
|
|
2020
|
+
}), y = dn(), n = Ke(), a = In(), m = Se(), { t: i } = ge(), { createIngredient: r, updateIngredient: T } = Ye(), { ingredientDialogProps: A, ingredientViewLoading: R } = xn(Ye()), { columnDefs: G } = Cn();
|
|
2021
2021
|
function U(F) {
|
|
2022
2022
|
switch (F) {
|
|
2023
2023
|
case "add":
|
|
@@ -2156,7 +2156,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
2156
2156
|
m.open({
|
|
2157
2157
|
title: i("inventory.ingredient.import.success"),
|
|
2158
2158
|
type: "success"
|
|
2159
|
-
}), P.length &&
|
|
2159
|
+
}), P.length && a.alert(
|
|
2160
2160
|
"Some operation failed",
|
|
2161
2161
|
J(
|
|
2162
2162
|
"div",
|
|
@@ -2186,7 +2186,7 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
2186
2186
|
return (F, b) => {
|
|
2187
2187
|
const L = S("FmTable"), Q = S("FmCollapsibleTabs"), re = S("FmBottomSheet");
|
|
2188
2188
|
return f(), D(mn, {
|
|
2189
|
-
title:
|
|
2189
|
+
title: s(i)("inventory.ingredient.title"),
|
|
2190
2190
|
actions: we.value,
|
|
2191
2191
|
"onClick:action": U
|
|
2192
2192
|
}, {
|
|
@@ -2211,35 +2211,35 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
2211
2211
|
}, null, 8, ["search", "filter-attributes", "filter"]),
|
|
2212
2212
|
(f(), D(L, {
|
|
2213
2213
|
key: JSON.stringify(c.value),
|
|
2214
|
-
style: Wt(
|
|
2215
|
-
"column-defs":
|
|
2214
|
+
style: Wt(s(he).tableHeight),
|
|
2215
|
+
"column-defs": s(G),
|
|
2216
2216
|
"row-data": h.value,
|
|
2217
2217
|
"search-value": j.value,
|
|
2218
2218
|
columnVisibility: {
|
|
2219
|
-
netsuiteSubsidiary:
|
|
2219
|
+
netsuiteSubsidiary: !1
|
|
2220
2220
|
},
|
|
2221
|
-
loading: (!
|
|
2221
|
+
loading: (!s(y)._currentLocation || xe.value) && s(v).isReady,
|
|
2222
2222
|
"loading-text": "Loading",
|
|
2223
|
-
onRowClick: b[2] || (b[2] = (P) =>
|
|
2223
|
+
onRowClick: b[2] || (b[2] = (P) => s(T)(P.original)),
|
|
2224
2224
|
"page-size": se.value
|
|
2225
2225
|
}, {
|
|
2226
2226
|
"list-row": w((P) => [
|
|
2227
2227
|
p(vn, {
|
|
2228
2228
|
row: P,
|
|
2229
|
-
onRowClick:
|
|
2229
|
+
onRowClick: s(T)
|
|
2230
2230
|
}, Tt({
|
|
2231
2231
|
default: w((N) => {
|
|
2232
2232
|
var O, Y, oe, ve, Me, Ee, Ae, Ue, le, ie;
|
|
2233
2233
|
return [
|
|
2234
2234
|
d("div", Xo, [
|
|
2235
2235
|
d("div", el, [
|
|
2236
|
-
p(
|
|
2236
|
+
p(s(bt), {
|
|
2237
2237
|
render: (oe = (Y = (O = N.code) == null ? void 0 : O.column) == null ? void 0 : Y.columnDef) == null ? void 0 : oe.cell,
|
|
2238
2238
|
props: (Me = (ve = N.code) == null ? void 0 : ve.getContext) == null ? void 0 : Me.call(ve)
|
|
2239
2239
|
}, null, 8, ["render", "props"])
|
|
2240
2240
|
]),
|
|
2241
2241
|
d("div", tl, [
|
|
2242
|
-
p(
|
|
2242
|
+
p(s(bt), {
|
|
2243
2243
|
render: (Ue = (Ae = (Ee = N.name) == null ? void 0 : Ee.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Ue.cell,
|
|
2244
2244
|
props: (ie = (le = N.name) == null ? void 0 : le.getContext) == null ? void 0 : ie.call(le)
|
|
2245
2245
|
}, null, 8, ["render", "props"])
|
|
@@ -2252,17 +2252,17 @@ const Bo = { class: "flex items-center gap-12 pl-8" }, Do = { class: "flex flex-
|
|
|
2252
2252
|
V.value ? {
|
|
2253
2253
|
name: "loading-text",
|
|
2254
2254
|
fn: w(() => [
|
|
2255
|
-
d("div", null, $(
|
|
2255
|
+
d("div", null, $(s(i)("inventory.ingredient.table.importing")), 1)
|
|
2256
2256
|
]),
|
|
2257
2257
|
key: "0"
|
|
2258
2258
|
} : void 0
|
|
2259
2259
|
]), 1032, ["row", "onRowClick"])
|
|
2260
2260
|
]),
|
|
2261
2261
|
_: 1
|
|
2262
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "
|
|
2262
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2263
2263
|
], 2),
|
|
2264
2264
|
(f(), D(mt, { to: "body" }, [
|
|
2265
|
-
p(Fo, Yt(qt(
|
|
2265
|
+
p(Fo, Yt(qt(s(A))), null, 16)
|
|
2266
2266
|
])),
|
|
2267
2267
|
(f(), D(mt, { to: "body" }, [
|
|
2268
2268
|
p(re, {
|