@feedmepos/mf-inventory-portal 0.0.23-dev.42 → 0.0.23-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/{App-Cr-n7HVf.js → App-Bu28H-qV.js} +66 -63
- package/dist/{ApprovalView-BYHDmt9W.js → ApprovalView-Cgb6Getu.js} +20 -20
- package/dist/{BindingsDialog-CI0nYM1_.js → BindingsDialog-DGtPuzr1.js} +2 -2
- package/dist/{BindingsPicker-BVzF3C8O.js → BindingsPicker-BamL3_Vk.js} +3 -3
- package/dist/{BindingsTable-B21_9L2o.js → BindingsTable-C9FeglE4.js} +1 -1
- package/dist/{ClosingDraftView-k2Vsz8-W.js → ClosingDraftView-C_B1u3g1.js} +47 -47
- package/dist/{ClosingTemplateView-BLda7tYC.js → ClosingTemplateView-BxK3yAV4.js} +21 -21
- package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-DUDOaU6F.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-DAWPJ65s.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CXuer_x5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D1PU7pae.js} +7 -7
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Ds3yBf9U.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D1AIFe-0.js} +37 -37
- package/dist/{IngredientGroupView-CgZ4YT3i.js → IngredientGroupView-S7ps5Bsc.js} +1 -1
- package/dist/{IngredientsView-tPERrF9O.js → IngredientsView-BesGBkXM.js} +14 -15
- package/dist/{IntegrationView-CoF_rdWv.js → IntegrationView-Bkf7zGLw.js} +1 -1
- package/dist/{InventoryBindingForm-BSnofTIL.js → InventoryBindingForm-DHwTsR2G.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-4d9oz7Xh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CseHejfD.js} +51 -51
- package/dist/{InventoryBindingSummary-qm9ZUFny.js → InventoryBindingSummary-COybHYsZ.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQY98Hj6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cgv6gv2x.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-NUkiVop4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGJNkqYH.js} +6 -6
- package/dist/PublishView-2EcaLsU2.js +192 -0
- package/dist/{PurchaseOrderPrintPreview-CIWiq2NB.js → PurchaseOrderPrintPreview-DPFfFQQd.js} +5 -5
- package/dist/ReceiveRequestView-Dnl79p8h.js +1843 -0
- package/dist/{RecipeView-CzWlx1Xv.js → RecipeView-CmaMGv6N.js} +25 -25
- package/dist/{StockView-IPXGJNN8.js → StockView-CLw8un14.js} +121 -122
- package/dist/{SupplierView-DuL3NXc0.js → SupplierView-DLcZ6HDt.js} +11 -12
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-82Bu89OE.js → TransferDetails.vue_vue_type_script_setup_true_lang-DgwS1KTx.js} +137 -137
- package/dist/{TransferTemplateView-BEaRafuO.js → TransferTemplateView-BRDq2_Zw.js} +81 -82
- package/dist/{UnitView-Cwo0mthQ.js → UnitView-rJrXqu8W.js} +14 -14
- package/dist/{WarehouseView-DzjQrpyv.js → WarehouseView-BwSLmicZ.js} +33 -33
- package/dist/api/inventory.d.ts +4 -0
- package/dist/{app-CpuFfqWF.js → app-F909rQ5n.js} +12512 -11478
- package/dist/app.d.ts +24 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-bSGrDlvd.js → decimal-0pQSNdVz.js} +1 -1
- package/dist/{format-unit-display-D4gi2D-O.js → format-unit-display-CM40cl03.js} +60 -60
- package/dist/{index-Cn1ato-l.js → index-DzA11XLY.js} +88 -88
- package/dist/{index-COeURijn.js → index-rBUXpqWE.js} +3 -3
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
- package/dist/router/name.d.ts +1 -0
- package/dist/{stock-B1Rchi6n.js → stock-c68S1hmD.js} +3 -3
- package/dist/stores/feature.d.ts +34 -2
- package/dist/stores/location.d.ts +29 -1
- package/dist/{supplier-CeY_Gro-.js → supplier-CPuz6JVf.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-BXqY40wn.js → use-inventory-binding-dialog-DjlU5nUb.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +48 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +48 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -0
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +48 -0
- package/dist/views/publish/PublishView.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +16 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +24 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/vue-i18n-BiavdzKQ.js +2365 -0
- package/package.json +1 -1
- package/dist/ReceiveRequestView-Dgt3FeGb.js +0 -4205
- package/dist/feature-D8aRYGen.js +0 -962
package/dist/app.d.ts
CHANGED
|
@@ -802,6 +802,18 @@ export declare const i18nMessages: {
|
|
|
802
802
|
code: string;
|
|
803
803
|
};
|
|
804
804
|
};
|
|
805
|
+
publish: {
|
|
806
|
+
title: string;
|
|
807
|
+
actions: {
|
|
808
|
+
publishAll: string;
|
|
809
|
+
};
|
|
810
|
+
columns: {
|
|
811
|
+
type: string;
|
|
812
|
+
location: string;
|
|
813
|
+
status: string;
|
|
814
|
+
version: string;
|
|
815
|
+
};
|
|
816
|
+
};
|
|
805
817
|
};
|
|
806
818
|
};
|
|
807
819
|
'zh-CN': {
|
|
@@ -1441,6 +1453,18 @@ export declare const i18nMessages: {
|
|
|
1441
1453
|
name: string;
|
|
1442
1454
|
};
|
|
1443
1455
|
};
|
|
1456
|
+
publish: {
|
|
1457
|
+
title: string;
|
|
1458
|
+
actions: {
|
|
1459
|
+
publishAll: string;
|
|
1460
|
+
};
|
|
1461
|
+
columns: {
|
|
1462
|
+
type: string;
|
|
1463
|
+
location: string;
|
|
1464
|
+
status: string;
|
|
1465
|
+
version: string;
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1444
1468
|
};
|
|
1445
1469
|
};
|
|
1446
1470
|
};
|
package/dist/app.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCoreStore as
|
|
3
|
-
import { useDialogChild as
|
|
1
|
+
import { X as Re, a as Q, L as Ie, aa as F, r as Ne, ab as de, s as pe, u as z, j as P, v as Ae, aC as ne, w as fe, t as H, P as q, aB as Oe, au as De, V as Fe, x as Pe, y as Ue, b as ye, e as oe, f as J, R as ae, J as Be, a9 as Me, D as W, i as A, h as Le } from "./app-F909rQ5n.js";
|
|
2
|
+
import { useCoreStore as X, useI18n as Z } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialogChild as Qe, useSnackbar as he, useDialog as He, FmButtonVariant as se, components as ie } from "@feedmepos/ui-library";
|
|
4
4
|
import { defineStore as ve } from "pinia";
|
|
5
|
-
import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as M, createTextVNode as qe, toDisplayString as I, unref as
|
|
5
|
+
import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as M, createTextVNode as qe, toDisplayString as I, unref as R, createCommentVNode as L, createVNode as O, withCtx as Y, Fragment as U, renderList as j, ref as C, onMounted as Ve, computed as le, watch as je, createSlots as ze, createBlock as V, h as G } from "vue";
|
|
6
6
|
import { useRouter as Ke } from "vue-router";
|
|
7
|
-
import { u as ee } from "./supplier-
|
|
8
|
-
const be =
|
|
7
|
+
import { u as ee } from "./supplier-CPuz6JVf.js";
|
|
8
|
+
const be = Re((e, t) => {
|
|
9
9
|
function a() {
|
|
10
10
|
var n;
|
|
11
|
-
return `business_${((n =
|
|
11
|
+
return `business_${((n = X().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`;
|
|
12
12
|
}
|
|
13
13
|
return {
|
|
14
14
|
async getTemplate(c) {
|
|
@@ -38,12 +38,12 @@ const be = Ce((e, t) => {
|
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
40
|
function xe(e) {
|
|
41
|
-
const t =
|
|
41
|
+
const t = Q(), a = e.sku, c = t.skuById[a._id];
|
|
42
42
|
if (c.unit._id !== a.unit._id) return !0;
|
|
43
43
|
const o = e.measurement;
|
|
44
44
|
return o ? !t.unitById[c.unit._id].measurements.find((i) => i.id === o.id) : !1;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var E = /* @__PURE__ */ ((e) => (e.PURCHASE = "PURCHASE", e.TRANSFER = "TRANSFER", e))(E || {}), te = /* @__PURE__ */ ((e) => (e.Source = "Source", e.Destination = "Destination", e.Ingredient = "Ingredient", e))(te || {});
|
|
47
47
|
const ce = Ie(0);
|
|
48
48
|
function Se(e, t) {
|
|
49
49
|
var o;
|
|
@@ -97,7 +97,7 @@ function Te() {
|
|
|
97
97
|
}
|
|
98
98
|
function We(e) {
|
|
99
99
|
var i;
|
|
100
|
-
const a =
|
|
100
|
+
const a = X().currentBusiness.value, o = (i = e.map((l) => {
|
|
101
101
|
var x;
|
|
102
102
|
const u = l.purchaseOrder.items.map((r) => Se(r)), y = Te(), f = [
|
|
103
103
|
["Template ID", l._id],
|
|
@@ -107,7 +107,7 @@ function We(e) {
|
|
|
107
107
|
["Menu version", a == null ? void 0 : a.menuVersion],
|
|
108
108
|
[
|
|
109
109
|
"Purchase/Transfer",
|
|
110
|
-
typeof l.purchaseOrder.supplier.internal == "string" ?
|
|
110
|
+
typeof l.purchaseOrder.supplier.internal == "string" ? E.TRANSFER : E.PURCHASE
|
|
111
111
|
],
|
|
112
112
|
[
|
|
113
113
|
"Transfer from",
|
|
@@ -134,11 +134,11 @@ function We(e) {
|
|
|
134
134
|
sheets: {},
|
|
135
135
|
sheetOccurence: {}
|
|
136
136
|
}
|
|
137
|
-
)) == null ? void 0 : i.sheets, n = `${a == null ? void 0 : a.name} transfer templates (${
|
|
137
|
+
)) == null ? void 0 : i.sheets, n = `${a == null ? void 0 : a.name} transfer templates (${Ne(/* @__PURE__ */ new Date())}).xlsx`, h = de(o);
|
|
138
138
|
return pe(h, n), n;
|
|
139
139
|
}
|
|
140
140
|
function Ge() {
|
|
141
|
-
const e =
|
|
141
|
+
const e = X(), t = ee(), a = z(), c = Q(), o = e.currentBusiness.value, n = Se(
|
|
142
142
|
{
|
|
143
143
|
sku: {
|
|
144
144
|
unit: {
|
|
@@ -260,7 +260,7 @@ function Ye(e, t) {
|
|
|
260
260
|
const y = u[1], f = u[2];
|
|
261
261
|
let m;
|
|
262
262
|
if (f.startsWith("supplier"))
|
|
263
|
-
m = i[f], t !==
|
|
263
|
+
m = i[f], t !== E.PURCHASE && a.push(`Expected transfer type Purchase but found ${t} instead.`);
|
|
264
264
|
else {
|
|
265
265
|
const v = n[f];
|
|
266
266
|
if (!v)
|
|
@@ -293,7 +293,7 @@ function Ye(e, t) {
|
|
|
293
293
|
errors: a
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Je(e) {
|
|
297
297
|
if (!e.length || `${e[0]}`.toLocaleLowerCase() === "all")
|
|
298
298
|
return [];
|
|
299
299
|
const t = /(.*) \(((warehouse_|restaurant_).{24,})\)/, c = z().locationByDbName;
|
|
@@ -314,7 +314,7 @@ function Ze(e) {
|
|
|
314
314
|
});
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Xe(e) {
|
|
318
318
|
const [
|
|
319
319
|
t,
|
|
320
320
|
a,
|
|
@@ -331,14 +331,14 @@ function Je(e) {
|
|
|
331
331
|
return {
|
|
332
332
|
id: `${a[1] ?? ""}`.trim(),
|
|
333
333
|
name: `${c[1] ?? ""}`.trim(),
|
|
334
|
-
type: `${i[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ?
|
|
334
|
+
type: `${i[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ? E.TRANSFER : E.PURCHASE,
|
|
335
335
|
transferFrom: `${l[1] ?? ""}`.trim(),
|
|
336
336
|
locations: u.slice(1).map((m) => `${m}`.trim()).filter((m) => m),
|
|
337
337
|
reference: `${y[1] ?? ""}`.trim(),
|
|
338
338
|
remark: `${f[1] ?? ""}`.trim()
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Ze(e) {
|
|
342
342
|
const [
|
|
343
343
|
t,
|
|
344
344
|
a,
|
|
@@ -383,7 +383,7 @@ function Xe(e) {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
function et(e, t, a) {
|
|
386
|
-
const o =
|
|
386
|
+
const o = Q().skuByCode[e.code], n = new Array();
|
|
387
387
|
if (!o)
|
|
388
388
|
return n.push(`Cannot find ingredient with code (${e.code}) ${e.name}.`), {
|
|
389
389
|
index: t,
|
|
@@ -453,16 +453,16 @@ function et(e, t, a) {
|
|
|
453
453
|
function tt(e) {
|
|
454
454
|
const t = e.SheetNames.filter(
|
|
455
455
|
(n) => !Object.values(te).map(String).includes(n)
|
|
456
|
-
), c = $e().templates, o =
|
|
456
|
+
), c = $e().templates, o = Ae(c, "_id");
|
|
457
457
|
try {
|
|
458
458
|
return t.reduce(
|
|
459
459
|
(n, h) => {
|
|
460
460
|
var s;
|
|
461
|
-
const i = new Array(), l = e.Sheets[h], u =
|
|
461
|
+
const i = new Array(), l = e.Sheets[h], u = Xe(l), y = Ye(u.transferFrom, u.type);
|
|
462
462
|
i.push(...y.errors);
|
|
463
|
-
const f = y.from, m =
|
|
463
|
+
const f = y.from, m = Je(u.locations), v = m.filter((d) => d.location).map((d) => d.location);
|
|
464
464
|
i.push(...m.flatMap((d) => d.errors));
|
|
465
|
-
const x =
|
|
465
|
+
const x = Ze(l).filter((d) => d.data.code), r = x.map(
|
|
466
466
|
(d, b) => et(d.data, b, x)
|
|
467
467
|
);
|
|
468
468
|
i.push(
|
|
@@ -589,8 +589,8 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
589
589
|
})
|
|
590
590
|
}, [
|
|
591
591
|
qe(I(t.name) + " ", 1),
|
|
592
|
-
$("span", st, " (" + I(
|
|
593
|
-
t.type === "create" ? (T(), w("span", it, "(new)")) :
|
|
592
|
+
$("span", st, " (" + I(R(Fe)(`${t.transferType}`)) + ") ", 1),
|
|
593
|
+
t.type === "create" ? (T(), w("span", it, "(new)")) : L("", !0)
|
|
594
594
|
], 2),
|
|
595
595
|
t.errors.length ? (T(), w("div", lt, [
|
|
596
596
|
O(o, { "z-index": 50 }, {
|
|
@@ -608,7 +608,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
608
608
|
]),
|
|
609
609
|
_: 1
|
|
610
610
|
})
|
|
611
|
-
])) :
|
|
611
|
+
])) : L("", !0)
|
|
612
612
|
]),
|
|
613
613
|
$("div", {
|
|
614
614
|
class: M([
|
|
@@ -638,7 +638,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
638
638
|
}, vt = { class: "fm-typo-en-body-lg-600" }, gt = /* @__PURE__ */ ge({
|
|
639
639
|
__name: "TransferTemplateImport",
|
|
640
640
|
setup(e) {
|
|
641
|
-
const t =
|
|
641
|
+
const t = C(null), a = Qe(), c = he(), o = C(!1), n = C(!1), h = ee();
|
|
642
642
|
Ve(async () => {
|
|
643
643
|
n.value = !0;
|
|
644
644
|
try {
|
|
@@ -653,11 +653,11 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
653
653
|
n.value = !1;
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
const i =
|
|
656
|
+
const i = C(new Array()), l = C([]), u = C([]), y = le(
|
|
657
657
|
() => !!i.value.length || l.value.some((x) => x.errors.length) || u.value.some((x) => x.errors.length)
|
|
658
658
|
), f = le(
|
|
659
659
|
() => !!l.value.length || !!u.value.length
|
|
660
|
-
), { t: m } =
|
|
660
|
+
), { t: m } = Z();
|
|
661
661
|
async function v(x) {
|
|
662
662
|
i.value = [], l.value = [], u.value = [];
|
|
663
663
|
try {
|
|
@@ -720,8 +720,8 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
720
720
|
}),
|
|
721
721
|
accept: ".xlsx",
|
|
722
722
|
onFileUpload: r[0] || (r[0] = (s) => t.value = s),
|
|
723
|
-
label:
|
|
724
|
-
"button-label":
|
|
723
|
+
label: R(m)("inventory.ingredient.import.uploadTemplate"),
|
|
724
|
+
"button-label": R(m)("inventory.ingredient.import.selectFile")
|
|
725
725
|
}, ze({ _: 2 }, [
|
|
726
726
|
t.value ? {
|
|
727
727
|
name: "default",
|
|
@@ -758,9 +758,9 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
758
758
|
}, [
|
|
759
759
|
$("div", dt, I(t.value.name), 1)
|
|
760
760
|
], 2),
|
|
761
|
-
o.value ?
|
|
761
|
+
o.value ? L("", !0) : (T(), w("div", pt, [
|
|
762
762
|
O(p, {
|
|
763
|
-
label:
|
|
763
|
+
label: R(m)("inventory.ingredient.import.replaceFile"),
|
|
764
764
|
variant: y.value ? "destructive" : "secondary",
|
|
765
765
|
"prepend-icon": y.value ? void 0 : "autorenew",
|
|
766
766
|
onClick: s
|
|
@@ -779,18 +779,18 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
779
779
|
}),
|
|
780
780
|
$("div", yt, I(d), 1)
|
|
781
781
|
]))), 128))
|
|
782
|
-
])) :
|
|
782
|
+
])) : L("", !0)
|
|
783
783
|
])
|
|
784
784
|
]),
|
|
785
785
|
key: "0"
|
|
786
786
|
} : void 0
|
|
787
787
|
]), 1032, ["class", "label", "button-label"]),
|
|
788
788
|
f.value ? (T(), w("div", ht, [
|
|
789
|
-
$("div", vt, I(
|
|
789
|
+
$("div", vt, I(R(m)("inventory.ingredient.import.summary")), 1),
|
|
790
790
|
(T(!0), w(U, null, j(l.value, (s, d) => (T(), V(me, {
|
|
791
791
|
key: d,
|
|
792
792
|
name: s.template.name,
|
|
793
|
-
"transfer-type": typeof s.template.purchaseOrder.supplier.internal == "string" ?
|
|
793
|
+
"transfer-type": typeof s.template.purchaseOrder.supplier.internal == "string" ? R(E).TRANSFER : R(E).PURCHASE,
|
|
794
794
|
locations: s.template.locations,
|
|
795
795
|
items: s.template.purchaseOrder.items,
|
|
796
796
|
errors: s.errors,
|
|
@@ -799,13 +799,13 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
799
799
|
(T(!0), w(U, null, j(u.value, (s) => (T(), V(me, {
|
|
800
800
|
key: s.template._id,
|
|
801
801
|
name: s.template.name,
|
|
802
|
-
"transfer-type": typeof s.template.purchaseOrder.supplier.internal == "string" ?
|
|
802
|
+
"transfer-type": typeof s.template.purchaseOrder.supplier.internal == "string" ? R(E).TRANSFER : R(E).PURCHASE,
|
|
803
803
|
locations: s.template.locations,
|
|
804
804
|
items: s.template.purchaseOrder.items,
|
|
805
805
|
errors: s.errors,
|
|
806
806
|
type: "update"
|
|
807
807
|
}, null, 8, ["name", "transfer-type", "locations", "items", "errors"]))), 128))
|
|
808
|
-
])) :
|
|
808
|
+
])) : L("", !0)
|
|
809
809
|
], 64))
|
|
810
810
|
]);
|
|
811
811
|
};
|
|
@@ -823,7 +823,7 @@ function bt(e) {
|
|
|
823
823
|
return c && c == o;
|
|
824
824
|
}
|
|
825
825
|
const xt = ve("transferTemplateActions", () => {
|
|
826
|
-
const e = He(), t = he(), a = z(), c = $e(), o = be(), n = ye(), h = Ke(), { t: i } =
|
|
826
|
+
const e = He(), t = he(), a = z(), c = $e(), o = be(), n = ye(), h = Ke(), { t: i } = Z(), l = C({});
|
|
827
827
|
function u() {
|
|
828
828
|
l.value = {
|
|
829
829
|
mode: oe.CREATE,
|
|
@@ -884,7 +884,7 @@ const xt = ve("transferTemplateActions", () => {
|
|
|
884
884
|
}
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
|
-
const m =
|
|
887
|
+
const m = C({});
|
|
888
888
|
function v(p) {
|
|
889
889
|
m.value = {
|
|
890
890
|
template: p,
|
|
@@ -893,7 +893,7 @@ const xt = ve("transferTemplateActions", () => {
|
|
|
893
893
|
m.value.show = s;
|
|
894
894
|
},
|
|
895
895
|
"onAction:edit"() {
|
|
896
|
-
m.value.show = !1, y(
|
|
896
|
+
m.value.show = !1, y(J(p));
|
|
897
897
|
}
|
|
898
898
|
};
|
|
899
899
|
}
|
|
@@ -902,8 +902,8 @@ const xt = ve("transferTemplateActions", () => {
|
|
|
902
902
|
s(g);
|
|
903
903
|
}, b = c.templates.filter(
|
|
904
904
|
(g) => {
|
|
905
|
-
var
|
|
906
|
-
return (!g.locations || g.locations.find((D) => D.doc._id === a.currentLocation.doc._id)) && ((
|
|
905
|
+
var N;
|
|
906
|
+
return (!g.locations || g.locations.find((D) => D.doc._id === a.currentLocation.doc._id)) && ((N = g.purchaseOrder.supplier) == null ? void 0 : N._id) !== a.currentLocation.doc._id;
|
|
907
907
|
}
|
|
908
908
|
);
|
|
909
909
|
if (!b.length)
|
|
@@ -923,18 +923,18 @@ const xt = ve("transferTemplateActions", () => {
|
|
|
923
923
|
}).onSecondary(() => d(void 0)).onClose(() => d(void 0)), p;
|
|
924
924
|
const k = b.map((g) => {
|
|
925
925
|
var re;
|
|
926
|
-
const
|
|
926
|
+
const N = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(xe), D = !bt(g.purchaseOrder.supplier), K = g.purchaseOrder.supplier.internal ? n.getNetSuiteLocation(
|
|
927
927
|
`${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
|
|
928
928
|
) : n.getNetSuiteVendor(g.purchaseOrder.supplier._id), we = D ? `The subsidiary of the request
|
|
929
|
-
location is ${(re = n.getLocationSubsidiary(K == null ? void 0 : K.netSuiteId)) == null ? void 0 : re.fullName}.` : void 0, ke =
|
|
929
|
+
location is ${(re = n.getLocationSubsidiary(K == null ? void 0 : K.netSuiteId)) == null ? void 0 : re.fullName}.` : void 0, ke = N || D, Ce = N ? "This template is invalid. Update this template." : D ? we : void 0, Ee = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
|
|
930
930
|
return {
|
|
931
931
|
label: g.name,
|
|
932
932
|
value: g._id,
|
|
933
933
|
disabled: ke,
|
|
934
|
-
sublabel:
|
|
934
|
+
sublabel: Ce ?? Ee
|
|
935
935
|
};
|
|
936
936
|
});
|
|
937
|
-
return k.sort((g,
|
|
937
|
+
return k.sort((g, N) => +!!g.disabled - +!!N.disabled), e.open({
|
|
938
938
|
title: "Select one template",
|
|
939
939
|
contentComponent: Be,
|
|
940
940
|
contentComponentProps: {
|
|
@@ -1059,13 +1059,13 @@ const xt = ve("transferTemplateActions", () => {
|
|
|
1059
1059
|
};
|
|
1060
1060
|
});
|
|
1061
1061
|
function ue(e) {
|
|
1062
|
-
const { skuById: t } =
|
|
1062
|
+
const { skuById: t } = Q(), a = J(e);
|
|
1063
1063
|
return a.purchaseOrder.items = e.purchaseOrder.items.filter((c) => t[c.sku._id]), a;
|
|
1064
1064
|
}
|
|
1065
1065
|
const $e = ve(
|
|
1066
1066
|
"transferTemplateTable",
|
|
1067
1067
|
function() {
|
|
1068
|
-
const { t } =
|
|
1068
|
+
const { t } = Z(), a = xt(), c = C(!1), o = C(new Array()), n = be(), h = Q();
|
|
1069
1069
|
async function i() {
|
|
1070
1070
|
o.value = [], c.value = !0;
|
|
1071
1071
|
try {
|
|
@@ -1095,12 +1095,12 @@ const $e = ve(
|
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
1097
|
function u(f, m) {
|
|
1098
|
-
switch (m =
|
|
1099
|
-
case
|
|
1098
|
+
switch (m = J(m), f) {
|
|
1099
|
+
case A.Details:
|
|
1100
1100
|
return a.viewTemplate(m);
|
|
1101
|
-
case
|
|
1101
|
+
case A.Edit:
|
|
1102
1102
|
return a.updateTemplate(m);
|
|
1103
|
-
case
|
|
1103
|
+
case A.Delete:
|
|
1104
1104
|
return a.deleteTemplate(m, c, i);
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
@@ -1180,11 +1180,11 @@ const $e = ve(
|
|
|
1180
1180
|
id: "action",
|
|
1181
1181
|
cell(f) {
|
|
1182
1182
|
const m = f.row.original, v = [
|
|
1183
|
-
W[
|
|
1184
|
-
W[
|
|
1185
|
-
W[
|
|
1183
|
+
W[A.Details],
|
|
1184
|
+
W[A.Edit],
|
|
1185
|
+
W[A.Delete]
|
|
1186
1186
|
];
|
|
1187
|
-
return
|
|
1187
|
+
return Le(v, (x) => u(x, m));
|
|
1188
1188
|
},
|
|
1189
1189
|
enableSorting: !1,
|
|
1190
1190
|
size: 40,
|
|
@@ -1201,15 +1201,15 @@ const $e = ve(
|
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
1203
|
);
|
|
1204
|
-
function
|
|
1204
|
+
function Rt(e, t, a) {
|
|
1205
1205
|
const c = (a == null ? void 0 : a.abbrev) ?? t.abbrev;
|
|
1206
1206
|
return `${P(e, !1)} ${c}`;
|
|
1207
1207
|
}
|
|
1208
1208
|
export {
|
|
1209
|
-
|
|
1209
|
+
E as P,
|
|
1210
1210
|
be as a,
|
|
1211
1211
|
xt as b,
|
|
1212
|
-
|
|
1212
|
+
Rt as f,
|
|
1213
1213
|
xe as t,
|
|
1214
1214
|
$e as u
|
|
1215
1215
|
};
|