@feedmepos/mf-inventory-portal 0.0.22-dev.34 → 0.0.22-dev.36
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/{ApprovalView-2pX2IV1F.js → ApprovalView-av_qng0N.js} +3 -3
- package/dist/{BindingsDialog-EyImpE9g.js → BindingsDialog-VZ6YelwP.js} +1 -1
- package/dist/{BindingsPicker-CbBNBcWW.js → BindingsPicker-BFYv2ftI.js} +1 -1
- package/dist/{BindingsTable-CJeV7Dd2.js → BindingsTable-DFowW8vT.js} +1 -1
- package/dist/{ClosingTemplateView-BDEooji1.js → ClosingTemplateView-DNcgyBVw.js} +5 -5
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAZ4P0Ax.js} +3 -3
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js} +1 -1
- package/dist/{IngredientsView-BvKaI0nb.js → IngredientsView-afICUj_U.js} +3 -3
- package/dist/{IntegrationView-1lXCciJp.js → IntegrationView-DT5F9V0h.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CXw4tAI_.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C6a6F_jD.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-036mLqRD.js → PurchaseOrderPrintPreview-BMCy5C1z.js} +1 -1
- package/dist/ReceiveRequestView-DBU59iYm.js +4050 -0
- package/dist/{RecipeView-BuiA-2uY.js → RecipeView-Brnk8Ar7.js} +3 -3
- package/dist/{StockView-BKX6NX-g.js → StockView-BtTZNhlp.js} +5 -5
- package/dist/{SupplierView-Ck5hH5gT.js → SupplierView-C0GT_JzY.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js → TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js} +190 -190
- package/dist/{TransferTemplateView-ByYEje9E.js → TransferTemplateView-SrBMTzU-.js} +8 -8
- package/dist/{UnitView-DB2hQFMC.js → UnitView-Dw2xLWy4.js} +4 -4
- package/dist/{WarehouseView-CFJiuhpx.js → WarehouseView-Cgf1mP8s.js} +2 -2
- package/dist/{app-Z9P39kGh.js → app-Iz-opVBA.js} +246 -237
- package/dist/app.js +1 -1
- package/dist/{decimal-DIe_fFDH.js → decimal-ffsKJesh.js} +1 -1
- package/dist/{defineDeepModel-DH8vhBpR.js → defineDeepModel-CDrYKSnU.js} +1 -1
- package/dist/{format-time-from-id-CAjL4U2X.js → format-time-from-id-e9QU46u4.js} +1 -1
- package/dist/{purchase-order-transaction-type-BJDnbhdk.js → purchase-order-transaction-type-DN3Czz6K.js} +2 -2
- package/dist/stores/netsuite.d.ts +1 -0
- package/dist/{supplier-wJJ7ATk2.js → supplier-DdJIh1nj.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CeSeHnX0.js → use-template-enabled-locations-2-BSLLHtkm.js} +1 -1
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +44 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +42 -34
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +75 -51
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +75 -51
- package/dist/{xlsx-DrDljHnF.js → xlsx-C8qXPxB4.js} +1 -1
- package/dist/{xlsx.util-BwF0vRjF.js → xlsx.util-DGLr1W_5.js} +2 -2
- package/package.json +3 -3
- package/dist/ReceiveRequestView-BGlxEJkh.js +0 -1626
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ref as U, computed as Y, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as v, createBlock as V, unref as
|
|
2
|
-
import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { o as Be, j as fe, al as
|
|
1
|
+
import { ref as U, computed as Y, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as v, createBlock as V, unref as l, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as z, createElementBlock as A, Fragment as ee, toDisplayString as y, normalizeClass as ue, createCommentVNode as P, renderList as de } from "vue";
|
|
2
|
+
import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js";
|
|
3
|
+
import { o as Be, j as fe, al as w, K as Ke, L as Ve, am as Ge, c as Ae, a7 as I, x as qe, b as Pe, D as Ce, m as be, a as le, an as Te, J as He, H as ze, a9 as Ye, T as De } from "./app-Iz-opVBA.js";
|
|
4
4
|
import { F as ke, D as T, R as q } from "./row-action.enum-PMKMRrZR.js";
|
|
5
5
|
import { useDialog as Ne, useSnackbar as Ee, useProxiedModel as Qe } from "@feedmepos/ui-library";
|
|
6
|
-
import { p as We, f as pe } from "./format-time-from-id-
|
|
7
|
-
import { b as Je, u as Xe, f as $e, P as me } from "./purchase-order-transaction-type-
|
|
6
|
+
import { p as We, f as pe } from "./format-time-from-id-e9QU46u4.js";
|
|
7
|
+
import { b as Je, u as Xe, f as $e, P as me } from "./purchase-order-transaction-type-DN3Czz6K.js";
|
|
8
8
|
import { c as xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { F as Ze } from "./decimal-
|
|
9
|
+
import { F as Ze } from "./decimal-ffsKJesh.js";
|
|
10
10
|
import { useI18n as Fe } from "@feedmepos/mf-common";
|
|
11
11
|
import { E as et } from "./empty-placeholder-wf6-BWE8.js";
|
|
12
|
-
const Ie = Be((u,
|
|
12
|
+
const Ie = Be((u, _) => {
|
|
13
13
|
const p = fe();
|
|
14
14
|
return {
|
|
15
15
|
async readRequests(r) {
|
|
16
16
|
const R = r ?? p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-request`;
|
|
17
|
-
return await
|
|
17
|
+
return await _.get(O);
|
|
18
18
|
},
|
|
19
19
|
async getPurchaseOrders({
|
|
20
20
|
start: r,
|
|
21
21
|
end: R
|
|
22
22
|
}) {
|
|
23
23
|
const O = p.currentLocationDBName, C = `${u.inventoryBackendUrl}/${O}/purchase-order`;
|
|
24
|
-
return await
|
|
24
|
+
return await _.get(`${C}?start=${r}&end=${R}`);
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrderById(r) {
|
|
27
27
|
const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
|
|
28
|
-
return await
|
|
28
|
+
return await _.get(`${O}/${r}`);
|
|
29
29
|
},
|
|
30
30
|
async processPurchaseOrder(r, R) {
|
|
31
31
|
const O = p.currentLocationDBName, C = R || O, N = `${u.inventoryBackendUrl}/${C}/purchase-order/run-operation`;
|
|
32
|
-
return await
|
|
32
|
+
return await _.put(N, r);
|
|
33
33
|
},
|
|
34
34
|
async createPurchaseOrder(r) {
|
|
35
35
|
const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
|
|
36
|
-
return await
|
|
36
|
+
return await _.post(O, r);
|
|
37
37
|
},
|
|
38
38
|
async updatePurchaseOrder(r) {
|
|
39
39
|
const R = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${R}/purchase-order`;
|
|
40
|
-
return await
|
|
40
|
+
return await _.put(O, r);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}), Me = {
|
|
44
|
-
[
|
|
44
|
+
[w.enum.confirmDraft]: {
|
|
45
45
|
primaryActions: {
|
|
46
46
|
text: "Confirm draft",
|
|
47
47
|
close: !0
|
|
@@ -50,7 +50,7 @@ const Ie = Be((u, g) => {
|
|
|
50
50
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
51
51
|
successMessage: "Purchase order draft has been confirmed"
|
|
52
52
|
},
|
|
53
|
-
[
|
|
53
|
+
[w.enum.cancelDraft]: {
|
|
54
54
|
primaryActions: {
|
|
55
55
|
text: "Cancel draft",
|
|
56
56
|
close: !0,
|
|
@@ -60,7 +60,7 @@ const Ie = Be((u, g) => {
|
|
|
60
60
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
61
61
|
successMessage: "Purchase order draft has been cancelled"
|
|
62
62
|
},
|
|
63
|
-
[
|
|
63
|
+
[w.enum.submitRequest]: {
|
|
64
64
|
primaryActions: {
|
|
65
65
|
text: "Submit request",
|
|
66
66
|
close: !0
|
|
@@ -69,7 +69,7 @@ const Ie = Be((u, g) => {
|
|
|
69
69
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
70
70
|
successMessage: "Purchase order draft has been submitted"
|
|
71
71
|
},
|
|
72
|
-
[
|
|
72
|
+
[w.enum.completeReceive]: {
|
|
73
73
|
primaryActions: {
|
|
74
74
|
text: "Mark received",
|
|
75
75
|
close: !0
|
|
@@ -78,7 +78,7 @@ const Ie = Be((u, g) => {
|
|
|
78
78
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
79
79
|
successMessage: "Purchase order has been marked as received"
|
|
80
80
|
},
|
|
81
|
-
[
|
|
81
|
+
[w.enum.approveRequest]: {
|
|
82
82
|
primaryActions: {
|
|
83
83
|
text: "Approve request",
|
|
84
84
|
close: !0
|
|
@@ -87,7 +87,7 @@ const Ie = Be((u, g) => {
|
|
|
87
87
|
message: "Purchase order will be approved.",
|
|
88
88
|
successMessage: "Purchase order has been approved"
|
|
89
89
|
},
|
|
90
|
-
[
|
|
90
|
+
[w.enum.rejectRequest]: {
|
|
91
91
|
primaryActions: {
|
|
92
92
|
text: "Reject request",
|
|
93
93
|
close: !0,
|
|
@@ -98,52 +98,52 @@ const Ie = Be((u, g) => {
|
|
|
98
98
|
successMessage: "Purchase order has been rejected"
|
|
99
99
|
}
|
|
100
100
|
}, oe = U();
|
|
101
|
-
function Rr(u,
|
|
101
|
+
function Rr(u, _) {
|
|
102
102
|
const p = Ne(), r = fe(), R = Pe(), O = Je(), C = Xe(), N = U(!1), i = Ee(), M = Ie(), c = U(new Array()), d = U(
|
|
103
|
-
|
|
103
|
+
_ != null && _.startDate && (_ != null && _.endDate) ? _ : je()
|
|
104
104
|
), m = Y(() => {
|
|
105
|
-
const t = new Date(d.value.startDate),
|
|
105
|
+
const t = new Date(d.value.startDate), n = new Date(d.value.endDate);
|
|
106
106
|
return {
|
|
107
107
|
start: Ke(t).toISOString(),
|
|
108
|
-
end: Ve(
|
|
108
|
+
end: Ve(n).toISOString()
|
|
109
109
|
};
|
|
110
110
|
}), f = U(new Array()), L = Ge(), G = U(null);
|
|
111
111
|
async function re(t) {
|
|
112
|
-
let
|
|
113
|
-
if (R.mustUsePoTemplate && !(t != null && t.template) && (
|
|
112
|
+
let n;
|
|
113
|
+
if (R.mustUsePoTemplate && !(t != null && t.template) && (n = await O.getTemplateId(
|
|
114
114
|
C.templates.value
|
|
115
|
-
), !
|
|
115
|
+
), !n))
|
|
116
116
|
return;
|
|
117
|
-
const
|
|
117
|
+
const h = {
|
|
118
118
|
mode: ke.CREATE,
|
|
119
119
|
modelValue: t || void 0,
|
|
120
120
|
show: !0,
|
|
121
|
-
"onUpdate:show"(
|
|
122
|
-
oe.value.show =
|
|
121
|
+
"onUpdate:show"(g) {
|
|
122
|
+
oe.value.show = g;
|
|
123
123
|
},
|
|
124
|
-
templateId:
|
|
124
|
+
templateId: n,
|
|
125
125
|
lastClosingDate: G.value
|
|
126
126
|
};
|
|
127
|
-
oe.value =
|
|
127
|
+
oe.value = h;
|
|
128
128
|
}
|
|
129
129
|
function ve(t) {
|
|
130
|
-
const
|
|
130
|
+
const n = {
|
|
131
131
|
mode: ke.UPDATE,
|
|
132
132
|
modelValue: Ae(t),
|
|
133
133
|
show: !0,
|
|
134
|
-
"onUpdate:show"(
|
|
135
|
-
oe.value.show =
|
|
134
|
+
"onUpdate:show"(h) {
|
|
135
|
+
oe.value.show = h;
|
|
136
136
|
},
|
|
137
137
|
lastClosingDate: G.value
|
|
138
138
|
};
|
|
139
|
-
oe.value =
|
|
139
|
+
oe.value = n;
|
|
140
140
|
}
|
|
141
141
|
async function B() {
|
|
142
142
|
c.value = [], N.value = !0;
|
|
143
143
|
try {
|
|
144
|
-
c.value = await M.getPurchaseOrders(m.value).then((
|
|
145
|
-
const t = await L.readLastClosing(!0),
|
|
146
|
-
|
|
144
|
+
c.value = await M.getPurchaseOrders(m.value).then((h) => h.sort((g, o) => o._id.localeCompare(g._id)));
|
|
145
|
+
const t = await L.readLastClosing(!0), n = t == null ? void 0 : t._id;
|
|
146
|
+
n && (G.value = We(n)), R.mustUsePoTemplate && await C.fetchTemplates();
|
|
147
147
|
} catch {
|
|
148
148
|
i.open({
|
|
149
149
|
title: "Something went wrong",
|
|
@@ -176,10 +176,10 @@ function Rr(u, g) {
|
|
|
176
176
|
return ye();
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
function he(t,
|
|
179
|
+
function he(t, n) {
|
|
180
180
|
d.value = {
|
|
181
181
|
startDate: t,
|
|
182
|
-
endDate:
|
|
182
|
+
endDate: n
|
|
183
183
|
}, Z();
|
|
184
184
|
}
|
|
185
185
|
r.watchLocation(async (t) => {
|
|
@@ -190,15 +190,15 @@ function Rr(u, g) {
|
|
|
190
190
|
await Z();
|
|
191
191
|
});
|
|
192
192
|
const H = U(), K = U(Math.random().toString());
|
|
193
|
-
async function s(t,
|
|
194
|
-
var
|
|
195
|
-
const
|
|
196
|
-
K.value =
|
|
197
|
-
const
|
|
198
|
-
poRequest:
|
|
193
|
+
async function s(t, n) {
|
|
194
|
+
var b, S;
|
|
195
|
+
const h = Math.random().toString();
|
|
196
|
+
K.value = h;
|
|
197
|
+
const g = u === "receive/request" ? r.currentLocation : n == null ? void 0 : n.to, o = {
|
|
198
|
+
poRequest: n,
|
|
199
199
|
purchaseOrder: t,
|
|
200
|
-
transferTo:
|
|
201
|
-
transferToDbName:
|
|
200
|
+
transferTo: g == null ? void 0 : g.name,
|
|
201
|
+
transferToDbName: g == null ? void 0 : g.dbName,
|
|
202
202
|
show: !0,
|
|
203
203
|
canResubmit: !1,
|
|
204
204
|
canApprove: u === "approval",
|
|
@@ -206,71 +206,71 @@ function Rr(u, g) {
|
|
|
206
206
|
H.value.show = k;
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
|
-
if (H.value =
|
|
209
|
+
if (H.value = o, !(n || t.status !== I.enum.REQUESTING)) {
|
|
210
210
|
try {
|
|
211
|
-
|
|
211
|
+
n = (await M.readRequests(
|
|
212
212
|
`${t.supplier.internal}_${t.supplier._id}`
|
|
213
213
|
)).find(($) => $.purchaseOrderId === t._id);
|
|
214
214
|
} catch {
|
|
215
215
|
console.error("Error at fetching po request to check");
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
h === K.value && (H.value.canResubmit = !n, H.value.transferTo = (b = n == null ? void 0 : n.to) == null ? void 0 : b.name, H.value.transferToDbName = (S = n == null ? void 0 : n.to) == null ? void 0 : S.dbName);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
async function a(t,
|
|
220
|
+
async function a(t, n, h, g) {
|
|
221
221
|
N.value = !0;
|
|
222
222
|
try {
|
|
223
223
|
await M.processPurchaseOrder(
|
|
224
224
|
{
|
|
225
|
-
operation:
|
|
225
|
+
operation: n,
|
|
226
226
|
doc: t,
|
|
227
227
|
options: (
|
|
228
228
|
// auto receive for supplier to warehouse
|
|
229
|
-
(
|
|
230
|
-
|
|
229
|
+
(n === w.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
230
|
+
n === w.enum.completeReceive) && R.autoReceiveWarehouse ? {
|
|
231
231
|
autoReceive: !0
|
|
232
232
|
} : void 0
|
|
233
233
|
)
|
|
234
234
|
},
|
|
235
|
-
|
|
235
|
+
g
|
|
236
236
|
), await new Promise((S) => setTimeout(S, 1e3));
|
|
237
|
-
const
|
|
238
|
-
|
|
237
|
+
const b = fe().currentLocationDBName.startsWith("restaurant_");
|
|
238
|
+
n === w.enum.confirmDraft && t.effectiveAt && b ? i.open({
|
|
239
239
|
title: "Success",
|
|
240
|
-
message: `${
|
|
240
|
+
message: `${h}. The backdate will be reflected once your POS has received this change.`,
|
|
241
241
|
type: "success"
|
|
242
242
|
}) : i.open({
|
|
243
243
|
title: "Success",
|
|
244
|
-
message:
|
|
244
|
+
message: h,
|
|
245
245
|
type: "success"
|
|
246
246
|
});
|
|
247
|
-
} catch (
|
|
247
|
+
} catch (o) {
|
|
248
248
|
i.open({
|
|
249
249
|
title: "Something went wrong",
|
|
250
250
|
message: "Please try again.",
|
|
251
251
|
type: "error"
|
|
252
|
-
}), console.error("Error when submitting PO operation",
|
|
252
|
+
}), console.error("Error when submitting PO operation", n, t, o);
|
|
253
253
|
} finally {
|
|
254
254
|
N.value = !1, Z();
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
async function x(t,
|
|
258
|
-
const
|
|
259
|
-
if (!
|
|
257
|
+
async function x(t, n, h) {
|
|
258
|
+
const g = Me[n];
|
|
259
|
+
if (!g) {
|
|
260
260
|
i.open({
|
|
261
261
|
title: "Something went wrong",
|
|
262
|
-
message: `Cannot process order: ${qe(
|
|
262
|
+
message: `Cannot process order: ${qe(n)}`,
|
|
263
263
|
type: "error"
|
|
264
264
|
});
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
const { successMessage:
|
|
267
|
+
const { successMessage: o, ...b } = g;
|
|
268
268
|
p.open({
|
|
269
|
-
title:
|
|
270
|
-
message:
|
|
271
|
-
primaryActions:
|
|
269
|
+
title: b.title,
|
|
270
|
+
message: b.message,
|
|
271
|
+
primaryActions: b.primaryActions
|
|
272
272
|
}).onPrimary(() => {
|
|
273
|
-
a(t,
|
|
273
|
+
a(t, n, o, h);
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
return {
|
|
@@ -287,8 +287,8 @@ function Rr(u, g) {
|
|
|
287
287
|
submitAction: x
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function tt(u,
|
|
291
|
-
return
|
|
290
|
+
function tt(u, _) {
|
|
291
|
+
return _.reduce(
|
|
292
292
|
(r, R) => {
|
|
293
293
|
const O = R.received.find((C) => C.sku._id === u._id);
|
|
294
294
|
return O && (r = Ce(r, O.amount)), r;
|
|
@@ -296,8 +296,8 @@ function tt(u, g) {
|
|
|
296
296
|
Ze.toPrecision(be(0), u.unit.precision)
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
|
-
function rt(u,
|
|
300
|
-
const { name: p, address: r, regNo: R } =
|
|
299
|
+
function rt(u, _) {
|
|
300
|
+
const { name: p, address: r, regNo: R } = _.doc.profile, O = {
|
|
301
301
|
name: p,
|
|
302
302
|
registrationNumber: R,
|
|
303
303
|
line1: r == null ? void 0 : r.line1,
|
|
@@ -357,59 +357,59 @@ const te = {
|
|
|
357
357
|
submitRequest: {
|
|
358
358
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
359
359
|
color: "text-fm-color-typo-primary",
|
|
360
|
-
value:
|
|
360
|
+
value: w.enum.submitRequest
|
|
361
361
|
},
|
|
362
362
|
confirmDraft: {
|
|
363
363
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
364
364
|
color: "text-fm-color-typo-primary",
|
|
365
|
-
value:
|
|
365
|
+
value: w.enum.confirmDraft
|
|
366
366
|
},
|
|
367
367
|
cancelDraft: {
|
|
368
368
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
369
369
|
color: "text-fm-color-typo-error",
|
|
370
|
-
value:
|
|
370
|
+
value: w.enum.cancelDraft
|
|
371
371
|
},
|
|
372
372
|
approveRequest: {
|
|
373
373
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
374
374
|
color: "text-fm-color-typo-primary",
|
|
375
|
-
value:
|
|
375
|
+
value: w.enum.approveRequest
|
|
376
376
|
},
|
|
377
377
|
rejectRequest: {
|
|
378
378
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
379
379
|
color: "text-fm-color-typo-error",
|
|
380
|
-
value:
|
|
380
|
+
value: w.enum.rejectRequest
|
|
381
381
|
},
|
|
382
382
|
processRequest: {
|
|
383
383
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
384
384
|
color: "text-fm-color-typo-primary",
|
|
385
|
-
value:
|
|
385
|
+
value: w.enum.processRequest
|
|
386
386
|
},
|
|
387
387
|
receiveStock: {
|
|
388
388
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
389
389
|
color: "text-fm-color-typo-primary",
|
|
390
|
-
value:
|
|
390
|
+
value: w.enum.receiveStock
|
|
391
391
|
},
|
|
392
392
|
completeReceive: {
|
|
393
393
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
394
394
|
color: "text-fm-color-typo-primary",
|
|
395
|
-
value:
|
|
395
|
+
value: w.enum.completeReceive
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
|
-
function Or(u,
|
|
398
|
+
function Or(u, _) {
|
|
399
399
|
const p = fe(), { t: r } = Fe();
|
|
400
400
|
function R(c) {
|
|
401
401
|
switch (c.status) {
|
|
402
402
|
case "DRAFT":
|
|
403
403
|
return [
|
|
404
|
-
c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[
|
|
405
|
-
te[
|
|
404
|
+
c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[w.enum.submitRequest] : te[w.enum.confirmDraft],
|
|
405
|
+
te[w.enum.cancelDraft],
|
|
406
406
|
T[q.Update],
|
|
407
407
|
T[q.Details],
|
|
408
408
|
T[q.Print]
|
|
409
409
|
];
|
|
410
410
|
case "RECEIVING":
|
|
411
411
|
return [
|
|
412
|
-
te[
|
|
412
|
+
te[w.enum.completeReceive],
|
|
413
413
|
T[q.Update],
|
|
414
414
|
T[q.Details],
|
|
415
415
|
T[q.Print]
|
|
@@ -420,8 +420,8 @@ function Or(u, g) {
|
|
|
420
420
|
T[q.Details],
|
|
421
421
|
T[q.Print]
|
|
422
422
|
] : [
|
|
423
|
-
te[
|
|
424
|
-
te[
|
|
423
|
+
te[w.enum.approveRequest],
|
|
424
|
+
te[w.enum.rejectRequest],
|
|
425
425
|
T[q.Details],
|
|
426
426
|
T[q.Print]
|
|
427
427
|
];
|
|
@@ -439,7 +439,7 @@ function Or(u, g) {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
function O(c) {
|
|
442
|
-
return Object.values(
|
|
442
|
+
return Object.values(w.enum).includes(c);
|
|
443
443
|
}
|
|
444
444
|
async function C(c, d, m) {
|
|
445
445
|
var L, G;
|
|
@@ -449,15 +449,15 @@ function Or(u, g) {
|
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
451
|
if (c === q.Details) {
|
|
452
|
-
|
|
452
|
+
_.promptShowTransferDetails(f, m);
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
455
|
if (c === q.Update) {
|
|
456
|
-
(L =
|
|
456
|
+
(L = _.promptUpdateTransferDialog) == null || L.call(_, f);
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
459
|
if (O(c)) {
|
|
460
|
-
|
|
460
|
+
_.submitAction(d, c, (G = m == null ? void 0 : m.to) == null ? void 0 : G.dbName);
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
463
|
}
|
|
@@ -675,8 +675,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
675
675
|
canApprove: { type: Boolean }
|
|
676
676
|
},
|
|
677
677
|
emits: ["update:show", "submitted"],
|
|
678
|
-
setup(u, { emit:
|
|
679
|
-
const p = u, r =
|
|
678
|
+
setup(u, { emit: _ }) {
|
|
679
|
+
const p = u, r = _, R = Ne(), O = Ee(), C = Ye(), N = Pe(), { t: i } = Fe(), M = Y(
|
|
680
680
|
() => {
|
|
681
681
|
var s, a, x, t;
|
|
682
682
|
return ((a = (s = p.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : a.internal) === "restaurant" || ((t = (x = p.purchaseOrder) == null ? void 0 : x.supplier) == null ? void 0 : t.internal) === "warehouse" ? me.TRANSFER : me.PURCHASE;
|
|
@@ -700,8 +700,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
700
700
|
doc: s,
|
|
701
701
|
options: (
|
|
702
702
|
// auto receive for supplier to warehouse
|
|
703
|
-
(a ===
|
|
704
|
-
a ===
|
|
703
|
+
(a === w.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
704
|
+
a === w.enum.completeReceive) && N.autoReceiveWarehouse ? {
|
|
705
705
|
autoReceive: !0
|
|
706
706
|
} : void 0
|
|
707
707
|
)
|
|
@@ -746,27 +746,27 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
746
746
|
return ((s = p.purchaseOrder) == null ? void 0 : s.status) === I.enum.RECEIVING || ((a = p.purchaseOrder) == null ? void 0 : a.status) === I.enum.COMPLETE;
|
|
747
747
|
}), Z = Y(
|
|
748
748
|
() => {
|
|
749
|
-
var s, a, x, t;
|
|
749
|
+
var s, a, x, t, n, h;
|
|
750
750
|
return C.getLocationSubsidiary(
|
|
751
|
-
((a = (s = p.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : a.subsidiary.id) || ((
|
|
751
|
+
((x = (a = (s = p.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : a.subsidiary) == null ? void 0 : x.id) || ((h = (n = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : n.subsidiary) == null ? void 0 : h.id)
|
|
752
752
|
).fullName;
|
|
753
753
|
}
|
|
754
754
|
), he = Y(() => {
|
|
755
|
-
var s, a, x, t,
|
|
756
|
-
return (a = (s = p.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && a.length && ((t = (x = p.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (
|
|
757
|
-
var
|
|
758
|
-
return (
|
|
755
|
+
var s, a, x, t, n, h;
|
|
756
|
+
return (a = (s = p.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && a.length && ((t = (x = p.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (h = (n = p.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) == null ? void 0 : h.map((g) => {
|
|
757
|
+
var o;
|
|
758
|
+
return (o = g.netSuite) == null ? void 0 : o.refNo;
|
|
759
759
|
}).join(", ") : "-";
|
|
760
760
|
}), H = Y(() => {
|
|
761
|
-
var
|
|
762
|
-
const x = (((
|
|
763
|
-
(
|
|
764
|
-
const k =
|
|
765
|
-
return
|
|
761
|
+
var h, g, o;
|
|
762
|
+
const x = (((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? []).flatMap((b) => b.received ?? []).reduce(
|
|
763
|
+
(b, S) => {
|
|
764
|
+
const k = b[S.sku._id] ?? [];
|
|
765
|
+
return b[S.sku._id] = [...k, S], b;
|
|
766
766
|
},
|
|
767
767
|
{}
|
|
768
768
|
), t = Object.entries(x).reduce(
|
|
769
|
-
(
|
|
769
|
+
(b, [S, k]) => {
|
|
770
770
|
const $ = k.reduce((D, E) => {
|
|
771
771
|
const F = He(
|
|
772
772
|
D,
|
|
@@ -774,74 +774,74 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
774
774
|
);
|
|
775
775
|
return Ce(F, E.amount);
|
|
776
776
|
}, be(0));
|
|
777
|
-
return
|
|
777
|
+
return b[S] = $, b;
|
|
778
778
|
},
|
|
779
779
|
{}
|
|
780
|
-
),
|
|
781
|
-
for (const
|
|
782
|
-
t[
|
|
780
|
+
), n = ((g = p.purchaseOrder) == null ? void 0 : g.items) ?? [];
|
|
781
|
+
for (const b of n)
|
|
782
|
+
t[o = b.sku._id] ?? (t[o] = be(0));
|
|
783
783
|
return t;
|
|
784
784
|
}), K = Y(() => {
|
|
785
|
-
var
|
|
786
|
-
const s = ((
|
|
787
|
-
...s.map((
|
|
788
|
-
createdAt:
|
|
785
|
+
var h, g;
|
|
786
|
+
const s = ((h = p.purchaseOrder) == null ? void 0 : h.deliveryOrder) ?? [], a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) ?? [], x = [
|
|
787
|
+
...s.map((o) => ({
|
|
788
|
+
createdAt: o.createdAt,
|
|
789
789
|
type: "grn",
|
|
790
|
-
doc:
|
|
790
|
+
doc: o
|
|
791
791
|
})),
|
|
792
|
-
...a.map((
|
|
793
|
-
createdAt:
|
|
792
|
+
...a.map((o) => ({
|
|
793
|
+
createdAt: o.createdAt,
|
|
794
794
|
type: "fulfillment",
|
|
795
|
-
doc:
|
|
795
|
+
doc: o
|
|
796
796
|
}))
|
|
797
797
|
];
|
|
798
|
-
x.reverse().sort((
|
|
799
|
-
function t(
|
|
798
|
+
x.reverse().sort((o, b) => o.createdAt.localeCompare(b.createdAt));
|
|
799
|
+
function t(o) {
|
|
800
800
|
var S;
|
|
801
|
-
const
|
|
801
|
+
const b = a.findIndex((k) => k.id === o.fullfillmentId);
|
|
802
802
|
return {
|
|
803
803
|
header: "Received",
|
|
804
|
-
date: De(new Date(
|
|
804
|
+
date: De(new Date(o.createdAt)),
|
|
805
805
|
info: [
|
|
806
806
|
{
|
|
807
807
|
label: "Received by",
|
|
808
|
-
values: [(S =
|
|
808
|
+
values: [(S = o.createdBy) == null ? void 0 : S.name]
|
|
809
809
|
},
|
|
810
810
|
{
|
|
811
811
|
label: "Received items",
|
|
812
|
-
values:
|
|
812
|
+
values: o.received.map((k) => {
|
|
813
813
|
var $;
|
|
814
814
|
return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${(($ = k.measurement) == null ? void 0 : $.abbrev) ?? k.sku.unit.abbrev}`;
|
|
815
815
|
})
|
|
816
816
|
},
|
|
817
|
-
|
|
817
|
+
o.deliveryOrderNumber ? {
|
|
818
818
|
label: "Delivery order no.",
|
|
819
|
-
values: [
|
|
819
|
+
values: [o.deliveryOrderNumber]
|
|
820
820
|
} : null,
|
|
821
|
-
|
|
821
|
+
o.remark ? {
|
|
822
822
|
label: "Remark",
|
|
823
|
-
values: [
|
|
823
|
+
values: [o.remark]
|
|
824
824
|
} : null,
|
|
825
|
-
|
|
825
|
+
b > -1 ? {
|
|
826
826
|
label: "Fulfilment",
|
|
827
|
-
values: [`${
|
|
827
|
+
values: [`${b}`]
|
|
828
828
|
} : null
|
|
829
829
|
].filter((k) => k)
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
const
|
|
832
|
+
function n(o) {
|
|
833
|
+
const b = a.findIndex((S) => S.id === o.id);
|
|
834
834
|
return {
|
|
835
835
|
header: "Fulfillment",
|
|
836
|
-
date: De(new Date(
|
|
836
|
+
date: De(new Date(o.createdAt)),
|
|
837
837
|
info: [
|
|
838
838
|
{
|
|
839
839
|
label: "Sequence",
|
|
840
|
-
values: [String(
|
|
840
|
+
values: [String(b + 1)]
|
|
841
841
|
},
|
|
842
842
|
{
|
|
843
843
|
label: "Receiveable items",
|
|
844
|
-
values:
|
|
844
|
+
values: o.items.map((S) => {
|
|
845
845
|
var k;
|
|
846
846
|
return `(${S.sku.code}) ${S.sku.name}: ${le(S.amount, !1)} ${((k = S.measurement) == null ? void 0 : k.abbrev) ?? S.sku.unit.abbrev}`;
|
|
847
847
|
})
|
|
@@ -849,21 +849,21 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
849
849
|
]
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
return x.map((
|
|
853
|
-
switch (
|
|
852
|
+
return x.map((o) => {
|
|
853
|
+
switch (o.type) {
|
|
854
854
|
case "grn":
|
|
855
|
-
return t(
|
|
855
|
+
return t(o.doc);
|
|
856
856
|
case "fulfillment":
|
|
857
|
-
return
|
|
857
|
+
return n(o.doc);
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
860
|
});
|
|
861
861
|
return (s, a) => {
|
|
862
862
|
var S, k;
|
|
863
|
-
const x = X("FmButtonGroup"), t = X("FmChip"),
|
|
864
|
-
return v(), V(
|
|
865
|
-
header:
|
|
866
|
-
modelValue:
|
|
863
|
+
const x = X("FmButtonGroup"), t = X("FmChip"), n = X("FmMenuDivider"), h = X("FmCard"), g = X("FmSpacer"), o = X("FmButton"), b = X("FmSideSheet");
|
|
864
|
+
return v(), V(b, {
|
|
865
|
+
header: l(i)("inventory.transfer.receiveRequest.details.title") + ((S = s.purchaseOrder) != null && S.seqNumber ? ` #${(k = s.purchaseOrder) == null ? void 0 : k.seqNumber}` : ""),
|
|
866
|
+
modelValue: l(re),
|
|
867
867
|
"onUpdate:modelValue": a[9] || (a[9] = ($) => Le(re) ? re.value = $ : null),
|
|
868
868
|
"dismiss-away": L.value,
|
|
869
869
|
"close-button": "",
|
|
@@ -882,7 +882,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
882
882
|
]),
|
|
883
883
|
d.value.value === "overview" ? (v(), A(ee, { key: 0 }, [
|
|
884
884
|
e("div", null, [
|
|
885
|
-
z(
|
|
885
|
+
z(h, {
|
|
886
886
|
variant: "outlined",
|
|
887
887
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
888
888
|
}, {
|
|
@@ -890,59 +890,59 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
890
890
|
var D, E, F, Q, W, J, se, ae, ne, j, ge, _e, we, Re, Oe, Se;
|
|
891
891
|
return [
|
|
892
892
|
e("div", at, [
|
|
893
|
-
e("div", nt, y(
|
|
893
|
+
e("div", nt, y(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
894
894
|
e("div", null, [
|
|
895
895
|
z(t, {
|
|
896
|
-
label:
|
|
896
|
+
label: l(i)(`inventory.transfer.status.${(D = s.purchaseOrder) == null ? void 0 : D.status}`),
|
|
897
897
|
class: ue(`fm-status-badge fm-status-badge-${(F = (E = s.purchaseOrder) == null ? void 0 : E.status) == null ? void 0 : F.toLocaleLowerCase("en-us")}`),
|
|
898
898
|
compact: ""
|
|
899
899
|
}, null, 8, ["label", "class"])
|
|
900
900
|
])
|
|
901
901
|
]),
|
|
902
|
-
z(
|
|
902
|
+
z(n),
|
|
903
903
|
e("div", ot, [
|
|
904
904
|
e("div", lt, [
|
|
905
905
|
e("div", ct, [
|
|
906
|
-
e("div", it, y(
|
|
906
|
+
e("div", it, y(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
907
907
|
]),
|
|
908
|
-
e("div", ut, y(
|
|
908
|
+
e("div", ut, y(l(pe)(((Q = s.purchaseOrder) == null ? void 0 : Q._id) ?? "")), 1)
|
|
909
909
|
]),
|
|
910
910
|
(W = s.purchaseOrder) != null && W.effectiveAt ? (v(), A("div", dt, [
|
|
911
|
-
e("div", mt, y(
|
|
912
|
-
e("div", ft, y(
|
|
911
|
+
e("div", mt, y(l(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
912
|
+
e("div", ft, y(l(Te)(new Date((J = s.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
|
|
913
913
|
])) : P("", !0),
|
|
914
914
|
e("div", pt, [
|
|
915
|
-
e("div", vt, y(
|
|
916
|
-
e("div", yt, y(
|
|
915
|
+
e("div", vt, y(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
916
|
+
e("div", yt, y(l(i)(
|
|
917
917
|
`inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
|
|
918
918
|
)), 1)
|
|
919
919
|
]),
|
|
920
920
|
(ae = (se = s.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (v(), A("div", ht, [
|
|
921
|
-
e("div", bt, y(
|
|
921
|
+
e("div", bt, y(l(i)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
922
922
|
e("div", gt, y((j = (ne = s.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : j.name), 1)
|
|
923
923
|
])) : P("", !0),
|
|
924
924
|
s.transferTo ? (v(), A("div", _t, [
|
|
925
|
-
e("div", wt, y(
|
|
925
|
+
e("div", wt, y(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
926
926
|
e("div", Rt, y(s.transferTo), 1)
|
|
927
927
|
])) : P("", !0),
|
|
928
|
-
|
|
928
|
+
l(C).isEnabled ? (v(), A("div", Ot, [
|
|
929
929
|
a[10] || (a[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
|
|
930
|
-
e("div", St, y(Z.value), 1)
|
|
930
|
+
e("div", St, y(Z.value || "-"), 1)
|
|
931
931
|
])) : P("", !0),
|
|
932
|
-
|
|
932
|
+
l(C).isEnabled ? (v(), A("div", Dt, [
|
|
933
933
|
a[11] || (a[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
|
|
934
934
|
e("div", kt, y(((_e = (ge = s.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.id) || ((Re = (we = s.poRequest) == null ? void 0 : we.netSuite) == null ? void 0 : Re.id) || "-"), 1)
|
|
935
935
|
])) : P("", !0),
|
|
936
|
-
|
|
936
|
+
l(C).isEnabled ? (v(), A("div", xt, [
|
|
937
937
|
a[12] || (a[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
|
|
938
938
|
e("div", At, y(he.value), 1)
|
|
939
939
|
])) : P("", !0),
|
|
940
940
|
(Oe = s.purchaseOrder) != null && Oe.ref ? (v(), A("div", qt, [
|
|
941
|
-
e("div", Pt, y(
|
|
941
|
+
e("div", Pt, y(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
942
942
|
e("div", Ct, y(s.purchaseOrder.ref), 1)
|
|
943
943
|
])) : P("", !0),
|
|
944
944
|
(Se = s.purchaseOrder) != null && Se.remark ? (v(), A("div", Tt, [
|
|
945
|
-
e("div", Nt, y(
|
|
945
|
+
e("div", Nt, y(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
946
946
|
e("div", Et, y(s.purchaseOrder.remark), 1)
|
|
947
947
|
])) : P("", !0)
|
|
948
948
|
])
|
|
@@ -953,18 +953,18 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
953
953
|
]),
|
|
954
954
|
e("div", $t, [
|
|
955
955
|
e("div", Ft, [
|
|
956
|
-
e("div", It, y(ye.value ?
|
|
956
|
+
e("div", It, y(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
957
957
|
(v(!0), A(ee, null, de((($ = s.purchaseOrder) == null ? void 0 : $.items) ?? [], (D) => (v(), A("div", {
|
|
958
958
|
key: D.code,
|
|
959
959
|
class: "flex flex-col"
|
|
960
960
|
}, [
|
|
961
961
|
e("div", Mt, [
|
|
962
962
|
e("div", Ut, y(D.name), 1),
|
|
963
|
-
e("div", Lt, y(
|
|
963
|
+
e("div", Lt, y(l(le)(H.value[D.sku._id], !1)) + "/" + y(l($e)(D.quantity, D.sku.unit, D.measurement)), 1)
|
|
964
964
|
]),
|
|
965
965
|
e("div", jt, [
|
|
966
966
|
e("div", Bt, y(D.code), 1),
|
|
967
|
-
D.totalCost &&
|
|
967
|
+
D.totalCost && l(N).enableTotalCost ? (v(), A("div", Kt, " (" + y(l(ze)(D.totalCost)) + ") ", 1)) : P("", !0)
|
|
968
968
|
])
|
|
969
969
|
]))), 128))
|
|
970
970
|
])
|
|
@@ -1019,7 +1019,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1019
1019
|
])
|
|
1020
1020
|
]),
|
|
1021
1021
|
e("div", or, [
|
|
1022
|
-
z(
|
|
1022
|
+
z(h, {
|
|
1023
1023
|
variant: "outlined",
|
|
1024
1024
|
class: "py-12 px-16"
|
|
1025
1025
|
}, {
|
|
@@ -1045,17 +1045,17 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1045
1045
|
])
|
|
1046
1046
|
], 64))), 128))
|
|
1047
1047
|
])) : (v(), A("div", Gt, [
|
|
1048
|
-
z(
|
|
1048
|
+
z(g),
|
|
1049
1049
|
e("div", null, [
|
|
1050
1050
|
e("img", {
|
|
1051
|
-
src:
|
|
1051
|
+
src: l(et),
|
|
1052
1052
|
alt: "List is empty"
|
|
1053
1053
|
}, null, 8, Ht)
|
|
1054
1054
|
]),
|
|
1055
|
-
e("div", zt, y(
|
|
1056
|
-
e("div", Yt, y(
|
|
1057
|
-
z(
|
|
1058
|
-
z(
|
|
1055
|
+
e("div", zt, y(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1056
|
+
e("div", Yt, y(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1057
|
+
z(g),
|
|
1058
|
+
z(g)
|
|
1059
1059
|
]))
|
|
1060
1060
|
])) : P("", !0)
|
|
1061
1061
|
])
|
|
@@ -1065,60 +1065,60 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1065
1065
|
var $, D, E, F, Q, W, J, se, ae, ne;
|
|
1066
1066
|
return [
|
|
1067
1067
|
e("div", ur, [
|
|
1068
|
-
(($ = s.purchaseOrder) == null ? void 0 : $.status) ===
|
|
1068
|
+
(($ = s.purchaseOrder) == null ? void 0 : $.status) === l(I).enum.DRAFT && M.value === l(me).PURCHASE ? (v(), V(o, {
|
|
1069
1069
|
key: 0,
|
|
1070
|
-
label:
|
|
1070
|
+
label: l(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
1071
1071
|
onClick: a[1] || (a[1] = (j) => B("confirmDraft")),
|
|
1072
1072
|
loading: f.value === "confirmDraft",
|
|
1073
1073
|
disabled: f.value !== "confirmDraft" && m.value
|
|
1074
1074
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1075
|
-
((D = s.purchaseOrder) == null ? void 0 : D.status) ===
|
|
1075
|
+
((D = s.purchaseOrder) == null ? void 0 : D.status) === l(I).enum.DRAFT && M.value === l(me).TRANSFER ? (v(), V(o, {
|
|
1076
1076
|
key: 1,
|
|
1077
|
-
label:
|
|
1077
|
+
label: l(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
1078
1078
|
onClick: a[2] || (a[2] = (j) => B("submitRequest")),
|
|
1079
1079
|
loading: f.value === "submitRequest",
|
|
1080
1080
|
disabled: f.value !== "submitRequest" && m.value
|
|
1081
1081
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1082
|
-
((E = s.purchaseOrder) == null ? void 0 : E.status) ===
|
|
1082
|
+
((E = s.purchaseOrder) == null ? void 0 : E.status) === l(I).enum.DRAFT ? (v(), V(o, {
|
|
1083
1083
|
key: 2,
|
|
1084
|
-
label:
|
|
1084
|
+
label: l(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
1085
1085
|
onClick: a[3] || (a[3] = (j) => B("cancelDraft")),
|
|
1086
1086
|
loading: f.value === "cancelDraft",
|
|
1087
1087
|
disabled: f.value !== "cancelDraft" && m.value,
|
|
1088
1088
|
variant: "destructive"
|
|
1089
1089
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1090
|
-
((F = s.purchaseOrder) == null ? void 0 : F.status) ===
|
|
1090
|
+
((F = s.purchaseOrder) == null ? void 0 : F.status) === l(I).enum.RECEIVING ? (v(), V(o, {
|
|
1091
1091
|
key: 3,
|
|
1092
|
-
label:
|
|
1092
|
+
label: l(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1093
1093
|
onClick: a[4] || (a[4] = (j) => B("completeReceive")),
|
|
1094
1094
|
loading: f.value === "completeReceive",
|
|
1095
1095
|
disabled: f.value !== "completeReceive" && m.value
|
|
1096
1096
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1097
|
-
s.canResubmit ? (v(), V(
|
|
1097
|
+
s.canResubmit ? (v(), V(o, {
|
|
1098
1098
|
key: 4,
|
|
1099
|
-
label:
|
|
1099
|
+
label: l(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
|
|
1100
1100
|
onClick: a[5] || (a[5] = (j) => B("submitRequest")),
|
|
1101
1101
|
loading: f.value === "submitRequest",
|
|
1102
1102
|
disabled: f.value !== "submitRequest" && m.value
|
|
1103
1103
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1104
|
-
(((Q = s.purchaseOrder) == null ? void 0 : Q.status) ===
|
|
1104
|
+
(((Q = s.purchaseOrder) == null ? void 0 : Q.status) === l(I).enum.REQUESTING || ((W = s.purchaseOrder) == null ? void 0 : W.status) === l(I).enum.PROCESSING) && s.canApprove ? (v(), V(o, {
|
|
1105
1105
|
key: 5,
|
|
1106
|
-
label:
|
|
1106
|
+
label: l(i)("inventory.transfer.approval.actions.approveRequest"),
|
|
1107
1107
|
onClick: a[6] || (a[6] = (j) => B("approveRequest")),
|
|
1108
1108
|
loading: f.value === "approveRequest",
|
|
1109
1109
|
disabled: f.value !== "approveRequest" && m.value
|
|
1110
1110
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1111
|
-
((J = s.purchaseOrder) == null ? void 0 : J.status) ===
|
|
1111
|
+
((J = s.purchaseOrder) == null ? void 0 : J.status) === l(I).enum.REQUESTING && s.canApprove ? (v(), V(o, {
|
|
1112
1112
|
key: 6,
|
|
1113
|
-
label:
|
|
1113
|
+
label: l(i)("inventory.transfer.approval.actions.rejectRequest"),
|
|
1114
1114
|
onClick: a[7] || (a[7] = (j) => B("rejectRequest")),
|
|
1115
1115
|
loading: f.value === "rejectRequest",
|
|
1116
1116
|
disabled: f.value !== "rejectRequest" && m.value,
|
|
1117
1117
|
variant: "destructive"
|
|
1118
1118
|
}, null, 8, ["label", "loading", "disabled"])) : P("", !0),
|
|
1119
|
-
((se = s.purchaseOrder) == null ? void 0 : se.status) !==
|
|
1119
|
+
((se = s.purchaseOrder) == null ? void 0 : se.status) !== l(I).enum.COMPLETE && ((ae = s.purchaseOrder) == null ? void 0 : ae.status) !== l(I).enum.CANCEL && (((ne = s.purchaseOrder) == null ? void 0 : ne.status) !== l(I).enum.REQUESTING || s.canApprove) ? (v(), V(o, {
|
|
1120
1120
|
key: 7,
|
|
1121
|
-
label:
|
|
1121
|
+
label: l(i)("common.close"),
|
|
1122
1122
|
variant: "tertiary",
|
|
1123
1123
|
onClick: a[8] || (a[8] = (j) => r("update:show", !1))
|
|
1124
1124
|
}, null, 8, ["label"])) : P("", !0)
|