@feedmepos/mf-inventory-portal 0.0.22-dev.40 → 0.0.22-dev.42
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-JOsQBu1z.js → ApprovalView-5YpqaJKy.js} +3 -3
- package/dist/{BindingsDialog-DG2ZolH1.js → BindingsDialog-lGoLNJyU.js} +1 -1
- package/dist/{BindingsPicker-B7h_iST8.js → BindingsPicker-CdvkacXh.js} +1 -1
- package/dist/{BindingsTable-BToh6gcG.js → BindingsTable-B8G9Ckdk.js} +1 -1
- package/dist/ClosingTemplateView-Dcy08dPm.js +1775 -0
- package/dist/FmDroppableField-DeW5xBTW.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-4NHQdjz7.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DBpTwDEI.js} +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js +359 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMOalXUS.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DFHzlUVu.js} +1 -1
- package/dist/{IngredientsView-ChnCqdWi.js → IngredientsView-DKJjOK_4.js} +5 -5
- package/dist/IntegrationView-CgqU4EBV.js +1141 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQW6HYyD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gvpXGm1X.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BQqcpZIJ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B3JDjoOu.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BvED8ZbQ.js → PurchaseOrderPrintPreview-olI-JfjI.js} +1 -1
- package/dist/{ReceiveRequestView-DdxBaqmU.js → ReceiveRequestView-flhI8D2c.js} +10 -10
- package/dist/{RecipeView-YdSRy_yP.js → RecipeView-CoMyQ92u.js} +4 -4
- package/dist/{StockView-WF5z4dTF.js → StockView-Dae47pLA.js} +5 -5
- package/dist/{SupplierView-H2Vi5lSs.js → SupplierView-CxYZUHrc.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D48gSqHW.js → TransferDetails.vue_vue_type_script_setup_true_lang-DoEEedkk.js} +396 -387
- package/dist/TransferTemplateView-DdB7z0b4.js +1302 -0
- package/dist/{UnitView-qD9JSdHT.js → UnitView-B0E2nG3J.js} +4 -4
- package/dist/{WarehouseView-C19Dd53y.js → WarehouseView-NQ2JwyWK.js} +2 -2
- package/dist/{app-DKE_n9Mo.js → app-tiUQG6R0.js} +3898 -3854
- package/dist/app.d.ts +50 -3
- package/dist/app.js +1 -1
- package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
- package/dist/{decimal-veoPLYim.js → decimal-BOvNv58m.js} +1 -1
- package/dist/{defineDeepModel-u6t3hXU9.js → defineDeepModel-CNgIKGt8.js} +1 -1
- package/dist/{format-time-from-id-8gjg5B98.js → format-time-from-id-DWlH-AZV.js} +1 -1
- package/dist/format-unit-display-DIhXvTxN.js +1195 -0
- package/dist/stores/netsuite.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DLcmVScz.js → supplier-rpkSwf7L.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CdJVJikY.js → use-template-enabled-locations-2-BrK8SKvw.js} +1 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +7 -5
- package/dist/{xlsx-CrKrCGZz.js → xlsx-DGqkxpZX.js} +1 -1
- package/dist/{xlsx.util-Bcpkvw1Z.js → xlsx.util-CvycJwUf.js} +1 -1
- package/package.json +3 -1
- package/dist/ClosingTemplateView-BwMJAxuz.js +0 -1688
- package/dist/FmDroppableField-CJNAT3h2.js +0 -152
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js +0 -364
- package/dist/IntegrationView-NWkc9PLW.js +0 -1141
- package/dist/TransferTemplateView-DeT32cat.js +0 -2054
- package/dist/purchase-order-transaction-type-CIDEpjJB.js +0 -348
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ref as U, computed as
|
|
2
|
-
import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { n as Be, i as fe, ap as
|
|
4
|
-
import { F as ke, D as
|
|
1
|
+
import { ref as U, computed as Q, h as ce, defineComponent as Ue, resolveComponent as X, openBlock as h, createBlock as G, unref as l, isRef as Le, withCtx as ie, createElementVNode as e, createVNode as Y, createElementBlock as x, Fragment as ee, toDisplayString as b, normalizeClass as ue, createCommentVNode as N, renderList as de } from "vue";
|
|
2
|
+
import { i as je } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js";
|
|
3
|
+
import { n as Be, i as fe, ap as R, O as Ke, P as Ve, aq as Ge, c as xe, ab as F, w as qe, b as Pe, B as Ce, l as be, a as le, ar as Ne, N as He, G as ze, ad as Ye, Y as De } from "./app-tiUQG6R0.js";
|
|
4
|
+
import { F as ke, D as T, R as q } from "./row-action.enum-PMKMRrZR.js";
|
|
5
5
|
import { useDialog as Te, 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 "./
|
|
6
|
+
import { p as We, f as pe } from "./format-time-from-id-DWlH-AZV.js";
|
|
7
|
+
import { b as Je, u as Xe, f as $e, P as me } from "./format-unit-display-DIhXvTxN.js";
|
|
8
8
|
import { c as Ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { F as Ze } from "./decimal-
|
|
10
|
-
import { useI18n as
|
|
9
|
+
import { F as Ze } from "./decimal-BOvNv58m.js";
|
|
10
|
+
import { useI18n as Ie } from "@feedmepos/mf-common";
|
|
11
11
|
import { E as et } from "./empty-placeholder-wf6-BWE8.js";
|
|
12
|
-
const
|
|
12
|
+
const Fe = Be((u, w) => {
|
|
13
13
|
const p = fe();
|
|
14
14
|
return {
|
|
15
|
-
async readRequests(
|
|
16
|
-
const
|
|
17
|
-
return await
|
|
15
|
+
async readRequests(s) {
|
|
16
|
+
const S = s ?? p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-request`;
|
|
17
|
+
return await w.get(O);
|
|
18
18
|
},
|
|
19
19
|
async getPurchaseOrders({
|
|
20
|
-
start:
|
|
21
|
-
end:
|
|
20
|
+
start: s,
|
|
21
|
+
end: S
|
|
22
22
|
}) {
|
|
23
|
-
const O = p.currentLocationDBName,
|
|
24
|
-
return await
|
|
23
|
+
const O = p.currentLocationDBName, E = `${u.inventoryBackendUrl}/${O}/purchase-order`;
|
|
24
|
+
return await w.get(`${E}?start=${s}&end=${S}`);
|
|
25
25
|
},
|
|
26
|
-
async getPurchaseOrderById(
|
|
27
|
-
const
|
|
28
|
-
return await
|
|
26
|
+
async getPurchaseOrderById(s) {
|
|
27
|
+
const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
|
|
28
|
+
return await w.get(`${O}/${s}`);
|
|
29
29
|
},
|
|
30
|
-
async processPurchaseOrder(
|
|
31
|
-
const O = p.currentLocationDBName,
|
|
32
|
-
return await
|
|
30
|
+
async processPurchaseOrder(s, S) {
|
|
31
|
+
const O = p.currentLocationDBName, E = S || O, $ = `${u.inventoryBackendUrl}/${E}/purchase-order/run-operation`;
|
|
32
|
+
return await w.put($, s);
|
|
33
33
|
},
|
|
34
|
-
async createPurchaseOrder(
|
|
35
|
-
const
|
|
36
|
-
return await
|
|
34
|
+
async createPurchaseOrder(s) {
|
|
35
|
+
const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
|
|
36
|
+
return await w.post(O, s);
|
|
37
37
|
},
|
|
38
|
-
async updatePurchaseOrder(
|
|
39
|
-
const
|
|
40
|
-
return await
|
|
38
|
+
async updatePurchaseOrder(s) {
|
|
39
|
+
const S = p.currentLocationDBName, O = `${u.inventoryBackendUrl}/${S}/purchase-order`;
|
|
40
|
+
return await w.put(O, s);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}), Me = {
|
|
44
|
-
[
|
|
44
|
+
[R.enum.confirmDraft]: {
|
|
45
45
|
primaryActions: {
|
|
46
46
|
text: "Confirm draft",
|
|
47
47
|
close: !0
|
|
@@ -50,7 +50,7 @@ const Ie = Be((u, _) => {
|
|
|
50
50
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
51
51
|
successMessage: "Purchase order draft has been confirmed"
|
|
52
52
|
},
|
|
53
|
-
[
|
|
53
|
+
[R.enum.cancelDraft]: {
|
|
54
54
|
primaryActions: {
|
|
55
55
|
text: "Cancel draft",
|
|
56
56
|
close: !0,
|
|
@@ -60,7 +60,7 @@ const Ie = Be((u, _) => {
|
|
|
60
60
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
61
61
|
successMessage: "Purchase order draft has been cancelled"
|
|
62
62
|
},
|
|
63
|
-
[
|
|
63
|
+
[R.enum.submitRequest]: {
|
|
64
64
|
primaryActions: {
|
|
65
65
|
text: "Submit request",
|
|
66
66
|
close: !0
|
|
@@ -69,7 +69,7 @@ const Ie = Be((u, _) => {
|
|
|
69
69
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
70
70
|
successMessage: "Purchase order draft has been submitted"
|
|
71
71
|
},
|
|
72
|
-
[
|
|
72
|
+
[R.enum.completeReceive]: {
|
|
73
73
|
primaryActions: {
|
|
74
74
|
text: "Mark received",
|
|
75
75
|
close: !0
|
|
@@ -78,7 +78,7 @@ const Ie = Be((u, _) => {
|
|
|
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
|
+
[R.enum.approveRequest]: {
|
|
82
82
|
primaryActions: {
|
|
83
83
|
text: "Approve request",
|
|
84
84
|
close: !0
|
|
@@ -87,7 +87,7 @@ const Ie = Be((u, _) => {
|
|
|
87
87
|
message: "Purchase order will be approved.",
|
|
88
88
|
successMessage: "Purchase order has been approved"
|
|
89
89
|
},
|
|
90
|
-
[
|
|
90
|
+
[R.enum.rejectRequest]: {
|
|
91
91
|
primaryActions: {
|
|
92
92
|
text: "Reject request",
|
|
93
93
|
close: !0,
|
|
@@ -98,50 +98,50 @@ const Ie = Be((u, _) => {
|
|
|
98
98
|
successMessage: "Purchase order has been rejected"
|
|
99
99
|
}
|
|
100
100
|
}, oe = U();
|
|
101
|
-
function Rr(u,
|
|
102
|
-
const p = Te(),
|
|
103
|
-
|
|
104
|
-
), m =
|
|
105
|
-
const t = new Date(d.value.startDate),
|
|
101
|
+
function Rr(u, w) {
|
|
102
|
+
const p = Te(), s = fe(), S = Pe(), O = Je(), E = Xe(), $ = U(!1), i = Ee(), M = Fe(), c = U(new Array()), d = U(
|
|
103
|
+
w != null && w.startDate && (w != null && w.endDate) ? w : je()
|
|
104
|
+
), m = Q(() => {
|
|
105
|
+
const t = new Date(d.value.startDate), o = new Date(d.value.endDate);
|
|
106
106
|
return {
|
|
107
107
|
start: Ke(t).toISOString(),
|
|
108
|
-
end: Ve(
|
|
108
|
+
end: Ve(o).toISOString()
|
|
109
109
|
};
|
|
110
|
-
}), f = U(new Array()), L = Ge(),
|
|
110
|
+
}), f = U(new Array()), L = Ge(), H = U(null);
|
|
111
111
|
async function re(t) {
|
|
112
|
-
let
|
|
113
|
-
if (
|
|
112
|
+
let o;
|
|
113
|
+
if (S.mustUsePoTemplate && !(t != null && t.template) && (o = await O.getTemplateId(), !o))
|
|
114
114
|
return;
|
|
115
|
-
const
|
|
115
|
+
const g = {
|
|
116
116
|
mode: ke.CREATE,
|
|
117
117
|
modelValue: t || void 0,
|
|
118
118
|
show: !0,
|
|
119
|
-
"onUpdate:show"(
|
|
120
|
-
oe.value.show =
|
|
119
|
+
"onUpdate:show"(_) {
|
|
120
|
+
oe.value.show = _;
|
|
121
121
|
},
|
|
122
|
-
templateId:
|
|
123
|
-
lastClosingDate:
|
|
122
|
+
templateId: o,
|
|
123
|
+
lastClosingDate: H.value
|
|
124
124
|
};
|
|
125
|
-
oe.value =
|
|
125
|
+
oe.value = g;
|
|
126
126
|
}
|
|
127
127
|
function ve(t) {
|
|
128
|
-
const
|
|
128
|
+
const o = {
|
|
129
129
|
mode: ke.UPDATE,
|
|
130
130
|
modelValue: xe(t),
|
|
131
131
|
show: !0,
|
|
132
|
-
"onUpdate:show"(
|
|
133
|
-
oe.value.show =
|
|
132
|
+
"onUpdate:show"(g) {
|
|
133
|
+
oe.value.show = g;
|
|
134
134
|
},
|
|
135
|
-
lastClosingDate:
|
|
135
|
+
lastClosingDate: H.value
|
|
136
136
|
};
|
|
137
|
-
oe.value =
|
|
137
|
+
oe.value = o;
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
140
|
-
c.value = [],
|
|
139
|
+
async function K() {
|
|
140
|
+
c.value = [], $.value = !0;
|
|
141
141
|
try {
|
|
142
|
-
c.value = await M.getPurchaseOrders(m.value).then((
|
|
143
|
-
const t = await L.readLastClosing(!0),
|
|
144
|
-
|
|
142
|
+
c.value = await M.getPurchaseOrders(m.value).then((g) => g.sort((_, n) => n._id.localeCompare(_._id)));
|
|
143
|
+
const t = await L.readLastClosing(!0), o = t == null ? void 0 : t._id;
|
|
144
|
+
o && (H.value = We(o)), S.mustUsePoTemplate && await E.fetchTemplates();
|
|
145
145
|
} catch {
|
|
146
146
|
i.open({
|
|
147
147
|
title: "Something went wrong",
|
|
@@ -149,11 +149,11 @@ function Rr(u, _) {
|
|
|
149
149
|
type: "error"
|
|
150
150
|
});
|
|
151
151
|
} finally {
|
|
152
|
-
|
|
152
|
+
$.value = !1;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
async function ye() {
|
|
156
|
-
f.value = [],
|
|
156
|
+
f.value = [], $.value = !0;
|
|
157
157
|
try {
|
|
158
158
|
f.value = await M.readRequests().then((t) => t.reverse());
|
|
159
159
|
} catch {
|
|
@@ -163,112 +163,112 @@ function Rr(u, _) {
|
|
|
163
163
|
type: "error"
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
$.value = !1;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
function Z() {
|
|
170
170
|
switch (u) {
|
|
171
171
|
case "receive/request":
|
|
172
|
-
return
|
|
172
|
+
return K();
|
|
173
173
|
case "approval":
|
|
174
174
|
return ye();
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
function he(t,
|
|
177
|
+
function he(t, o) {
|
|
178
178
|
d.value = {
|
|
179
179
|
startDate: t,
|
|
180
|
-
endDate:
|
|
180
|
+
endDate: o
|
|
181
181
|
}, Z();
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
s.watchLocation(async (t) => {
|
|
184
184
|
if (!t) {
|
|
185
185
|
c.value = [];
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
await Z();
|
|
189
189
|
});
|
|
190
|
-
const
|
|
191
|
-
async function
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
poRequest:
|
|
190
|
+
const z = U(), V = U(Math.random().toString());
|
|
191
|
+
async function a(t, o) {
|
|
192
|
+
var v, P;
|
|
193
|
+
const g = Math.random().toString();
|
|
194
|
+
V.value = g;
|
|
195
|
+
const _ = u === "receive/request" ? s.currentLocation : o == null ? void 0 : o.to, n = {
|
|
196
|
+
poRequest: o,
|
|
197
197
|
purchaseOrder: t,
|
|
198
|
-
transferTo:
|
|
199
|
-
transferToDbName:
|
|
198
|
+
transferTo: _ == null ? void 0 : _.name,
|
|
199
|
+
transferToDbName: _ == null ? void 0 : _.dbName,
|
|
200
200
|
show: !0,
|
|
201
201
|
canResubmit: !1,
|
|
202
202
|
canApprove: u === "approval",
|
|
203
|
-
"onUpdate:show"(
|
|
204
|
-
|
|
203
|
+
"onUpdate:show"(I) {
|
|
204
|
+
z.value.show = I;
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
if (
|
|
207
|
+
if (z.value = n, !(o || t.status !== F.enum.REQUESTING)) {
|
|
208
208
|
try {
|
|
209
|
-
|
|
209
|
+
o = (await M.readRequests(
|
|
210
210
|
`${t.supplier.internal}_${t.supplier._id}`
|
|
211
|
-
)).find((
|
|
211
|
+
)).find((D) => D.purchaseOrderId === t._id);
|
|
212
212
|
} catch {
|
|
213
213
|
console.error("Error at fetching po request to check");
|
|
214
214
|
}
|
|
215
|
-
|
|
215
|
+
g === V.value && (z.value.canResubmit = !o, z.value.transferTo = (v = o == null ? void 0 : o.to) == null ? void 0 : v.name, z.value.transferToDbName = (P = o == null ? void 0 : o.to) == null ? void 0 : P.dbName);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
async function
|
|
219
|
-
|
|
218
|
+
async function r(t, o, g, _) {
|
|
219
|
+
$.value = !0;
|
|
220
220
|
try {
|
|
221
221
|
await M.processPurchaseOrder(
|
|
222
222
|
{
|
|
223
|
-
operation:
|
|
223
|
+
operation: o,
|
|
224
224
|
doc: t,
|
|
225
225
|
options: (
|
|
226
226
|
// auto receive for supplier to warehouse
|
|
227
|
-
(
|
|
228
|
-
|
|
227
|
+
(o === R.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
228
|
+
o === R.enum.completeReceive) && S.autoReceiveWarehouse ? {
|
|
229
229
|
autoReceive: !0
|
|
230
230
|
} : void 0
|
|
231
231
|
)
|
|
232
232
|
},
|
|
233
|
-
|
|
234
|
-
), await new Promise((
|
|
235
|
-
const
|
|
236
|
-
|
|
233
|
+
_
|
|
234
|
+
), await new Promise((P) => setTimeout(P, 1e3));
|
|
235
|
+
const v = fe().currentLocationDBName.startsWith("restaurant_");
|
|
236
|
+
o === R.enum.confirmDraft && t.effectiveAt && v ? i.open({
|
|
237
237
|
title: "Success",
|
|
238
|
-
message: `${
|
|
238
|
+
message: `${g}. The backdate will be reflected once your POS has received this change.`,
|
|
239
239
|
type: "success"
|
|
240
240
|
}) : i.open({
|
|
241
241
|
title: "Success",
|
|
242
|
-
message:
|
|
242
|
+
message: g,
|
|
243
243
|
type: "success"
|
|
244
244
|
});
|
|
245
|
-
} catch (
|
|
245
|
+
} catch (n) {
|
|
246
246
|
i.open({
|
|
247
247
|
title: "Something went wrong",
|
|
248
248
|
message: "Please try again.",
|
|
249
249
|
type: "error"
|
|
250
|
-
}), console.error("Error when submitting PO operation",
|
|
250
|
+
}), console.error("Error when submitting PO operation", o, t, n);
|
|
251
251
|
} finally {
|
|
252
|
-
|
|
252
|
+
$.value = !1, Z();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
async function A(t,
|
|
256
|
-
const
|
|
257
|
-
if (!
|
|
255
|
+
async function A(t, o, g) {
|
|
256
|
+
const _ = Me[o];
|
|
257
|
+
if (!_) {
|
|
258
258
|
i.open({
|
|
259
259
|
title: "Something went wrong",
|
|
260
|
-
message: `Cannot process order: ${qe(
|
|
260
|
+
message: `Cannot process order: ${qe(o)}`,
|
|
261
261
|
type: "error"
|
|
262
262
|
});
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
|
-
const { successMessage:
|
|
265
|
+
const { successMessage: n, ...v } = _;
|
|
266
266
|
p.open({
|
|
267
|
-
title:
|
|
268
|
-
message:
|
|
269
|
-
primaryActions:
|
|
267
|
+
title: v.title,
|
|
268
|
+
message: v.message,
|
|
269
|
+
primaryActions: v.primaryActions
|
|
270
270
|
}).onPrimary(() => {
|
|
271
|
-
|
|
271
|
+
r(t, o, n, g);
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
return {
|
|
@@ -276,35 +276,35 @@ function Rr(u, _) {
|
|
|
276
276
|
purchaseRequests: f,
|
|
277
277
|
updateDateRange: he,
|
|
278
278
|
fetchData: Z,
|
|
279
|
-
loading:
|
|
279
|
+
loading: $,
|
|
280
280
|
transferDialogProps: oe,
|
|
281
281
|
promptCreateTransferDialog: re,
|
|
282
282
|
promptUpdateTransferDialog: ve,
|
|
283
|
-
transferDetailsProps:
|
|
284
|
-
promptShowTransferDetails:
|
|
283
|
+
transferDetailsProps: z,
|
|
284
|
+
promptShowTransferDetails: a,
|
|
285
285
|
submitAction: A
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
function tt(u,
|
|
289
|
-
return
|
|
290
|
-
(
|
|
291
|
-
const O =
|
|
292
|
-
return O && (
|
|
288
|
+
function tt(u, w) {
|
|
289
|
+
return w.reduce(
|
|
290
|
+
(s, S) => {
|
|
291
|
+
const O = S.received.find((E) => E.sku._id === u._id);
|
|
292
|
+
return O && (s = Ce(s, O.amount)), s;
|
|
293
293
|
},
|
|
294
294
|
Ze.toPrecision(be(0), u.unit.precision)
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
function rt(u,
|
|
298
|
-
const { name: p, address:
|
|
297
|
+
function rt(u, w) {
|
|
298
|
+
const { name: p, address: s, regNo: S } = w.doc.profile, O = {
|
|
299
299
|
name: p,
|
|
300
|
-
registrationNumber:
|
|
301
|
-
line1:
|
|
302
|
-
line2:
|
|
303
|
-
postcode:
|
|
304
|
-
city:
|
|
305
|
-
state:
|
|
306
|
-
country:
|
|
307
|
-
},
|
|
300
|
+
registrationNumber: S,
|
|
301
|
+
line1: s == null ? void 0 : s.line1,
|
|
302
|
+
line2: s == null ? void 0 : s.line2,
|
|
303
|
+
postcode: s == null ? void 0 : s.postcode,
|
|
304
|
+
city: s == null ? void 0 : s.city,
|
|
305
|
+
state: s == null ? void 0 : s.state,
|
|
306
|
+
country: s == null ? void 0 : s.country
|
|
307
|
+
}, E = {
|
|
308
308
|
name: u.supplier.name,
|
|
309
309
|
registrationNumber: u.supplier.registrationNumber,
|
|
310
310
|
line1: u.supplier.address.line1,
|
|
@@ -313,7 +313,7 @@ function rt(u, _) {
|
|
|
313
313
|
city: u.supplier.address.city,
|
|
314
314
|
state: u.supplier.address.state,
|
|
315
315
|
country: u.supplier.address.country
|
|
316
|
-
},
|
|
316
|
+
}, $ = u.items.map((d) => {
|
|
317
317
|
const { sku: m, measurement: f } = d, L = le(
|
|
318
318
|
tt(d.sku, u.deliveryOrder || []),
|
|
319
319
|
!1
|
|
@@ -344,8 +344,8 @@ function rt(u, _) {
|
|
|
344
344
|
ref: u.ref || "",
|
|
345
345
|
remark: u.remark || "",
|
|
346
346
|
buyer: O,
|
|
347
|
-
supplier:
|
|
348
|
-
items:
|
|
347
|
+
supplier: E,
|
|
348
|
+
items: $,
|
|
349
349
|
status: u.status,
|
|
350
350
|
deliveryOrders: i
|
|
351
351
|
}, c = new URL(window.location.href);
|
|
@@ -355,122 +355,122 @@ const te = {
|
|
|
355
355
|
submitRequest: {
|
|
356
356
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
357
357
|
color: "text-fm-color-typo-primary",
|
|
358
|
-
value:
|
|
358
|
+
value: R.enum.submitRequest
|
|
359
359
|
},
|
|
360
360
|
confirmDraft: {
|
|
361
361
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
362
362
|
color: "text-fm-color-typo-primary",
|
|
363
|
-
value:
|
|
363
|
+
value: R.enum.confirmDraft
|
|
364
364
|
},
|
|
365
365
|
cancelDraft: {
|
|
366
366
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
367
367
|
color: "text-fm-color-typo-error",
|
|
368
|
-
value:
|
|
368
|
+
value: R.enum.cancelDraft
|
|
369
369
|
},
|
|
370
370
|
approveRequest: {
|
|
371
371
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
372
372
|
color: "text-fm-color-typo-primary",
|
|
373
|
-
value:
|
|
373
|
+
value: R.enum.approveRequest
|
|
374
374
|
},
|
|
375
375
|
rejectRequest: {
|
|
376
376
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
377
377
|
color: "text-fm-color-typo-error",
|
|
378
|
-
value:
|
|
378
|
+
value: R.enum.rejectRequest
|
|
379
379
|
},
|
|
380
380
|
processRequest: {
|
|
381
381
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
382
382
|
color: "text-fm-color-typo-primary",
|
|
383
|
-
value:
|
|
383
|
+
value: R.enum.processRequest
|
|
384
384
|
},
|
|
385
385
|
receiveStock: {
|
|
386
386
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
387
387
|
color: "text-fm-color-typo-primary",
|
|
388
|
-
value:
|
|
388
|
+
value: R.enum.receiveStock
|
|
389
389
|
},
|
|
390
390
|
completeReceive: {
|
|
391
391
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
392
392
|
color: "text-fm-color-typo-primary",
|
|
393
|
-
value:
|
|
393
|
+
value: R.enum.completeReceive
|
|
394
394
|
}
|
|
395
395
|
};
|
|
396
|
-
function
|
|
397
|
-
const p = fe(), { t:
|
|
398
|
-
function
|
|
396
|
+
function Sr(u, w) {
|
|
397
|
+
const p = fe(), { t: s } = Ie();
|
|
398
|
+
function S(c) {
|
|
399
399
|
switch (c.status) {
|
|
400
400
|
case "DRAFT":
|
|
401
401
|
return [
|
|
402
|
-
c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[
|
|
403
|
-
te[
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
402
|
+
c.supplier.internal === "restaurant" || c.supplier.internal === "warehouse" ? te[R.enum.submitRequest] : te[R.enum.confirmDraft],
|
|
403
|
+
te[R.enum.cancelDraft],
|
|
404
|
+
T[q.Update],
|
|
405
|
+
T[q.Details],
|
|
406
|
+
T[q.Print]
|
|
407
407
|
];
|
|
408
408
|
case "RECEIVING":
|
|
409
409
|
return [
|
|
410
|
-
te[
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
410
|
+
te[R.enum.completeReceive],
|
|
411
|
+
T[q.Update],
|
|
412
|
+
T[q.Details],
|
|
413
|
+
T[q.Print]
|
|
414
414
|
];
|
|
415
415
|
case "REQUESTING":
|
|
416
416
|
return u === "receive/request" ? [
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
T[q.Update],
|
|
418
|
+
T[q.Details],
|
|
419
|
+
T[q.Print]
|
|
420
420
|
] : [
|
|
421
|
-
te[
|
|
422
|
-
te[
|
|
423
|
-
|
|
424
|
-
|
|
421
|
+
te[R.enum.approveRequest],
|
|
422
|
+
te[R.enum.rejectRequest],
|
|
423
|
+
T[q.Details],
|
|
424
|
+
T[q.Print]
|
|
425
425
|
];
|
|
426
426
|
case "PROCESSING":
|
|
427
|
-
return [
|
|
427
|
+
return [T[q.Details], T[q.Print]];
|
|
428
428
|
case "COMPLETE":
|
|
429
429
|
return [
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
430
|
+
T[q.Update],
|
|
431
|
+
T[q.Details],
|
|
432
|
+
T[q.Print]
|
|
433
433
|
];
|
|
434
434
|
case "CANCEL":
|
|
435
435
|
default:
|
|
436
|
-
return [
|
|
436
|
+
return [T[q.Details], T[q.Print]];
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
function O(c) {
|
|
440
|
-
return Object.values(
|
|
440
|
+
return Object.values(R.enum).includes(c);
|
|
441
441
|
}
|
|
442
|
-
async function
|
|
443
|
-
var L,
|
|
442
|
+
async function E(c, d, m) {
|
|
443
|
+
var L, H;
|
|
444
444
|
const f = xe(d);
|
|
445
445
|
if (c === q.Print) {
|
|
446
446
|
rt(f, p.currentLocation);
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
449
|
if (c === q.Details) {
|
|
450
|
-
|
|
450
|
+
w.promptShowTransferDetails(f, m);
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
453
|
if (c === q.Update) {
|
|
454
|
-
(L =
|
|
454
|
+
(L = w.promptUpdateTransferDialog) == null || L.call(w, f);
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
457
|
if (O(c)) {
|
|
458
|
-
|
|
458
|
+
w.submitAction(d, c, (H = m == null ? void 0 : m.to) == null ? void 0 : H.dbName);
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function $() {
|
|
463
463
|
return [
|
|
464
464
|
{
|
|
465
465
|
accessorKey: "seqNumber",
|
|
466
|
-
header: () =>
|
|
466
|
+
header: () => s("inventory.transfer.table.seqNo"),
|
|
467
467
|
enableSorting: !0,
|
|
468
468
|
size: 80,
|
|
469
469
|
sortUndefined: "last"
|
|
470
470
|
},
|
|
471
471
|
{
|
|
472
472
|
accessorKey: "_id",
|
|
473
|
-
header: () =>
|
|
473
|
+
header: () => s("inventory.transfer.table.createdAt"),
|
|
474
474
|
cell(c) {
|
|
475
475
|
return pe(`${c.getValue()}`);
|
|
476
476
|
},
|
|
@@ -478,13 +478,13 @@ function Or(u, _) {
|
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
480
|
accessorKey: "supplier.name",
|
|
481
|
-
header: () =>
|
|
481
|
+
header: () => s("inventory.transfer.table.transferFrom"),
|
|
482
482
|
enableSorting: !0,
|
|
483
483
|
size: 200
|
|
484
484
|
},
|
|
485
485
|
{
|
|
486
486
|
accessorKey: "items.length",
|
|
487
|
-
header: () =>
|
|
487
|
+
header: () => s("inventory.transfer.table.noOfItems"),
|
|
488
488
|
enableSorting: !1,
|
|
489
489
|
meta: {
|
|
490
490
|
width: "10rem"
|
|
@@ -492,15 +492,15 @@ function Or(u, _) {
|
|
|
492
492
|
},
|
|
493
493
|
{
|
|
494
494
|
accessorKey: "ref",
|
|
495
|
-
header: () =>
|
|
495
|
+
header: () => s("inventory.transfer.table.reference"),
|
|
496
496
|
enableSorting: !1,
|
|
497
497
|
size: "auto"
|
|
498
498
|
},
|
|
499
499
|
{
|
|
500
500
|
accessorKey: "status",
|
|
501
|
-
header: () =>
|
|
501
|
+
header: () => s("inventory.transfer.table.status"),
|
|
502
502
|
cell(c) {
|
|
503
|
-
const d =
|
|
503
|
+
const d = s(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
504
504
|
return ce(
|
|
505
505
|
"div",
|
|
506
506
|
{
|
|
@@ -521,8 +521,8 @@ function Or(u, _) {
|
|
|
521
521
|
{
|
|
522
522
|
id: "action",
|
|
523
523
|
cell(c) {
|
|
524
|
-
const d = c.row.original, m =
|
|
525
|
-
return Ae(m, (f) =>
|
|
524
|
+
const d = c.row.original, m = S(d);
|
|
525
|
+
return Ae(m, (f) => E(f, d));
|
|
526
526
|
},
|
|
527
527
|
enableSorting: !1,
|
|
528
528
|
size: 40,
|
|
@@ -537,14 +537,14 @@ function Or(u, _) {
|
|
|
537
537
|
return [
|
|
538
538
|
{
|
|
539
539
|
accessorKey: "purchaseOrder.seqNumber",
|
|
540
|
-
header: () =>
|
|
540
|
+
header: () => s("inventory.transfer.table.seqNo"),
|
|
541
541
|
enableSorting: !0,
|
|
542
542
|
size: 80,
|
|
543
543
|
sortUndefined: "last"
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
accessorKey: "purchaseOrder._id",
|
|
547
|
-
header: () =>
|
|
547
|
+
header: () => s("inventory.transfer.table.createdAt"),
|
|
548
548
|
cell(c) {
|
|
549
549
|
return pe(`${c.getValue()}`);
|
|
550
550
|
},
|
|
@@ -552,26 +552,26 @@ function Or(u, _) {
|
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
554
|
accessorKey: "to.name",
|
|
555
|
-
header: () =>
|
|
555
|
+
header: () => s("inventory.transfer.table.transferTo"),
|
|
556
556
|
enableSorting: !1,
|
|
557
557
|
size: 200
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
accessorKey: "purchaseOrder.items.length",
|
|
561
|
-
header: () =>
|
|
561
|
+
header: () => s("inventory.transfer.table.noOfItems"),
|
|
562
562
|
enableSorting: !1
|
|
563
563
|
},
|
|
564
564
|
{
|
|
565
565
|
accessorKey: "purchaseOrder.ref",
|
|
566
|
-
header: () =>
|
|
566
|
+
header: () => s("inventory.transfer.table.reference"),
|
|
567
567
|
enableSorting: !1,
|
|
568
568
|
size: "auto"
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
accessorKey: "purchaseOrder.status",
|
|
572
|
-
header: () =>
|
|
572
|
+
header: () => s("inventory.transfer.table.status"),
|
|
573
573
|
cell(c) {
|
|
574
|
-
const d =
|
|
574
|
+
const d = s(`inventory.transfer.status.${c.getValue() ?? ""}`), m = `${c.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
575
575
|
return ce(
|
|
576
576
|
"div",
|
|
577
577
|
{
|
|
@@ -591,10 +591,10 @@ function Or(u, _) {
|
|
|
591
591
|
{
|
|
592
592
|
id: "action",
|
|
593
593
|
cell(c) {
|
|
594
|
-
const d = c.row.original, m = d.purchaseOrder ?
|
|
594
|
+
const d = c.row.original, m = d.purchaseOrder ? S(d.purchaseOrder) : [];
|
|
595
595
|
return Ae(
|
|
596
596
|
m,
|
|
597
|
-
(f) => d.purchaseOrder ?
|
|
597
|
+
(f) => d.purchaseOrder ? E(f, d.purchaseOrder, d) : void 0
|
|
598
598
|
);
|
|
599
599
|
},
|
|
600
600
|
enableSorting: !1,
|
|
@@ -606,7 +606,7 @@ function Or(u, _) {
|
|
|
606
606
|
}
|
|
607
607
|
];
|
|
608
608
|
}
|
|
609
|
-
const M =
|
|
609
|
+
const M = Q(() => u === "receive/request" ? $() : i());
|
|
610
610
|
return {
|
|
611
611
|
get columnDefs() {
|
|
612
612
|
return M.value;
|
|
@@ -622,10 +622,10 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
622
622
|
}, bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "fm-typo-en-body-lg-600" }, _t = {
|
|
623
623
|
key: 2,
|
|
624
624
|
class: "flex flex-col gap-4"
|
|
625
|
-
}, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" },
|
|
625
|
+
}, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, St = {
|
|
626
626
|
key: 3,
|
|
627
627
|
class: "flex flex-col gap-4"
|
|
628
|
-
},
|
|
628
|
+
}, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = {
|
|
629
629
|
key: 4,
|
|
630
630
|
class: "flex flex-col gap-4"
|
|
631
631
|
}, kt = { class: "fm-typo-en-body-lg-600" }, At = {
|
|
@@ -637,7 +637,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
637
637
|
}, Pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ct = { class: "fm-typo-en-body-lg-600" }, Nt = {
|
|
638
638
|
key: 7,
|
|
639
639
|
class: "flex flex-col gap-4"
|
|
640
|
-
}, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" },
|
|
640
|
+
}, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, It = { class: "flex flex-col gap-8" }, Ft = { class: "fm-typo-en-body-lg-600" }, Mt = { class: "flex w-full gap-4" }, Ut = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lt = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, jt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Bt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kt = {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
643
643
|
}, Vt = {
|
|
@@ -661,7 +661,7 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
661
661
|
}, nr = { class: "flex-1 flex flex-col items-center" }, or = {
|
|
662
662
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
663
663
|
name: "delivery details"
|
|
664
|
-
}, lr = { class: "flex flex-col gap-8" }, cr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ir = { class: "flex flex-col gap-4" }, ur = { class: "flex gap-8 xs:flex-col" },
|
|
664
|
+
}, lr = { class: "flex flex-col gap-8" }, cr = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ir = { class: "flex flex-col gap-4" }, ur = { class: "flex gap-8 xs:flex-col" }, Or = /* @__PURE__ */ Ue({
|
|
665
665
|
__name: "TransferDetails",
|
|
666
666
|
props: {
|
|
667
667
|
poRequest: {},
|
|
@@ -673,11 +673,11 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
673
673
|
canApprove: { type: Boolean }
|
|
674
674
|
},
|
|
675
675
|
emits: ["update:show", "submitted"],
|
|
676
|
-
setup(u, { emit:
|
|
677
|
-
const p = u,
|
|
676
|
+
setup(u, { emit: w }) {
|
|
677
|
+
const p = u, s = w, S = Te(), O = Ee(), E = Ye(), $ = Pe(), { t: i } = Ie(), M = Q(
|
|
678
678
|
() => {
|
|
679
|
-
var
|
|
680
|
-
return ((
|
|
679
|
+
var a, r, A, t;
|
|
680
|
+
return ((r = (a = p.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : r.internal) === "restaurant" || ((t = (A = p.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : t.internal) === "warehouse" ? me.TRANSFER : me.PURCHASE;
|
|
681
681
|
}
|
|
682
682
|
), c = [
|
|
683
683
|
{
|
|
@@ -688,18 +688,18 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
688
688
|
label: i("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
689
689
|
value: "deliveryHistory"
|
|
690
690
|
}
|
|
691
|
-
], d = U(c[0]), m = U(!1), f = U(""), L = U(!0),
|
|
692
|
-
async function ve(
|
|
693
|
-
f.value =
|
|
691
|
+
], d = U(c[0]), m = U(!1), f = U(""), L = U(!0), H = Fe(), re = Qe(p, "show");
|
|
692
|
+
async function ve(a, r, A) {
|
|
693
|
+
f.value = r, m.value = !0, L.value = !1;
|
|
694
694
|
try {
|
|
695
|
-
await
|
|
695
|
+
await H.processPurchaseOrder(
|
|
696
696
|
{
|
|
697
|
-
operation:
|
|
698
|
-
doc:
|
|
697
|
+
operation: r,
|
|
698
|
+
doc: a,
|
|
699
699
|
options: (
|
|
700
700
|
// auto receive for supplier to warehouse
|
|
701
|
-
(
|
|
702
|
-
|
|
701
|
+
(r === R.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
702
|
+
r === R.enum.completeReceive) && $.autoReceiveWarehouse ? {
|
|
703
703
|
autoReceive: !0
|
|
704
704
|
} : void 0
|
|
705
705
|
)
|
|
@@ -709,240 +709,249 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
709
709
|
title: "Success",
|
|
710
710
|
message: A,
|
|
711
711
|
type: "success"
|
|
712
|
-
}),
|
|
712
|
+
}), s("update:show", !1), s("submitted");
|
|
713
713
|
} catch (t) {
|
|
714
714
|
O.open({
|
|
715
715
|
title: "Something went wrong",
|
|
716
716
|
message: "Please try again.",
|
|
717
717
|
type: "error"
|
|
718
|
-
}), console.error("Error when submitting PO operation",
|
|
718
|
+
}), console.error("Error when submitting PO operation", r, a, t);
|
|
719
719
|
} finally {
|
|
720
720
|
f.value = "", m.value = !1, L.value = !0;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
async function
|
|
724
|
-
const
|
|
725
|
-
if (!
|
|
723
|
+
async function K(a) {
|
|
724
|
+
const r = Me[a];
|
|
725
|
+
if (!r) {
|
|
726
726
|
O.open({
|
|
727
727
|
title: "Something went wrong",
|
|
728
|
-
message: `Cannot process order: ${qe(
|
|
728
|
+
message: `Cannot process order: ${qe(a)}`,
|
|
729
729
|
type: "error"
|
|
730
730
|
});
|
|
731
731
|
return;
|
|
732
732
|
}
|
|
733
|
-
const { successMessage: A, ...t } =
|
|
734
|
-
|
|
733
|
+
const { successMessage: A, ...t } = r;
|
|
734
|
+
S.open({
|
|
735
735
|
title: t.title,
|
|
736
736
|
message: t.message,
|
|
737
737
|
primaryActions: t.primaryActions
|
|
738
738
|
}).onPrimary(() => {
|
|
739
|
-
p.purchaseOrder && ve(p.purchaseOrder,
|
|
739
|
+
p.purchaseOrder && ve(p.purchaseOrder, a, A);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
|
-
const ye =
|
|
743
|
-
var
|
|
744
|
-
return ((
|
|
745
|
-
}), Z =
|
|
742
|
+
const ye = Q(() => {
|
|
743
|
+
var a, r;
|
|
744
|
+
return ((a = p.purchaseOrder) == null ? void 0 : a.status) === F.enum.RECEIVING || ((r = p.purchaseOrder) == null ? void 0 : r.status) === F.enum.COMPLETE;
|
|
745
|
+
}), Z = Q(
|
|
746
746
|
() => {
|
|
747
|
-
var
|
|
748
|
-
return
|
|
749
|
-
((A = (
|
|
747
|
+
var a, r, A, t, o, g;
|
|
748
|
+
return E.getLocationSubsidiary(
|
|
749
|
+
((A = (r = (a = p.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : r.subsidiary) == null ? void 0 : A.id) || ((g = (o = (t = p.poRequest) == null ? void 0 : t.netSuite) == null ? void 0 : o.subsidiary) == null ? void 0 : g.id)
|
|
750
750
|
).fullName;
|
|
751
751
|
}
|
|
752
|
-
), he =
|
|
753
|
-
var
|
|
754
|
-
return (
|
|
755
|
-
var
|
|
756
|
-
return (
|
|
752
|
+
), he = Q(() => {
|
|
753
|
+
var a, r, A, t, o, g;
|
|
754
|
+
return (r = (a = p.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && r.length && ((t = (A = p.purchaseOrder) == null ? void 0 : A.deliveryFullfillment) == null ? void 0 : t.length) > 0 ? (g = (o = p.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) == null ? void 0 : g.map((_) => {
|
|
755
|
+
var n;
|
|
756
|
+
return (n = _.netSuite) == null ? void 0 : n.refNo;
|
|
757
757
|
}).join(", ") : "-";
|
|
758
|
-
}),
|
|
759
|
-
var
|
|
760
|
-
const A = (((
|
|
761
|
-
(
|
|
762
|
-
const
|
|
763
|
-
return
|
|
758
|
+
}), z = Q(() => {
|
|
759
|
+
var g, _, n;
|
|
760
|
+
const A = (((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? []).flatMap((v) => v.received ?? []).reduce(
|
|
761
|
+
(v, P) => {
|
|
762
|
+
const I = v[P.sku._id] ?? [];
|
|
763
|
+
return v[P.sku._id] = [...I, P], v;
|
|
764
764
|
},
|
|
765
765
|
{}
|
|
766
766
|
), t = Object.entries(A).reduce(
|
|
767
|
-
(
|
|
768
|
-
const
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
Math.max(
|
|
767
|
+
(v, [P, I]) => {
|
|
768
|
+
const D = I.reduce((y, C) => {
|
|
769
|
+
const k = He(
|
|
770
|
+
y,
|
|
771
|
+
Math.max(y.precision, C.amount.precision)
|
|
772
772
|
);
|
|
773
|
-
return Ce(
|
|
773
|
+
return Ce(k, C.amount);
|
|
774
774
|
}, be(0));
|
|
775
|
-
return
|
|
775
|
+
return v[P] = D, v;
|
|
776
776
|
},
|
|
777
777
|
{}
|
|
778
|
-
),
|
|
779
|
-
for (const
|
|
780
|
-
t[
|
|
778
|
+
), o = ((_ = p.purchaseOrder) == null ? void 0 : _.items) ?? [];
|
|
779
|
+
for (const v of o)
|
|
780
|
+
t[n = v.sku._id] ?? (t[n] = be(0));
|
|
781
781
|
return t;
|
|
782
|
-
}),
|
|
783
|
-
var
|
|
784
|
-
const
|
|
785
|
-
...
|
|
786
|
-
createdAt:
|
|
782
|
+
}), V = Q(() => {
|
|
783
|
+
var g, _;
|
|
784
|
+
const a = ((g = p.purchaseOrder) == null ? void 0 : g.deliveryOrder) ?? [], r = ((_ = p.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) ?? [], A = [
|
|
785
|
+
...a.map((n) => ({
|
|
786
|
+
createdAt: n.createdAt,
|
|
787
787
|
type: "grn",
|
|
788
|
-
doc:
|
|
788
|
+
doc: n
|
|
789
789
|
})),
|
|
790
|
-
...
|
|
791
|
-
createdAt:
|
|
790
|
+
...r.map((n) => ({
|
|
791
|
+
createdAt: n.createdAt,
|
|
792
792
|
type: "fulfillment",
|
|
793
|
-
doc:
|
|
793
|
+
doc: n
|
|
794
794
|
}))
|
|
795
795
|
];
|
|
796
|
-
A.reverse().sort((
|
|
797
|
-
function t(
|
|
798
|
-
var
|
|
799
|
-
const
|
|
796
|
+
A.reverse().sort((n, v) => n.createdAt.localeCompare(v.createdAt));
|
|
797
|
+
function t(n) {
|
|
798
|
+
var P, I, D, y, C;
|
|
799
|
+
const v = r.findIndex((k) => k.id === n.fullfillmentId);
|
|
800
800
|
return {
|
|
801
801
|
header: "Received",
|
|
802
|
-
date: De(new Date(
|
|
802
|
+
date: De(new Date(n.createdAt)),
|
|
803
803
|
info: [
|
|
804
804
|
{
|
|
805
805
|
label: "Received by",
|
|
806
|
-
values: [(
|
|
806
|
+
values: [(P = n.createdBy) == null ? void 0 : P.name]
|
|
807
807
|
},
|
|
808
808
|
{
|
|
809
809
|
label: "Received items",
|
|
810
|
-
values:
|
|
811
|
-
var
|
|
812
|
-
return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${((
|
|
810
|
+
values: n.received.map((k) => {
|
|
811
|
+
var j;
|
|
812
|
+
return `(${k.sku.code}) ${k.sku.name}: ${le(k.amount, !1)} ${((j = k.measurement) == null ? void 0 : j.abbrev) ?? k.sku.unit.abbrev}`;
|
|
813
813
|
})
|
|
814
814
|
},
|
|
815
|
-
|
|
815
|
+
n.deliveryOrderNumber ? {
|
|
816
816
|
label: "Delivery order no.",
|
|
817
|
-
values: [
|
|
817
|
+
values: [n.deliveryOrderNumber]
|
|
818
818
|
} : null,
|
|
819
|
-
|
|
819
|
+
n.remark ? {
|
|
820
820
|
label: "Remark",
|
|
821
|
-
values: [
|
|
821
|
+
values: [n.remark]
|
|
822
822
|
} : null,
|
|
823
|
-
|
|
823
|
+
v > -1 ? {
|
|
824
824
|
label: "Fulfilment",
|
|
825
|
-
values: [`${
|
|
825
|
+
values: [`${v + 1}`]
|
|
826
|
+
} : null,
|
|
827
|
+
(D = (I = r[v]) == null ? void 0 : I.netSuite) != null && D.refNo ? {
|
|
828
|
+
label: "Netsuite fulfillment ID",
|
|
829
|
+
values: [(C = (y = r[v]) == null ? void 0 : y.netSuite) == null ? void 0 : C.refNo]
|
|
826
830
|
} : null
|
|
827
831
|
].filter((k) => k)
|
|
828
832
|
};
|
|
829
833
|
}
|
|
830
|
-
function n
|
|
831
|
-
|
|
834
|
+
function o(n) {
|
|
835
|
+
var P, I;
|
|
836
|
+
const v = r.findIndex((D) => D.id === n.id);
|
|
832
837
|
return {
|
|
833
838
|
header: "Fulfillment",
|
|
834
|
-
date: De(new Date(
|
|
839
|
+
date: De(new Date(n.createdAt)),
|
|
835
840
|
info: [
|
|
836
841
|
{
|
|
837
842
|
label: "Sequence",
|
|
838
|
-
values: [String(
|
|
843
|
+
values: [String(v + 1)]
|
|
839
844
|
},
|
|
845
|
+
(P = n.netSuite) != null && P.refNo ? {
|
|
846
|
+
label: "Netsuite ID",
|
|
847
|
+
values: [(I = n.netSuite) == null ? void 0 : I.refNo]
|
|
848
|
+
} : null,
|
|
840
849
|
{
|
|
841
850
|
label: "Receiveable items",
|
|
842
|
-
values:
|
|
843
|
-
var
|
|
844
|
-
return `(${
|
|
851
|
+
values: n.items.map((D) => {
|
|
852
|
+
var y;
|
|
853
|
+
return `(${D.sku.code}) ${D.sku.name}: ${le(D.amount, !1)} ${((y = D.measurement) == null ? void 0 : y.abbrev) ?? D.sku.unit.abbrev}`;
|
|
845
854
|
})
|
|
846
855
|
}
|
|
847
|
-
]
|
|
856
|
+
].filter((D) => D)
|
|
848
857
|
};
|
|
849
858
|
}
|
|
850
|
-
return A.map((
|
|
851
|
-
switch (
|
|
859
|
+
return A.map((n) => {
|
|
860
|
+
switch (n.type) {
|
|
852
861
|
case "grn":
|
|
853
|
-
return t(
|
|
862
|
+
return t(n.doc);
|
|
854
863
|
case "fulfillment":
|
|
855
|
-
return n
|
|
864
|
+
return o(n.doc);
|
|
856
865
|
}
|
|
857
866
|
});
|
|
858
867
|
});
|
|
859
|
-
return (
|
|
860
|
-
var
|
|
861
|
-
const A = X("FmButtonGroup"), t = X("FmChip"),
|
|
862
|
-
return
|
|
863
|
-
header: l(i)("inventory.transfer.receiveRequest.details.title") + ((
|
|
868
|
+
return (a, r) => {
|
|
869
|
+
var P, I;
|
|
870
|
+
const A = X("FmButtonGroup"), t = X("FmChip"), o = X("FmMenuDivider"), g = X("FmCard"), _ = X("FmSpacer"), n = X("FmButton"), v = X("FmSideSheet");
|
|
871
|
+
return h(), G(v, {
|
|
872
|
+
header: l(i)("inventory.transfer.receiveRequest.details.title") + ((P = a.purchaseOrder) != null && P.seqNumber ? ` #${(I = a.purchaseOrder) == null ? void 0 : I.seqNumber}` : ""),
|
|
864
873
|
modelValue: l(re),
|
|
865
|
-
"onUpdate:modelValue":
|
|
874
|
+
"onUpdate:modelValue": r[9] || (r[9] = (D) => Le(re) ? re.value = D : null),
|
|
866
875
|
"dismiss-away": L.value,
|
|
867
876
|
"close-button": "",
|
|
868
877
|
"max-width": 500
|
|
869
878
|
}, {
|
|
870
879
|
default: ie(() => {
|
|
871
|
-
var
|
|
880
|
+
var D;
|
|
872
881
|
return [
|
|
873
882
|
e("div", st, [
|
|
874
883
|
e("div", null, [
|
|
875
|
-
|
|
884
|
+
Y(A, {
|
|
876
885
|
items: c,
|
|
877
886
|
modelValue: d.value,
|
|
878
|
-
"onUpdate:modelValue":
|
|
887
|
+
"onUpdate:modelValue": r[0] || (r[0] = (y) => d.value = y)
|
|
879
888
|
}, null, 8, ["modelValue"])
|
|
880
889
|
]),
|
|
881
|
-
d.value.value === "overview" ? (
|
|
890
|
+
d.value.value === "overview" ? (h(), x(ee, { key: 0 }, [
|
|
882
891
|
e("div", null, [
|
|
883
|
-
|
|
892
|
+
Y(g, {
|
|
884
893
|
variant: "outlined",
|
|
885
894
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
886
895
|
}, {
|
|
887
896
|
default: ie(() => {
|
|
888
|
-
var
|
|
897
|
+
var y, C, k, j, W, J, se, ae, ne, B, ge, _e, we, Re, Se, Oe;
|
|
889
898
|
return [
|
|
890
899
|
e("div", at, [
|
|
891
|
-
e("div", nt,
|
|
900
|
+
e("div", nt, b(l(i)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
892
901
|
e("div", null, [
|
|
893
|
-
|
|
894
|
-
label: l(i)(`inventory.transfer.status.${(
|
|
895
|
-
class: ue(`fm-status-badge fm-status-badge-${(
|
|
902
|
+
Y(t, {
|
|
903
|
+
label: l(i)(`inventory.transfer.status.${(y = a.purchaseOrder) == null ? void 0 : y.status}`),
|
|
904
|
+
class: ue(`fm-status-badge fm-status-badge-${(k = (C = a.purchaseOrder) == null ? void 0 : C.status) == null ? void 0 : k.toLocaleLowerCase("en-us")}`),
|
|
896
905
|
compact: ""
|
|
897
906
|
}, null, 8, ["label", "class"])
|
|
898
907
|
])
|
|
899
908
|
]),
|
|
900
|
-
|
|
909
|
+
Y(o),
|
|
901
910
|
e("div", ot, [
|
|
902
911
|
e("div", lt, [
|
|
903
912
|
e("div", ct, [
|
|
904
|
-
e("div", it,
|
|
913
|
+
e("div", it, b(l(i)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
905
914
|
]),
|
|
906
|
-
e("div", ut,
|
|
915
|
+
e("div", ut, b(l(pe)(((j = a.purchaseOrder) == null ? void 0 : j._id) ?? "")), 1)
|
|
907
916
|
]),
|
|
908
|
-
(W =
|
|
909
|
-
e("div", mt,
|
|
910
|
-
e("div", ft,
|
|
911
|
-
])) :
|
|
917
|
+
(W = a.purchaseOrder) != null && W.effectiveAt ? (h(), x("div", dt, [
|
|
918
|
+
e("div", mt, b(l(i)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
919
|
+
e("div", ft, b(l(Ne)(new Date((J = a.purchaseOrder) == null ? void 0 : J.effectiveAt))), 1)
|
|
920
|
+
])) : N("", !0),
|
|
912
921
|
e("div", pt, [
|
|
913
|
-
e("div", vt,
|
|
914
|
-
e("div", yt,
|
|
922
|
+
e("div", vt, b(l(i)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
923
|
+
e("div", yt, b(l(i)(
|
|
915
924
|
`inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
|
|
916
925
|
)), 1)
|
|
917
926
|
]),
|
|
918
|
-
(ae = (se =
|
|
919
|
-
e("div", bt,
|
|
920
|
-
e("div", gt,
|
|
921
|
-
])) :
|
|
922
|
-
|
|
923
|
-
e("div", wt,
|
|
924
|
-
e("div", Rt,
|
|
925
|
-
])) :
|
|
926
|
-
l(
|
|
927
|
-
|
|
928
|
-
e("div",
|
|
929
|
-
])) :
|
|
930
|
-
l(
|
|
931
|
-
|
|
932
|
-
e("div", kt,
|
|
933
|
-
])) :
|
|
934
|
-
l(
|
|
935
|
-
|
|
936
|
-
e("div", xt,
|
|
937
|
-
])) :
|
|
938
|
-
(
|
|
939
|
-
e("div", Pt,
|
|
940
|
-
e("div", Ct,
|
|
941
|
-
])) :
|
|
942
|
-
(
|
|
943
|
-
e("div", Tt,
|
|
944
|
-
e("div", Et,
|
|
945
|
-
])) :
|
|
927
|
+
(ae = (se = a.purchaseOrder) == null ? void 0 : se.supplier) != null && ae.name ? (h(), x("div", ht, [
|
|
928
|
+
e("div", bt, b(l(i)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
929
|
+
e("div", gt, b((B = (ne = a.purchaseOrder) == null ? void 0 : ne.supplier) == null ? void 0 : B.name), 1)
|
|
930
|
+
])) : N("", !0),
|
|
931
|
+
a.transferTo ? (h(), x("div", _t, [
|
|
932
|
+
e("div", wt, b(l(i)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
933
|
+
e("div", Rt, b(a.transferTo), 1)
|
|
934
|
+
])) : N("", !0),
|
|
935
|
+
l(E).isEnabled ? (h(), x("div", St, [
|
|
936
|
+
r[10] || (r[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
|
|
937
|
+
e("div", Ot, b(Z.value || "-"), 1)
|
|
938
|
+
])) : N("", !0),
|
|
939
|
+
l(E).isEnabled ? (h(), x("div", Dt, [
|
|
940
|
+
r[11] || (r[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
|
|
941
|
+
e("div", kt, b(((_e = (ge = a.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.id) || ((Re = (we = a.poRequest) == null ? void 0 : we.netSuite) == null ? void 0 : Re.id) || "-"), 1)
|
|
942
|
+
])) : N("", !0),
|
|
943
|
+
l(E).isEnabled ? (h(), x("div", At, [
|
|
944
|
+
r[12] || (r[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
|
|
945
|
+
e("div", xt, b(he.value), 1)
|
|
946
|
+
])) : N("", !0),
|
|
947
|
+
(Se = a.purchaseOrder) != null && Se.ref ? (h(), x("div", qt, [
|
|
948
|
+
e("div", Pt, b(l(i)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
949
|
+
e("div", Ct, b(a.purchaseOrder.ref), 1)
|
|
950
|
+
])) : N("", !0),
|
|
951
|
+
(Oe = a.purchaseOrder) != null && Oe.remark ? (h(), x("div", Nt, [
|
|
952
|
+
e("div", Tt, b(l(i)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
953
|
+
e("div", Et, b(a.purchaseOrder.remark), 1)
|
|
954
|
+
])) : N("", !0)
|
|
946
955
|
])
|
|
947
956
|
];
|
|
948
957
|
}),
|
|
@@ -950,47 +959,47 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
950
959
|
})
|
|
951
960
|
]),
|
|
952
961
|
e("div", $t, [
|
|
953
|
-
e("div",
|
|
954
|
-
e("div",
|
|
955
|
-
(
|
|
956
|
-
key:
|
|
962
|
+
e("div", It, [
|
|
963
|
+
e("div", Ft, b(ye.value ? l(i)("inventory.transfer.receiveRequest.details.receivedItems") : l(i)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
964
|
+
(h(!0), x(ee, null, de(((D = a.purchaseOrder) == null ? void 0 : D.items) ?? [], (y) => (h(), x("div", {
|
|
965
|
+
key: y.code,
|
|
957
966
|
class: "flex flex-col"
|
|
958
967
|
}, [
|
|
959
968
|
e("div", Mt, [
|
|
960
|
-
e("div", Ut, y
|
|
961
|
-
e("div", Lt,
|
|
969
|
+
e("div", Ut, b(y.name), 1),
|
|
970
|
+
e("div", Lt, b(l(le)(z.value[y.sku._id], !1)) + "/" + b(l($e)(y.quantity, y.sku.unit, y.measurement)), 1)
|
|
962
971
|
]),
|
|
963
972
|
e("div", jt, [
|
|
964
|
-
e("div", Bt, y
|
|
965
|
-
|
|
973
|
+
e("div", Bt, b(y.code), 1),
|
|
974
|
+
y.totalCost && l($).enableTotalCost ? (h(), x("div", Kt, " (" + b(l(ze)(y.totalCost)) + ") ", 1)) : N("", !0)
|
|
966
975
|
])
|
|
967
976
|
]))), 128))
|
|
968
977
|
])
|
|
969
978
|
])
|
|
970
|
-
], 64)) :
|
|
971
|
-
d.value.value === "deliveryHistory" ? (
|
|
972
|
-
|
|
973
|
-
(
|
|
979
|
+
], 64)) : N("", !0),
|
|
980
|
+
d.value.value === "deliveryHistory" ? (h(), x("div", Vt, [
|
|
981
|
+
V.value.length ? (h(), x("div", Qt, [
|
|
982
|
+
(h(!0), x(ee, null, de(V.value, (y, C) => (h(), x(ee, { key: C }, [
|
|
974
983
|
e("div", Wt, [
|
|
975
984
|
e("div", Jt, [
|
|
976
985
|
e("div", Xt, [
|
|
977
986
|
e("div", {
|
|
978
987
|
class: ue([
|
|
979
988
|
{
|
|
980
|
-
"bg-fm-color-primary":
|
|
981
|
-
"bg-white":
|
|
989
|
+
"bg-fm-color-primary": C !== 0,
|
|
990
|
+
"bg-white": C === 0
|
|
982
991
|
},
|
|
983
992
|
"w-[2px] h-full"
|
|
984
993
|
])
|
|
985
994
|
}, null, 2)
|
|
986
995
|
]),
|
|
987
|
-
|
|
996
|
+
r[13] || (r[13] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
988
997
|
e("div", Zt, [
|
|
989
998
|
e("div", {
|
|
990
999
|
class: ue([
|
|
991
1000
|
{
|
|
992
|
-
"bg-fm-color-primary":
|
|
993
|
-
"bg-white":
|
|
1001
|
+
"bg-fm-color-primary": C < V.value.length - 1,
|
|
1002
|
+
"bg-white": C >= V.value.length - 1
|
|
994
1003
|
},
|
|
995
1004
|
"w-[2px] h-full"
|
|
996
1005
|
])
|
|
@@ -998,8 +1007,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
998
1007
|
])
|
|
999
1008
|
]),
|
|
1000
1009
|
e("div", er, [
|
|
1001
|
-
e("div", tr, y
|
|
1002
|
-
e("div", rr, y
|
|
1010
|
+
e("div", tr, b(y.header), 1),
|
|
1011
|
+
e("div", rr, b(y.date), 1)
|
|
1003
1012
|
])
|
|
1004
1013
|
]),
|
|
1005
1014
|
e("div", sr, [
|
|
@@ -1008,8 +1017,8 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1008
1017
|
e("div", {
|
|
1009
1018
|
class: ue([
|
|
1010
1019
|
{
|
|
1011
|
-
"bg-fm-color-primary":
|
|
1012
|
-
"bg-white":
|
|
1020
|
+
"bg-fm-color-primary": C < V.value.length - 1,
|
|
1021
|
+
"bg-white": C >= V.value.length - 1
|
|
1013
1022
|
},
|
|
1014
1023
|
"w-[2px] h-full"
|
|
1015
1024
|
])
|
|
@@ -1017,22 +1026,22 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1017
1026
|
])
|
|
1018
1027
|
]),
|
|
1019
1028
|
e("div", or, [
|
|
1020
|
-
|
|
1029
|
+
Y(g, {
|
|
1021
1030
|
variant: "outlined",
|
|
1022
1031
|
class: "py-12 px-16"
|
|
1023
1032
|
}, {
|
|
1024
1033
|
default: ie(() => [
|
|
1025
1034
|
e("div", lr, [
|
|
1026
|
-
(
|
|
1027
|
-
key:
|
|
1035
|
+
(h(!0), x(ee, null, de(y.info, (k, j) => (h(), x("div", {
|
|
1036
|
+
key: j,
|
|
1028
1037
|
class: "flex flex-col gap-4"
|
|
1029
1038
|
}, [
|
|
1030
|
-
e("div", cr,
|
|
1039
|
+
e("div", cr, b(k == null ? void 0 : k.label), 1),
|
|
1031
1040
|
e("div", ir, [
|
|
1032
|
-
(
|
|
1041
|
+
(h(!0), x(ee, null, de(k == null ? void 0 : k.values, (W, J) => (h(), x("div", {
|
|
1033
1042
|
key: J,
|
|
1034
1043
|
class: "fm-typo-en-body-lg-600"
|
|
1035
|
-
},
|
|
1044
|
+
}, b(W), 1))), 128))
|
|
1036
1045
|
])
|
|
1037
1046
|
]))), 128))
|
|
1038
1047
|
])
|
|
@@ -1042,84 +1051,84 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1042
1051
|
])
|
|
1043
1052
|
])
|
|
1044
1053
|
], 64))), 128))
|
|
1045
|
-
])) : (
|
|
1046
|
-
|
|
1054
|
+
])) : (h(), x("div", Gt, [
|
|
1055
|
+
Y(_),
|
|
1047
1056
|
e("div", null, [
|
|
1048
1057
|
e("img", {
|
|
1049
1058
|
src: l(et),
|
|
1050
1059
|
alt: "List is empty"
|
|
1051
1060
|
}, null, 8, Ht)
|
|
1052
1061
|
]),
|
|
1053
|
-
e("div", zt,
|
|
1054
|
-
e("div", Yt,
|
|
1055
|
-
|
|
1056
|
-
|
|
1062
|
+
e("div", zt, b(l(i)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1063
|
+
e("div", Yt, b(l(i)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1064
|
+
Y(_),
|
|
1065
|
+
Y(_)
|
|
1057
1066
|
]))
|
|
1058
|
-
])) :
|
|
1067
|
+
])) : N("", !0)
|
|
1059
1068
|
])
|
|
1060
1069
|
];
|
|
1061
1070
|
}),
|
|
1062
1071
|
"side-sheet-footer": ie(() => {
|
|
1063
|
-
var
|
|
1072
|
+
var D, y, C, k, j, W, J, se, ae, ne;
|
|
1064
1073
|
return [
|
|
1065
1074
|
e("div", ur, [
|
|
1066
|
-
((
|
|
1075
|
+
((D = a.purchaseOrder) == null ? void 0 : D.status) === l(F).enum.DRAFT && M.value === l(me).PURCHASE ? (h(), G(n, {
|
|
1067
1076
|
key: 0,
|
|
1068
1077
|
label: l(i)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
1069
|
-
onClick:
|
|
1078
|
+
onClick: r[1] || (r[1] = (B) => K("confirmDraft")),
|
|
1070
1079
|
loading: f.value === "confirmDraft",
|
|
1071
1080
|
disabled: f.value !== "confirmDraft" && m.value
|
|
1072
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1073
|
-
((
|
|
1081
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1082
|
+
((y = a.purchaseOrder) == null ? void 0 : y.status) === l(F).enum.DRAFT && M.value === l(me).TRANSFER ? (h(), G(n, {
|
|
1074
1083
|
key: 1,
|
|
1075
1084
|
label: l(i)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
1076
|
-
onClick:
|
|
1085
|
+
onClick: r[2] || (r[2] = (B) => K("submitRequest")),
|
|
1077
1086
|
loading: f.value === "submitRequest",
|
|
1078
1087
|
disabled: f.value !== "submitRequest" && m.value
|
|
1079
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1080
|
-
((
|
|
1088
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1089
|
+
((C = a.purchaseOrder) == null ? void 0 : C.status) === l(F).enum.DRAFT ? (h(), G(n, {
|
|
1081
1090
|
key: 2,
|
|
1082
1091
|
label: l(i)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
1083
|
-
onClick:
|
|
1092
|
+
onClick: r[3] || (r[3] = (B) => K("cancelDraft")),
|
|
1084
1093
|
loading: f.value === "cancelDraft",
|
|
1085
1094
|
disabled: f.value !== "cancelDraft" && m.value,
|
|
1086
1095
|
variant: "destructive"
|
|
1087
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1088
|
-
((
|
|
1096
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1097
|
+
((k = a.purchaseOrder) == null ? void 0 : k.status) === l(F).enum.RECEIVING ? (h(), G(n, {
|
|
1089
1098
|
key: 3,
|
|
1090
1099
|
label: l(i)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1091
|
-
onClick:
|
|
1100
|
+
onClick: r[4] || (r[4] = (B) => K("completeReceive")),
|
|
1092
1101
|
loading: f.value === "completeReceive",
|
|
1093
1102
|
disabled: f.value !== "completeReceive" && m.value
|
|
1094
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1095
|
-
|
|
1103
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1104
|
+
a.canResubmit ? (h(), G(n, {
|
|
1096
1105
|
key: 4,
|
|
1097
1106
|
label: l(i)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
|
|
1098
|
-
onClick:
|
|
1107
|
+
onClick: r[5] || (r[5] = (B) => K("submitRequest")),
|
|
1099
1108
|
loading: f.value === "submitRequest",
|
|
1100
1109
|
disabled: f.value !== "submitRequest" && m.value
|
|
1101
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1102
|
-
(((
|
|
1110
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1111
|
+
(((j = a.purchaseOrder) == null ? void 0 : j.status) === l(F).enum.REQUESTING || ((W = a.purchaseOrder) == null ? void 0 : W.status) === l(F).enum.PROCESSING) && a.canApprove ? (h(), G(n, {
|
|
1103
1112
|
key: 5,
|
|
1104
1113
|
label: l(i)("inventory.transfer.approval.actions.approveRequest"),
|
|
1105
|
-
onClick:
|
|
1114
|
+
onClick: r[6] || (r[6] = (B) => K("approveRequest")),
|
|
1106
1115
|
loading: f.value === "approveRequest",
|
|
1107
1116
|
disabled: f.value !== "approveRequest" && m.value
|
|
1108
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1109
|
-
((J =
|
|
1117
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1118
|
+
((J = a.purchaseOrder) == null ? void 0 : J.status) === l(F).enum.REQUESTING && a.canApprove ? (h(), G(n, {
|
|
1110
1119
|
key: 6,
|
|
1111
1120
|
label: l(i)("inventory.transfer.approval.actions.rejectRequest"),
|
|
1112
|
-
onClick:
|
|
1121
|
+
onClick: r[7] || (r[7] = (B) => K("rejectRequest")),
|
|
1113
1122
|
loading: f.value === "rejectRequest",
|
|
1114
1123
|
disabled: f.value !== "rejectRequest" && m.value,
|
|
1115
1124
|
variant: "destructive"
|
|
1116
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1117
|
-
((se =
|
|
1125
|
+
}, null, 8, ["label", "loading", "disabled"])) : N("", !0),
|
|
1126
|
+
((se = a.purchaseOrder) == null ? void 0 : se.status) !== l(F).enum.COMPLETE && ((ae = a.purchaseOrder) == null ? void 0 : ae.status) !== l(F).enum.CANCEL && (((ne = a.purchaseOrder) == null ? void 0 : ne.status) !== l(F).enum.REQUESTING || a.canApprove) ? (h(), G(n, {
|
|
1118
1127
|
key: 7,
|
|
1119
1128
|
label: l(i)("common.close"),
|
|
1120
1129
|
variant: "tertiary",
|
|
1121
|
-
onClick:
|
|
1122
|
-
}, null, 8, ["label"])) :
|
|
1130
|
+
onClick: r[8] || (r[8] = (B) => s("update:show", !1))
|
|
1131
|
+
}, null, 8, ["label"])) : N("", !0)
|
|
1123
1132
|
])
|
|
1124
1133
|
];
|
|
1125
1134
|
}),
|
|
@@ -1129,9 +1138,9 @@ const st = { class: "flex flex-col gap-16 w-full h-full" }, at = { class: "flex
|
|
|
1129
1138
|
}
|
|
1130
1139
|
});
|
|
1131
1140
|
export {
|
|
1132
|
-
|
|
1141
|
+
Or as _,
|
|
1133
1142
|
Rr as a,
|
|
1134
|
-
|
|
1143
|
+
Sr as b,
|
|
1135
1144
|
tt as g,
|
|
1136
|
-
|
|
1145
|
+
Fe as u
|
|
1137
1146
|
};
|