@feedmepos/mf-inventory-portal 1.2.12 → 1.2.13
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-CP0Qx_82.js → App-ZoXow3DD.js} +1 -1
- package/dist/{ApprovalView-D8_PzEpZ.js → ApprovalView-BWX6xBQs.js} +2 -2
- package/dist/{BindingsDialog-BbpKhb0L.js → BindingsDialog-CuwkcDKX.js} +2 -2
- package/dist/{BindingsPicker-DzDxisHj.js → BindingsPicker-BibFsY0g.js} +1 -1
- package/dist/{BindingsTable-DCXXSY8e.js → BindingsTable-AdjKwSPH.js} +1 -1
- package/dist/{ClosingDraftView-CkF-9An8.js → ClosingDraftView-DWFHP9nE.js} +2 -2
- package/dist/{ClosingTemplateView-Ce1l7n0x.js → ClosingTemplateView-DOCF5f_u.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-CFzsECiK.js → DeliveryOrderPrintPreview-DNDtL_Vo.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ZSERZzyn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BWhINOE8.js} +3 -3
- package/dist/{FmMultiselectDialog-DP992D0Q.js → FmMultiselectDialog-Dfo04ak5.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CzUvuj_c.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DGVs4zLl.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DsYwSn0d.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BESx2u4Y.js} +1 -1
- package/dist/{IngredientGroupView-DUiKKpvF.js → IngredientGroupView-M9sXlnE0.js} +2 -2
- package/dist/{IngredientsView-C3ozIXV8.js → IngredientsView-DUwhH3j1.js} +7 -7
- package/dist/{IntegrationView-CydpIwrf.js → IntegrationView-BlUNz1yc.js} +3 -3
- package/dist/{InventoryBindingForm-BVd2FzOW.js → InventoryBindingForm-CvQ5zh6v.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYp_JSBb.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BEAEmPsU.js} +3 -3
- package/dist/{InventoryBindingSummary-Dthool-6.js → InventoryBindingSummary-CsJ-6G2P.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DR0_Qtyc.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DjN_ktl1.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLfGb7mm.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BN_e7k7U.js} +1 -1
- package/dist/{PublishView-BE_aIhZ6.js → PublishView-DZgCyLK2.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-CGeqqFg-.js → PurchaseOrderPrintPreview-CB2xvQ33.js} +1 -1
- package/dist/{ReceiveRequestView-Bul9Esf1.js → ReceiveRequestView-DgDHOS-Y.js} +8 -8
- package/dist/{RecipeView-B9AGELV7.js → RecipeView-DQDfwCJd.js} +3 -3
- package/dist/{StockView-fpJrx4Bd.js → StockView-eJOngk08.js} +7 -7
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeOEgJ1N.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BMFfegsk.js} +1 -1
- package/dist/{SupplierView-cfZTJqef.js → SupplierView-BS8rBAKC.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-m5o77oG-.js → TransferDetails.vue_vue_type_script_setup_true_lang-w98ibfql.js} +496 -493
- package/dist/{TransferTemplateView-PZ8Mad4D.js → TransferTemplateView-By5Ci4Yg.js} +7 -7
- package/dist/{UnitView-C3gJq1Mt.js → UnitView-DmuWMFlA.js} +3 -3
- package/dist/{WarehouseView-CWGQjwJm.js → WarehouseView-4ZLSJXYc.js} +1 -1
- package/dist/{app-D5PlbdVa.js → app-D2lun71R.js} +209 -209
- package/dist/app.js +1 -1
- package/dist/{closing-template-C4FizLUw.js → closing-template-Cm1TtVzm.js} +1 -1
- package/dist/{decimal-Cv7FZ14q.js → decimal-eeicE4jp.js} +1 -1
- package/dist/{format-unit-display-B0NO6FLh.js → format-unit-display-vHKazw0l.js} +3 -3
- package/dist/{index-BCo2jtpG.js → index-C5s-1g7c.js} +1 -1
- package/dist/{index-DaJ92t7D.js → index-DvX9cMJV.js} +1 -1
- package/dist/{purchase-order-template-DLkR7Mva.js → purchase-order-template-uTs7bR89.js} +1 -1
- package/dist/{stock-AUSAF9Ij.js → stock-CL2LNdXp.js} +1 -1
- package/dist/{supplier-DBXoP2UX.js → supplier-CuzoW2k4.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DZQR6jfi.js → use-ingredient-select-dialog-Cpg4lHHC.js} +1 -1
- package/dist/{use-inventory-binding-dialog-8PZ37vLV.js → use-inventory-binding-dialog-h4M4ICQK.js} +1 -1
- package/package.json +2 -2
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { a8 as mt, u as _e, aW as
|
|
2
|
-
import { ref as Y, computed as H, h as
|
|
3
|
-
import { F as
|
|
1
|
+
import { a8 as mt, u as _e, aW as P, aX as Ge, aG as Q, c as Pe, b as We, ag as xt, ai as wt, aj as $t, aY as Rt, e as it, f as pt, a6 as rt, aZ as kt, ad as ft, a1 as yt, l as ye, ab as Dt, a_ as vt, an as je, h as Fe, i as ct, j as me, D as ve, a$ as ht, b0 as bt, b1 as Ee, X as gt, a9 as Ue, aa as ze, af as Ve, a0 as De, t as ut, aE as Te, b2 as Qe, b3 as ke } from "./app-D2lun71R.js";
|
|
2
|
+
import { ref as Y, computed as H, h as q, defineComponent as Se, reactive as Nt, onMounted as _t, resolveComponent as G, openBlock as f, createBlock as le, withCtx as X, createElementVNode as e, createVNode as I, unref as h, createElementBlock as x, toDisplayString as _, createCommentVNode as M, Fragment as ue, renderList as be, createTextVNode as Ne, normalizeClass as Be, watch as Ct, isRef as At, resolveDynamicComponent as Tt } from "vue";
|
|
3
|
+
import { F as Ft } from "./decimal-eeicE4jp.js";
|
|
4
4
|
import { useCoreStore as Me, useI18n as st } from "@feedmepos/mf-common";
|
|
5
|
-
import { useDialog as Ye, useSnackbar as
|
|
6
|
-
import { a as
|
|
5
|
+
import { useDialog as Ye, useSnackbar as qe, components as Ke, FmButtonVariant as fe, useProxiedModel as Pt } from "@feedmepos/ui-library";
|
|
6
|
+
import { a as qt, u as It, P as Ce, f as Et } from "./format-unit-display-vHKazw0l.js";
|
|
7
7
|
import { E as Lt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
import { _ as Vt, F as Bt, a as Ut } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Vt, F as Bt, a as Ut } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DGVs4zLl.js";
|
|
9
9
|
import { u as Mt, R as dt } from "./usePromise-CbVUCxhj.js";
|
|
10
|
-
import { u as jt } from "./index-
|
|
10
|
+
import { u as jt } from "./index-DvX9cMJV.js";
|
|
11
11
|
const Ie = mt((g, r) => {
|
|
12
12
|
const o = _e(), p = Me();
|
|
13
13
|
return {
|
|
14
|
-
async readRequests(
|
|
15
|
-
const s =
|
|
16
|
-
return n &&
|
|
14
|
+
async readRequests(l, n, a) {
|
|
15
|
+
const s = l ?? o.currentLocationDBName, i = `${g.inventoryBackendUrl}/${s}/purchase-request`;
|
|
16
|
+
return n && a ? await r.get(`${i}?startDate=${n}&endDate=${a}`) : await r.get(i);
|
|
17
17
|
},
|
|
18
|
-
async readRequestById(
|
|
19
|
-
const
|
|
18
|
+
async readRequestById(l, n) {
|
|
19
|
+
const a = n ?? o.currentLocationDBName, s = `${g.inventoryBackendUrl}/${a}/purchase-request/${l}`;
|
|
20
20
|
return await r.get(s);
|
|
21
21
|
},
|
|
22
|
-
async readRequestByIds(
|
|
23
|
-
const
|
|
24
|
-
return await r.post(s, { requestIds:
|
|
22
|
+
async readRequestByIds(l, n) {
|
|
23
|
+
const a = n ?? o.currentLocationDBName, s = `${g.inventoryBackendUrl}/${a}/purchase-request/find`;
|
|
24
|
+
return await r.post(s, { requestIds: l });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
|
-
start:
|
|
27
|
+
start: l,
|
|
28
28
|
end: n
|
|
29
29
|
}) {
|
|
30
|
-
const
|
|
31
|
-
return await r.get(`${s}?start=${
|
|
30
|
+
const a = o.currentLocationDBName, s = `${g.inventoryBackendUrl}/${a}/purchase-order`;
|
|
31
|
+
return await r.get(`${s}?start=${l}&end=${n}`);
|
|
32
32
|
},
|
|
33
|
-
async getLatestPurchaseOrderRequest(
|
|
34
|
-
const n = o.currentLocationDBName,
|
|
35
|
-
return await r.get(`${
|
|
33
|
+
async getLatestPurchaseOrderRequest(l) {
|
|
34
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/purchase-request/find-by-purchase-order-id`;
|
|
35
|
+
return await r.get(`${a}/${l}`);
|
|
36
36
|
},
|
|
37
|
-
async getPurchaseOrderById(
|
|
38
|
-
const n = o.currentLocationDBName,
|
|
39
|
-
return await r.get(`${
|
|
37
|
+
async getPurchaseOrderById(l) {
|
|
38
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/purchase-order`;
|
|
39
|
+
return await r.get(`${a}/${l}`);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
43
43
|
*/
|
|
44
|
-
async processPurchaseOrder(
|
|
45
|
-
const
|
|
46
|
-
return await r.put(i,
|
|
44
|
+
async processPurchaseOrder(l, n) {
|
|
45
|
+
const a = o.currentLocationDBName, s = n || a, i = `${g.inventoryBackendUrl}/${s}/purchase-order/run-operation`;
|
|
46
|
+
return await r.put(i, l);
|
|
47
47
|
},
|
|
48
|
-
async createPurchaseOrder(
|
|
49
|
-
const n = o.currentLocationDBName,
|
|
50
|
-
return await r.post(
|
|
48
|
+
async createPurchaseOrder(l) {
|
|
49
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/purchase-order`;
|
|
50
|
+
return await r.post(a, l);
|
|
51
51
|
},
|
|
52
|
-
async updatePurchaseOrder(
|
|
53
|
-
const n = o.currentLocationDBName,
|
|
54
|
-
return await r.put(
|
|
52
|
+
async updatePurchaseOrder(l) {
|
|
53
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/purchase-order`;
|
|
54
|
+
return await r.put(a, l);
|
|
55
55
|
},
|
|
56
|
-
async importFromXilnex(
|
|
57
|
-
const n = o.currentLocationDBName,
|
|
58
|
-
return await r.post(
|
|
56
|
+
async importFromXilnex(l) {
|
|
57
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/purchase-order/import-from-xilnex`;
|
|
58
|
+
return await r.post(a, l);
|
|
59
59
|
},
|
|
60
|
-
async processPurchaseOrderV2(
|
|
61
|
-
const
|
|
62
|
-
return await r.put(i,
|
|
60
|
+
async processPurchaseOrderV2(l, n) {
|
|
61
|
+
const a = o.currentLocationDBName, s = n || a, i = `${g.inventoryBackendUrl}/${s}/v2/purchase-order/run-operation`;
|
|
62
|
+
return await r.put(i, l);
|
|
63
63
|
},
|
|
64
64
|
async getWorkflowConfig() {
|
|
65
65
|
var s;
|
|
66
|
-
const n = `business_${(s = p.currentBusiness.value) == null ? void 0 : s._id}`,
|
|
67
|
-
return await r.get(
|
|
66
|
+
const n = `business_${(s = p.currentBusiness.value) == null ? void 0 : s._id}`, a = `${g.inventoryBackendUrl}/${n}/v2/purchase-order/workflow-config`;
|
|
67
|
+
return await r.get(a);
|
|
68
68
|
},
|
|
69
|
-
async updateDeliveryOrder(
|
|
70
|
-
const n = o.currentLocationDBName,
|
|
71
|
-
return await r.put(
|
|
69
|
+
async updateDeliveryOrder(l) {
|
|
70
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/delivery-order`;
|
|
71
|
+
return await r.put(a, l);
|
|
72
72
|
},
|
|
73
|
-
async createDeliveryOrder(
|
|
74
|
-
const n = o.currentLocationDBName,
|
|
75
|
-
return await r.post(
|
|
73
|
+
async createDeliveryOrder(l) {
|
|
74
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/delivery-order`;
|
|
75
|
+
return await r.post(a, l);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}), zt = mt((g, r) => {
|
|
@@ -80,20 +80,20 @@ const Ie = mt((g, r) => {
|
|
|
80
80
|
return {
|
|
81
81
|
async getShipments({
|
|
82
82
|
start: p,
|
|
83
|
-
end:
|
|
83
|
+
end: l
|
|
84
84
|
}) {
|
|
85
|
-
const n = o.currentLocationDBName,
|
|
86
|
-
return await r.get(`${
|
|
85
|
+
const n = o.currentLocationDBName, a = `${g.inventoryBackendUrl}/${n}/shipments`;
|
|
86
|
+
return await r.get(`${a}?start=${p}&end=${l}`);
|
|
87
87
|
},
|
|
88
88
|
async getShipmentsByIds(p) {
|
|
89
89
|
if (p.length === 0)
|
|
90
90
|
return [];
|
|
91
|
-
const
|
|
91
|
+
const l = o.currentLocationDBName, n = `${g.inventoryBackendUrl}/${l}/shipments/get`;
|
|
92
92
|
return await r.post(n, { shipmentIds: p });
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}), St = {
|
|
96
|
-
[
|
|
96
|
+
[P.enum.confirmDraft]: {
|
|
97
97
|
primaryActions: {
|
|
98
98
|
text: "Confirm draft",
|
|
99
99
|
close: !0
|
|
@@ -102,7 +102,7 @@ const Ie = mt((g, r) => {
|
|
|
102
102
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
103
103
|
successMessage: "Purchase order draft has been confirmed"
|
|
104
104
|
},
|
|
105
|
-
[
|
|
105
|
+
[P.enum.cancelDraft]: {
|
|
106
106
|
primaryActions: {
|
|
107
107
|
text: "Cancel draft",
|
|
108
108
|
close: !0,
|
|
@@ -112,7 +112,7 @@ const Ie = mt((g, r) => {
|
|
|
112
112
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
113
113
|
successMessage: "Purchase order draft has been cancelled"
|
|
114
114
|
},
|
|
115
|
-
[
|
|
115
|
+
[P.enum.submitRequest]: {
|
|
116
116
|
primaryActions: {
|
|
117
117
|
text: "Submit request",
|
|
118
118
|
close: !0
|
|
@@ -121,7 +121,7 @@ const Ie = mt((g, r) => {
|
|
|
121
121
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
122
122
|
successMessage: "Purchase order draft has been submitted"
|
|
123
123
|
},
|
|
124
|
-
[
|
|
124
|
+
[P.enum.completeReceive]: {
|
|
125
125
|
primaryActions: {
|
|
126
126
|
text: "Mark received",
|
|
127
127
|
close: !0
|
|
@@ -130,7 +130,7 @@ const Ie = mt((g, r) => {
|
|
|
130
130
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
131
131
|
successMessage: "Purchase order has been marked as received"
|
|
132
132
|
},
|
|
133
|
-
[
|
|
133
|
+
[P.enum.approveRequest]: {
|
|
134
134
|
primaryActions: {
|
|
135
135
|
text: "Accept request",
|
|
136
136
|
close: !0
|
|
@@ -139,7 +139,7 @@ const Ie = mt((g, r) => {
|
|
|
139
139
|
message: "Transfer out request will be accepted.",
|
|
140
140
|
successMessage: "Transfer out request has been approved"
|
|
141
141
|
},
|
|
142
|
-
[
|
|
142
|
+
[P.enum.rejectRequest]: {
|
|
143
143
|
primaryActions: {
|
|
144
144
|
text: "Reject request",
|
|
145
145
|
close: !0,
|
|
@@ -149,7 +149,7 @@ const Ie = mt((g, r) => {
|
|
|
149
149
|
message: "Purchase order will be rejected.",
|
|
150
150
|
successMessage: "Purchase order has been rejected"
|
|
151
151
|
},
|
|
152
|
-
[
|
|
152
|
+
[P.enum.processRequest]: {
|
|
153
153
|
primaryActions: {
|
|
154
154
|
text: "Process request",
|
|
155
155
|
close: !0,
|
|
@@ -170,15 +170,15 @@ function Kt(g) {
|
|
|
170
170
|
dto: g
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Ze(g) {
|
|
174
174
|
return Ge.validatePOReceivedStatus({
|
|
175
175
|
receivedMap: g
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
function et(g, r, o) {
|
|
179
|
-
if (!
|
|
179
|
+
if (!Q.safeParse(g).success)
|
|
180
180
|
throw new Error(`Invalid purchase order status: ${g}`);
|
|
181
|
-
const p =
|
|
181
|
+
const p = Q.parse(g);
|
|
182
182
|
return Ge.orderStatusCombination({
|
|
183
183
|
status: p,
|
|
184
184
|
isPOPartialReceive: r,
|
|
@@ -186,25 +186,25 @@ function et(g, r, o) {
|
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
function Ot() {
|
|
189
|
-
const g = _e(), r = Ie(), o =
|
|
190
|
-
async function p(n,
|
|
189
|
+
const g = _e(), r = Ie(), o = Pe();
|
|
190
|
+
async function p(n, a) {
|
|
191
191
|
const s = g.currentLocationDBName;
|
|
192
|
-
return n.doc.supplier.internal && n.operation ===
|
|
192
|
+
return n.doc.supplier.internal && n.operation === P.enum.confirmDraft && (n.operation = P.enum.submitRequest), await r.processPurchaseOrder(n, a || s);
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function l(n, a) {
|
|
195
195
|
const s = g.currentLocationDBName;
|
|
196
|
-
return await r.processPurchaseOrderV2(n,
|
|
196
|
+
return await r.processPurchaseOrderV2(n, a || s);
|
|
197
197
|
}
|
|
198
|
-
return (n) => o.useOperatePurchaseOrderV2 ?
|
|
198
|
+
return (n) => o.useOperatePurchaseOrderV2 ? l(n.operateV2, n.transferTo) : p(n.operate, n.transferTo);
|
|
199
199
|
}
|
|
200
200
|
var tt = /* @__PURE__ */ ((g) => (g.RECEIVE_REQUEST = "receive/request", g.APPROVAL = "approval", g))(tt || {});
|
|
201
|
-
const Le = Y(),
|
|
201
|
+
const Le = Y(), Je = Y();
|
|
202
202
|
function bn(g, r) {
|
|
203
|
-
const o = Ye(), p = _e(),
|
|
203
|
+
const o = Ye(), p = _e(), l = Pe();
|
|
204
204
|
We();
|
|
205
|
-
const n =
|
|
205
|
+
const n = qt(), a = It(), s = Y(!1), i = qe(), O = Ie(), $ = zt(), b = Y(new Array()), F = Y(new Array()), u = Y(
|
|
206
206
|
r != null && r.startDate && (r != null && r.endDate) ? r : xt()
|
|
207
|
-
),
|
|
207
|
+
), N = H(() => {
|
|
208
208
|
const V = new Date(u.value.startDate), B = new Date(u.value.endDate);
|
|
209
209
|
return {
|
|
210
210
|
start: wt(V).toISOString(),
|
|
@@ -217,8 +217,8 @@ function bn(g, r) {
|
|
|
217
217
|
mode: it.CREATE,
|
|
218
218
|
modelValue: V || void 0,
|
|
219
219
|
show: !0,
|
|
220
|
-
"onUpdate:show"(
|
|
221
|
-
Le.value.show =
|
|
220
|
+
"onUpdate:show"(T) {
|
|
221
|
+
Le.value.show = T;
|
|
222
222
|
},
|
|
223
223
|
templateId: D,
|
|
224
224
|
lastClosingDate: y.value
|
|
@@ -226,7 +226,7 @@ function bn(g, r) {
|
|
|
226
226
|
Le.value = S;
|
|
227
227
|
}
|
|
228
228
|
let se;
|
|
229
|
-
|
|
229
|
+
l.mustUsePoTemplate && !(V != null && V.template) ? o.open({
|
|
230
230
|
title: "Create transfer",
|
|
231
231
|
message: "",
|
|
232
232
|
primaryActions: {
|
|
@@ -257,19 +257,19 @@ function bn(g, r) {
|
|
|
257
257
|
Le.value = B;
|
|
258
258
|
}
|
|
259
259
|
async function z() {
|
|
260
|
-
b.value = [],
|
|
260
|
+
b.value = [], F.value = [], s.value = !0;
|
|
261
261
|
try {
|
|
262
|
-
const V = await O.getPurchaseOrders(
|
|
262
|
+
const V = await O.getPurchaseOrders(N.value);
|
|
263
263
|
b.value = V.sort((t, m) => m._id.localeCompare(t._id));
|
|
264
264
|
const B = V.flatMap((t) => t.shipmentIds || []).filter(Boolean), se = B.length > 0 ? await $.getShipmentsByIds(B) : [];
|
|
265
|
-
|
|
265
|
+
F.value = se;
|
|
266
266
|
const D = await c.readCurrentLocationLastClosing(!0), S = D == null ? void 0 : D._id;
|
|
267
|
-
S && (y.value = kt(S)), await
|
|
268
|
-
const
|
|
267
|
+
S && (y.value = kt(S)), await l.awaitFeatureLoaded(() => l.mustUsePoTemplate) && await a.fetchTemplates();
|
|
268
|
+
const T = b.value.map((t) => {
|
|
269
269
|
var m;
|
|
270
270
|
return ((m = t.request) == null ? void 0 : m.id) ?? "";
|
|
271
271
|
}).filter((t) => t);
|
|
272
|
-
d.value = await O.readRequestByIds(
|
|
272
|
+
d.value = await O.readRequestByIds(T);
|
|
273
273
|
} catch {
|
|
274
274
|
i.open({
|
|
275
275
|
title: "Something went wrong",
|
|
@@ -280,13 +280,13 @@ function bn(g, r) {
|
|
|
280
280
|
s.value = !1;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
async function
|
|
283
|
+
async function A() {
|
|
284
284
|
d.value = [], s.value = !0;
|
|
285
285
|
try {
|
|
286
286
|
d.value = await O.readRequests(
|
|
287
287
|
void 0,
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
N.value.start,
|
|
289
|
+
N.value.end
|
|
290
290
|
).then((V) => V.reverse());
|
|
291
291
|
} catch {
|
|
292
292
|
i.open({
|
|
@@ -303,10 +303,10 @@ function bn(g, r) {
|
|
|
303
303
|
case "receive/request":
|
|
304
304
|
return z();
|
|
305
305
|
case "approval":
|
|
306
|
-
return
|
|
306
|
+
return A();
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Z(V, B) {
|
|
310
310
|
u.value = {
|
|
311
311
|
startDate: V,
|
|
312
312
|
endDate: B
|
|
@@ -323,24 +323,27 @@ function bn(g, r) {
|
|
|
323
323
|
async function Oe(V, B) {
|
|
324
324
|
const se = Math.random().toString();
|
|
325
325
|
ce.value = se, B ?? (B = d.value.computeFirst(
|
|
326
|
-
(
|
|
326
|
+
(t) => t.purchaseOrderId === V._id ? t : null
|
|
327
327
|
) ?? void 0);
|
|
328
|
-
const D = g === "receive/request" ? p.currentLocation : B == null ? void 0 : B.to, S = {
|
|
328
|
+
const D = g === "receive/request" ? p.currentLocation : B == null ? void 0 : B.to, S = g === "approval", T = {
|
|
329
329
|
poRequest: B,
|
|
330
|
-
purchaseOrder:
|
|
330
|
+
purchaseOrder: {
|
|
331
|
+
...V,
|
|
332
|
+
status: S && (B != null && B.rejectedAt) ? Q.Enum.REJECT : V.status
|
|
333
|
+
},
|
|
331
334
|
transferTo: D == null ? void 0 : D.name,
|
|
332
335
|
transferToDbName: D == null ? void 0 : D.dbName,
|
|
333
336
|
show: !0,
|
|
334
337
|
canResubmit: !1,
|
|
335
|
-
canApprove:
|
|
336
|
-
"onUpdate:show"(
|
|
337
|
-
oe.value.show =
|
|
338
|
+
canApprove: S,
|
|
339
|
+
"onUpdate:show"(t) {
|
|
340
|
+
oe.value.show = t;
|
|
338
341
|
},
|
|
339
342
|
scope: g,
|
|
340
343
|
receivedMap: He(V) ?? {},
|
|
341
|
-
shipments:
|
|
344
|
+
shipments: F.value
|
|
342
345
|
};
|
|
343
|
-
oe.value =
|
|
346
|
+
oe.value = T;
|
|
344
347
|
}
|
|
345
348
|
async function ge(V, B, se, D) {
|
|
346
349
|
const S = Ot();
|
|
@@ -352,8 +355,8 @@ function bn(g, r) {
|
|
|
352
355
|
doc: V,
|
|
353
356
|
options: (
|
|
354
357
|
// auto receive for supplier to warehouse
|
|
355
|
-
(B ===
|
|
356
|
-
B ===
|
|
358
|
+
(B === P.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
359
|
+
B === P.enum.completeReceive) && l.autoReceiveWarehouse ? {
|
|
357
360
|
autoReceive: !0
|
|
358
361
|
} : void 0
|
|
359
362
|
)
|
|
@@ -367,7 +370,7 @@ function bn(g, r) {
|
|
|
367
370
|
transferTo: D
|
|
368
371
|
}), await new Promise((m) => setTimeout(m, 1e3));
|
|
369
372
|
const t = _e().currentLocationDBName.startsWith("restaurant_");
|
|
370
|
-
B ===
|
|
373
|
+
B === P.enum.confirmDraft && V.effectiveAt && t ? i.open({
|
|
371
374
|
title: "Success",
|
|
372
375
|
message: `${se}. The backdate will be reflected once your POS has received this change.`,
|
|
373
376
|
type: "success"
|
|
@@ -376,12 +379,12 @@ function bn(g, r) {
|
|
|
376
379
|
message: se,
|
|
377
380
|
type: "success"
|
|
378
381
|
});
|
|
379
|
-
} catch (
|
|
382
|
+
} catch (T) {
|
|
380
383
|
i.open({
|
|
381
384
|
title: "Something went wrong",
|
|
382
385
|
message: "Please try again.",
|
|
383
386
|
type: "error"
|
|
384
|
-
}), console.error("Error when submitting PO operation", B, V,
|
|
387
|
+
}), console.error("Error when submitting PO operation", B, V, T);
|
|
385
388
|
} finally {
|
|
386
389
|
s.value = !1, K();
|
|
387
390
|
}
|
|
@@ -396,11 +399,11 @@ function bn(g, r) {
|
|
|
396
399
|
});
|
|
397
400
|
return;
|
|
398
401
|
}
|
|
399
|
-
const { successMessage: S, ...
|
|
402
|
+
const { successMessage: S, ...T } = D;
|
|
400
403
|
o.open({
|
|
401
|
-
title:
|
|
402
|
-
message:
|
|
403
|
-
primaryActions:
|
|
404
|
+
title: T.title,
|
|
405
|
+
message: T.message,
|
|
406
|
+
primaryActions: T.primaryActions
|
|
404
407
|
}).onPrimary(() => {
|
|
405
408
|
ge(V, B, S, se);
|
|
406
409
|
});
|
|
@@ -420,17 +423,17 @@ function bn(g, r) {
|
|
|
420
423
|
const V = {
|
|
421
424
|
show: !0,
|
|
422
425
|
"onUpdate:show"(B) {
|
|
423
|
-
|
|
426
|
+
Je.value.show = B;
|
|
424
427
|
}
|
|
425
428
|
};
|
|
426
|
-
|
|
429
|
+
Je.value = V;
|
|
427
430
|
});
|
|
428
431
|
}
|
|
429
432
|
return {
|
|
430
433
|
purchaseOrders: b,
|
|
431
|
-
shipments:
|
|
434
|
+
shipments: F,
|
|
432
435
|
purchaseRequests: d,
|
|
433
|
-
updateDateRange:
|
|
436
|
+
updateDateRange: Z,
|
|
434
437
|
fetchData: K,
|
|
435
438
|
loading: s,
|
|
436
439
|
transferDialogProps: Le,
|
|
@@ -439,22 +442,22 @@ function bn(g, r) {
|
|
|
439
442
|
transferDetailsProps: oe,
|
|
440
443
|
promptShowTransferDetails: Oe,
|
|
441
444
|
submitAction: xe,
|
|
442
|
-
xilnexImportDialogProps:
|
|
445
|
+
xilnexImportDialogProps: Je,
|
|
443
446
|
promptUploadTransferDialog: he
|
|
444
447
|
};
|
|
445
448
|
}
|
|
446
449
|
function Ht(g, r) {
|
|
447
450
|
return r.reduce(
|
|
448
|
-
(p,
|
|
449
|
-
const n =
|
|
451
|
+
(p, l) => {
|
|
452
|
+
const n = l.received.find((a) => a.sku._id === g._id);
|
|
450
453
|
return n && (p = ft(p, n.amount)), p;
|
|
451
454
|
},
|
|
452
|
-
|
|
455
|
+
Ft.toPrecision(yt(0), g.unit.precision)
|
|
453
456
|
);
|
|
454
457
|
}
|
|
455
458
|
function Gt(g) {
|
|
456
|
-
const { po: r, currentLocation: o, business: p, fulfilling:
|
|
457
|
-
name:
|
|
459
|
+
const { po: r, currentLocation: o, business: p, fulfilling: l, por: n } = g, { name: a, address: s, regNo: i } = o.doc.profile, O = {
|
|
460
|
+
name: a,
|
|
458
461
|
registrationNumber: i,
|
|
459
462
|
line1: s == null ? void 0 : s.line1,
|
|
460
463
|
line2: s == null ? void 0 : s.line2,
|
|
@@ -473,7 +476,7 @@ function Gt(g) {
|
|
|
473
476
|
state: r.supplier.address.state,
|
|
474
477
|
country: r.supplier.address.country
|
|
475
478
|
}, b = r.items.map((k) => {
|
|
476
|
-
const { sku: z, measurement:
|
|
479
|
+
const { sku: z, measurement: A } = k, K = ye(
|
|
477
480
|
Ht(k.sku, r.deliveryOrder || []),
|
|
478
481
|
!1
|
|
479
482
|
);
|
|
@@ -481,23 +484,23 @@ function Gt(g) {
|
|
|
481
484
|
code: z.code,
|
|
482
485
|
description: z.name,
|
|
483
486
|
quantity: ye(k.quantity, !1),
|
|
484
|
-
unit: (
|
|
487
|
+
unit: (A == null ? void 0 : A.abbrev) || z.unit.abbrev,
|
|
485
488
|
received: K,
|
|
486
489
|
cost: k.totalCost ? `${k.totalCost.currency} ${Dt.toFormatString({
|
|
487
490
|
value: k.totalCost
|
|
488
491
|
})}` : void 0
|
|
489
492
|
};
|
|
490
|
-
}),
|
|
493
|
+
}), F = r.deliveryOrder.map((k) => ({
|
|
491
494
|
createdAt: vt(new Date(k.createdAt)),
|
|
492
495
|
ref: k.deliveryOrderNumber,
|
|
493
496
|
remark: k.remark || "",
|
|
494
497
|
items: k.received.map((z) => {
|
|
495
|
-
var
|
|
498
|
+
var A;
|
|
496
499
|
return {
|
|
497
500
|
code: z.sku.code,
|
|
498
501
|
description: z.sku.name,
|
|
499
502
|
quantity: ye(z.amount),
|
|
500
|
-
unit: ((
|
|
503
|
+
unit: ((A = z.measurement) == null ? void 0 : A.abbrev) || z.sku.unit.abbrev
|
|
501
504
|
};
|
|
502
505
|
})
|
|
503
506
|
})), u = [
|
|
@@ -506,13 +509,13 @@ function Gt(g) {
|
|
|
506
509
|
// Dev
|
|
507
510
|
"6880b36a3054c5001db19218"
|
|
508
511
|
];
|
|
509
|
-
let
|
|
510
|
-
if (r.supplier.internal ? (
|
|
512
|
+
let N = "Inventory Receive Note";
|
|
513
|
+
if (r.supplier.internal ? (N = "Inventory Transfer Note", u.includes((p == null ? void 0 : p._id) || "") && (N = "Stock Request")) : N = "Purchase Order", n) {
|
|
511
514
|
const k = n.from.dbName;
|
|
512
|
-
o.dbName === k || (
|
|
515
|
+
o.dbName === k || (N = "Inventory Receive Note");
|
|
513
516
|
}
|
|
514
517
|
const c = {
|
|
515
|
-
title:
|
|
518
|
+
title: N,
|
|
516
519
|
businessName: p == null ? void 0 : p.name,
|
|
517
520
|
logo: p == null ? void 0 : p.thumbnail,
|
|
518
521
|
orderNumber: r.seqNumber.toString(),
|
|
@@ -523,55 +526,55 @@ function Gt(g) {
|
|
|
523
526
|
supplier: $,
|
|
524
527
|
items: b,
|
|
525
528
|
status: r.status,
|
|
526
|
-
deliveryOrders:
|
|
527
|
-
}, y = new URL(window.location.href), R =
|
|
529
|
+
deliveryOrders: F
|
|
530
|
+
}, y = new URL(window.location.href), R = l && (r.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
528
531
|
y.pathname = y.hostname.includes("portal.feedme") ? `/inventory/${R}` : `/${R}`, y.searchParams.append("data", JSON.stringify(c)), window.open(y.href, "_blank", "noreferrer");
|
|
529
532
|
}
|
|
530
533
|
const Ae = {
|
|
531
534
|
submitRequest: {
|
|
532
535
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
533
536
|
color: "text-fm-color-typo-primary",
|
|
534
|
-
value:
|
|
537
|
+
value: P.enum.submitRequest
|
|
535
538
|
},
|
|
536
539
|
confirmDraft: {
|
|
537
540
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
538
541
|
color: "text-fm-color-typo-primary",
|
|
539
|
-
value:
|
|
542
|
+
value: P.enum.confirmDraft
|
|
540
543
|
},
|
|
541
544
|
cancelDraft: {
|
|
542
545
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
543
546
|
color: "text-fm-color-typo-error",
|
|
544
|
-
value:
|
|
547
|
+
value: P.enum.cancelDraft
|
|
545
548
|
},
|
|
546
549
|
approveRequest: {
|
|
547
550
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
548
551
|
color: "text-fm-color-typo-primary",
|
|
549
|
-
value:
|
|
552
|
+
value: P.enum.approveRequest
|
|
550
553
|
},
|
|
551
554
|
rejectRequest: {
|
|
552
555
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
553
556
|
color: "text-fm-color-typo-error",
|
|
554
|
-
value:
|
|
557
|
+
value: P.enum.rejectRequest
|
|
555
558
|
},
|
|
556
559
|
processRequest: {
|
|
557
560
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
558
561
|
color: "text-fm-color-typo-primary",
|
|
559
|
-
value:
|
|
562
|
+
value: P.enum.processRequest
|
|
560
563
|
},
|
|
561
564
|
receiveStock: {
|
|
562
565
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
563
566
|
color: "text-fm-color-typo-primary",
|
|
564
|
-
value:
|
|
567
|
+
value: P.enum.receiveStock
|
|
565
568
|
},
|
|
566
569
|
completeReceive: {
|
|
567
570
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
568
571
|
color: "text-fm-color-typo-primary",
|
|
569
|
-
value:
|
|
572
|
+
value: P.enum.completeReceive
|
|
570
573
|
},
|
|
571
574
|
closeRequest: {
|
|
572
575
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
573
576
|
color: "system-error-300",
|
|
574
|
-
value:
|
|
577
|
+
value: P.enum.closeRequest
|
|
575
578
|
},
|
|
576
579
|
approveDraft: {
|
|
577
580
|
translationKey: "",
|
|
@@ -586,30 +589,30 @@ const Ae = {
|
|
|
586
589
|
returnStock: {
|
|
587
590
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
588
591
|
color: "text-fm-color-typo-primary",
|
|
589
|
-
value:
|
|
592
|
+
value: P.enum.returnStock
|
|
590
593
|
}
|
|
591
594
|
};
|
|
592
595
|
function gn(g, r, o) {
|
|
593
|
-
const p = _e(),
|
|
596
|
+
const p = _e(), l = We(), n = Me(), { t: a } = st();
|
|
594
597
|
function s(u) {
|
|
595
598
|
switch (u.status) {
|
|
596
599
|
case "DRAFT":
|
|
597
600
|
return [
|
|
598
601
|
ve[me.Update],
|
|
599
602
|
ve[me.Details],
|
|
600
|
-
u.supplier.internal === "restaurant" || u.supplier.internal === "warehouse" ? Ae[
|
|
601
|
-
Ae[
|
|
603
|
+
u.supplier.internal === "restaurant" || u.supplier.internal === "warehouse" ? Ae[P.enum.submitRequest] : Ae[P.enum.confirmDraft],
|
|
604
|
+
Ae[P.enum.cancelDraft]
|
|
602
605
|
];
|
|
603
606
|
case "RECEIVING":
|
|
604
607
|
return [
|
|
605
|
-
Ae[
|
|
608
|
+
Ae[P.enum.completeReceive],
|
|
606
609
|
ve[me.Details],
|
|
607
610
|
ve[me.Print]
|
|
608
611
|
];
|
|
609
612
|
case "REQUESTING":
|
|
610
613
|
return g === "receive/request" ? [ve[me.Details], ve[me.Print]] : [
|
|
611
|
-
Ae[
|
|
612
|
-
Ae[
|
|
614
|
+
Ae[P.enum.approveRequest],
|
|
615
|
+
Ae[P.enum.rejectRequest],
|
|
613
616
|
ve[me.Details]
|
|
614
617
|
// DefaultRowActions[RowActionEnum.Print]
|
|
615
618
|
];
|
|
@@ -622,16 +625,16 @@ function gn(g, r, o) {
|
|
|
622
625
|
}
|
|
623
626
|
}
|
|
624
627
|
function i(u) {
|
|
625
|
-
return Object.values(
|
|
628
|
+
return Object.values(P.enum).includes(u);
|
|
626
629
|
}
|
|
627
|
-
async function O(u,
|
|
628
|
-
var y, R, k, z,
|
|
629
|
-
const c = pt(
|
|
630
|
+
async function O(u, N, d) {
|
|
631
|
+
var y, R, k, z, A, K;
|
|
632
|
+
const c = pt(N);
|
|
630
633
|
if (u === me.Print) {
|
|
631
|
-
const
|
|
634
|
+
const Z = (d == null ? void 0 : d.toInventoryLocation) ?? p.currentLocation;
|
|
632
635
|
((y = d == null ? void 0 : d.netSuite) != null && y.refNo || (R = c.netSuite) != null && R.refNo) && (c.ref = [((k = d == null ? void 0 : d.netSuite) == null ? void 0 : k.refNo) || ((z = c.netSuite) == null ? void 0 : z.refNo)].filter((oe) => oe).join(" ")), Gt({
|
|
633
636
|
po: c,
|
|
634
|
-
currentLocation:
|
|
637
|
+
currentLocation: Z,
|
|
635
638
|
business: n.currentBusiness.value,
|
|
636
639
|
fulfilling: g === "approval",
|
|
637
640
|
por: d
|
|
@@ -643,27 +646,27 @@ function gn(g, r, o) {
|
|
|
643
646
|
return;
|
|
644
647
|
}
|
|
645
648
|
if (u === me.Update) {
|
|
646
|
-
(
|
|
649
|
+
(A = r.promptUpdateTransferDialog) == null || A.call(r, c);
|
|
647
650
|
return;
|
|
648
651
|
}
|
|
649
652
|
if (i(u)) {
|
|
650
|
-
r.submitAction(
|
|
653
|
+
r.submitAction(N, u, (K = d == null ? void 0 : d.to) == null ? void 0 : K.dbName);
|
|
651
654
|
return;
|
|
652
655
|
}
|
|
653
656
|
}
|
|
654
657
|
function $() {
|
|
655
|
-
var
|
|
658
|
+
var N;
|
|
656
659
|
const u = [
|
|
657
660
|
{
|
|
658
661
|
accessorKey: "seqNumber",
|
|
659
|
-
header: () =>
|
|
662
|
+
header: () => a("inventory.transfer.table.seqNo"),
|
|
660
663
|
enableSorting: !0,
|
|
661
664
|
size: 80,
|
|
662
665
|
sortUndefined: "last"
|
|
663
666
|
},
|
|
664
667
|
{
|
|
665
668
|
accessorKey: "_id",
|
|
666
|
-
header: () =>
|
|
669
|
+
header: () => a("inventory.transfer.table.createdAt"),
|
|
667
670
|
cell(d) {
|
|
668
671
|
return je(`${d.getValue()}`);
|
|
669
672
|
},
|
|
@@ -671,23 +674,23 @@ function gn(g, r, o) {
|
|
|
671
674
|
},
|
|
672
675
|
{
|
|
673
676
|
accessorKey: "supplier.name",
|
|
674
|
-
header: () =>
|
|
677
|
+
header: () => a("inventory.transfer.table.transferFrom"),
|
|
675
678
|
enableSorting: !0,
|
|
676
679
|
size: 200
|
|
677
680
|
},
|
|
678
681
|
{
|
|
679
682
|
accessorKey: "items.length",
|
|
680
|
-
header: () =>
|
|
683
|
+
header: () => a("inventory.transfer.table.noOfItems"),
|
|
681
684
|
cell: (d) => {
|
|
682
685
|
const c = d.row.original.version || "1", y = d.getValue();
|
|
683
|
-
return
|
|
686
|
+
return q("div", { class: "flex items-center gap-2" }, [
|
|
684
687
|
y,
|
|
685
|
-
c !== "1" ?
|
|
688
|
+
c !== "1" ? q(
|
|
686
689
|
"div",
|
|
687
690
|
{ class: "py-3" },
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
+
q(
|
|
692
|
+
Fe,
|
|
693
|
+
q(
|
|
691
694
|
"div",
|
|
692
695
|
{
|
|
693
696
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
@@ -705,14 +708,14 @@ function gn(g, r, o) {
|
|
|
705
708
|
},
|
|
706
709
|
{
|
|
707
710
|
accessorKey: "ref",
|
|
708
|
-
header: () =>
|
|
711
|
+
header: () => a("inventory.transfer.table.reference"),
|
|
709
712
|
enableSorting: !1,
|
|
710
713
|
size: "auto"
|
|
711
714
|
},
|
|
712
|
-
...(
|
|
715
|
+
...(N = n.sessionUser.value) != null && N.role.isAdmin ? [
|
|
713
716
|
{
|
|
714
717
|
id: "statusForAdmin",
|
|
715
|
-
header: () =>
|
|
718
|
+
header: () => q(Fe, {}, () => `${a("inventory.transfer.table.status")}`),
|
|
716
719
|
cell(d) {
|
|
717
720
|
return d.row.original.status;
|
|
718
721
|
},
|
|
@@ -722,30 +725,30 @@ function gn(g, r, o) {
|
|
|
722
725
|
] : [],
|
|
723
726
|
{
|
|
724
727
|
accessorKey: "status",
|
|
725
|
-
header: () =>
|
|
728
|
+
header: () => a("inventory.transfer.table.status"),
|
|
726
729
|
cell(d) {
|
|
727
|
-
const c = d.getValue(), y = He(d.row.original), { partial: R, over: k } =
|
|
728
|
-
let
|
|
729
|
-
z ===
|
|
730
|
-
let
|
|
730
|
+
const c = d.getValue(), y = He(d.row.original), { partial: R, over: k } = Ze(y), z = et(c ?? "", R, k);
|
|
731
|
+
let A = a(`inventory.transfer.status.${z}`), K = `${c ?? ""}`.toLocaleLowerCase("en-us");
|
|
732
|
+
z === Q.enum.CLOSE && (A = `${a(`inventory.transfer.status.${Q.enum.COMPLETE}`)}`), z === "PARTIAL_RECEIVED" && K === Q.enum.PROCESSING.toLocaleLowerCase("en-us") && (K = Q.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
733
|
+
let Z = null;
|
|
731
734
|
const oe = o.value.find((ce) => ce.ref === d.row.original._id);
|
|
732
735
|
if (oe != null && oe.milestones && oe.milestones.length > 0) {
|
|
733
736
|
const ce = oe.milestones[oe.milestones.length - 1];
|
|
734
737
|
if (ce.estimatedTime) {
|
|
735
738
|
const Oe = new Date(ce.estimatedTime), ge = Oe.getDate().toString().padStart(2, "0");
|
|
736
|
-
|
|
739
|
+
Z = `${Oe.toLocaleString("en-US", { month: "short" })} ${ge}`;
|
|
737
740
|
}
|
|
738
741
|
}
|
|
739
|
-
return
|
|
742
|
+
return q(
|
|
740
743
|
"div",
|
|
741
744
|
{
|
|
742
745
|
class: "flex"
|
|
743
746
|
},
|
|
744
747
|
[
|
|
745
|
-
|
|
748
|
+
q(
|
|
746
749
|
"div",
|
|
747
750
|
{ class: "flex items-center" },
|
|
748
|
-
|
|
751
|
+
q(
|
|
749
752
|
"div",
|
|
750
753
|
{
|
|
751
754
|
class: [
|
|
@@ -754,25 +757,25 @@ function gn(g, r, o) {
|
|
|
754
757
|
k && "fm-status-badge-error"
|
|
755
758
|
].filter(Boolean).join(" ")
|
|
756
759
|
},
|
|
757
|
-
`${
|
|
760
|
+
`${A}`
|
|
758
761
|
)
|
|
759
762
|
),
|
|
760
|
-
...
|
|
761
|
-
|
|
763
|
+
...Z ? [
|
|
764
|
+
q(
|
|
762
765
|
"div",
|
|
763
766
|
{
|
|
764
767
|
class: "flex items-center gap-1 ml-2"
|
|
765
768
|
},
|
|
766
769
|
[
|
|
767
|
-
|
|
770
|
+
q(Ke.FmIcon, {
|
|
768
771
|
name: "local_shipping",
|
|
769
772
|
size: "md",
|
|
770
773
|
color: "neutral-gray-400"
|
|
771
774
|
}),
|
|
772
|
-
|
|
775
|
+
q(
|
|
773
776
|
"span",
|
|
774
777
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
|
|
775
|
-
|
|
778
|
+
Z
|
|
776
779
|
)
|
|
777
780
|
]
|
|
778
781
|
)
|
|
@@ -797,7 +800,7 @@ function gn(g, r, o) {
|
|
|
797
800
|
}
|
|
798
801
|
}
|
|
799
802
|
];
|
|
800
|
-
if (
|
|
803
|
+
if (l.isEnabled) {
|
|
801
804
|
const d = [
|
|
802
805
|
{
|
|
803
806
|
id: "netsuiteTransferOrder",
|
|
@@ -842,18 +845,18 @@ function gn(g, r, o) {
|
|
|
842
845
|
return u;
|
|
843
846
|
}
|
|
844
847
|
function b() {
|
|
845
|
-
var
|
|
848
|
+
var N;
|
|
846
849
|
const u = [
|
|
847
850
|
{
|
|
848
851
|
accessorKey: "purchaseOrder.seqNumber",
|
|
849
|
-
header: () =>
|
|
852
|
+
header: () => a("inventory.transfer.table.seqNo"),
|
|
850
853
|
enableSorting: !0,
|
|
851
854
|
size: 80,
|
|
852
855
|
sortUndefined: "last"
|
|
853
856
|
},
|
|
854
857
|
{
|
|
855
858
|
accessorKey: "purchaseOrder._id",
|
|
856
|
-
header: () =>
|
|
859
|
+
header: () => a("inventory.transfer.table.createdAt"),
|
|
857
860
|
cell(d) {
|
|
858
861
|
return je(`${d.getValue()}`);
|
|
859
862
|
},
|
|
@@ -861,25 +864,25 @@ function gn(g, r, o) {
|
|
|
861
864
|
},
|
|
862
865
|
{
|
|
863
866
|
accessorKey: "to.name",
|
|
864
|
-
header: () =>
|
|
867
|
+
header: () => a("inventory.transfer.table.transferTo"),
|
|
865
868
|
enableSorting: !1,
|
|
866
869
|
size: 200
|
|
867
870
|
},
|
|
868
871
|
{
|
|
869
872
|
accessorKey: "purchaseOrder.items.length",
|
|
870
|
-
header: () =>
|
|
873
|
+
header: () => a("inventory.transfer.table.noOfItems"),
|
|
871
874
|
enableSorting: !1
|
|
872
875
|
},
|
|
873
876
|
{
|
|
874
877
|
accessorKey: "purchaseOrder.ref",
|
|
875
|
-
header: () =>
|
|
878
|
+
header: () => a("inventory.transfer.table.reference"),
|
|
876
879
|
enableSorting: !1,
|
|
877
880
|
size: "auto"
|
|
878
881
|
},
|
|
879
|
-
...(
|
|
882
|
+
...(N = n.sessionUser.value) != null && N.role.isAdmin ? [
|
|
880
883
|
{
|
|
881
884
|
id: "statusForAdmin",
|
|
882
|
-
header: () =>
|
|
885
|
+
header: () => q(Fe, {}, () => `${a("inventory.transfer.table.status")}`),
|
|
883
886
|
cell(d) {
|
|
884
887
|
return d.row.original.status;
|
|
885
888
|
},
|
|
@@ -889,27 +892,27 @@ function gn(g, r, o) {
|
|
|
889
892
|
] : [],
|
|
890
893
|
{
|
|
891
894
|
accessorKey: "purchaseOrder.status",
|
|
892
|
-
header: () =>
|
|
895
|
+
header: () => a("inventory.transfer.table.status"),
|
|
893
896
|
cell(d) {
|
|
894
897
|
const c = d.row.original, y = d.getValue();
|
|
895
898
|
if (!c.purchaseOrder)
|
|
896
|
-
return
|
|
899
|
+
return q(Ke.FmChip, {
|
|
897
900
|
label: "N/A",
|
|
898
901
|
compact: !0
|
|
899
902
|
});
|
|
900
|
-
const R = He(c.purchaseOrder), { partial: k, over: z } =
|
|
901
|
-
let K =
|
|
902
|
-
return
|
|
903
|
+
const R = He(c.purchaseOrder), { partial: k, over: z } = Ze(R), A = et(y ?? "", k, z);
|
|
904
|
+
let K = a(`inventory.transfer.status.${A}`), Z = `${y ?? ""}`.toLocaleLowerCase("en-us");
|
|
905
|
+
return A === Q.enum.CLOSE && (K = `${a(`inventory.transfer.status.${Q.enum.COMPLETE}`)}`), A === "PARTIAL_RECEIVED" && Z === Q.enum.PROCESSING.toLocaleLowerCase("en-us") && (Z = Q.enum.RECEIVING.toLocaleLowerCase("en-us")), c.rejectedAt && (K = a("inventory.transfer.status.REJECT"), Z = Q.enum.REJECT.toLocaleLowerCase("en-us")), q(
|
|
903
906
|
"div",
|
|
904
907
|
{
|
|
905
908
|
class: "flex"
|
|
906
909
|
},
|
|
907
|
-
|
|
910
|
+
q(
|
|
908
911
|
"div",
|
|
909
912
|
{
|
|
910
913
|
class: [
|
|
911
914
|
"fm-status-badge",
|
|
912
|
-
`fm-status-badge-${
|
|
915
|
+
`fm-status-badge-${Z}`,
|
|
913
916
|
z && "fm-status-badge-error"
|
|
914
917
|
].filter(Boolean).join(" ")
|
|
915
918
|
},
|
|
@@ -939,7 +942,7 @@ function gn(g, r, o) {
|
|
|
939
942
|
}
|
|
940
943
|
}
|
|
941
944
|
];
|
|
942
|
-
if (
|
|
945
|
+
if (l.isEnabled) {
|
|
943
946
|
const d = [
|
|
944
947
|
{
|
|
945
948
|
id: "netsuiteTransferOrder",
|
|
@@ -987,7 +990,7 @@ function gn(g, r, o) {
|
|
|
987
990
|
columnDefs: H(() => g === "receive/request" ? $() : b())
|
|
988
991
|
};
|
|
989
992
|
}
|
|
990
|
-
const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Yt = { class: "flex flex-col gap-8" }, Qt = { class: "flex w-full justify-end gap-16" },
|
|
993
|
+
const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Yt = { class: "flex flex-col gap-8" }, Qt = { class: "flex w-full justify-end gap-16" }, Jt = /* @__PURE__ */ Se({
|
|
991
994
|
__name: "FulfillmentForm",
|
|
992
995
|
props: {
|
|
993
996
|
purchaseOrder: {},
|
|
@@ -999,7 +1002,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
999
1002
|
id: "",
|
|
1000
1003
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1001
1004
|
items: []
|
|
1002
|
-
}),
|
|
1005
|
+
}), l = Y(), n = r;
|
|
1003
1006
|
_t(() => {
|
|
1004
1007
|
o.purchaseOrder && (p.items = o.purchaseOrder.items.map((s) => ({
|
|
1005
1008
|
id: s.id,
|
|
@@ -1008,12 +1011,12 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1008
1011
|
amount: s.quantity ?? { amount: 1, precision: 0 }
|
|
1009
1012
|
})));
|
|
1010
1013
|
});
|
|
1011
|
-
const
|
|
1014
|
+
const a = H(() => p.items.length <= 10);
|
|
1012
1015
|
return (s, i) => {
|
|
1013
1016
|
const O = G("FmTable"), $ = G("FmButton"), b = G("FmForm");
|
|
1014
1017
|
return f(), le(b, {
|
|
1015
1018
|
ref_key: "formRef",
|
|
1016
|
-
ref:
|
|
1019
|
+
ref: l,
|
|
1017
1020
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
1018
1021
|
onValidationFailed: console.log,
|
|
1019
1022
|
onValidationSuccess: i[1] || (i[1] = () => o.confirm(p))
|
|
@@ -1026,9 +1029,9 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1026
1029
|
"column-defs": [
|
|
1027
1030
|
{
|
|
1028
1031
|
header: "Code",
|
|
1029
|
-
cell: (
|
|
1030
|
-
const u = o.purchaseOrder.items.find((
|
|
1031
|
-
return
|
|
1032
|
+
cell: (F) => {
|
|
1033
|
+
const u = o.purchaseOrder.items.find((N) => N.id === F.row.original.id || N.sku._id === F.row.original.sku._id);
|
|
1034
|
+
return q(
|
|
1032
1035
|
h(Ke).FmTooltip,
|
|
1033
1036
|
{
|
|
1034
1037
|
content: u.code,
|
|
@@ -1036,7 +1039,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1036
1039
|
variant: "plain",
|
|
1037
1040
|
zIndex: 50
|
|
1038
1041
|
},
|
|
1039
|
-
|
|
1042
|
+
q(
|
|
1040
1043
|
"span",
|
|
1041
1044
|
{
|
|
1042
1045
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1048,9 +1051,9 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1048
1051
|
},
|
|
1049
1052
|
{
|
|
1050
1053
|
header: "Name",
|
|
1051
|
-
cell: (
|
|
1052
|
-
const u = o.purchaseOrder.items.find((
|
|
1053
|
-
return
|
|
1054
|
+
cell: (F) => {
|
|
1055
|
+
const u = o.purchaseOrder.items.find((N) => N.id === F.row.original.id || N.sku._id === F.row.original.sku._id);
|
|
1056
|
+
return q(
|
|
1054
1057
|
h(Ke).FmTooltip,
|
|
1055
1058
|
{
|
|
1056
1059
|
content: u.name,
|
|
@@ -1058,7 +1061,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1058
1061
|
variant: "plain",
|
|
1059
1062
|
zIndex: 50
|
|
1060
1063
|
},
|
|
1061
|
-
|
|
1064
|
+
q(
|
|
1062
1065
|
"span",
|
|
1063
1066
|
{
|
|
1064
1067
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1070,12 +1073,12 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1070
1073
|
},
|
|
1071
1074
|
{
|
|
1072
1075
|
header: "Amount",
|
|
1073
|
-
cell: (
|
|
1074
|
-
const u =
|
|
1076
|
+
cell: (F) => {
|
|
1077
|
+
const u = F.row.original, N = o.purchaseOrder.items.find((c) => c.id === u.id || c.sku._id === u.sku._id), d = u.amount ?? {
|
|
1075
1078
|
amount: 1,
|
|
1076
1079
|
precision: 0
|
|
1077
1080
|
};
|
|
1078
|
-
return
|
|
1081
|
+
return q(Vt, {
|
|
1079
1082
|
style: {
|
|
1080
1083
|
flex: "1 1 0%"
|
|
1081
1084
|
},
|
|
@@ -1095,7 +1098,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1095
1098
|
h(Bt)(
|
|
1096
1099
|
+h(ye)({ amount: 0, precision: 0 })
|
|
1097
1100
|
),
|
|
1098
|
-
h(Ut)(+h(ye)(
|
|
1101
|
+
h(Ut)(+h(ye)(N.quantity))
|
|
1099
1102
|
],
|
|
1100
1103
|
applyDefaultRules: !0
|
|
1101
1104
|
});
|
|
@@ -1103,7 +1106,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1103
1106
|
}
|
|
1104
1107
|
],
|
|
1105
1108
|
"row-data": p.items,
|
|
1106
|
-
"hide-footer":
|
|
1109
|
+
"hide-footer": a.value
|
|
1107
1110
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1108
1111
|
])
|
|
1109
1112
|
]),
|
|
@@ -1128,7 +1131,7 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1128
1131
|
}, 8, ["onValidationFailed"]);
|
|
1129
1132
|
};
|
|
1130
1133
|
}
|
|
1131
|
-
}),
|
|
1134
|
+
}), Xe = {
|
|
1132
1135
|
submitRequest: {
|
|
1133
1136
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
1134
1137
|
color: "primary",
|
|
@@ -1193,28 +1196,28 @@ const Wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1193
1196
|
available: !1
|
|
1194
1197
|
}
|
|
1195
1198
|
};
|
|
1196
|
-
function
|
|
1197
|
-
const g =
|
|
1199
|
+
function Xt() {
|
|
1200
|
+
const g = Pe();
|
|
1198
1201
|
return {
|
|
1199
1202
|
ableToMarkReceived(r) {
|
|
1200
|
-
if (!r || r.status !==
|
|
1203
|
+
if (!r || r.status !== Q.enum.RECEIVING)
|
|
1201
1204
|
return !1;
|
|
1202
1205
|
const p = _e().currentLocationDBName;
|
|
1203
1206
|
return `${r.supplier.internal}_${r.supplier._id}` !== p;
|
|
1204
1207
|
},
|
|
1205
1208
|
ableToMarkApproved(r) {
|
|
1206
|
-
return !(!r || (r == null ? void 0 : r.status) !==
|
|
1209
|
+
return !(!r || (r == null ? void 0 : r.status) !== Q.enum.REQUESTING);
|
|
1207
1210
|
},
|
|
1208
1211
|
ableToCreateFulfillment(r, o) {
|
|
1209
|
-
var n,
|
|
1210
|
-
if (!g.acceptRequireFulfillment || !r || !o || r.status !==
|
|
1212
|
+
var n, a;
|
|
1213
|
+
if (!g.acceptRequireFulfillment || !r || !o || r.status !== Q.enum.PROCESSING || !o.processedAt)
|
|
1211
1214
|
return !1;
|
|
1212
|
-
const p = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName,
|
|
1213
|
-
return !(p.startsWith("restaurant_") &&
|
|
1215
|
+
const p = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName, l = (a = o == null ? void 0 : o.to) == null ? void 0 : a.dbName;
|
|
1216
|
+
return !(p.startsWith("restaurant_") && l.startsWith("restaurant_"));
|
|
1214
1217
|
}
|
|
1215
1218
|
};
|
|
1216
1219
|
}
|
|
1217
|
-
const
|
|
1220
|
+
const Zt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
1218
1221
|
__name: "NetSuiteSync",
|
|
1219
1222
|
props: {
|
|
1220
1223
|
poRequest: {},
|
|
@@ -1223,21 +1226,21 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1223
1226
|
scope: {}
|
|
1224
1227
|
},
|
|
1225
1228
|
setup(g) {
|
|
1226
|
-
const r = g, o = We(), p =
|
|
1229
|
+
const r = g, o = We(), p = qe(), l = Ye(), n = Y(!1);
|
|
1227
1230
|
H(() => {
|
|
1228
|
-
var $, b,
|
|
1231
|
+
var $, b, F, u;
|
|
1229
1232
|
let s = !0;
|
|
1230
1233
|
o.isEnabled || (s = !1);
|
|
1231
1234
|
const i = r.purchaseOrder, O = r.poRequest;
|
|
1232
|
-
return i && (($ = i == null ? void 0 : i.supplier) != null && $.internal ? (!O && i.status ==
|
|
1235
|
+
return i && (($ = i == null ? void 0 : i.supplier) != null && $.internal ? (!O && i.status == Q.enum.DRAFT && (s = !1), O && !((b = O == null ? void 0 : O.netSuite) != null && b.id) && (s = !1), r.isTransferBetweenOutlets && (s = !1)) : ((i == null ? void 0 : i.status) !== Q.enum.REQUESTING && i.supplier.internal && (s = !1), !O && !((F = i == null ? void 0 : i.netSuite) != null && F.id) && (s = !1), !O && ((u = i == null ? void 0 : i.netSuite) != null && u.id) && (i == null ? void 0 : i.status) == Q.enum.REQUESTING && (s = !1))), s;
|
|
1233
1236
|
});
|
|
1234
|
-
async function
|
|
1235
|
-
n.value ||
|
|
1237
|
+
async function a() {
|
|
1238
|
+
n.value || l.open({
|
|
1236
1239
|
title: "Sync with NetSuite",
|
|
1237
|
-
contentComponent:
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1240
|
+
contentComponent: q("div", [
|
|
1241
|
+
q("p", "Are you sure you want to sync now?"),
|
|
1242
|
+
q("br"),
|
|
1243
|
+
q(
|
|
1241
1244
|
"p",
|
|
1242
1245
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1243
1246
|
"Please wait a moment before syncing manually to avoid unnecessary actions."
|
|
@@ -1261,7 +1264,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1261
1264
|
title: "Sync with NetSuite",
|
|
1262
1265
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1263
1266
|
type: "success"
|
|
1264
|
-
}), await new Promise((
|
|
1267
|
+
}), await new Promise((F) => setTimeout(F, 5e3)), n.value = !1;
|
|
1265
1268
|
} catch {
|
|
1266
1269
|
p.open({
|
|
1267
1270
|
title: "Error",
|
|
@@ -1273,13 +1276,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1273
1276
|
}
|
|
1274
1277
|
return (s, i) => {
|
|
1275
1278
|
const O = G("FmButton");
|
|
1276
|
-
return f(), x("div",
|
|
1279
|
+
return f(), x("div", Zt, [
|
|
1277
1280
|
I(O, {
|
|
1278
1281
|
"prepend-icon": "sync",
|
|
1279
1282
|
variant: "secondary",
|
|
1280
1283
|
label: "Sync",
|
|
1281
1284
|
loading: n.value,
|
|
1282
|
-
onClick:
|
|
1285
|
+
onClick: a,
|
|
1283
1286
|
"text-color": "primary",
|
|
1284
1287
|
"bg-color": "transparent",
|
|
1285
1288
|
"border-color": "primary"
|
|
@@ -1313,53 +1316,53 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1313
1316
|
scope: {}
|
|
1314
1317
|
},
|
|
1315
1318
|
setup(g) {
|
|
1316
|
-
const r = g, o = We(), p = Ie(),
|
|
1319
|
+
const r = g, o = We(), p = Ie(), l = Y(r.poRequest);
|
|
1317
1320
|
_t(async () => {
|
|
1318
1321
|
var i;
|
|
1319
1322
|
if (!r.poRequest && ((i = r.purchaseOrder) != null && i._id)) {
|
|
1320
1323
|
const O = await p.getLatestPurchaseOrderRequest(r.purchaseOrder._id);
|
|
1321
|
-
|
|
1324
|
+
l.value = O;
|
|
1322
1325
|
}
|
|
1323
1326
|
});
|
|
1324
1327
|
const n = H(
|
|
1325
1328
|
() => {
|
|
1326
|
-
var i, O, $, b,
|
|
1329
|
+
var i, O, $, b, F, u;
|
|
1327
1330
|
return o.getSubsidiaryFullName(
|
|
1328
|
-
(($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.subsidiary) == null ? void 0 : $.id) || ((u = (
|
|
1331
|
+
(($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.subsidiary) == null ? void 0 : $.id) || ((u = (F = (b = r.poRequest) == null ? void 0 : b.netSuite) == null ? void 0 : F.subsidiary) == null ? void 0 : u.id)
|
|
1329
1332
|
).fullName;
|
|
1330
1333
|
}
|
|
1331
|
-
),
|
|
1332
|
-
var i, O, $, b,
|
|
1333
|
-
return ($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.additionalInfo) != null && $.transactionnumber ? (u = (
|
|
1334
|
+
), a = H(() => {
|
|
1335
|
+
var i, O, $, b, F, u, N, d, c, y, R, k;
|
|
1336
|
+
return ($ = (O = (i = r.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : O.additionalInfo) != null && $.transactionnumber ? (u = (F = (b = r.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : F.additionalInfo) == null ? void 0 : u.transactionnumber : (c = (d = (N = l.value) == null ? void 0 : N.netSuite) == null ? void 0 : d.additionalInfo) != null && c.transactionnumber ? (k = (R = (y = l.value) == null ? void 0 : y.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : k.transactionnumber : null;
|
|
1334
1337
|
}), s = H(() => {
|
|
1335
|
-
var i, O, $, b,
|
|
1336
|
-
return (O = (i = r.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) != null && O.length && ((b = ($ = r.purchaseOrder) == null ? void 0 : $.deliveryFullfillment) == null ? void 0 : b.length) > 0 ? (u = (
|
|
1338
|
+
var i, O, $, b, F, u;
|
|
1339
|
+
return (O = (i = r.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) != null && O.length && ((b = ($ = r.purchaseOrder) == null ? void 0 : $.deliveryFullfillment) == null ? void 0 : b.length) > 0 ? (u = (F = r.purchaseOrder) == null ? void 0 : F.deliveryFullfillment) == null ? void 0 : u.map((N) => {
|
|
1337
1340
|
var d;
|
|
1338
|
-
return (d =
|
|
1341
|
+
return (d = N.netSuite) == null ? void 0 : d.refNo;
|
|
1339
1342
|
}).join(", ") : "N/A";
|
|
1340
1343
|
});
|
|
1341
1344
|
return (i, O) => {
|
|
1342
|
-
var $, b,
|
|
1345
|
+
var $, b, F, u, N, d, c, y, R, k, z, A, K, Z, oe, ce;
|
|
1343
1346
|
return h(o).isEnabled ? (f(), x("div", tr, [
|
|
1344
1347
|
e("div", rr, [
|
|
1345
1348
|
O[0] || (O[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1346
1349
|
e("div", sr, _(n.value || "N/A"), 1)
|
|
1347
1350
|
]),
|
|
1348
1351
|
!i.isTransferBetweenOutlets && i.scope === h(tt).RECEIVE_REQUEST ? (f(), x("div", or, [
|
|
1349
|
-
e("div", nr, " NetSuite " + _((b = ($ = i.purchaseOrder) == null ? void 0 : $.netSuite) != null && b.recordType ? h(ht)((u = (
|
|
1352
|
+
e("div", nr, " NetSuite " + _((b = ($ = i.purchaseOrder) == null ? void 0 : $.netSuite) != null && b.recordType ? h(ht)((u = (F = i.purchaseOrder) == null ? void 0 : F.netSuite) == null ? void 0 : u.recordType) : i.transferType === h(Ce).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1350
1353
|
e("div", ar, [
|
|
1351
|
-
(d = (
|
|
1354
|
+
(d = (N = i.purchaseOrder) == null ? void 0 : N.netSuite) != null && d.id ? (f(), x("span", lr, _((y = (c = i.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : y.refNo) + " (" + _((k = (R = i.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : k.id) + ") ", 1)) : (f(), x("span", ir, "N/A"))
|
|
1352
1355
|
])
|
|
1353
1356
|
])) : M("", !0),
|
|
1354
|
-
!i.isTransferBetweenOutlets &&
|
|
1357
|
+
!i.isTransferBetweenOutlets && l.value || i.scope === h(tt).APPROVAL ? (f(), x("div", cr, [
|
|
1355
1358
|
e("div", ur, " (Request) NetSuite " + _(i.transferType === h(Ce).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1356
1359
|
e("div", dr, [
|
|
1357
|
-
(
|
|
1360
|
+
(A = (z = l.value) == null ? void 0 : z.netSuite) != null && A.id ? (f(), x("span", mr, _((Z = (K = l.value) == null ? void 0 : K.netSuite) == null ? void 0 : Z.refNo) + " (" + _((ce = (oe = l.value) == null ? void 0 : oe.netSuite) == null ? void 0 : ce.id) + ") ", 1)) : (f(), x("span", pr, "N/A"))
|
|
1358
1361
|
])
|
|
1359
1362
|
])) : M("", !0),
|
|
1360
|
-
|
|
1363
|
+
a.value ? (f(), x("div", fr, [
|
|
1361
1364
|
O[1] || (O[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1362
|
-
e("div", yr, _(
|
|
1365
|
+
e("div", yr, _(a.value), 1)
|
|
1363
1366
|
])) : M("", !0),
|
|
1364
1367
|
h(o).isEnabled && i.transferType === h(Ce).TRANSFER && !i.isTransferBetweenOutlets ? (f(), x("div", vr, [
|
|
1365
1368
|
O[2] || (O[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
@@ -1375,21 +1378,21 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1375
1378
|
purchaseOrderId: {}
|
|
1376
1379
|
},
|
|
1377
1380
|
setup(g) {
|
|
1378
|
-
const r =
|
|
1379
|
-
async function p(
|
|
1380
|
-
const
|
|
1381
|
-
if (
|
|
1381
|
+
const r = qe(), o = bt();
|
|
1382
|
+
async function p(l, n) {
|
|
1383
|
+
const a = [];
|
|
1384
|
+
if (l && a.push(`body.message:*${l}*`), n) {
|
|
1382
1385
|
const $ = n.replace(/:/g, "\\:");
|
|
1383
|
-
|
|
1386
|
+
a.push(`${$}`);
|
|
1384
1387
|
}
|
|
1385
|
-
if (
|
|
1388
|
+
if (a.length === 0) {
|
|
1386
1389
|
r.open({
|
|
1387
1390
|
message: "Cannot open logs without valid filters.",
|
|
1388
1391
|
type: "error"
|
|
1389
1392
|
});
|
|
1390
1393
|
return;
|
|
1391
1394
|
}
|
|
1392
|
-
const i = `attributes.pod:netsuite* AND (${
|
|
1395
|
+
const i = `attributes.pod:netsuite* AND (${a.join(" OR ")})`, { url: O } = await o.getSyncLogs(i);
|
|
1393
1396
|
r.open(
|
|
1394
1397
|
{
|
|
1395
1398
|
message: "Opening NetSuite logs...",
|
|
@@ -1398,14 +1401,14 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1398
1401
|
800
|
|
1399
1402
|
), await new Promise(($) => setTimeout($, 800)), window.open(O, "_blank");
|
|
1400
1403
|
}
|
|
1401
|
-
return (
|
|
1402
|
-
const
|
|
1404
|
+
return (l, n) => {
|
|
1405
|
+
const a = G("FmButton");
|
|
1403
1406
|
return f(), x("div", gr, [
|
|
1404
|
-
I(
|
|
1407
|
+
I(a, {
|
|
1405
1408
|
"prepend-icon": "history",
|
|
1406
1409
|
variant: "secondary",
|
|
1407
1410
|
label: "Logs",
|
|
1408
|
-
onClick: n[0] || (n[0] = (s) => p(
|
|
1411
|
+
onClick: n[0] || (n[0] = (s) => p(l.netsuiteId, l.purchaseOrderId)),
|
|
1409
1412
|
"text-color": "primary",
|
|
1410
1413
|
"bg-color": "transparent",
|
|
1411
1414
|
"border-color": "primary"
|
|
@@ -1416,36 +1419,36 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1416
1419
|
}), Sr = { class: "flex flex-row-reverse" }, Or = { key: 0 }, xr = { key: 1 }, wr = { class: "mb-6" }, $r = { class: "fm-typo-en-body-md-400" }, Rr = { key: 0 }, kr = { key: 1 }, Dr = { key: 0 }, Nr = {
|
|
1417
1420
|
key: 1,
|
|
1418
1421
|
class: "border-t pt-6"
|
|
1419
|
-
}, Cr = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Ar = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Tr = { class: "w-full" },
|
|
1422
|
+
}, Cr = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Ar = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Tr = { class: "w-full" }, Fr = {
|
|
1420
1423
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
1421
1424
|
style: { "min-width": "130px" }
|
|
1422
|
-
},
|
|
1425
|
+
}, Pr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ir = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Er = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Lr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Vr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Br = { class: "p-3 fm-typo-en-body-sm-600" }, Ur = { key: 2 }, Mr = { key: 1 }, jr = /* @__PURE__ */ Se({
|
|
1423
1426
|
__name: "NetSuiteLatestInfo",
|
|
1424
1427
|
props: {
|
|
1425
1428
|
netsuiteId: {},
|
|
1426
1429
|
purchaseOrderId: {}
|
|
1427
1430
|
},
|
|
1428
1431
|
setup(g) {
|
|
1429
|
-
const r = g, o = bt(), p = Y(!1),
|
|
1432
|
+
const r = g, o = bt(), p = Y(!1), l = _e(), n = Y(!0), a = Y(!1), s = Y(!1), i = Y(!1), O = Y(null), $ = Y([]);
|
|
1430
1433
|
async function b() {
|
|
1431
1434
|
if (!O.value) {
|
|
1432
1435
|
p.value = !0;
|
|
1433
1436
|
try {
|
|
1434
1437
|
n.value = !0;
|
|
1435
1438
|
const d = await o.getMoreInfo(
|
|
1436
|
-
|
|
1439
|
+
l.currentLocation.dbName,
|
|
1437
1440
|
r.purchaseOrderId
|
|
1438
1441
|
);
|
|
1439
|
-
O.value = d,
|
|
1442
|
+
O.value = d, a.value = !1;
|
|
1440
1443
|
} catch {
|
|
1441
|
-
|
|
1444
|
+
a.value = !0;
|
|
1442
1445
|
} finally {
|
|
1443
1446
|
n.value = !1;
|
|
1444
1447
|
}
|
|
1445
|
-
await
|
|
1448
|
+
await F();
|
|
1446
1449
|
}
|
|
1447
1450
|
}
|
|
1448
|
-
async function
|
|
1451
|
+
async function F() {
|
|
1449
1452
|
if (!($.value.length > 0))
|
|
1450
1453
|
try {
|
|
1451
1454
|
s.value = !0;
|
|
@@ -1471,7 +1474,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1471
1474
|
return "text-gray-600 bg-gray-100";
|
|
1472
1475
|
}
|
|
1473
1476
|
}
|
|
1474
|
-
function
|
|
1477
|
+
function N(d) {
|
|
1475
1478
|
return new Date(d).toLocaleDateString("en-US", {
|
|
1476
1479
|
year: "numeric",
|
|
1477
1480
|
month: "short",
|
|
@@ -1485,7 +1488,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1485
1488
|
return f(), x("div", Sr, [
|
|
1486
1489
|
I(z, {
|
|
1487
1490
|
modelValue: p.value,
|
|
1488
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1491
|
+
"onUpdate:modelValue": c[2] || (c[2] = (A) => p.value = A),
|
|
1489
1492
|
overlay: !0,
|
|
1490
1493
|
"max-width": 800
|
|
1491
1494
|
}, {
|
|
@@ -1494,7 +1497,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1494
1497
|
"prepend-icon": "info",
|
|
1495
1498
|
variant: "secondary",
|
|
1496
1499
|
label: "Latest Info",
|
|
1497
|
-
onClick: c[0] || (c[0] = (
|
|
1500
|
+
onClick: c[0] || (c[0] = (A) => b()),
|
|
1498
1501
|
"text-color": "primary",
|
|
1499
1502
|
"bg-color": "transparent",
|
|
1500
1503
|
"border-color": "primary"
|
|
@@ -1505,10 +1508,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1505
1508
|
])),
|
|
1506
1509
|
default: X(() => [
|
|
1507
1510
|
n.value ? (f(), x("div", Or, "Loading...")) : (f(), x("div", xr, [
|
|
1508
|
-
|
|
1511
|
+
a.value ? (f(), x("p", Mr, "Something went wrong.")) : (f(), x(ue, { key: 0 }, [
|
|
1509
1512
|
e("div", wr, [
|
|
1510
1513
|
c[4] || (c[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1511
|
-
(f(!0), x(ue, null, be(O.value, (
|
|
1514
|
+
(f(!0), x(ue, null, be(O.value, (A, K) => (f(), x("div", {
|
|
1512
1515
|
key: K,
|
|
1513
1516
|
class: "mb-2"
|
|
1514
1517
|
}, [
|
|
@@ -1517,7 +1520,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1517
1520
|
label: h(rt)(K)
|
|
1518
1521
|
}, null, 8, ["label"]),
|
|
1519
1522
|
e("div", $r, [
|
|
1520
|
-
Array.isArray(
|
|
1523
|
+
Array.isArray(A) ? (f(), x("span", Rr, _(A.length > 0 ? A.join(", ") : "N/A"), 1)) : (f(), x("span", kr, _(A), 1))
|
|
1521
1524
|
])
|
|
1522
1525
|
])
|
|
1523
1526
|
]))), 128))
|
|
@@ -1551,21 +1554,21 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1551
1554
|
])
|
|
1552
1555
|
], -1)),
|
|
1553
1556
|
e("tbody", null, [
|
|
1554
|
-
(f(!0), x(ue, null, be($.value, (
|
|
1557
|
+
(f(!0), x(ue, null, be($.value, (A, K) => (f(), x("tr", {
|
|
1555
1558
|
key: K,
|
|
1556
1559
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
1557
1560
|
}, [
|
|
1558
|
-
e("td",
|
|
1559
|
-
e("td",
|
|
1560
|
-
e("td",
|
|
1561
|
-
e("td", Ir, _(
|
|
1561
|
+
e("td", Fr, _(N(A._dateiso8601)), 1),
|
|
1562
|
+
e("td", Pr, _(A._rolename), 1),
|
|
1563
|
+
e("td", qr, _(A._employeename), 1),
|
|
1564
|
+
e("td", Ir, _(A._contextname), 1),
|
|
1562
1565
|
e("td", {
|
|
1563
|
-
class: Be(`p-3 fm-typo-en-body-sm-600 ${u(Number(
|
|
1564
|
-
}, _(h(Ee)[Number(
|
|
1565
|
-
e("td", Er, _(
|
|
1566
|
-
e("td", Lr, _(
|
|
1567
|
-
e("td", Vr, _(
|
|
1568
|
-
e("td", Br, _(
|
|
1566
|
+
class: Be(`p-3 fm-typo-en-body-sm-600 ${u(Number(A.type) - 1)}`)
|
|
1567
|
+
}, _(h(Ee)[Number(A.type) - 1]), 3),
|
|
1568
|
+
e("td", Er, _(A.lineid || ""), 1),
|
|
1569
|
+
e("td", Lr, _(A._fieldname), 1),
|
|
1570
|
+
e("td", Vr, _(A.oldvalue || ""), 1),
|
|
1571
|
+
e("td", Br, _(A.newvalue || ""), 1)
|
|
1569
1572
|
]))), 128))
|
|
1570
1573
|
])
|
|
1571
1574
|
])
|
|
@@ -1582,7 +1585,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1582
1585
|
label: "Close",
|
|
1583
1586
|
size: "md",
|
|
1584
1587
|
variant: "primary",
|
|
1585
|
-
onClick: c[1] || (c[1] = (
|
|
1588
|
+
onClick: c[1] || (c[1] = (A) => p.value = !1)
|
|
1586
1589
|
})
|
|
1587
1590
|
]),
|
|
1588
1591
|
_: 1
|
|
@@ -1606,64 +1609,64 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1606
1609
|
const r = g, o = jt();
|
|
1607
1610
|
Me();
|
|
1608
1611
|
const p = H(() => {
|
|
1609
|
-
var s, i, O, $, b,
|
|
1610
|
-
const
|
|
1611
|
-
return n ||
|
|
1612
|
+
var s, i, O, $, b, F, u;
|
|
1613
|
+
const l = ((s = r.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((O = (i = r.purchaseOrder) == null ? void 0 : i.supplier) == null ? void 0 : O.internal) === "restaurant", n = r.transferType === Ce.PURCHASE, a = r.transferType === Ce.TRANSFER;
|
|
1614
|
+
return n || a && !l || ((b = ($ = r.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : b.id) || ((u = (F = r.poRequest) == null ? void 0 : F.netSuite) == null ? void 0 : u.id);
|
|
1612
1615
|
});
|
|
1613
|
-
return (
|
|
1616
|
+
return (l, n) => {
|
|
1614
1617
|
var s, i;
|
|
1615
|
-
const
|
|
1618
|
+
const a = G("FmMenuDivider");
|
|
1616
1619
|
return h(o).isNetSuiteEnabled && p.value ? (f(), x("div", zr, [
|
|
1617
1620
|
e("div", Kr, [
|
|
1618
1621
|
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1619
1622
|
e("div", Hr, [
|
|
1620
1623
|
e("div", Gr, [
|
|
1621
|
-
(i = (s = r.purchaseOrder) == null ? void 0 : s.netSuite) != null && i.id ? (f(), le(
|
|
1624
|
+
(i = (s = r.purchaseOrder) == null ? void 0 : s.netSuite) != null && i.id ? (f(), le(Fe, { key: 0 }, {
|
|
1622
1625
|
default: X(() => {
|
|
1623
1626
|
var O, $, b;
|
|
1624
1627
|
return [
|
|
1625
1628
|
I(jr, {
|
|
1626
|
-
"netsuite-id": ($ = (O =
|
|
1627
|
-
"purchase-order-id": (b =
|
|
1629
|
+
"netsuite-id": ($ = (O = l.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : $.id,
|
|
1630
|
+
"purchase-order-id": (b = l.purchaseOrder) == null ? void 0 : b._id
|
|
1628
1631
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1629
1632
|
];
|
|
1630
1633
|
}),
|
|
1631
1634
|
_: 1
|
|
1632
1635
|
})) : M("", !0),
|
|
1633
|
-
I(
|
|
1636
|
+
I(Fe, null, {
|
|
1634
1637
|
default: X(() => {
|
|
1635
1638
|
var O, $, b;
|
|
1636
1639
|
return [
|
|
1637
1640
|
I(_r, {
|
|
1638
|
-
"netsuite-id": ($ = (O =
|
|
1639
|
-
"purchase-order-id": (b =
|
|
1641
|
+
"netsuite-id": ($ = (O = l.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : $.id,
|
|
1642
|
+
"purchase-order-id": (b = l.purchaseOrder) == null ? void 0 : b._id
|
|
1640
1643
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1641
1644
|
];
|
|
1642
1645
|
}),
|
|
1643
1646
|
_: 1
|
|
1644
1647
|
}),
|
|
1645
1648
|
I(er, {
|
|
1646
|
-
"po-request":
|
|
1647
|
-
"purchase-order":
|
|
1649
|
+
"po-request": l.poRequest,
|
|
1650
|
+
"purchase-order": l.purchaseOrder,
|
|
1648
1651
|
"is-transfer-between-outlets": !p.value,
|
|
1649
|
-
scope:
|
|
1652
|
+
scope: l.scope
|
|
1650
1653
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1651
1654
|
])
|
|
1652
1655
|
])
|
|
1653
1656
|
]),
|
|
1654
|
-
I(
|
|
1657
|
+
I(a),
|
|
1655
1658
|
I(br, {
|
|
1656
|
-
"po-request":
|
|
1657
|
-
"purchase-order":
|
|
1658
|
-
"transfer-type":
|
|
1659
|
-
"transfer-to-db-name":
|
|
1659
|
+
"po-request": l.poRequest,
|
|
1660
|
+
"purchase-order": l.purchaseOrder,
|
|
1661
|
+
"transfer-type": l.transferType,
|
|
1662
|
+
"transfer-to-db-name": l.transferToDbName,
|
|
1660
1663
|
"is-transfer-between-outlets": !p.value,
|
|
1661
|
-
scope:
|
|
1664
|
+
scope: l.scope
|
|
1662
1665
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1663
1666
|
])) : M("", !0);
|
|
1664
1667
|
};
|
|
1665
1668
|
}
|
|
1666
|
-
}), Yr = { class: "flex flex-col gap-3" }, Qr = { class: "flex flex-col gap-4" },
|
|
1669
|
+
}), Yr = { class: "flex flex-col gap-3" }, Qr = { class: "flex flex-col gap-4" }, Jr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Xr = { class: "flex flex-col gap-4" }, Zr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, es = { class: "flex flex-col gap-4" }, ts = { class: "flex gap-4" }, rs = { class: "flex flex-col" }, ss = { class: "fm-typo-en-body-lg-600 basis-1/2 shrink-0 grow" }, os = { class: "fm-typo-en-body-md-400" }, ns = { class: "ml-auto flex flex-col" }, as = { class: "ml-auto flex gap-1" }, ls = { class: "fm-typo-en-body-lg-600 self-end" }, is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, cs = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, us = { class: "flex flex-col gap-4" }, ds = { class: "flex flex-col gap-4" }, ms = { class: "flex flex-col gap-4" }, ps = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, fs = {
|
|
1667
1670
|
key: 0,
|
|
1668
1671
|
class: "flex flex-col gap-4"
|
|
1669
1672
|
}, ys = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, vs = /* @__PURE__ */ Se({
|
|
@@ -1674,16 +1677,16 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1674
1677
|
},
|
|
1675
1678
|
emits: ["submitted"],
|
|
1676
1679
|
setup(g, { emit: r }) {
|
|
1677
|
-
const o = Y(!1), p = g,
|
|
1680
|
+
const o = Y(!1), p = g, l = r, n = gt("deliveryOrder"), a = Ie(), s = H(
|
|
1678
1681
|
() => {
|
|
1679
|
-
var
|
|
1680
|
-
return ((
|
|
1682
|
+
var F;
|
|
1683
|
+
return ((F = p.purchaseOrder.deliveryFullfillment) == null ? void 0 : F.findIndex(
|
|
1681
1684
|
(u) => p.deliveryOrder.fullfillmentId && u.id === p.deliveryOrder.fullfillmentId
|
|
1682
1685
|
)) ?? -1;
|
|
1683
1686
|
}
|
|
1684
|
-
), O =
|
|
1687
|
+
), O = Pe().enablePortalDeliveryOrderWrite, $ = qe();
|
|
1685
1688
|
function b() {
|
|
1686
|
-
|
|
1689
|
+
a.updateDeliveryOrder({
|
|
1687
1690
|
deliveryOrder: {
|
|
1688
1691
|
...p.deliveryOrder,
|
|
1689
1692
|
deliveryOrderNumber: n.deliveryOrderNumber || ""
|
|
@@ -1698,18 +1701,18 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1698
1701
|
type: "success"
|
|
1699
1702
|
},
|
|
1700
1703
|
1e4
|
|
1701
|
-
), o.value = !1,
|
|
1704
|
+
), o.value = !1, l("submitted");
|
|
1702
1705
|
});
|
|
1703
1706
|
}
|
|
1704
|
-
return (
|
|
1705
|
-
const
|
|
1707
|
+
return (F, u) => {
|
|
1708
|
+
const N = G("FmButton"), d = G("FmTextField"), c = G("FmDialog");
|
|
1706
1709
|
return f(), le(c, {
|
|
1707
1710
|
modelValue: o.value,
|
|
1708
1711
|
"onUpdate:modelValue": u[1] || (u[1] = (y) => o.value = y),
|
|
1709
1712
|
overlay: !0
|
|
1710
1713
|
}, {
|
|
1711
1714
|
"dialog-button": X(() => [
|
|
1712
|
-
h(O) ? (f(), le(
|
|
1715
|
+
h(O) ? (f(), le(N, {
|
|
1713
1716
|
key: 0,
|
|
1714
1717
|
variant: "plain",
|
|
1715
1718
|
label: "Edit",
|
|
@@ -1721,7 +1724,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1721
1724
|
e("div", null, "Received on " + _(h(Ue)(p.deliveryOrder.createdAt)), 1)
|
|
1722
1725
|
]),
|
|
1723
1726
|
"dialog-footer": X(() => [
|
|
1724
|
-
I(
|
|
1727
|
+
I(N, {
|
|
1725
1728
|
class: "ml-auto",
|
|
1726
1729
|
label: "Apply changes",
|
|
1727
1730
|
size: "md",
|
|
@@ -1734,11 +1737,11 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1734
1737
|
e("div", Yr, [
|
|
1735
1738
|
e("div", Qr, [
|
|
1736
1739
|
u[2] || (u[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
1737
|
-
e("div",
|
|
1740
|
+
e("div", Jr, _(p.deliveryOrder.adjustment ? h(Ue)(new Date(h(ze)(p.deliveryOrder.adjustment))) : "-"), 1)
|
|
1738
1741
|
]),
|
|
1739
|
-
e("div",
|
|
1742
|
+
e("div", Xr, [
|
|
1740
1743
|
u[3] || (u[3] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
1741
|
-
e("div",
|
|
1744
|
+
e("div", Zr, _(p.deliveryOrder.createdBy.name), 1)
|
|
1742
1745
|
]),
|
|
1743
1746
|
e("div", es, [
|
|
1744
1747
|
u[4] || (u[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received items", -1)),
|
|
@@ -1796,7 +1799,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1796
1799
|
}, ws = { class: "flex gap-4" }, $s = { class: "flex-1" }, Rs = { class: "flex-1" }, ks = {
|
|
1797
1800
|
key: 0,
|
|
1798
1801
|
class: "flex items-center text-fm-color-system-error-300"
|
|
1799
|
-
}, Ds = { class: "fm-typo-en-body-md-400" }, Ns = { class: "flex flex-col gap-4" }, Cs = { class: "flex justify-between items-center py-1 gap-4" }, As = { class: "flex flex-col" }, Ts = { class: "fm-typo-en-body-lg-600" },
|
|
1802
|
+
}, Ds = { class: "fm-typo-en-body-md-400" }, Ns = { class: "flex flex-col gap-4" }, Cs = { class: "flex justify-between items-center py-1 gap-4" }, As = { class: "flex flex-col" }, Ts = { class: "fm-typo-en-body-lg-600" }, Fs = { class: "fm-typo-en-body-md-400" }, Ps = { class: "flex flex-col gap-2 items-end" }, qs = {
|
|
1800
1803
|
key: 0,
|
|
1801
1804
|
class: "flex items-center gap-2"
|
|
1802
1805
|
}, Is = {
|
|
@@ -1811,7 +1814,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1811
1814
|
emits: ["submitted"],
|
|
1812
1815
|
setup(g, { emit: r }) {
|
|
1813
1816
|
var V, B, se;
|
|
1814
|
-
const { t: o } = st(), p = Y(!1),
|
|
1817
|
+
const { t: o } = st(), p = Y(!1), l = Me(), n = g, a = r, s = gt("", {
|
|
1815
1818
|
default: {
|
|
1816
1819
|
deliveryOrderNumber: "",
|
|
1817
1820
|
remark: "",
|
|
@@ -1821,53 +1824,53 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1821
1824
|
measurement: D.measurement
|
|
1822
1825
|
})),
|
|
1823
1826
|
createdBy: {
|
|
1824
|
-
id: ((V =
|
|
1825
|
-
name: ((B =
|
|
1827
|
+
id: ((V = l.sessionUser.value) == null ? void 0 : V.id) || "",
|
|
1828
|
+
name: ((B = l.sessionUser.value) == null ? void 0 : B.displayName) || ""
|
|
1826
1829
|
},
|
|
1827
1830
|
createdAt: ""
|
|
1828
1831
|
}
|
|
1829
|
-
}), i = Ie(), O = Ye(), $ =
|
|
1832
|
+
}), i = Ie(), O = Ye(), $ = Pe(), b = ((se = n.purchaseOrder) == null ? void 0 : se.supplier.internal) != null, F = b && $.enablePOSTransferRequireFulfillment, u = $.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === Q.Enum.RECEIVING || n.purchaseOrder.status === Q.Enum.COMPLETE) && (b ? !F : !0), N = $.enablePurchaseOrderReceiveWithCustomCost, d = $.enableBackdateReceive, c = Y({}), y = qe(), R = H({
|
|
1830
1833
|
get() {
|
|
1831
1834
|
if (!s.createdAt) return "";
|
|
1832
|
-
const D = new Date(s.createdAt), S = D.getFullYear(),
|
|
1833
|
-
return `${S}-${
|
|
1835
|
+
const D = new Date(s.createdAt), S = D.getFullYear(), T = String(D.getMonth() + 1).padStart(2, "0"), t = String(D.getDate()).padStart(2, "0");
|
|
1836
|
+
return `${S}-${T}-${t}`;
|
|
1834
1837
|
},
|
|
1835
1838
|
set(D) {
|
|
1836
1839
|
if (D) {
|
|
1837
|
-
const S = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [
|
|
1838
|
-
S.setFullYear(parseInt(
|
|
1840
|
+
const S = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [T, t, m] = D.split("-");
|
|
1841
|
+
S.setFullYear(parseInt(T)), S.setMonth(parseInt(t) - 1), S.setDate(parseInt(m)), s.createdAt = S.toISOString();
|
|
1839
1842
|
}
|
|
1840
1843
|
}
|
|
1841
1844
|
}), k = H({
|
|
1842
1845
|
get() {
|
|
1843
1846
|
if (!s.createdAt) return "";
|
|
1844
|
-
const D = new Date(s.createdAt), S = String(D.getHours()).padStart(2, "0"),
|
|
1845
|
-
return `${S}:${
|
|
1847
|
+
const D = new Date(s.createdAt), S = String(D.getHours()).padStart(2, "0"), T = String(D.getMinutes()).padStart(2, "0");
|
|
1848
|
+
return `${S}:${T}`;
|
|
1846
1849
|
},
|
|
1847
1850
|
set(D) {
|
|
1848
1851
|
if (D) {
|
|
1849
|
-
const S = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [
|
|
1850
|
-
S.setHours(parseInt(
|
|
1852
|
+
const S = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [T, t] = D.split(":");
|
|
1853
|
+
S.setHours(parseInt(T)), S.setMinutes(parseInt(t)), s.createdAt = S.toISOString();
|
|
1851
1854
|
}
|
|
1852
1855
|
}
|
|
1853
1856
|
}), z = H(() => {
|
|
1854
1857
|
const D = ze(n.purchaseOrder._id);
|
|
1855
1858
|
if (!D) return "";
|
|
1856
|
-
const S = new Date(D),
|
|
1857
|
-
return `${
|
|
1858
|
-
}),
|
|
1859
|
+
const S = new Date(D), T = S.getFullYear(), t = String(S.getMonth() + 1).padStart(2, "0"), m = String(S.getDate()).padStart(2, "0");
|
|
1860
|
+
return `${T}-${t}-${m}`;
|
|
1861
|
+
}), A = H(() => {
|
|
1859
1862
|
const D = ze(n.purchaseOrder._id);
|
|
1860
1863
|
return D ? new Date(D) : null;
|
|
1861
1864
|
}), K = H(() => {
|
|
1862
|
-
if (!R.value || !k.value || !
|
|
1863
|
-
if (/* @__PURE__ */ new Date(`${R.value}T${k.value}:00`) <
|
|
1864
|
-
const S = z.value,
|
|
1865
|
+
if (!R.value || !k.value || !A.value) return null;
|
|
1866
|
+
if (/* @__PURE__ */ new Date(`${R.value}T${k.value}:00`) < A.value) {
|
|
1867
|
+
const S = z.value, T = A.value.getHours(), t = A.value.getMinutes(), m = T >= 12 ? "PM" : "AM", C = T % 12 || 12, w = `${String(C).padStart(2, "0")}:${String(t).padStart(2, "0")} ${m}`;
|
|
1865
1868
|
return `Delivery date & time cannot be earlier than order creation (${S} ${w})`;
|
|
1866
1869
|
}
|
|
1867
1870
|
return null;
|
|
1868
|
-
}),
|
|
1869
|
-
const
|
|
1870
|
-
return
|
|
1871
|
+
}), Z = H(() => K.value ? !1 : s.received.some((S) => {
|
|
1872
|
+
const T = S.amount;
|
|
1873
|
+
return T ? +ye(T) > 0 : !1;
|
|
1871
1874
|
}));
|
|
1872
1875
|
function oe() {
|
|
1873
1876
|
s.createdAt = "";
|
|
@@ -1875,20 +1878,20 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1875
1878
|
const ce = H(() => n.purchaseOrder.items.map((D, S) => H({
|
|
1876
1879
|
get: () => {
|
|
1877
1880
|
var t;
|
|
1878
|
-
const
|
|
1879
|
-
return
|
|
1881
|
+
const T = (t = s.received[S]) == null ? void 0 : t.amount;
|
|
1882
|
+
return T ? +ye(T) : 0;
|
|
1880
1883
|
},
|
|
1881
|
-
set: (
|
|
1882
|
-
s.received[S].amount = ut(
|
|
1884
|
+
set: (T) => {
|
|
1885
|
+
s.received[S].amount = ut(T, 2);
|
|
1883
1886
|
}
|
|
1884
1887
|
})));
|
|
1885
1888
|
function Oe(D) {
|
|
1886
1889
|
const S = !c.value[D];
|
|
1887
1890
|
if (c.value[D] = S, S) {
|
|
1888
|
-
const
|
|
1889
|
-
|
|
1890
|
-
currency:
|
|
1891
|
-
amount:
|
|
1891
|
+
const T = n.purchaseOrder.items[D];
|
|
1892
|
+
T.totalCost ? s.received[D].cost = {
|
|
1893
|
+
currency: T.totalCost.currency,
|
|
1894
|
+
amount: T.totalCost.amount,
|
|
1892
1895
|
precision: 4
|
|
1893
1896
|
// Standardize to 4 decimals
|
|
1894
1897
|
} : s.received[D].cost = {
|
|
@@ -1902,13 +1905,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1902
1905
|
const ge = H(() => n.purchaseOrder.items.map((D, S) => H({
|
|
1903
1906
|
get: () => {
|
|
1904
1907
|
var t;
|
|
1905
|
-
const
|
|
1906
|
-
return
|
|
1908
|
+
const T = (t = s.received[S]) == null ? void 0 : t.cost;
|
|
1909
|
+
return T ? +ye(T) : 0;
|
|
1907
1910
|
},
|
|
1908
|
-
set: (
|
|
1911
|
+
set: (T) => {
|
|
1909
1912
|
s.received[S].cost = {
|
|
1910
1913
|
currency: Te(),
|
|
1911
|
-
...ut(
|
|
1914
|
+
...ut(T, 4)
|
|
1912
1915
|
};
|
|
1913
1916
|
}
|
|
1914
1917
|
})));
|
|
@@ -1941,11 +1944,11 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1941
1944
|
type: "success"
|
|
1942
1945
|
},
|
|
1943
1946
|
1e4
|
|
1944
|
-
), p.value = !1,
|
|
1947
|
+
), p.value = !1, a("submitted");
|
|
1945
1948
|
});
|
|
1946
1949
|
}
|
|
1947
1950
|
return (D, S) => {
|
|
1948
|
-
const
|
|
1951
|
+
const T = G("FmButton"), t = G("FmDatePicker"), m = G("FmTimePicker"), C = G("FmIcon"), w = G("FmStepperField"), j = G("FmSwitch"), U = G("FmTextField"), ee = G("FmDialog");
|
|
1949
1952
|
return f(), le(ee, {
|
|
1950
1953
|
modelValue: p.value,
|
|
1951
1954
|
"onUpdate:modelValue": S[4] || (S[4] = (v) => p.value = v),
|
|
@@ -1953,7 +1956,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1953
1956
|
"min-width": 800
|
|
1954
1957
|
}, {
|
|
1955
1958
|
"dialog-button": X(() => [
|
|
1956
|
-
h(u) ? (f(), le(
|
|
1959
|
+
h(u) ? (f(), le(T, {
|
|
1957
1960
|
key: 0,
|
|
1958
1961
|
variant: "primary",
|
|
1959
1962
|
label: "Create",
|
|
@@ -1966,12 +1969,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1966
1969
|
e("div", null, "Order #" + _(n.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
|
|
1967
1970
|
]),
|
|
1968
1971
|
"dialog-footer": X(() => [
|
|
1969
|
-
I(
|
|
1972
|
+
I(T, {
|
|
1970
1973
|
class: "ml-auto",
|
|
1971
1974
|
label: "Create",
|
|
1972
1975
|
size: "md",
|
|
1973
1976
|
variant: "destructive",
|
|
1974
|
-
disabled: !
|
|
1977
|
+
disabled: !Z.value,
|
|
1975
1978
|
onClick: xe
|
|
1976
1979
|
}, null, 8, ["disabled"])
|
|
1977
1980
|
]),
|
|
@@ -1981,7 +1984,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1981
1984
|
e("div", hs, [
|
|
1982
1985
|
e("div", bs, [
|
|
1983
1986
|
S[5] || (S[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
1984
|
-
e("div", gs, _((v = h(
|
|
1987
|
+
e("div", gs, _((v = h(l).sessionUser.value) == null ? void 0 : v.displayName), 1)
|
|
1985
1988
|
]),
|
|
1986
1989
|
h(d) ? (f(), x("div", _s, [
|
|
1987
1990
|
e("div", Ss, [
|
|
@@ -1989,7 +1992,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
1989
1992
|
S[6] || (S[6] = Ne(" Delivery Date & Time ")),
|
|
1990
1993
|
!R.value && !k.value ? (f(), x("div", xs, " Leave blank to use current date & time ")) : M("", !0)
|
|
1991
1994
|
]),
|
|
1992
|
-
R.value || k.value ? (f(), le(
|
|
1995
|
+
R.value || k.value ? (f(), le(T, {
|
|
1993
1996
|
key: 0,
|
|
1994
1997
|
variant: "tertiary",
|
|
1995
1998
|
label: "Clear",
|
|
@@ -2012,7 +2015,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2012
2015
|
])
|
|
2013
2016
|
]),
|
|
2014
2017
|
K.value ? (f(), x("div", ks, [
|
|
2015
|
-
I(
|
|
2018
|
+
I(C, {
|
|
2016
2019
|
name: "error",
|
|
2017
2020
|
class: "inline-block mr-1",
|
|
2018
2021
|
size: "sm"
|
|
@@ -2028,9 +2031,9 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2028
2031
|
e("div", Cs, [
|
|
2029
2032
|
e("div", As, [
|
|
2030
2033
|
e("span", Ts, _(L.sku.name), 1),
|
|
2031
|
-
e("span",
|
|
2034
|
+
e("span", Fs, _(L.sku.code), 1)
|
|
2032
2035
|
]),
|
|
2033
|
-
e("div",
|
|
2036
|
+
e("div", Ps, [
|
|
2034
2037
|
I(w, {
|
|
2035
2038
|
label: "Receive Quantity",
|
|
2036
2039
|
modelValue: ce.value[W].value,
|
|
@@ -2043,7 +2046,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2043
2046
|
min: 0,
|
|
2044
2047
|
"append-text": ((ne = L.measurement) == null ? void 0 : ne.abbrev) ?? L.sku.unit.abbrev
|
|
2045
2048
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2046
|
-
h(
|
|
2049
|
+
h(N) ? (f(), x("div", qs, [
|
|
2047
2050
|
I(j, {
|
|
2048
2051
|
"model-value": c.value[W],
|
|
2049
2052
|
"onUpdate:modelValue": (de) => Oe(W),
|
|
@@ -2051,7 +2054,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2051
2054
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2052
2055
|
S[7] || (S[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2053
2056
|
])) : M("", !0),
|
|
2054
|
-
h(
|
|
2057
|
+
h(N) && c.value[W] ? (f(), le(w, {
|
|
2055
2058
|
key: 1,
|
|
2056
2059
|
modelValue: ge.value[W].value,
|
|
2057
2060
|
"onUpdate:modelValue": (de) => ge.value[W].value = de,
|
|
@@ -2098,7 +2101,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2098
2101
|
}), Ms = { class: "flex flex-col w-full gap-3" }, js = { class: "flex" }, zs = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, Ks = { class: "flex flex-col gap-16 w-full h-full" }, Hs = { class: "flex justify-between" }, Gs = { class: "fm-typo-en-body-lg-600" }, Ws = { class: "flex gap-2" }, Ys = {
|
|
2099
2102
|
key: 0,
|
|
2100
2103
|
class: "flex items-center gap-1"
|
|
2101
|
-
}, Qs = { class: "fm-typo-en-body-md-400" },
|
|
2104
|
+
}, Qs = { class: "fm-typo-en-body-md-400" }, Js = { class: "flex flex-col gap-8" }, Xs = { class: "flex flex-col gap-4" }, Zs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, eo = { class: "flex gap-1" }, to = { class: "fm-typo-en-body-lg-600" }, ro = {
|
|
2102
2105
|
key: 0,
|
|
2103
2106
|
class: "flex flex-col gap-4"
|
|
2104
2107
|
}, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = { class: "fm-typo-en-body-lg-600" }, no = { class: "flex flex-col gap-4" }, ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, io = {
|
|
@@ -2113,10 +2116,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2113
2116
|
}, vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ho = { class: "fm-typo-en-body-lg-600" }, bo = {
|
|
2114
2117
|
key: 4,
|
|
2115
2118
|
class: "flex flex-col gap-4"
|
|
2116
|
-
}, go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _o = { class: "fm-typo-en-body-lg-600" }, So = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Oo = { class: "flex flex-col gap-8" }, xo = { class: "flex gap-8 items-center" }, wo = { class: "flex-1 fm-typo-en-body-lg-600" }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Ro = { class: "flex w-full gap-4" }, ko = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, No = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Co = ["innerHTML"], Ao = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, To = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" },
|
|
2119
|
+
}, go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _o = { class: "fm-typo-en-body-lg-600" }, So = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Oo = { class: "flex flex-col gap-8" }, xo = { class: "flex gap-8 items-center" }, wo = { class: "flex-1 fm-typo-en-body-lg-600" }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Ro = { class: "flex w-full gap-4" }, ko = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, No = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Co = ["innerHTML"], Ao = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, To = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Fo = {
|
|
2117
2120
|
key: 0,
|
|
2118
2121
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2119
|
-
},
|
|
2122
|
+
}, Po = { class: "py-8" }, qo = { class: "flex justify-end gap-4 items-center" }, Io = { class: "fm-typo-en-body-lg-600" }, Eo = {
|
|
2120
2123
|
key: 1,
|
|
2121
2124
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
2122
2125
|
}, Lo = {
|
|
@@ -2131,7 +2134,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2131
2134
|
}, Ko = { class: "flex-1 flex flex-col items-center" }, Ho = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, Go = { class: "flex-1 flex flex-col items-center" }, Wo = { class: "flex w-full items-center gap-4" }, Yo = {
|
|
2132
2135
|
class: "py-12 flex flex-col gap-4",
|
|
2133
2136
|
name: "received-at header"
|
|
2134
|
-
}, Qo = { class: "fm-typo-en-body-lg-400" },
|
|
2137
|
+
}, Qo = { class: "fm-typo-en-body-lg-400" }, Jo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Xo = { class: "ml-auto" }, Zo = { class: "flex gap-12 content-stretch" }, en = {
|
|
2135
2138
|
class: "flex flex-col w-40",
|
|
2136
2139
|
name: "circles"
|
|
2137
2140
|
}, tn = { class: "flex-1 flex flex-col items-center" }, rn = {
|
|
@@ -2153,7 +2156,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2153
2156
|
},
|
|
2154
2157
|
emits: ["update:show", "submitted"],
|
|
2155
2158
|
setup(g, { emit: r }) {
|
|
2156
|
-
const o = g, p = r,
|
|
2159
|
+
const o = g, p = r, l = Ye(), n = qe(), a = Pe(), s = _e(), i = Me(), O = H(
|
|
2157
2160
|
() => {
|
|
2158
2161
|
var t, m;
|
|
2159
2162
|
return {
|
|
@@ -2161,14 +2164,14 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2161
2164
|
name: ((m = i.sessionUser.value) == null ? void 0 : m.displayName) ?? ""
|
|
2162
2165
|
};
|
|
2163
2166
|
}
|
|
2164
|
-
), $ =
|
|
2167
|
+
), $ = Xt(), { t: b } = st(), F = H(
|
|
2165
2168
|
() => {
|
|
2166
|
-
var t, m,
|
|
2167
|
-
return ((m = (t = o.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : m.internal) === "restaurant" || ((w = (
|
|
2169
|
+
var t, m, C, w;
|
|
2170
|
+
return ((m = (t = o.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : m.internal) === "restaurant" || ((w = (C = o.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : w.internal) === "warehouse" ? Ce.TRANSFER : Ce.PURCHASE;
|
|
2168
2171
|
}
|
|
2169
2172
|
), u = H(() => {
|
|
2170
|
-
var
|
|
2171
|
-
const t = (
|
|
2173
|
+
var C;
|
|
2174
|
+
const t = (C = o.shipments) == null ? void 0 : C.find((w) => {
|
|
2172
2175
|
var j;
|
|
2173
2176
|
return w.ref === ((j = o.purchaseOrder) == null ? void 0 : j._id);
|
|
2174
2177
|
});
|
|
@@ -2181,7 +2184,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2181
2184
|
}
|
|
2182
2185
|
}
|
|
2183
2186
|
return m;
|
|
2184
|
-
}),
|
|
2187
|
+
}), N = Y(!1), d = Y(""), c = Y(!0), y = Ie(), R = Mt(y.getWorkflowConfig), k = Ot(), z = H(() => {
|
|
2185
2188
|
if (!o.purchaseOrder)
|
|
2186
2189
|
return [];
|
|
2187
2190
|
const t = R.result.value;
|
|
@@ -2198,28 +2201,28 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2198
2201
|
purchaseOrderRequest: o.poRequest,
|
|
2199
2202
|
purchaseOrder: o.purchaseOrder
|
|
2200
2203
|
};
|
|
2201
|
-
let
|
|
2204
|
+
let C = [];
|
|
2202
2205
|
try {
|
|
2203
|
-
t.state === dt.error ? (console.error("Error fetching workflow config:", t.error),
|
|
2206
|
+
t.state === dt.error ? (console.error("Error fetching workflow config:", t.error), C = Qe.getAvailableActions({
|
|
2204
2207
|
...m,
|
|
2205
2208
|
orderConfig: Qe.getDefaultConfig()
|
|
2206
2209
|
}).actions.filter(
|
|
2207
2210
|
(w) => (
|
|
2208
2211
|
// TODO: create receiveStock & processRequest dialog
|
|
2209
2212
|
// to create their payload
|
|
2210
|
-
w !==
|
|
2213
|
+
w !== P.enum.receiveStock && w !== P.enum.processRequest && w !== P.enum.closeRequest
|
|
2211
2214
|
)
|
|
2212
|
-
)) :
|
|
2215
|
+
)) : C = Qe.getAvailableActions({
|
|
2213
2216
|
...m,
|
|
2214
2217
|
orderConfig: t.data
|
|
2215
2218
|
}).actions.filter(
|
|
2216
|
-
(w) => w !==
|
|
2219
|
+
(w) => w !== P.enum.receiveStock && w !== P.enum.processRequest && w !== P.enum.closeRequest
|
|
2217
2220
|
);
|
|
2218
2221
|
} catch (w) {
|
|
2219
2222
|
console.error("Error getting available actions:", w);
|
|
2220
2223
|
}
|
|
2221
|
-
return o.scope === "approval" && (
|
|
2222
|
-
}),
|
|
2224
|
+
return o.scope === "approval" && (C = C.filter((w) => w !== P.enum.completeReceive)), C;
|
|
2225
|
+
}), A = Pt(o, "show"), K = H(() => [
|
|
2223
2226
|
{
|
|
2224
2227
|
label: b("inventory.transfer.receiveRequest.details.overview"),
|
|
2225
2228
|
value: "overview"
|
|
@@ -2228,16 +2231,16 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2228
2231
|
label: b("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
2229
2232
|
value: "deliveryHistory"
|
|
2230
2233
|
}
|
|
2231
|
-
]),
|
|
2234
|
+
]), Z = Y(K.value[0]);
|
|
2232
2235
|
Ct(
|
|
2233
2236
|
() => o.show,
|
|
2234
2237
|
(t) => {
|
|
2235
|
-
t && (
|
|
2238
|
+
t && (Z.value = K.value[0]);
|
|
2236
2239
|
}
|
|
2237
2240
|
);
|
|
2238
|
-
async function oe(t, m,
|
|
2241
|
+
async function oe(t, m, C, w, j) {
|
|
2239
2242
|
return new Promise((U, ee) => {
|
|
2240
|
-
|
|
2243
|
+
l.open({
|
|
2241
2244
|
closeButton: !1,
|
|
2242
2245
|
title: w.title,
|
|
2243
2246
|
message: w.message,
|
|
@@ -2246,7 +2249,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2246
2249
|
}).onPrimary(async () => {
|
|
2247
2250
|
var L, W, te, E;
|
|
2248
2251
|
const v = [];
|
|
2249
|
-
|
|
2252
|
+
C === P.enum.approveRequest ? (v.push({
|
|
2250
2253
|
action: "approveRequest",
|
|
2251
2254
|
payload: null
|
|
2252
2255
|
}), m.fulfillment && v.push({
|
|
@@ -2258,7 +2261,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2258
2261
|
items: m.fulfillment.items,
|
|
2259
2262
|
createdBy: O.value
|
|
2260
2263
|
}
|
|
2261
|
-
})) :
|
|
2264
|
+
})) : C === P.enum.processRequest ? m.fulfillment && v.push({
|
|
2262
2265
|
action: "processRequest",
|
|
2263
2266
|
payload: {
|
|
2264
2267
|
fulfillmentId: "",
|
|
@@ -2267,24 +2270,24 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2267
2270
|
items: m.fulfillment.items,
|
|
2268
2271
|
createdBy: O.value
|
|
2269
2272
|
}
|
|
2270
|
-
}) :
|
|
2273
|
+
}) : C === P.enum.rejectRequest ? v.push({
|
|
2271
2274
|
action: "rejectRequest",
|
|
2272
2275
|
payload: null
|
|
2273
|
-
}) :
|
|
2276
|
+
}) : C === P.enum.closeRequest && v.push({
|
|
2274
2277
|
action: "closeRequest",
|
|
2275
2278
|
payload: null
|
|
2276
2279
|
});
|
|
2277
2280
|
try {
|
|
2278
2281
|
await k({
|
|
2279
2282
|
operate: {
|
|
2280
|
-
operation:
|
|
2283
|
+
operation: C,
|
|
2281
2284
|
doc: t,
|
|
2282
2285
|
options: m
|
|
2283
2286
|
},
|
|
2284
2287
|
operateV2: {
|
|
2285
2288
|
_id: ((L = o.purchaseOrder) == null ? void 0 : L._id) ?? "",
|
|
2286
2289
|
_rev: ((W = o.purchaseOrder) == null ? void 0 : W._rev) ?? "",
|
|
2287
|
-
action:
|
|
2290
|
+
action: C,
|
|
2288
2291
|
payloads: v
|
|
2289
2292
|
// add payload if action is receiveStock or processRequest
|
|
2290
2293
|
},
|
|
@@ -2296,14 +2299,14 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2296
2299
|
}).onSecondary(() => {
|
|
2297
2300
|
U("cancelled");
|
|
2298
2301
|
for (let v = 0; v < j + 2; v++)
|
|
2299
|
-
|
|
2302
|
+
l.close();
|
|
2300
2303
|
}).onClose(() => {
|
|
2301
2304
|
});
|
|
2302
2305
|
});
|
|
2303
2306
|
}
|
|
2304
2307
|
async function ce(t) {
|
|
2305
2308
|
var j, U, ee, v;
|
|
2306
|
-
if (t ===
|
|
2309
|
+
if (t === P.enum.receiveStock)
|
|
2307
2310
|
return;
|
|
2308
2311
|
const m = St[t];
|
|
2309
2312
|
if (!m) {
|
|
@@ -2314,27 +2317,27 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2314
2317
|
});
|
|
2315
2318
|
return;
|
|
2316
2319
|
}
|
|
2317
|
-
const { successMessage:
|
|
2320
|
+
const { successMessage: C, ...w } = m;
|
|
2318
2321
|
if (o.purchaseOrder) {
|
|
2319
|
-
d.value = `${t}`,
|
|
2322
|
+
d.value = `${t}`, N.value = !0, c.value = !1;
|
|
2320
2323
|
const L = {};
|
|
2321
2324
|
let W = 0;
|
|
2322
|
-
if ((t ===
|
|
2323
|
-
t ===
|
|
2325
|
+
if ((t === P.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
2326
|
+
t === P.enum.completeReceive) && a.autoReceiveWarehouse)
|
|
2324
2327
|
L.autoReceive = !0;
|
|
2325
|
-
else if ((t ===
|
|
2328
|
+
else if ((t === P.enum.approveRequest || t === P.enum.processRequest) && a.acceptRequireFulfillment) {
|
|
2326
2329
|
const te = (U = (j = o.poRequest) == null ? void 0 : j.from) == null ? void 0 : U.dbName, E = (v = (ee = o.poRequest) == null ? void 0 : ee.to) == null ? void 0 : v.dbName;
|
|
2327
2330
|
if (te && E && (te.startsWith("warehouse_") || E.startsWith("warehouse_"))) {
|
|
2328
2331
|
const ne = await new Promise((de, we) => {
|
|
2329
|
-
|
|
2332
|
+
l.open({
|
|
2330
2333
|
closeButton: !1,
|
|
2331
2334
|
title: "Confirm transfer amount",
|
|
2332
|
-
dialogComponent:
|
|
2335
|
+
dialogComponent: Jt,
|
|
2333
2336
|
dialogComponentProps: {
|
|
2334
2337
|
purchaseOrder: o.purchaseOrder,
|
|
2335
2338
|
confirm: de,
|
|
2336
2339
|
"onUpdate:show": ($e) => {
|
|
2337
|
-
$e || (d.value = "",
|
|
2340
|
+
$e || (d.value = "", N.value = !1, c.value = !0, W++, l.close()), we("cancelled");
|
|
2338
2341
|
}
|
|
2339
2342
|
}
|
|
2340
2343
|
});
|
|
@@ -2351,7 +2354,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2351
2354
|
W
|
|
2352
2355
|
) === "submitted" && (n.open({
|
|
2353
2356
|
title: "Success",
|
|
2354
|
-
message:
|
|
2357
|
+
message: C,
|
|
2355
2358
|
type: "success"
|
|
2356
2359
|
}), p("update:show", !1), p("submitted"));
|
|
2357
2360
|
} catch (te) {
|
|
@@ -2361,25 +2364,25 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2361
2364
|
type: "error"
|
|
2362
2365
|
}), console.error("Error when submitting PO operation", t, o.purchaseOrder, te);
|
|
2363
2366
|
} finally {
|
|
2364
|
-
d.value = "",
|
|
2367
|
+
d.value = "", N.value = !1, c.value = !0;
|
|
2365
2368
|
}
|
|
2366
2369
|
}
|
|
2367
2370
|
}
|
|
2368
2371
|
const Oe = H(() => {
|
|
2369
2372
|
var t, m;
|
|
2370
|
-
return ((t = o.purchaseOrder) == null ? void 0 : t.status) ===
|
|
2373
|
+
return ((t = o.purchaseOrder) == null ? void 0 : t.status) === Q.enum.RECEIVING || ((m = o.purchaseOrder) == null ? void 0 : m.status) === Q.enum.COMPLETE;
|
|
2371
2374
|
}), ge = H(() => o.purchaseOrder ? He(o.purchaseOrder) : {}), xe = H(() => {
|
|
2372
2375
|
const t = o.purchaseOrder;
|
|
2373
2376
|
if (!t) return { status: "", statusClass: "" };
|
|
2374
|
-
const { partial: m, over:
|
|
2377
|
+
const { partial: m, over: C } = Ze(ge.value), w = et(t.status, m, C);
|
|
2375
2378
|
let j = b(`inventory.transfer.status.${w}`), U = `${t.status}`.toLocaleLowerCase("en-us");
|
|
2376
|
-
return w ===
|
|
2379
|
+
return w === Q.enum.CLOSE && (j = `${b(`inventory.transfer.status.${Q.enum.COMPLETE}`)}`), w === "PARTIAL_RECEIVED" && U === Q.enum.PROCESSING.toLocaleLowerCase("en-us") && (U = Q.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2377
2380
|
status: j,
|
|
2378
2381
|
statusClass: `fm-status-badge fm-status-badge-${U}`
|
|
2379
2382
|
};
|
|
2380
2383
|
}), he = H(() => {
|
|
2381
2384
|
var U, ee;
|
|
2382
|
-
const t = ((U = o.purchaseOrder) == null ? void 0 : U.deliveryOrder) ?? [], m = ((ee = o.purchaseOrder) == null ? void 0 : ee.deliveryFullfillment) ?? [],
|
|
2385
|
+
const t = ((U = o.purchaseOrder) == null ? void 0 : U.deliveryOrder) ?? [], m = ((ee = o.purchaseOrder) == null ? void 0 : ee.deliveryFullfillment) ?? [], C = [
|
|
2383
2386
|
...t.map((v) => ({
|
|
2384
2387
|
createdAt: v.createdAt,
|
|
2385
2388
|
type: "grn",
|
|
@@ -2391,9 +2394,9 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2391
2394
|
doc: v
|
|
2392
2395
|
}))
|
|
2393
2396
|
];
|
|
2394
|
-
|
|
2397
|
+
C.reverse().sort((v, L) => v.createdAt.localeCompare(L.createdAt));
|
|
2395
2398
|
function w(v) {
|
|
2396
|
-
var te, E, ne, de, we, $e,
|
|
2399
|
+
var te, E, ne, de, we, $e, J, ie, ae, pe;
|
|
2397
2400
|
const L = m.findIndex((re) => re.id === v.fullfillmentId), W = [
|
|
2398
2401
|
(E = (te = m[L]) == null ? void 0 : te.netSuite) != null && E.refNo ? {
|
|
2399
2402
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
@@ -2401,7 +2404,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2401
2404
|
} : null,
|
|
2402
2405
|
(we = v == null ? void 0 : v.netSuite) != null && we.refNo ? {
|
|
2403
2406
|
label: "Netsuite ref no.",
|
|
2404
|
-
values: [`${($e = v == null ? void 0 : v.netSuite) == null ? void 0 : $e.refNo} (${((
|
|
2407
|
+
values: [`${($e = v == null ? void 0 : v.netSuite) == null ? void 0 : $e.refNo} (${((J = v == null ? void 0 : v.netSuite) == null ? void 0 : J.id) ?? "-"})`]
|
|
2405
2408
|
} : null,
|
|
2406
2409
|
(ie = v == null ? void 0 : v.netSuite) != null && ie.recordType ? {
|
|
2407
2410
|
label: "Netsuite Type",
|
|
@@ -2427,27 +2430,27 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2427
2430
|
label: "Received items",
|
|
2428
2431
|
values: v.received.map((re) => {
|
|
2429
2432
|
var Re;
|
|
2430
|
-
return
|
|
2431
|
-
|
|
2433
|
+
return q("div", [
|
|
2434
|
+
q(
|
|
2432
2435
|
"div",
|
|
2433
2436
|
{
|
|
2434
2437
|
class: "flex gap-4"
|
|
2435
2438
|
},
|
|
2436
2439
|
[
|
|
2437
|
-
|
|
2440
|
+
q(
|
|
2438
2441
|
"div",
|
|
2439
2442
|
{
|
|
2440
2443
|
class: "flex flex-col"
|
|
2441
2444
|
},
|
|
2442
2445
|
[
|
|
2443
|
-
|
|
2446
|
+
q(
|
|
2444
2447
|
"span",
|
|
2445
2448
|
{
|
|
2446
2449
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2447
2450
|
},
|
|
2448
2451
|
`${re.sku.name}`
|
|
2449
2452
|
),
|
|
2450
|
-
|
|
2453
|
+
q(
|
|
2451
2454
|
"span",
|
|
2452
2455
|
{
|
|
2453
2456
|
class: "fm-typo-en-body-md-400"
|
|
@@ -2456,26 +2459,26 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2456
2459
|
)
|
|
2457
2460
|
]
|
|
2458
2461
|
),
|
|
2459
|
-
|
|
2462
|
+
q(
|
|
2460
2463
|
"div",
|
|
2461
2464
|
{
|
|
2462
2465
|
class: "ml-auto flex flex-col"
|
|
2463
2466
|
},
|
|
2464
2467
|
[
|
|
2465
|
-
|
|
2468
|
+
q(
|
|
2466
2469
|
"div",
|
|
2467
2470
|
{
|
|
2468
2471
|
class: "ml-auto flex gap-1"
|
|
2469
2472
|
},
|
|
2470
2473
|
[
|
|
2471
|
-
|
|
2474
|
+
q(
|
|
2472
2475
|
"span",
|
|
2473
2476
|
{
|
|
2474
2477
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2475
2478
|
},
|
|
2476
2479
|
ye(re.amount, !1)
|
|
2477
2480
|
),
|
|
2478
|
-
|
|
2481
|
+
q(
|
|
2479
2482
|
"span",
|
|
2480
2483
|
{
|
|
2481
2484
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -2484,7 +2487,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2484
2487
|
)
|
|
2485
2488
|
]
|
|
2486
2489
|
),
|
|
2487
|
-
|
|
2490
|
+
q(
|
|
2488
2491
|
"div",
|
|
2489
2492
|
{
|
|
2490
2493
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -2529,27 +2532,27 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2529
2532
|
label: "Receiveable items",
|
|
2530
2533
|
values: v.items.map((E) => {
|
|
2531
2534
|
var ne;
|
|
2532
|
-
return
|
|
2533
|
-
|
|
2535
|
+
return q("div", [
|
|
2536
|
+
q(
|
|
2534
2537
|
"div",
|
|
2535
2538
|
{
|
|
2536
2539
|
class: "flex gap-4"
|
|
2537
2540
|
},
|
|
2538
2541
|
[
|
|
2539
|
-
|
|
2542
|
+
q(
|
|
2540
2543
|
"div",
|
|
2541
2544
|
{
|
|
2542
2545
|
class: "flex flex-col"
|
|
2543
2546
|
},
|
|
2544
2547
|
[
|
|
2545
|
-
|
|
2548
|
+
q(
|
|
2546
2549
|
"span",
|
|
2547
2550
|
{
|
|
2548
2551
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2549
2552
|
},
|
|
2550
2553
|
`${E.sku.name}`
|
|
2551
2554
|
),
|
|
2552
|
-
|
|
2555
|
+
q(
|
|
2553
2556
|
"span",
|
|
2554
2557
|
{
|
|
2555
2558
|
class: "fm-typo-en-body-md-400"
|
|
@@ -2558,26 +2561,26 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2558
2561
|
)
|
|
2559
2562
|
]
|
|
2560
2563
|
),
|
|
2561
|
-
|
|
2564
|
+
q(
|
|
2562
2565
|
"div",
|
|
2563
2566
|
{
|
|
2564
2567
|
class: "ml-auto flex flex-col"
|
|
2565
2568
|
},
|
|
2566
2569
|
[
|
|
2567
|
-
|
|
2570
|
+
q(
|
|
2568
2571
|
"div",
|
|
2569
2572
|
{
|
|
2570
2573
|
class: "ml-auto flex gap-1"
|
|
2571
2574
|
},
|
|
2572
2575
|
[
|
|
2573
|
-
|
|
2576
|
+
q(
|
|
2574
2577
|
"span",
|
|
2575
2578
|
{
|
|
2576
2579
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2577
2580
|
},
|
|
2578
2581
|
ye(E.amount, !1)
|
|
2579
2582
|
),
|
|
2580
|
-
|
|
2583
|
+
q(
|
|
2581
2584
|
"span",
|
|
2582
2585
|
{
|
|
2583
2586
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -2586,7 +2589,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2586
2589
|
)
|
|
2587
2590
|
]
|
|
2588
2591
|
),
|
|
2589
|
-
|
|
2592
|
+
q(
|
|
2590
2593
|
"div",
|
|
2591
2594
|
{
|
|
2592
2595
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -2607,7 +2610,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2607
2610
|
].filter((E) => !!E)
|
|
2608
2611
|
};
|
|
2609
2612
|
}
|
|
2610
|
-
return
|
|
2613
|
+
return C.map((v) => {
|
|
2611
2614
|
switch (v.type) {
|
|
2612
2615
|
case "grn":
|
|
2613
2616
|
return w(v.doc);
|
|
@@ -2621,23 +2624,23 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2621
2624
|
...yt(0),
|
|
2622
2625
|
currency: Te()
|
|
2623
2626
|
};
|
|
2624
|
-
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((
|
|
2625
|
-
...ft(
|
|
2627
|
+
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((C, w) => ({
|
|
2628
|
+
...ft(C, w.totalCost ?? t),
|
|
2626
2629
|
currency: Te()
|
|
2627
2630
|
}), t)) ?? t;
|
|
2628
2631
|
});
|
|
2629
2632
|
function B(t) {
|
|
2630
2633
|
var U;
|
|
2631
|
-
const
|
|
2634
|
+
const C = (((U = o.purchaseOrder) == null ? void 0 : U.version) ?? ke.enum[1]) === ke.enum[2] ? t.id : t.sku._id, w = o.receivedMap[C];
|
|
2632
2635
|
return `<span class="${se(t)} fm-typo-en-body-lg-600">${De.toFormatString({ value: w.received })}</span>/${Et(t.quantity, t.sku.unit, t.measurement)}`;
|
|
2633
2636
|
}
|
|
2634
2637
|
function se(t) {
|
|
2635
2638
|
var L;
|
|
2636
|
-
const
|
|
2639
|
+
const C = (((L = o.purchaseOrder) == null ? void 0 : L.version) ?? ke.enum[1]) === ke.enum[2] ? t.id : t.sku._id, w = o.receivedMap[C], { isPartialReceive: j, isNoReceive: U, isOverReceive: ee, isFullReceive: v } = Kt(w);
|
|
2637
2640
|
return U ? "text-fm-color-typo-tertiary" : j ? "text-fm-color-system-warning-300" : ee ? "text-fm-color-system-error-300" : v ? "text-fm-color-system-success-300" : "";
|
|
2638
2641
|
}
|
|
2639
2642
|
const D = H(() => {
|
|
2640
|
-
var t, m,
|
|
2643
|
+
var t, m, C;
|
|
2641
2644
|
return (t = o.purchaseOrder) != null && t.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === ke.enum[2] ? o.purchaseOrder.items.reduce((w, j) => {
|
|
2642
2645
|
var ee, v;
|
|
2643
2646
|
const U = (v = (ee = o.purchaseOrder) == null ? void 0 : ee.itemsAtSubmission) == null ? void 0 : v.find(
|
|
@@ -2647,7 +2650,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2647
2650
|
originalAmount: Number(De.toFormatString({ value: U.quantity })),
|
|
2648
2651
|
newAmount: Number(De.toFormatString({ value: j.quantity }))
|
|
2649
2652
|
}), w;
|
|
2650
|
-
}, /* @__PURE__ */ new Map()) : (
|
|
2653
|
+
}, /* @__PURE__ */ new Map()) : (C = o.purchaseOrder) == null ? void 0 : C.items.reduce((w, j) => {
|
|
2651
2654
|
var L, W;
|
|
2652
2655
|
const U = (W = (L = o.purchaseOrder) == null ? void 0 : L.itemsAtSubmission) == null ? void 0 : W.find(
|
|
2653
2656
|
(te) => te.sku._id === j.sku._id
|
|
@@ -2658,19 +2661,19 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2658
2661
|
}), w;
|
|
2659
2662
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2660
2663
|
}), S = (t) => {
|
|
2661
|
-
var
|
|
2664
|
+
var C, w;
|
|
2662
2665
|
const m = D.value;
|
|
2663
|
-
return ((
|
|
2664
|
-
},
|
|
2665
|
-
var
|
|
2666
|
+
return ((C = o.purchaseOrder) == null ? void 0 : C.version) === ke.enum[2] ? m.has(t.id) : m.has((w = t.sku) == null ? void 0 : w.code);
|
|
2667
|
+
}, T = (t) => {
|
|
2668
|
+
var C, w;
|
|
2666
2669
|
const m = D.value;
|
|
2667
|
-
return ((
|
|
2670
|
+
return ((C = o.purchaseOrder) == null ? void 0 : C.version) === ke.enum[2] ? m.get(t.id) : m.get((w = t.sku) == null ? void 0 : w.code);
|
|
2668
2671
|
};
|
|
2669
2672
|
return (t, m) => {
|
|
2670
|
-
const
|
|
2673
|
+
const C = G("FmButton"), w = G("FmButtonGroup"), j = G("FmChip"), U = G("FmIcon"), ee = G("FmMenuDivider"), v = G("FmCard"), L = G("FmTooltip"), W = G("FmSpacer"), te = G("FmSideSheet");
|
|
2671
2674
|
return f(), le(te, {
|
|
2672
|
-
modelValue: h(
|
|
2673
|
-
"onUpdate:modelValue": m[8] || (m[8] = (E) => At(
|
|
2675
|
+
modelValue: h(A),
|
|
2676
|
+
"onUpdate:modelValue": m[8] || (m[8] = (E) => At(A) ? A.value = E : null),
|
|
2674
2677
|
"dismiss-away": c.value,
|
|
2675
2678
|
"max-width": 600,
|
|
2676
2679
|
"close-button": !1
|
|
@@ -2681,7 +2684,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2681
2684
|
e("div", Ms, [
|
|
2682
2685
|
e("div", js, [
|
|
2683
2686
|
e("div", zs, _(h(b)("inventory.transfer.receiveRequest.details.title") + ((E = t.purchaseOrder) != null && E.seqNumber ? ` #${(ne = t.purchaseOrder) == null ? void 0 : ne.seqNumber}` : "")), 1),
|
|
2684
|
-
I(
|
|
2687
|
+
I(C, {
|
|
2685
2688
|
class: "ml-auto -m-2",
|
|
2686
2689
|
variant: "tertiary",
|
|
2687
2690
|
"prepend-icon": "close",
|
|
@@ -2690,10 +2693,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2690
2693
|
]),
|
|
2691
2694
|
I(w, {
|
|
2692
2695
|
items: K.value,
|
|
2693
|
-
modelValue:
|
|
2694
|
-
"onUpdate:modelValue": m[1] || (m[1] = (de) =>
|
|
2696
|
+
modelValue: Z.value,
|
|
2697
|
+
"onUpdate:modelValue": m[1] || (m[1] = (de) => Z.value = de)
|
|
2695
2698
|
}, null, 8, ["items", "modelValue"]),
|
|
2696
|
-
t.purchaseOrder &&
|
|
2699
|
+
t.purchaseOrder && Z.value.value === "deliveryHistory" ? (f(), le(Us, {
|
|
2697
2700
|
key: 0,
|
|
2698
2701
|
"purchase-order": t.purchaseOrder,
|
|
2699
2702
|
"received-info-map": ge.value,
|
|
@@ -2708,19 +2711,19 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2708
2711
|
var E, ne, de, we, $e;
|
|
2709
2712
|
return [
|
|
2710
2713
|
e("div", Ks, [
|
|
2711
|
-
|
|
2714
|
+
Z.value.value === "overview" ? (f(), x(ue, { key: 0 }, [
|
|
2712
2715
|
e("div", null, [
|
|
2713
2716
|
I(v, {
|
|
2714
2717
|
variant: "outlined",
|
|
2715
2718
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
2716
2719
|
}, {
|
|
2717
2720
|
default: X(() => {
|
|
2718
|
-
var
|
|
2721
|
+
var J, ie, ae, pe, re, Re, ot, nt, at;
|
|
2719
2722
|
return [
|
|
2720
2723
|
e("div", Hs, [
|
|
2721
2724
|
e("div", Gs, _(h(b)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
2722
2725
|
e("div", Ws, [
|
|
2723
|
-
I(
|
|
2726
|
+
I(Fe, null, {
|
|
2724
2727
|
default: X(() => {
|
|
2725
2728
|
var lt;
|
|
2726
2729
|
return [
|
|
@@ -2744,12 +2747,12 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2744
2747
|
])
|
|
2745
2748
|
]),
|
|
2746
2749
|
I(ee),
|
|
2747
|
-
e("div",
|
|
2748
|
-
e("div",
|
|
2749
|
-
e("div",
|
|
2750
|
+
e("div", Js, [
|
|
2751
|
+
e("div", Xs, [
|
|
2752
|
+
e("div", Zs, [
|
|
2750
2753
|
e("div", eo, _(h(b)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2751
2754
|
]),
|
|
2752
|
-
e("div", to, _(h(je)(((
|
|
2755
|
+
e("div", to, _(h(je)(((J = t.purchaseOrder) == null ? void 0 : J._id) ?? "")), 1)
|
|
2753
2756
|
]),
|
|
2754
2757
|
(ie = t.purchaseOrder) != null && ie.effectiveAt ? (f(), x("div", ro, [
|
|
2755
2758
|
e("div", so, _(h(b)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
@@ -2758,7 +2761,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2758
2761
|
e("div", no, [
|
|
2759
2762
|
e("div", ao, _(h(b)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2760
2763
|
e("div", lo, _(h(b)(
|
|
2761
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
2764
|
+
`inventory.transfer.receiveRequest.details.type.${F.value.toLocaleLowerCase("en-US")}`
|
|
2762
2765
|
)), 1)
|
|
2763
2766
|
]),
|
|
2764
2767
|
(re = (pe = t.purchaseOrder) == null ? void 0 : pe.supplier) != null && re.name ? (f(), x("div", io, [
|
|
@@ -2786,7 +2789,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2786
2789
|
I(Wr, {
|
|
2787
2790
|
"po-request": t.poRequest,
|
|
2788
2791
|
purchaseOrder: t.purchaseOrder,
|
|
2789
|
-
transferType:
|
|
2792
|
+
transferType: F.value,
|
|
2790
2793
|
transferToDbName: t.transferToDbName,
|
|
2791
2794
|
scope: t.scope
|
|
2792
2795
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
@@ -2802,10 +2805,10 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2802
2805
|
"z-index": 51
|
|
2803
2806
|
}, {
|
|
2804
2807
|
content: X(() => {
|
|
2805
|
-
var
|
|
2808
|
+
var J, ie;
|
|
2806
2809
|
return [
|
|
2807
2810
|
e("div", $o, [
|
|
2808
|
-
(f(!0), x(ue, null, be((ie = (
|
|
2811
|
+
(f(!0), x(ue, null, be((ie = (J = t.purchaseOrder) == null ? void 0 : J.netSuite) == null ? void 0 : ie.missingItems, (ae, pe) => (f(), x("div", {
|
|
2809
2812
|
class: "flex justify-center align-middle",
|
|
2810
2813
|
key: pe
|
|
2811
2814
|
}, [
|
|
@@ -2830,7 +2833,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2830
2833
|
])
|
|
2831
2834
|
]),
|
|
2832
2835
|
I(ee),
|
|
2833
|
-
(f(!0), x(ue, null, be((($e = t.purchaseOrder) == null ? void 0 : $e.items) ?? [], (
|
|
2836
|
+
(f(!0), x(ue, null, be((($e = t.purchaseOrder) == null ? void 0 : $e.items) ?? [], (J, ie) => {
|
|
2834
2837
|
var ae;
|
|
2835
2838
|
return f(), x("div", {
|
|
2836
2839
|
key: ie,
|
|
@@ -2838,8 +2841,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2838
2841
|
}, [
|
|
2839
2842
|
e("div", Ro, [
|
|
2840
2843
|
e("div", ko, [
|
|
2841
|
-
Ne(_(
|
|
2842
|
-
S(
|
|
2844
|
+
Ne(_(J.name) + " ", 1),
|
|
2845
|
+
S(J) ? (f(), le(L, {
|
|
2843
2846
|
key: 0,
|
|
2844
2847
|
variant: "rich",
|
|
2845
2848
|
placement: "top",
|
|
@@ -2850,8 +2853,8 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2850
2853
|
return [
|
|
2851
2854
|
e("div", Do, [
|
|
2852
2855
|
m[9] || (m[9] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
2853
|
-
e("div", null, "Original Amount: " + _((pe =
|
|
2854
|
-
e("div", null, " New Amount: " + _((re =
|
|
2856
|
+
e("div", null, "Original Amount: " + _((pe = T(J)) == null ? void 0 : pe.originalAmount), 1),
|
|
2857
|
+
e("div", null, " New Amount: " + _((re = T(J)) == null ? void 0 : re.newAmount), 1)
|
|
2855
2858
|
])
|
|
2856
2859
|
];
|
|
2857
2860
|
}),
|
|
@@ -2867,30 +2870,30 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2867
2870
|
]),
|
|
2868
2871
|
e("div", No, [
|
|
2869
2872
|
e("span", {
|
|
2870
|
-
innerHTML: B(
|
|
2873
|
+
innerHTML: B(J)
|
|
2871
2874
|
}, null, 8, Co)
|
|
2872
2875
|
])
|
|
2873
2876
|
]),
|
|
2874
2877
|
e("div", Ao, [
|
|
2875
|
-
e("div", To, _(
|
|
2876
|
-
(ae =
|
|
2878
|
+
e("div", To, _(J.code), 1),
|
|
2879
|
+
(ae = J.totalCost) != null && ae.amount && h(a).enableTotalCost ? (f(), x("div", Fo, " (" + _(h(Ve)(J.totalCost)) + ") ", 1)) : M("", !0)
|
|
2877
2880
|
])
|
|
2878
2881
|
]);
|
|
2879
2882
|
}), 128)),
|
|
2880
2883
|
+h(ye)(V.value) ? (f(), x(ue, { key: 0 }, [
|
|
2881
|
-
e("div",
|
|
2884
|
+
e("div", Po, [
|
|
2882
2885
|
I(ee)
|
|
2883
2886
|
]),
|
|
2884
|
-
e("div",
|
|
2887
|
+
e("div", qo, [
|
|
2885
2888
|
m[10] || (m[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2886
2889
|
e("div", Io, _(h(Ve)(V.value)), 1)
|
|
2887
2890
|
])
|
|
2888
2891
|
], 64)) : M("", !0)
|
|
2889
2892
|
])
|
|
2890
2893
|
])
|
|
2891
|
-
], 64)) :
|
|
2894
|
+
], 64)) : Z.value.value === "deliveryHistory" ? (f(), x("div", Eo, [
|
|
2892
2895
|
he.value.length ? (f(), x("div", Mo, [
|
|
2893
|
-
(f(!0), x(ue, null, be(he.value, (
|
|
2896
|
+
(f(!0), x(ue, null, be(he.value, (J, ie) => (f(), x(ue, { key: ie }, [
|
|
2894
2897
|
e("div", jo, [
|
|
2895
2898
|
e("div", zo, [
|
|
2896
2899
|
e("div", Ko, [
|
|
@@ -2905,7 +2908,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2905
2908
|
}, null, 2)
|
|
2906
2909
|
]),
|
|
2907
2910
|
e("div", Ho, [
|
|
2908
|
-
|
|
2911
|
+
J.header === "Received" ? (f(), le(U, {
|
|
2909
2912
|
key: 0,
|
|
2910
2913
|
name: "local_shipping",
|
|
2911
2914
|
outline: "",
|
|
@@ -2926,13 +2929,13 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2926
2929
|
]),
|
|
2927
2930
|
e("div", Wo, [
|
|
2928
2931
|
e("div", Yo, [
|
|
2929
|
-
e("div", Qo, _(
|
|
2930
|
-
e("div",
|
|
2932
|
+
e("div", Qo, _(J.header), 1),
|
|
2933
|
+
e("div", Jo, _(J.date), 1)
|
|
2931
2934
|
]),
|
|
2932
|
-
e("div",
|
|
2933
|
-
|
|
2935
|
+
e("div", Xo, [
|
|
2936
|
+
J.header === "Received" && J.deliveryOrder && t.purchaseOrder ? (f(), le(vs, {
|
|
2934
2937
|
key: 0,
|
|
2935
|
-
deliveryOrder:
|
|
2938
|
+
deliveryOrder: J.deliveryOrder,
|
|
2936
2939
|
purchaseOrder: t.purchaseOrder,
|
|
2937
2940
|
onSubmitted: m[3] || (m[3] = () => {
|
|
2938
2941
|
p("update:show", !1), p("submitted");
|
|
@@ -2941,7 +2944,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2941
2944
|
])
|
|
2942
2945
|
])
|
|
2943
2946
|
]),
|
|
2944
|
-
e("div",
|
|
2947
|
+
e("div", Zo, [
|
|
2945
2948
|
e("div", en, [
|
|
2946
2949
|
e("div", tn, [
|
|
2947
2950
|
e("div", {
|
|
@@ -2962,7 +2965,7 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
2962
2965
|
}, {
|
|
2963
2966
|
default: X(() => [
|
|
2964
2967
|
e("div", sn, [
|
|
2965
|
-
(f(!0), x(ue, null, be(
|
|
2968
|
+
(f(!0), x(ue, null, be(J.info, (ae, pe) => (f(), x("div", {
|
|
2966
2969
|
key: pe,
|
|
2967
2970
|
class: "flex flex-col gap-4"
|
|
2968
2971
|
}, [
|
|
@@ -3005,37 +3008,37 @@ const Jt = { class: "flex flex-row-reverse" }, er = /* @__PURE__ */ Se({
|
|
|
3005
3008
|
"side-sheet-footer": X(() => [
|
|
3006
3009
|
e("div", an, [
|
|
3007
3010
|
(f(!0), x(ue, null, be(z.value, (E) => (f(), x(ue, null, [
|
|
3008
|
-
h(
|
|
3011
|
+
h(Xe)[E].available != !1 ? (f(), le(C, {
|
|
3009
3012
|
key: E,
|
|
3010
|
-
label: h(b)(h(
|
|
3013
|
+
label: h(b)(h(Xe)[E].translationKey),
|
|
3011
3014
|
onClick: (ne) => ce(E),
|
|
3012
3015
|
loading: d.value === E,
|
|
3013
|
-
disabled: d.value !== E &&
|
|
3014
|
-
variant: h(
|
|
3016
|
+
disabled: d.value !== E && N.value,
|
|
3017
|
+
variant: h(Xe)[E].buttonVariant
|
|
3015
3018
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
|
|
3016
3019
|
], 64))), 256)),
|
|
3017
|
-
h($).ableToMarkReceived(t.purchaseOrder) && !z.value.includes("completeReceive") ? (f(), le(
|
|
3020
|
+
h($).ableToMarkReceived(t.purchaseOrder) && !z.value.includes("completeReceive") ? (f(), le(C, {
|
|
3018
3021
|
key: 0,
|
|
3019
3022
|
label: h(b)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3020
3023
|
onClick: m[4] || (m[4] = (E) => ce("completeReceive")),
|
|
3021
3024
|
loading: d.value === "completeReceive",
|
|
3022
|
-
disabled: d.value !== "completeReceive" &&
|
|
3025
|
+
disabled: d.value !== "completeReceive" && N.value
|
|
3023
3026
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3024
|
-
h($).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !z.value.includes("approveRequest") ? (f(), le(
|
|
3027
|
+
h($).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !z.value.includes("approveRequest") ? (f(), le(C, {
|
|
3025
3028
|
key: 1,
|
|
3026
3029
|
label: h(b)("inventory.transfer.approval.actions.approveRequest"),
|
|
3027
3030
|
onClick: m[5] || (m[5] = (E) => ce("approveRequest")),
|
|
3028
3031
|
loading: d.value === "approveRequest",
|
|
3029
|
-
disabled: d.value !== "approveRequest" &&
|
|
3032
|
+
disabled: d.value !== "approveRequest" && N.value
|
|
3030
3033
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3031
|
-
h($).ableToCreateFulfillment(t.purchaseOrder, t.poRequest) && o.scope === "approval" ? (f(), le(
|
|
3034
|
+
h($).ableToCreateFulfillment(t.purchaseOrder, t.poRequest) && o.scope === "approval" ? (f(), le(C, {
|
|
3032
3035
|
key: 2,
|
|
3033
3036
|
label: h(b)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3034
3037
|
onClick: m[6] || (m[6] = (E) => ce("processRequest")),
|
|
3035
3038
|
loading: d.value === "processRequest",
|
|
3036
|
-
disabled: d.value !== "processRequest" &&
|
|
3039
|
+
disabled: d.value !== "processRequest" && N.value
|
|
3037
3040
|
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3038
|
-
I(
|
|
3041
|
+
I(C, {
|
|
3039
3042
|
label: h(b)("common.close"),
|
|
3040
3043
|
variant: "tertiary",
|
|
3041
3044
|
onClick: m[7] || (m[7] = (E) => p("update:show", !1))
|