@feedmepos/mf-inventory-portal 1.0.12-dev.2 → 1.0.12-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Byn7tHre.js → App-CljcnwTp.js} +2 -2
- package/dist/{ApprovalView-C_B6Ud1v.js → ApprovalView-DKHAt7sK.js} +2 -2
- package/dist/{BindingsDialog-DpM-rpFr.js → BindingsDialog-6ugkEqMg.js} +2 -2
- package/dist/{BindingsPicker-CCKlnHQ8.js → BindingsPicker-CUEp4Rya.js} +1 -1
- package/dist/{BindingsTable-m3Z7ozrU.js → BindingsTable-CDEEfdfm.js} +1 -1
- package/dist/{ClosingDraftView-Dm8eo0Vz.js → ClosingDraftView-l-X-AkGj.js} +2 -2
- package/dist/{ClosingTemplateView-C0kKeAKu.js → ClosingTemplateView-BG_TYDpD.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BiFBV9NI.js → DeliveryOrderPrintPreview-C8jN6FgI.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-bBhR9dWX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bs1AUyTV.js} +3 -3
- package/dist/{FmMultiselectDialog-Cg-plZjp.js → FmMultiselectDialog-EdDWUr8X.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B0DdbgR8.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BowjSVzo.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DNkyBsYX.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DBgStPS1.js} +1 -1
- package/dist/{IngredientGroupView-oRzzQrxP.js → IngredientGroupView-B7xqsZxh.js} +2 -2
- package/dist/{IngredientsView-UYr-9ckX.js → IngredientsView-B1-n1Zuh.js} +4 -4
- package/dist/{IntegrationView-Nb0j9Myn.js → IntegrationView-DZRfJNZa.js} +1585 -1585
- package/dist/{InventoryBindingForm-CfV17fI5.js → InventoryBindingForm-GMN9TPaW.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-LZRjwQEB.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CeYnBXsj.js} +3 -3
- package/dist/{InventoryBindingSummary-B2rDd4KS.js → InventoryBindingSummary-Ik2xxLpF.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-O3oG04C3.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BVO2un0T.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C9P0w1Yo.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DhaFDjSB.js} +1 -1
- package/dist/{PublishView-lKWxaVGi.js → PublishView-BewFP4rz.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-C3pE7pKw.js → PurchaseOrderPrintPreview-1bOdlac_.js} +1 -1
- package/dist/{ReceiveRequestView-Cntcdt7e.js → ReceiveRequestView-DyDpfSKU.js} +10 -10
- package/dist/{RecipeView-bzu1U9Gq.js → RecipeView-aa5rptHU.js} +3 -3
- package/dist/{StockView-R5AjS5ZP.js → StockView-D_X0Cfg7.js} +7 -7
- package/dist/{SupplierView-BP_67SXq.js → SupplierView-D2SizsKP.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BvgmrVSD.js → TransferDetails.vue_vue_type_script_setup_true_lang-C0Pp6j3l.js} +468 -449
- package/dist/{TransferTemplateView-BJLK64th.js → TransferTemplateView-BryKJByH.js} +7 -7
- package/dist/{UnitView--wdY45MB.js → UnitView-sxq1JS_q.js} +3 -3
- package/dist/{WarehouseView-iSOrBTnq.js → WarehouseView-CPWmY5ep.js} +1 -1
- package/dist/api/purchase-order.d.ts +1 -1
- package/dist/{app-kveWTQjE.js → app-PeqY3WSF.js} +3402 -3378
- package/dist/app.d.ts +3 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-DY8OyZOE.js → decimal-CdkeOQTR.js} +1 -1
- package/dist/{feature-C0TlUzuT.js → feature-BByh_whS.js} +762 -458
- package/dist/{format-unit-display-Q_edRr_A.js → format-unit-display-DWnOEHsP.js} +2 -2
- package/dist/{index-B-ZEfBgj.js → index-BV_MbLKM.js} +2 -2
- package/dist/{index-BMpOpRCf.js → index-Bzox-uMM.js} +1 -1
- package/dist/{stock-C40mVN4W.js → stock-rByuoj6o.js} +1 -1
- package/dist/stores/integration/netsuite.d.ts +1 -1
- package/dist/{supplier-DvZ8SCGg.js → supplier-DIWM2MFM.js} +2 -2
- package/dist/{use-ingredient-select-dialog-CeK0rLZb.js → use-ingredient-select-dialog-dO5sLLm4.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BV-rxXkP.js → use-inventory-binding-dialog-Dnn4uY0z.js} +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -4
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -6
- package/dist/{vue-i18n-CYoGKQoJ.js → vue-i18n-BrUAO3nM.js} +230 -230
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { X as it, u as me, aH as
|
|
2
|
-
import { ref as j, computed as G, h as N, defineComponent as
|
|
3
|
-
import { F as St } from "./decimal-
|
|
4
|
-
import { b as Rt, u as xt, f as nt, P as he } from "./format-unit-display-
|
|
1
|
+
import { X as it, u as me, aH as x, b as Be, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as Ye, e as tt, T as rt, aJ as pt, Z as Fe, J as ke, i as le, aK as st, a9 as De, f as We, h as z, D as Z, aq as se, a3 as yt, ao as Je, a1 as xe, aL as vt, ae as Pe, ar as ht } from "./app-PeqY3WSF.js";
|
|
2
|
+
import { ref as j, computed as G, h as N, defineComponent as qe, onMounted as at, unref as y, openBlock as _, createElementBlock as q, createElementVNode as r, toDisplayString as R, createCommentVNode as V, resolveComponent as Q, createVNode as E, reactive as bt, createBlock as ue, withCtx as de, watch as gt, isRef as _t, Fragment as re, normalizeClass as Oe, createTextVNode as $e, renderList as ye, resolveDynamicComponent as wt } from "vue";
|
|
3
|
+
import { F as St } from "./decimal-CdkeOQTR.js";
|
|
4
|
+
import { b as Rt, u as xt, f as nt, P as he } from "./format-unit-display-DWnOEHsP.js";
|
|
5
5
|
import { useCoreStore as Ue, useI18n as ot } from "@feedmepos/mf-common";
|
|
6
6
|
import { E as Ot } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
|
-
import { useDialog as Le, useSnackbar as Ve, components as Xe, FmButtonVariant as
|
|
8
|
-
import { u as Me, F as Ce } from "./feature-
|
|
9
|
-
import { u as Dt } from "./index-
|
|
10
|
-
import { _ as
|
|
7
|
+
import { useDialog as Le, useSnackbar as Ve, components as Xe, FmButtonVariant as ee, useProxiedModel as kt } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as Me, F as Ce } from "./feature-BByh_whS.js";
|
|
9
|
+
import { u as Dt } from "./index-BV_MbLKM.js";
|
|
10
|
+
import { _ as qt, F as Nt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BowjSVzo.js";
|
|
11
11
|
import { u as Tt, R as Ze } from "./usePromise-CbVUCxhj.js";
|
|
12
|
-
const
|
|
13
|
-
const o = me(),
|
|
12
|
+
const Ne = it((n, l) => {
|
|
13
|
+
const o = me(), b = Ue();
|
|
14
14
|
return {
|
|
15
15
|
async readRequests(m, s, f) {
|
|
16
|
-
const
|
|
16
|
+
const u = m ?? o.currentLocationDBName, a = `${n.inventoryBackendUrl}/${u}/purchase-request`;
|
|
17
17
|
return s && f ? await l.get(`${a}?startDate=${s}&endDate=${f}`) : await l.get(a);
|
|
18
18
|
},
|
|
19
19
|
async readRequestById(m, s) {
|
|
20
|
-
const f = s ?? o.currentLocationDBName,
|
|
21
|
-
return await l.get(
|
|
20
|
+
const f = s ?? o.currentLocationDBName, u = `${n.inventoryBackendUrl}/${f}/purchase-request/${m}`;
|
|
21
|
+
return await l.get(u);
|
|
22
22
|
},
|
|
23
23
|
async readRequestByIds(m, s) {
|
|
24
|
-
const f = s ?? o.currentLocationDBName,
|
|
25
|
-
return await l.post(
|
|
24
|
+
const f = s ?? o.currentLocationDBName, u = `${n.inventoryBackendUrl}/${f}/purchase-request/find`;
|
|
25
|
+
return await l.post(u, { requestIds: m });
|
|
26
26
|
},
|
|
27
27
|
async getPurchaseOrders({
|
|
28
28
|
start: m,
|
|
29
29
|
end: s
|
|
30
30
|
}) {
|
|
31
|
-
const f = o.currentLocationDBName,
|
|
32
|
-
return await l.get(`${
|
|
31
|
+
const f = o.currentLocationDBName, u = `${n.inventoryBackendUrl}/${f}/purchase-order`;
|
|
32
|
+
return await l.get(`${u}?start=${m}&end=${s}`);
|
|
33
33
|
},
|
|
34
34
|
async getLatestPurchaseOrderRequest(m) {
|
|
35
35
|
const s = o.currentLocationDBName, f = `${n.inventoryBackendUrl}/${s}/purchase-request/find-by-purchase-order-id`;
|
|
@@ -43,11 +43,7 @@ const qe = it((n, l) => {
|
|
|
43
43
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
44
44
|
*/
|
|
45
45
|
async processPurchaseOrder(m, s) {
|
|
46
|
-
const f = o.currentLocationDBName,
|
|
47
|
-
return await l.put(a, m);
|
|
48
|
-
},
|
|
49
|
-
async processPurchaseOrderV2(m, s) {
|
|
50
|
-
const f = o.currentLocationDBName, i = s || f, a = `${n.inventoryBackendUrl}/${i}/v2/purchase-order/run-operation`;
|
|
46
|
+
const f = o.currentLocationDBName, u = s || f, a = `${n.inventoryBackendUrl}/${u}/purchase-order/run-operation`;
|
|
51
47
|
return await l.put(a, m);
|
|
52
48
|
},
|
|
53
49
|
async createPurchaseOrder(m) {
|
|
@@ -62,14 +58,18 @@ const qe = it((n, l) => {
|
|
|
62
58
|
const s = o.currentLocationDBName, f = `${n.inventoryBackendUrl}/${s}/purchase-order/import-from-xilnex`;
|
|
63
59
|
return await l.post(f, m);
|
|
64
60
|
},
|
|
61
|
+
async processPurchaseOrderV2(m, s) {
|
|
62
|
+
const f = o.currentLocationDBName, u = s || f, a = `${n.inventoryBackendUrl}/${u}/v2/purchase-order/run-operation`;
|
|
63
|
+
return await l.put(a, m);
|
|
64
|
+
},
|
|
65
65
|
async getWorkflowConfig() {
|
|
66
|
-
var
|
|
67
|
-
const s = `business_${(
|
|
66
|
+
var u;
|
|
67
|
+
const s = `business_${(u = b.currentBusiness.value) == null ? void 0 : u._id}`, f = `${n.inventoryBackendUrl}/${s}/v2/purchase-order/workflow-config`;
|
|
68
68
|
return await l.get(f);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}), ct = {
|
|
72
|
-
[
|
|
72
|
+
[x.enum.confirmDraft]: {
|
|
73
73
|
primaryActions: {
|
|
74
74
|
text: "Confirm draft",
|
|
75
75
|
close: !0
|
|
@@ -78,7 +78,7 @@ const qe = it((n, l) => {
|
|
|
78
78
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
79
79
|
successMessage: "Purchase order draft has been confirmed"
|
|
80
80
|
},
|
|
81
|
-
[
|
|
81
|
+
[x.enum.cancelDraft]: {
|
|
82
82
|
primaryActions: {
|
|
83
83
|
text: "Cancel draft",
|
|
84
84
|
close: !0,
|
|
@@ -88,7 +88,7 @@ const qe = it((n, l) => {
|
|
|
88
88
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
89
89
|
successMessage: "Purchase order draft has been cancelled"
|
|
90
90
|
},
|
|
91
|
-
[
|
|
91
|
+
[x.enum.submitRequest]: {
|
|
92
92
|
primaryActions: {
|
|
93
93
|
text: "Submit request",
|
|
94
94
|
close: !0
|
|
@@ -97,7 +97,7 @@ const qe = it((n, l) => {
|
|
|
97
97
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
98
98
|
successMessage: "Purchase order draft has been submitted"
|
|
99
99
|
},
|
|
100
|
-
[
|
|
100
|
+
[x.enum.completeReceive]: {
|
|
101
101
|
primaryActions: {
|
|
102
102
|
text: "Mark received",
|
|
103
103
|
close: !0
|
|
@@ -106,7 +106,7 @@ const qe = it((n, l) => {
|
|
|
106
106
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
107
107
|
successMessage: "Purchase order has been marked as received"
|
|
108
108
|
},
|
|
109
|
-
[
|
|
109
|
+
[x.enum.approveRequest]: {
|
|
110
110
|
primaryActions: {
|
|
111
111
|
text: "Accept request",
|
|
112
112
|
close: !0
|
|
@@ -115,7 +115,7 @@ const qe = it((n, l) => {
|
|
|
115
115
|
message: "Transfer out request will be accepted.",
|
|
116
116
|
successMessage: "Transfer out request has been approved"
|
|
117
117
|
},
|
|
118
|
-
[
|
|
118
|
+
[x.enum.rejectRequest]: {
|
|
119
119
|
primaryActions: {
|
|
120
120
|
text: "Reject request",
|
|
121
121
|
close: !0,
|
|
@@ -127,39 +127,39 @@ const qe = it((n, l) => {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
function lt() {
|
|
130
|
-
const n = me(), l =
|
|
131
|
-
async function
|
|
132
|
-
const
|
|
133
|
-
return s.doc.supplier.internal && s.operation ===
|
|
130
|
+
const n = me(), l = Ne(), o = Me();
|
|
131
|
+
async function b(s, f) {
|
|
132
|
+
const u = n.currentLocationDBName;
|
|
133
|
+
return s.doc.supplier.internal && s.operation === x.enum.confirmDraft && (s.operation = x.enum.submitRequest), await l.processPurchaseOrder(s, f || u);
|
|
134
134
|
}
|
|
135
135
|
async function m(s, f) {
|
|
136
|
-
const
|
|
137
|
-
return await l.processPurchaseOrderV2(s, f ||
|
|
136
|
+
const u = n.currentLocationDBName;
|
|
137
|
+
return await l.processPurchaseOrderV2(s, f || u);
|
|
138
138
|
}
|
|
139
|
-
return (s) => o.useOperatePurchaseOrderV2 ? m(s.operateV2, s.transferTo) :
|
|
139
|
+
return (s) => o.useOperatePurchaseOrderV2 ? m(s.operateV2, s.transferTo) : b(s.operate, s.transferTo);
|
|
140
140
|
}
|
|
141
141
|
var Ee = /* @__PURE__ */ ((n) => (n.RECEIVE_REQUEST = "receive/request", n.APPROVAL = "approval", n))(Ee || {});
|
|
142
142
|
const Se = j(), Ie = j();
|
|
143
143
|
function Os(n, l) {
|
|
144
|
-
const o = Le(),
|
|
144
|
+
const o = Le(), b = me(), m = Me();
|
|
145
145
|
Be();
|
|
146
|
-
const s = Rt(), f = xt(),
|
|
146
|
+
const s = Rt(), f = xt(), u = j(!1), a = Ve(), h = Ne(), i = j(new Array()), p = j(
|
|
147
147
|
l != null && l.startDate && (l != null && l.endDate) ? l : ut()
|
|
148
148
|
), t = G(() => {
|
|
149
|
-
const
|
|
149
|
+
const O = new Date(p.value.startDate), S = new Date(p.value.endDate);
|
|
150
150
|
return {
|
|
151
|
-
start: dt(
|
|
151
|
+
start: dt(O).toISOString(),
|
|
152
152
|
end: mt(S).toISOString()
|
|
153
153
|
};
|
|
154
|
-
}), v = j(new Array()),
|
|
155
|
-
async function
|
|
154
|
+
}), v = j(new Array()), D = ft(), w = j(null);
|
|
155
|
+
async function A(O) {
|
|
156
156
|
function S(e) {
|
|
157
157
|
const c = {
|
|
158
158
|
mode: Ye.CREATE,
|
|
159
|
-
modelValue:
|
|
159
|
+
modelValue: O || void 0,
|
|
160
160
|
show: !0,
|
|
161
|
-
"onUpdate:show"(
|
|
162
|
-
Se.value.show =
|
|
161
|
+
"onUpdate:show"(g) {
|
|
162
|
+
Se.value.show = g;
|
|
163
163
|
},
|
|
164
164
|
templateId: e,
|
|
165
165
|
lastClosingDate: w.value
|
|
@@ -167,7 +167,7 @@ function Os(n, l) {
|
|
|
167
167
|
Se.value = c;
|
|
168
168
|
}
|
|
169
169
|
let B;
|
|
170
|
-
m.mustUsePoTemplate && !(
|
|
170
|
+
m.mustUsePoTemplate && !(O != null && O.template) ? o.open({
|
|
171
171
|
title: "Create transfer",
|
|
172
172
|
message: "",
|
|
173
173
|
primaryActions: {
|
|
@@ -185,10 +185,10 @@ function Os(n, l) {
|
|
|
185
185
|
S(void 0);
|
|
186
186
|
}) : S(B);
|
|
187
187
|
}
|
|
188
|
-
function I(
|
|
188
|
+
function I(O) {
|
|
189
189
|
const S = {
|
|
190
190
|
mode: Ye.UPDATE,
|
|
191
|
-
modelValue: tt(
|
|
191
|
+
modelValue: tt(O),
|
|
192
192
|
show: !0,
|
|
193
193
|
"onUpdate:show"(B) {
|
|
194
194
|
Se.value.show = B;
|
|
@@ -198,12 +198,12 @@ function Os(n, l) {
|
|
|
198
198
|
Se.value = S;
|
|
199
199
|
}
|
|
200
200
|
async function W() {
|
|
201
|
-
|
|
201
|
+
i.value = [], u.value = !0;
|
|
202
202
|
try {
|
|
203
|
-
|
|
204
|
-
const
|
|
203
|
+
i.value = await h.getPurchaseOrders(t.value).then((e) => e.sort((c, g) => g._id.localeCompare(c._id)));
|
|
204
|
+
const O = await D.readCurrentLocationLastClosing(!0), S = O == null ? void 0 : O._id;
|
|
205
205
|
S && (w.value = pt(S)), m.mustUsePoTemplate && await f.fetchTemplates();
|
|
206
|
-
const B =
|
|
206
|
+
const B = i.value.map((e) => {
|
|
207
207
|
var c;
|
|
208
208
|
return ((c = e.request) == null ? void 0 : c.id) ?? "";
|
|
209
209
|
}).filter((e) => e);
|
|
@@ -215,17 +215,17 @@ function Os(n, l) {
|
|
|
215
215
|
type: "error"
|
|
216
216
|
});
|
|
217
217
|
} finally {
|
|
218
|
-
|
|
218
|
+
u.value = !1;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
async function J() {
|
|
222
|
-
v.value = [],
|
|
222
|
+
v.value = [], u.value = !0;
|
|
223
223
|
try {
|
|
224
224
|
v.value = await h.readRequests(
|
|
225
225
|
void 0,
|
|
226
226
|
t.value.start,
|
|
227
227
|
t.value.end
|
|
228
|
-
).then((
|
|
228
|
+
).then((O) => O.reverse());
|
|
229
229
|
} catch {
|
|
230
230
|
a.open({
|
|
231
231
|
title: "Something went wrong",
|
|
@@ -233,7 +233,7 @@ function Os(n, l) {
|
|
|
233
233
|
type: "error"
|
|
234
234
|
});
|
|
235
235
|
} finally {
|
|
236
|
-
|
|
236
|
+
u.value = !1;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function ae() {
|
|
@@ -244,65 +244,65 @@ function Os(n, l) {
|
|
|
244
244
|
return J();
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function ne(
|
|
248
|
-
|
|
249
|
-
startDate:
|
|
247
|
+
function ne(O, S) {
|
|
248
|
+
p.value = {
|
|
249
|
+
startDate: O,
|
|
250
250
|
endDate: S
|
|
251
251
|
}, ae();
|
|
252
252
|
}
|
|
253
|
-
|
|
254
|
-
if (!
|
|
255
|
-
|
|
253
|
+
b.watchLocation(async (O) => {
|
|
254
|
+
if (!O) {
|
|
255
|
+
i.value = [];
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
await ae();
|
|
259
259
|
});
|
|
260
|
-
const
|
|
261
|
-
async function ie(
|
|
260
|
+
const te = j(), oe = j(Math.random().toString());
|
|
261
|
+
async function ie(O, S) {
|
|
262
262
|
const B = Math.random().toString();
|
|
263
263
|
oe.value = B, S ?? (S = v.value.computeFirst(
|
|
264
|
-
(
|
|
264
|
+
(g) => g.purchaseOrderId === O._id ? g : null
|
|
265
265
|
) ?? void 0);
|
|
266
|
-
const e = n === "receive/request" ?
|
|
266
|
+
const e = n === "receive/request" ? b.currentLocation : S == null ? void 0 : S.to, c = {
|
|
267
267
|
poRequest: S,
|
|
268
|
-
purchaseOrder:
|
|
268
|
+
purchaseOrder: O,
|
|
269
269
|
transferTo: e == null ? void 0 : e.name,
|
|
270
270
|
transferToDbName: e == null ? void 0 : e.dbName,
|
|
271
271
|
show: !0,
|
|
272
272
|
canResubmit: !1,
|
|
273
273
|
canApprove: n === "approval",
|
|
274
|
-
"onUpdate:show"(
|
|
275
|
-
|
|
274
|
+
"onUpdate:show"(g) {
|
|
275
|
+
te.value.show = g;
|
|
276
276
|
},
|
|
277
277
|
scope: n
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
te.value = c;
|
|
280
280
|
}
|
|
281
|
-
async function Ae(
|
|
281
|
+
async function Ae(O, S, B, e) {
|
|
282
282
|
const c = lt();
|
|
283
|
-
|
|
283
|
+
u.value = !0;
|
|
284
284
|
try {
|
|
285
285
|
await c({
|
|
286
286
|
operate: {
|
|
287
287
|
operation: S,
|
|
288
|
-
doc:
|
|
288
|
+
doc: O,
|
|
289
289
|
options: (
|
|
290
290
|
// auto receive for supplier to warehouse
|
|
291
|
-
(S ===
|
|
292
|
-
S ===
|
|
291
|
+
(S === x.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
292
|
+
S === x.enum.completeReceive) && m.autoReceiveWarehouse ? {
|
|
293
293
|
autoReceive: !0
|
|
294
294
|
} : void 0
|
|
295
295
|
)
|
|
296
296
|
},
|
|
297
297
|
operateV2: {
|
|
298
|
-
_id:
|
|
299
|
-
_rev:
|
|
298
|
+
_id: O._id,
|
|
299
|
+
_rev: O._rev ?? "",
|
|
300
300
|
action: S
|
|
301
301
|
},
|
|
302
302
|
transferTo: e
|
|
303
|
-
}), await new Promise((
|
|
304
|
-
const
|
|
305
|
-
S ===
|
|
303
|
+
}), await new Promise((U) => setTimeout(U, 1e3));
|
|
304
|
+
const k = me().currentLocationDBName.startsWith("restaurant_");
|
|
305
|
+
S === x.enum.confirmDraft && O.effectiveAt && k ? a.open({
|
|
306
306
|
title: "Success",
|
|
307
307
|
message: `${B}. The backdate will be reflected once your POS has received this change.`,
|
|
308
308
|
type: "success"
|
|
@@ -311,17 +311,17 @@ function Os(n, l) {
|
|
|
311
311
|
message: B,
|
|
312
312
|
type: "success"
|
|
313
313
|
});
|
|
314
|
-
} catch (
|
|
314
|
+
} catch (g) {
|
|
315
315
|
a.open({
|
|
316
316
|
title: "Something went wrong",
|
|
317
317
|
message: "Please try again.",
|
|
318
318
|
type: "error"
|
|
319
|
-
}), console.error("Error when submitting PO operation", S,
|
|
319
|
+
}), console.error("Error when submitting PO operation", S, O, g);
|
|
320
320
|
} finally {
|
|
321
|
-
|
|
321
|
+
u.value = !1, ae();
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
async function be(
|
|
324
|
+
async function be(O, S, B) {
|
|
325
325
|
const e = ct[S];
|
|
326
326
|
if (!e) {
|
|
327
327
|
a.open({
|
|
@@ -331,13 +331,13 @@ function Os(n, l) {
|
|
|
331
331
|
});
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
const { successMessage: c, ...
|
|
334
|
+
const { successMessage: c, ...g } = e;
|
|
335
335
|
o.open({
|
|
336
|
-
title:
|
|
337
|
-
message:
|
|
338
|
-
primaryActions:
|
|
336
|
+
title: g.title,
|
|
337
|
+
message: g.message,
|
|
338
|
+
primaryActions: g.primaryActions
|
|
339
339
|
}).onPrimary(() => {
|
|
340
|
-
Ae(
|
|
340
|
+
Ae(O, S, c, B);
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
async function Te() {
|
|
@@ -352,25 +352,25 @@ function Os(n, l) {
|
|
|
352
352
|
close: !0
|
|
353
353
|
}
|
|
354
354
|
}).onPrimary(() => {
|
|
355
|
-
const
|
|
355
|
+
const O = {
|
|
356
356
|
show: !0,
|
|
357
357
|
"onUpdate:show"(S) {
|
|
358
358
|
Ie.value.show = S;
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
Ie.value =
|
|
361
|
+
Ie.value = O;
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
return {
|
|
365
|
-
purchaseOrders:
|
|
365
|
+
purchaseOrders: i,
|
|
366
366
|
purchaseRequests: v,
|
|
367
367
|
updateDateRange: ne,
|
|
368
368
|
fetchData: ae,
|
|
369
|
-
loading:
|
|
369
|
+
loading: u,
|
|
370
370
|
transferDialogProps: Se,
|
|
371
|
-
promptCreateTransferDialog:
|
|
371
|
+
promptCreateTransferDialog: A,
|
|
372
372
|
promptUpdateTransferDialog: I,
|
|
373
|
-
transferDetailsProps:
|
|
373
|
+
transferDetailsProps: te,
|
|
374
374
|
promptShowTransferDetails: ie,
|
|
375
375
|
submitAction: be,
|
|
376
376
|
xilnexImportDialogProps: Ie,
|
|
@@ -379,15 +379,15 @@ function Os(n, l) {
|
|
|
379
379
|
}
|
|
380
380
|
function Pt(n, l) {
|
|
381
381
|
return l.reduce(
|
|
382
|
-
(
|
|
382
|
+
(b, m) => {
|
|
383
383
|
const s = m.received.find((f) => f.sku._id === n._id);
|
|
384
|
-
return s && (
|
|
384
|
+
return s && (b = Fe(b, s.amount)), b;
|
|
385
385
|
},
|
|
386
386
|
St.toPrecision(ke(0), n.unit.precision)
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
|
-
function $t(n, l, o,
|
|
390
|
-
const { name: m, address: s, regNo: f } = l.doc.profile,
|
|
389
|
+
function $t(n, l, o, b) {
|
|
390
|
+
const { name: m, address: s, regNo: f } = l.doc.profile, u = {
|
|
391
391
|
name: m,
|
|
392
392
|
registrationNumber: f,
|
|
393
393
|
line1: s == null ? void 0 : s.line1,
|
|
@@ -406,86 +406,91 @@ function $t(n, l, o, g) {
|
|
|
406
406
|
city: n.supplier.address.city,
|
|
407
407
|
state: n.supplier.address.state,
|
|
408
408
|
country: n.supplier.address.country
|
|
409
|
-
}, h = n.items.map((
|
|
410
|
-
const { sku: w, measurement:
|
|
411
|
-
Pt(
|
|
409
|
+
}, h = n.items.map((D) => {
|
|
410
|
+
const { sku: w, measurement: A } = D, I = le(
|
|
411
|
+
Pt(D.sku, n.deliveryOrder || []),
|
|
412
412
|
!1
|
|
413
413
|
);
|
|
414
414
|
return {
|
|
415
415
|
code: w.code,
|
|
416
416
|
description: w.name,
|
|
417
|
-
quantity: nt(
|
|
418
|
-
unit: (
|
|
417
|
+
quantity: nt(D.quantity, w.unit, D.measurement),
|
|
418
|
+
unit: (A == null ? void 0 : A.abbrev) || w.unit.abbrev,
|
|
419
419
|
received: I
|
|
420
420
|
};
|
|
421
|
-
}),
|
|
422
|
-
createdAt: st(new Date(
|
|
423
|
-
ref:
|
|
424
|
-
remark:
|
|
425
|
-
items:
|
|
426
|
-
var
|
|
421
|
+
}), i = n.deliveryOrder.map((D) => ({
|
|
422
|
+
createdAt: st(new Date(D.createdAt)),
|
|
423
|
+
ref: D.deliveryOrderNumber,
|
|
424
|
+
remark: D.remark || "",
|
|
425
|
+
items: D.received.map((w) => {
|
|
426
|
+
var A;
|
|
427
427
|
return {
|
|
428
428
|
code: w.sku.code,
|
|
429
429
|
description: w.sku.name,
|
|
430
430
|
quantity: le(w.amount),
|
|
431
|
-
unit: ((
|
|
431
|
+
unit: ((A = w.measurement) == null ? void 0 : A.abbrev) || w.sku.unit.abbrev
|
|
432
432
|
};
|
|
433
433
|
})
|
|
434
|
-
})),
|
|
434
|
+
})), p = {
|
|
435
435
|
businessName: o == null ? void 0 : o.name,
|
|
436
436
|
logo: o == null ? void 0 : o.thumbnail,
|
|
437
437
|
orderNumber: n.seqNumber.toString(),
|
|
438
438
|
createdAt: De(n._id),
|
|
439
439
|
ref: n.ref || "",
|
|
440
440
|
remark: n.remark || "",
|
|
441
|
-
buyer:
|
|
441
|
+
buyer: u,
|
|
442
442
|
supplier: a,
|
|
443
443
|
items: h,
|
|
444
444
|
status: n.status,
|
|
445
|
-
deliveryOrders:
|
|
446
|
-
}, t = new URL(window.location.href), v =
|
|
447
|
-
t.pathname = t.hostname.includes("portal.feedme") ? `/inventory/${v}` : `/${v}`, t.searchParams.append("data", JSON.stringify(
|
|
445
|
+
deliveryOrders: i
|
|
446
|
+
}, t = new URL(window.location.href), v = b && (n.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
447
|
+
t.pathname = t.hostname.includes("portal.feedme") ? `/inventory/${v}` : `/${v}`, t.searchParams.append("data", JSON.stringify(p)), window.open(t.href, "_blank", "noreferrer");
|
|
448
448
|
}
|
|
449
449
|
const ve = {
|
|
450
450
|
submitRequest: {
|
|
451
451
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
452
452
|
color: "text-fm-color-typo-primary",
|
|
453
|
-
value:
|
|
453
|
+
value: x.enum.submitRequest
|
|
454
454
|
},
|
|
455
455
|
confirmDraft: {
|
|
456
456
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
457
457
|
color: "text-fm-color-typo-primary",
|
|
458
|
-
value:
|
|
458
|
+
value: x.enum.confirmDraft
|
|
459
459
|
},
|
|
460
460
|
cancelDraft: {
|
|
461
461
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
462
462
|
color: "text-fm-color-typo-error",
|
|
463
|
-
value:
|
|
463
|
+
value: x.enum.cancelDraft
|
|
464
464
|
},
|
|
465
465
|
approveRequest: {
|
|
466
466
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
467
467
|
color: "text-fm-color-typo-primary",
|
|
468
|
-
value:
|
|
468
|
+
value: x.enum.approveRequest
|
|
469
469
|
},
|
|
470
470
|
rejectRequest: {
|
|
471
471
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
472
472
|
color: "text-fm-color-typo-error",
|
|
473
|
-
value:
|
|
473
|
+
value: x.enum.rejectRequest
|
|
474
474
|
},
|
|
475
475
|
processRequest: {
|
|
476
476
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
477
477
|
color: "text-fm-color-typo-primary",
|
|
478
|
-
value:
|
|
478
|
+
value: x.enum.processRequest
|
|
479
479
|
},
|
|
480
480
|
receiveStock: {
|
|
481
481
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
482
482
|
color: "text-fm-color-typo-primary",
|
|
483
|
-
value:
|
|
483
|
+
value: x.enum.receiveStock
|
|
484
484
|
},
|
|
485
485
|
completeReceive: {
|
|
486
486
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
487
487
|
color: "text-fm-color-typo-primary",
|
|
488
|
-
value:
|
|
488
|
+
value: x.enum.completeReceive
|
|
489
|
+
},
|
|
490
|
+
closeRequest: {
|
|
491
|
+
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
492
|
+
color: "system-error-300",
|
|
493
|
+
value: x.enum.closeRequest
|
|
489
494
|
},
|
|
490
495
|
approveDraft: {
|
|
491
496
|
label: void 0,
|
|
@@ -502,26 +507,26 @@ const ve = {
|
|
|
502
507
|
};
|
|
503
508
|
function ks(n, l) {
|
|
504
509
|
me();
|
|
505
|
-
const o = Ue(), { t:
|
|
506
|
-
function m(
|
|
507
|
-
switch (
|
|
510
|
+
const o = Ue(), { t: b } = ot();
|
|
511
|
+
function m(i) {
|
|
512
|
+
switch (i.status) {
|
|
508
513
|
case "DRAFT":
|
|
509
514
|
return [
|
|
510
515
|
Z[z.Update],
|
|
511
516
|
Z[z.Details],
|
|
512
|
-
|
|
513
|
-
ve[
|
|
517
|
+
i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? ve[x.enum.submitRequest] : ve[x.enum.confirmDraft],
|
|
518
|
+
ve[x.enum.cancelDraft]
|
|
514
519
|
];
|
|
515
520
|
case "RECEIVING":
|
|
516
521
|
return [
|
|
517
|
-
ve[
|
|
522
|
+
ve[x.enum.completeReceive],
|
|
518
523
|
Z[z.Details],
|
|
519
524
|
Z[z.Print]
|
|
520
525
|
];
|
|
521
526
|
case "REQUESTING":
|
|
522
527
|
return n === "receive/request" ? [Z[z.Details], Z[z.Print]] : [
|
|
523
|
-
ve[
|
|
524
|
-
ve[
|
|
528
|
+
ve[x.enum.approveRequest],
|
|
529
|
+
ve[x.enum.rejectRequest],
|
|
525
530
|
Z[z.Details]
|
|
526
531
|
// DefaultRowActions[RowActionEnum.Print]
|
|
527
532
|
];
|
|
@@ -533,13 +538,13 @@ function ks(n, l) {
|
|
|
533
538
|
return [Z[z.Details], Z[z.Print]];
|
|
534
539
|
}
|
|
535
540
|
}
|
|
536
|
-
function s(
|
|
537
|
-
return Object.values(
|
|
541
|
+
function s(i) {
|
|
542
|
+
return Object.values(x.enum).includes(i);
|
|
538
543
|
}
|
|
539
|
-
async function f(
|
|
540
|
-
var
|
|
541
|
-
const v = tt(
|
|
542
|
-
if (
|
|
544
|
+
async function f(i, p, t) {
|
|
545
|
+
var D, w, A, I;
|
|
546
|
+
const v = tt(p);
|
|
547
|
+
if (i === z.Print) {
|
|
543
548
|
const W = (t == null ? void 0 : t.toInventoryLocation) ?? {
|
|
544
549
|
name: "",
|
|
545
550
|
type: "restaurant",
|
|
@@ -551,48 +556,48 @@ function ks(n, l) {
|
|
|
551
556
|
profile: {}
|
|
552
557
|
}
|
|
553
558
|
};
|
|
554
|
-
v.ref = [((
|
|
559
|
+
v.ref = [((D = t == null ? void 0 : t.netSuite) == null ? void 0 : D.refNo) || ((w = v.netSuite) == null ? void 0 : w.refNo)].filter((J) => J).join(" "), $t(v, W, o.currentBusiness.value, n === "approval");
|
|
555
560
|
return;
|
|
556
561
|
}
|
|
557
|
-
if (
|
|
562
|
+
if (i === z.Details) {
|
|
558
563
|
l.promptShowTransferDetails(v, t);
|
|
559
564
|
return;
|
|
560
565
|
}
|
|
561
|
-
if (
|
|
562
|
-
(
|
|
566
|
+
if (i === z.Update) {
|
|
567
|
+
(A = l.promptUpdateTransferDialog) == null || A.call(l, v);
|
|
563
568
|
return;
|
|
564
569
|
}
|
|
565
|
-
if (s(
|
|
566
|
-
l.submitAction(
|
|
570
|
+
if (s(i)) {
|
|
571
|
+
l.submitAction(p, i, (I = t == null ? void 0 : t.to) == null ? void 0 : I.dbName);
|
|
567
572
|
return;
|
|
568
573
|
}
|
|
569
574
|
}
|
|
570
|
-
function
|
|
575
|
+
function u() {
|
|
571
576
|
return [
|
|
572
577
|
{
|
|
573
578
|
accessorKey: "seqNumber",
|
|
574
|
-
header: () =>
|
|
579
|
+
header: () => b("inventory.transfer.table.seqNo"),
|
|
575
580
|
enableSorting: !0,
|
|
576
581
|
size: 80,
|
|
577
582
|
sortUndefined: "last"
|
|
578
583
|
},
|
|
579
584
|
{
|
|
580
585
|
accessorKey: "_id",
|
|
581
|
-
header: () =>
|
|
582
|
-
cell(
|
|
583
|
-
return De(`${
|
|
586
|
+
header: () => b("inventory.transfer.table.createdAt"),
|
|
587
|
+
cell(i) {
|
|
588
|
+
return De(`${i.getValue()}`);
|
|
584
589
|
},
|
|
585
590
|
enableSorting: !0
|
|
586
591
|
},
|
|
587
592
|
{
|
|
588
593
|
accessorKey: "supplier.name",
|
|
589
|
-
header: () =>
|
|
594
|
+
header: () => b("inventory.transfer.table.transferFrom"),
|
|
590
595
|
enableSorting: !0,
|
|
591
596
|
size: 200
|
|
592
597
|
},
|
|
593
598
|
{
|
|
594
599
|
accessorKey: "items.length",
|
|
595
|
-
header: () =>
|
|
600
|
+
header: () => b("inventory.transfer.table.noOfItems"),
|
|
596
601
|
enableSorting: !1,
|
|
597
602
|
meta: {
|
|
598
603
|
width: "10rem"
|
|
@@ -600,15 +605,15 @@ function ks(n, l) {
|
|
|
600
605
|
},
|
|
601
606
|
{
|
|
602
607
|
accessorKey: "ref",
|
|
603
|
-
header: () =>
|
|
608
|
+
header: () => b("inventory.transfer.table.reference"),
|
|
604
609
|
enableSorting: !1,
|
|
605
610
|
size: "auto"
|
|
606
611
|
},
|
|
607
612
|
{
|
|
608
613
|
accessorKey: "status",
|
|
609
|
-
header: () =>
|
|
610
|
-
cell(
|
|
611
|
-
const
|
|
614
|
+
header: () => b("inventory.transfer.table.status"),
|
|
615
|
+
cell(i) {
|
|
616
|
+
const p = b(`inventory.transfer.status.${i.getValue() ?? ""}`), t = `${i.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
612
617
|
return N(
|
|
613
618
|
"div",
|
|
614
619
|
{
|
|
@@ -619,7 +624,7 @@ function ks(n, l) {
|
|
|
619
624
|
{
|
|
620
625
|
class: `fm-status-badge fm-status-badge-${t}`
|
|
621
626
|
},
|
|
622
|
-
|
|
627
|
+
p
|
|
623
628
|
)
|
|
624
629
|
);
|
|
625
630
|
},
|
|
@@ -628,9 +633,9 @@ function ks(n, l) {
|
|
|
628
633
|
},
|
|
629
634
|
{
|
|
630
635
|
id: "action",
|
|
631
|
-
cell(
|
|
632
|
-
const
|
|
633
|
-
return We(t, (v) => f(v,
|
|
636
|
+
cell(i) {
|
|
637
|
+
const p = i.row.original, t = m(p);
|
|
638
|
+
return We(t, (v) => f(v, p));
|
|
634
639
|
},
|
|
635
640
|
enableSorting: !1,
|
|
636
641
|
size: 40,
|
|
@@ -645,41 +650,41 @@ function ks(n, l) {
|
|
|
645
650
|
return [
|
|
646
651
|
{
|
|
647
652
|
accessorKey: "purchaseOrder.seqNumber",
|
|
648
|
-
header: () =>
|
|
653
|
+
header: () => b("inventory.transfer.table.seqNo"),
|
|
649
654
|
enableSorting: !0,
|
|
650
655
|
size: 80,
|
|
651
656
|
sortUndefined: "last"
|
|
652
657
|
},
|
|
653
658
|
{
|
|
654
659
|
accessorKey: "purchaseOrder._id",
|
|
655
|
-
header: () =>
|
|
656
|
-
cell(
|
|
657
|
-
return De(`${
|
|
660
|
+
header: () => b("inventory.transfer.table.createdAt"),
|
|
661
|
+
cell(i) {
|
|
662
|
+
return De(`${i.getValue()}`);
|
|
658
663
|
},
|
|
659
664
|
enableSorting: !0
|
|
660
665
|
},
|
|
661
666
|
{
|
|
662
667
|
accessorKey: "to.name",
|
|
663
|
-
header: () =>
|
|
668
|
+
header: () => b("inventory.transfer.table.transferTo"),
|
|
664
669
|
enableSorting: !1,
|
|
665
670
|
size: 200
|
|
666
671
|
},
|
|
667
672
|
{
|
|
668
673
|
accessorKey: "purchaseOrder.items.length",
|
|
669
|
-
header: () =>
|
|
674
|
+
header: () => b("inventory.transfer.table.noOfItems"),
|
|
670
675
|
enableSorting: !1
|
|
671
676
|
},
|
|
672
677
|
{
|
|
673
678
|
accessorKey: "purchaseOrder.ref",
|
|
674
|
-
header: () =>
|
|
679
|
+
header: () => b("inventory.transfer.table.reference"),
|
|
675
680
|
enableSorting: !1,
|
|
676
681
|
size: "auto"
|
|
677
682
|
},
|
|
678
683
|
{
|
|
679
684
|
accessorKey: "purchaseOrder.status",
|
|
680
|
-
header: () =>
|
|
681
|
-
cell(
|
|
682
|
-
const
|
|
685
|
+
header: () => b("inventory.transfer.table.status"),
|
|
686
|
+
cell(i) {
|
|
687
|
+
const p = b(`inventory.transfer.status.${i.getValue() ?? ""}`), t = `${i.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
683
688
|
return N(
|
|
684
689
|
"div",
|
|
685
690
|
{
|
|
@@ -690,7 +695,7 @@ function ks(n, l) {
|
|
|
690
695
|
{
|
|
691
696
|
class: `fm-status-badge fm-status-badge-${t}`
|
|
692
697
|
},
|
|
693
|
-
|
|
698
|
+
p
|
|
694
699
|
)
|
|
695
700
|
);
|
|
696
701
|
},
|
|
@@ -698,14 +703,14 @@ function ks(n, l) {
|
|
|
698
703
|
},
|
|
699
704
|
{
|
|
700
705
|
id: "action",
|
|
701
|
-
cell(
|
|
702
|
-
const
|
|
703
|
-
...
|
|
706
|
+
cell(i) {
|
|
707
|
+
const p = i.row.original, v = (p.purchaseOrder ? m(p.purchaseOrder) : []).map((D) => D.value === z.Print ? {
|
|
708
|
+
...D,
|
|
704
709
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
705
|
-
} :
|
|
710
|
+
} : D);
|
|
706
711
|
return We(
|
|
707
712
|
v,
|
|
708
|
-
(
|
|
713
|
+
(D) => p.purchaseOrder ? f(D, p.purchaseOrder, p) : void 0
|
|
709
714
|
);
|
|
710
715
|
},
|
|
711
716
|
enableSorting: !1,
|
|
@@ -717,7 +722,7 @@ function ks(n, l) {
|
|
|
717
722
|
}
|
|
718
723
|
];
|
|
719
724
|
}
|
|
720
|
-
const h = G(() => n === "receive/request" ?
|
|
725
|
+
const h = G(() => n === "receive/request" ? u() : a());
|
|
721
726
|
return {
|
|
722
727
|
get columnDefs() {
|
|
723
728
|
return h.value;
|
|
@@ -733,13 +738,13 @@ const Ct = {
|
|
|
733
738
|
}, Bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ut = { class: "fm-typo-en-body-lg-600" }, Lt = { key: 0 }, Vt = { key: 1 }, Mt = {
|
|
734
739
|
key: 1,
|
|
735
740
|
class: "flex flex-col gap-4"
|
|
736
|
-
},
|
|
741
|
+
}, Kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jt = { class: "fm-typo-en-body-lg-600" }, zt = { key: 0 }, Gt = { key: 1 }, Ht = {
|
|
737
742
|
key: 2,
|
|
738
743
|
class: "flex flex-col gap-4"
|
|
739
744
|
}, Qt = { class: "fm-typo-en-body-lg-600" }, Yt = {
|
|
740
745
|
key: 3,
|
|
741
746
|
class: "flex flex-col gap-4"
|
|
742
|
-
}, Wt = { class: "fm-typo-en-body-lg-600" }, Jt = /* @__PURE__ */
|
|
747
|
+
}, Wt = { class: "fm-typo-en-body-lg-600" }, Jt = /* @__PURE__ */ qe({
|
|
743
748
|
__name: "NetSuiteInfo",
|
|
744
749
|
props: {
|
|
745
750
|
transferType: {},
|
|
@@ -750,76 +755,77 @@ const Ct = {
|
|
|
750
755
|
scope: {}
|
|
751
756
|
},
|
|
752
757
|
setup(n) {
|
|
753
|
-
const l = n, o = Be(),
|
|
758
|
+
const l = n, o = Be(), b = Ne(), m = j(l.poRequest);
|
|
754
759
|
at(async () => {
|
|
755
760
|
var a;
|
|
756
761
|
if (!l.poRequest && ((a = l.purchaseOrder) != null && a._id)) {
|
|
757
|
-
const h = await
|
|
762
|
+
const h = await b.getLatestPurchaseOrderRequest(l.purchaseOrder._id);
|
|
758
763
|
m.value = h;
|
|
759
764
|
}
|
|
760
765
|
});
|
|
761
766
|
const s = G(
|
|
762
767
|
() => {
|
|
763
|
-
var a, h,
|
|
768
|
+
var a, h, i, p, t, v;
|
|
764
769
|
return o.getSubsidiaryFullName(
|
|
765
|
-
((
|
|
770
|
+
((i = (h = (a = l.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : i.id) || ((v = (t = (p = l.poRequest) == null ? void 0 : p.netSuite) == null ? void 0 : t.subsidiary) == null ? void 0 : v.id)
|
|
766
771
|
).fullName;
|
|
767
772
|
}
|
|
768
773
|
), f = G(() => {
|
|
769
|
-
var a, h,
|
|
770
|
-
return (
|
|
771
|
-
}),
|
|
772
|
-
var a, h,
|
|
773
|
-
return (h = (a = l.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && h.length && ((
|
|
774
|
+
var a, h, i, p, t, v, D, w, A, I, W, J;
|
|
775
|
+
return (i = (h = (a = l.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : h.additionalInfo) != null && i.transactionnumber ? (v = (t = (p = l.purchaseOrder) == null ? void 0 : p.netSuite) == null ? void 0 : t.additionalInfo) == null ? void 0 : v.transactionnumber : (A = (w = (D = m.value) == null ? void 0 : D.netSuite) == null ? void 0 : w.additionalInfo) != null && A.transactionnumber ? (J = (W = (I = m.value) == null ? void 0 : I.netSuite) == null ? void 0 : W.additionalInfo) == null ? void 0 : J.transactionnumber : null;
|
|
776
|
+
}), u = G(() => {
|
|
777
|
+
var a, h, i, p, t, v;
|
|
778
|
+
return (h = (a = l.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && h.length && ((p = (i = l.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) == null ? void 0 : p.length) > 0 ? (v = (t = l.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) == null ? void 0 : v.map((D) => {
|
|
774
779
|
var w;
|
|
775
|
-
return (w =
|
|
780
|
+
return (w = D.netSuite) == null ? void 0 : w.refNo;
|
|
776
781
|
}).join(", ") : "N/A";
|
|
777
782
|
});
|
|
778
783
|
return (a, h) => {
|
|
779
|
-
var
|
|
780
|
-
return
|
|
784
|
+
var i, p, t, v, D, w, A, I, W, J, ae, ne, te, oe;
|
|
785
|
+
return y(o).isEnabled ? (_(), q("div", Ct, [
|
|
781
786
|
r("div", It, [
|
|
782
787
|
h[0] || (h[0] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
783
788
|
r("div", Ft, R(s.value || "N/A"), 1)
|
|
784
789
|
]),
|
|
785
|
-
!a.isTransferBetweenOutlets && ((
|
|
786
|
-
r("div", Bt, " NetSuite " + R(a.transferType ===
|
|
790
|
+
!a.isTransferBetweenOutlets && ((i = a.purchaseOrder) == null ? void 0 : i.status) !== y(se).Enum.REQUESTING && a.scope === y(Ee).RECEIVE_REQUEST ? (_(), q("div", Et, [
|
|
791
|
+
r("div", Bt, " NetSuite " + R(a.transferType === y(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
787
792
|
r("div", Ut, [
|
|
788
|
-
(t = (
|
|
793
|
+
(t = (p = a.purchaseOrder) == null ? void 0 : p.netSuite) != null && t.id ? (_(), q("span", Lt, R((D = (v = a.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : D.refNo) + " (" + R((A = (w = a.purchaseOrder) == null ? void 0 : w.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (_(), q("span", Vt, "N/A"))
|
|
789
794
|
])
|
|
790
|
-
])) :
|
|
791
|
-
!a.isTransferBetweenOutlets && m.value && ((I = a.purchaseOrder) == null ? void 0 : I.status) ===
|
|
792
|
-
r("div",
|
|
793
|
-
r("div",
|
|
794
|
-
(J = (W = m.value) == null ? void 0 : W.netSuite) != null && J.id ? (_(),
|
|
795
|
+
])) : V("", !0),
|
|
796
|
+
!a.isTransferBetweenOutlets && m.value && ((I = a.purchaseOrder) == null ? void 0 : I.status) === y(se).Enum.REQUESTING || a.scope === y(Ee).APPROVAL ? (_(), q("div", Mt, [
|
|
797
|
+
r("div", Kt, " (Request) NetSuite " + R(a.transferType === y(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
798
|
+
r("div", jt, [
|
|
799
|
+
(J = (W = m.value) == null ? void 0 : W.netSuite) != null && J.id ? (_(), q("span", zt, R((ne = (ae = m.value) == null ? void 0 : ae.netSuite) == null ? void 0 : ne.refNo) + " (" + R((oe = (te = m.value) == null ? void 0 : te.netSuite) == null ? void 0 : oe.id) + ") ", 1)) : (_(), q("span", Gt, "N/A"))
|
|
795
800
|
])
|
|
796
|
-
])) :
|
|
797
|
-
f.value ? (_(),
|
|
801
|
+
])) : V("", !0),
|
|
802
|
+
f.value ? (_(), q("div", Ht, [
|
|
798
803
|
h[1] || (h[1] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
799
804
|
r("div", Qt, R(f.value), 1)
|
|
800
|
-
])) :
|
|
801
|
-
|
|
805
|
+
])) : V("", !0),
|
|
806
|
+
y(o).isEnabled && a.transferType === y(he).TRANSFER && !a.isTransferBetweenOutlets ? (_(), q("div", Yt, [
|
|
802
807
|
h[2] || (h[2] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
803
|
-
r("div", Wt, R(
|
|
804
|
-
])) :
|
|
805
|
-
])) :
|
|
808
|
+
r("div", Wt, R(u.value), 1)
|
|
809
|
+
])) : V("", !0)
|
|
810
|
+
])) : V("", !0);
|
|
806
811
|
};
|
|
807
812
|
}
|
|
808
|
-
}), Xt = { class: "flex flex-row-reverse" }, Zt = /* @__PURE__ */
|
|
813
|
+
}), Xt = { class: "flex flex-row-reverse" }, Zt = /* @__PURE__ */ qe({
|
|
809
814
|
__name: "NetSuiteSync",
|
|
810
815
|
props: {
|
|
811
816
|
poRequest: {},
|
|
812
817
|
purchaseOrder: {},
|
|
813
|
-
isTransferBetweenOutlets: { type: Boolean }
|
|
818
|
+
isTransferBetweenOutlets: { type: Boolean },
|
|
819
|
+
scope: {}
|
|
814
820
|
},
|
|
815
821
|
setup(n) {
|
|
816
|
-
const l = n, o = Be(),
|
|
822
|
+
const l = n, o = Be(), b = Ve(), m = Le(), s = j(!1);
|
|
817
823
|
G(() => {
|
|
818
|
-
var
|
|
819
|
-
let
|
|
820
|
-
o.isEnabled || (
|
|
824
|
+
var i, p, t, v;
|
|
825
|
+
let u = !0;
|
|
826
|
+
o.isEnabled || (u = !1);
|
|
821
827
|
const a = l.purchaseOrder, h = l.poRequest;
|
|
822
|
-
return a && ((
|
|
828
|
+
return a && ((i = a == null ? void 0 : a.supplier) != null && i.internal ? (!h && a.status == se.enum.DRAFT && (u = !1), h && !((p = h == null ? void 0 : h.netSuite) != null && p.id) && (u = !1), l.isTransferBetweenOutlets && (u = !1)) : ((a == null ? void 0 : a.status) !== se.enum.REQUESTING && a.supplier.internal && (u = !1), !h && !((t = a == null ? void 0 : a.netSuite) != null && t.id) && (u = !1), !h && ((v = a == null ? void 0 : a.netSuite) != null && v.id) && (a == null ? void 0 : a.status) == se.enum.REQUESTING && (u = !1))), u;
|
|
823
829
|
});
|
|
824
830
|
async function f() {
|
|
825
831
|
s.value || m.open({
|
|
@@ -840,17 +846,20 @@ const Ct = {
|
|
|
840
846
|
},
|
|
841
847
|
secondaryActions: { text: "Not now", close: !0 }
|
|
842
848
|
}).onPrimary(async () => {
|
|
843
|
-
var
|
|
849
|
+
var u, a, h;
|
|
844
850
|
try {
|
|
845
851
|
s.value = !0;
|
|
846
|
-
const
|
|
847
|
-
await o.syncPurchaseOrder(
|
|
852
|
+
const i = ((u = l.purchaseOrder) == null ? void 0 : u._id) || ((a = l.poRequest) == null ? void 0 : a.purchaseOrderId) || "", p = (h = l.poRequest) == null ? void 0 : h.to.dbName;
|
|
853
|
+
await o.syncPurchaseOrder(
|
|
854
|
+
i,
|
|
855
|
+
l.scope === "approval" ? p : void 0
|
|
856
|
+
), b.open({
|
|
848
857
|
title: "Sync with NetSuite",
|
|
849
858
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
850
859
|
type: "success"
|
|
851
|
-
}), await new Promise((
|
|
860
|
+
}), await new Promise((t) => setTimeout(t, 5e3)), s.value = !1;
|
|
852
861
|
} catch {
|
|
853
|
-
|
|
862
|
+
b.open({
|
|
854
863
|
title: "Error",
|
|
855
864
|
message: "Failed to sync with NetSuite",
|
|
856
865
|
type: "error"
|
|
@@ -858,9 +867,9 @@ const Ct = {
|
|
|
858
867
|
}
|
|
859
868
|
});
|
|
860
869
|
}
|
|
861
|
-
return (
|
|
870
|
+
return (u, a) => {
|
|
862
871
|
const h = Q("FmButton");
|
|
863
|
-
return _(),
|
|
872
|
+
return _(), q("div", Xt, [
|
|
864
873
|
E(h, {
|
|
865
874
|
"prepend-icon": "sync",
|
|
866
875
|
variant: "secondary",
|
|
@@ -874,7 +883,7 @@ const Ct = {
|
|
|
874
883
|
]);
|
|
875
884
|
};
|
|
876
885
|
}
|
|
877
|
-
}), er = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, tr = { class: "flex flex-col gap-8" }, rr = { class: "flex w-full justify-end gap-16" }, sr = /* @__PURE__ */
|
|
886
|
+
}), er = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, tr = { class: "flex flex-col gap-8" }, rr = { class: "flex w-full justify-end gap-16" }, sr = /* @__PURE__ */ qe({
|
|
878
887
|
__name: "FulfillmentForm",
|
|
879
888
|
props: {
|
|
880
889
|
purchaseOrder: {},
|
|
@@ -882,39 +891,39 @@ const Ct = {
|
|
|
882
891
|
},
|
|
883
892
|
emits: ["update:show"],
|
|
884
893
|
setup(n, { emit: l }) {
|
|
885
|
-
const o = n,
|
|
894
|
+
const o = n, b = bt({
|
|
886
895
|
id: "",
|
|
887
896
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
888
897
|
items: []
|
|
889
898
|
}), m = j(), s = l;
|
|
890
899
|
return at(() => {
|
|
891
|
-
o.purchaseOrder && (console.log("props", o.purchaseOrder),
|
|
900
|
+
o.purchaseOrder && (console.log("props", o.purchaseOrder), b.items = o.purchaseOrder.items.map((f) => ({
|
|
892
901
|
id: f.id,
|
|
893
902
|
sku: f.sku,
|
|
894
903
|
measurement: f.measurement,
|
|
895
904
|
amount: f.quantity ?? { amount: 1, precision: 0 }
|
|
896
905
|
})));
|
|
897
|
-
}), (f,
|
|
898
|
-
const a = Q("FmTable"), h = Q("FmButton"),
|
|
899
|
-
return _(), ue(
|
|
906
|
+
}), (f, u) => {
|
|
907
|
+
const a = Q("FmTable"), h = Q("FmButton"), i = Q("FmForm");
|
|
908
|
+
return _(), ue(i, {
|
|
900
909
|
ref_key: "formRef",
|
|
901
910
|
ref: m,
|
|
902
911
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
903
912
|
onValidationFailed: console.log,
|
|
904
|
-
onValidationSuccess:
|
|
913
|
+
onValidationSuccess: u[1] || (u[1] = () => o.confirm(b))
|
|
905
914
|
}, {
|
|
906
915
|
default: de(() => [
|
|
907
|
-
|
|
916
|
+
u[2] || (u[2] = r("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
908
917
|
r("div", er, [
|
|
909
918
|
r("div", tr, [
|
|
910
919
|
E(a, {
|
|
911
920
|
"column-defs": [
|
|
912
921
|
{
|
|
913
922
|
header: "Code",
|
|
914
|
-
cell: (
|
|
915
|
-
const t = o.purchaseOrder.items.find((v) => v.id ===
|
|
923
|
+
cell: (p) => {
|
|
924
|
+
const t = o.purchaseOrder.items.find((v) => v.id === p.row.original.id || v.sku._id === p.row.original.sku._id);
|
|
916
925
|
return N(
|
|
917
|
-
|
|
926
|
+
y(Xe).FmTooltip,
|
|
918
927
|
{
|
|
919
928
|
content: t.code,
|
|
920
929
|
placement: "top",
|
|
@@ -933,10 +942,10 @@ const Ct = {
|
|
|
933
942
|
},
|
|
934
943
|
{
|
|
935
944
|
header: "Name",
|
|
936
|
-
cell: (
|
|
937
|
-
const t = o.purchaseOrder.items.find((v) => v.id ===
|
|
945
|
+
cell: (p) => {
|
|
946
|
+
const t = o.purchaseOrder.items.find((v) => v.id === p.row.original.id || v.sku._id === p.row.original.sku._id);
|
|
938
947
|
return N(
|
|
939
|
-
|
|
948
|
+
y(Xe).FmTooltip,
|
|
940
949
|
{
|
|
941
950
|
content: t.name,
|
|
942
951
|
placement: "top",
|
|
@@ -955,39 +964,39 @@ const Ct = {
|
|
|
955
964
|
},
|
|
956
965
|
{
|
|
957
966
|
header: "Amount",
|
|
958
|
-
cell: (
|
|
959
|
-
const t =
|
|
967
|
+
cell: (p) => {
|
|
968
|
+
const t = p.row.original, v = o.purchaseOrder.items.find((w) => w.id === t.id || w.sku._id === t.sku._id), D = t.amount ?? {
|
|
960
969
|
amount: 1,
|
|
961
970
|
precision: 0
|
|
962
971
|
};
|
|
963
|
-
return N(
|
|
972
|
+
return N(qt, {
|
|
964
973
|
style: {
|
|
965
974
|
flex: "1 1 0%"
|
|
966
975
|
},
|
|
967
976
|
modelValue: {
|
|
968
|
-
amount:
|
|
977
|
+
amount: D,
|
|
969
978
|
measurement: t.measurement ?? null
|
|
970
979
|
},
|
|
971
980
|
key: t.id ?? t.sku._id,
|
|
972
981
|
unit: t.sku.unit,
|
|
973
982
|
"onUpdate:modelValue": (w) => {
|
|
974
983
|
if (!w) return;
|
|
975
|
-
const
|
|
976
|
-
|
|
984
|
+
const A = b.items.find((I) => I.id === t.id || I.sku._id === t.sku._id);
|
|
985
|
+
A && (A.amount = w.amount);
|
|
977
986
|
},
|
|
978
987
|
disableUnit: !0,
|
|
979
988
|
rules: [
|
|
980
|
-
|
|
981
|
-
+
|
|
989
|
+
y(Nt)(
|
|
990
|
+
+y(le)({ amount: 0, precision: 0 })
|
|
982
991
|
),
|
|
983
|
-
|
|
992
|
+
y(At)(+y(le)(v.quantity))
|
|
984
993
|
],
|
|
985
994
|
applyDefaultRules: !0
|
|
986
995
|
});
|
|
987
996
|
}
|
|
988
997
|
}
|
|
989
998
|
],
|
|
990
|
-
"row-data":
|
|
999
|
+
"row-data": b.items,
|
|
991
1000
|
"hide-footer": !0
|
|
992
1001
|
}, null, 8, ["column-defs", "row-data"])
|
|
993
1002
|
])
|
|
@@ -1005,7 +1014,7 @@ const Ct = {
|
|
|
1005
1014
|
label: "Cancel",
|
|
1006
1015
|
size: "md",
|
|
1007
1016
|
variant: "secondary",
|
|
1008
|
-
onClick:
|
|
1017
|
+
onClick: u[0] || (u[0] = () => s("update:show", !1))
|
|
1009
1018
|
})
|
|
1010
1019
|
])
|
|
1011
1020
|
]),
|
|
@@ -1017,52 +1026,57 @@ const Ct = {
|
|
|
1017
1026
|
submitRequest: {
|
|
1018
1027
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
1019
1028
|
color: "primary",
|
|
1020
|
-
buttonVariant:
|
|
1029
|
+
buttonVariant: ee.Primary
|
|
1021
1030
|
},
|
|
1022
1031
|
confirmDraft: {
|
|
1023
1032
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
1024
1033
|
color: "primary",
|
|
1025
|
-
buttonVariant:
|
|
1034
|
+
buttonVariant: ee.Primary
|
|
1026
1035
|
},
|
|
1027
1036
|
cancelDraft: {
|
|
1028
1037
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
1029
1038
|
color: "system-error-300",
|
|
1030
|
-
buttonVariant:
|
|
1039
|
+
buttonVariant: ee.Destructive
|
|
1031
1040
|
},
|
|
1032
1041
|
approveDraft: {
|
|
1033
1042
|
translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
|
|
1034
1043
|
color: "primary",
|
|
1035
|
-
buttonVariant:
|
|
1044
|
+
buttonVariant: ee.Primary
|
|
1036
1045
|
},
|
|
1037
1046
|
rejectDraft: {
|
|
1038
1047
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
|
|
1039
1048
|
color: "system-error-300",
|
|
1040
|
-
buttonVariant:
|
|
1049
|
+
buttonVariant: ee.Destructive
|
|
1041
1050
|
},
|
|
1042
1051
|
approveRequest: {
|
|
1043
1052
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
1044
1053
|
color: "primary",
|
|
1045
|
-
buttonVariant:
|
|
1054
|
+
buttonVariant: ee.Primary
|
|
1046
1055
|
},
|
|
1047
1056
|
processRequest: {
|
|
1048
1057
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
1049
1058
|
color: "primary",
|
|
1050
|
-
buttonVariant:
|
|
1059
|
+
buttonVariant: ee.Primary
|
|
1051
1060
|
},
|
|
1052
1061
|
receiveStock: {
|
|
1053
1062
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
1054
1063
|
color: "primary",
|
|
1055
|
-
buttonVariant:
|
|
1064
|
+
buttonVariant: ee.Primary
|
|
1056
1065
|
},
|
|
1057
1066
|
completeReceive: {
|
|
1058
1067
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
1059
1068
|
color: "primary",
|
|
1060
|
-
buttonVariant:
|
|
1069
|
+
buttonVariant: ee.Plain
|
|
1061
1070
|
},
|
|
1062
1071
|
rejectRequest: {
|
|
1063
1072
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
1064
1073
|
color: "system-error-300",
|
|
1065
|
-
buttonVariant:
|
|
1074
|
+
buttonVariant: ee.Destructive
|
|
1075
|
+
},
|
|
1076
|
+
closeRequest: {
|
|
1077
|
+
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
1078
|
+
color: "system-error-300",
|
|
1079
|
+
buttonVariant: ee.Destructive
|
|
1066
1080
|
}
|
|
1067
1081
|
};
|
|
1068
1082
|
function ar() {
|
|
@@ -1090,16 +1104,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1090
1104
|
}, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xr = { class: "fm-typo-en-body-lg-600" }, Or = {
|
|
1091
1105
|
key: 3,
|
|
1092
1106
|
class: "flex flex-col gap-4"
|
|
1093
|
-
}, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dr = { class: "fm-typo-en-body-lg-600" },
|
|
1107
|
+
}, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dr = { class: "fm-typo-en-body-lg-600" }, qr = {
|
|
1094
1108
|
key: 4,
|
|
1095
1109
|
class: "flex flex-col gap-4"
|
|
1096
|
-
},
|
|
1110
|
+
}, Nr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" }, Tr = {
|
|
1097
1111
|
key: 0,
|
|
1098
1112
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1099
|
-
}, Pr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" },
|
|
1113
|
+
}, Pr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kr = {
|
|
1100
1114
|
key: 0,
|
|
1101
1115
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1102
|
-
},
|
|
1116
|
+
}, jr = { class: "py-8" }, zr = { class: "flex justify-end gap-4 items-center" }, Gr = { class: "fm-typo-en-body-lg-600" }, Hr = {
|
|
1103
1117
|
key: 1,
|
|
1104
1118
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
1105
1119
|
}, Qr = {
|
|
@@ -1120,7 +1134,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1120
1134
|
}, ls = { class: "flex-1 flex flex-col items-center" }, is = {
|
|
1121
1135
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1122
1136
|
name: "delivery details"
|
|
1123
|
-
}, us = { class: "flex flex-col gap-8" }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ms = { class: "flex flex-col gap-4" }, fs = { class: "flex gap-8 xs:flex-col" }, Ds = /* @__PURE__ */
|
|
1137
|
+
}, us = { class: "flex flex-col gap-8" }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ms = { class: "flex flex-col gap-4" }, fs = { class: "flex gap-8 xs:flex-col" }, Ds = /* @__PURE__ */ qe({
|
|
1124
1138
|
__name: "TransferDetails",
|
|
1125
1139
|
props: {
|
|
1126
1140
|
poRequest: {},
|
|
@@ -1134,7 +1148,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1134
1148
|
},
|
|
1135
1149
|
emits: ["update:show", "submitted"],
|
|
1136
1150
|
setup(n, { emit: l }) {
|
|
1137
|
-
const o = n,
|
|
1151
|
+
const o = n, b = l, m = Le(), s = Ve(), f = Me(), u = Dt(), a = me(), h = Ue(), i = G(
|
|
1138
1152
|
() => {
|
|
1139
1153
|
var e, c;
|
|
1140
1154
|
return {
|
|
@@ -1142,47 +1156,48 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1142
1156
|
name: ((c = h.sessionUser.value) == null ? void 0 : c.displayName) ?? ""
|
|
1143
1157
|
};
|
|
1144
1158
|
}
|
|
1145
|
-
),
|
|
1159
|
+
), p = ar(), { t } = ot(), v = G(
|
|
1146
1160
|
() => {
|
|
1147
|
-
var e, c,
|
|
1148
|
-
return ((c = (e = o.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((
|
|
1161
|
+
var e, c, g, k;
|
|
1162
|
+
return ((c = (e = o.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((k = (g = o.purchaseOrder) == null ? void 0 : g.supplier) == null ? void 0 : k.internal) === "warehouse" ? he.TRANSFER : he.PURCHASE;
|
|
1149
1163
|
}
|
|
1150
|
-
),
|
|
1151
|
-
var e, c,
|
|
1152
|
-
return v.value === he.TRANSFER && ((e = o.transferToDbName) == null ? void 0 : e.startsWith("restaurant")) && ((
|
|
1153
|
-
}), w = j(!1),
|
|
1164
|
+
), D = G(() => {
|
|
1165
|
+
var e, c, g;
|
|
1166
|
+
return v.value === he.TRANSFER && ((e = o.transferToDbName) == null ? void 0 : e.startsWith("restaurant")) && ((g = (c = o.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : g.internal) === "restaurant";
|
|
1167
|
+
}), w = j(!1), A = j(""), I = j(!0), W = Ne(), J = Tt(W.getWorkflowConfig), ae = lt(), ne = G(() => {
|
|
1154
1168
|
if (!o.purchaseOrder)
|
|
1155
1169
|
return [];
|
|
1156
1170
|
const e = J.result.value;
|
|
1157
1171
|
if (e.state === Ze.loading)
|
|
1158
1172
|
return [];
|
|
1159
1173
|
const c = {
|
|
1160
|
-
user:
|
|
1174
|
+
user: i.value,
|
|
1161
1175
|
executedAt: a.locations.computeFirst(
|
|
1162
|
-
(
|
|
1163
|
-
var
|
|
1164
|
-
return
|
|
1176
|
+
(k) => {
|
|
1177
|
+
var U;
|
|
1178
|
+
return k.dbName === ((U = a._currentLocation) == null ? void 0 : U.dbName) ? k : null;
|
|
1165
1179
|
}
|
|
1166
1180
|
),
|
|
1167
1181
|
purchaseOrderRequest: o.poRequest,
|
|
1168
1182
|
purchaseOrder: o.purchaseOrder
|
|
1169
1183
|
};
|
|
1170
|
-
|
|
1184
|
+
let g = [];
|
|
1185
|
+
return e.state === Ze.error ? (console.error("Error fetching workflow config:", e.error), g = Ce.getAvailableActions({
|
|
1171
1186
|
...c,
|
|
1172
1187
|
purchaseOrderConfig: Ce.getDefaultConfig()
|
|
1173
1188
|
}).actions.filter(
|
|
1174
|
-
(
|
|
1189
|
+
(k) => (
|
|
1175
1190
|
// TODO: create receiveStock & processRequest dialog
|
|
1176
1191
|
// to create their payload
|
|
1177
|
-
|
|
1192
|
+
k !== x.enum.receiveStock && k !== x.enum.processRequest && k !== x.enum.closeRequest
|
|
1178
1193
|
)
|
|
1179
|
-
)) : Ce.getAvailableActions({
|
|
1194
|
+
)) : g = Ce.getAvailableActions({
|
|
1180
1195
|
...c,
|
|
1181
1196
|
purchaseOrderConfig: e.data
|
|
1182
1197
|
}).actions.filter(
|
|
1183
|
-
(
|
|
1184
|
-
);
|
|
1185
|
-
}),
|
|
1198
|
+
(k) => k !== x.enum.receiveStock && k !== x.enum.processRequest && k !== x.enum.closeRequest
|
|
1199
|
+
), o.scope === "approval" && (g = g.filter((k) => k !== x.enum.completeReceive)), g;
|
|
1200
|
+
}), te = kt(o, "show"), oe = G(() => [
|
|
1186
1201
|
{
|
|
1187
1202
|
label: t("inventory.transfer.receiveRequest.details.overview"),
|
|
1188
1203
|
value: "overview"
|
|
@@ -1198,44 +1213,47 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1198
1213
|
e && (ie.value = oe.value[0]);
|
|
1199
1214
|
}
|
|
1200
1215
|
);
|
|
1201
|
-
async function Ae(e, c,
|
|
1202
|
-
return new Promise((
|
|
1216
|
+
async function Ae(e, c, g, k, U) {
|
|
1217
|
+
return new Promise((M, Y) => {
|
|
1203
1218
|
m.open({
|
|
1204
1219
|
closeButton: !1,
|
|
1205
|
-
title:
|
|
1206
|
-
message:
|
|
1207
|
-
primaryActions:
|
|
1220
|
+
title: k.title,
|
|
1221
|
+
message: k.message,
|
|
1222
|
+
primaryActions: k.primaryActions,
|
|
1208
1223
|
secondaryActions: { text: "No", close: !1 }
|
|
1209
1224
|
}).onPrimary(async () => {
|
|
1210
|
-
var d,
|
|
1225
|
+
var d, T, L, H;
|
|
1211
1226
|
try {
|
|
1212
1227
|
await ae({
|
|
1213
1228
|
operate: {
|
|
1214
|
-
operation:
|
|
1229
|
+
operation: g,
|
|
1215
1230
|
doc: e,
|
|
1216
1231
|
options: c
|
|
1217
1232
|
},
|
|
1218
1233
|
operateV2: {
|
|
1219
1234
|
_id: ((d = o.purchaseOrder) == null ? void 0 : d._id) ?? "",
|
|
1220
|
-
_rev: ((
|
|
1221
|
-
action:
|
|
1235
|
+
_rev: ((T = o.purchaseOrder) == null ? void 0 : T._rev) ?? "",
|
|
1236
|
+
action: g,
|
|
1237
|
+
payload: {
|
|
1238
|
+
fulfillment: c.fulfillment
|
|
1239
|
+
}
|
|
1222
1240
|
// add payload if action is receiveStock or processRequest
|
|
1223
1241
|
},
|
|
1224
|
-
transferTo: (H = (
|
|
1225
|
-
}).delayed(1e3),
|
|
1242
|
+
transferTo: (H = (L = o.poRequest) == null ? void 0 : L.to) == null ? void 0 : H.dbName
|
|
1243
|
+
}).delayed(1e3), M("submitted");
|
|
1226
1244
|
} catch (C) {
|
|
1227
1245
|
Y(C);
|
|
1228
1246
|
}
|
|
1229
1247
|
}).onSecondary(() => {
|
|
1230
|
-
|
|
1231
|
-
for (let d = 0; d <
|
|
1248
|
+
M("cancelled");
|
|
1249
|
+
for (let d = 0; d < U + 2; d++)
|
|
1232
1250
|
m.close();
|
|
1233
1251
|
}).onClose(() => {
|
|
1234
1252
|
});
|
|
1235
1253
|
});
|
|
1236
1254
|
}
|
|
1237
1255
|
async function be(e) {
|
|
1238
|
-
if (e ===
|
|
1256
|
+
if (e === x.enum.receiveStock)
|
|
1239
1257
|
return;
|
|
1240
1258
|
const c = ct[e];
|
|
1241
1259
|
if (!c) {
|
|
@@ -1246,16 +1264,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1246
1264
|
});
|
|
1247
1265
|
return;
|
|
1248
1266
|
}
|
|
1249
|
-
const { successMessage:
|
|
1267
|
+
const { successMessage: g } = c;
|
|
1250
1268
|
if (o.purchaseOrder) {
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
let
|
|
1254
|
-
if ((e ===
|
|
1255
|
-
e ===
|
|
1256
|
-
|
|
1257
|
-
else if (e ===
|
|
1258
|
-
const
|
|
1269
|
+
A.value = `${e}`, w.value = !0, I.value = !1;
|
|
1270
|
+
const k = {};
|
|
1271
|
+
let U = 0;
|
|
1272
|
+
if ((e === x.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1273
|
+
e === x.enum.completeReceive) && f.autoReceiveWarehouse)
|
|
1274
|
+
k.autoReceive = !0;
|
|
1275
|
+
else if (e === x.enum.approveRequest && f.acceptRequireFulfillment) {
|
|
1276
|
+
const M = await new Promise((Y, d) => {
|
|
1259
1277
|
m.open({
|
|
1260
1278
|
closeButton: !1,
|
|
1261
1279
|
title: "Confirm transfer amount",
|
|
@@ -1263,50 +1281,50 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1263
1281
|
dialogComponentProps: {
|
|
1264
1282
|
purchaseOrder: o.purchaseOrder,
|
|
1265
1283
|
confirm: Y,
|
|
1266
|
-
"onUpdate:show": (
|
|
1267
|
-
|
|
1284
|
+
"onUpdate:show": (T) => {
|
|
1285
|
+
T || (A.value = "", w.value = !1, I.value = !0, U++, m.close()), d("cancelled");
|
|
1268
1286
|
}
|
|
1269
1287
|
}
|
|
1270
1288
|
});
|
|
1271
1289
|
});
|
|
1272
|
-
|
|
1290
|
+
k.fulfillment = M;
|
|
1273
1291
|
}
|
|
1274
1292
|
try {
|
|
1275
1293
|
await Ae(
|
|
1276
1294
|
o.purchaseOrder,
|
|
1277
|
-
|
|
1295
|
+
k,
|
|
1278
1296
|
e,
|
|
1279
1297
|
c,
|
|
1280
|
-
|
|
1298
|
+
U
|
|
1281
1299
|
) === "submitted" && (s.open({
|
|
1282
1300
|
title: "Success",
|
|
1283
|
-
message:
|
|
1301
|
+
message: g,
|
|
1284
1302
|
type: "success"
|
|
1285
|
-
}),
|
|
1286
|
-
} catch (
|
|
1303
|
+
}), b("update:show", !1), b("submitted"));
|
|
1304
|
+
} catch (M) {
|
|
1287
1305
|
s.open({
|
|
1288
1306
|
title: "Something went wrong",
|
|
1289
1307
|
message: "Please try again.",
|
|
1290
1308
|
type: "error"
|
|
1291
|
-
}), console.error("Error when submitting PO operation", e, o.purchaseOrder,
|
|
1309
|
+
}), console.error("Error when submitting PO operation", e, o.purchaseOrder, M);
|
|
1292
1310
|
} finally {
|
|
1293
|
-
|
|
1311
|
+
A.value = "", w.value = !1, I.value = !0;
|
|
1294
1312
|
}
|
|
1295
1313
|
}
|
|
1296
1314
|
}
|
|
1297
1315
|
const Te = G(() => {
|
|
1298
1316
|
var e, c;
|
|
1299
1317
|
return ((e = o.purchaseOrder) == null ? void 0 : e.status) === se.enum.RECEIVING || ((c = o.purchaseOrder) == null ? void 0 : c.status) === se.enum.COMPLETE;
|
|
1300
|
-
}),
|
|
1301
|
-
var
|
|
1302
|
-
const
|
|
1303
|
-
(
|
|
1304
|
-
const H =
|
|
1305
|
-
return
|
|
1318
|
+
}), O = G(() => {
|
|
1319
|
+
var M, Y, d;
|
|
1320
|
+
const g = (((M = o.purchaseOrder) == null ? void 0 : M.deliveryOrder) ?? []).flatMap((T) => T.received ?? []).reduce(
|
|
1321
|
+
(T, L) => {
|
|
1322
|
+
const H = T[L.sku._id] ?? [];
|
|
1323
|
+
return T[L.sku._id] = [...H, L], T;
|
|
1306
1324
|
},
|
|
1307
1325
|
{}
|
|
1308
|
-
),
|
|
1309
|
-
(
|
|
1326
|
+
), k = Object.entries(g).reduce(
|
|
1327
|
+
(T, [L, H]) => {
|
|
1310
1328
|
const C = H.reduce((X, F) => {
|
|
1311
1329
|
const ce = yt(
|
|
1312
1330
|
X,
|
|
@@ -1314,16 +1332,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1314
1332
|
);
|
|
1315
1333
|
return Fe(ce, F.amount);
|
|
1316
1334
|
}, ke(0));
|
|
1317
|
-
return
|
|
1335
|
+
return T[L] = C, T;
|
|
1318
1336
|
},
|
|
1319
1337
|
{}
|
|
1320
|
-
),
|
|
1321
|
-
for (const
|
|
1322
|
-
|
|
1323
|
-
return
|
|
1338
|
+
), U = ((Y = o.purchaseOrder) == null ? void 0 : Y.items) ?? [];
|
|
1339
|
+
for (const T of U)
|
|
1340
|
+
k[d = T.sku._id] ?? (k[d] = ke(0));
|
|
1341
|
+
return k;
|
|
1324
1342
|
}), S = G(() => {
|
|
1325
|
-
var
|
|
1326
|
-
const e = ((
|
|
1343
|
+
var M, Y;
|
|
1344
|
+
const e = ((M = o.purchaseOrder) == null ? void 0 : M.deliveryOrder) ?? [], c = ((Y = o.purchaseOrder) == null ? void 0 : Y.deliveryFullfillment) ?? [], g = [
|
|
1327
1345
|
...e.map((d) => ({
|
|
1328
1346
|
createdAt: d.createdAt,
|
|
1329
1347
|
type: "grn",
|
|
@@ -1335,13 +1353,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1335
1353
|
doc: d
|
|
1336
1354
|
}))
|
|
1337
1355
|
];
|
|
1338
|
-
|
|
1339
|
-
function
|
|
1356
|
+
g.reverse().sort((d, T) => d.createdAt.localeCompare(T.createdAt));
|
|
1357
|
+
function k(d) {
|
|
1340
1358
|
var H, C, X, F, ce, ge, _e, we, $;
|
|
1341
|
-
const
|
|
1342
|
-
(C = (H = c[
|
|
1359
|
+
const T = c.findIndex((P) => P.id === d.fullfillmentId), L = [
|
|
1360
|
+
(C = (H = c[T]) == null ? void 0 : H.netSuite) != null && C.refNo ? {
|
|
1343
1361
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1344
|
-
values: [(F = (X = c[
|
|
1362
|
+
values: [(F = (X = c[T]) == null ? void 0 : X.netSuite) == null ? void 0 : F.refNo]
|
|
1345
1363
|
} : null,
|
|
1346
1364
|
(ce = d == null ? void 0 : d.netSuite) != null && ce.refNo ? {
|
|
1347
1365
|
label: "Netsuite ref no.",
|
|
@@ -1368,8 +1386,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1368
1386
|
},
|
|
1369
1387
|
{
|
|
1370
1388
|
label: "Received items",
|
|
1371
|
-
values: d.received.map((
|
|
1372
|
-
var
|
|
1389
|
+
values: d.received.map((P) => {
|
|
1390
|
+
var K;
|
|
1373
1391
|
return N("div", [
|
|
1374
1392
|
N(
|
|
1375
1393
|
"div",
|
|
@@ -1388,14 +1406,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1388
1406
|
{
|
|
1389
1407
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1390
1408
|
},
|
|
1391
|
-
`${
|
|
1409
|
+
`${P.sku.name}`
|
|
1392
1410
|
),
|
|
1393
1411
|
N(
|
|
1394
1412
|
"span",
|
|
1395
1413
|
{
|
|
1396
1414
|
class: "fm-typo-en-body-md-400"
|
|
1397
1415
|
},
|
|
1398
|
-
`${
|
|
1416
|
+
`${P.sku.code} `
|
|
1399
1417
|
)
|
|
1400
1418
|
]
|
|
1401
1419
|
),
|
|
@@ -1416,14 +1434,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1416
1434
|
{
|
|
1417
1435
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1418
1436
|
},
|
|
1419
|
-
le(
|
|
1437
|
+
le(P.amount, !1)
|
|
1420
1438
|
),
|
|
1421
1439
|
N(
|
|
1422
1440
|
"span",
|
|
1423
1441
|
{
|
|
1424
1442
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1425
1443
|
},
|
|
1426
|
-
((
|
|
1444
|
+
((K = P.measurement) == null ? void 0 : K.abbrev) ?? P.sku.unit.abbrev
|
|
1427
1445
|
)
|
|
1428
1446
|
]
|
|
1429
1447
|
),
|
|
@@ -1432,7 +1450,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1432
1450
|
{
|
|
1433
1451
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1434
1452
|
},
|
|
1435
|
-
`${
|
|
1453
|
+
`${P.cost ? `(${xe(P.cost)})` : ""}`
|
|
1436
1454
|
)
|
|
1437
1455
|
]
|
|
1438
1456
|
)
|
|
@@ -1449,24 +1467,24 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1449
1467
|
label: "Remark",
|
|
1450
1468
|
values: [d.remark]
|
|
1451
1469
|
} : null,
|
|
1452
|
-
|
|
1470
|
+
T > -1 ? {
|
|
1453
1471
|
label: "Fulfilment's sequence",
|
|
1454
|
-
values: [`${
|
|
1472
|
+
values: [`${T + 1}`]
|
|
1455
1473
|
} : null,
|
|
1456
|
-
...
|
|
1457
|
-
].filter((
|
|
1474
|
+
...L
|
|
1475
|
+
].filter((P) => P)
|
|
1458
1476
|
};
|
|
1459
1477
|
}
|
|
1460
|
-
function
|
|
1461
|
-
var
|
|
1462
|
-
const
|
|
1478
|
+
function U(d) {
|
|
1479
|
+
var L, H;
|
|
1480
|
+
const T = c.findIndex((C) => C.id === d.id);
|
|
1463
1481
|
return {
|
|
1464
1482
|
header: "Fulfillment",
|
|
1465
1483
|
date: Pe(new Date(d.createdAt)),
|
|
1466
1484
|
info: [
|
|
1467
1485
|
{
|
|
1468
1486
|
label: "Sequence",
|
|
1469
|
-
values: [String(
|
|
1487
|
+
values: [String(T + 1)]
|
|
1470
1488
|
},
|
|
1471
1489
|
{
|
|
1472
1490
|
label: "Receiveable items",
|
|
@@ -1543,19 +1561,19 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1543
1561
|
]);
|
|
1544
1562
|
})
|
|
1545
1563
|
},
|
|
1546
|
-
(
|
|
1564
|
+
(L = d.netSuite) != null && L.refNo ? {
|
|
1547
1565
|
label: "Ref no. (Netsuite)",
|
|
1548
1566
|
values: [(H = d.netSuite) == null ? void 0 : H.refNo]
|
|
1549
1567
|
} : null
|
|
1550
1568
|
].filter((C) => C)
|
|
1551
1569
|
};
|
|
1552
1570
|
}
|
|
1553
|
-
return
|
|
1571
|
+
return g.map((d) => {
|
|
1554
1572
|
switch (d.type) {
|
|
1555
1573
|
case "grn":
|
|
1556
|
-
return
|
|
1574
|
+
return k(d.doc);
|
|
1557
1575
|
case "fulfillment":
|
|
1558
|
-
return
|
|
1576
|
+
return U(d.doc);
|
|
1559
1577
|
}
|
|
1560
1578
|
});
|
|
1561
1579
|
}), B = G(() => {
|
|
@@ -1564,18 +1582,18 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1564
1582
|
...ke(0),
|
|
1565
1583
|
currency: Je()
|
|
1566
1584
|
};
|
|
1567
|
-
return ((c = o.purchaseOrder) == null ? void 0 : c.items.reduce((
|
|
1568
|
-
...Fe(
|
|
1585
|
+
return ((c = o.purchaseOrder) == null ? void 0 : c.items.reduce((g, k) => ({
|
|
1586
|
+
...Fe(g, k.totalCost ?? e),
|
|
1569
1587
|
currency: Je()
|
|
1570
1588
|
}), e)) ?? e;
|
|
1571
1589
|
});
|
|
1572
1590
|
return (e, c) => {
|
|
1573
1591
|
var C, X;
|
|
1574
|
-
const
|
|
1592
|
+
const g = Q("FmButtonGroup"), k = Q("FmChip"), U = Q("FmMenuDivider"), M = Q("FmCard"), Y = Q("FmIcon"), d = Q("FmTooltip"), T = Q("FmSpacer"), L = Q("FmButton"), H = Q("FmSideSheet");
|
|
1575
1593
|
return _(), ue(H, {
|
|
1576
|
-
header:
|
|
1577
|
-
modelValue:
|
|
1578
|
-
"onUpdate:modelValue": c[4] || (c[4] = (F) => _t(
|
|
1594
|
+
header: y(t)("inventory.transfer.receiveRequest.details.title") + ((C = e.purchaseOrder) != null && C.seqNumber ? ` #${(X = e.purchaseOrder) == null ? void 0 : X.seqNumber}` : ""),
|
|
1595
|
+
modelValue: y(te),
|
|
1596
|
+
"onUpdate:modelValue": c[4] || (c[4] = (F) => _t(te) ? te.value = F : null),
|
|
1579
1597
|
"dismiss-away": I.value,
|
|
1580
1598
|
"close-button": "",
|
|
1581
1599
|
"max-width": 600
|
|
@@ -1585,97 +1603,98 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1585
1603
|
return [
|
|
1586
1604
|
r("div", nr, [
|
|
1587
1605
|
r("div", null, [
|
|
1588
|
-
E(
|
|
1606
|
+
E(g, {
|
|
1589
1607
|
items: oe.value,
|
|
1590
1608
|
modelValue: ie.value,
|
|
1591
1609
|
"onUpdate:modelValue": c[0] || (c[0] = ($) => ie.value = $)
|
|
1592
1610
|
}, null, 8, ["items", "modelValue"])
|
|
1593
1611
|
]),
|
|
1594
|
-
ie.value.value === "overview" ? (_(),
|
|
1612
|
+
ie.value.value === "overview" ? (_(), q(re, { key: 0 }, [
|
|
1595
1613
|
r("div", null, [
|
|
1596
|
-
E(
|
|
1614
|
+
E(M, {
|
|
1597
1615
|
variant: "outlined",
|
|
1598
1616
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1599
1617
|
}, {
|
|
1600
1618
|
default: de(() => {
|
|
1601
|
-
var $,
|
|
1619
|
+
var $, P, K, fe, pe, Re, Ke, je, ze, Ge, He, Qe;
|
|
1602
1620
|
return [
|
|
1603
1621
|
r("div", or, [
|
|
1604
|
-
r("div", cr, R(
|
|
1622
|
+
r("div", cr, R(y(t)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1605
1623
|
r("div", null, [
|
|
1606
|
-
E(
|
|
1607
|
-
label:
|
|
1608
|
-
class: Oe(`fm-status-badge fm-status-badge-${(
|
|
1624
|
+
E(k, {
|
|
1625
|
+
label: y(t)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
|
|
1626
|
+
class: Oe(`fm-status-badge fm-status-badge-${(K = (P = e.purchaseOrder) == null ? void 0 : P.status) == null ? void 0 : K.toLocaleLowerCase("en-us")}`),
|
|
1609
1627
|
compact: ""
|
|
1610
1628
|
}, null, 8, ["label", "class"])
|
|
1611
1629
|
])
|
|
1612
1630
|
]),
|
|
1613
|
-
E(
|
|
1631
|
+
E(U),
|
|
1614
1632
|
r("div", lr, [
|
|
1615
1633
|
r("div", ir, [
|
|
1616
1634
|
r("div", ur, [
|
|
1617
|
-
r("div", dr, R(
|
|
1635
|
+
r("div", dr, R(y(t)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1618
1636
|
]),
|
|
1619
|
-
r("div", mr, R(
|
|
1637
|
+
r("div", mr, R(y(De)(((fe = e.purchaseOrder) == null ? void 0 : fe._id) ?? "")), 1)
|
|
1620
1638
|
]),
|
|
1621
|
-
(pe = e.purchaseOrder) != null && pe.effectiveAt ? (_(),
|
|
1622
|
-
r("div", pr, R(
|
|
1623
|
-
r("div", yr, R(
|
|
1624
|
-
])) :
|
|
1639
|
+
(pe = e.purchaseOrder) != null && pe.effectiveAt ? (_(), q("div", fr, [
|
|
1640
|
+
r("div", pr, R(y(t)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1641
|
+
r("div", yr, R(y(st)(new Date((Re = e.purchaseOrder) == null ? void 0 : Re.effectiveAt))), 1)
|
|
1642
|
+
])) : V("", !0),
|
|
1625
1643
|
r("div", vr, [
|
|
1626
|
-
r("div", hr, R(
|
|
1627
|
-
r("div", br, R(
|
|
1644
|
+
r("div", hr, R(y(t)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1645
|
+
r("div", br, R(y(t)(
|
|
1628
1646
|
`inventory.transfer.receiveRequest.details.type.${v.value.toLocaleLowerCase("en-US")}`
|
|
1629
1647
|
)), 1)
|
|
1630
1648
|
]),
|
|
1631
|
-
(
|
|
1632
|
-
r("div", _r, R(
|
|
1649
|
+
(je = (Ke = e.purchaseOrder) == null ? void 0 : Ke.supplier) != null && je.name ? (_(), q("div", gr, [
|
|
1650
|
+
r("div", _r, R(y(t)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1633
1651
|
r("div", wr, R((Ge = (ze = e.purchaseOrder) == null ? void 0 : ze.supplier) == null ? void 0 : Ge.name), 1)
|
|
1634
|
-
])) :
|
|
1635
|
-
e.transferTo ? (_(),
|
|
1636
|
-
r("div", Rr, R(
|
|
1652
|
+
])) : V("", !0),
|
|
1653
|
+
e.transferTo ? (_(), q("div", Sr, [
|
|
1654
|
+
r("div", Rr, R(y(t)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1637
1655
|
r("div", xr, R(e.transferTo), 1)
|
|
1638
|
-
])) :
|
|
1639
|
-
(He = e.purchaseOrder) != null && He.ref ? (_(),
|
|
1640
|
-
r("div", kr, R(
|
|
1656
|
+
])) : V("", !0),
|
|
1657
|
+
(He = e.purchaseOrder) != null && He.ref ? (_(), q("div", Or, [
|
|
1658
|
+
r("div", kr, R(y(t)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1641
1659
|
r("div", Dr, R(e.purchaseOrder.ref), 1)
|
|
1642
|
-
])) :
|
|
1643
|
-
(Qe = e.purchaseOrder) != null && Qe.remark ? (_(),
|
|
1644
|
-
r("div",
|
|
1660
|
+
])) : V("", !0),
|
|
1661
|
+
(Qe = e.purchaseOrder) != null && Qe.remark ? (_(), q("div", qr, [
|
|
1662
|
+
r("div", Nr, R(y(t)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1645
1663
|
r("div", Ar, R(e.purchaseOrder.remark), 1)
|
|
1646
|
-
])) :
|
|
1664
|
+
])) : V("", !0)
|
|
1647
1665
|
])
|
|
1648
1666
|
];
|
|
1649
1667
|
}),
|
|
1650
1668
|
_: 1
|
|
1651
1669
|
})
|
|
1652
1670
|
]),
|
|
1653
|
-
|
|
1671
|
+
y(u).isNetSuiteEnabled && !D.value ? (_(), q("div", Tr, [
|
|
1654
1672
|
r("div", Pr, [
|
|
1655
1673
|
c[5] || (c[5] = r("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1656
1674
|
r("div", null, [
|
|
1657
1675
|
E(Zt, {
|
|
1658
1676
|
"po-request": e.poRequest,
|
|
1659
1677
|
"purchase-order": e.purchaseOrder,
|
|
1660
|
-
"is-transfer-between-outlets":
|
|
1661
|
-
|
|
1678
|
+
"is-transfer-between-outlets": D.value,
|
|
1679
|
+
scope: e.scope
|
|
1680
|
+
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1662
1681
|
])
|
|
1663
1682
|
]),
|
|
1664
|
-
E(
|
|
1683
|
+
E(U),
|
|
1665
1684
|
E(Jt, {
|
|
1666
1685
|
"po-request": e.poRequest,
|
|
1667
1686
|
"purchase-order": e.purchaseOrder,
|
|
1668
1687
|
"transfer-type": v.value,
|
|
1669
1688
|
"transfer-to-db-name": e.transferToDbName,
|
|
1670
|
-
"is-transfer-between-outlets":
|
|
1689
|
+
"is-transfer-between-outlets": D.value,
|
|
1671
1690
|
scope: e.scope
|
|
1672
1691
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1673
|
-
])) :
|
|
1692
|
+
])) : V("", !0),
|
|
1674
1693
|
r("div", $r, [
|
|
1675
1694
|
r("div", Cr, [
|
|
1676
1695
|
r("div", Ir, [
|
|
1677
1696
|
r("span", Fr, [
|
|
1678
|
-
$e(R(Te.value ?
|
|
1697
|
+
$e(R(Te.value ? y(t)("inventory.transfer.receiveRequest.details.receivedItems") : y(t)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1679
1698
|
(ce = (F = e.purchaseOrder) == null ? void 0 : F.netSuite) != null && ce.missingItems && ((_e = (ge = e.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.missingItems.length) > 0 ? (_(), ue(d, {
|
|
1680
1699
|
key: 0,
|
|
1681
1700
|
variant: "rich",
|
|
@@ -1683,10 +1702,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1683
1702
|
"z-index": 51
|
|
1684
1703
|
}, {
|
|
1685
1704
|
content: de(() => {
|
|
1686
|
-
var $,
|
|
1705
|
+
var $, P;
|
|
1687
1706
|
return [
|
|
1688
1707
|
r("div", Er, [
|
|
1689
|
-
(_(!0),
|
|
1708
|
+
(_(!0), q(re, null, ye((P = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : P.missingItems, (K, fe) => (_(), q("div", {
|
|
1690
1709
|
class: "flex justify-center align-middle",
|
|
1691
1710
|
key: fe
|
|
1692
1711
|
}, [
|
|
@@ -1694,7 +1713,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1694
1713
|
name: "arrow_right",
|
|
1695
1714
|
size: "sm"
|
|
1696
1715
|
}),
|
|
1697
|
-
$e(" " + R(`(${
|
|
1716
|
+
$e(" " + R(`(${K.netSuiteId}) ${K.name}: ${K.reason}`), 1)
|
|
1698
1717
|
]))), 128))
|
|
1699
1718
|
])
|
|
1700
1719
|
];
|
|
@@ -1707,48 +1726,48 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1707
1726
|
})
|
|
1708
1727
|
]),
|
|
1709
1728
|
_: 1
|
|
1710
|
-
})) :
|
|
1729
|
+
})) : V("", !0)
|
|
1711
1730
|
])
|
|
1712
1731
|
]),
|
|
1713
|
-
E(
|
|
1714
|
-
(_(!0),
|
|
1715
|
-
var
|
|
1716
|
-
return _(),
|
|
1732
|
+
E(U),
|
|
1733
|
+
(_(!0), q(re, null, ye(((we = e.purchaseOrder) == null ? void 0 : we.items) ?? [], ($) => {
|
|
1734
|
+
var P;
|
|
1735
|
+
return _(), q("div", {
|
|
1717
1736
|
key: $.code,
|
|
1718
1737
|
class: "flex flex-col"
|
|
1719
1738
|
}, [
|
|
1720
1739
|
r("div", Br, [
|
|
1721
1740
|
r("div", Ur, R($.name), 1),
|
|
1722
|
-
r("div", Lr, R(
|
|
1741
|
+
r("div", Lr, R(y(le)(O.value[$.sku._id], !1)) + "/" + R(y(nt)($.quantity, $.sku.unit, $.measurement)), 1)
|
|
1723
1742
|
]),
|
|
1724
1743
|
r("div", Vr, [
|
|
1725
1744
|
r("div", Mr, R($.code), 1),
|
|
1726
|
-
(
|
|
1745
|
+
(P = $.totalCost) != null && P.amount && y(f).enableTotalCost ? (_(), q("div", Kr, " (" + R(y(xe)($.totalCost)) + ") ", 1)) : V("", !0)
|
|
1727
1746
|
])
|
|
1728
1747
|
]);
|
|
1729
1748
|
}), 128)),
|
|
1730
|
-
+
|
|
1731
|
-
r("div",
|
|
1732
|
-
E(
|
|
1749
|
+
+y(le)(B.value) ? (_(), q(re, { key: 0 }, [
|
|
1750
|
+
r("div", jr, [
|
|
1751
|
+
E(U)
|
|
1733
1752
|
]),
|
|
1734
1753
|
r("div", zr, [
|
|
1735
1754
|
c[6] || (c[6] = r("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
1736
|
-
r("div", Gr, R(
|
|
1755
|
+
r("div", Gr, R(y(xe)(B.value)), 1)
|
|
1737
1756
|
])
|
|
1738
|
-
], 64)) :
|
|
1757
|
+
], 64)) : V("", !0)
|
|
1739
1758
|
])
|
|
1740
1759
|
])
|
|
1741
|
-
], 64)) : ie.value.value === "deliveryHistory" ? (_(),
|
|
1742
|
-
S.value.length ? (_(),
|
|
1743
|
-
(_(!0),
|
|
1760
|
+
], 64)) : ie.value.value === "deliveryHistory" ? (_(), q("div", Hr, [
|
|
1761
|
+
S.value.length ? (_(), q("div", Xr, [
|
|
1762
|
+
(_(!0), q(re, null, ye(S.value, ($, P) => (_(), q(re, { key: P }, [
|
|
1744
1763
|
r("div", Zr, [
|
|
1745
1764
|
r("div", es, [
|
|
1746
1765
|
r("div", ts, [
|
|
1747
1766
|
r("div", {
|
|
1748
1767
|
class: Oe([
|
|
1749
1768
|
{
|
|
1750
|
-
"bg-fm-color-primary":
|
|
1751
|
-
"bg-white":
|
|
1769
|
+
"bg-fm-color-primary": P !== 0,
|
|
1770
|
+
"bg-white": P === 0
|
|
1752
1771
|
},
|
|
1753
1772
|
"w-[2px] h-full"
|
|
1754
1773
|
])
|
|
@@ -1759,8 +1778,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1759
1778
|
r("div", {
|
|
1760
1779
|
class: Oe([
|
|
1761
1780
|
{
|
|
1762
|
-
"bg-fm-color-primary":
|
|
1763
|
-
"bg-white":
|
|
1781
|
+
"bg-fm-color-primary": P < S.value.length - 1,
|
|
1782
|
+
"bg-white": P >= S.value.length - 1
|
|
1764
1783
|
},
|
|
1765
1784
|
"w-[2px] h-full"
|
|
1766
1785
|
])
|
|
@@ -1778,8 +1797,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1778
1797
|
r("div", {
|
|
1779
1798
|
class: Oe([
|
|
1780
1799
|
{
|
|
1781
|
-
"bg-fm-color-primary":
|
|
1782
|
-
"bg-white":
|
|
1800
|
+
"bg-fm-color-primary": P < S.value.length - 1,
|
|
1801
|
+
"bg-white": P >= S.value.length - 1
|
|
1783
1802
|
},
|
|
1784
1803
|
"w-[2px] h-full"
|
|
1785
1804
|
])
|
|
@@ -1787,23 +1806,23 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1787
1806
|
])
|
|
1788
1807
|
]),
|
|
1789
1808
|
r("div", is, [
|
|
1790
|
-
E(
|
|
1809
|
+
E(M, {
|
|
1791
1810
|
variant: "outlined",
|
|
1792
1811
|
class: "py-12 px-16"
|
|
1793
1812
|
}, {
|
|
1794
1813
|
default: de(() => [
|
|
1795
1814
|
r("div", us, [
|
|
1796
|
-
(_(!0),
|
|
1815
|
+
(_(!0), q(re, null, ye($.info, (K, fe) => (_(), q("div", {
|
|
1797
1816
|
key: fe,
|
|
1798
1817
|
class: "flex flex-col gap-4"
|
|
1799
1818
|
}, [
|
|
1800
|
-
r("div", ds, R(
|
|
1819
|
+
r("div", ds, R(K == null ? void 0 : K.label), 1),
|
|
1801
1820
|
r("div", ms, [
|
|
1802
|
-
(_(!0),
|
|
1821
|
+
(_(!0), q(re, null, ye(K == null ? void 0 : K.values, (pe, Re) => (_(), q("div", {
|
|
1803
1822
|
key: Re,
|
|
1804
1823
|
class: "fm-typo-en-body-lg-600"
|
|
1805
1824
|
}, [
|
|
1806
|
-
typeof pe == "string" ? (_(),
|
|
1825
|
+
typeof pe == "string" ? (_(), q(re, { key: 0 }, [
|
|
1807
1826
|
$e(R(pe), 1)
|
|
1808
1827
|
], 64)) : (_(), ue(wt(pe), { key: 1 }))
|
|
1809
1828
|
]))), 128))
|
|
@@ -1816,51 +1835,51 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1816
1835
|
])
|
|
1817
1836
|
])
|
|
1818
1837
|
], 64))), 128))
|
|
1819
|
-
])) : (_(),
|
|
1820
|
-
E(
|
|
1838
|
+
])) : (_(), q("div", Qr, [
|
|
1839
|
+
E(T),
|
|
1821
1840
|
r("div", null, [
|
|
1822
1841
|
r("img", {
|
|
1823
|
-
src:
|
|
1842
|
+
src: y(Ot),
|
|
1824
1843
|
alt: "List is empty"
|
|
1825
1844
|
}, null, 8, Yr)
|
|
1826
1845
|
]),
|
|
1827
|
-
r("div", Wr, R(
|
|
1828
|
-
r("div", Jr, R(
|
|
1829
|
-
E(
|
|
1830
|
-
E(
|
|
1846
|
+
r("div", Wr, R(y(t)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1847
|
+
r("div", Jr, R(y(t)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1848
|
+
E(T),
|
|
1849
|
+
E(T)
|
|
1831
1850
|
]))
|
|
1832
|
-
])) :
|
|
1851
|
+
])) : V("", !0)
|
|
1833
1852
|
])
|
|
1834
1853
|
];
|
|
1835
1854
|
}),
|
|
1836
1855
|
"side-sheet-footer": de(() => [
|
|
1837
1856
|
r("div", fs, [
|
|
1838
|
-
(_(!0),
|
|
1857
|
+
(_(!0), q(re, null, ye(ne.value, (F) => (_(), ue(L, {
|
|
1839
1858
|
key: F,
|
|
1840
|
-
label:
|
|
1859
|
+
label: y(t)(y(et)[F].translationKey),
|
|
1841
1860
|
onClick: (ce) => be(F),
|
|
1842
|
-
loading:
|
|
1843
|
-
disabled:
|
|
1844
|
-
variant:
|
|
1861
|
+
loading: A.value === F,
|
|
1862
|
+
disabled: A.value !== F && w.value,
|
|
1863
|
+
variant: y(et)[F].buttonVariant
|
|
1845
1864
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"]))), 128)),
|
|
1846
|
-
p
|
|
1865
|
+
y(p).ableToMarkReceived(e.purchaseOrder) && !ne.value.includes("completeReceive") ? (_(), ue(L, {
|
|
1847
1866
|
key: 0,
|
|
1848
|
-
label:
|
|
1867
|
+
label: y(t)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1849
1868
|
onClick: c[1] || (c[1] = (F) => be("completeReceive")),
|
|
1850
|
-
loading:
|
|
1851
|
-
disabled:
|
|
1852
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1853
|
-
p
|
|
1869
|
+
loading: A.value === "completeReceive",
|
|
1870
|
+
disabled: A.value !== "completeReceive" && w.value
|
|
1871
|
+
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
1872
|
+
y(p).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !ne.value.includes("approveRequest") ? (_(), ue(L, {
|
|
1854
1873
|
key: 1,
|
|
1855
|
-
label:
|
|
1874
|
+
label: y(t)("inventory.transfer.approval.actions.approveRequest"),
|
|
1856
1875
|
onClick: c[2] || (c[2] = (F) => be("approveRequest")),
|
|
1857
|
-
loading:
|
|
1858
|
-
disabled:
|
|
1859
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1860
|
-
E(
|
|
1861
|
-
label:
|
|
1876
|
+
loading: A.value === "approveRequest",
|
|
1877
|
+
disabled: A.value !== "approveRequest" && w.value
|
|
1878
|
+
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
1879
|
+
E(L, {
|
|
1880
|
+
label: y(t)("common.close"),
|
|
1862
1881
|
variant: "tertiary",
|
|
1863
|
-
onClick: c[3] || (c[3] = (F) =>
|
|
1882
|
+
onClick: c[3] || (c[3] = (F) => b("update:show", !1))
|
|
1864
1883
|
}, null, 8, ["label"])
|
|
1865
1884
|
])
|
|
1866
1885
|
]),
|
|
@@ -1875,5 +1894,5 @@ export {
|
|
|
1875
1894
|
Os as a,
|
|
1876
1895
|
ks as b,
|
|
1877
1896
|
Pt as g,
|
|
1878
|
-
|
|
1897
|
+
Ne as u
|
|
1879
1898
|
};
|