@feedmepos/mf-inventory-portal 0.0.23-dev.14 → 0.0.23-dev.15
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-C6g4MWwq.js → App-CkynItyw.js} +3 -3
- package/dist/{ApprovalView-BK8XFPbW.js → ApprovalView-BLLTVSSb.js} +4 -4
- package/dist/{BindingsDialog-Dyt5XjYv.js → BindingsDialog--P_bnxou.js} +2 -2
- package/dist/{BindingsPicker-Oc6mY2X8.js → BindingsPicker-BbkA_h-o.js} +2 -2
- package/dist/{BindingsTable-Bd3XOxR2.js → BindingsTable-CXP5EOxL.js} +4 -4
- package/dist/{ClosingDraftView-ByE3m27z.js → ClosingDraftView-CgAVONKU.js} +6 -6
- package/dist/{ClosingTemplateView-CMwTAa6I.js → ClosingTemplateView-BejXOMLa.js} +10 -10
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C8Svc7L9.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BQ1w3Z1O.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-6-Um-FOb.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-XoGRRl2X.js} +2 -2
- package/dist/{FmMultiselectDialog-D8iilrSP.js → FmMultiselectDialog-yHlvzk0I.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D5hUkg2Q.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CXS2akOg.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cd9aCR0V.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CfFjjfIc.js} +1 -1
- package/dist/{IngredientGroupView-D5Y8HnMX.js → IngredientGroupView-DqiVjxMm.js} +5 -5
- package/dist/{IngredientsView-Bw49qYtR.js → IngredientsView-CK7MltN7.js} +9 -9
- package/dist/{IntegrationView-BxaJS_Ic.js → IntegrationView-FdBWhVI5.js} +4 -4
- package/dist/{InventoryBindingForm-a9nsrEgo.js → InventoryBindingForm-DlxTa_MO.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dj3ykTHY.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-WNYUK4fi.js} +5 -5
- package/dist/{InventoryBindingSummary-BdvlBlBa.js → InventoryBindingSummary-BLGzzvB_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BIFLCYHD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dkr5i5Sp.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-gqJ2wFO2.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CGvWaRx-.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-DsWVxI5o.js → PurchaseOrderPrintPreview-htRYsVHK.js} +1 -1
- package/dist/{ReceiveRequestView-C7I6nYFr.js → ReceiveRequestView-B5GoN-OH.js} +18 -18
- package/dist/{RecipeView-DNf5Pdsx.js → RecipeView-M1bC1FZ1.js} +7 -7
- package/dist/{StockView-BvtciIRT.js → StockView-BBoVKedw.js} +13 -13
- package/dist/{SupplierView-Co0xIPuQ.js → SupplierView-D7GDKNvo.js} +10 -10
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-WlrPIph9.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cdeb6nPX.js} +127 -127
- package/dist/{TransferTemplateView-BWuxHMCo.js → TransferTemplateView-CcUHTTkw.js} +14 -14
- package/dist/{UnitView-DV1gTkKx.js → UnitView-CQ2_2PwI.js} +5 -5
- package/dist/{WarehouseView-1nJhKxZf.js → WarehouseView-DEsUeVui.js} +4 -4
- package/dist/{app-BxXrau2Y.js → app-iPB0Kour.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/{date2-BiwqC0aG.js → date2-DbXZUZ9a.js} +1 -1
- package/dist/{dayjs.min-BG6ShXQ2.js → dayjs.min-Dl6geKWL.js} +1 -1
- package/dist/{decimal-E0BNizw5.js → decimal-DQkdkHZR.js} +1 -1
- package/dist/{defineDeepModel-35Pm_1zc.js → defineDeepModel-RkNOKgaB.js} +1 -1
- package/dist/{feature-DEUGLUcC.js → feature-C5H2Ecl4.js} +1 -1
- package/dist/{format-time-from-id-C-CoKHdr.js → format-time-from-id-DVB4ONoe.js} +1 -1
- package/dist/{format-unit-display-BTpv4xQq.js → format-unit-display-CIhGJZzk.js} +8 -8
- package/dist/{fuzzy-DnuAv442.js → fuzzy-DDMiepB2.js} +1 -1
- package/dist/{index-C-Tfi09A.js → index-BMoy7HHz.js} +1 -1
- package/dist/{index-DAeQwHBr.js → index-C4Q79QkD.js} +1 -1
- package/dist/{index-CvuJB9Kj.js → index-DEYZ-qUf.js} +1 -1
- package/dist/{netsuite-B_j6HAOr.js → netsuite-CnvEeHT3.js} +1 -1
- package/dist/{rules-DQHD3_tG.js → rules-V9_CI2u_.js} +2 -2
- package/dist/{stock-UdvZOkMj.js → stock-lN4T3vtF.js} +2 -2
- package/dist/{supplier-DPLyaiL4.js → supplier-DWG6_Rn3.js} +1 -1
- package/dist/{use-inventory-binding-dialog-D5f_LR61.js → use-inventory-binding-dialog-CMihaarh.js} +2 -2
- package/dist/{use-template-enabled-locations-2-C7I0IWxW.js → use-template-enabled-locations-2-CnsmKuzY.js} +2 -2
- package/dist/{xlsx-CtEy_Z3G.js → xlsx-BB1TdLbM.js} +1 -1
- package/dist/{xlsx.util-CNlpT1T7.js → xlsx.util-hwt9BILM.js} +1 -1
- package/package.json +3 -3
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { ref as B, computed as V, h as ee, defineComponent as We, resolveComponent as te, openBlock as y, createBlock as J, unref as n, isRef as Je, withCtx as pe, createElementVNode as r, createElementBlock as D, createVNode as Q, createCommentVNode as N, Fragment as re, toDisplayString as v, normalizeClass as ve, renderList as ye } from "vue";
|
|
2
|
-
import { i as Ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { k as Xe, u as be, G as
|
|
4
|
-
import { t as tt, b as rt, h as Be, d as Ie } from "./date2-
|
|
2
|
+
import { i as Ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-XoGRRl2X.js";
|
|
3
|
+
import { k as Xe, u as be, G as R, r as et, c as Le, y as F, s as je, w as $e } from "./app-iPB0Kour.js";
|
|
4
|
+
import { t as tt, b as rt, h as Be, d as Ie } from "./date2-DbXZUZ9a.js";
|
|
5
5
|
import { F as Fe } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
6
|
import { useDialog as Ke, useSnackbar as Ve, useProxiedModel as st } from "@feedmepos/ui-library";
|
|
7
|
-
import { p as at, f as ge } from "./format-time-from-id-
|
|
8
|
-
import { u as Ge } from "./feature-
|
|
9
|
-
import { b as nt, u as ot, f as He, P as se } from "./format-unit-display-
|
|
7
|
+
import { p as at, f as ge } from "./format-time-from-id-DVB4ONoe.js";
|
|
8
|
+
import { u as Ge } from "./feature-C5H2Ecl4.js";
|
|
9
|
+
import { b as nt, u as ot, f as He, P as se } from "./format-unit-display-CIhGJZzk.js";
|
|
10
10
|
import { c as Me } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
11
11
|
import { D as j, R as I } from "./row-action.enum-7rGLGZ5v.js";
|
|
12
|
-
import { i as Oe, c as he, a as le, k as lt, j as Ue } from "./rules-
|
|
13
|
-
import { F as it } from "./decimal-
|
|
12
|
+
import { i as Oe, c as he, a as le, k as lt, j as Ue } from "./rules-V9_CI2u_.js";
|
|
13
|
+
import { F as it } from "./decimal-DQkdkHZR.js";
|
|
14
14
|
import { useI18n as ze } from "@feedmepos/mf-common";
|
|
15
15
|
import { E as ct } from "./empty-placeholder-wf6-BWE8.js";
|
|
16
|
-
import { u as ut } from "./netsuite-
|
|
16
|
+
import { u as ut } from "./netsuite-CnvEeHT3.js";
|
|
17
17
|
const Ye = Xe((m, _) => {
|
|
18
18
|
const u = be();
|
|
19
19
|
return {
|
|
20
20
|
async readRequests(s) {
|
|
21
|
-
const
|
|
21
|
+
const w = s ?? u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-request`;
|
|
22
22
|
return await _.get(S);
|
|
23
23
|
},
|
|
24
24
|
async getPurchaseOrders({
|
|
25
25
|
start: s,
|
|
26
|
-
end:
|
|
26
|
+
end: w
|
|
27
27
|
}) {
|
|
28
28
|
const S = u.currentLocationDBName, q = `${m.inventoryBackendUrl}/${S}/purchase-order`;
|
|
29
|
-
return await _.get(`${q}?start=${s}&end=${
|
|
29
|
+
return await _.get(`${q}?start=${s}&end=${w}`);
|
|
30
30
|
},
|
|
31
31
|
async getPurchaseOrderById(s) {
|
|
32
|
-
const
|
|
32
|
+
const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
|
|
33
33
|
return await _.get(`${S}/${s}`);
|
|
34
34
|
},
|
|
35
|
-
async processPurchaseOrder(s,
|
|
36
|
-
const S = u.currentLocationDBName, q =
|
|
35
|
+
async processPurchaseOrder(s, w) {
|
|
36
|
+
const S = u.currentLocationDBName, q = w || S, $ = `${m.inventoryBackendUrl}/${q}/purchase-order/run-operation`;
|
|
37
37
|
return await _.put($, s);
|
|
38
38
|
},
|
|
39
39
|
async createPurchaseOrder(s) {
|
|
40
|
-
const
|
|
40
|
+
const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
|
|
41
41
|
return await _.post(S, s);
|
|
42
42
|
},
|
|
43
43
|
async updatePurchaseOrder(s) {
|
|
44
|
-
const
|
|
44
|
+
const w = u.currentLocationDBName, S = `${m.inventoryBackendUrl}/${w}/purchase-order`;
|
|
45
45
|
return await _.put(S, s);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}), Qe = {
|
|
49
|
-
[
|
|
49
|
+
[R.enum.confirmDraft]: {
|
|
50
50
|
primaryActions: {
|
|
51
51
|
text: "Confirm draft",
|
|
52
52
|
close: !0
|
|
@@ -55,7 +55,7 @@ const Ye = Xe((m, _) => {
|
|
|
55
55
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
56
56
|
successMessage: "Purchase order draft has been confirmed"
|
|
57
57
|
},
|
|
58
|
-
[
|
|
58
|
+
[R.enum.cancelDraft]: {
|
|
59
59
|
primaryActions: {
|
|
60
60
|
text: "Cancel draft",
|
|
61
61
|
close: !0,
|
|
@@ -65,7 +65,7 @@ const Ye = Xe((m, _) => {
|
|
|
65
65
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
66
66
|
successMessage: "Purchase order draft has been cancelled"
|
|
67
67
|
},
|
|
68
|
-
[
|
|
68
|
+
[R.enum.submitRequest]: {
|
|
69
69
|
primaryActions: {
|
|
70
70
|
text: "Submit request",
|
|
71
71
|
close: !0
|
|
@@ -74,7 +74,7 @@ const Ye = Xe((m, _) => {
|
|
|
74
74
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
75
75
|
successMessage: "Purchase order draft has been submitted"
|
|
76
76
|
},
|
|
77
|
-
[
|
|
77
|
+
[R.enum.completeReceive]: {
|
|
78
78
|
primaryActions: {
|
|
79
79
|
text: "Mark received",
|
|
80
80
|
close: !0
|
|
@@ -83,7 +83,7 @@ const Ye = Xe((m, _) => {
|
|
|
83
83
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
84
84
|
successMessage: "Purchase order has been marked as received"
|
|
85
85
|
},
|
|
86
|
-
[
|
|
86
|
+
[R.enum.approveRequest]: {
|
|
87
87
|
primaryActions: {
|
|
88
88
|
text: "Approve request",
|
|
89
89
|
close: !0
|
|
@@ -92,7 +92,7 @@ const Ye = Xe((m, _) => {
|
|
|
92
92
|
message: "Purchase order will be approved.",
|
|
93
93
|
successMessage: "Purchase order has been approved"
|
|
94
94
|
},
|
|
95
|
-
[
|
|
95
|
+
[R.enum.rejectRequest]: {
|
|
96
96
|
primaryActions: {
|
|
97
97
|
text: "Reject request",
|
|
98
98
|
close: !0,
|
|
@@ -104,7 +104,7 @@ const Ye = Xe((m, _) => {
|
|
|
104
104
|
}
|
|
105
105
|
}, me = B();
|
|
106
106
|
function Br(m, _) {
|
|
107
|
-
const u = Ke(), s = be(),
|
|
107
|
+
const u = Ke(), s = be(), w = Ge(), S = nt(), q = ot(), $ = B(!1), d = Ve(), M = Ye(), i = B(new Array()), p = B(
|
|
108
108
|
_ != null && _.startDate && (_ != null && _.endDate) ? _ : Ze()
|
|
109
109
|
), h = V(() => {
|
|
110
110
|
const f = new Date(p.value.startDate), c = new Date(p.value.endDate);
|
|
@@ -115,7 +115,7 @@ function Br(m, _) {
|
|
|
115
115
|
}), g = B(new Array()), O = et(), G = B(null);
|
|
116
116
|
async function Se(f) {
|
|
117
117
|
let c;
|
|
118
|
-
if (
|
|
118
|
+
if (w.mustUsePoTemplate && !(f != null && f.template) && (c = await S.getTemplateId(), !c))
|
|
119
119
|
return;
|
|
120
120
|
const t = {
|
|
121
121
|
mode: Fe.CREATE,
|
|
@@ -144,9 +144,9 @@ function Br(m, _) {
|
|
|
144
144
|
async function _e() {
|
|
145
145
|
i.value = [], $.value = !0;
|
|
146
146
|
try {
|
|
147
|
-
i.value = await
|
|
147
|
+
i.value = await M.getPurchaseOrders(h.value).then((t) => t.sort((e, a) => a._id.localeCompare(e._id)));
|
|
148
148
|
const f = await O.readLastClosing(!0), c = f == null ? void 0 : f._id;
|
|
149
|
-
c && (G.value = at(c)),
|
|
149
|
+
c && (G.value = at(c)), w.mustUsePoTemplate && await q.fetchTemplates();
|
|
150
150
|
} catch {
|
|
151
151
|
d.open({
|
|
152
152
|
title: "Something went wrong",
|
|
@@ -160,7 +160,7 @@ function Br(m, _) {
|
|
|
160
160
|
async function W() {
|
|
161
161
|
g.value = [], $.value = !0;
|
|
162
162
|
try {
|
|
163
|
-
g.value = await
|
|
163
|
+
g.value = await M.readRequests().then((f) => f.reverse());
|
|
164
164
|
} catch {
|
|
165
165
|
d.open({
|
|
166
166
|
title: "Something went wrong",
|
|
@@ -179,7 +179,7 @@ function Br(m, _) {
|
|
|
179
179
|
return W();
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Re(f, c) {
|
|
183
183
|
p.value = {
|
|
184
184
|
startDate: f,
|
|
185
185
|
endDate: c
|
|
@@ -209,11 +209,11 @@ function Br(m, _) {
|
|
|
209
209
|
Z.value.show = A;
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
if (Z.value = a, !(c || f.status !==
|
|
212
|
+
if (Z.value = a, !(c || f.status !== F.enum.REQUESTING)) {
|
|
213
213
|
try {
|
|
214
|
-
c = (await
|
|
214
|
+
c = (await M.readRequests(
|
|
215
215
|
`${f.supplier.internal}_${f.supplier._id}`
|
|
216
|
-
)).find((
|
|
216
|
+
)).find((U) => U.purchaseOrderId === f._id);
|
|
217
217
|
} catch {
|
|
218
218
|
console.error("Error at fetching po request to check");
|
|
219
219
|
}
|
|
@@ -223,14 +223,14 @@ function Br(m, _) {
|
|
|
223
223
|
async function ne(f, c, t, e) {
|
|
224
224
|
$.value = !0;
|
|
225
225
|
try {
|
|
226
|
-
await
|
|
226
|
+
await M.processPurchaseOrder(
|
|
227
227
|
{
|
|
228
228
|
operation: c,
|
|
229
229
|
doc: f,
|
|
230
230
|
options: (
|
|
231
231
|
// auto receive for supplier to warehouse
|
|
232
|
-
(c ===
|
|
233
|
-
c ===
|
|
232
|
+
(c === R.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
233
|
+
c === R.enum.completeReceive) && w.autoReceiveWarehouse ? {
|
|
234
234
|
autoReceive: !0
|
|
235
235
|
} : void 0
|
|
236
236
|
)
|
|
@@ -238,7 +238,7 @@ function Br(m, _) {
|
|
|
238
238
|
e
|
|
239
239
|
), await new Promise((P) => setTimeout(P, 1e3));
|
|
240
240
|
const o = be().currentLocationDBName.startsWith("restaurant_");
|
|
241
|
-
c ===
|
|
241
|
+
c === R.enum.confirmDraft && f.effectiveAt && o ? d.open({
|
|
242
242
|
title: "Success",
|
|
243
243
|
message: `${t}. The backdate will be reflected once your POS has received this change.`,
|
|
244
244
|
type: "success"
|
|
@@ -257,7 +257,7 @@ function Br(m, _) {
|
|
|
257
257
|
$.value = !1, ae();
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
async function
|
|
260
|
+
async function we(f, c, t) {
|
|
261
261
|
const e = Qe[c];
|
|
262
262
|
if (!e) {
|
|
263
263
|
d.open({
|
|
@@ -279,7 +279,7 @@ function Br(m, _) {
|
|
|
279
279
|
return {
|
|
280
280
|
purchaseOrders: i,
|
|
281
281
|
purchaseRequests: g,
|
|
282
|
-
updateDateRange:
|
|
282
|
+
updateDateRange: Re,
|
|
283
283
|
fetchData: ae,
|
|
284
284
|
loading: $,
|
|
285
285
|
transferDialogProps: me,
|
|
@@ -287,22 +287,22 @@ function Br(m, _) {
|
|
|
287
287
|
promptUpdateTransferDialog: ie,
|
|
288
288
|
transferDetailsProps: Z,
|
|
289
289
|
promptShowTransferDetails: X,
|
|
290
|
-
submitAction:
|
|
290
|
+
submitAction: we
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
function dt(m, _) {
|
|
294
294
|
return _.reduce(
|
|
295
|
-
(s,
|
|
296
|
-
const S =
|
|
295
|
+
(s, w) => {
|
|
296
|
+
const S = w.received.find((q) => q.sku._id === m._id);
|
|
297
297
|
return S && (s = Oe(s, S.amount)), s;
|
|
298
298
|
},
|
|
299
299
|
it.toPrecision(he(0), m.unit.precision)
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
302
|
function mt(m, _) {
|
|
303
|
-
const { name: u, address: s, regNo:
|
|
303
|
+
const { name: u, address: s, regNo: w } = _.doc.profile, S = {
|
|
304
304
|
name: u,
|
|
305
|
-
registrationNumber:
|
|
305
|
+
registrationNumber: w,
|
|
306
306
|
line1: s == null ? void 0 : s.line1,
|
|
307
307
|
line2: s == null ? void 0 : s.line2,
|
|
308
308
|
postcode: s == null ? void 0 : s.postcode,
|
|
@@ -343,7 +343,7 @@ function mt(m, _) {
|
|
|
343
343
|
unit: ((g = h.measurement) == null ? void 0 : g.abbrev) || h.sku.unit.abbrev
|
|
344
344
|
};
|
|
345
345
|
})
|
|
346
|
-
})),
|
|
346
|
+
})), M = {
|
|
347
347
|
orderNumber: m.seqNumber.toString(),
|
|
348
348
|
createdAt: ge(m._id),
|
|
349
349
|
ref: m.ref || "",
|
|
@@ -354,72 +354,72 @@ function mt(m, _) {
|
|
|
354
354
|
status: m.status,
|
|
355
355
|
deliveryOrders: d
|
|
356
356
|
}, i = new URL(window.location.href);
|
|
357
|
-
i.pathname = i.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", i.searchParams.append("data", JSON.stringify(
|
|
357
|
+
i.pathname = i.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", i.searchParams.append("data", JSON.stringify(M)), window.open(i.href, "_blank", "noreferrer");
|
|
358
358
|
}
|
|
359
359
|
const oe = {
|
|
360
360
|
submitRequest: {
|
|
361
361
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
362
362
|
color: "text-fm-color-typo-primary",
|
|
363
|
-
value:
|
|
363
|
+
value: R.enum.submitRequest
|
|
364
364
|
},
|
|
365
365
|
confirmDraft: {
|
|
366
366
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
367
367
|
color: "text-fm-color-typo-primary",
|
|
368
|
-
value:
|
|
368
|
+
value: R.enum.confirmDraft
|
|
369
369
|
},
|
|
370
370
|
cancelDraft: {
|
|
371
371
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
372
372
|
color: "text-fm-color-typo-error",
|
|
373
|
-
value:
|
|
373
|
+
value: R.enum.cancelDraft
|
|
374
374
|
},
|
|
375
375
|
approveRequest: {
|
|
376
376
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
377
377
|
color: "text-fm-color-typo-primary",
|
|
378
|
-
value:
|
|
378
|
+
value: R.enum.approveRequest
|
|
379
379
|
},
|
|
380
380
|
rejectRequest: {
|
|
381
381
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
382
382
|
color: "text-fm-color-typo-error",
|
|
383
|
-
value:
|
|
383
|
+
value: R.enum.rejectRequest
|
|
384
384
|
},
|
|
385
385
|
processRequest: {
|
|
386
386
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
387
387
|
color: "text-fm-color-typo-primary",
|
|
388
|
-
value:
|
|
388
|
+
value: R.enum.processRequest
|
|
389
389
|
},
|
|
390
390
|
receiveStock: {
|
|
391
391
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
392
392
|
color: "text-fm-color-typo-primary",
|
|
393
|
-
value:
|
|
393
|
+
value: R.enum.receiveStock
|
|
394
394
|
},
|
|
395
395
|
completeReceive: {
|
|
396
396
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
397
397
|
color: "text-fm-color-typo-primary",
|
|
398
|
-
value:
|
|
398
|
+
value: R.enum.completeReceive
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
function Kr(m, _) {
|
|
402
402
|
const u = be(), { t: s } = ze();
|
|
403
|
-
function
|
|
403
|
+
function w(i) {
|
|
404
404
|
switch (i.status) {
|
|
405
405
|
case "DRAFT":
|
|
406
406
|
return [
|
|
407
407
|
j[I.Update],
|
|
408
408
|
j[I.Details],
|
|
409
|
-
i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? oe[
|
|
410
|
-
oe[
|
|
409
|
+
i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? oe[R.enum.submitRequest] : oe[R.enum.confirmDraft],
|
|
410
|
+
oe[R.enum.cancelDraft],
|
|
411
411
|
j[I.Print]
|
|
412
412
|
];
|
|
413
413
|
case "RECEIVING":
|
|
414
414
|
return [
|
|
415
|
-
oe[
|
|
415
|
+
oe[R.enum.completeReceive],
|
|
416
416
|
j[I.Details],
|
|
417
417
|
j[I.Print]
|
|
418
418
|
];
|
|
419
419
|
case "REQUESTING":
|
|
420
420
|
return m === "receive/request" ? [j[I.Details], j[I.Print]] : [
|
|
421
|
-
oe[
|
|
422
|
-
oe[
|
|
421
|
+
oe[R.enum.approveRequest],
|
|
422
|
+
oe[R.enum.rejectRequest],
|
|
423
423
|
j[I.Details],
|
|
424
424
|
j[I.Print]
|
|
425
425
|
];
|
|
@@ -432,7 +432,7 @@ function Kr(m, _) {
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
function S(i) {
|
|
435
|
-
return Object.values(
|
|
435
|
+
return Object.values(R.enum).includes(i);
|
|
436
436
|
}
|
|
437
437
|
async function q(i, p, h) {
|
|
438
438
|
var O, G;
|
|
@@ -516,7 +516,7 @@ function Kr(m, _) {
|
|
|
516
516
|
{
|
|
517
517
|
id: "action",
|
|
518
518
|
cell(i) {
|
|
519
|
-
const p = i.row.original, h =
|
|
519
|
+
const p = i.row.original, h = w(p);
|
|
520
520
|
return Me(h, (g) => q(g, p));
|
|
521
521
|
},
|
|
522
522
|
enableSorting: !1,
|
|
@@ -586,7 +586,7 @@ function Kr(m, _) {
|
|
|
586
586
|
{
|
|
587
587
|
id: "action",
|
|
588
588
|
cell(i) {
|
|
589
|
-
const p = i.row.original, h = p.purchaseOrder ?
|
|
589
|
+
const p = i.row.original, h = p.purchaseOrder ? w(p.purchaseOrder) : [];
|
|
590
590
|
return Me(
|
|
591
591
|
h,
|
|
592
592
|
(g) => p.purchaseOrder ? q(g, p.purchaseOrder, p) : void 0
|
|
@@ -601,26 +601,26 @@ function Kr(m, _) {
|
|
|
601
601
|
}
|
|
602
602
|
];
|
|
603
603
|
}
|
|
604
|
-
const
|
|
604
|
+
const M = V(() => m === "receive/request" ? $() : d());
|
|
605
605
|
return {
|
|
606
606
|
get columnDefs() {
|
|
607
|
-
return
|
|
607
|
+
return M.value;
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
612
612
|
key: 0,
|
|
613
613
|
class: "flex flex-row-reverse"
|
|
614
|
-
}, vt = { class: "flex justify-between" }, yt = { class: "fm-typo-en-body-lg-600" }, ht = { class: "flex flex-col gap-8" }, bt = { class: "flex flex-col gap-4" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex gap-1" }, _t = { class: "fm-typo-en-body-lg-600" },
|
|
614
|
+
}, vt = { class: "flex justify-between" }, yt = { class: "fm-typo-en-body-lg-600" }, ht = { class: "flex flex-col gap-8" }, bt = { class: "flex flex-col gap-4" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "flex gap-1" }, _t = { class: "fm-typo-en-body-lg-600" }, Rt = {
|
|
615
615
|
key: 0,
|
|
616
616
|
class: "flex flex-col gap-4"
|
|
617
|
-
},
|
|
617
|
+
}, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "flex flex-col gap-4" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, At = { class: "fm-typo-en-body-lg-600" }, xt = {
|
|
618
618
|
key: 1,
|
|
619
619
|
class: "flex flex-col gap-4"
|
|
620
620
|
}, Nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, Pt = {
|
|
621
621
|
key: 2,
|
|
622
622
|
class: "flex flex-col gap-4"
|
|
623
|
-
},
|
|
623
|
+
}, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "fm-typo-en-body-lg-600" }, Et = {
|
|
624
624
|
key: 3,
|
|
625
625
|
class: "flex flex-col gap-4"
|
|
626
626
|
}, $t = { class: "fm-typo-en-body-lg-600" }, It = {
|
|
@@ -659,7 +659,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
659
659
|
}, Sr = { class: "flex-1 flex flex-col items-center" }, _r = {
|
|
660
660
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
661
661
|
name: "delivery details"
|
|
662
|
-
},
|
|
662
|
+
}, Rr = { class: "flex flex-col gap-8" }, wr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Or = { class: "flex flex-col gap-4" }, Dr = { class: "flex gap-8 xs:flex-col" }, Vr = /* @__PURE__ */ We({
|
|
663
663
|
__name: "TransferDetails",
|
|
664
664
|
props: {
|
|
665
665
|
poRequest: {},
|
|
@@ -672,14 +672,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
672
672
|
},
|
|
673
673
|
emits: ["update:show", "submitted"],
|
|
674
674
|
setup(m, { emit: _ }) {
|
|
675
|
-
const u = m, s = _,
|
|
675
|
+
const u = m, s = _, w = Ke(), S = Ve(), q = ut(), $ = Ge(), { t: d } = ze(), M = V(
|
|
676
676
|
() => {
|
|
677
677
|
var t, e, a, o;
|
|
678
678
|
return ((e = (t = u.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : e.internal) === "restaurant" || ((o = (a = u.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : o.internal) === "warehouse" ? se.TRANSFER : se.PURCHASE;
|
|
679
679
|
}
|
|
680
680
|
), i = V(() => {
|
|
681
681
|
var t, e, a;
|
|
682
|
-
return
|
|
682
|
+
return M.value === se.TRANSFER && ((t = u.transferToDbName) == null ? void 0 : t.startsWith("restaurant")) && ((a = (e = u.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : a.internal) === "restaurant";
|
|
683
683
|
}), p = [
|
|
684
684
|
{
|
|
685
685
|
label: d("inventory.transfer.receiveRequest.details.overview"),
|
|
@@ -699,8 +699,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
699
699
|
doc: t,
|
|
700
700
|
options: (
|
|
701
701
|
// auto receive for supplier to warehouse
|
|
702
|
-
(e ===
|
|
703
|
-
e ===
|
|
702
|
+
(e === R.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
703
|
+
e === R.enum.completeReceive) && $.autoReceiveWarehouse ? {
|
|
704
704
|
autoReceive: !0
|
|
705
705
|
} : void 0
|
|
706
706
|
)
|
|
@@ -732,7 +732,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
734
|
const { successMessage: a, ...o } = e;
|
|
735
|
-
|
|
735
|
+
w.open({
|
|
736
736
|
title: o.title,
|
|
737
737
|
message: o.message,
|
|
738
738
|
primaryActions: o.primaryActions
|
|
@@ -742,8 +742,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
742
742
|
}
|
|
743
743
|
const ae = V(() => {
|
|
744
744
|
var t, e;
|
|
745
|
-
return ((t = u.purchaseOrder) == null ? void 0 : t.status) ===
|
|
746
|
-
}),
|
|
745
|
+
return ((t = u.purchaseOrder) == null ? void 0 : t.status) === F.enum.RECEIVING || ((e = u.purchaseOrder) == null ? void 0 : e.status) === F.enum.COMPLETE;
|
|
746
|
+
}), Re = V(
|
|
747
747
|
() => {
|
|
748
748
|
var t, e, a, o, P, A;
|
|
749
749
|
return q.getLocationSubsidiary(
|
|
@@ -752,12 +752,12 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
752
752
|
}
|
|
753
753
|
), Z = V(() => {
|
|
754
754
|
var t, e, a, o, P, A;
|
|
755
|
-
return (e = (t = u.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && e.length && ((o = (a = u.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) == null ? void 0 : o.length) > 0 ? (A = (P = u.purchaseOrder) == null ? void 0 : P.deliveryFullfillment) == null ? void 0 : A.map((
|
|
755
|
+
return (e = (t = u.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && e.length && ((o = (a = u.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) == null ? void 0 : o.length) > 0 ? (A = (P = u.purchaseOrder) == null ? void 0 : P.deliveryFullfillment) == null ? void 0 : A.map((U) => {
|
|
756
756
|
var l;
|
|
757
|
-
return (l =
|
|
757
|
+
return (l = U.netSuite) == null ? void 0 : l.refNo;
|
|
758
758
|
}).join(", ") : "-";
|
|
759
759
|
}), fe = V(() => {
|
|
760
|
-
var A,
|
|
760
|
+
var A, U, l;
|
|
761
761
|
const a = (((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? []).flatMap((x) => x.received ?? []).reduce(
|
|
762
762
|
(x, L) => {
|
|
763
763
|
const K = x[L.sku._id] ?? [];
|
|
@@ -766,23 +766,23 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
766
766
|
{}
|
|
767
767
|
), o = Object.entries(a).reduce(
|
|
768
768
|
(x, [L, K]) => {
|
|
769
|
-
const k = K.reduce((b,
|
|
770
|
-
const
|
|
769
|
+
const k = K.reduce((b, T) => {
|
|
770
|
+
const C = lt(
|
|
771
771
|
b,
|
|
772
|
-
Math.max(b.precision,
|
|
772
|
+
Math.max(b.precision, T.amount.precision)
|
|
773
773
|
);
|
|
774
|
-
return Oe(
|
|
774
|
+
return Oe(C, T.amount);
|
|
775
775
|
}, he(0));
|
|
776
776
|
return x[L] = k, x;
|
|
777
777
|
},
|
|
778
778
|
{}
|
|
779
|
-
), P = ((
|
|
779
|
+
), P = ((U = u.purchaseOrder) == null ? void 0 : U.items) ?? [];
|
|
780
780
|
for (const x of P)
|
|
781
781
|
o[l = x.sku._id] ?? (o[l] = he(0));
|
|
782
782
|
return o;
|
|
783
783
|
}), X = V(() => {
|
|
784
|
-
var A,
|
|
785
|
-
const t = ((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? [], e = ((
|
|
784
|
+
var A, U;
|
|
785
|
+
const t = ((A = u.purchaseOrder) == null ? void 0 : A.deliveryOrder) ?? [], e = ((U = u.purchaseOrder) == null ? void 0 : U.deliveryFullfillment) ?? [], a = [
|
|
786
786
|
...t.map((l) => ({
|
|
787
787
|
createdAt: l.createdAt,
|
|
788
788
|
type: "grn",
|
|
@@ -796,7 +796,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
796
796
|
];
|
|
797
797
|
a.reverse().sort((l, x) => l.createdAt.localeCompare(x.createdAt));
|
|
798
798
|
function o(l) {
|
|
799
|
-
var L, K, k, b,
|
|
799
|
+
var L, K, k, b, T, C, H;
|
|
800
800
|
const x = e.findIndex((E) => E.id === l.fullfillmentId);
|
|
801
801
|
return {
|
|
802
802
|
header: "Received",
|
|
@@ -827,9 +827,9 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
827
827
|
} : null,
|
|
828
828
|
(k = (K = e[x]) == null ? void 0 : K.netSuite) != null && k.refNo ? {
|
|
829
829
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
830
|
-
values: [(
|
|
830
|
+
values: [(T = (b = e[x]) == null ? void 0 : b.netSuite) == null ? void 0 : T.refNo]
|
|
831
831
|
} : null,
|
|
832
|
-
(
|
|
832
|
+
(C = l == null ? void 0 : l.netSuite) != null && C.refNo ? {
|
|
833
833
|
label: "Item receipt (Netsuite)",
|
|
834
834
|
values: [(H = l == null ? void 0 : l.netSuite) == null ? void 0 : H.refNo]
|
|
835
835
|
} : null
|
|
@@ -869,15 +869,15 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
869
869
|
return P(l.doc);
|
|
870
870
|
}
|
|
871
871
|
});
|
|
872
|
-
}), ne = B(!1),
|
|
873
|
-
var o, P, A,
|
|
872
|
+
}), ne = B(!1), we = V(() => {
|
|
873
|
+
var o, P, A, U;
|
|
874
874
|
let t = !0;
|
|
875
875
|
q.isEnabled || (t = !1);
|
|
876
876
|
const e = u.purchaseOrder, a = u.poRequest;
|
|
877
|
-
return e && ((o = e == null ? void 0 : e.supplier) != null && o.internal ? (a && ((P = a == null ? void 0 : a.netSuite) != null && P.id
|
|
877
|
+
return e && ((o = e == null ? void 0 : e.supplier) != null && o.internal ? (!a && e.status == F.enum.DRAFT && (t = !1), a && !((P = a == null ? void 0 : a.netSuite) != null && P.id) && (t = !1), i.value && (t = !1)) : ((e == null ? void 0 : e.status) !== F.enum.REQUESTING && e.supplier.internal && (t = !1), !a && !((A = e == null ? void 0 : e.netSuite) != null && A.id) && (t = !1), !a && ((U = e == null ? void 0 : e.netSuite) != null && U.id) && (e == null ? void 0 : e.status) == F.enum.REQUESTING && (t = !1))), t;
|
|
878
878
|
});
|
|
879
879
|
async function f() {
|
|
880
|
-
ne.value ||
|
|
880
|
+
ne.value || w.open({
|
|
881
881
|
title: "Sync with NetSuite",
|
|
882
882
|
contentComponent: ee("div", [
|
|
883
883
|
ee("p", "Are you sure you want to sync now?"),
|
|
@@ -938,7 +938,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
938
938
|
});
|
|
939
939
|
return (t, e) => {
|
|
940
940
|
var L, K;
|
|
941
|
-
const a = te("FmButton"), o = te("FmButtonGroup"), P = te("FmChip"), A = te("FmMenuDivider"),
|
|
941
|
+
const a = te("FmButton"), o = te("FmButtonGroup"), P = te("FmChip"), A = te("FmMenuDivider"), U = te("FmCard"), l = te("FmSpacer"), x = te("FmSideSheet");
|
|
942
942
|
return y(), J(x, {
|
|
943
943
|
header: n(d)("inventory.transfer.receiveRequest.details.title") + ((L = t.purchaseOrder) != null && L.seqNumber ? ` #${(K = t.purchaseOrder) == null ? void 0 : K.seqNumber}` : ""),
|
|
944
944
|
modelValue: n(ie),
|
|
@@ -951,7 +951,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
951
951
|
var k;
|
|
952
952
|
return [
|
|
953
953
|
r("div", ft, [
|
|
954
|
-
|
|
954
|
+
we.value ? (y(), D("div", pt, [
|
|
955
955
|
Q(a, {
|
|
956
956
|
"prepend-icon": "sync",
|
|
957
957
|
variant: "primary",
|
|
@@ -969,19 +969,19 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
969
969
|
]),
|
|
970
970
|
h.value.value === "overview" ? (y(), D(re, { key: 1 }, [
|
|
971
971
|
r("div", null, [
|
|
972
|
-
Q(
|
|
972
|
+
Q(U, {
|
|
973
973
|
variant: "outlined",
|
|
974
974
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
975
975
|
}, {
|
|
976
976
|
default: pe(() => {
|
|
977
|
-
var b,
|
|
977
|
+
var b, T, C, H, E, z, ce, ue, de, Y, De, ke, Ae, xe, Ne, qe, Pe, Te, Ce, Ee;
|
|
978
978
|
return [
|
|
979
979
|
r("div", vt, [
|
|
980
980
|
r("div", yt, v(n(d)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
981
981
|
r("div", null, [
|
|
982
982
|
Q(P, {
|
|
983
983
|
label: n(d)(`inventory.transfer.status.${(b = t.purchaseOrder) == null ? void 0 : b.status}`),
|
|
984
|
-
class: ve(`fm-status-badge fm-status-badge-${(
|
|
984
|
+
class: ve(`fm-status-badge fm-status-badge-${(C = (T = t.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : C.toLocaleLowerCase("en-us")}`),
|
|
985
985
|
compact: ""
|
|
986
986
|
}, null, 8, ["label", "class"])
|
|
987
987
|
])
|
|
@@ -994,14 +994,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
994
994
|
]),
|
|
995
995
|
r("div", _t, v(n(ge)(((H = t.purchaseOrder) == null ? void 0 : H._id) ?? "")), 1)
|
|
996
996
|
]),
|
|
997
|
-
(E = t.purchaseOrder) != null && E.effectiveAt ? (y(), D("div",
|
|
998
|
-
r("div",
|
|
997
|
+
(E = t.purchaseOrder) != null && E.effectiveAt ? (y(), D("div", Rt, [
|
|
998
|
+
r("div", wt, v(n(d)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
999
999
|
r("div", Ot, v(n(Be)(new Date((z = t.purchaseOrder) == null ? void 0 : z.effectiveAt))), 1)
|
|
1000
1000
|
])) : N("", !0),
|
|
1001
1001
|
r("div", Dt, [
|
|
1002
1002
|
r("div", kt, v(n(d)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1003
1003
|
r("div", At, v(n(d)(
|
|
1004
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
1004
|
+
`inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
|
|
1005
1005
|
)), 1)
|
|
1006
1006
|
]),
|
|
1007
1007
|
(ue = (ce = t.purchaseOrder) == null ? void 0 : ce.supplier) != null && ue.name ? (y(), D("div", xt, [
|
|
@@ -1009,22 +1009,22 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1009
1009
|
r("div", qt, v((Y = (de = t.purchaseOrder) == null ? void 0 : de.supplier) == null ? void 0 : Y.name), 1)
|
|
1010
1010
|
])) : N("", !0),
|
|
1011
1011
|
t.transferTo ? (y(), D("div", Pt, [
|
|
1012
|
-
r("div",
|
|
1013
|
-
r("div",
|
|
1012
|
+
r("div", Tt, v(n(d)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1013
|
+
r("div", Ct, v(t.transferTo), 1)
|
|
1014
1014
|
])) : N("", !0),
|
|
1015
1015
|
n(q).isEnabled ? (y(), D("div", Et, [
|
|
1016
1016
|
e[10] || (e[10] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite subsidiary ", -1)),
|
|
1017
|
-
r("div", $t, v(
|
|
1017
|
+
r("div", $t, v(Re.value || "-"), 1)
|
|
1018
1018
|
])) : N("", !0),
|
|
1019
1019
|
n(q).isEnabled && !i.value ? (y(), D("div", It, [
|
|
1020
|
-
r("div", Ft, " NetSuite " + v(
|
|
1021
|
-
r("div", Mt, v(t.poRequest ? (ke = (De = t.poRequest) == null ? void 0 : De.netSuite) == null ? void 0 : ke.refNo : (xe = (Ae = t.purchaseOrder) == null ? void 0 : Ae.netSuite) == null ? void 0 : xe.refNo) + " (" + v(t.poRequest ? (qe = (Ne = t.poRequest) == null ? void 0 : Ne.netSuite) == null ? void 0 : qe.id : (
|
|
1020
|
+
r("div", Ft, " NetSuite " + v(M.value === n(se).PURCHASE ? "Purchase order" : "Transfer order") + " (ID) ", 1),
|
|
1021
|
+
r("div", Mt, v(t.poRequest ? (ke = (De = t.poRequest) == null ? void 0 : De.netSuite) == null ? void 0 : ke.refNo : (xe = (Ae = t.purchaseOrder) == null ? void 0 : Ae.netSuite) == null ? void 0 : xe.refNo) + " (" + v(t.poRequest ? (qe = (Ne = t.poRequest) == null ? void 0 : Ne.netSuite) == null ? void 0 : qe.id : (Te = (Pe = t.purchaseOrder) == null ? void 0 : Pe.netSuite) == null ? void 0 : Te.id) + ") ", 1)
|
|
1022
1022
|
])) : N("", !0),
|
|
1023
|
-
n(q).isEnabled &&
|
|
1023
|
+
n(q).isEnabled && M.value === n(se).TRANSFER && !i.value ? (y(), D("div", Ut, [
|
|
1024
1024
|
e[11] || (e[11] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1025
1025
|
r("div", Lt, v(Z.value), 1)
|
|
1026
1026
|
])) : N("", !0),
|
|
1027
|
-
(
|
|
1027
|
+
(Ce = t.purchaseOrder) != null && Ce.ref ? (y(), D("div", jt, [
|
|
1028
1028
|
r("div", Bt, v(n(d)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1029
1029
|
r("div", Kt, v(t.purchaseOrder.ref), 1)
|
|
1030
1030
|
])) : N("", !0),
|
|
@@ -1068,15 +1068,15 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1068
1068
|
], 64)) : N("", !0),
|
|
1069
1069
|
h.value.value === "deliveryHistory" ? (y(), D("div", nr, [
|
|
1070
1070
|
X.value.length ? (y(), D("div", ur, [
|
|
1071
|
-
(y(!0), D(re, null, ye(X.value, (b,
|
|
1071
|
+
(y(!0), D(re, null, ye(X.value, (b, T) => (y(), D(re, { key: T }, [
|
|
1072
1072
|
r("div", dr, [
|
|
1073
1073
|
r("div", mr, [
|
|
1074
1074
|
r("div", fr, [
|
|
1075
1075
|
r("div", {
|
|
1076
1076
|
class: ve([
|
|
1077
1077
|
{
|
|
1078
|
-
"bg-fm-color-primary":
|
|
1079
|
-
"bg-white":
|
|
1078
|
+
"bg-fm-color-primary": T !== 0,
|
|
1079
|
+
"bg-white": T === 0
|
|
1080
1080
|
},
|
|
1081
1081
|
"w-[2px] h-full"
|
|
1082
1082
|
])
|
|
@@ -1087,8 +1087,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1087
1087
|
r("div", {
|
|
1088
1088
|
class: ve([
|
|
1089
1089
|
{
|
|
1090
|
-
"bg-fm-color-primary":
|
|
1091
|
-
"bg-white":
|
|
1090
|
+
"bg-fm-color-primary": T < X.value.length - 1,
|
|
1091
|
+
"bg-white": T >= X.value.length - 1
|
|
1092
1092
|
},
|
|
1093
1093
|
"w-[2px] h-full"
|
|
1094
1094
|
])
|
|
@@ -1106,8 +1106,8 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1106
1106
|
r("div", {
|
|
1107
1107
|
class: ve([
|
|
1108
1108
|
{
|
|
1109
|
-
"bg-fm-color-primary":
|
|
1110
|
-
"bg-white":
|
|
1109
|
+
"bg-fm-color-primary": T < X.value.length - 1,
|
|
1110
|
+
"bg-white": T >= X.value.length - 1
|
|
1111
1111
|
},
|
|
1112
1112
|
"w-[2px] h-full"
|
|
1113
1113
|
])
|
|
@@ -1115,19 +1115,19 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1115
1115
|
])
|
|
1116
1116
|
]),
|
|
1117
1117
|
r("div", _r, [
|
|
1118
|
-
Q(
|
|
1118
|
+
Q(U, {
|
|
1119
1119
|
variant: "outlined",
|
|
1120
1120
|
class: "py-12 px-16"
|
|
1121
1121
|
}, {
|
|
1122
1122
|
default: pe(() => [
|
|
1123
|
-
r("div",
|
|
1124
|
-
(y(!0), D(re, null, ye(b.info, (
|
|
1123
|
+
r("div", Rr, [
|
|
1124
|
+
(y(!0), D(re, null, ye(b.info, (C, H) => (y(), D("div", {
|
|
1125
1125
|
key: H,
|
|
1126
1126
|
class: "flex flex-col gap-4"
|
|
1127
1127
|
}, [
|
|
1128
|
-
r("div",
|
|
1128
|
+
r("div", wr, v(C == null ? void 0 : C.label), 1),
|
|
1129
1129
|
r("div", Or, [
|
|
1130
|
-
(y(!0), D(re, null, ye(
|
|
1130
|
+
(y(!0), D(re, null, ye(C == null ? void 0 : C.values, (E, z) => (y(), D("div", {
|
|
1131
1131
|
key: z,
|
|
1132
1132
|
class: "fm-typo-en-body-lg-600"
|
|
1133
1133
|
}, v(E), 1))), 128))
|
|
@@ -1158,24 +1158,24 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1158
1158
|
];
|
|
1159
1159
|
}),
|
|
1160
1160
|
"side-sheet-footer": pe(() => {
|
|
1161
|
-
var k, b,
|
|
1161
|
+
var k, b, T, C, H, E, z, ce, ue, de;
|
|
1162
1162
|
return [
|
|
1163
1163
|
r("div", Dr, [
|
|
1164
|
-
((k = t.purchaseOrder) == null ? void 0 : k.status) === n(
|
|
1164
|
+
((k = t.purchaseOrder) == null ? void 0 : k.status) === n(F).enum.DRAFT && M.value === n(se).PURCHASE ? (y(), J(a, {
|
|
1165
1165
|
key: 0,
|
|
1166
1166
|
label: n(d)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
1167
1167
|
onClick: e[1] || (e[1] = (Y) => W("confirmDraft")),
|
|
1168
1168
|
loading: O.value === "confirmDraft",
|
|
1169
1169
|
disabled: O.value !== "confirmDraft" && g.value
|
|
1170
1170
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1171
|
-
((b = t.purchaseOrder) == null ? void 0 : b.status) === n(
|
|
1171
|
+
((b = t.purchaseOrder) == null ? void 0 : b.status) === n(F).enum.DRAFT && M.value === n(se).TRANSFER ? (y(), J(a, {
|
|
1172
1172
|
key: 1,
|
|
1173
1173
|
label: n(d)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
1174
1174
|
onClick: e[2] || (e[2] = (Y) => W("submitRequest")),
|
|
1175
1175
|
loading: O.value === "submitRequest",
|
|
1176
1176
|
disabled: O.value !== "submitRequest" && g.value
|
|
1177
1177
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1178
|
-
((
|
|
1178
|
+
((T = t.purchaseOrder) == null ? void 0 : T.status) === n(F).enum.DRAFT ? (y(), J(a, {
|
|
1179
1179
|
key: 2,
|
|
1180
1180
|
label: n(d)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
1181
1181
|
onClick: e[3] || (e[3] = (Y) => W("cancelDraft")),
|
|
@@ -1183,7 +1183,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1183
1183
|
disabled: O.value !== "cancelDraft" && g.value,
|
|
1184
1184
|
variant: "destructive"
|
|
1185
1185
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1186
|
-
((
|
|
1186
|
+
((C = t.purchaseOrder) == null ? void 0 : C.status) === n(F).enum.RECEIVING ? (y(), J(a, {
|
|
1187
1187
|
key: 3,
|
|
1188
1188
|
label: n(d)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1189
1189
|
onClick: e[4] || (e[4] = (Y) => W("completeReceive")),
|
|
@@ -1197,14 +1197,14 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1197
1197
|
loading: O.value === "submitRequest",
|
|
1198
1198
|
disabled: O.value !== "submitRequest" && g.value
|
|
1199
1199
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1200
|
-
(((H = t.purchaseOrder) == null ? void 0 : H.status) === n(
|
|
1200
|
+
(((H = t.purchaseOrder) == null ? void 0 : H.status) === n(F).enum.REQUESTING || ((E = t.purchaseOrder) == null ? void 0 : E.status) === n(F).enum.PROCESSING) && t.canApprove ? (y(), J(a, {
|
|
1201
1201
|
key: 5,
|
|
1202
1202
|
label: n(d)("inventory.transfer.approval.actions.approveRequest"),
|
|
1203
1203
|
onClick: e[6] || (e[6] = (Y) => W("approveRequest")),
|
|
1204
1204
|
loading: O.value === "approveRequest",
|
|
1205
1205
|
disabled: O.value !== "approveRequest" && g.value
|
|
1206
1206
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1207
|
-
((z = t.purchaseOrder) == null ? void 0 : z.status) === n(
|
|
1207
|
+
((z = t.purchaseOrder) == null ? void 0 : z.status) === n(F).enum.REQUESTING && t.canApprove ? (y(), J(a, {
|
|
1208
1208
|
key: 6,
|
|
1209
1209
|
label: n(d)("inventory.transfer.approval.actions.rejectRequest"),
|
|
1210
1210
|
onClick: e[7] || (e[7] = (Y) => W("rejectRequest")),
|
|
@@ -1212,7 +1212,7 @@ const ft = { class: "flex flex-col gap-16 w-full h-full" }, pt = {
|
|
|
1212
1212
|
disabled: O.value !== "rejectRequest" && g.value,
|
|
1213
1213
|
variant: "destructive"
|
|
1214
1214
|
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1215
|
-
((ce = t.purchaseOrder) == null ? void 0 : ce.status) !== n(
|
|
1215
|
+
((ce = t.purchaseOrder) == null ? void 0 : ce.status) !== n(F).enum.COMPLETE && ((ue = t.purchaseOrder) == null ? void 0 : ue.status) !== n(F).enum.CANCEL && (((de = t.purchaseOrder) == null ? void 0 : de.status) !== n(F).enum.REQUESTING || t.canApprove) ? (y(), J(a, {
|
|
1216
1216
|
key: 7,
|
|
1217
1217
|
label: n(d)("common.close"),
|
|
1218
1218
|
variant: "tertiary",
|