@feedmepos/mf-inventory-portal 1.0.8-dev.1 → 1.0.8-dev.2
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-CiI7LJYR.js → App-VjopKXRf.js} +2 -2
- package/dist/{ApprovalView-CXr_5VhF.js → ApprovalView-Bc8OqfVg.js} +2 -2
- package/dist/{BindingsDialog-nSRbRLhz.js → BindingsDialog-zWAOfSXc.js} +2 -2
- package/dist/{BindingsPicker-DZ4YPZgq.js → BindingsPicker-Bf5LuJiL.js} +1 -1
- package/dist/{BindingsTable-CXKlgi9x.js → BindingsTable-D2N-3mnJ.js} +1 -1
- package/dist/{ClosingDraftView-DeUsL1r1.js → ClosingDraftView-BwbzajJY.js} +2 -2
- package/dist/{ClosingTemplateView-C7W-Nxvj.js → ClosingTemplateView-CsAIbfui.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CULMXBsz.js → DeliveryOrderPrintPreview-CjylpaJj.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DWPKE_h_.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C_xdzdLD.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DPrDCUu0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhgHX4S_.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bc2mylBM.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DPa8Pto8.js} +1 -1
- package/dist/{IngredientGroupView-BICMkldw.js → IngredientGroupView-D6YzbWdd.js} +1 -1
- package/dist/{IngredientsView-D7NEvwG4.js → IngredientsView-g-73afqm.js} +4 -4
- package/dist/{IntegrationView-BcjMhPJh.js → IntegrationView-CEML0dP4.js} +4 -4
- package/dist/{InventoryBindingForm-_95MIG9w.js → InventoryBindingForm-E0wJOA8L.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DYqAkKCc.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DFXmypAs.js} +3 -3
- package/dist/{InventoryBindingSummary-D2Ig9mtX.js → InventoryBindingSummary-sBQvAPBw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DSlWYlCS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOeDgymo.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BgGZ3ys6.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIqYY1-C.js} +1 -1
- package/dist/{PublishView-QA_ukLD4.js → PublishView-D_psCmiQ.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-CsltXFGz.js → PurchaseOrderPrintPreview-5QqjPwWN.js} +1 -1
- package/dist/{ReceiveRequestView-lZZpx5Cu.js → ReceiveRequestView-CBGxqac6.js} +9 -9
- package/dist/{RecipeView-DS2oD0iY.js → RecipeView-BAjHNWST.js} +3 -3
- package/dist/{StockView-BugWNLlk.js → StockView-Bc62jbCV.js} +7 -7
- package/dist/{SupplierView-C3i1xE4P.js → SupplierView-Cyucz_US.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D6wKGuYJ.js → TransferDetails.vue_vue_type_script_setup_true_lang-CljJoB4v.js} +180 -179
- package/dist/{TransferTemplateView-B1lH_9Bt.js → TransferTemplateView-BWURlmou.js} +7 -7
- package/dist/{UnitView-Do7qXUKP.js → UnitView-cjLpKfoN.js} +3 -3
- package/dist/{WarehouseView-D-Pfs2lE.js → WarehouseView-CUtg5Aiw.js} +1 -1
- package/dist/{app-MqbayBwZ.js → app-Dgg5mqsW.js} +10 -10
- package/dist/app.js +1 -1
- package/dist/{decimal-BProDw9Y.js → decimal-DcqP_fAm.js} +1 -1
- package/dist/{feature-Bs3X6CAv.js → feature-C4mZ_d2m.js} +116 -109
- package/dist/{format-unit-display-73km6dHx.js → format-unit-display-D2Uk9Ze_.js} +2 -2
- package/dist/{index-C0-GJtd8.js → index-YuTB_T1B.js} +1 -1
- package/dist/{index-_UPFBpCF.js → index-peSGn9vg.js} +2 -2
- package/dist/{stock-Bz5MX73X.js → stock-CDP8ZqBZ.js} +1 -1
- package/dist/{supplier-4n66y_Zq.js → supplier-C5GbDMxT.js} +1 -1
- package/dist/{use-ingredient-select-dialog-hudkJTW3.js → use-ingredient-select-dialog-nH01sayt.js} +1 -1
- package/dist/{use-inventory-binding-dialog-C_96mB81.js → use-inventory-binding-dialog-CJe6QdGb.js} +1 -1
- package/dist/{vue-i18n-Bqd07hKc.js → vue-i18n-NNRWZURD.js} +201 -201
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { X as it, u as ue, aH as
|
|
2
|
-
import { ref as V, computed as z, h as N, defineComponent as De, onMounted as at, unref as p, openBlock as _, createElementBlock as D, createElementVNode as s, toDisplayString as x, createCommentVNode as L, resolveComponent as
|
|
3
|
-
import { F as xt } from "./decimal-
|
|
4
|
-
import { b as Rt, u as Ot, f as nt, P as ve } from "./format-unit-display-
|
|
1
|
+
import { X as it, u as ue, aH as P, b as Ue, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as We, e as tt, V as rt, aJ as pt, Z as Fe, K as Oe, i as oe, aK as st, a9 as ke, f as Xe, h as K, D as Z, aq as se, aL as yt, a3 as vt, an as Je, a1 as xe, aM as ht, ae as Pe, ar as bt } from "./app-Dgg5mqsW.js";
|
|
2
|
+
import { ref as V, computed as z, h as N, defineComponent as De, onMounted as at, unref as p, openBlock as _, createElementBlock as D, createElementVNode as s, toDisplayString as x, createCommentVNode as L, resolveComponent as H, createVNode as E, reactive as gt, createBlock as le, withCtx as ie, watch as _t, isRef as wt, Fragment as te, normalizeClass as Re, createTextVNode as $e, renderList as pe, resolveDynamicComponent as St } from "vue";
|
|
3
|
+
import { F as xt } from "./decimal-DcqP_fAm.js";
|
|
4
|
+
import { b as Rt, u as Ot, f as nt, P as ve } from "./format-unit-display-D2Uk9Ze_.js";
|
|
5
5
|
import { useCoreStore as Le, useI18n as ot } from "@feedmepos/mf-common";
|
|
6
6
|
import { E as kt } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
7
|
import { useDialog as Ve, useSnackbar as Me, components as Ze, FmButtonVariant as re, useProxiedModel as Dt } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as je, F as Ce } from "./feature-
|
|
9
|
-
import { u as Nt } from "./index-
|
|
10
|
-
import { _ as At, F as qt, a as
|
|
8
|
+
import { u as je, F as Ce } from "./feature-C4mZ_d2m.js";
|
|
9
|
+
import { u as Nt } from "./index-peSGn9vg.js";
|
|
10
|
+
import { _ as At, F as qt, a as Tt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DhgHX4S_.js";
|
|
11
11
|
const Ne = it((t, l) => {
|
|
12
12
|
const n = ue(), h = Le();
|
|
13
13
|
return {
|
|
@@ -65,7 +65,7 @@ const Ne = it((t, l) => {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
}), ct = {
|
|
68
|
-
[
|
|
68
|
+
[P.enum.confirmDraft]: {
|
|
69
69
|
primaryActions: {
|
|
70
70
|
text: "Confirm draft",
|
|
71
71
|
close: !0
|
|
@@ -74,7 +74,7 @@ const Ne = it((t, l) => {
|
|
|
74
74
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
75
75
|
successMessage: "Purchase order draft has been confirmed"
|
|
76
76
|
},
|
|
77
|
-
[
|
|
77
|
+
[P.enum.cancelDraft]: {
|
|
78
78
|
primaryActions: {
|
|
79
79
|
text: "Cancel draft",
|
|
80
80
|
close: !0,
|
|
@@ -84,7 +84,7 @@ const Ne = it((t, l) => {
|
|
|
84
84
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
85
85
|
successMessage: "Purchase order draft has been cancelled"
|
|
86
86
|
},
|
|
87
|
-
[
|
|
87
|
+
[P.enum.submitRequest]: {
|
|
88
88
|
primaryActions: {
|
|
89
89
|
text: "Submit request",
|
|
90
90
|
close: !0
|
|
@@ -93,7 +93,7 @@ const Ne = it((t, l) => {
|
|
|
93
93
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
94
94
|
successMessage: "Purchase order draft has been submitted"
|
|
95
95
|
},
|
|
96
|
-
[
|
|
96
|
+
[P.enum.completeReceive]: {
|
|
97
97
|
primaryActions: {
|
|
98
98
|
text: "Mark received",
|
|
99
99
|
close: !0
|
|
@@ -102,7 +102,7 @@ const Ne = it((t, l) => {
|
|
|
102
102
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
103
103
|
successMessage: "Purchase order has been marked as received"
|
|
104
104
|
},
|
|
105
|
-
[
|
|
105
|
+
[P.enum.approveRequest]: {
|
|
106
106
|
primaryActions: {
|
|
107
107
|
text: "Accept request",
|
|
108
108
|
close: !0
|
|
@@ -111,7 +111,7 @@ const Ne = it((t, l) => {
|
|
|
111
111
|
message: "Transfer out request will be accepted.",
|
|
112
112
|
successMessage: "Transfer out request has been approved"
|
|
113
113
|
},
|
|
114
|
-
[
|
|
114
|
+
[P.enum.rejectRequest]: {
|
|
115
115
|
primaryActions: {
|
|
116
116
|
text: "Reject request",
|
|
117
117
|
close: !0,
|
|
@@ -146,7 +146,7 @@ function Os(t, l) {
|
|
|
146
146
|
end: mt(k).toISOString()
|
|
147
147
|
};
|
|
148
148
|
}), S = V(new Array()), R = ft(), A = V(null);
|
|
149
|
-
async function
|
|
149
|
+
async function I(g) {
|
|
150
150
|
function k(c) {
|
|
151
151
|
const O = {
|
|
152
152
|
mode: We.CREATE,
|
|
@@ -179,7 +179,7 @@ function Os(t, l) {
|
|
|
179
179
|
k(void 0);
|
|
180
180
|
}) : k(e);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Y(g) {
|
|
183
183
|
const k = {
|
|
184
184
|
mode: We.UPDATE,
|
|
185
185
|
modelValue: tt(g),
|
|
@@ -191,7 +191,7 @@ function Os(t, l) {
|
|
|
191
191
|
};
|
|
192
192
|
we.value = k;
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function W() {
|
|
195
195
|
f.value = [], o.value = !0;
|
|
196
196
|
try {
|
|
197
197
|
f.value = await m.getPurchaseOrders(b.value).then((c) => c.sort((O, w) => w._id.localeCompare(O._id)));
|
|
@@ -226,10 +226,10 @@ function Os(t, l) {
|
|
|
226
226
|
o.value = !1;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function X() {
|
|
230
230
|
switch (t) {
|
|
231
231
|
case "receive/request":
|
|
232
|
-
return
|
|
232
|
+
return W();
|
|
233
233
|
case "approval":
|
|
234
234
|
return de();
|
|
235
235
|
}
|
|
@@ -238,14 +238,14 @@ function Os(t, l) {
|
|
|
238
238
|
r.value = {
|
|
239
239
|
startDate: g,
|
|
240
240
|
endDate: k
|
|
241
|
-
},
|
|
241
|
+
}, X();
|
|
242
242
|
}
|
|
243
243
|
h.watchLocation(async (g) => {
|
|
244
244
|
if (!g) {
|
|
245
245
|
f.value = [];
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
await
|
|
248
|
+
await X();
|
|
249
249
|
});
|
|
250
250
|
const ee = V(), ce = V(Math.random().toString());
|
|
251
251
|
async function Ae(g, k) {
|
|
@@ -278,8 +278,8 @@ function Os(t, l) {
|
|
|
278
278
|
doc: g,
|
|
279
279
|
options: (
|
|
280
280
|
// auto receive for supplier to warehouse
|
|
281
|
-
(k ===
|
|
282
|
-
k ===
|
|
281
|
+
(k === P.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
282
|
+
k === P.enum.completeReceive) && i.autoReceiveWarehouse ? {
|
|
283
283
|
autoReceive: !0
|
|
284
284
|
} : void 0
|
|
285
285
|
)
|
|
@@ -290,9 +290,9 @@ function Os(t, l) {
|
|
|
290
290
|
action: k
|
|
291
291
|
},
|
|
292
292
|
transferTo: c
|
|
293
|
-
}), await new Promise((
|
|
293
|
+
}), await new Promise((B) => setTimeout(B, 1e3));
|
|
294
294
|
const j = ue().currentLocationDBName.startsWith("restaurant_");
|
|
295
|
-
k ===
|
|
295
|
+
k === P.enum.confirmDraft && g.effectiveAt && j ? v.open({
|
|
296
296
|
title: "Success",
|
|
297
297
|
message: `${e}. The backdate will be reflected once your POS has received this change.`,
|
|
298
298
|
type: "success"
|
|
@@ -308,7 +308,7 @@ function Os(t, l) {
|
|
|
308
308
|
type: "error"
|
|
309
309
|
}), console.error("Error when submitting PO operation", k, g, w);
|
|
310
310
|
} finally {
|
|
311
|
-
o.value = !1,
|
|
311
|
+
o.value = !1, X();
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
async function qe(g, k, e) {
|
|
@@ -330,7 +330,7 @@ function Os(t, l) {
|
|
|
330
330
|
he(g, k, O, e);
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
async function
|
|
333
|
+
async function Te() {
|
|
334
334
|
n.open({
|
|
335
335
|
title: "Upload Transfer",
|
|
336
336
|
primaryActions: {
|
|
@@ -355,19 +355,19 @@ function Os(t, l) {
|
|
|
355
355
|
purchaseOrders: f,
|
|
356
356
|
purchaseRequests: S,
|
|
357
357
|
updateDateRange: ae,
|
|
358
|
-
fetchData:
|
|
358
|
+
fetchData: X,
|
|
359
359
|
loading: o,
|
|
360
360
|
transferDialogProps: we,
|
|
361
|
-
promptCreateTransferDialog:
|
|
362
|
-
promptUpdateTransferDialog:
|
|
361
|
+
promptCreateTransferDialog: I,
|
|
362
|
+
promptUpdateTransferDialog: Y,
|
|
363
363
|
transferDetailsProps: ee,
|
|
364
364
|
promptShowTransferDetails: Ae,
|
|
365
365
|
submitAction: qe,
|
|
366
366
|
xilnexImportDialogProps: Ie,
|
|
367
|
-
promptUploadTransferDialog:
|
|
367
|
+
promptUploadTransferDialog: Te
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Pt(t, l) {
|
|
371
371
|
return l.reduce(
|
|
372
372
|
(h, i) => {
|
|
373
373
|
const a = i.received.find((d) => d.sku._id === t._id);
|
|
@@ -397,8 +397,8 @@ function $t(t, l, n, h) {
|
|
|
397
397
|
state: t.supplier.address.state,
|
|
398
398
|
country: t.supplier.address.country
|
|
399
399
|
}, v = t.items.map((S) => {
|
|
400
|
-
const { sku: R, measurement: A } = S,
|
|
401
|
-
|
|
400
|
+
const { sku: R, measurement: A } = S, I = oe(
|
|
401
|
+
Pt(S.sku, t.deliveryOrder || []),
|
|
402
402
|
!1
|
|
403
403
|
);
|
|
404
404
|
return {
|
|
@@ -406,7 +406,7 @@ function $t(t, l, n, h) {
|
|
|
406
406
|
description: R.name,
|
|
407
407
|
quantity: nt(S.quantity, R.unit, S.measurement),
|
|
408
408
|
unit: (A == null ? void 0 : A.abbrev) || R.unit.abbrev,
|
|
409
|
-
received:
|
|
409
|
+
received: I
|
|
410
410
|
};
|
|
411
411
|
}), m = t.deliveryOrder.map((S) => ({
|
|
412
412
|
createdAt: st(new Date(S.createdAt)),
|
|
@@ -440,42 +440,42 @@ const ye = {
|
|
|
440
440
|
submitRequest: {
|
|
441
441
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
442
442
|
color: "text-fm-color-typo-primary",
|
|
443
|
-
value:
|
|
443
|
+
value: P.enum.submitRequest
|
|
444
444
|
},
|
|
445
445
|
confirmDraft: {
|
|
446
446
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
447
447
|
color: "text-fm-color-typo-primary",
|
|
448
|
-
value:
|
|
448
|
+
value: P.enum.confirmDraft
|
|
449
449
|
},
|
|
450
450
|
cancelDraft: {
|
|
451
451
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
452
452
|
color: "text-fm-color-typo-error",
|
|
453
|
-
value:
|
|
453
|
+
value: P.enum.cancelDraft
|
|
454
454
|
},
|
|
455
455
|
approveRequest: {
|
|
456
456
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
457
457
|
color: "text-fm-color-typo-primary",
|
|
458
|
-
value:
|
|
458
|
+
value: P.enum.approveRequest
|
|
459
459
|
},
|
|
460
460
|
rejectRequest: {
|
|
461
461
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
462
462
|
color: "text-fm-color-typo-error",
|
|
463
|
-
value:
|
|
463
|
+
value: P.enum.rejectRequest
|
|
464
464
|
},
|
|
465
465
|
processRequest: {
|
|
466
466
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
467
467
|
color: "text-fm-color-typo-primary",
|
|
468
|
-
value:
|
|
468
|
+
value: P.enum.processRequest
|
|
469
469
|
},
|
|
470
470
|
receiveStock: {
|
|
471
471
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
472
472
|
color: "text-fm-color-typo-primary",
|
|
473
|
-
value:
|
|
473
|
+
value: P.enum.receiveStock
|
|
474
474
|
},
|
|
475
475
|
completeReceive: {
|
|
476
476
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
477
477
|
color: "text-fm-color-typo-primary",
|
|
478
|
-
value:
|
|
478
|
+
value: P.enum.completeReceive
|
|
479
479
|
},
|
|
480
480
|
approveDraft: {
|
|
481
481
|
label: void 0,
|
|
@@ -499,19 +499,19 @@ function ks(t, l) {
|
|
|
499
499
|
return [
|
|
500
500
|
Z[K.Update],
|
|
501
501
|
Z[K.Details],
|
|
502
|
-
m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? ye[
|
|
503
|
-
ye[
|
|
502
|
+
m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? ye[P.enum.submitRequest] : ye[P.enum.confirmDraft],
|
|
503
|
+
ye[P.enum.cancelDraft]
|
|
504
504
|
];
|
|
505
505
|
case "RECEIVING":
|
|
506
506
|
return [
|
|
507
|
-
ye[
|
|
507
|
+
ye[P.enum.completeReceive],
|
|
508
508
|
Z[K.Details],
|
|
509
509
|
Z[K.Print]
|
|
510
510
|
];
|
|
511
511
|
case "REQUESTING":
|
|
512
512
|
return t === "receive/request" ? [Z[K.Details], Z[K.Print]] : [
|
|
513
|
-
ye[
|
|
514
|
-
ye[
|
|
513
|
+
ye[P.enum.approveRequest],
|
|
514
|
+
ye[P.enum.rejectRequest],
|
|
515
515
|
Z[K.Details]
|
|
516
516
|
// DefaultRowActions[RowActionEnum.Print]
|
|
517
517
|
];
|
|
@@ -524,13 +524,13 @@ function ks(t, l) {
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
function a(m) {
|
|
527
|
-
return Object.values(
|
|
527
|
+
return Object.values(P.enum).includes(m);
|
|
528
528
|
}
|
|
529
529
|
async function d(m, f, r) {
|
|
530
|
-
var S, R, A,
|
|
530
|
+
var S, R, A, I;
|
|
531
531
|
const b = tt(f);
|
|
532
532
|
if (m === K.Print) {
|
|
533
|
-
const
|
|
533
|
+
const Y = (r == null ? void 0 : r.toInventoryLocation) ?? {
|
|
534
534
|
name: "",
|
|
535
535
|
type: "restaurant",
|
|
536
536
|
acceptRequest: !0,
|
|
@@ -541,7 +541,7 @@ function ks(t, l) {
|
|
|
541
541
|
profile: {}
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
b.ref = [((S = r == null ? void 0 : r.netSuite) == null ? void 0 : S.refNo) || ((R = b.netSuite) == null ? void 0 : R.refNo)].filter((
|
|
544
|
+
b.ref = [((S = r == null ? void 0 : r.netSuite) == null ? void 0 : S.refNo) || ((R = b.netSuite) == null ? void 0 : R.refNo)].filter((W) => W).join(" "), $t(b, Y, n.currentBusiness.value, t === "approval");
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
547
|
if (m === K.Details) {
|
|
@@ -553,7 +553,7 @@ function ks(t, l) {
|
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
555
|
if (a(m)) {
|
|
556
|
-
l.submitAction(f, m, (
|
|
556
|
+
l.submitAction(f, m, (I = r == null ? void 0 : r.to) == null ? void 0 : I.dbName);
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -756,8 +756,8 @@ const Ct = {
|
|
|
756
756
|
).fullName;
|
|
757
757
|
}
|
|
758
758
|
), d = z(() => {
|
|
759
|
-
var o, v, m, f, r, b, S, R, A,
|
|
760
|
-
return (m = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && m.transactionnumber ? (b = (r = (f = l.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : r.additionalInfo) == null ? void 0 : b.transactionnumber : (A = (R = (S = i.value) == null ? void 0 : S.netSuite) == null ? void 0 : R.additionalInfo) != null && A.transactionnumber ? (
|
|
759
|
+
var o, v, m, f, r, b, S, R, A, I, Y, W;
|
|
760
|
+
return (m = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && m.transactionnumber ? (b = (r = (f = l.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : r.additionalInfo) == null ? void 0 : b.transactionnumber : (A = (R = (S = i.value) == null ? void 0 : S.netSuite) == null ? void 0 : R.additionalInfo) != null && A.transactionnumber ? (W = (Y = (I = i.value) == null ? void 0 : I.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : W.transactionnumber : null;
|
|
761
761
|
}), y = z(() => {
|
|
762
762
|
var o, v, m, f, r, b;
|
|
763
763
|
return (v = (o = l.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && v.length && ((f = (m = l.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (b = (r = l.purchaseOrder) == null ? void 0 : r.deliveryFullfillment) == null ? void 0 : b.map((S) => {
|
|
@@ -766,7 +766,7 @@ const Ct = {
|
|
|
766
766
|
}).join(", ") : "N/A";
|
|
767
767
|
});
|
|
768
768
|
return (o, v) => {
|
|
769
|
-
var m, f, r, b, S, R, A,
|
|
769
|
+
var m, f, r, b, S, R, A, I, Y, W, de, X, ae, ee;
|
|
770
770
|
return p(n).isEnabled ? (_(), D("div", Ct, [
|
|
771
771
|
s("div", It, [
|
|
772
772
|
v[0] || (v[0] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
@@ -778,10 +778,10 @@ const Ct = {
|
|
|
778
778
|
(r = (f = o.purchaseOrder) == null ? void 0 : f.netSuite) != null && r.id ? (_(), D("span", Lt, x((S = (b = o.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : S.refNo) + " (" + x((A = (R = o.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (_(), D("span", Vt, "N/A"))
|
|
779
779
|
])
|
|
780
780
|
])) : L("", !0),
|
|
781
|
-
!o.isTransferBetweenOutlets && i.value && ((
|
|
781
|
+
!o.isTransferBetweenOutlets && i.value && ((I = o.purchaseOrder) == null ? void 0 : I.status) === p(se).Enum.REQUESTING || o.scope === p(Ee).APPROVAL ? (_(), D("div", Mt, [
|
|
782
782
|
s("div", jt, " (Request) NetSuite " + x(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
783
783
|
s("div", Kt, [
|
|
784
|
-
(
|
|
784
|
+
(W = (Y = i.value) == null ? void 0 : Y.netSuite) != null && W.id ? (_(), D("span", zt, x((X = (de = i.value) == null ? void 0 : de.netSuite) == null ? void 0 : X.refNo) + " (" + x((ee = (ae = i.value) == null ? void 0 : ae.netSuite) == null ? void 0 : ee.id) + ") ", 1)) : (_(), D("span", Gt, "N/A"))
|
|
785
785
|
])
|
|
786
786
|
])) : L("", !0),
|
|
787
787
|
d.value ? (_(), D("div", Ht, [
|
|
@@ -852,9 +852,9 @@ const Ct = {
|
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
return (y, o) => {
|
|
855
|
-
const v =
|
|
855
|
+
const v = H("FmButton");
|
|
856
856
|
return _(), D("div", Jt, [
|
|
857
|
-
|
|
857
|
+
E(v, {
|
|
858
858
|
"prepend-icon": "sync",
|
|
859
859
|
variant: "secondary",
|
|
860
860
|
label: "Sync",
|
|
@@ -888,7 +888,7 @@ const Ct = {
|
|
|
888
888
|
amount: d.quantity ?? { amount: 1, precision: 0 }
|
|
889
889
|
})));
|
|
890
890
|
}), (d, y) => {
|
|
891
|
-
const o =
|
|
891
|
+
const o = H("FmTable"), v = H("FmButton"), m = H("FmForm");
|
|
892
892
|
return _(), le(m, {
|
|
893
893
|
ref_key: "formRef",
|
|
894
894
|
ref: i,
|
|
@@ -900,7 +900,7 @@ const Ct = {
|
|
|
900
900
|
y[2] || (y[2] = s("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
901
901
|
s("div", er, [
|
|
902
902
|
s("div", tr, [
|
|
903
|
-
|
|
903
|
+
E(o, {
|
|
904
904
|
"column-defs": [
|
|
905
905
|
{
|
|
906
906
|
header: "Code",
|
|
@@ -965,7 +965,7 @@ const Ct = {
|
|
|
965
965
|
unit: r.sku.unit,
|
|
966
966
|
"onUpdate:modelValue": (R) => {
|
|
967
967
|
if (!R) return;
|
|
968
|
-
const A = h.items.find((
|
|
968
|
+
const A = h.items.find((I) => I.id === r.id || I.sku._id === r.sku._id);
|
|
969
969
|
A && (A.amount = R.amount);
|
|
970
970
|
},
|
|
971
971
|
disableUnit: !0,
|
|
@@ -973,7 +973,7 @@ const Ct = {
|
|
|
973
973
|
p(qt)(
|
|
974
974
|
+p(oe)({ amount: 0, precision: 0 })
|
|
975
975
|
),
|
|
976
|
-
p(
|
|
976
|
+
p(Tt)(+p(oe)(b.quantity))
|
|
977
977
|
],
|
|
978
978
|
applyDefaultRules: !0
|
|
979
979
|
});
|
|
@@ -986,14 +986,14 @@ const Ct = {
|
|
|
986
986
|
])
|
|
987
987
|
]),
|
|
988
988
|
s("div", rr, [
|
|
989
|
-
|
|
989
|
+
E(v, {
|
|
990
990
|
class: "px-16",
|
|
991
991
|
label: "Confirm",
|
|
992
992
|
size: "md",
|
|
993
993
|
variant: "primary",
|
|
994
994
|
type: "submit"
|
|
995
995
|
}),
|
|
996
|
-
|
|
996
|
+
E(v, {
|
|
997
997
|
class: "px-16",
|
|
998
998
|
label: "Cancel",
|
|
999
999
|
size: "md",
|
|
@@ -1111,7 +1111,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1111
1111
|
}, Dr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nr = { class: "fm-typo-en-body-lg-600" }, Ar = {
|
|
1112
1112
|
key: 4,
|
|
1113
1113
|
class: "flex flex-col gap-4"
|
|
1114
|
-
}, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1114
|
+
}, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tr = { class: "fm-typo-en-body-lg-600" }, Pr = {
|
|
1115
1115
|
key: 0,
|
|
1116
1116
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1117
1117
|
}, $r = { class: "flex gap-8 items-center" }, Cr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ir = { class: "flex flex-col gap-8" }, Fr = { class: "flex gap-8 items-center" }, Er = { class: "flex-1 fm-typo-en-body-lg-600" }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Ur = { class: "flex w-full gap-4" }, Lr = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Vr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Mr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, jr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kr = {
|
|
@@ -1168,10 +1168,10 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1168
1168
|
), S = z(() => {
|
|
1169
1169
|
var e, c, O;
|
|
1170
1170
|
return b.value === ve.TRANSFER && ((e = n.transferToDbName) == null ? void 0 : e.startsWith("restaurant")) && ((O = (c = n.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : O.internal) === "restaurant";
|
|
1171
|
-
}), R = V(!1), A = V(""),
|
|
1171
|
+
}), R = V(!1), A = V(""), I = V(!0), Y = Ne(), W = ar(Y.getWorkflowConfig), de = lt(), X = z(() => {
|
|
1172
1172
|
if (!n.purchaseOrder)
|
|
1173
1173
|
return [];
|
|
1174
|
-
const e =
|
|
1174
|
+
const e = W.result.value;
|
|
1175
1175
|
if (e.state === Be.loading)
|
|
1176
1176
|
return [];
|
|
1177
1177
|
const c = {
|
|
@@ -1210,7 +1210,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
1212
|
async function Ae(e, c, O, w, j) {
|
|
1213
|
-
return new Promise((
|
|
1213
|
+
return new Promise((B, Q) => {
|
|
1214
1214
|
i.open({
|
|
1215
1215
|
closeButton: !1,
|
|
1216
1216
|
title: w.title,
|
|
@@ -1218,7 +1218,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1218
1218
|
primaryActions: w.primaryActions,
|
|
1219
1219
|
secondaryActions: { text: "No", close: !1 }
|
|
1220
1220
|
}).onPrimary(async () => {
|
|
1221
|
-
var u, q;
|
|
1221
|
+
var u, q, U, G;
|
|
1222
1222
|
try {
|
|
1223
1223
|
await de({
|
|
1224
1224
|
operate: {
|
|
@@ -1231,13 +1231,14 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1231
1231
|
_rev: ((q = n.purchaseOrder) == null ? void 0 : q._rev) ?? "",
|
|
1232
1232
|
action: O
|
|
1233
1233
|
// add payload if action is receiveStock or processRequest
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1234
|
+
},
|
|
1235
|
+
transferTo: (G = (U = n.poRequest) == null ? void 0 : U.to) == null ? void 0 : G.dbName
|
|
1236
|
+
}).delayed(1e3), B("submitted");
|
|
1237
|
+
} catch (C) {
|
|
1238
|
+
Q(C);
|
|
1238
1239
|
}
|
|
1239
1240
|
}).onSecondary(() => {
|
|
1240
|
-
|
|
1241
|
+
B("cancelled");
|
|
1241
1242
|
for (let u = 0; u < j + 2; u++)
|
|
1242
1243
|
i.close();
|
|
1243
1244
|
}).onClose(() => {
|
|
@@ -1245,7 +1246,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1245
1246
|
});
|
|
1246
1247
|
}
|
|
1247
1248
|
async function he(e) {
|
|
1248
|
-
if (e ===
|
|
1249
|
+
if (e === P.enum.receiveStock)
|
|
1249
1250
|
return;
|
|
1250
1251
|
const c = ct[e];
|
|
1251
1252
|
if (!c) {
|
|
@@ -1258,31 +1259,31 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1258
1259
|
}
|
|
1259
1260
|
const { successMessage: O } = c;
|
|
1260
1261
|
if (n.purchaseOrder) {
|
|
1261
|
-
A.value = `${e}`, R.value = !0,
|
|
1262
|
+
A.value = `${e}`, R.value = !0, I.value = !1;
|
|
1262
1263
|
const w = {};
|
|
1263
1264
|
let j = 0;
|
|
1264
|
-
if ((e ===
|
|
1265
|
-
e ===
|
|
1265
|
+
if ((e === P.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1266
|
+
e === P.enum.completeReceive) && d.autoReceiveWarehouse)
|
|
1266
1267
|
w.autoReceive = !0;
|
|
1267
|
-
else if (e ===
|
|
1268
|
-
const
|
|
1268
|
+
else if (e === P.enum.approveRequest && d.acceptRequireFulfillment) {
|
|
1269
|
+
const B = await new Promise((Q, u) => {
|
|
1269
1270
|
i.open({
|
|
1270
1271
|
closeButton: !1,
|
|
1271
1272
|
title: "Confirm transfer amount",
|
|
1272
1273
|
dialogComponent: sr,
|
|
1273
1274
|
dialogComponentProps: {
|
|
1274
1275
|
purchaseOrder: n.purchaseOrder,
|
|
1275
|
-
confirm:
|
|
1276
|
+
confirm: Q,
|
|
1276
1277
|
"onUpdate:show": (q) => {
|
|
1277
|
-
q || (A.value = "", R.value = !1,
|
|
1278
|
+
q || (A.value = "", R.value = !1, I.value = !0, j++, i.close()), u("cancelled");
|
|
1278
1279
|
}
|
|
1279
1280
|
}
|
|
1280
1281
|
});
|
|
1281
1282
|
});
|
|
1282
|
-
w.fulfillment =
|
|
1283
|
+
w.fulfillment = B;
|
|
1283
1284
|
}
|
|
1284
1285
|
try {
|
|
1285
|
-
const
|
|
1286
|
+
const B = await Ae(
|
|
1286
1287
|
n.purchaseOrder,
|
|
1287
1288
|
w,
|
|
1288
1289
|
e,
|
|
@@ -1293,52 +1294,52 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1293
1294
|
title: "Success",
|
|
1294
1295
|
message: O,
|
|
1295
1296
|
type: "success"
|
|
1296
|
-
}),
|
|
1297
|
+
}), B === "submitted" && (a.open({
|
|
1297
1298
|
title: "Success",
|
|
1298
1299
|
message: O,
|
|
1299
1300
|
type: "success"
|
|
1300
1301
|
}), h("update:show", !1), h("submitted"));
|
|
1301
|
-
} catch (
|
|
1302
|
+
} catch (B) {
|
|
1302
1303
|
a.open({
|
|
1303
1304
|
title: "Something went wrong",
|
|
1304
1305
|
message: "Please try again.",
|
|
1305
1306
|
type: "error"
|
|
1306
|
-
}), console.error("Error when submitting PO operation", e, n.purchaseOrder,
|
|
1307
|
+
}), console.error("Error when submitting PO operation", e, n.purchaseOrder, B);
|
|
1307
1308
|
} finally {
|
|
1308
|
-
A.value = "", R.value = !1,
|
|
1309
|
+
A.value = "", R.value = !1, I.value = !0;
|
|
1309
1310
|
}
|
|
1310
1311
|
}
|
|
1311
1312
|
}
|
|
1312
1313
|
const qe = z(() => {
|
|
1313
1314
|
var e, c;
|
|
1314
1315
|
return ((e = n.purchaseOrder) == null ? void 0 : e.status) === se.enum.RECEIVING || ((c = n.purchaseOrder) == null ? void 0 : c.status) === se.enum.COMPLETE;
|
|
1315
|
-
}),
|
|
1316
|
-
var
|
|
1317
|
-
const O = (((
|
|
1316
|
+
}), Te = z(() => {
|
|
1317
|
+
var B, Q, u;
|
|
1318
|
+
const O = (((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? []).flatMap((q) => q.received ?? []).reduce(
|
|
1318
1319
|
(q, U) => {
|
|
1319
|
-
const
|
|
1320
|
-
return q[U.sku._id] = [...
|
|
1320
|
+
const G = q[U.sku._id] ?? [];
|
|
1321
|
+
return q[U.sku._id] = [...G, U], q;
|
|
1321
1322
|
},
|
|
1322
1323
|
{}
|
|
1323
1324
|
), w = Object.entries(O).reduce(
|
|
1324
|
-
(q, [U,
|
|
1325
|
-
const
|
|
1325
|
+
(q, [U, G]) => {
|
|
1326
|
+
const C = G.reduce((J, F) => {
|
|
1326
1327
|
const ne = vt(
|
|
1327
1328
|
J,
|
|
1328
|
-
Math.max(J.precision,
|
|
1329
|
+
Math.max(J.precision, F.amount.precision)
|
|
1329
1330
|
);
|
|
1330
|
-
return Fe(ne,
|
|
1331
|
+
return Fe(ne, F.amount);
|
|
1331
1332
|
}, Oe(0));
|
|
1332
|
-
return q[U] =
|
|
1333
|
+
return q[U] = C, q;
|
|
1333
1334
|
},
|
|
1334
1335
|
{}
|
|
1335
|
-
), j = ((
|
|
1336
|
+
), j = ((Q = n.purchaseOrder) == null ? void 0 : Q.items) ?? [];
|
|
1336
1337
|
for (const q of j)
|
|
1337
1338
|
w[u = q.sku._id] ?? (w[u] = Oe(0));
|
|
1338
1339
|
return w;
|
|
1339
1340
|
}), g = z(() => {
|
|
1340
|
-
var
|
|
1341
|
-
const e = ((
|
|
1341
|
+
var B, Q;
|
|
1342
|
+
const e = ((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? [], c = ((Q = n.purchaseOrder) == null ? void 0 : Q.deliveryFullfillment) ?? [], O = [
|
|
1342
1343
|
...e.map((u) => ({
|
|
1343
1344
|
createdAt: u.createdAt,
|
|
1344
1345
|
type: "grn",
|
|
@@ -1352,11 +1353,11 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1352
1353
|
];
|
|
1353
1354
|
O.reverse().sort((u, q) => u.createdAt.localeCompare(q.createdAt));
|
|
1354
1355
|
function w(u) {
|
|
1355
|
-
var
|
|
1356
|
-
const q = c.findIndex((
|
|
1357
|
-
(
|
|
1356
|
+
var G, C, J, F, ne, be, ge, _e, $;
|
|
1357
|
+
const q = c.findIndex((T) => T.id === u.fullfillmentId), U = [
|
|
1358
|
+
(C = (G = c[q]) == null ? void 0 : G.netSuite) != null && C.refNo ? {
|
|
1358
1359
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1359
|
-
values: [(
|
|
1360
|
+
values: [(F = (J = c[q]) == null ? void 0 : J.netSuite) == null ? void 0 : F.refNo]
|
|
1360
1361
|
} : null,
|
|
1361
1362
|
(ne = u == null ? void 0 : u.netSuite) != null && ne.refNo ? {
|
|
1362
1363
|
label: "Netsuite ref no.",
|
|
@@ -1369,12 +1370,12 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1369
1370
|
];
|
|
1370
1371
|
return {
|
|
1371
1372
|
header: "Received",
|
|
1372
|
-
date:
|
|
1373
|
+
date: Pe(new Date(u.createdAt)),
|
|
1373
1374
|
info: [
|
|
1374
1375
|
{
|
|
1375
1376
|
label: "Adjustment date",
|
|
1376
1377
|
values: [
|
|
1377
|
-
u.adjustment ?
|
|
1378
|
+
u.adjustment ? Pe(new Date(bt(u.adjustment))) : "-"
|
|
1378
1379
|
]
|
|
1379
1380
|
},
|
|
1380
1381
|
{
|
|
@@ -1383,7 +1384,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1383
1384
|
},
|
|
1384
1385
|
{
|
|
1385
1386
|
label: "Received items",
|
|
1386
|
-
values: u.received.map((
|
|
1387
|
+
values: u.received.map((T) => {
|
|
1387
1388
|
var M;
|
|
1388
1389
|
return N("div", [
|
|
1389
1390
|
N(
|
|
@@ -1403,14 +1404,14 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1403
1404
|
{
|
|
1404
1405
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1405
1406
|
},
|
|
1406
|
-
`${
|
|
1407
|
+
`${T.sku.name}`
|
|
1407
1408
|
),
|
|
1408
1409
|
N(
|
|
1409
1410
|
"span",
|
|
1410
1411
|
{
|
|
1411
1412
|
class: "fm-typo-en-body-md-400"
|
|
1412
1413
|
},
|
|
1413
|
-
`${
|
|
1414
|
+
`${T.sku.code} `
|
|
1414
1415
|
)
|
|
1415
1416
|
]
|
|
1416
1417
|
),
|
|
@@ -1431,14 +1432,14 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1431
1432
|
{
|
|
1432
1433
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1433
1434
|
},
|
|
1434
|
-
oe(
|
|
1435
|
+
oe(T.amount, !1)
|
|
1435
1436
|
),
|
|
1436
1437
|
N(
|
|
1437
1438
|
"span",
|
|
1438
1439
|
{
|
|
1439
1440
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1440
1441
|
},
|
|
1441
|
-
((M =
|
|
1442
|
+
((M = T.measurement) == null ? void 0 : M.abbrev) ?? T.sku.unit.abbrev
|
|
1442
1443
|
)
|
|
1443
1444
|
]
|
|
1444
1445
|
),
|
|
@@ -1447,7 +1448,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1447
1448
|
{
|
|
1448
1449
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1449
1450
|
},
|
|
1450
|
-
`${
|
|
1451
|
+
`${T.cost ? `(${xe(T.cost)})` : ""}`
|
|
1451
1452
|
)
|
|
1452
1453
|
]
|
|
1453
1454
|
)
|
|
@@ -1469,15 +1470,15 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1469
1470
|
values: [`${q + 1}`]
|
|
1470
1471
|
} : null,
|
|
1471
1472
|
...U
|
|
1472
|
-
].filter((
|
|
1473
|
+
].filter((T) => T)
|
|
1473
1474
|
};
|
|
1474
1475
|
}
|
|
1475
1476
|
function j(u) {
|
|
1476
|
-
var U,
|
|
1477
|
-
const q = c.findIndex((
|
|
1477
|
+
var U, G;
|
|
1478
|
+
const q = c.findIndex((C) => C.id === u.id);
|
|
1478
1479
|
return {
|
|
1479
1480
|
header: "Fulfillment",
|
|
1480
|
-
date:
|
|
1481
|
+
date: Pe(new Date(u.createdAt)),
|
|
1481
1482
|
info: [
|
|
1482
1483
|
{
|
|
1483
1484
|
label: "Sequence",
|
|
@@ -1485,7 +1486,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1485
1486
|
},
|
|
1486
1487
|
{
|
|
1487
1488
|
label: "Receiveable items",
|
|
1488
|
-
values: u.items.map((
|
|
1489
|
+
values: u.items.map((C) => {
|
|
1489
1490
|
var J;
|
|
1490
1491
|
return N("div", [
|
|
1491
1492
|
N(
|
|
@@ -1505,14 +1506,14 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1505
1506
|
{
|
|
1506
1507
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1507
1508
|
},
|
|
1508
|
-
`${
|
|
1509
|
+
`${C.sku.name}`
|
|
1509
1510
|
),
|
|
1510
1511
|
N(
|
|
1511
1512
|
"span",
|
|
1512
1513
|
{
|
|
1513
1514
|
class: "fm-typo-en-body-md-400"
|
|
1514
1515
|
},
|
|
1515
|
-
`${
|
|
1516
|
+
`${C.sku.code} `
|
|
1516
1517
|
)
|
|
1517
1518
|
]
|
|
1518
1519
|
),
|
|
@@ -1533,14 +1534,14 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1533
1534
|
{
|
|
1534
1535
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1535
1536
|
},
|
|
1536
|
-
oe(
|
|
1537
|
+
oe(C.amount, !1)
|
|
1537
1538
|
),
|
|
1538
1539
|
N(
|
|
1539
1540
|
"span",
|
|
1540
1541
|
{
|
|
1541
1542
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1542
1543
|
},
|
|
1543
|
-
((J =
|
|
1544
|
+
((J = C.measurement) == null ? void 0 : J.abbrev) ?? C.sku.unit.abbrev
|
|
1544
1545
|
)
|
|
1545
1546
|
]
|
|
1546
1547
|
),
|
|
@@ -1549,7 +1550,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1549
1550
|
{
|
|
1550
1551
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1551
1552
|
},
|
|
1552
|
-
`${
|
|
1553
|
+
`${C.cost ? `(${xe(C.cost)})` : ""}`
|
|
1553
1554
|
)
|
|
1554
1555
|
]
|
|
1555
1556
|
)
|
|
@@ -1560,9 +1561,9 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1560
1561
|
},
|
|
1561
1562
|
(U = u.netSuite) != null && U.refNo ? {
|
|
1562
1563
|
label: "Ref no. (Netsuite)",
|
|
1563
|
-
values: [(
|
|
1564
|
+
values: [(G = u.netSuite) == null ? void 0 : G.refNo]
|
|
1564
1565
|
} : null
|
|
1565
|
-
].filter((
|
|
1566
|
+
].filter((C) => C)
|
|
1566
1567
|
};
|
|
1567
1568
|
}
|
|
1568
1569
|
return O.map((u) => {
|
|
@@ -1585,22 +1586,22 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1585
1586
|
}), e)) ?? e;
|
|
1586
1587
|
});
|
|
1587
1588
|
return (e, c) => {
|
|
1588
|
-
var
|
|
1589
|
-
const O =
|
|
1590
|
-
return _(), le(
|
|
1591
|
-
header: p(r)("inventory.transfer.receiveRequest.details.title") + ((
|
|
1589
|
+
var C, J;
|
|
1590
|
+
const O = H("FmButtonGroup"), w = H("FmChip"), j = H("FmMenuDivider"), B = H("FmCard"), Q = H("FmIcon"), u = H("FmTooltip"), q = H("FmSpacer"), U = H("FmButton"), G = H("FmSideSheet");
|
|
1591
|
+
return _(), le(G, {
|
|
1592
|
+
header: p(r)("inventory.transfer.receiveRequest.details.title") + ((C = e.purchaseOrder) != null && C.seqNumber ? ` #${(J = e.purchaseOrder) == null ? void 0 : J.seqNumber}` : ""),
|
|
1592
1593
|
modelValue: p(ae),
|
|
1593
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
1594
|
-
"dismiss-away":
|
|
1594
|
+
"onUpdate:modelValue": c[4] || (c[4] = (F) => wt(ae) ? ae.value = F : null),
|
|
1595
|
+
"dismiss-away": I.value,
|
|
1595
1596
|
"close-button": "",
|
|
1596
1597
|
"max-width": 600
|
|
1597
1598
|
}, {
|
|
1598
1599
|
default: ie(() => {
|
|
1599
|
-
var
|
|
1600
|
+
var F, ne, be, ge, _e;
|
|
1600
1601
|
return [
|
|
1601
1602
|
s("div", or, [
|
|
1602
1603
|
s("div", null, [
|
|
1603
|
-
|
|
1604
|
+
E(O, {
|
|
1604
1605
|
items: ee.value,
|
|
1605
1606
|
modelValue: ce.value,
|
|
1606
1607
|
"onUpdate:modelValue": c[0] || (c[0] = ($) => ce.value = $)
|
|
@@ -1608,24 +1609,24 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1608
1609
|
]),
|
|
1609
1610
|
ce.value.value === "overview" ? (_(), D(te, { key: 0 }, [
|
|
1610
1611
|
s("div", null, [
|
|
1611
|
-
|
|
1612
|
+
E(B, {
|
|
1612
1613
|
variant: "outlined",
|
|
1613
1614
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1614
1615
|
}, {
|
|
1615
1616
|
default: ie(() => {
|
|
1616
|
-
var $,
|
|
1617
|
+
var $, T, M, me, fe, Se, Ke, ze, Ge, He, Qe, Ye;
|
|
1617
1618
|
return [
|
|
1618
1619
|
s("div", cr, [
|
|
1619
1620
|
s("div", lr, x(p(r)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1620
1621
|
s("div", null, [
|
|
1621
|
-
|
|
1622
|
+
E(w, {
|
|
1622
1623
|
label: p(r)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
|
|
1623
|
-
class: Re(`fm-status-badge fm-status-badge-${(M = (
|
|
1624
|
+
class: Re(`fm-status-badge fm-status-badge-${(M = (T = e.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : M.toLocaleLowerCase("en-us")}`),
|
|
1624
1625
|
compact: ""
|
|
1625
1626
|
}, null, 8, ["label", "class"])
|
|
1626
1627
|
])
|
|
1627
1628
|
]),
|
|
1628
|
-
|
|
1629
|
+
E(j),
|
|
1629
1630
|
s("div", ir, [
|
|
1630
1631
|
s("div", ur, [
|
|
1631
1632
|
s("div", dr, [
|
|
@@ -1657,7 +1658,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1657
1658
|
])) : L("", !0),
|
|
1658
1659
|
(Ye = e.purchaseOrder) != null && Ye.remark ? (_(), D("div", Ar, [
|
|
1659
1660
|
s("div", qr, x(p(r)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1660
|
-
s("div",
|
|
1661
|
+
s("div", Tr, x(e.purchaseOrder.remark), 1)
|
|
1661
1662
|
])) : L("", !0)
|
|
1662
1663
|
])
|
|
1663
1664
|
];
|
|
@@ -1665,19 +1666,19 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1665
1666
|
_: 1
|
|
1666
1667
|
})
|
|
1667
1668
|
]),
|
|
1668
|
-
p(y).isNetSuiteEnabled && !S.value ? (_(), D("div",
|
|
1669
|
+
p(y).isNetSuiteEnabled && !S.value ? (_(), D("div", Pr, [
|
|
1669
1670
|
s("div", $r, [
|
|
1670
1671
|
c[5] || (c[5] = s("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1671
1672
|
s("div", null, [
|
|
1672
|
-
|
|
1673
|
+
E(Zt, {
|
|
1673
1674
|
"po-request": e.poRequest,
|
|
1674
1675
|
"purchase-order": e.purchaseOrder,
|
|
1675
1676
|
"is-transfer-between-outlets": S.value
|
|
1676
1677
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets"])
|
|
1677
1678
|
])
|
|
1678
1679
|
]),
|
|
1679
|
-
|
|
1680
|
-
|
|
1680
|
+
E(j),
|
|
1681
|
+
E(Xt, {
|
|
1681
1682
|
"po-request": e.poRequest,
|
|
1682
1683
|
"purchase-order": e.purchaseOrder,
|
|
1683
1684
|
"transfer-type": b.value,
|
|
@@ -1691,21 +1692,21 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1691
1692
|
s("div", Fr, [
|
|
1692
1693
|
s("span", Er, [
|
|
1693
1694
|
$e(x(qe.value ? p(r)("inventory.transfer.receiveRequest.details.receivedItems") : p(r)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1694
|
-
(ne = (
|
|
1695
|
+
(ne = (F = e.purchaseOrder) == null ? void 0 : F.netSuite) != null && ne.missingItems && ((ge = (be = e.purchaseOrder) == null ? void 0 : be.netSuite) == null ? void 0 : ge.missingItems.length) > 0 ? (_(), le(u, {
|
|
1695
1696
|
key: 0,
|
|
1696
1697
|
variant: "rich",
|
|
1697
1698
|
placement: "top",
|
|
1698
1699
|
"z-index": 51
|
|
1699
1700
|
}, {
|
|
1700
1701
|
content: ie(() => {
|
|
1701
|
-
var $,
|
|
1702
|
+
var $, T;
|
|
1702
1703
|
return [
|
|
1703
1704
|
s("div", Br, [
|
|
1704
|
-
(_(!0), D(te, null, pe((
|
|
1705
|
+
(_(!0), D(te, null, pe((T = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : T.missingItems, (M, me) => (_(), D("div", {
|
|
1705
1706
|
class: "flex justify-center align-middle",
|
|
1706
1707
|
key: me
|
|
1707
1708
|
}, [
|
|
1708
|
-
|
|
1709
|
+
E(Q, {
|
|
1709
1710
|
name: "arrow_right",
|
|
1710
1711
|
size: "sm"
|
|
1711
1712
|
}),
|
|
@@ -1715,7 +1716,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1715
1716
|
];
|
|
1716
1717
|
}),
|
|
1717
1718
|
default: ie(() => [
|
|
1718
|
-
|
|
1719
|
+
E(Q, {
|
|
1719
1720
|
name: "error",
|
|
1720
1721
|
color: "#ff2c2c",
|
|
1721
1722
|
size: "sm"
|
|
@@ -1725,26 +1726,26 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1725
1726
|
})) : L("", !0)
|
|
1726
1727
|
])
|
|
1727
1728
|
]),
|
|
1728
|
-
|
|
1729
|
+
E(j),
|
|
1729
1730
|
(_(!0), D(te, null, pe(((_e = e.purchaseOrder) == null ? void 0 : _e.items) ?? [], ($) => {
|
|
1730
|
-
var
|
|
1731
|
+
var T;
|
|
1731
1732
|
return _(), D("div", {
|
|
1732
1733
|
key: $.code,
|
|
1733
1734
|
class: "flex flex-col"
|
|
1734
1735
|
}, [
|
|
1735
1736
|
s("div", Ur, [
|
|
1736
1737
|
s("div", Lr, x($.name), 1),
|
|
1737
|
-
s("div", Vr, x(p(oe)(
|
|
1738
|
+
s("div", Vr, x(p(oe)(Te.value[$.sku._id], !1)) + "/" + x(p(nt)($.quantity, $.sku.unit, $.measurement)), 1)
|
|
1738
1739
|
]),
|
|
1739
1740
|
s("div", Mr, [
|
|
1740
1741
|
s("div", jr, x($.code), 1),
|
|
1741
|
-
(
|
|
1742
|
+
(T = $.totalCost) != null && T.amount && p(d).enableTotalCost ? (_(), D("div", Kr, " (" + x(p(xe)($.totalCost)) + ") ", 1)) : L("", !0)
|
|
1742
1743
|
])
|
|
1743
1744
|
]);
|
|
1744
1745
|
}), 128)),
|
|
1745
1746
|
+p(oe)(k.value) ? (_(), D(te, { key: 0 }, [
|
|
1746
1747
|
s("div", zr, [
|
|
1747
|
-
|
|
1748
|
+
E(j)
|
|
1748
1749
|
]),
|
|
1749
1750
|
s("div", Gr, [
|
|
1750
1751
|
c[6] || (c[6] = s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
@@ -1755,15 +1756,15 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1755
1756
|
])
|
|
1756
1757
|
], 64)) : ce.value.value === "deliveryHistory" ? (_(), D("div", Qr, [
|
|
1757
1758
|
g.value.length ? (_(), D("div", Zr, [
|
|
1758
|
-
(_(!0), D(te, null, pe(g.value, ($,
|
|
1759
|
+
(_(!0), D(te, null, pe(g.value, ($, T) => (_(), D(te, { key: T }, [
|
|
1759
1760
|
s("div", es, [
|
|
1760
1761
|
s("div", ts, [
|
|
1761
1762
|
s("div", rs, [
|
|
1762
1763
|
s("div", {
|
|
1763
1764
|
class: Re([
|
|
1764
1765
|
{
|
|
1765
|
-
"bg-fm-color-primary":
|
|
1766
|
-
"bg-white":
|
|
1766
|
+
"bg-fm-color-primary": T !== 0,
|
|
1767
|
+
"bg-white": T === 0
|
|
1767
1768
|
},
|
|
1768
1769
|
"w-[2px] h-full"
|
|
1769
1770
|
])
|
|
@@ -1774,8 +1775,8 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1774
1775
|
s("div", {
|
|
1775
1776
|
class: Re([
|
|
1776
1777
|
{
|
|
1777
|
-
"bg-fm-color-primary":
|
|
1778
|
-
"bg-white":
|
|
1778
|
+
"bg-fm-color-primary": T < g.value.length - 1,
|
|
1779
|
+
"bg-white": T >= g.value.length - 1
|
|
1779
1780
|
},
|
|
1780
1781
|
"w-[2px] h-full"
|
|
1781
1782
|
])
|
|
@@ -1793,8 +1794,8 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1793
1794
|
s("div", {
|
|
1794
1795
|
class: Re([
|
|
1795
1796
|
{
|
|
1796
|
-
"bg-fm-color-primary":
|
|
1797
|
-
"bg-white":
|
|
1797
|
+
"bg-fm-color-primary": T < g.value.length - 1,
|
|
1798
|
+
"bg-white": T >= g.value.length - 1
|
|
1798
1799
|
},
|
|
1799
1800
|
"w-[2px] h-full"
|
|
1800
1801
|
])
|
|
@@ -1802,7 +1803,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1802
1803
|
])
|
|
1803
1804
|
]),
|
|
1804
1805
|
s("div", us, [
|
|
1805
|
-
|
|
1806
|
+
E(B, {
|
|
1806
1807
|
variant: "outlined",
|
|
1807
1808
|
class: "py-12 px-16"
|
|
1808
1809
|
}, {
|
|
@@ -1832,7 +1833,7 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1832
1833
|
])
|
|
1833
1834
|
], 64))), 128))
|
|
1834
1835
|
])) : (_(), D("div", Yr, [
|
|
1835
|
-
|
|
1836
|
+
E(q),
|
|
1836
1837
|
s("div", null, [
|
|
1837
1838
|
s("img", {
|
|
1838
1839
|
src: p(kt),
|
|
@@ -1841,8 +1842,8 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1841
1842
|
]),
|
|
1842
1843
|
s("div", Xr, x(p(r)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1843
1844
|
s("div", Jr, x(p(r)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1844
|
-
|
|
1845
|
-
|
|
1845
|
+
E(q),
|
|
1846
|
+
E(q)
|
|
1846
1847
|
]))
|
|
1847
1848
|
])) : L("", !0)
|
|
1848
1849
|
])
|
|
@@ -1850,32 +1851,32 @@ const or = { class: "flex flex-col gap-16 w-full h-full" }, cr = { class: "flex
|
|
|
1850
1851
|
}),
|
|
1851
1852
|
"side-sheet-footer": ie(() => [
|
|
1852
1853
|
s("div", ps, [
|
|
1853
|
-
(_(!0), D(te, null, pe(
|
|
1854
|
-
key:
|
|
1855
|
-
label: p(r)(p(et)[
|
|
1856
|
-
onClick: (ne) => he(
|
|
1857
|
-
loading: A.value ===
|
|
1858
|
-
disabled: A.value !==
|
|
1859
|
-
variant: p(et)[
|
|
1854
|
+
(_(!0), D(te, null, pe(X.value, (F) => (_(), le(U, {
|
|
1855
|
+
key: F,
|
|
1856
|
+
label: p(r)(p(et)[F].translationKey),
|
|
1857
|
+
onClick: (ne) => he(F),
|
|
1858
|
+
loading: A.value === F,
|
|
1859
|
+
disabled: A.value !== F && R.value,
|
|
1860
|
+
variant: p(et)[F].buttonVariant
|
|
1860
1861
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"]))), 128)),
|
|
1861
|
-
p(f).ableToMarkReceived(e.purchaseOrder) && !
|
|
1862
|
+
p(f).ableToMarkReceived(e.purchaseOrder) && !X.value.includes("completeReceive") ? (_(), le(U, {
|
|
1862
1863
|
key: 0,
|
|
1863
1864
|
label: p(r)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1864
|
-
onClick: c[1] || (c[1] = (
|
|
1865
|
+
onClick: c[1] || (c[1] = (F) => he("completeReceive")),
|
|
1865
1866
|
loading: A.value === "completeReceive",
|
|
1866
1867
|
disabled: A.value !== "completeReceive" && R.value
|
|
1867
1868
|
}, null, 8, ["label", "loading", "disabled"])) : L("", !0),
|
|
1868
|
-
p(f).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !
|
|
1869
|
+
p(f).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !X.value.includes("approveRequest") ? (_(), le(U, {
|
|
1869
1870
|
key: 1,
|
|
1870
1871
|
label: p(r)("inventory.transfer.approval.actions.approveRequest"),
|
|
1871
|
-
onClick: c[2] || (c[2] = (
|
|
1872
|
+
onClick: c[2] || (c[2] = (F) => he("approveRequest")),
|
|
1872
1873
|
loading: A.value === "approveRequest",
|
|
1873
1874
|
disabled: A.value !== "approveRequest" && R.value
|
|
1874
1875
|
}, null, 8, ["label", "loading", "disabled"])) : L("", !0),
|
|
1875
|
-
|
|
1876
|
+
E(U, {
|
|
1876
1877
|
label: p(r)("common.close"),
|
|
1877
1878
|
variant: "tertiary",
|
|
1878
|
-
onClick: c[3] || (c[3] = (
|
|
1879
|
+
onClick: c[3] || (c[3] = (F) => h("update:show", !1))
|
|
1879
1880
|
}, null, 8, ["label"])
|
|
1880
1881
|
])
|
|
1881
1882
|
]),
|
|
@@ -1889,6 +1890,6 @@ export {
|
|
|
1889
1890
|
Ds as _,
|
|
1890
1891
|
Os as a,
|
|
1891
1892
|
ks as b,
|
|
1892
|
-
|
|
1893
|
+
Pt as g,
|
|
1893
1894
|
Ne as u
|
|
1894
1895
|
};
|