@feedmepos/mf-inventory-portal 1.2.7-dev.2 → 1.2.7-dev.3
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-JINYgYlH.js} +1 -1
- package/dist/{ApprovalView-BrRGheio.js → ApprovalView-BOVW2i8o.js} +2 -2
- package/dist/{BindingsDialog-BSPkkRis.js → BindingsDialog-BKGLpdd-.js} +2 -2
- package/dist/{BindingsPicker-L3XnC3__.js → BindingsPicker-Tml6Oxod.js} +1 -1
- package/dist/{BindingsTable-CgUm0Ity.js → BindingsTable-DixFHTyC.js} +1 -1
- package/dist/{ClosingDraftView-D_gq2fCk.js → ClosingDraftView-nYSugXo0.js} +2 -2
- package/dist/{ClosingTemplateView-Q16zr6EV.js → ClosingTemplateView-C-gfh6s5.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-mVDQO6Xq.js → DeliveryOrderPrintPreview-BM9ZkrEw.js} +1 -1
- package/dist/{FmAdminBadge-Cjy6QPoR.js → FmAdminBadge-CiWXN0lw.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnH2Qxnr.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dn_c22ms.js} +3 -3
- package/dist/{FmMultiselectDialog-BbYhJk_O.js → FmMultiselectDialog-Bvekm8TI.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D0qlxGgo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D62ZdWwZ.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CCuLSITo.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BudJCuVV.js} +1 -1
- package/dist/{IngredientGroupView-CJ9Rsfg-.js → IngredientGroupView-DTQzZBKp.js} +2 -2
- package/dist/{IngredientsView-BbKzQnQP.js → IngredientsView-DOUCnkCT.js} +4 -4
- package/dist/{IntegrationView-B4giJ-Zl.js → IntegrationView-CN6amPy_.js} +4 -4
- package/dist/{InventoryBindingForm-bNRoyTsA.js → InventoryBindingForm-Dl9n2GJn.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DAaoOXUY.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-4N9XvkmZ.js} +3 -3
- package/dist/{InventoryBindingSummary-NfFve-nM.js → InventoryBindingSummary-eAPN3X_L.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DP11tzty.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSp3zFJ3.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-yjjkBSqL.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D2L9cWwt.js} +1 -1
- package/dist/{PublishView-w9GYA6kf.js → PublishView-BzN2wu_M.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-DmdDJmEq.js → PurchaseOrderPrintPreview-BR40N-ew.js} +1 -1
- package/dist/{ReceiveRequestView-z4o7lZvK.js → ReceiveRequestView-DtYFO3Wi.js} +8 -8
- package/dist/{RecipeView-DiiQtfXn.js → RecipeView-DlK-VV0_.js} +3 -3
- package/dist/{StockView-DKR2nFdm.js → StockView-B4acF5it.js} +7 -7
- package/dist/{SupplierView-BJcU4iQk.js → SupplierView-Cs8-A2B0.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-UNVxzRmJ.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dzm9Q3SP.js} +245 -245
- package/dist/{TransferTemplateView-rCbAWlh_.js → TransferTemplateView-DlzKEqem.js} +6 -6
- package/dist/{UnitView-BW9hbVHL.js → UnitView-BsYiE8aM.js} +3 -3
- package/dist/{WarehouseView-BO0hf42-.js → WarehouseView-DIW3iPB6.js} +1 -1
- package/dist/{app-ChezCkd5.js → app-Bszzf6y-.js} +4262 -4257
- package/dist/app.js +1 -1
- package/dist/{decimal-1sc-GcXN.js → decimal-BoNXDQoB.js} +1 -1
- package/dist/{format-unit-display-BK2TkQOA.js → format-unit-display-Dbabkv1O.js} +2 -2
- package/dist/{index-cLW2Uxz3.js → index-Dk2QEFDL.js} +1 -1
- package/dist/{index-CWivxw9k.js → index-DlhdJ3A4.js} +1 -1
- package/dist/{stock-FEj_v-SS.js → stock-BXV3de2I.js} +1 -1
- package/dist/{supplier-2r8VFThu.js → supplier-CKKYVzDf.js} +1 -1
- package/dist/{use-ingredient-select-dialog-CvgFQA-k.js → use-ingredient-select-dialog-DEmxBaQb.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BNp88Pjt.js → use-inventory-binding-dialog-DCN0J-F8.js} +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a4 as mt, u as _e, aT as F, aU as Ge, aC as Z, c as
|
|
2
|
-
import { ref as Y, computed as H, h as P, defineComponent as Se, reactive as Nt, onMounted as _t, resolveComponent as G, openBlock as f, createBlock as le, withCtx as X, createElementVNode as e, createVNode as I, unref as
|
|
3
|
-
import { F as qt } from "./decimal-
|
|
4
|
-
import { useCoreStore as
|
|
5
|
-
import { useDialog as Ye, useSnackbar as
|
|
6
|
-
import { F as
|
|
7
|
-
import { b as Pt, u as It, P as
|
|
1
|
+
import { a4 as mt, u as _e, aT as F, aU as Ge, aC as Z, c as Fe, b as We, ac as xt, ae as wt, af as $t, aV as Rt, e as it, f as pt, a1 as rt, aW as kt, a9 as ft, V as yt, j as ye, a7 as Dt, aX as vt, aj as je, h as ct, i as me, D as ve, aY as ht, aZ as bt, a_ as Ee, L as gt, a5 as Ue, a6 as ze, ab as Ve, T as De, t as ut, aA as Te, a$ as Qe, b0 as ke } from "./app-Bszzf6y-.js";
|
|
2
|
+
import { ref as Y, computed as H, h as P, defineComponent as Se, reactive as Nt, onMounted as _t, resolveComponent as G, openBlock as f, createBlock as le, withCtx as X, createElementVNode as e, createVNode as I, unref as h, createElementBlock as x, toDisplayString as _, createCommentVNode as M, Fragment as ue, renderList as be, createTextVNode as Ne, normalizeClass as Be, watch as Ct, isRef as At, resolveDynamicComponent as Tt } from "vue";
|
|
3
|
+
import { F as qt } from "./decimal-BoNXDQoB.js";
|
|
4
|
+
import { useCoreStore as Me, useI18n as st } from "@feedmepos/mf-common";
|
|
5
|
+
import { useDialog as Ye, useSnackbar as Pe, components as Ke, FmButtonVariant as fe, useProxiedModel as Ft } from "@feedmepos/ui-library";
|
|
6
|
+
import { F as qe } from "./FmAdminBadge-CiWXN0lw.js";
|
|
7
|
+
import { b as Pt, u as It, P as Ce, f as Et } from "./format-unit-display-Dbabkv1O.js";
|
|
8
8
|
import { E as Lt } from "./empty-placeholder-wf6-BWE8.js";
|
|
9
|
-
import { _ as Vt, F as Bt, a as Ut } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Vt, F as Bt, a as Ut } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D62ZdWwZ.js";
|
|
10
10
|
import { u as Mt, R as dt } from "./usePromise-CbVUCxhj.js";
|
|
11
|
-
import { u as jt } from "./index-
|
|
12
|
-
const
|
|
13
|
-
const o = _e(), p =
|
|
11
|
+
import { u as jt } from "./index-DlhdJ3A4.js";
|
|
12
|
+
const Ie = mt((g, r) => {
|
|
13
|
+
const o = _e(), p = Me();
|
|
14
14
|
return {
|
|
15
15
|
async readRequests(a, n, l) {
|
|
16
16
|
const s = a ?? o.currentLocationDBName, i = `${g.inventoryBackendUrl}/${s}/purchase-request`;
|
|
@@ -187,7 +187,7 @@ function et(g, r, o) {
|
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
function Ot() {
|
|
190
|
-
const g = _e(), r =
|
|
190
|
+
const g = _e(), r = Ie(), o = Fe();
|
|
191
191
|
async function p(n, l) {
|
|
192
192
|
const s = g.currentLocationDBName;
|
|
193
193
|
return n.doc.supplier.internal && n.operation === F.enum.confirmDraft && (n.operation = F.enum.submitRequest), await r.processPurchaseOrder(n, l || s);
|
|
@@ -199,11 +199,11 @@ function Ot() {
|
|
|
199
199
|
return (n) => o.useOperatePurchaseOrderV2 ? a(n.operateV2, n.transferTo) : p(n.operate, n.transferTo);
|
|
200
200
|
}
|
|
201
201
|
var tt = /* @__PURE__ */ ((g) => (g.RECEIVE_REQUEST = "receive/request", g.APPROVAL = "approval", g))(tt || {});
|
|
202
|
-
const
|
|
202
|
+
const Le = Y(), Xe = Y();
|
|
203
203
|
function gn(g, r) {
|
|
204
|
-
const o = Ye(), p = _e(), a =
|
|
204
|
+
const o = Ye(), p = _e(), a = Fe();
|
|
205
205
|
We();
|
|
206
|
-
const n = Pt(), l = It(), s = Y(!1), i =
|
|
206
|
+
const n = Pt(), l = It(), s = Y(!1), i = Pe(), O = Ie(), $ = zt(), b = Y(new Array()), q = Y(new Array()), u = Y(
|
|
207
207
|
r != null && r.startDate && (r != null && r.endDate) ? r : xt()
|
|
208
208
|
), C = H(() => {
|
|
209
209
|
const V = new Date(u.value.startDate), B = new Date(u.value.endDate);
|
|
@@ -219,12 +219,12 @@ function gn(g, r) {
|
|
|
219
219
|
modelValue: V || void 0,
|
|
220
220
|
show: !0,
|
|
221
221
|
"onUpdate:show"(N) {
|
|
222
|
-
|
|
222
|
+
Le.value.show = N;
|
|
223
223
|
},
|
|
224
224
|
templateId: D,
|
|
225
225
|
lastClosingDate: y.value
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
Le.value = S;
|
|
228
228
|
}
|
|
229
229
|
let se;
|
|
230
230
|
a.mustUsePoTemplate && !(V != null && V.template) ? o.open({
|
|
@@ -251,22 +251,22 @@ function gn(g, r) {
|
|
|
251
251
|
modelValue: pt(V),
|
|
252
252
|
show: !0,
|
|
253
253
|
"onUpdate:show"(se) {
|
|
254
|
-
|
|
254
|
+
Le.value.show = se;
|
|
255
255
|
},
|
|
256
256
|
lastClosingDate: y.value
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
Le.value = B;
|
|
259
259
|
}
|
|
260
260
|
async function z() {
|
|
261
|
-
|
|
261
|
+
b.value = [], q.value = [], s.value = !0;
|
|
262
262
|
try {
|
|
263
263
|
const V = await O.getPurchaseOrders(C.value);
|
|
264
|
-
|
|
264
|
+
b.value = V.sort((t, m) => m._id.localeCompare(t._id));
|
|
265
265
|
const B = V.flatMap((t) => t.shipmentIds || []).filter(Boolean), se = B.length > 0 ? await $.getShipmentsByIds(B) : [];
|
|
266
266
|
q.value = se;
|
|
267
267
|
const D = await c.readCurrentLocationLastClosing(!0), S = D == null ? void 0 : D._id;
|
|
268
268
|
S && (y.value = kt(S)), await a.awaitFeatureLoaded(() => a.mustUsePoTemplate) && await l.fetchTemplates();
|
|
269
|
-
const N =
|
|
269
|
+
const N = b.value.map((t) => {
|
|
270
270
|
var m;
|
|
271
271
|
return ((m = t.request) == null ? void 0 : m.id) ?? "";
|
|
272
272
|
}).filter((t) => t);
|
|
@@ -315,7 +315,7 @@ function gn(g, r) {
|
|
|
315
315
|
}
|
|
316
316
|
p.watchLocation(async (V) => {
|
|
317
317
|
if (!V) {
|
|
318
|
-
|
|
318
|
+
b.value = [];
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
321
|
await K();
|
|
@@ -428,13 +428,13 @@ function gn(g, r) {
|
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
return {
|
|
431
|
-
purchaseOrders:
|
|
431
|
+
purchaseOrders: b,
|
|
432
432
|
shipments: q,
|
|
433
433
|
purchaseRequests: d,
|
|
434
434
|
updateDateRange: J,
|
|
435
435
|
fetchData: K,
|
|
436
436
|
loading: s,
|
|
437
|
-
transferDialogProps:
|
|
437
|
+
transferDialogProps: Le,
|
|
438
438
|
promptCreateTransferDialog: R,
|
|
439
439
|
promptUpdateTransferDialog: k,
|
|
440
440
|
transferDetailsProps: oe,
|
|
@@ -473,7 +473,7 @@ function Gt(g) {
|
|
|
473
473
|
city: r.supplier.address.city,
|
|
474
474
|
state: r.supplier.address.state,
|
|
475
475
|
country: r.supplier.address.country
|
|
476
|
-
},
|
|
476
|
+
}, b = r.items.map((k) => {
|
|
477
477
|
const { sku: z, measurement: T } = k, K = ye(
|
|
478
478
|
Ht(k.sku, r.deliveryOrder || []),
|
|
479
479
|
!1
|
|
@@ -522,13 +522,13 @@ function Gt(g) {
|
|
|
522
522
|
remark: r.remark || "",
|
|
523
523
|
buyer: O,
|
|
524
524
|
supplier: $,
|
|
525
|
-
items:
|
|
525
|
+
items: b,
|
|
526
526
|
status: r.status,
|
|
527
527
|
deliveryOrders: q
|
|
528
528
|
}, y = new URL(window.location.href), R = a && (r.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
529
529
|
y.pathname = y.hostname.includes("portal.feedme") ? `/inventory/${R}` : `/${R}`, y.searchParams.append("data", JSON.stringify(c)), window.open(y.href, "_blank", "noreferrer");
|
|
530
530
|
}
|
|
531
|
-
const
|
|
531
|
+
const Ae = {
|
|
532
532
|
submitRequest: {
|
|
533
533
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
534
534
|
color: "text-fm-color-typo-primary",
|
|
@@ -591,26 +591,26 @@ const Ce = {
|
|
|
591
591
|
}
|
|
592
592
|
};
|
|
593
593
|
function _n(g, r, o) {
|
|
594
|
-
const p = _e(), a = We(), n =
|
|
594
|
+
const p = _e(), a = We(), n = Me(), { t: l } = st();
|
|
595
595
|
function s(u) {
|
|
596
596
|
switch (u.status) {
|
|
597
597
|
case "DRAFT":
|
|
598
598
|
return [
|
|
599
599
|
ve[me.Update],
|
|
600
600
|
ve[me.Details],
|
|
601
|
-
u.supplier.internal === "restaurant" || u.supplier.internal === "warehouse" ?
|
|
602
|
-
|
|
601
|
+
u.supplier.internal === "restaurant" || u.supplier.internal === "warehouse" ? Ae[F.enum.submitRequest] : Ae[F.enum.confirmDraft],
|
|
602
|
+
Ae[F.enum.cancelDraft]
|
|
603
603
|
];
|
|
604
604
|
case "RECEIVING":
|
|
605
605
|
return [
|
|
606
|
-
|
|
606
|
+
Ae[F.enum.completeReceive],
|
|
607
607
|
ve[me.Details],
|
|
608
608
|
ve[me.Print]
|
|
609
609
|
];
|
|
610
610
|
case "REQUESTING":
|
|
611
611
|
return g === "receive/request" ? [ve[me.Details], ve[me.Print]] : [
|
|
612
|
-
|
|
613
|
-
|
|
612
|
+
Ae[F.enum.approveRequest],
|
|
613
|
+
Ae[F.enum.rejectRequest],
|
|
614
614
|
ve[me.Details]
|
|
615
615
|
// DefaultRowActions[RowActionEnum.Print]
|
|
616
616
|
];
|
|
@@ -687,7 +687,7 @@ function _n(g, r, o) {
|
|
|
687
687
|
"div",
|
|
688
688
|
{ class: "py-3" },
|
|
689
689
|
P(
|
|
690
|
-
|
|
690
|
+
qe,
|
|
691
691
|
P(
|
|
692
692
|
"div",
|
|
693
693
|
{
|
|
@@ -713,7 +713,7 @@ function _n(g, r, o) {
|
|
|
713
713
|
...(C = n.sessionUser.value) != null && C.role.isAdmin ? [
|
|
714
714
|
{
|
|
715
715
|
id: "statusForAdmin",
|
|
716
|
-
header: () => P(
|
|
716
|
+
header: () => P(qe, {}, () => `${l("inventory.transfer.table.status")}`),
|
|
717
717
|
cell(d) {
|
|
718
718
|
return d.row.original.status;
|
|
719
719
|
},
|
|
@@ -842,7 +842,7 @@ function _n(g, r, o) {
|
|
|
842
842
|
}
|
|
843
843
|
return u;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function b() {
|
|
846
846
|
var C;
|
|
847
847
|
const u = [
|
|
848
848
|
{
|
|
@@ -880,7 +880,7 @@ function _n(g, r, o) {
|
|
|
880
880
|
...(C = n.sessionUser.value) != null && C.role.isAdmin ? [
|
|
881
881
|
{
|
|
882
882
|
id: "statusForAdmin",
|
|
883
|
-
header: () => P(
|
|
883
|
+
header: () => P(qe, {}, () => `${l("inventory.transfer.table.status")}`),
|
|
884
884
|
cell(d) {
|
|
885
885
|
return d.row.original.status;
|
|
886
886
|
},
|
|
@@ -985,7 +985,7 @@ function _n(g, r, o) {
|
|
|
985
985
|
return u;
|
|
986
986
|
}
|
|
987
987
|
return {
|
|
988
|
-
columnDefs: H(() => g === "receive/request" ? $() :
|
|
988
|
+
columnDefs: H(() => g === "receive/request" ? $() : b())
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Yt = { class: "flex flex-col gap-8" }, Qt = { class: "flex w-full justify-end gap-16" }, Xt = /* @__PURE__ */ Se({
|
|
@@ -1011,8 +1011,8 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1011
1011
|
});
|
|
1012
1012
|
const l = H(() => p.items.length <= 10);
|
|
1013
1013
|
return (s, i) => {
|
|
1014
|
-
const O = G("FmTable"), $ = G("FmButton"),
|
|
1015
|
-
return f(), le(
|
|
1014
|
+
const O = G("FmTable"), $ = G("FmButton"), b = G("FmForm");
|
|
1015
|
+
return f(), le(b, {
|
|
1016
1016
|
ref_key: "formRef",
|
|
1017
1017
|
ref: a,
|
|
1018
1018
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
@@ -1030,7 +1030,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1030
1030
|
cell: (q) => {
|
|
1031
1031
|
const u = o.purchaseOrder.items.find((C) => C.id === q.row.original.id || C.sku._id === q.row.original.sku._id);
|
|
1032
1032
|
return P(
|
|
1033
|
-
|
|
1033
|
+
h(Ke).FmTooltip,
|
|
1034
1034
|
{
|
|
1035
1035
|
content: u.code,
|
|
1036
1036
|
placement: "top",
|
|
@@ -1052,7 +1052,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1052
1052
|
cell: (q) => {
|
|
1053
1053
|
const u = o.purchaseOrder.items.find((C) => C.id === q.row.original.id || C.sku._id === q.row.original.sku._id);
|
|
1054
1054
|
return P(
|
|
1055
|
-
|
|
1055
|
+
h(Ke).FmTooltip,
|
|
1056
1056
|
{
|
|
1057
1057
|
content: u.name,
|
|
1058
1058
|
placement: "top",
|
|
@@ -1093,10 +1093,10 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1093
1093
|
},
|
|
1094
1094
|
disableUnit: !0,
|
|
1095
1095
|
rules: [
|
|
1096
|
-
|
|
1097
|
-
+
|
|
1096
|
+
h(Bt)(
|
|
1097
|
+
+h(ye)({ amount: 0, precision: 0 })
|
|
1098
1098
|
),
|
|
1099
|
-
|
|
1099
|
+
h(Ut)(+h(ye)(C.quantity))
|
|
1100
1100
|
],
|
|
1101
1101
|
applyDefaultRules: !0
|
|
1102
1102
|
});
|
|
@@ -1195,7 +1195,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1195
1195
|
}
|
|
1196
1196
|
};
|
|
1197
1197
|
function Zt() {
|
|
1198
|
-
const g =
|
|
1198
|
+
const g = Fe();
|
|
1199
1199
|
return {
|
|
1200
1200
|
ableToMarkReceived(r) {
|
|
1201
1201
|
if (!r || r.status !== Z.enum.RECEIVING)
|
|
@@ -1224,13 +1224,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1224
1224
|
scope: {}
|
|
1225
1225
|
},
|
|
1226
1226
|
setup(g) {
|
|
1227
|
-
const r = g, o = We(), p =
|
|
1227
|
+
const r = g, o = We(), p = Pe(), a = Ye(), n = Y(!1);
|
|
1228
1228
|
H(() => {
|
|
1229
|
-
var $,
|
|
1229
|
+
var $, b, q, u;
|
|
1230
1230
|
let s = !0;
|
|
1231
1231
|
o.isEnabled || (s = !1);
|
|
1232
1232
|
const i = r.purchaseOrder, O = r.poRequest;
|
|
1233
|
-
return i && (($ = i == null ? void 0 : i.supplier) != null && $.internal ? (!O && i.status == Z.enum.DRAFT && (s = !1), O && !((
|
|
1233
|
+
return i && (($ = i == null ? void 0 : i.supplier) != null && $.internal ? (!O && i.status == Z.enum.DRAFT && (s = !1), O && !((b = O == null ? void 0 : O.netSuite) != null && b.id) && (s = !1), r.isTransferBetweenOutlets && (s = !1)) : ((i == null ? void 0 : i.status) !== Z.enum.REQUESTING && i.supplier.internal && (s = !1), !O && !((q = i == null ? void 0 : i.netSuite) != null && q.id) && (s = !1), !O && ((u = i == null ? void 0 : i.netSuite) != null && u.id) && (i == null ? void 0 : i.status) == Z.enum.REQUESTING && (s = !1))), s;
|
|
1234
1234
|
});
|
|
1235
1235
|
async function l() {
|
|
1236
1236
|
n.value || a.open({
|
|
@@ -1254,10 +1254,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1254
1254
|
var s, i, O;
|
|
1255
1255
|
try {
|
|
1256
1256
|
n.value = !0;
|
|
1257
|
-
const $ = ((s = r.purchaseOrder) == null ? void 0 : s._id) || ((i = r.poRequest) == null ? void 0 : i.purchaseOrderId) || "",
|
|
1257
|
+
const $ = ((s = r.purchaseOrder) == null ? void 0 : s._id) || ((i = r.poRequest) == null ? void 0 : i.purchaseOrderId) || "", b = (O = r.poRequest) == null ? void 0 : O.to.dbName;
|
|
1258
1258
|
await o.syncPurchaseOrder(
|
|
1259
1259
|
$,
|
|
1260
|
-
r.scope === "approval" ?
|
|
1260
|
+
r.scope === "approval" ? b : void 0
|
|
1261
1261
|
), p.open({
|
|
1262
1262
|
title: "Sync with NetSuite",
|
|
1263
1263
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
@@ -1314,7 +1314,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1314
1314
|
scope: {}
|
|
1315
1315
|
},
|
|
1316
1316
|
setup(g) {
|
|
1317
|
-
const r = g, o = We(), p =
|
|
1317
|
+
const r = g, o = We(), p = Ie(), a = Y(r.poRequest);
|
|
1318
1318
|
_t(async () => {
|
|
1319
1319
|
var i;
|
|
1320
1320
|
if (!r.poRequest && ((i = r.purchaseOrder) != null && i._id)) {
|
|
@@ -1324,36 +1324,36 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1324
1324
|
});
|
|
1325
1325
|
const n = H(
|
|
1326
1326
|
() => {
|
|
1327
|
-
var i, O, $,
|
|
1327
|
+
var i, O, $, b, q, u;
|
|
1328
1328
|
return o.getSubsidiaryFullName(
|
|
1329
|
-
(($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.subsidiary) == null ? void 0 : $.id) || ((u = (q = (
|
|
1329
|
+
(($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.subsidiary) == null ? void 0 : $.id) || ((u = (q = (b = r.poRequest) == null ? void 0 : b.netSuite) == null ? void 0 : q.subsidiary) == null ? void 0 : u.id)
|
|
1330
1330
|
).fullName;
|
|
1331
1331
|
}
|
|
1332
1332
|
), l = H(() => {
|
|
1333
|
-
var i, O, $,
|
|
1334
|
-
return ($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.additionalInfo) != null && $.transactionnumber ? (u = (q = (
|
|
1333
|
+
var i, O, $, b, q, u, C, d, c, y, R, k;
|
|
1334
|
+
return ($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.additionalInfo) != null && $.transactionnumber ? (u = (q = (b = r.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : q.additionalInfo) == null ? void 0 : u.transactionnumber : (c = (d = (C = a.value) == null ? void 0 : C.netSuite) == null ? void 0 : d.additionalInfo) != null && c.transactionnumber ? (k = (R = (y = a.value) == null ? void 0 : y.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : k.transactionnumber : null;
|
|
1335
1335
|
}), s = H(() => {
|
|
1336
|
-
var i, O, $,
|
|
1337
|
-
return (O = (i = r.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) != null && O.length && ((
|
|
1336
|
+
var i, O, $, b, q, u;
|
|
1337
|
+
return (O = (i = r.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) != null && O.length && ((b = ($ = r.purchaseOrder) == null ? void 0 : $.deliveryFullfillment) == null ? void 0 : b.length) > 0 ? (u = (q = r.purchaseOrder) == null ? void 0 : q.deliveryFullfillment) == null ? void 0 : u.map((C) => {
|
|
1338
1338
|
var d;
|
|
1339
1339
|
return (d = C.netSuite) == null ? void 0 : d.refNo;
|
|
1340
1340
|
}).join(", ") : "N/A";
|
|
1341
1341
|
});
|
|
1342
1342
|
return (i, O) => {
|
|
1343
|
-
var $,
|
|
1344
|
-
return
|
|
1343
|
+
var $, b, q, u, C, d, c, y, R, k, z, T, K, J, oe, ce;
|
|
1344
|
+
return h(o).isEnabled ? (f(), x("div", tr, [
|
|
1345
1345
|
e("div", rr, [
|
|
1346
1346
|
O[0] || (O[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1347
1347
|
e("div", sr, _(n.value || "N/A"), 1)
|
|
1348
1348
|
]),
|
|
1349
|
-
!i.isTransferBetweenOutlets && i.scope ===
|
|
1350
|
-
e("div", nr, " NetSuite " + _((
|
|
1349
|
+
!i.isTransferBetweenOutlets && i.scope === h(tt).RECEIVE_REQUEST ? (f(), x("div", or, [
|
|
1350
|
+
e("div", nr, " NetSuite " + _((b = ($ = i.purchaseOrder) == null ? void 0 : $.netSuite) != null && b.recordType ? h(ht)((u = (q = i.purchaseOrder) == null ? void 0 : q.netSuite) == null ? void 0 : u.recordType) : i.transferType === h(Ce).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1351
1351
|
e("div", ar, [
|
|
1352
1352
|
(d = (C = i.purchaseOrder) == null ? void 0 : C.netSuite) != null && d.id ? (f(), x("span", lr, _((y = (c = i.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : y.refNo) + " (" + _((k = (R = i.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : k.id) + ") ", 1)) : (f(), x("span", ir, "N/A"))
|
|
1353
1353
|
])
|
|
1354
1354
|
])) : M("", !0),
|
|
1355
|
-
!i.isTransferBetweenOutlets && a.value || i.scope ===
|
|
1356
|
-
e("div", ur, " (Request) NetSuite " + _(i.transferType ===
|
|
1355
|
+
!i.isTransferBetweenOutlets && a.value || i.scope === h(tt).APPROVAL ? (f(), x("div", cr, [
|
|
1356
|
+
e("div", ur, " (Request) NetSuite " + _(i.transferType === h(Ce).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1357
1357
|
e("div", dr, [
|
|
1358
1358
|
(T = (z = a.value) == null ? void 0 : z.netSuite) != null && T.id ? (f(), x("span", mr, _((J = (K = a.value) == null ? void 0 : K.netSuite) == null ? void 0 : J.refNo) + " (" + _((ce = (oe = a.value) == null ? void 0 : oe.netSuite) == null ? void 0 : ce.id) + ") ", 1)) : (f(), x("span", pr, "N/A"))
|
|
1359
1359
|
])
|
|
@@ -1362,7 +1362,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1362
1362
|
O[1] || (O[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1363
1363
|
e("div", yr, _(l.value), 1)
|
|
1364
1364
|
])) : M("", !0),
|
|
1365
|
-
|
|
1365
|
+
h(o).isEnabled && i.transferType === h(Ce).TRANSFER && !i.isTransferBetweenOutlets ? (f(), x("div", vr, [
|
|
1366
1366
|
O[2] || (O[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1367
1367
|
e("div", hr, _(s.value), 1)
|
|
1368
1368
|
])) : M("", !0)
|
|
@@ -1376,7 +1376,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1376
1376
|
purchaseOrderId: {}
|
|
1377
1377
|
},
|
|
1378
1378
|
setup(g) {
|
|
1379
|
-
const r =
|
|
1379
|
+
const r = Pe(), o = bt();
|
|
1380
1380
|
async function p(a, n) {
|
|
1381
1381
|
const l = [];
|
|
1382
1382
|
if (a && l.push(`body.message:*${a}*`), n) {
|
|
@@ -1428,7 +1428,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1428
1428
|
},
|
|
1429
1429
|
setup(g) {
|
|
1430
1430
|
const r = g, o = bt(), p = Y(!1), a = _e(), n = Y(!0), l = Y(!1), s = Y(!1), i = Y(!1), O = Y(null), $ = Y([]);
|
|
1431
|
-
async function
|
|
1431
|
+
async function b() {
|
|
1432
1432
|
if (!O.value) {
|
|
1433
1433
|
p.value = !0;
|
|
1434
1434
|
try {
|
|
@@ -1460,13 +1460,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1460
1460
|
}
|
|
1461
1461
|
function u(d) {
|
|
1462
1462
|
switch (d) {
|
|
1463
|
-
case
|
|
1463
|
+
case Ee.Create:
|
|
1464
1464
|
return "text-green-600 bg-green-100";
|
|
1465
|
-
case
|
|
1465
|
+
case Ee.Set:
|
|
1466
1466
|
return "text-blue-600 bg-blue-100";
|
|
1467
|
-
case
|
|
1467
|
+
case Ee.Change:
|
|
1468
1468
|
return "text-yellow-600 bg-yellow-100";
|
|
1469
|
-
case
|
|
1469
|
+
case Ee.Unset:
|
|
1470
1470
|
return "text-red-600 bg-red-100";
|
|
1471
1471
|
default:
|
|
1472
1472
|
return "text-gray-600 bg-gray-100";
|
|
@@ -1495,7 +1495,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1495
1495
|
"prepend-icon": "info",
|
|
1496
1496
|
variant: "secondary",
|
|
1497
1497
|
label: "Latest Info",
|
|
1498
|
-
onClick: c[0] || (c[0] = (T) =>
|
|
1498
|
+
onClick: c[0] || (c[0] = (T) => b()),
|
|
1499
1499
|
"text-color": "primary",
|
|
1500
1500
|
"bg-color": "transparent",
|
|
1501
1501
|
"border-color": "primary"
|
|
@@ -1515,7 +1515,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1515
1515
|
}, [
|
|
1516
1516
|
e("div", null, [
|
|
1517
1517
|
I(R, {
|
|
1518
|
-
label:
|
|
1518
|
+
label: h(rt)(K)
|
|
1519
1519
|
}, null, 8, ["label"]),
|
|
1520
1520
|
e("div", $r, [
|
|
1521
1521
|
Array.isArray(T) ? (f(), x("span", Rr, _(T.length > 0 ? T.join(", ") : "N/A"), 1)) : (f(), x("span", kr, _(T), 1))
|
|
@@ -1531,7 +1531,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1531
1531
|
color: "#ff9500",
|
|
1532
1532
|
size: "sm"
|
|
1533
1533
|
}),
|
|
1534
|
-
c[5] || (c[5] =
|
|
1534
|
+
c[5] || (c[5] = Ne(" Change Logs "))
|
|
1535
1535
|
]),
|
|
1536
1536
|
e("div", Ar, [
|
|
1537
1537
|
e("table", Tr, [
|
|
@@ -1561,8 +1561,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1561
1561
|
e("td", Pr, _(T._employeename), 1),
|
|
1562
1562
|
e("td", Ir, _(T._contextname), 1),
|
|
1563
1563
|
e("td", {
|
|
1564
|
-
class:
|
|
1565
|
-
}, _(
|
|
1564
|
+
class: Be(`p-3 fm-typo-en-body-sm-600 ${u(Number(T.type) - 1)}`)
|
|
1565
|
+
}, _(h(Ee)[Number(T.type) - 1]), 3),
|
|
1566
1566
|
e("td", Er, _(T.lineid || ""), 1),
|
|
1567
1567
|
e("td", Lr, _(T._fieldname), 1),
|
|
1568
1568
|
e("td", Vr, _(T.oldvalue || ""), 1),
|
|
@@ -1605,39 +1605,39 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1605
1605
|
},
|
|
1606
1606
|
setup(g) {
|
|
1607
1607
|
const r = g, o = jt();
|
|
1608
|
-
|
|
1608
|
+
Me();
|
|
1609
1609
|
const p = H(() => {
|
|
1610
|
-
var s, i, O, $,
|
|
1611
|
-
const a = ((s = r.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((O = (i = r.purchaseOrder) == null ? void 0 : i.supplier) == null ? void 0 : O.internal) === "restaurant", n = r.transferType ===
|
|
1612
|
-
return n || l && !a || ((
|
|
1610
|
+
var s, i, O, $, b, q, u;
|
|
1611
|
+
const a = ((s = r.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((O = (i = r.purchaseOrder) == null ? void 0 : i.supplier) == null ? void 0 : O.internal) === "restaurant", n = r.transferType === Ce.PURCHASE, l = r.transferType === Ce.TRANSFER;
|
|
1612
|
+
return n || l && !a || ((b = ($ = r.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : b.id) || ((u = (q = r.poRequest) == null ? void 0 : q.netSuite) == null ? void 0 : u.id);
|
|
1613
1613
|
});
|
|
1614
1614
|
return (a, n) => {
|
|
1615
1615
|
var s, i;
|
|
1616
1616
|
const l = G("FmMenuDivider");
|
|
1617
|
-
return
|
|
1617
|
+
return h(o).isNetSuiteEnabled && p.value ? (f(), x("div", zr, [
|
|
1618
1618
|
e("div", Kr, [
|
|
1619
1619
|
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1620
1620
|
e("div", Hr, [
|
|
1621
1621
|
e("div", Gr, [
|
|
1622
|
-
(i = (s = r.purchaseOrder) == null ? void 0 : s.netSuite) != null && i.id ? (f(), le(
|
|
1622
|
+
(i = (s = r.purchaseOrder) == null ? void 0 : s.netSuite) != null && i.id ? (f(), le(qe, { key: 0 }, {
|
|
1623
1623
|
default: X(() => {
|
|
1624
|
-
var O, $,
|
|
1624
|
+
var O, $, b;
|
|
1625
1625
|
return [
|
|
1626
1626
|
I(jr, {
|
|
1627
1627
|
"netsuite-id": ($ = (O = a.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : $.id,
|
|
1628
|
-
"purchase-order-id": (
|
|
1628
|
+
"purchase-order-id": (b = a.purchaseOrder) == null ? void 0 : b._id
|
|
1629
1629
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1630
1630
|
];
|
|
1631
1631
|
}),
|
|
1632
1632
|
_: 1
|
|
1633
1633
|
})) : M("", !0),
|
|
1634
|
-
I(
|
|
1634
|
+
I(qe, null, {
|
|
1635
1635
|
default: X(() => {
|
|
1636
|
-
var O, $,
|
|
1636
|
+
var O, $, b;
|
|
1637
1637
|
return [
|
|
1638
1638
|
I(_r, {
|
|
1639
1639
|
"netsuite-id": ($ = (O = a.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : $.id,
|
|
1640
|
-
"purchase-order-id": (
|
|
1640
|
+
"purchase-order-id": (b = a.purchaseOrder) == null ? void 0 : b._id
|
|
1641
1641
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1642
1642
|
];
|
|
1643
1643
|
}),
|
|
@@ -1675,15 +1675,15 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1675
1675
|
},
|
|
1676
1676
|
emits: ["submitted"],
|
|
1677
1677
|
setup(g, { emit: r }) {
|
|
1678
|
-
const o = Y(!1), p = g, a = r, n = gt("deliveryOrder"), l =
|
|
1678
|
+
const o = Y(!1), p = g, a = r, n = gt("deliveryOrder"), l = Ie(), s = H(
|
|
1679
1679
|
() => {
|
|
1680
1680
|
var q;
|
|
1681
1681
|
return ((q = p.purchaseOrder.deliveryFullfillment) == null ? void 0 : q.findIndex(
|
|
1682
1682
|
(u) => p.deliveryOrder.fullfillmentId && u.id === p.deliveryOrder.fullfillmentId
|
|
1683
1683
|
)) ?? -1;
|
|
1684
1684
|
}
|
|
1685
|
-
), O =
|
|
1686
|
-
function
|
|
1685
|
+
), O = Fe().enablePortalDeliveryOrderWrite, $ = Pe();
|
|
1686
|
+
function b() {
|
|
1687
1687
|
l.updateDeliveryOrder({
|
|
1688
1688
|
deliveryOrder: {
|
|
1689
1689
|
...p.deliveryOrder,
|
|
@@ -1710,7 +1710,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1710
1710
|
overlay: !0
|
|
1711
1711
|
}, {
|
|
1712
1712
|
"dialog-button": X(() => [
|
|
1713
|
-
|
|
1713
|
+
h(O) ? (f(), le(C, {
|
|
1714
1714
|
key: 0,
|
|
1715
1715
|
variant: "plain",
|
|
1716
1716
|
label: "Edit",
|
|
@@ -1719,7 +1719,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1719
1719
|
})) : M("", !0)
|
|
1720
1720
|
]),
|
|
1721
1721
|
"dialog-header": X(() => [
|
|
1722
|
-
e("div", null, "Received on " + _(
|
|
1722
|
+
e("div", null, "Received on " + _(h(Ue)(p.deliveryOrder.createdAt)), 1)
|
|
1723
1723
|
]),
|
|
1724
1724
|
"dialog-footer": X(() => [
|
|
1725
1725
|
I(C, {
|
|
@@ -1727,7 +1727,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1727
1727
|
label: "Apply changes",
|
|
1728
1728
|
size: "md",
|
|
1729
1729
|
variant: "destructive",
|
|
1730
|
-
onClick:
|
|
1730
|
+
onClick: b
|
|
1731
1731
|
})
|
|
1732
1732
|
]),
|
|
1733
1733
|
default: X(() => [
|
|
@@ -1735,7 +1735,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1735
1735
|
e("div", Yr, [
|
|
1736
1736
|
e("div", Qr, [
|
|
1737
1737
|
u[2] || (u[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
1738
|
-
e("div", Xr, _(p.deliveryOrder.adjustment ?
|
|
1738
|
+
e("div", Xr, _(p.deliveryOrder.adjustment ? h(Ue)(new Date(h(ze)(p.deliveryOrder.adjustment))) : "-"), 1)
|
|
1739
1739
|
]),
|
|
1740
1740
|
e("div", Zr, [
|
|
1741
1741
|
u[3] || (u[3] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
@@ -1753,10 +1753,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1753
1753
|
]),
|
|
1754
1754
|
e("div", ns, [
|
|
1755
1755
|
e("div", as, [
|
|
1756
|
-
e("span", ls, _(
|
|
1756
|
+
e("span", ls, _(h(ye)(y.amount, !1)), 1),
|
|
1757
1757
|
e("span", is, _(((k = y.measurement) == null ? void 0 : k.abbrev) ?? y.sku.unit.abbrev), 1)
|
|
1758
1758
|
]),
|
|
1759
|
-
e("div", cs, _(`${y.cost ? `(${
|
|
1759
|
+
e("div", cs, _(`${y.cost ? `(${h(Ve)(y.cost)})` : ""}`), 1)
|
|
1760
1760
|
])
|
|
1761
1761
|
])
|
|
1762
1762
|
]);
|
|
@@ -1766,8 +1766,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1766
1766
|
u[5] || (u[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
1767
1767
|
e("div", ds, [
|
|
1768
1768
|
I(d, {
|
|
1769
|
-
modelValue:
|
|
1770
|
-
"onUpdate:modelValue": u[0] || (u[0] = (y) =>
|
|
1769
|
+
modelValue: h(n).deliveryOrderNumber,
|
|
1770
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => h(n).deliveryOrderNumber = y),
|
|
1771
1771
|
size: "md",
|
|
1772
1772
|
placeholder: p.deliveryOrder.deliveryOrderNumber
|
|
1773
1773
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -1812,13 +1812,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1812
1812
|
emits: ["submitted"],
|
|
1813
1813
|
setup(g, { emit: r }) {
|
|
1814
1814
|
var V, B, se;
|
|
1815
|
-
const { t: o } = st(), p = Y(!1), a =
|
|
1815
|
+
const { t: o } = st(), p = Y(!1), a = Me(), n = g, l = r, s = gt("", {
|
|
1816
1816
|
default: {
|
|
1817
1817
|
deliveryOrderNumber: "",
|
|
1818
1818
|
remark: "",
|
|
1819
1819
|
received: n.purchaseOrder.items.map((D) => ({
|
|
1820
1820
|
sku: D.sku,
|
|
1821
|
-
amount:
|
|
1821
|
+
amount: De.fromNumber(0),
|
|
1822
1822
|
measurement: D.measurement
|
|
1823
1823
|
})),
|
|
1824
1824
|
createdBy: {
|
|
@@ -1827,7 +1827,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1827
1827
|
},
|
|
1828
1828
|
createdAt: ""
|
|
1829
1829
|
}
|
|
1830
|
-
}), i =
|
|
1830
|
+
}), i = Ie(), O = Ye(), $ = Fe(), b = ((se = n.purchaseOrder) == null ? void 0 : se.supplier.internal) != null, q = b && $.enablePOSTransferRequireFulfillment, u = $.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === Z.Enum.RECEIVING || n.purchaseOrder.status === Z.Enum.COMPLETE) && (b ? !q : !0), C = $.enablePurchaseOrderReceiveWithCustomCost, d = $.enableBackdateReceive, c = Y({}), y = Pe(), R = H({
|
|
1831
1831
|
get() {
|
|
1832
1832
|
if (!s.createdAt) return "";
|
|
1833
1833
|
const D = new Date(s.createdAt), S = D.getFullYear(), N = String(D.getMonth() + 1).padStart(2, "0"), t = String(D.getDate()).padStart(2, "0");
|
|
@@ -1893,7 +1893,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1893
1893
|
precision: 4
|
|
1894
1894
|
// Standardize to 4 decimals
|
|
1895
1895
|
} : s.received[D].cost = {
|
|
1896
|
-
currency:
|
|
1896
|
+
currency: Te(),
|
|
1897
1897
|
amount: 0,
|
|
1898
1898
|
precision: 4
|
|
1899
1899
|
};
|
|
@@ -1908,7 +1908,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1908
1908
|
},
|
|
1909
1909
|
set: (N) => {
|
|
1910
1910
|
s.received[S].cost = {
|
|
1911
|
-
currency:
|
|
1911
|
+
currency: Te(),
|
|
1912
1912
|
...ut(N, 4)
|
|
1913
1913
|
};
|
|
1914
1914
|
}
|
|
@@ -1933,7 +1933,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1933
1933
|
deliveryOrder: s,
|
|
1934
1934
|
purchaseOrderId: n.purchaseOrder._id,
|
|
1935
1935
|
purchaseOrderRev: n.purchaseOrder._rev,
|
|
1936
|
-
currency:
|
|
1936
|
+
currency: Te()
|
|
1937
1937
|
}).then(() => {
|
|
1938
1938
|
y.open(
|
|
1939
1939
|
{
|
|
@@ -1949,12 +1949,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1949
1949
|
const N = G("FmButton"), t = G("FmDatePicker"), m = G("FmTimePicker"), A = G("FmIcon"), w = G("FmStepperField"), j = G("FmSwitch"), U = G("FmTextField"), ee = G("FmDialog");
|
|
1950
1950
|
return f(), le(ee, {
|
|
1951
1951
|
modelValue: p.value,
|
|
1952
|
-
"onUpdate:modelValue": S[4] || (S[4] = (
|
|
1952
|
+
"onUpdate:modelValue": S[4] || (S[4] = (v) => p.value = v),
|
|
1953
1953
|
overlay: !0,
|
|
1954
1954
|
"min-width": 800
|
|
1955
1955
|
}, {
|
|
1956
1956
|
"dialog-button": X(() => [
|
|
1957
|
-
|
|
1957
|
+
h(u) ? (f(), le(N, {
|
|
1958
1958
|
key: 0,
|
|
1959
1959
|
variant: "primary",
|
|
1960
1960
|
label: "Create",
|
|
@@ -1977,17 +1977,17 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1977
1977
|
}, null, 8, ["disabled"])
|
|
1978
1978
|
]),
|
|
1979
1979
|
default: X(() => {
|
|
1980
|
-
var
|
|
1980
|
+
var v;
|
|
1981
1981
|
return [
|
|
1982
1982
|
e("div", hs, [
|
|
1983
1983
|
e("div", bs, [
|
|
1984
1984
|
S[5] || (S[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
1985
|
-
e("div", gs, _((
|
|
1985
|
+
e("div", gs, _((v = h(a).sessionUser.value) == null ? void 0 : v.displayName), 1)
|
|
1986
1986
|
]),
|
|
1987
|
-
|
|
1987
|
+
h(d) ? (f(), x("div", _s, [
|
|
1988
1988
|
e("div", Ss, [
|
|
1989
1989
|
e("div", Os, [
|
|
1990
|
-
S[6] || (S[6] =
|
|
1990
|
+
S[6] || (S[6] = Ne(" Delivery Date & Time ")),
|
|
1991
1991
|
!R.value && !k.value ? (f(), x("div", xs, " Leave blank to use current date & time ")) : M("", !0)
|
|
1992
1992
|
]),
|
|
1993
1993
|
R.value || k.value ? (f(), le(N, {
|
|
@@ -2036,7 +2036,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2036
2036
|
label: "Receive Quantity",
|
|
2037
2037
|
modelValue: ce.value[W].value,
|
|
2038
2038
|
"onUpdate:modelValue": (de) => ce.value[W].value = de,
|
|
2039
|
-
"helper-text": `${
|
|
2039
|
+
"helper-text": `${h(o)("inventory.transfer.receiveRequest.details.received")} ${h(De).toFormatString(
|
|
2040
2040
|
{
|
|
2041
2041
|
value: (te = D.receivedInfoMap[L.sku._id]) == null ? void 0 : te.received
|
|
2042
2042
|
}
|
|
@@ -2044,7 +2044,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2044
2044
|
min: 0,
|
|
2045
2045
|
"append-text": ((ne = L.measurement) == null ? void 0 : ne.abbrev) ?? L.sku.unit.abbrev
|
|
2046
2046
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2047
|
-
|
|
2047
|
+
h(C) ? (f(), x("div", Ps, [
|
|
2048
2048
|
I(j, {
|
|
2049
2049
|
"model-value": c.value[W],
|
|
2050
2050
|
"onUpdate:modelValue": (de) => Oe(W),
|
|
@@ -2052,7 +2052,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2052
2052
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2053
2053
|
S[7] || (S[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2054
2054
|
])) : M("", !0),
|
|
2055
|
-
|
|
2055
|
+
h(C) && c.value[W] ? (f(), le(w, {
|
|
2056
2056
|
key: 1,
|
|
2057
2057
|
modelValue: ge.value[W].value,
|
|
2058
2058
|
"onUpdate:modelValue": (de) => ge.value[W].value = de,
|
|
@@ -2061,7 +2061,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2061
2061
|
min: 0,
|
|
2062
2062
|
placeholder: "0.0000",
|
|
2063
2063
|
size: "sm",
|
|
2064
|
-
"append-text":
|
|
2064
|
+
"append-text": h(Te)()
|
|
2065
2065
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
|
|
2066
2066
|
])
|
|
2067
2067
|
]),
|
|
@@ -2073,8 +2073,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2073
2073
|
S[9] || (S[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2074
2074
|
e("div", Ls, [
|
|
2075
2075
|
I(U, {
|
|
2076
|
-
modelValue:
|
|
2077
|
-
"onUpdate:modelValue": S[2] || (S[2] = (L) =>
|
|
2076
|
+
modelValue: h(s).deliveryOrderNumber,
|
|
2077
|
+
"onUpdate:modelValue": S[2] || (S[2] = (L) => h(s).deliveryOrderNumber = L),
|
|
2078
2078
|
size: "md"
|
|
2079
2079
|
}, null, 8, ["modelValue"])
|
|
2080
2080
|
])
|
|
@@ -2083,8 +2083,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2083
2083
|
S[10] || (S[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2084
2084
|
e("div", Bs, [
|
|
2085
2085
|
I(U, {
|
|
2086
|
-
modelValue:
|
|
2087
|
-
"onUpdate:modelValue": S[3] || (S[3] = (L) =>
|
|
2086
|
+
modelValue: h(s).remark,
|
|
2087
|
+
"onUpdate:modelValue": S[3] || (S[3] = (L) => h(s).remark = L),
|
|
2088
2088
|
size: "md"
|
|
2089
2089
|
}, null, 8, ["modelValue"])
|
|
2090
2090
|
])
|
|
@@ -2154,7 +2154,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2154
2154
|
},
|
|
2155
2155
|
emits: ["update:show", "submitted"],
|
|
2156
2156
|
setup(g, { emit: r }) {
|
|
2157
|
-
const o = g, p = r, a = Ye(), n =
|
|
2157
|
+
const o = g, p = r, a = Ye(), n = Pe(), l = Fe(), s = _e(), i = Me(), O = H(
|
|
2158
2158
|
() => {
|
|
2159
2159
|
var t, m;
|
|
2160
2160
|
return {
|
|
@@ -2162,10 +2162,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2162
2162
|
name: ((m = i.sessionUser.value) == null ? void 0 : m.displayName) ?? ""
|
|
2163
2163
|
};
|
|
2164
2164
|
}
|
|
2165
|
-
), $ = Zt(), { t:
|
|
2165
|
+
), $ = Zt(), { t: b } = st(), q = H(
|
|
2166
2166
|
() => {
|
|
2167
2167
|
var t, m, A, w;
|
|
2168
|
-
return ((m = (t = o.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : m.internal) === "restaurant" || ((w = (A = o.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : w.internal) === "warehouse" ?
|
|
2168
|
+
return ((m = (t = o.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : m.internal) === "restaurant" || ((w = (A = o.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : w.internal) === "warehouse" ? Ce.TRANSFER : Ce.PURCHASE;
|
|
2169
2169
|
}
|
|
2170
2170
|
), u = H(() => {
|
|
2171
2171
|
var A;
|
|
@@ -2182,7 +2182,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
2184
|
return m;
|
|
2185
|
-
}), C = Y(!1), d = Y(""), c = Y(!0), y =
|
|
2185
|
+
}), C = Y(!1), d = Y(""), c = Y(!0), y = Ie(), R = Mt(y.getWorkflowConfig), k = Ot(), z = H(() => {
|
|
2186
2186
|
if (!o.purchaseOrder)
|
|
2187
2187
|
return [];
|
|
2188
2188
|
const t = R.result.value;
|
|
@@ -2222,11 +2222,11 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2222
2222
|
return o.scope === "approval" && (A = A.filter((w) => w !== F.enum.completeReceive)), A;
|
|
2223
2223
|
}), T = Ft(o, "show"), K = H(() => [
|
|
2224
2224
|
{
|
|
2225
|
-
label:
|
|
2225
|
+
label: b("inventory.transfer.receiveRequest.details.overview"),
|
|
2226
2226
|
value: "overview"
|
|
2227
2227
|
},
|
|
2228
2228
|
{
|
|
2229
|
-
label:
|
|
2229
|
+
label: b("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
2230
2230
|
value: "deliveryHistory"
|
|
2231
2231
|
}
|
|
2232
2232
|
]), J = Y(K.value[0]);
|
|
@@ -2246,11 +2246,11 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2246
2246
|
secondaryActions: { text: "No", close: !1 }
|
|
2247
2247
|
}).onPrimary(async () => {
|
|
2248
2248
|
var L, W, te, E;
|
|
2249
|
-
const
|
|
2250
|
-
A === F.enum.approveRequest ? (
|
|
2249
|
+
const v = [];
|
|
2250
|
+
A === F.enum.approveRequest ? (v.push({
|
|
2251
2251
|
action: "approveRequest",
|
|
2252
2252
|
payload: null
|
|
2253
|
-
}), m.fulfillment &&
|
|
2253
|
+
}), m.fulfillment && v.push({
|
|
2254
2254
|
action: "processRequest",
|
|
2255
2255
|
payload: {
|
|
2256
2256
|
fulfillmentId: "",
|
|
@@ -2259,7 +2259,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2259
2259
|
items: m.fulfillment.items,
|
|
2260
2260
|
createdBy: O.value
|
|
2261
2261
|
}
|
|
2262
|
-
})) : A === F.enum.processRequest ? m.fulfillment &&
|
|
2262
|
+
})) : A === F.enum.processRequest ? m.fulfillment && v.push({
|
|
2263
2263
|
action: "processRequest",
|
|
2264
2264
|
payload: {
|
|
2265
2265
|
fulfillmentId: "",
|
|
@@ -2268,10 +2268,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2268
2268
|
items: m.fulfillment.items,
|
|
2269
2269
|
createdBy: O.value
|
|
2270
2270
|
}
|
|
2271
|
-
}) : A === F.enum.rejectRequest ?
|
|
2271
|
+
}) : A === F.enum.rejectRequest ? v.push({
|
|
2272
2272
|
action: "rejectRequest",
|
|
2273
2273
|
payload: null
|
|
2274
|
-
}) : A === F.enum.closeRequest &&
|
|
2274
|
+
}) : A === F.enum.closeRequest && v.push({
|
|
2275
2275
|
action: "closeRequest",
|
|
2276
2276
|
payload: null
|
|
2277
2277
|
});
|
|
@@ -2286,7 +2286,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2286
2286
|
_id: ((L = o.purchaseOrder) == null ? void 0 : L._id) ?? "",
|
|
2287
2287
|
_rev: ((W = o.purchaseOrder) == null ? void 0 : W._rev) ?? "",
|
|
2288
2288
|
action: A,
|
|
2289
|
-
payloads:
|
|
2289
|
+
payloads: v
|
|
2290
2290
|
// add payload if action is receiveStock or processRequest
|
|
2291
2291
|
},
|
|
2292
2292
|
transferTo: (E = (te = o.poRequest) == null ? void 0 : te.to) == null ? void 0 : E.dbName
|
|
@@ -2296,14 +2296,14 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2296
2296
|
}
|
|
2297
2297
|
}).onSecondary(() => {
|
|
2298
2298
|
U("cancelled");
|
|
2299
|
-
for (let
|
|
2299
|
+
for (let v = 0; v < j + 2; v++)
|
|
2300
2300
|
a.close();
|
|
2301
2301
|
}).onClose(() => {
|
|
2302
2302
|
});
|
|
2303
2303
|
});
|
|
2304
2304
|
}
|
|
2305
2305
|
async function ce(t) {
|
|
2306
|
-
var j, U, ee,
|
|
2306
|
+
var j, U, ee, v;
|
|
2307
2307
|
if (t === F.enum.receiveStock)
|
|
2308
2308
|
return;
|
|
2309
2309
|
const m = St[t];
|
|
@@ -2324,7 +2324,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2324
2324
|
t === F.enum.completeReceive) && l.autoReceiveWarehouse)
|
|
2325
2325
|
L.autoReceive = !0;
|
|
2326
2326
|
else if ((t === F.enum.approveRequest || t === F.enum.processRequest) && l.acceptRequireFulfillment) {
|
|
2327
|
-
const te = (U = (j = o.poRequest) == null ? void 0 : j.from) == null ? void 0 : U.dbName, E = (
|
|
2327
|
+
const te = (U = (j = o.poRequest) == null ? void 0 : j.from) == null ? void 0 : U.dbName, E = (v = (ee = o.poRequest) == null ? void 0 : ee.to) == null ? void 0 : v.dbName;
|
|
2328
2328
|
if (te && E && (te.startsWith("warehouse_") || E.startsWith("warehouse_"))) {
|
|
2329
2329
|
const ne = await new Promise((de, we) => {
|
|
2330
2330
|
a.open({
|
|
@@ -2373,61 +2373,61 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2373
2373
|
const t = o.purchaseOrder;
|
|
2374
2374
|
if (!t) return { status: "", statusClass: "" };
|
|
2375
2375
|
const { partial: m, over: A } = Je(ge.value), w = et(t.status, m, A);
|
|
2376
|
-
let j =
|
|
2377
|
-
return w === Z.enum.CLOSE && (j = `${
|
|
2376
|
+
let j = b(`inventory.transfer.status.${w}`), U = `${t.status}`.toLocaleLowerCase("en-us");
|
|
2377
|
+
return w === Z.enum.CLOSE && (j = `${b(`inventory.transfer.status.${Z.enum.COMPLETE}`)}`), w === "PARTIAL_RECEIVED" && U === Z.enum.PROCESSING.toLocaleLowerCase("en-us") && (U = Z.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2378
2378
|
status: j,
|
|
2379
2379
|
statusClass: `fm-status-badge fm-status-badge-${U}`
|
|
2380
2380
|
};
|
|
2381
2381
|
}), he = H(() => {
|
|
2382
2382
|
var U, ee;
|
|
2383
2383
|
const t = ((U = o.purchaseOrder) == null ? void 0 : U.deliveryOrder) ?? [], m = ((ee = o.purchaseOrder) == null ? void 0 : ee.deliveryFullfillment) ?? [], A = [
|
|
2384
|
-
...t.map((
|
|
2385
|
-
createdAt:
|
|
2384
|
+
...t.map((v) => ({
|
|
2385
|
+
createdAt: v.createdAt,
|
|
2386
2386
|
type: "grn",
|
|
2387
|
-
doc:
|
|
2387
|
+
doc: v
|
|
2388
2388
|
})),
|
|
2389
|
-
...m.map((
|
|
2390
|
-
createdAt:
|
|
2389
|
+
...m.map((v) => ({
|
|
2390
|
+
createdAt: v.createdAt,
|
|
2391
2391
|
type: "fulfillment",
|
|
2392
|
-
doc:
|
|
2392
|
+
doc: v
|
|
2393
2393
|
}))
|
|
2394
2394
|
];
|
|
2395
|
-
A.reverse().sort((
|
|
2396
|
-
function w(
|
|
2397
|
-
var te, E, ne, de, we, $e, Q, ie, ae;
|
|
2398
|
-
const L = m.findIndex((re) => re.id ===
|
|
2395
|
+
A.reverse().sort((v, L) => v.createdAt.localeCompare(L.createdAt));
|
|
2396
|
+
function w(v) {
|
|
2397
|
+
var te, E, ne, de, we, $e, Q, ie, ae, pe;
|
|
2398
|
+
const L = m.findIndex((re) => re.id === v.fullfillmentId), W = [
|
|
2399
2399
|
(E = (te = m[L]) == null ? void 0 : te.netSuite) != null && E.refNo ? {
|
|
2400
2400
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
2401
2401
|
values: [(de = (ne = m[L]) == null ? void 0 : ne.netSuite) == null ? void 0 : de.refNo]
|
|
2402
2402
|
} : null,
|
|
2403
|
-
(we =
|
|
2403
|
+
(we = v == null ? void 0 : v.netSuite) != null && we.refNo ? {
|
|
2404
2404
|
label: "Netsuite ref no.",
|
|
2405
|
-
values: [($e =
|
|
2405
|
+
values: [`${($e = v == null ? void 0 : v.netSuite) == null ? void 0 : $e.refNo} (${((Q = v == null ? void 0 : v.netSuite) == null ? void 0 : Q.id) ?? "-"})`]
|
|
2406
2406
|
} : null,
|
|
2407
|
-
(
|
|
2407
|
+
(ie = v == null ? void 0 : v.netSuite) != null && ie.recordType ? {
|
|
2408
2408
|
label: "Netsuite Type",
|
|
2409
|
-
values: [ht((
|
|
2409
|
+
values: [ht((ae = v == null ? void 0 : v.netSuite) == null ? void 0 : ae.recordType)]
|
|
2410
2410
|
} : null
|
|
2411
2411
|
];
|
|
2412
2412
|
return {
|
|
2413
2413
|
header: "Received",
|
|
2414
|
-
deliveryOrder:
|
|
2415
|
-
date:
|
|
2414
|
+
deliveryOrder: v,
|
|
2415
|
+
date: Ue(new Date(v.createdAt)),
|
|
2416
2416
|
info: [
|
|
2417
2417
|
{
|
|
2418
2418
|
label: "Adjustment date",
|
|
2419
2419
|
values: [
|
|
2420
|
-
|
|
2420
|
+
v.adjustment ? Ue(new Date(ze(v.adjustment))) : "-"
|
|
2421
2421
|
]
|
|
2422
2422
|
},
|
|
2423
2423
|
{
|
|
2424
2424
|
label: "Received by",
|
|
2425
|
-
values: [(
|
|
2425
|
+
values: [(pe = v.createdBy) == null ? void 0 : pe.name]
|
|
2426
2426
|
},
|
|
2427
2427
|
{
|
|
2428
2428
|
label: "Received items",
|
|
2429
|
-
values:
|
|
2430
|
-
var
|
|
2429
|
+
values: v.received.map((re) => {
|
|
2430
|
+
var Re;
|
|
2431
2431
|
return P("div", [
|
|
2432
2432
|
P(
|
|
2433
2433
|
"div",
|
|
@@ -2481,7 +2481,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2481
2481
|
{
|
|
2482
2482
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2483
2483
|
},
|
|
2484
|
-
((
|
|
2484
|
+
((Re = re.measurement) == null ? void 0 : Re.abbrev) ?? re.sku.unit.abbrev
|
|
2485
2485
|
)
|
|
2486
2486
|
]
|
|
2487
2487
|
),
|
|
@@ -2490,7 +2490,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2490
2490
|
{
|
|
2491
2491
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2492
2492
|
},
|
|
2493
|
-
`${re.cost ? `(${
|
|
2493
|
+
`${re.cost ? `(${Ve(re.cost)})` : ""}`
|
|
2494
2494
|
)
|
|
2495
2495
|
]
|
|
2496
2496
|
)
|
|
@@ -2501,11 +2501,11 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2501
2501
|
},
|
|
2502
2502
|
{
|
|
2503
2503
|
label: "Delivery order no.",
|
|
2504
|
-
values: [
|
|
2504
|
+
values: [v.deliveryOrderNumber || "N/A"]
|
|
2505
2505
|
},
|
|
2506
2506
|
{
|
|
2507
2507
|
label: "Remark",
|
|
2508
|
-
values: [
|
|
2508
|
+
values: [v.remark || "N/A"]
|
|
2509
2509
|
},
|
|
2510
2510
|
L > -1 ? {
|
|
2511
2511
|
label: "Fulfilment's sequence",
|
|
@@ -2515,12 +2515,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2515
2515
|
].filter((re) => !!re)
|
|
2516
2516
|
};
|
|
2517
2517
|
}
|
|
2518
|
-
function j(
|
|
2518
|
+
function j(v) {
|
|
2519
2519
|
var W, te;
|
|
2520
|
-
const L = m.findIndex((E) => E.id ===
|
|
2520
|
+
const L = m.findIndex((E) => E.id === v.id);
|
|
2521
2521
|
return {
|
|
2522
2522
|
header: "Fulfillment",
|
|
2523
|
-
date:
|
|
2523
|
+
date: Ue(new Date(v.createdAt)),
|
|
2524
2524
|
info: [
|
|
2525
2525
|
{
|
|
2526
2526
|
label: "Sequence",
|
|
@@ -2528,7 +2528,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2528
2528
|
},
|
|
2529
2529
|
{
|
|
2530
2530
|
label: "Receiveable items",
|
|
2531
|
-
values:
|
|
2531
|
+
values: v.items.map((E) => {
|
|
2532
2532
|
var ne;
|
|
2533
2533
|
return P("div", [
|
|
2534
2534
|
P(
|
|
@@ -2592,7 +2592,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2592
2592
|
{
|
|
2593
2593
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2594
2594
|
},
|
|
2595
|
-
`${E.cost ? `(${
|
|
2595
|
+
`${E.cost ? `(${Ve(E.cost)})` : ""}`
|
|
2596
2596
|
)
|
|
2597
2597
|
]
|
|
2598
2598
|
)
|
|
@@ -2601,76 +2601,76 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2601
2601
|
]);
|
|
2602
2602
|
})
|
|
2603
2603
|
},
|
|
2604
|
-
(W =
|
|
2604
|
+
(W = v.netSuite) != null && W.refNo ? {
|
|
2605
2605
|
label: "Ref no. (Netsuite)",
|
|
2606
|
-
values: [(te =
|
|
2606
|
+
values: [(te = v.netSuite) == null ? void 0 : te.refNo]
|
|
2607
2607
|
} : null
|
|
2608
2608
|
].filter((E) => !!E)
|
|
2609
2609
|
};
|
|
2610
2610
|
}
|
|
2611
|
-
return A.map((
|
|
2612
|
-
switch (
|
|
2611
|
+
return A.map((v) => {
|
|
2612
|
+
switch (v.type) {
|
|
2613
2613
|
case "grn":
|
|
2614
|
-
return w(
|
|
2614
|
+
return w(v.doc);
|
|
2615
2615
|
case "fulfillment":
|
|
2616
|
-
return j(
|
|
2616
|
+
return j(v.doc);
|
|
2617
2617
|
}
|
|
2618
2618
|
});
|
|
2619
2619
|
}), V = H(() => {
|
|
2620
2620
|
var m;
|
|
2621
2621
|
const t = {
|
|
2622
2622
|
...yt(0),
|
|
2623
|
-
currency:
|
|
2623
|
+
currency: Te()
|
|
2624
2624
|
};
|
|
2625
2625
|
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((A, w) => ({
|
|
2626
2626
|
...ft(A, w.totalCost ?? t),
|
|
2627
|
-
currency:
|
|
2627
|
+
currency: Te()
|
|
2628
2628
|
}), t)) ?? t;
|
|
2629
2629
|
});
|
|
2630
2630
|
function B(t) {
|
|
2631
2631
|
var U;
|
|
2632
|
-
const A = (((U = o.purchaseOrder) == null ? void 0 : U.version) ??
|
|
2633
|
-
return `<span class="${se(t)} fm-typo-en-body-lg-600">${
|
|
2632
|
+
const A = (((U = o.purchaseOrder) == null ? void 0 : U.version) ?? ke.enum[1]) === ke.enum[2] ? t.id : t.sku._id, w = o.receivedMap[A];
|
|
2633
|
+
return `<span class="${se(t)} fm-typo-en-body-lg-600">${De.toFormatString({ value: w.received })}</span>/${Et(t.quantity, t.sku.unit, t.measurement)}`;
|
|
2634
2634
|
}
|
|
2635
2635
|
function se(t) {
|
|
2636
2636
|
var L;
|
|
2637
|
-
const A = (((L = o.purchaseOrder) == null ? void 0 : L.version) ??
|
|
2638
|
-
return U ? "text-fm-color-typo-tertiary" : j ? "text-fm-color-system-warning-300" : ee ? "text-fm-color-system-error-300" :
|
|
2637
|
+
const A = (((L = o.purchaseOrder) == null ? void 0 : L.version) ?? ke.enum[1]) === ke.enum[2] ? t.id : t.sku._id, w = o.receivedMap[A], { isPartialReceive: j, isNoReceive: U, isOverReceive: ee, isFullReceive: v } = Kt(w);
|
|
2638
|
+
return U ? "text-fm-color-typo-tertiary" : j ? "text-fm-color-system-warning-300" : ee ? "text-fm-color-system-error-300" : v ? "text-fm-color-system-success-300" : "";
|
|
2639
2639
|
}
|
|
2640
2640
|
const D = H(() => {
|
|
2641
2641
|
var t, m, A;
|
|
2642
|
-
return (t = o.purchaseOrder) != null && t.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) ===
|
|
2643
|
-
var ee,
|
|
2644
|
-
const U = (
|
|
2642
|
+
return (t = o.purchaseOrder) != null && t.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === ke.enum[2] ? o.purchaseOrder.items.reduce((w, j) => {
|
|
2643
|
+
var ee, v;
|
|
2644
|
+
const U = (v = (ee = o.purchaseOrder) == null ? void 0 : ee.itemsAtSubmission) == null ? void 0 : v.find(
|
|
2645
2645
|
(L) => L.id === j.id
|
|
2646
2646
|
);
|
|
2647
2647
|
return U && U.quantity !== j.quantity && w.set(j.sku.code, {
|
|
2648
|
-
originalAmount: Number(
|
|
2649
|
-
newAmount: Number(
|
|
2648
|
+
originalAmount: Number(De.toFormatString({ value: U.quantity })),
|
|
2649
|
+
newAmount: Number(De.toFormatString({ value: j.quantity }))
|
|
2650
2650
|
}), w;
|
|
2651
2651
|
}, /* @__PURE__ */ new Map()) : (A = o.purchaseOrder) == null ? void 0 : A.items.reduce((w, j) => {
|
|
2652
2652
|
var L, W;
|
|
2653
2653
|
const U = (W = (L = o.purchaseOrder) == null ? void 0 : L.itemsAtSubmission) == null ? void 0 : W.find(
|
|
2654
2654
|
(te) => te.sku._id === j.sku._id
|
|
2655
|
-
), ee = U ? Number(
|
|
2656
|
-
return U && ee !==
|
|
2655
|
+
), ee = U ? Number(De.toFormatString({ value: U.quantity })) : 0, v = Number(De.toFormatString({ value: j.quantity }));
|
|
2656
|
+
return U && ee !== v && w.set(j.sku.code, {
|
|
2657
2657
|
originalAmount: ee,
|
|
2658
|
-
newAmount:
|
|
2658
|
+
newAmount: v
|
|
2659
2659
|
}), w;
|
|
2660
2660
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2661
2661
|
}), S = (t) => {
|
|
2662
2662
|
var A, w;
|
|
2663
2663
|
const m = D.value;
|
|
2664
|
-
return ((A = o.purchaseOrder) == null ? void 0 : A.version) ===
|
|
2664
|
+
return ((A = o.purchaseOrder) == null ? void 0 : A.version) === ke.enum[2] ? m.has(t.id) : m.has((w = t.sku) == null ? void 0 : w.code);
|
|
2665
2665
|
}, N = (t) => {
|
|
2666
2666
|
var A, w;
|
|
2667
2667
|
const m = D.value;
|
|
2668
|
-
return ((A = o.purchaseOrder) == null ? void 0 : A.version) ===
|
|
2668
|
+
return ((A = o.purchaseOrder) == null ? void 0 : A.version) === ke.enum[2] ? m.get(t.id) : m.get((w = t.sku) == null ? void 0 : w.code);
|
|
2669
2669
|
};
|
|
2670
2670
|
return (t, m) => {
|
|
2671
|
-
const A = G("FmButton"), w = G("FmButtonGroup"), j = G("FmChip"), U = G("FmIcon"), ee = G("FmMenuDivider"),
|
|
2671
|
+
const A = G("FmButton"), w = G("FmButtonGroup"), j = G("FmChip"), U = G("FmIcon"), ee = G("FmMenuDivider"), v = G("FmCard"), L = G("FmTooltip"), W = G("FmSpacer"), te = G("FmSideSheet");
|
|
2672
2672
|
return f(), le(te, {
|
|
2673
|
-
modelValue:
|
|
2673
|
+
modelValue: h(T),
|
|
2674
2674
|
"onUpdate:modelValue": m[8] || (m[8] = (E) => At(T) ? T.value = E : null),
|
|
2675
2675
|
"dismiss-away": c.value,
|
|
2676
2676
|
"max-width": 600,
|
|
@@ -2681,7 +2681,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2681
2681
|
return [
|
|
2682
2682
|
e("div", Ms, [
|
|
2683
2683
|
e("div", js, [
|
|
2684
|
-
e("div", zs, _(
|
|
2684
|
+
e("div", zs, _(h(b)("inventory.transfer.receiveRequest.details.title") + ((E = t.purchaseOrder) != null && E.seqNumber ? ` #${(ne = t.purchaseOrder) == null ? void 0 : ne.seqNumber}` : "")), 1),
|
|
2685
2685
|
I(A, {
|
|
2686
2686
|
class: "ml-auto -m-2",
|
|
2687
2687
|
variant: "tertiary",
|
|
@@ -2711,28 +2711,28 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2711
2711
|
e("div", Ks, [
|
|
2712
2712
|
J.value.value === "overview" ? (f(), x(ue, { key: 0 }, [
|
|
2713
2713
|
e("div", null, [
|
|
2714
|
-
I(
|
|
2714
|
+
I(v, {
|
|
2715
2715
|
variant: "outlined",
|
|
2716
2716
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
2717
2717
|
}, {
|
|
2718
2718
|
default: X(() => {
|
|
2719
|
-
var Q, ie, ae,
|
|
2719
|
+
var Q, ie, ae, pe, re, Re, ot, nt, at;
|
|
2720
2720
|
return [
|
|
2721
2721
|
e("div", Hs, [
|
|
2722
|
-
e("div", Gs, _(
|
|
2722
|
+
e("div", Gs, _(h(b)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
2723
2723
|
e("div", Ws, [
|
|
2724
|
-
I(
|
|
2724
|
+
I(qe, null, {
|
|
2725
2725
|
default: X(() => {
|
|
2726
2726
|
var lt;
|
|
2727
2727
|
return [
|
|
2728
|
-
|
|
2728
|
+
Ne(_((lt = o.purchaseOrder) == null ? void 0 : lt.status), 1)
|
|
2729
2729
|
];
|
|
2730
2730
|
}),
|
|
2731
2731
|
_: 1
|
|
2732
2732
|
}),
|
|
2733
2733
|
I(j, {
|
|
2734
2734
|
label: xe.value.status,
|
|
2735
|
-
class:
|
|
2735
|
+
class: Be(xe.value.statusClass),
|
|
2736
2736
|
compact: ""
|
|
2737
2737
|
}, null, 8, ["label", "class"]),
|
|
2738
2738
|
u.value ? (f(), x("div", Ys, [
|
|
@@ -2748,34 +2748,34 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2748
2748
|
e("div", Xs, [
|
|
2749
2749
|
e("div", Zs, [
|
|
2750
2750
|
e("div", Js, [
|
|
2751
|
-
e("div", eo, _(
|
|
2751
|
+
e("div", eo, _(h(b)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2752
2752
|
]),
|
|
2753
|
-
e("div", to, _(
|
|
2753
|
+
e("div", to, _(h(je)(((Q = t.purchaseOrder) == null ? void 0 : Q._id) ?? "")), 1)
|
|
2754
2754
|
]),
|
|
2755
2755
|
(ie = t.purchaseOrder) != null && ie.effectiveAt ? (f(), x("div", ro, [
|
|
2756
|
-
e("div", so, _(
|
|
2757
|
-
e("div", oo, _(
|
|
2756
|
+
e("div", so, _(h(b)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2757
|
+
e("div", oo, _(h(vt)(new Date((ae = t.purchaseOrder) == null ? void 0 : ae.effectiveAt))), 1)
|
|
2758
2758
|
])) : M("", !0),
|
|
2759
2759
|
e("div", no, [
|
|
2760
|
-
e("div", ao, _(
|
|
2761
|
-
e("div", lo, _(
|
|
2760
|
+
e("div", ao, _(h(b)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2761
|
+
e("div", lo, _(h(b)(
|
|
2762
2762
|
`inventory.transfer.receiveRequest.details.type.${q.value.toLocaleLowerCase("en-US")}`
|
|
2763
2763
|
)), 1)
|
|
2764
2764
|
]),
|
|
2765
|
-
(
|
|
2766
|
-
e("div", co, _(
|
|
2767
|
-
e("div", uo, _((ot = (
|
|
2765
|
+
(re = (pe = t.purchaseOrder) == null ? void 0 : pe.supplier) != null && re.name ? (f(), x("div", io, [
|
|
2766
|
+
e("div", co, _(h(b)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2767
|
+
e("div", uo, _((ot = (Re = t.purchaseOrder) == null ? void 0 : Re.supplier) == null ? void 0 : ot.name), 1)
|
|
2768
2768
|
])) : M("", !0),
|
|
2769
2769
|
t.transferTo ? (f(), x("div", mo, [
|
|
2770
|
-
e("div", po, _(
|
|
2770
|
+
e("div", po, _(h(b)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2771
2771
|
e("div", fo, _(t.transferTo), 1)
|
|
2772
2772
|
])) : M("", !0),
|
|
2773
2773
|
(nt = t.purchaseOrder) != null && nt.ref ? (f(), x("div", yo, [
|
|
2774
|
-
e("div", vo, _(
|
|
2774
|
+
e("div", vo, _(h(b)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2775
2775
|
e("div", ho, _(t.purchaseOrder.ref), 1)
|
|
2776
2776
|
])) : M("", !0),
|
|
2777
2777
|
(at = t.purchaseOrder) != null && at.remark ? (f(), x("div", bo, [
|
|
2778
|
-
e("div", go, _(
|
|
2778
|
+
e("div", go, _(h(b)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2779
2779
|
e("div", _o, _(t.purchaseOrder.remark), 1)
|
|
2780
2780
|
])) : M("", !0)
|
|
2781
2781
|
])
|
|
@@ -2795,7 +2795,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2795
2795
|
e("div", Oo, [
|
|
2796
2796
|
e("div", xo, [
|
|
2797
2797
|
e("span", wo, [
|
|
2798
|
-
|
|
2798
|
+
Ne(_(Oe.value ? h(b)("inventory.transfer.receiveRequest.details.receivedItems") : h(b)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2799
2799
|
(ne = (E = t.purchaseOrder) == null ? void 0 : E.netSuite) != null && ne.missingItems && ((we = (de = t.purchaseOrder) == null ? void 0 : de.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (f(), le(L, {
|
|
2800
2800
|
key: 0,
|
|
2801
2801
|
variant: "rich",
|
|
@@ -2806,15 +2806,15 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2806
2806
|
var Q, ie;
|
|
2807
2807
|
return [
|
|
2808
2808
|
e("div", $o, [
|
|
2809
|
-
(f(!0), x(ue, null, be((ie = (Q = t.purchaseOrder) == null ? void 0 : Q.netSuite) == null ? void 0 : ie.missingItems, (ae,
|
|
2809
|
+
(f(!0), x(ue, null, be((ie = (Q = t.purchaseOrder) == null ? void 0 : Q.netSuite) == null ? void 0 : ie.missingItems, (ae, pe) => (f(), x("div", {
|
|
2810
2810
|
class: "flex justify-center align-middle",
|
|
2811
|
-
key:
|
|
2811
|
+
key: pe
|
|
2812
2812
|
}, [
|
|
2813
2813
|
I(U, {
|
|
2814
2814
|
name: "arrow_right",
|
|
2815
2815
|
size: "sm"
|
|
2816
2816
|
}),
|
|
2817
|
-
|
|
2817
|
+
Ne(" " + _(`(${ae.netSuiteId}) ${ae.name}: ${ae.reason}`), 1)
|
|
2818
2818
|
]))), 128))
|
|
2819
2819
|
])
|
|
2820
2820
|
];
|
|
@@ -2839,7 +2839,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2839
2839
|
}, [
|
|
2840
2840
|
e("div", Ro, [
|
|
2841
2841
|
e("div", ko, [
|
|
2842
|
-
|
|
2842
|
+
Ne(_(Q.name) + " ", 1),
|
|
2843
2843
|
S(Q) ? (f(), le(L, {
|
|
2844
2844
|
key: 0,
|
|
2845
2845
|
variant: "rich",
|
|
@@ -2847,12 +2847,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2847
2847
|
"z-index": 51
|
|
2848
2848
|
}, {
|
|
2849
2849
|
content: X(() => {
|
|
2850
|
-
var
|
|
2850
|
+
var pe, re;
|
|
2851
2851
|
return [
|
|
2852
2852
|
e("div", Do, [
|
|
2853
2853
|
m[9] || (m[9] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
2854
|
-
e("div", null, "Original Amount: " + _((
|
|
2855
|
-
e("div", null, " New Amount: " + _((
|
|
2854
|
+
e("div", null, "Original Amount: " + _((pe = N(Q)) == null ? void 0 : pe.originalAmount), 1),
|
|
2855
|
+
e("div", null, " New Amount: " + _((re = N(Q)) == null ? void 0 : re.newAmount), 1)
|
|
2856
2856
|
])
|
|
2857
2857
|
];
|
|
2858
2858
|
}),
|
|
@@ -2874,17 +2874,17 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2874
2874
|
]),
|
|
2875
2875
|
e("div", Ao, [
|
|
2876
2876
|
e("div", To, _(Q.code), 1),
|
|
2877
|
-
(ae = Q.totalCost) != null && ae.amount &&
|
|
2877
|
+
(ae = Q.totalCost) != null && ae.amount && h(l).enableTotalCost ? (f(), x("div", qo, " (" + _(h(Ve)(Q.totalCost)) + ") ", 1)) : M("", !0)
|
|
2878
2878
|
])
|
|
2879
2879
|
]);
|
|
2880
2880
|
}), 128)),
|
|
2881
|
-
+
|
|
2881
|
+
+h(ye)(V.value) ? (f(), x(ue, { key: 0 }, [
|
|
2882
2882
|
e("div", Fo, [
|
|
2883
2883
|
I(ee)
|
|
2884
2884
|
]),
|
|
2885
2885
|
e("div", Po, [
|
|
2886
2886
|
m[10] || (m[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2887
|
-
e("div", Io, _(
|
|
2887
|
+
e("div", Io, _(h(Ve)(V.value)), 1)
|
|
2888
2888
|
])
|
|
2889
2889
|
], 64)) : M("", !0)
|
|
2890
2890
|
])
|
|
@@ -2896,7 +2896,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2896
2896
|
e("div", zo, [
|
|
2897
2897
|
e("div", Ko, [
|
|
2898
2898
|
e("div", {
|
|
2899
|
-
class:
|
|
2899
|
+
class: Be([
|
|
2900
2900
|
{
|
|
2901
2901
|
"bg-fm-color-primary": ie !== 0,
|
|
2902
2902
|
"bg-white": ie === 0
|
|
@@ -2915,7 +2915,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2915
2915
|
]),
|
|
2916
2916
|
e("div", Go, [
|
|
2917
2917
|
e("div", {
|
|
2918
|
-
class:
|
|
2918
|
+
class: Be([
|
|
2919
2919
|
{
|
|
2920
2920
|
"bg-fm-color-primary": ie < he.value.length - 1,
|
|
2921
2921
|
"bg-white": ie >= he.value.length - 1
|
|
@@ -2946,7 +2946,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2946
2946
|
e("div", en, [
|
|
2947
2947
|
e("div", tn, [
|
|
2948
2948
|
e("div", {
|
|
2949
|
-
class:
|
|
2949
|
+
class: Be([
|
|
2950
2950
|
{
|
|
2951
2951
|
"bg-fm-color-primary": ie < he.value.length - 1,
|
|
2952
2952
|
"bg-white": ie >= he.value.length - 1
|
|
@@ -2957,25 +2957,25 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2957
2957
|
])
|
|
2958
2958
|
]),
|
|
2959
2959
|
e("div", rn, [
|
|
2960
|
-
I(
|
|
2960
|
+
I(v, {
|
|
2961
2961
|
variant: "outlined",
|
|
2962
2962
|
class: "py-12 px-16"
|
|
2963
2963
|
}, {
|
|
2964
2964
|
default: X(() => [
|
|
2965
2965
|
e("div", sn, [
|
|
2966
|
-
(f(!0), x(ue, null, be(Q.info, (ae,
|
|
2967
|
-
key:
|
|
2966
|
+
(f(!0), x(ue, null, be(Q.info, (ae, pe) => (f(), x("div", {
|
|
2967
|
+
key: pe,
|
|
2968
2968
|
class: "flex flex-col gap-4"
|
|
2969
2969
|
}, [
|
|
2970
2970
|
e("div", on, _(ae == null ? void 0 : ae.label), 1),
|
|
2971
2971
|
e("div", nn, [
|
|
2972
|
-
(f(!0), x(ue, null, be(ae == null ? void 0 : ae.values, (
|
|
2973
|
-
key:
|
|
2972
|
+
(f(!0), x(ue, null, be(ae == null ? void 0 : ae.values, (re, Re) => (f(), x("div", {
|
|
2973
|
+
key: Re,
|
|
2974
2974
|
class: "fm-typo-en-body-lg-600"
|
|
2975
2975
|
}, [
|
|
2976
|
-
typeof
|
|
2977
|
-
|
|
2978
|
-
], 64)) : (f(), le(Tt(
|
|
2976
|
+
typeof re == "string" ? (f(), x(ue, { key: 0 }, [
|
|
2977
|
+
Ne(_(re), 1)
|
|
2978
|
+
], 64)) : (f(), le(Tt(re), { key: 1 }))
|
|
2979
2979
|
]))), 128))
|
|
2980
2980
|
])
|
|
2981
2981
|
]))), 128))
|
|
@@ -2990,12 +2990,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2990
2990
|
I(W),
|
|
2991
2991
|
e("div", null, [
|
|
2992
2992
|
e("img", {
|
|
2993
|
-
src:
|
|
2993
|
+
src: h(Lt),
|
|
2994
2994
|
alt: "List is empty"
|
|
2995
2995
|
}, null, 8, Vo)
|
|
2996
2996
|
]),
|
|
2997
|
-
e("div", Bo, _(
|
|
2998
|
-
e("div", Uo, _(
|
|
2997
|
+
e("div", Bo, _(h(b)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2998
|
+
e("div", Uo, _(h(b)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2999
2999
|
I(W),
|
|
3000
3000
|
I(W)
|
|
3001
3001
|
]))
|
|
@@ -3006,38 +3006,38 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
3006
3006
|
"side-sheet-footer": X(() => [
|
|
3007
3007
|
e("div", an, [
|
|
3008
3008
|
(f(!0), x(ue, null, be(z.value, (E) => (f(), x(ue, null, [
|
|
3009
|
-
|
|
3009
|
+
h(Ze)[E].available != !1 ? (f(), le(A, {
|
|
3010
3010
|
key: E,
|
|
3011
|
-
label:
|
|
3011
|
+
label: h(b)(h(Ze)[E].translationKey),
|
|
3012
3012
|
onClick: (ne) => ce(E),
|
|
3013
3013
|
loading: d.value === E,
|
|
3014
3014
|
disabled: d.value !== E && C.value,
|
|
3015
|
-
variant:
|
|
3015
|
+
variant: h(Ze)[E].buttonVariant
|
|
3016
3016
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
|
|
3017
3017
|
], 64))), 256)),
|
|
3018
|
-
|
|
3018
|
+
h($).ableToMarkReceived(t.purchaseOrder) && !z.value.includes("completeReceive") ? (f(), le(A, {
|
|
3019
3019
|
key: 0,
|
|
3020
|
-
label:
|
|
3020
|
+
label: h(b)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3021
3021
|
onClick: m[4] || (m[4] = (E) => ce("completeReceive")),
|
|
3022
3022
|
loading: d.value === "completeReceive",
|
|
3023
3023
|
disabled: d.value !== "completeReceive" && C.value
|
|
3024
3024
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3025
|
-
|
|
3025
|
+
h($).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !z.value.includes("approveRequest") ? (f(), le(A, {
|
|
3026
3026
|
key: 1,
|
|
3027
|
-
label:
|
|
3027
|
+
label: h(b)("inventory.transfer.approval.actions.approveRequest"),
|
|
3028
3028
|
onClick: m[5] || (m[5] = (E) => ce("approveRequest")),
|
|
3029
3029
|
loading: d.value === "approveRequest",
|
|
3030
3030
|
disabled: d.value !== "approveRequest" && C.value
|
|
3031
3031
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3032
|
-
|
|
3032
|
+
h($).ableToCreateFulfillment(t.purchaseOrder, t.poRequest) && o.scope === "approval" ? (f(), le(A, {
|
|
3033
3033
|
key: 2,
|
|
3034
|
-
label:
|
|
3034
|
+
label: h(b)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3035
3035
|
onClick: m[6] || (m[6] = (E) => ce("processRequest")),
|
|
3036
3036
|
loading: d.value === "processRequest",
|
|
3037
3037
|
disabled: d.value !== "processRequest" && C.value
|
|
3038
3038
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3039
3039
|
I(A, {
|
|
3040
|
-
label:
|
|
3040
|
+
label: h(b)("common.close"),
|
|
3041
3041
|
variant: "tertiary",
|
|
3042
3042
|
onClick: m[7] || (m[7] = (E) => p("update:show", !1))
|
|
3043
3043
|
}, null, 8, ["label"])
|
|
@@ -3054,5 +3054,5 @@ export {
|
|
|
3054
3054
|
gn as a,
|
|
3055
3055
|
_n as b,
|
|
3056
3056
|
Ht as g,
|
|
3057
|
-
|
|
3057
|
+
Ie as u
|
|
3058
3058
|
};
|