@feedmepos/mf-inventory-portal 0.0.23-dev.36 → 0.0.23-dev.38
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-CRVwCmFX.js → App-DQgtWkQj.js} +20 -20
- package/dist/{ApprovalView-CfJQdSRz.js → ApprovalView-CvSK9fGA.js} +10 -10
- package/dist/{BindingsDialog-BKL8E0Ni.js → BindingsDialog-BAC0_xCP.js} +8 -8
- package/dist/{BindingsPicker-M9-ARPgB.js → BindingsPicker-ecWMwsNp.js} +3 -3
- package/dist/{BindingsTable-BUs8wO0p.js → BindingsTable-D5kQydOU.js} +10 -10
- package/dist/{ClosingDraftView-BI3P4oS4.js → ClosingDraftView-CnHQ59rX.js} +46 -46
- package/dist/{ClosingTemplateView-D732hJJj.js → ClosingTemplateView-vRTsVZ0c.js} +21 -21
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DzXJBW2r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CpIzIvkU.js} +17 -17
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BPOPaW5x.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CNzEHF-R.js} +37 -37
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DCYtyGvl.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DBhBaRrd.js} +1 -1
- package/dist/{IngredientGroupView-CnnqKFGA.js → IngredientGroupView-BLsABZ3h.js} +1 -1
- package/dist/IngredientsView-Cs4TIf6V.js +1794 -0
- package/dist/{IntegrationView-6-Qvhwbr.js → IntegrationView-BqAqngtM.js} +137 -137
- package/dist/{InventoryBindingForm-F3o3dWhJ.js → InventoryBindingForm-D54V_qZQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B1hTEubD.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-KIW9J7Xn.js} +106 -96
- package/dist/{InventoryBindingSummary-B9ziVhZr.js → InventoryBindingSummary-htT7GNto.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BquI8s88.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BlEgALMj.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BHRxlIxi.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DHbxXDGy.js} +9 -9
- package/dist/{PurchaseOrderPrintPreview-DyjA8BsV.js → PurchaseOrderPrintPreview-hmzxKuIa.js} +5 -5
- package/dist/{ReceiveRequestView-BQoADy5j.js → ReceiveRequestView-_YioyWqU.js} +182 -182
- package/dist/{RecipeView-DOEPiT-V.js → RecipeView-88KJ0nvU.js} +3 -3
- package/dist/StockView-R4cnEbHQ.js +1818 -0
- package/dist/{SupplierView-BX6T3B40.js → SupplierView-CevGG507.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-C-8uS9KA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CeWP9msS.js} +52 -52
- package/dist/{TransferTemplateView-D3smZIqo.js → TransferTemplateView-QDniAq8o.js} +114 -114
- package/dist/{UnitView-PZthqb2i.js → UnitView-SjwJ3lZ0.js} +14 -14
- package/dist/{WarehouseView-Qqqwk353.js → WarehouseView-55LiPQXG.js} +70 -70
- package/dist/api/adjustment-template.d.ts +2 -0
- package/dist/api/bill.d.ts +240 -84
- package/dist/api/inventory.d.ts +15 -6
- package/dist/{app-Dzll4soM.js → app-UTiudUUR.js} +6779 -6514
- package/dist/app.d.ts +8 -0
- package/dist/app.js +1 -1
- package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
- package/dist/components/FmLockableField.vue.d.ts +37 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
- package/dist/{decimal-CSwcVJ9W.js → decimal-tyBgHJ47.js} +1 -1
- package/dist/feature-z7inw9y6.js +946 -0
- package/dist/{format-unit-display-D2-2_8Wo.js → format-unit-display-DN0KtCh2.js} +61 -61
- package/dist/index-Dj2Ccgp1.js +29202 -0
- package/dist/{StockView-CyJlLOjk.js → index-DlhdTaa8.js} +2218 -3854
- package/dist/{stock-VALQOiWM.js → stock-CxRxidDu.js} +1 -1
- package/dist/stores/feature.d.ts +5 -0
- package/dist/stores/inventory.d.ts +20 -8
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/{supplier-CYRocBpq.js → supplier-BhyiTwSJ.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-SiBEsYI-.js → use-inventory-binding-dialog-DwSvUvRl.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +37 -3
- package/dist/views/adjustment-template/wastage-template/props.d.ts +7 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +32 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
- package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -24
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +48 -24
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
- package/package.json +7 -6
- package/dist/IngredientsView-DZS3wyBm.js +0 -1657
- package/dist/feature-CFAsUae4.js +0 -92
- package/dist/index-CLdXLjws.js +0 -12087
|
@@ -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, q as Ae, ab as de, r as pe, u as z, i as P, s as Ne, aB as ne, v as fe, t as H, P as q, aA as Oe, at as De, V as Fe, w as Pe, x as Ue, b as ye, d as oe, e as J, R as ae, J as Be, a9 as Me, D as W, h as N, f as Le } from "./app-UTiudUUR.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
|
|
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 G, 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 Y } from "vue";
|
|
6
6
|
import { useRouter as Ke } from "vue-router";
|
|
7
|
-
import { u as ee } from "./supplier-
|
|
7
|
+
import { u as ee } from "./supplier-BhyiTwSJ.js";
|
|
8
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 = Re((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 (${Ae(/* @__PURE__ */ new Date())}).xlsx`, h = de(o);
|
|
138
138
|
return pe(h, n), n;
|
|
139
139
|
}
|
|
140
140
|
function Ye() {
|
|
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 Ge(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 Ge(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 = Ne(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 = Ge(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(
|
|
@@ -578,19 +578,19 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
578
578
|
setup(e) {
|
|
579
579
|
return (t, a) => {
|
|
580
580
|
var n, h, i;
|
|
581
|
-
const c =
|
|
581
|
+
const c = B("FmIcon"), o = B("FmTooltip");
|
|
582
582
|
return T(), w("div", nt, [
|
|
583
583
|
a[0] || (a[0] = $("div", null, "•", -1)),
|
|
584
584
|
$("div", ot, [
|
|
585
585
|
$("div", at, [
|
|
586
586
|
$("div", {
|
|
587
|
-
class:
|
|
587
|
+
class: M({
|
|
588
588
|
"text-fm-color-system-error-300": t.errors.length
|
|
589
589
|
})
|
|
590
590
|
}, [
|
|
591
591
|
qe(I(t.name) + " ", 1),
|
|
592
592
|
$("span", st, " (" + I(R(Fe)(`${t.transferType}`)) + ") ", 1),
|
|
593
|
-
t.type === "create" ? (T(), w("span", it, "(new)")) :
|
|
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,10 +608,10 @@ 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
|
-
class:
|
|
614
|
+
class: M([
|
|
615
615
|
"fm-typo-en-body-sm-400",
|
|
616
616
|
{
|
|
617
617
|
"text-fm-color-system-error-200": t.errors.length,
|
|
@@ -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 {
|
|
@@ -701,7 +701,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
701
701
|
return je(t, (x) => {
|
|
702
702
|
x && v(x);
|
|
703
703
|
}), (x, r) => {
|
|
704
|
-
const S =
|
|
704
|
+
const S = B("FmCircularProgress"), _ = B("FmIcon"), p = B("FmButton");
|
|
705
705
|
return T(), w("div", ct, [
|
|
706
706
|
r[2] || (r[2] = $("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
|
|
707
707
|
n.value ? (T(), w("div", mt, [
|
|
@@ -714,7 +714,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
714
714
|
r[1] || (r[1] = $("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
|
|
715
715
|
])) : (T(), w(U, { key: 1 }, [
|
|
716
716
|
O(Pe, {
|
|
717
|
-
class:
|
|
717
|
+
class: M({
|
|
718
718
|
"w-full": !0,
|
|
719
719
|
"h-[200px]": !t.value
|
|
720
720
|
}),
|
|
@@ -728,7 +728,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
728
728
|
fn: G(({ openFileDialog: s }) => [
|
|
729
729
|
$("div", ut, [
|
|
730
730
|
$("div", {
|
|
731
|
-
class:
|
|
731
|
+
class: M([
|
|
732
732
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
733
733
|
{
|
|
734
734
|
"border border-fm-color-neutral-gray-100": o.value,
|
|
@@ -748,7 +748,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
748
748
|
color: y.value ? "system-error-300" : void 0
|
|
749
749
|
}, null, 8, ["name", "color"])),
|
|
750
750
|
$("div", {
|
|
751
|
-
class:
|
|
751
|
+
class: M([
|
|
752
752
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
753
753
|
{
|
|
754
754
|
"text-fm-color-typo-disabled": o.value,
|
|
@@ -758,7 +758,7 @@ 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
763
|
label: R(m)("inventory.ingredient.import.replaceFile"),
|
|
764
764
|
variant: y.value ? "destructive" : "secondary",
|
|
@@ -779,7 +779,7 @@ 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"
|
|
@@ -790,7 +790,7 @@ const nt = { class: "flex items-center gap-12 pl-8" }, ot = { class: "flex flex-
|
|
|
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" ? R(
|
|
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" ? R(
|
|
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 A;
|
|
906
|
+
return (!g.locations || g.locations.find((D) => D.doc._id === a.currentLocation.doc._id)) && ((A = g.purchaseOrder.supplier) == null ? void 0 : A._id) !== a.currentLocation.doc._id;
|
|
907
907
|
}
|
|
908
908
|
);
|
|
909
909
|
if (!b.length)
|
|
@@ -923,20 +923,20 @@ 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 A = !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 = A || D, Ce = A ? "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, A) => +!!g.disabled - +!!A.disabled), e.open({
|
|
938
938
|
title: "Select one template",
|
|
939
|
-
contentComponent:
|
|
939
|
+
contentComponent: Be,
|
|
940
940
|
contentComponentProps: {
|
|
941
941
|
items: k,
|
|
942
942
|
singleSelect: !0
|
|
@@ -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 N.Details:
|
|
1100
1100
|
return a.viewTemplate(m);
|
|
1101
|
-
case
|
|
1101
|
+
case N.Edit:
|
|
1102
1102
|
return a.updateTemplate(m);
|
|
1103
|
-
case
|
|
1103
|
+
case N.Delete:
|
|
1104
1104
|
return a.deleteTemplate(m, c, i);
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
@@ -1111,7 +1111,7 @@ const $e = ve(
|
|
|
1111
1111
|
accessorKey: "_id",
|
|
1112
1112
|
header: () => t("inventory.transfer.table.createdAt"),
|
|
1113
1113
|
cell(f) {
|
|
1114
|
-
return
|
|
1114
|
+
return Me(`${f.getValue()}`);
|
|
1115
1115
|
},
|
|
1116
1116
|
enableSorting: !0
|
|
1117
1117
|
},
|
|
@@ -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[N.Details],
|
|
1184
|
+
W[N.Edit],
|
|
1185
|
+
W[N.Delete]
|
|
1186
1186
|
];
|
|
1187
|
-
return
|
|
1187
|
+
return Le(v, (x) => u(x, m));
|
|
1188
1188
|
},
|
|
1189
1189
|
enableSorting: !1,
|
|
1190
1190
|
size: 40,
|
|
@@ -1206,7 +1206,7 @@ function Rt(e, t, a) {
|
|
|
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,
|