@feedmepos/mf-inventory-portal 1.2.7-dev.2 → 1.2.7-dev.4
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-CBwWCCOM.js → App-C36fMhxq.js} +1 -1
- package/dist/{ApprovalView-BrRGheio.js → ApprovalView-BK-UXBwv.js} +26 -26
- package/dist/{BindingsDialog-BSPkkRis.js → BindingsDialog-C5ry8Cg7.js} +2 -2
- package/dist/{BindingsPicker-L3XnC3__.js → BindingsPicker-D1lrIB-Y.js} +1 -1
- package/dist/{BindingsTable-CgUm0Ity.js → BindingsTable-CoWyge2-.js} +1 -1
- package/dist/{ClosingDraftView-D_gq2fCk.js → ClosingDraftView-FFi85ylu.js} +203 -203
- package/dist/{ClosingTemplateView-Q16zr6EV.js → ClosingTemplateView-BvSH7TM0.js} +53 -53
- package/dist/{DeliveryOrderPrintPreview-mVDQO6Xq.js → DeliveryOrderPrintPreview-BVVWnadB.js} +9 -9
- package/dist/{FmAdminBadge-Cjy6QPoR.js → FmAdminBadge-DtBVrN_M.js} +6 -6
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnH2Qxnr.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CSigrMC2.js} +21 -21
- package/dist/{FmMultiselectDialog-BbYhJk_O.js → FmMultiselectDialog-Df50mxnw.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D0qlxGgo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CdSQVfaU.js} +27 -27
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CCuLSITo.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-A7Pgq3Sl.js} +1 -1
- package/dist/{IngredientGroupView-CJ9Rsfg-.js → IngredientGroupView-BVM3Um9Z.js} +12 -12
- package/dist/IngredientsView-75ahXQeJ.js +2271 -0
- package/dist/{IntegrationView-B4giJ-Zl.js → IntegrationView-DEUOEn_W.js} +84 -84
- package/dist/{InventoryBindingForm-bNRoyTsA.js → InventoryBindingForm-C2HvBwlT.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DAaoOXUY.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CXJSFCLP.js} +41 -41
- package/dist/{InventoryBindingSummary-NfFve-nM.js → InventoryBindingSummary-B-V9QkyH.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DP11tzty.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BELqcyvD.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-yjjkBSqL.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BBE5_txM.js} +5 -5
- package/dist/{PublishView-w9GYA6kf.js → PublishView-DKkCs9F8.js} +17 -17
- package/dist/{PurchaseOrderPrintPreview-DmdDJmEq.js → PurchaseOrderPrintPreview-BvFR-uQk.js} +9 -9
- package/dist/{ReceiveRequestView-z4o7lZvK.js → ReceiveRequestView-BIrBMqdY.js} +80 -80
- package/dist/{RecipeView-DiiQtfXn.js → RecipeView-CI_Tec4J.js} +49 -49
- package/dist/{StockView-DKR2nFdm.js → StockView-Bx3lqHZg.js} +327 -327
- package/dist/{SupplierView-BJcU4iQk.js → SupplierView-BT2aZGQE.js} +1103 -1016
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-UNVxzRmJ.js → TransferDetails.vue_vue_type_script_setup_true_lang-DWdnLRCB.js} +245 -245
- package/dist/{TransferTemplateView-rCbAWlh_.js → TransferTemplateView-DQtlCFze.js} +88 -87
- package/dist/{UnitView-BW9hbVHL.js → UnitView-h61yFjgP.js} +59 -59
- package/dist/{WarehouseView-BO0hf42-.js → WarehouseView-I8GqyD2C.js} +25 -25
- package/dist/api/netsuite.d.ts +3 -0
- package/dist/api/purchase-order-template.d.ts +1 -0
- package/dist/{app-ChezCkd5.js → app-CxSrmhCK.js} +6888 -6786
- package/dist/app.d.ts +57 -0
- package/dist/app.js +3 -3
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +9 -2
- package/dist/components/SubsidiaryTreeDialog.vue.d.ts +2 -0
- package/dist/{decimal-1sc-GcXN.js → decimal-DpfcXNky.js} +1 -1
- package/dist/{format-unit-display-BK2TkQOA.js → format-unit-display-xov4MvuI.js} +368 -400
- package/dist/{index-CWivxw9k.js → index-B4hWNXtZ.js} +1 -1
- package/dist/{index-cLW2Uxz3.js → index-CwzV_5fz.js} +1 -1
- package/dist/purchase-order-template-DkBl6qMP.js +41 -0
- package/dist/{stock-FEj_v-SS.js → stock-Nt176YY7.js} +1 -1
- package/dist/stores/integration/netsuite.d.ts +10 -0
- package/dist/{supplier-2r8VFThu.js → supplier-B7gAUwhb.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CvgFQA-k.js → use-ingredient-select-dialog-9HkEvXXS.js} +5 -5
- package/dist/{use-inventory-binding-dialog-BNp88Pjt.js → use-inventory-binding-dialog-pSVgqxMM.js} +8 -8
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +16 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +4 -0
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
- package/package.json +1 -1
- package/dist/IngredientsView-BbKzQnQP.js +0 -1886
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as P, renderSlot as xe, withDirectives as Ue, normalizeClass as re, vModelText as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as P, renderSlot as xe, withDirectives as Ue, normalizeClass as re, vModelText as qe, reactive as st, h as j, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as je, createBlock as le, mergeProps as Qe, createTextVNode as ne, mergeModels as Be, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
|
|
2
|
+
import { T as We, aN as he, t as Ne, I as it, aO as ut, aP as dt, k as se, aQ as mt, b as Ke, a as Ge, Y as Le, c as ge, o as ke, w as be, Z as ye, A as we, M as pt, P as ee, u as Ze, aq as ct, a4 as ft, O as Je, e as ue, x as ve, al as yt, z as vt, ad as bt, K as gt, i as Ee, _ as ht, L as xt } from "./app-CxSrmhCK.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as X,
|
|
5
|
-
import { components as de, useSnackbar as
|
|
6
|
-
import { defineStore as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
|
|
4
|
+
import { P as X, f as _t, t as kt, a as ze, u as wt } from "./format-unit-display-xov4MvuI.js";
|
|
5
|
+
import { components as de, useSnackbar as Tt, useProxiedModel as Xe, useBreakpoints as Ct } from "@feedmepos/ui-library";
|
|
6
|
+
import { defineStore as Ft, storeToRefs as He } from "pinia";
|
|
7
|
+
import { _ as St, b as It, F as Mt, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CdSQVfaU.js";
|
|
8
|
+
import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CSigrMC2.js";
|
|
9
|
+
import { u as At } from "./supplier-B7gAUwhb.js";
|
|
10
|
+
import { u as Rt } from "./use-ingredient-select-dialog-9HkEvXXS.js";
|
|
11
|
+
import { u as Pt } from "./purchase-order-template-DkBl6qMP.js";
|
|
12
|
+
const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
12
13
|
__name: "FmMinMaxInput",
|
|
13
14
|
props: {
|
|
14
15
|
rules: {},
|
|
@@ -90,8 +91,8 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
90
91
|
return (d, y) => {
|
|
91
92
|
const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
|
|
92
93
|
return $(), N("div", Ut, [
|
|
93
|
-
e("div",
|
|
94
|
-
e("div",
|
|
94
|
+
e("div", qt, [
|
|
95
|
+
e("div", Bt, [
|
|
95
96
|
m(w, {
|
|
96
97
|
label: d.label,
|
|
97
98
|
disabled: d.disabled,
|
|
@@ -118,7 +119,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
118
119
|
"text-fm-color-typo-disabled": o.value
|
|
119
120
|
})
|
|
120
121
|
}, null, 34), [
|
|
121
|
-
[
|
|
122
|
+
[qe, u.value]
|
|
122
123
|
])
|
|
123
124
|
]),
|
|
124
125
|
y[7] || (y[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
@@ -137,7 +138,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
137
138
|
"text-fm-color-typo-disabled": o.value
|
|
138
139
|
})
|
|
139
140
|
}, null, 34), [
|
|
140
|
-
[
|
|
141
|
+
[qe, x.value]
|
|
141
142
|
])
|
|
142
143
|
]),
|
|
143
144
|
xe(d.$slots, "append")
|
|
@@ -175,8 +176,8 @@ function Qt(p) {
|
|
|
175
176
|
return !s && !u ? `Min & max must be a multiple of ${v}` : s ? u ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
|
-
const et =
|
|
179
|
-
const p =
|
|
179
|
+
const et = Ft("netsuite-custom-field-helper", () => {
|
|
180
|
+
const p = Ke();
|
|
180
181
|
function h(v, a, r, s, u) {
|
|
181
182
|
var F;
|
|
182
183
|
if (!r) {
|
|
@@ -201,12 +202,12 @@ const et = St("netsuite-custom-field-helper", () => {
|
|
|
201
202
|
});
|
|
202
203
|
var Q = /* @__PURE__ */ ((p) => (p.Code = "Code", p.Name = "Name", p.DefaultAmount = "DefaultAmount", p.Limit = "Limit", p.Step = "Step", p.Cost = "Cost", p.Delete = "Delete", p))(Q || {});
|
|
203
204
|
function Yt(p, h = {}) {
|
|
204
|
-
const { t: v } = me(), a =
|
|
205
|
+
const { t: v } = me(), a = Ge(), r = ge(), s = st({}), u = et();
|
|
205
206
|
Te(() => {
|
|
206
207
|
for (const c of p.items) {
|
|
207
208
|
if (!c.totalCost)
|
|
208
209
|
continue;
|
|
209
|
-
const { cost: o } =
|
|
210
|
+
const { cost: o } = Ot(
|
|
210
211
|
c.sku,
|
|
211
212
|
c.quantity,
|
|
212
213
|
c.measurement,
|
|
@@ -291,7 +292,7 @@ function Yt(p, h = {}) {
|
|
|
291
292
|
var d;
|
|
292
293
|
return ((d = o.measurement) == null ? void 0 : d.id) === U.id;
|
|
293
294
|
}), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
|
|
294
|
-
return j(
|
|
295
|
+
return j(St, {
|
|
295
296
|
style: {
|
|
296
297
|
flex: "1 1 0%"
|
|
297
298
|
},
|
|
@@ -319,9 +320,9 @@ function Yt(p, h = {}) {
|
|
|
319
320
|
);
|
|
320
321
|
},
|
|
321
322
|
rules: [
|
|
322
|
-
|
|
323
|
+
It(o.quantityStep),
|
|
323
324
|
...+se(o.quantity) ? [
|
|
324
|
-
|
|
325
|
+
Mt(
|
|
325
326
|
+se(
|
|
326
327
|
o.minimumQuantity ?? {
|
|
327
328
|
amount: 1,
|
|
@@ -331,7 +332,7 @@ function Yt(p, h = {}) {
|
|
|
331
332
|
)
|
|
332
333
|
)
|
|
333
334
|
] : [],
|
|
334
|
-
|
|
335
|
+
$t(
|
|
335
336
|
o.maximumQuantity ? +se(o.maximumQuantity) : 1 / 0
|
|
336
337
|
),
|
|
337
338
|
function(d) {
|
|
@@ -492,7 +493,7 @@ function Yt(p, h = {}) {
|
|
|
492
493
|
})
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
|
-
const Wt = { class: "flex flex-col gap-8 py-16" },
|
|
496
|
+
const Wt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-center" }, Gt = { class: "flex-1 flex gap-1 items-center" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xt = { class: "flex gap-8 w-full" }, eo = { class: "flex-1 flex flex-col gap-4" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = {
|
|
496
497
|
key: 0,
|
|
497
498
|
class: "flex gap-8 w-full"
|
|
498
499
|
}, so = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, no = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, ro = /* @__PURE__ */ ae({
|
|
@@ -507,11 +508,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
507
508
|
return a;
|
|
508
509
|
}
|
|
509
510
|
return (a, r) => {
|
|
510
|
-
var u, x, F, c, o, f, b, k, T, R, U, d, y, w, i, g, O, M, _, W, te, E,
|
|
511
|
+
var u, x, F, c, o, f, b, k, T, R, U, d, y, w, i, g, O, M, _, W, te, E, q, Z, l, n, C, B, z, K;
|
|
511
512
|
const s = V("FmLabel");
|
|
512
513
|
return $(), N("div", Wt, [
|
|
513
|
-
e("div",
|
|
514
|
-
e("div",
|
|
514
|
+
e("div", Kt, [
|
|
515
|
+
e("div", Gt, [
|
|
515
516
|
e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
|
|
516
517
|
e("span", Jt, I(a.row.original.sku.name), 1)
|
|
517
518
|
]),
|
|
@@ -560,7 +561,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
560
561
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Step}`)
|
|
561
562
|
}, null, 8, ["label"]),
|
|
562
563
|
m(t(ee), {
|
|
563
|
-
render: (
|
|
564
|
+
render: (q = (E = (te = a.cellByColId[t(Q).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : q.cell,
|
|
564
565
|
props: (l = (Z = a.cellByColId[t(Q).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : l.call(Z)
|
|
565
566
|
}, null, 8, ["render", "props"]),
|
|
566
567
|
r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -572,8 +573,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
572
573
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Limit}`)
|
|
573
574
|
}, null, 8, ["label"]),
|
|
574
575
|
m(t(ee), {
|
|
575
|
-
render: (
|
|
576
|
-
props: (
|
|
576
|
+
render: (B = (C = (n = a.cellByColId[t(Q).Limit]) == null ? void 0 : n.column) == null ? void 0 : C.columnDef) == null ? void 0 : B.cell,
|
|
577
|
+
props: (K = (z = a.cellByColId[t(Q).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : K.call(z)
|
|
577
578
|
}, null, 8, ["render", "props"]),
|
|
578
579
|
r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
579
580
|
])
|
|
@@ -637,7 +638,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
637
638
|
},
|
|
638
639
|
emits: ["update:disabled"],
|
|
639
640
|
setup(p, { expose: h, emit: v }) {
|
|
640
|
-
const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c =
|
|
641
|
+
const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c = Ge(), o = At(), f = ge(), b = Ke(), k = et();
|
|
641
642
|
Ce(
|
|
642
643
|
() => s.purchaseOrder.items.length,
|
|
643
644
|
() => {
|
|
@@ -646,7 +647,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
646
647
|
), F.watchLocation(async () => {
|
|
647
648
|
location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((l) => l) ?? s.purchaseOrder.supplier));
|
|
648
649
|
});
|
|
649
|
-
const T =
|
|
650
|
+
const T = Dt(
|
|
650
651
|
() => s.purchaseOrder,
|
|
651
652
|
(l) => {
|
|
652
653
|
s.purchaseOrder = {
|
|
@@ -660,8 +661,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
660
661
|
return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
661
662
|
},
|
|
662
663
|
set(l) {
|
|
663
|
-
var C,
|
|
664
|
-
const n = typeof ((
|
|
664
|
+
var C, B;
|
|
665
|
+
const n = typeof ((B = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : B.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
665
666
|
l !== n && (s.purchaseOrder.supplier = l === X.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
666
667
|
}
|
|
667
668
|
}), U = L(() => T.transferLocationOptions.value), d = L({
|
|
@@ -697,8 +698,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
697
698
|
function O() {
|
|
698
699
|
var l, n;
|
|
699
700
|
return (l = s.locations) != null && l.find((C) => {
|
|
700
|
-
var
|
|
701
|
-
return ((
|
|
701
|
+
var B, z;
|
|
702
|
+
return ((B = C.doc) == null ? void 0 : B._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
|
|
702
703
|
}) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
703
704
|
}
|
|
704
705
|
const M = L({
|
|
@@ -760,7 +761,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
760
761
|
}
|
|
761
762
|
},
|
|
762
763
|
b.transferTemplateColumnDefs({
|
|
763
|
-
onUpdate: (l, n, C,
|
|
764
|
+
onUpdate: (l, n, C, B) => {
|
|
764
765
|
if (l < 0 || l >= s.purchaseOrder.items.length) return;
|
|
765
766
|
const z = s.purchaseOrder.items[l];
|
|
766
767
|
z && W.value.updateItem({
|
|
@@ -768,11 +769,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
768
769
|
sku: n,
|
|
769
770
|
// Sku might be outdated, so we need to update it
|
|
770
771
|
code: C,
|
|
771
|
-
measurement:
|
|
772
|
+
measurement: B
|
|
772
773
|
});
|
|
773
774
|
}
|
|
774
775
|
})
|
|
775
|
-
), E = L(() => te.columnDefs.value), { promptSelectIngredients:
|
|
776
|
+
), E = L(() => te.columnDefs.value), { promptSelectIngredients: q } = Rt();
|
|
776
777
|
async function Z() {
|
|
777
778
|
const n = c.skus.map((D) => ({
|
|
778
779
|
label: D.name,
|
|
@@ -780,13 +781,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
780
781
|
value: D
|
|
781
782
|
})).filter((D) => {
|
|
782
783
|
var A;
|
|
783
|
-
return (A = s.purchaseOrder.items) == null ? void 0 : A.find((
|
|
784
|
-
}).map((D) => D.value), C = s.purchaseOrder.items ?? [],
|
|
784
|
+
return (A = s.purchaseOrder.items) == null ? void 0 : A.find((G) => G.sku._id === D.value._id);
|
|
785
|
+
}).map((D) => D.value), C = s.purchaseOrder.items ?? [], B = await q(
|
|
785
786
|
n.map((D) => D._id),
|
|
786
787
|
(D) => {
|
|
787
|
-
const A = c.skuById[D],
|
|
788
|
-
if (
|
|
789
|
-
return
|
|
788
|
+
const A = c.skuById[D], G = C.find((H) => H.sku._id === A._id);
|
|
789
|
+
if (G)
|
|
790
|
+
return G;
|
|
790
791
|
const J = { amount: 1, precision: be(A.unit) };
|
|
791
792
|
let S = {
|
|
792
793
|
id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
@@ -814,22 +815,22 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
814
815
|
), S;
|
|
815
816
|
}
|
|
816
817
|
);
|
|
817
|
-
if (!
|
|
818
|
-
const z =
|
|
818
|
+
if (!B) return;
|
|
819
|
+
const z = B.map((D) => D.sku._id), K = [];
|
|
819
820
|
for (const D of z) {
|
|
820
|
-
const A = C.filter((
|
|
821
|
+
const A = C.filter((G) => G.sku._id === D);
|
|
821
822
|
if (A.length > 0)
|
|
822
|
-
|
|
823
|
+
K.push(...A);
|
|
823
824
|
else {
|
|
824
|
-
const
|
|
825
|
-
|
|
825
|
+
const G = B.find((J) => J.sku._id === D);
|
|
826
|
+
G && K.push(G);
|
|
826
827
|
}
|
|
827
828
|
}
|
|
828
|
-
|
|
829
|
+
K.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = K;
|
|
829
830
|
}
|
|
830
831
|
return (l, n) => {
|
|
831
|
-
const C = V("FmTextField"),
|
|
832
|
-
return $(), le(
|
|
832
|
+
const C = V("FmTextField"), B = V("FmSelect"), z = V("FmTextarea"), K = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), G = V("FmForm");
|
|
833
|
+
return $(), le(G, {
|
|
833
834
|
ref_key: "formRef",
|
|
834
835
|
ref: _,
|
|
835
836
|
class: "flex flex-col gap-32",
|
|
@@ -847,7 +848,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
847
848
|
"onUpdate:modelValue": n[0] || (n[0] = (S) => t(s).name = S),
|
|
848
849
|
rules: [t(ke)()]
|
|
849
850
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
850
|
-
m(
|
|
851
|
+
m(B, {
|
|
851
852
|
label: t(u)("inventory.transfer.form.type.title"),
|
|
852
853
|
"model-value": R.value,
|
|
853
854
|
"onUpdate:modelValue": n[1] || (n[1] = (S) => R.value = S),
|
|
@@ -877,7 +878,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
877
878
|
]),
|
|
878
879
|
_: 1
|
|
879
880
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
880
|
-
m(
|
|
881
|
+
m(B, {
|
|
881
882
|
label: R.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
|
|
882
883
|
modelValue: d.value,
|
|
883
884
|
"onUpdate:modelValue": n[2] || (n[2] = (S) => d.value = S),
|
|
@@ -886,7 +887,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
886
887
|
"menu-wrapper": P((S) => {
|
|
887
888
|
var H;
|
|
888
889
|
return [
|
|
889
|
-
m(
|
|
890
|
+
m(Vt, Qe(S, {
|
|
890
891
|
items: U.value,
|
|
891
892
|
"model-value": (H = l.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id
|
|
892
893
|
}), null, 16, ["items", "model-value"])
|
|
@@ -924,7 +925,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
924
925
|
e("div", yo, [
|
|
925
926
|
e("div", vo, [
|
|
926
927
|
n[8] || (n[8] = e("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
927
|
-
m(
|
|
928
|
+
m(K, {
|
|
928
929
|
disabled: l.disabled,
|
|
929
930
|
label: "Select location",
|
|
930
931
|
"prepend-icon": "add",
|
|
@@ -953,7 +954,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
953
954
|
e("div", go, [
|
|
954
955
|
e("div", ho, [
|
|
955
956
|
e("div", xo, I(t(u)("inventory.transfer.form.items.title")), 1),
|
|
956
|
-
t(b).isEnabled ? ($(), le(
|
|
957
|
+
t(b).isEnabled ? ($(), le(K, {
|
|
957
958
|
key: 0,
|
|
958
959
|
label: "Check NetSuite",
|
|
959
960
|
"prepend-icon": "troubleshoot",
|
|
@@ -961,7 +962,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
961
962
|
onClick: y,
|
|
962
963
|
size: "md"
|
|
963
964
|
})) : oe("", !0),
|
|
964
|
-
m(
|
|
965
|
+
m(K, {
|
|
965
966
|
disabled: l.disabled,
|
|
966
967
|
label: t(u)("inventory.transfer.form.items.addItem"),
|
|
967
968
|
"prepend-icon": "add",
|
|
@@ -1091,7 +1092,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1091
1092
|
}
|
|
1092
1093
|
}), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, $o = /* @__PURE__ */ ae({
|
|
1093
1094
|
__name: "TransferTemplateDialog",
|
|
1094
|
-
props: /* @__PURE__ */
|
|
1095
|
+
props: /* @__PURE__ */ Be({
|
|
1095
1096
|
mode: {},
|
|
1096
1097
|
modelValue: {},
|
|
1097
1098
|
show: { type: Boolean }
|
|
@@ -1099,10 +1100,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1099
1100
|
disabled: { type: Boolean },
|
|
1100
1101
|
disabledModifiers: {}
|
|
1101
1102
|
}),
|
|
1102
|
-
emits: /* @__PURE__ */
|
|
1103
|
+
emits: /* @__PURE__ */ Be(["update:show", "submitted"], ["update:disabled"]),
|
|
1103
1104
|
setup(p, { expose: h, emit: v }) {
|
|
1104
1105
|
var w;
|
|
1105
|
-
const a = p, r = v, s =
|
|
1106
|
+
const a = p, r = v, s = Pt(), u = Tt(), { t: x } = me(), F = Xe(a, "show");
|
|
1106
1107
|
function c() {
|
|
1107
1108
|
return {
|
|
1108
1109
|
_id: "",
|
|
@@ -1282,7 +1283,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1282
1283
|
}, 8, ["modelValue"]);
|
|
1283
1284
|
};
|
|
1284
1285
|
}
|
|
1285
|
-
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Po = { class: "flex flex-col gap-4" }, Uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1286
|
+
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Po = { class: "flex flex-col gap-4" }, Uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qo = { class: "flex gap-1" }, Bo = { class: "fm-typo-en-body-lg-600" }, No = {
|
|
1286
1287
|
key: 0,
|
|
1287
1288
|
class: "flex flex-col gap-4"
|
|
1288
1289
|
}, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
|
|
@@ -1291,7 +1292,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1291
1292
|
}, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
|
|
1292
1293
|
key: 2,
|
|
1293
1294
|
class: "flex flex-col gap-4"
|
|
1294
|
-
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1295
|
+
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ko = { class: "fm-typo-en-body-lg-600" }, Go = {
|
|
1295
1296
|
key: 3,
|
|
1296
1297
|
class: "flex flex-col gap-4"
|
|
1297
1298
|
}, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600" }, Xo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-600" }, os = { class: "flex w-full gap-4" }, ss = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ls = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, as = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
|
|
@@ -1341,7 +1342,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1341
1342
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1342
1343
|
}, {
|
|
1343
1344
|
default: P(() => {
|
|
1344
|
-
var _, W, te, E,
|
|
1345
|
+
var _, W, te, E, q, Z, l, n, C;
|
|
1345
1346
|
return [
|
|
1346
1347
|
e("div", Do, [
|
|
1347
1348
|
e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
|
|
@@ -1353,9 +1354,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1353
1354
|
e("div", Ro, [
|
|
1354
1355
|
e("div", Po, [
|
|
1355
1356
|
e("div", Uo, [
|
|
1356
|
-
e("div",
|
|
1357
|
+
e("div", qo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1357
1358
|
]),
|
|
1358
|
-
e("div",
|
|
1359
|
+
e("div", Bo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
|
|
1359
1360
|
]),
|
|
1360
1361
|
(W = b.template) != null && W.updatedAt ? ($(), N("div", No, [
|
|
1361
1362
|
e("div", Lo, [
|
|
@@ -1368,15 +1369,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1368
1369
|
], 64)) : oe("", !0)
|
|
1369
1370
|
])
|
|
1370
1371
|
])) : oe("", !0),
|
|
1371
|
-
(
|
|
1372
|
+
(q = (E = u.value) == null ? void 0 : E.supplier) != null && q.name ? ($(), N("div", Ho, [
|
|
1372
1373
|
e("div", jo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1373
1374
|
e("div", Qo, I((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
|
|
1374
1375
|
])) : oe("", !0),
|
|
1375
1376
|
(n = u.value) != null && n.ref ? ($(), N("div", Yo, [
|
|
1376
1377
|
e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1377
|
-
e("div",
|
|
1378
|
+
e("div", Ko, I(u.value.ref), 1)
|
|
1378
1379
|
])) : oe("", !0),
|
|
1379
|
-
(C = u.value) != null && C.remark ? ($(), N("div",
|
|
1380
|
+
(C = u.value) != null && C.remark ? ($(), N("div", Go, [
|
|
1380
1381
|
e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1381
1382
|
e("div", Jo, I(u.value.remark), 1)
|
|
1382
1383
|
])) : oe("", !0)
|
|
@@ -1396,13 +1397,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1396
1397
|
e("div", os, [
|
|
1397
1398
|
e("div", ss, I(_.name), 1),
|
|
1398
1399
|
k[3] || (k[3] = e("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1399
|
-
e("div", ls, I(t(
|
|
1400
|
+
e("div", ls, I(t(_t)(_.quantity, _.sku.unit, _.measurement)), 1)
|
|
1400
1401
|
]),
|
|
1401
1402
|
e("div", ns, [
|
|
1402
1403
|
e("div", as, I(_.code), 1),
|
|
1403
1404
|
_.totalCost && t(r).enableTotalCost ? ($(), N("div", rs, " (" + I(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1404
1405
|
]),
|
|
1405
|
-
t(
|
|
1406
|
+
t(kt)(_) ? ($(), N("div", is, [
|
|
1406
1407
|
m(U, {
|
|
1407
1408
|
name: "error",
|
|
1408
1409
|
color: "system-error-300",
|
|
@@ -1452,10 +1453,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1452
1453
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1453
1454
|
};
|
|
1454
1455
|
}
|
|
1455
|
-
}), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1456
|
+
}), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Os = /* @__PURE__ */ ae({
|
|
1456
1457
|
__name: "TransferTemplateView",
|
|
1457
1458
|
setup(p) {
|
|
1458
|
-
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F =
|
|
1459
|
+
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = wt(), { loading: c, templates: o } = He(F), f = Y(!1), b = gt(), k = Ze(), { breakpoints: T } = Ct();
|
|
1459
1460
|
Te(F.fetchTemplates);
|
|
1460
1461
|
const R = L(
|
|
1461
1462
|
() => f.value || c.value || !k._currentLocation
|
|
@@ -1536,44 +1537,44 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1536
1537
|
"list-row": P((E) => [
|
|
1537
1538
|
m(Je, {
|
|
1538
1539
|
row: E,
|
|
1539
|
-
onRowClick: (
|
|
1540
|
+
onRowClick: (q) => t(a)(q)
|
|
1540
1541
|
}, {
|
|
1541
|
-
default: P((
|
|
1542
|
-
var Z, l, n, C,
|
|
1542
|
+
default: P((q) => {
|
|
1543
|
+
var Z, l, n, C, B, z, K, D, A, G, J, S, H, ie, Fe, Se, Ie, Me, $e, Oe, ce, De, Ve, Ae, Re, fe, Pe;
|
|
1543
1544
|
return [
|
|
1544
1545
|
e("div", cs, [
|
|
1545
1546
|
e("div", fs, [
|
|
1546
1547
|
e("div", ys, [
|
|
1547
1548
|
m(t(ee), {
|
|
1548
|
-
render: (n = (l = (Z =
|
|
1549
|
-
props: (
|
|
1549
|
+
render: (n = (l = (Z = q._id) == null ? void 0 : Z.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
|
|
1550
|
+
props: (B = (C = q._id) == null ? void 0 : C.getContext) == null ? void 0 : B.call(C)
|
|
1550
1551
|
}, null, 8, ["render", "props"])
|
|
1551
1552
|
]),
|
|
1552
1553
|
e("div", vs, [
|
|
1553
1554
|
m(t(ee), {
|
|
1554
|
-
render: (D = (
|
|
1555
|
-
props: (
|
|
1555
|
+
render: (D = (K = (z = q.name) == null ? void 0 : z.column) == null ? void 0 : K.columnDef) == null ? void 0 : D.cell,
|
|
1556
|
+
props: (G = (A = q.name) == null ? void 0 : A.getContext) == null ? void 0 : G.call(A)
|
|
1556
1557
|
}, null, 8, ["render", "props"])
|
|
1557
1558
|
]),
|
|
1558
1559
|
e("div", bs, [
|
|
1559
1560
|
m(t(ee), {
|
|
1560
|
-
render: (H = (S = (J =
|
|
1561
|
-
props: (Fe = (ie =
|
|
1561
|
+
render: (H = (S = (J = q.supplier) == null ? void 0 : J.column) == null ? void 0 : S.columnDef) == null ? void 0 : H.cell,
|
|
1562
|
+
props: (Fe = (ie = q.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Fe.call(ie)
|
|
1562
1563
|
}, null, 8, ["render", "props"])
|
|
1563
1564
|
]),
|
|
1564
1565
|
e("div", null, I((Se = E.original.locations) != null && Se.length ? `Enabled for ${(Ie = E.original.locations) == null ? void 0 : Ie.length} outlets` : "Enabled for all outlets"), 1),
|
|
1565
1566
|
e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
|
|
1566
1567
|
e("div", hs, [
|
|
1567
1568
|
m(t(ee), {
|
|
1568
|
-
render: (Oe = ($e = (Me =
|
|
1569
|
-
props: (De = (ce =
|
|
1569
|
+
render: (Oe = ($e = (Me = q.ref) == null ? void 0 : Me.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Oe.cell,
|
|
1570
|
+
props: (De = (ce = q.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
|
|
1570
1571
|
}, null, 8, ["render", "props"])
|
|
1571
1572
|
])
|
|
1572
1573
|
]),
|
|
1573
1574
|
e("div", null, [
|
|
1574
1575
|
m(t(ee), {
|
|
1575
|
-
render: (Re = (Ae = (Ve =
|
|
1576
|
-
props: (Pe = (fe =
|
|
1576
|
+
render: (Re = (Ae = (Ve = q.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
|
|
1577
|
+
props: (Pe = (fe = q.type) == null ? void 0 : fe.getContext) == null ? void 0 : Pe.call(fe)
|
|
1577
1578
|
}, null, 8, ["render", "props"])
|
|
1578
1579
|
])
|
|
1579
1580
|
])
|
|
@@ -1600,5 +1601,5 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1600
1601
|
}
|
|
1601
1602
|
});
|
|
1602
1603
|
export {
|
|
1603
|
-
|
|
1604
|
+
Os as default
|
|
1604
1605
|
};
|