@feedmepos/mf-inventory-portal 0.0.22-dev.25 → 0.0.22-dev.27
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-CUG3A6eh.js → ApprovalView-CigrrwPJ.js} +4 -4
- package/dist/{BindingsDialog-C8VW5zTP.js → BindingsDialog-BPcSzy8I.js} +1 -1
- package/dist/{BindingsPicker-CmavNRBv.js → BindingsPicker-BN00tJ5g.js} +1 -1
- package/dist/{BindingsTable-Ds7xU6eW.js → BindingsTable-CI9a_a9U.js} +1 -1
- package/dist/{ClosingTemplateView-YLxmMOOb.js → ClosingTemplateView-r0SqxxeG.js} +5 -5
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cs0N0_Eh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BDW7JUMg.js} +1 -1
- package/dist/{IngredientsView-5VHrzfPZ.js → IngredientsView-BcogGgdu.js} +5 -5
- package/dist/{IntegrationView-DGJQOKKQ.js → IntegrationView-DeCPmtQo.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-rntSnKF6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DxyPi20w.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Fb96tdM4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-R4D7OhPg.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B4gVABOa.js → PurchaseOrderPrintPreview-b0abxau2.js} +1 -1
- package/dist/{ReceiveRequestView-Dp3_jzUb.js → ReceiveRequestView-DPsVFrLS.js} +6 -6
- package/dist/{RecipeView-CD0g929Y.js → RecipeView-CyHAkwty.js} +5 -5
- package/dist/{StockView-JN120j0d.js → StockView-BNRHq_B0.js} +6 -6
- package/dist/{SupplierView-C1O3gUXq.js → SupplierView-Gf1i7vb4.js} +75 -75
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-By87tbHu.js → TransferDetails.vue_vue_type_script_setup_true_lang-CPJyfBF_.js} +307 -300
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DUeYORdH.js +1522 -0
- package/dist/{TransferTemplateView-C780LnMc.js → TransferTemplateView-C0HCwg4W.js} +8 -8
- package/dist/{UnitView-Cey0qpZj.js → UnitView-DEL9E6NM.js} +6 -6
- package/dist/{WarehouseView-B1CpNmgb.js → WarehouseView-DjInPeDJ.js} +4 -4
- package/dist/api/netsuite.d.ts +1 -0
- package/dist/{app-Dxlsq-63.js → app-B89JJyoH.js} +2338 -2309
- package/dist/app.d.ts +1 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-BKt0urvU.js → decimal-yKZZGBkX.js} +1 -1
- package/dist/{defineDeepModel-CmsZ7uDL.js → defineDeepModel-COzj2kW1.js} +1 -1
- package/dist/{format-time-from-id-D1MP796l.js → format-time-from-id-DkbtD0lD.js} +1 -1
- package/dist/{id-to-date-Dgx5-GaK.js → id-to-date-Dveseghs.js} +1 -1
- package/dist/{purchase-order-transaction-type-BEVZywc0.js → purchase-order-transaction-type-23BvfadU.js} +3 -3
- package/dist/stores/netsuite.d.ts +12 -0
- package/dist/{supplier-DNgf0T_t.js → supplier-DOc45bDy.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-F6vEnwMK.js → use-template-enabled-locations-2-DKN3rr3H.js} +1 -1
- package/dist/{xlsx-Dz8oAq7m.js → xlsx-lNFouYJO.js} +1 -1
- package/dist/{xlsx.util-BpLmwWed.js → xlsx.util-x5h67VuX.js} +2 -2
- package/package.json +1 -1
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-hH7RapBS.js +0 -1519
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { f as ue } from "./format-time-from-id-
|
|
2
|
-
import { computed as
|
|
3
|
-
import { c as
|
|
4
|
-
import { D as
|
|
5
|
-
import { D as
|
|
6
|
-
import { F as
|
|
7
|
-
import { f as
|
|
8
|
-
import { useDialog as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { E as
|
|
11
|
-
function
|
|
1
|
+
import { f as ue } from "./format-time-from-id-DkbtD0lD.js";
|
|
2
|
+
import { computed as z, h as re, defineComponent as Ae, ref as ae, resolveComponent as H, openBlock as c, createBlock as $, unref as r, isRef as Ce, withCtx as ne, createElementVNode as e, createVNode as L, createElementBlock as b, Fragment as J, toDisplayString as d, normalizeClass as oe, createCommentVNode as x, renderList as le } from "vue";
|
|
3
|
+
import { c as he } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
4
|
+
import { D as k, R as h } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
+
import { D as Re, m as de, a as te, al as _e, am as S, c as Ee, j as Ne, ag as A, J as Te, H as Pe, aj as Fe, b as $e, x as Ie, T as ge } from "./app-B89JJyoH.js";
|
|
6
|
+
import { F as je } from "./decimal-yKZZGBkX.js";
|
|
7
|
+
import { f as Oe, P as ie, d as Me, e as Le } from "./purchase-order-transaction-type-23BvfadU.js";
|
|
8
|
+
import { useDialog as Ue, useSnackbar as Ke, useProxiedModel as Ve } from "@feedmepos/ui-library";
|
|
9
|
+
import { useI18n as xe } from "@feedmepos/mf-common";
|
|
10
|
+
import { E as Be } from "./empty-placeholder-wf6-BWE8.js";
|
|
11
|
+
function Ge(v, C) {
|
|
12
12
|
return C.reduce(
|
|
13
13
|
(a, I) => {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
14
|
+
const P = I.received.find((E) => E.sku._id === v._id);
|
|
15
|
+
return P && (a = Re(a, P.amount)), a;
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
je.toPrecision(de(0), v.unit.precision)
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const { name:
|
|
22
|
-
name:
|
|
20
|
+
function He(v, C) {
|
|
21
|
+
const { name: y, address: a, regNo: I } = C.doc.profile, P = {
|
|
22
|
+
name: y,
|
|
23
23
|
registrationNumber: I,
|
|
24
24
|
line1: a == null ? void 0 : a.line1,
|
|
25
25
|
line2: a == null ? void 0 : a.line2,
|
|
@@ -27,29 +27,29 @@ function Qe(f, C) {
|
|
|
27
27
|
city: a == null ? void 0 : a.city,
|
|
28
28
|
state: a == null ? void 0 : a.state,
|
|
29
29
|
country: a == null ? void 0 : a.country
|
|
30
|
-
},
|
|
31
|
-
name:
|
|
32
|
-
registrationNumber:
|
|
33
|
-
line1:
|
|
34
|
-
line2:
|
|
35
|
-
postcode:
|
|
36
|
-
city:
|
|
37
|
-
state:
|
|
38
|
-
country:
|
|
39
|
-
},
|
|
30
|
+
}, E = {
|
|
31
|
+
name: v.supplier.name,
|
|
32
|
+
registrationNumber: v.supplier.registrationNumber,
|
|
33
|
+
line1: v.supplier.address.line1,
|
|
34
|
+
line2: v.supplier.address.line2,
|
|
35
|
+
postcode: v.supplier.address.postcode,
|
|
36
|
+
city: v.supplier.address.city,
|
|
37
|
+
state: v.supplier.address.state,
|
|
38
|
+
country: v.supplier.address.country
|
|
39
|
+
}, Y = v.items.map((i) => {
|
|
40
40
|
const { sku: l, measurement: u } = i, j = te(
|
|
41
|
-
|
|
41
|
+
Ge(i.sku, v.deliveryOrder || []),
|
|
42
42
|
!1
|
|
43
43
|
);
|
|
44
44
|
return {
|
|
45
45
|
code: l.code,
|
|
46
46
|
description: l.name,
|
|
47
|
-
quantity:
|
|
47
|
+
quantity: Oe(i.quantity, l.unit, i.measurement),
|
|
48
48
|
unit: (u == null ? void 0 : u.abbrev) || l.unit.abbrev,
|
|
49
49
|
received: j
|
|
50
50
|
};
|
|
51
|
-
}), m =
|
|
52
|
-
createdAt:
|
|
51
|
+
}), m = v.deliveryOrder.map((i) => ({
|
|
52
|
+
createdAt: _e(new Date(i.createdAt)),
|
|
53
53
|
ref: i.deliveryOrderNumber,
|
|
54
54
|
remark: i.remark || "",
|
|
55
55
|
items: i.received.map((l) => {
|
|
@@ -61,128 +61,128 @@ function Qe(f, C) {
|
|
|
61
61
|
unit: ((u = l.measurement) == null ? void 0 : u.abbrev) || l.sku.unit.abbrev
|
|
62
62
|
};
|
|
63
63
|
})
|
|
64
|
-
})),
|
|
65
|
-
orderNumber:
|
|
66
|
-
createdAt: ue(
|
|
67
|
-
ref:
|
|
68
|
-
remark:
|
|
69
|
-
buyer:
|
|
70
|
-
supplier:
|
|
71
|
-
items:
|
|
72
|
-
status:
|
|
64
|
+
})), U = {
|
|
65
|
+
orderNumber: v.seqNumber.toString(),
|
|
66
|
+
createdAt: ue(v._id),
|
|
67
|
+
ref: v.ref || "",
|
|
68
|
+
remark: v.remark || "",
|
|
69
|
+
buyer: P,
|
|
70
|
+
supplier: E,
|
|
71
|
+
items: Y,
|
|
72
|
+
status: v.status,
|
|
73
73
|
deliveryOrders: m
|
|
74
74
|
}, o = new URL(window.location.href);
|
|
75
|
-
o.pathname = o.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(
|
|
75
|
+
o.pathname = o.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(U)), window.open(o.href, "_blank", "noreferrer");
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const W = {
|
|
78
78
|
submitRequest: {
|
|
79
79
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
80
80
|
color: "text-fm-color-typo-primary",
|
|
81
|
-
value:
|
|
81
|
+
value: S.enum.submitRequest
|
|
82
82
|
},
|
|
83
83
|
confirmDraft: {
|
|
84
84
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
85
85
|
color: "text-fm-color-typo-primary",
|
|
86
|
-
value:
|
|
86
|
+
value: S.enum.confirmDraft
|
|
87
87
|
},
|
|
88
88
|
cancelDraft: {
|
|
89
89
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
90
90
|
color: "text-fm-color-typo-error",
|
|
91
|
-
value:
|
|
91
|
+
value: S.enum.cancelDraft
|
|
92
92
|
},
|
|
93
93
|
approveRequest: {
|
|
94
94
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
95
95
|
color: "text-fm-color-typo-primary",
|
|
96
|
-
value:
|
|
96
|
+
value: S.enum.approveRequest
|
|
97
97
|
},
|
|
98
98
|
rejectRequest: {
|
|
99
99
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
100
100
|
color: "text-fm-color-typo-error",
|
|
101
|
-
value:
|
|
101
|
+
value: S.enum.rejectRequest
|
|
102
102
|
},
|
|
103
103
|
processRequest: {
|
|
104
104
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
105
105
|
color: "text-fm-color-typo-primary",
|
|
106
|
-
value:
|
|
106
|
+
value: S.enum.processRequest
|
|
107
107
|
},
|
|
108
108
|
receiveStock: {
|
|
109
109
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
110
110
|
color: "text-fm-color-typo-primary",
|
|
111
|
-
value:
|
|
111
|
+
value: S.enum.receiveStock
|
|
112
112
|
},
|
|
113
113
|
completeReceive: {
|
|
114
114
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
115
115
|
color: "text-fm-color-typo-primary",
|
|
116
|
-
value:
|
|
116
|
+
value: S.enum.completeReceive
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
function
|
|
120
|
-
const
|
|
119
|
+
function ds(v, C) {
|
|
120
|
+
const y = Ne(), { t: a } = xe();
|
|
121
121
|
function I(o) {
|
|
122
122
|
switch (o.status) {
|
|
123
123
|
case "DRAFT":
|
|
124
124
|
return [
|
|
125
|
-
o.supplier.internal === "restaurant" || o.supplier.internal === "warehouse" ?
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
o.supplier.internal === "restaurant" || o.supplier.internal === "warehouse" ? W[S.enum.submitRequest] : W[S.enum.confirmDraft],
|
|
126
|
+
W[S.enum.cancelDraft],
|
|
127
|
+
k[h.Update],
|
|
128
|
+
k[h.Details],
|
|
129
|
+
k[h.Print]
|
|
130
130
|
];
|
|
131
131
|
case "RECEIVING":
|
|
132
132
|
return [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
W[S.enum.completeReceive],
|
|
134
|
+
k[h.Update],
|
|
135
|
+
k[h.Details],
|
|
136
|
+
k[h.Print]
|
|
137
137
|
];
|
|
138
138
|
case "REQUESTING":
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
return v === "receive/request" ? [
|
|
140
|
+
k[h.Update],
|
|
141
|
+
k[h.Details],
|
|
142
|
+
k[h.Print]
|
|
143
143
|
] : [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
W[S.enum.approveRequest],
|
|
145
|
+
W[S.enum.rejectRequest],
|
|
146
|
+
k[h.Details],
|
|
147
|
+
k[h.Print]
|
|
148
148
|
];
|
|
149
149
|
case "PROCESSING":
|
|
150
|
-
return [
|
|
150
|
+
return [k[h.Details], k[h.Print]];
|
|
151
151
|
case "COMPLETE":
|
|
152
152
|
return [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
k[h.Update],
|
|
154
|
+
k[h.Details],
|
|
155
|
+
k[h.Print]
|
|
156
156
|
];
|
|
157
157
|
case "CANCEL":
|
|
158
158
|
default:
|
|
159
|
-
return [
|
|
159
|
+
return [k[h.Details], k[h.Print]];
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
return Object.values(
|
|
162
|
+
function P(o) {
|
|
163
|
+
return Object.values(S.enum).includes(o);
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
165
|
+
async function E(o, i, l) {
|
|
166
166
|
var j, se;
|
|
167
|
-
const u =
|
|
168
|
-
if (o ===
|
|
169
|
-
|
|
167
|
+
const u = Ee(i);
|
|
168
|
+
if (o === h.Print) {
|
|
169
|
+
He(u, y.currentLocation);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (o ===
|
|
172
|
+
if (o === h.Details) {
|
|
173
173
|
C.promptShowTransferDetails(u, l);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
if (o ===
|
|
176
|
+
if (o === h.Update) {
|
|
177
177
|
(j = C.promptUpdateTransferDialog) == null || j.call(C, u);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
180
|
+
if (P(o)) {
|
|
181
181
|
C.submitAction(i, o, (se = l == null ? void 0 : l.to) == null ? void 0 : se.dbName);
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Y() {
|
|
186
186
|
return [
|
|
187
187
|
{
|
|
188
188
|
accessorKey: "seqNumber",
|
|
@@ -245,7 +245,7 @@ function vs(f, C) {
|
|
|
245
245
|
id: "action",
|
|
246
246
|
cell(o) {
|
|
247
247
|
const i = o.row.original, l = I(i);
|
|
248
|
-
return
|
|
248
|
+
return he(l, (u) => E(u, i));
|
|
249
249
|
},
|
|
250
250
|
enableSorting: !1,
|
|
251
251
|
size: 40,
|
|
@@ -315,9 +315,9 @@ function vs(f, C) {
|
|
|
315
315
|
id: "action",
|
|
316
316
|
cell(o) {
|
|
317
317
|
const i = o.row.original, l = i.purchaseOrder ? I(i.purchaseOrder) : [];
|
|
318
|
-
return
|
|
318
|
+
return he(
|
|
319
319
|
l,
|
|
320
|
-
(u) => i.purchaseOrder ?
|
|
320
|
+
(u) => i.purchaseOrder ? E(u, i.purchaseOrder, i) : void 0
|
|
321
321
|
);
|
|
322
322
|
},
|
|
323
323
|
enableSorting: !1,
|
|
@@ -329,62 +329,62 @@ function vs(f, C) {
|
|
|
329
329
|
}
|
|
330
330
|
];
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const U = z(() => v === "receive/request" ? Y() : m());
|
|
333
333
|
return {
|
|
334
334
|
get columnDefs() {
|
|
335
|
-
return
|
|
335
|
+
return U.value;
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const ze = { class: "flex flex-col gap-16 w-full h-full" }, Ye = { class: "flex justify-between" }, Qe = { class: "fm-typo-en-body-lg-600" }, Je = { class: "flex flex-col gap-8" }, We = { class: "flex flex-col gap-4" }, Xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ze = { class: "flex gap-1" }, et = { class: "fm-typo-en-body-lg-600" }, tt = {
|
|
340
340
|
key: 0,
|
|
341
341
|
class: "flex flex-col gap-4"
|
|
342
|
-
},
|
|
342
|
+
}, st = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = { class: "fm-typo-en-body-lg-600" }, at = { class: "flex flex-col gap-4" }, nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "fm-typo-en-body-lg-600" }, lt = {
|
|
343
343
|
key: 1,
|
|
344
344
|
class: "flex flex-col gap-4"
|
|
345
|
-
},
|
|
345
|
+
}, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "fm-typo-en-body-lg-600" }, ct = {
|
|
346
346
|
key: 2,
|
|
347
347
|
class: "flex flex-col gap-4"
|
|
348
|
-
},
|
|
348
|
+
}, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = { class: "fm-typo-en-body-lg-600" }, ft = {
|
|
349
349
|
key: 3,
|
|
350
350
|
class: "flex flex-col gap-4"
|
|
351
|
-
},
|
|
351
|
+
}, vt = { class: "fm-typo-en-body-lg-600" }, pt = {
|
|
352
352
|
key: 4,
|
|
353
353
|
class: "flex flex-col gap-4"
|
|
354
|
-
},
|
|
354
|
+
}, yt = { class: "fm-typo-en-body-lg-600" }, bt = {
|
|
355
355
|
key: 5,
|
|
356
356
|
class: "flex flex-col gap-4"
|
|
357
|
-
},
|
|
357
|
+
}, ht = { class: "fm-typo-en-body-lg-600" }, gt = {
|
|
358
358
|
key: 6,
|
|
359
359
|
class: "flex flex-col gap-4"
|
|
360
|
-
},
|
|
360
|
+
}, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _t = { class: "fm-typo-en-body-lg-600" }, Ot = {
|
|
361
361
|
key: 7,
|
|
362
362
|
class: "flex flex-col gap-4"
|
|
363
|
-
},
|
|
363
|
+
}, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kt = { class: "fm-typo-en-body-lg-600" }, St = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, qt = { class: "flex flex-col gap-8" }, Dt = { class: "fm-typo-en-body-lg-600" }, wt = { class: "flex w-full gap-4" }, At = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Ct = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Et = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Nt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Tt = {
|
|
364
364
|
key: 0,
|
|
365
365
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
366
|
-
},
|
|
366
|
+
}, Pt = {
|
|
367
367
|
key: 1,
|
|
368
368
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
369
|
-
},
|
|
369
|
+
}, Ft = {
|
|
370
370
|
key: 0,
|
|
371
371
|
class: "flex flex-col items-center gap-8 h-full"
|
|
372
|
-
},
|
|
372
|
+
}, $t = ["src"], It = { class: "fm-typo-en-body-lg-600" }, jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Mt = {
|
|
373
373
|
key: 1,
|
|
374
374
|
class: "px-4 flex flex-col"
|
|
375
|
-
},
|
|
375
|
+
}, Lt = { class: "flex gap-12 content-stretch" }, Ut = {
|
|
376
376
|
class: "flex flex-col w-24",
|
|
377
377
|
name: "circles"
|
|
378
|
-
},
|
|
378
|
+
}, Kt = { class: "flex-1 flex flex-col items-center" }, Vt = { class: "flex-1 flex flex-col items-center" }, Bt = {
|
|
379
379
|
class: "py-12 flex flex-col gap-4",
|
|
380
380
|
name: "received-at header"
|
|
381
|
-
},
|
|
381
|
+
}, Gt = { class: "fm-typo-en-body-lg-400" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zt = { class: "flex gap-12 content-stretch" }, Yt = {
|
|
382
382
|
class: "flex flex-col w-24",
|
|
383
383
|
name: "circles"
|
|
384
|
-
},
|
|
384
|
+
}, Qt = { class: "flex-1 flex flex-col items-center" }, Jt = {
|
|
385
385
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
386
386
|
name: "delivery details"
|
|
387
|
-
},
|
|
387
|
+
}, Wt = { class: "flex flex-col gap-8" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Zt = { class: "flex flex-col gap-4" }, es = { class: "flex gap-8 xs:flex-col" }, ms = /* @__PURE__ */ Ae({
|
|
388
388
|
__name: "TransferDetails",
|
|
389
389
|
props: {
|
|
390
390
|
poRequest: {},
|
|
@@ -396,11 +396,11 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
396
396
|
canApprove: { type: Boolean }
|
|
397
397
|
},
|
|
398
398
|
emits: ["update:show", "submitted"],
|
|
399
|
-
setup(
|
|
400
|
-
const
|
|
399
|
+
setup(v, { emit: C }) {
|
|
400
|
+
const y = v, a = C, I = Ue(), P = Ke(), E = Fe(), Y = $e(), { t: m } = xe(), U = z(
|
|
401
401
|
() => {
|
|
402
|
-
var t, s,
|
|
403
|
-
return ((s = (t =
|
|
402
|
+
var t, s, g, f;
|
|
403
|
+
return ((s = (t = y.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : s.internal) === "restaurant" || ((f = (g = y.purchaseOrder) == null ? void 0 : g.supplier) == null ? void 0 : f.internal) === "warehouse" ? ie.TRANSFER : ie.PURCHASE;
|
|
404
404
|
}
|
|
405
405
|
), o = [
|
|
406
406
|
{
|
|
@@ -411,8 +411,8 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
411
411
|
label: m("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
412
412
|
value: "deliveryHistory"
|
|
413
413
|
}
|
|
414
|
-
], i = ae(o[0]), l = ae(!1), u = ae(""), j = ae(!0), se =
|
|
415
|
-
async function
|
|
414
|
+
], i = ae(o[0]), l = ae(!1), u = ae(""), j = ae(!0), se = Me(), ce = Ve(y, "show");
|
|
415
|
+
async function ke(t, s, g) {
|
|
416
416
|
u.value = s, l.value = !0, j.value = !1;
|
|
417
417
|
try {
|
|
418
418
|
await se.processPurchaseOrder(
|
|
@@ -421,83 +421,90 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
421
421
|
doc: t,
|
|
422
422
|
options: (
|
|
423
423
|
// auto receive for supplier to warehouse
|
|
424
|
-
(s ===
|
|
425
|
-
s ===
|
|
424
|
+
(s === S.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
425
|
+
s === S.enum.completeReceive) && Y.autoReceiveWarehouse ? {
|
|
426
426
|
autoReceive: !0
|
|
427
427
|
} : void 0
|
|
428
428
|
)
|
|
429
429
|
},
|
|
430
|
-
|
|
431
|
-
), await new Promise((
|
|
430
|
+
y.transferToDbName
|
|
431
|
+
), await new Promise((f) => setTimeout(f, 1e3)), P.open({
|
|
432
432
|
title: "Success",
|
|
433
|
-
message:
|
|
433
|
+
message: g,
|
|
434
434
|
type: "success"
|
|
435
435
|
}), a("update:show", !1), a("submitted");
|
|
436
|
-
} catch (
|
|
437
|
-
|
|
436
|
+
} catch (f) {
|
|
437
|
+
P.open({
|
|
438
438
|
title: "Something went wrong",
|
|
439
439
|
message: "Please try again.",
|
|
440
440
|
type: "error"
|
|
441
|
-
}), console.error("Error when submitting PO operation", s, t,
|
|
441
|
+
}), console.error("Error when submitting PO operation", s, t, f);
|
|
442
442
|
} finally {
|
|
443
443
|
u.value = "", l.value = !1, j.value = !0;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
async function
|
|
447
|
-
const s =
|
|
446
|
+
async function K(t) {
|
|
447
|
+
const s = Le[t];
|
|
448
448
|
if (!s) {
|
|
449
|
-
|
|
449
|
+
P.open({
|
|
450
450
|
title: "Something went wrong",
|
|
451
|
-
message: `Cannot process order: ${
|
|
451
|
+
message: `Cannot process order: ${Ie(t)}`,
|
|
452
452
|
type: "error"
|
|
453
453
|
});
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
const { successMessage:
|
|
456
|
+
const { successMessage: g, ...f } = s;
|
|
457
457
|
I.open({
|
|
458
|
-
title:
|
|
459
|
-
message:
|
|
460
|
-
primaryActions:
|
|
458
|
+
title: f.title,
|
|
459
|
+
message: f.message,
|
|
460
|
+
primaryActions: f.primaryActions
|
|
461
461
|
}).onPrimary(() => {
|
|
462
|
-
|
|
462
|
+
y.purchaseOrder && ke(y.purchaseOrder, t, g);
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
const
|
|
465
|
+
const Se = z(() => {
|
|
466
466
|
var t, s;
|
|
467
|
-
return ((t =
|
|
468
|
-
}),
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
return ((t = y.purchaseOrder) == null ? void 0 : t.status) === A.enum.RECEIVING || ((s = y.purchaseOrder) == null ? void 0 : s.status) === A.enum.COMPLETE;
|
|
468
|
+
}), qe = z(
|
|
469
|
+
() => {
|
|
470
|
+
var t, s, g, f;
|
|
471
|
+
return E.getLocationSubsidiary(
|
|
472
|
+
((s = (t = y.purchaseOrder) == null ? void 0 : t.netSuite) == null ? void 0 : s.subsidiary.id) || ((f = (g = y.poRequest) == null ? void 0 : g.netSuite) == null ? void 0 : f.subsidiary.id)
|
|
473
|
+
).fullName;
|
|
474
|
+
}
|
|
475
|
+
), De = z(() => {
|
|
476
|
+
var t, s, g, f, M, N;
|
|
477
|
+
return (s = (t = y.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) != null && s.length && ((f = (g = y.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (N = (M = y.purchaseOrder) == null ? void 0 : M.deliveryFullfillment) == null ? void 0 : N.map((T) => {
|
|
471
478
|
var n;
|
|
472
|
-
return (n =
|
|
479
|
+
return (n = T.netSuite) == null ? void 0 : n.refNo;
|
|
473
480
|
}).join(", ") : "-";
|
|
474
|
-
}),
|
|
475
|
-
var
|
|
476
|
-
const
|
|
477
|
-
(
|
|
478
|
-
const
|
|
479
|
-
return
|
|
481
|
+
}), we = z(() => {
|
|
482
|
+
var N, T, n;
|
|
483
|
+
const g = (((N = y.purchaseOrder) == null ? void 0 : N.deliveryOrder) ?? []).flatMap((R) => R.received ?? []).reduce(
|
|
484
|
+
(R, _) => {
|
|
485
|
+
const O = R[_.sku._id] ?? [];
|
|
486
|
+
return R[_.sku._id] = [...O, _], R;
|
|
480
487
|
},
|
|
481
488
|
{}
|
|
482
|
-
),
|
|
483
|
-
(
|
|
484
|
-
const w =
|
|
485
|
-
const D =
|
|
486
|
-
|
|
487
|
-
Math.max(
|
|
489
|
+
), f = Object.entries(g).reduce(
|
|
490
|
+
(R, [_, O]) => {
|
|
491
|
+
const w = O.reduce((p, q) => {
|
|
492
|
+
const D = Te(
|
|
493
|
+
p,
|
|
494
|
+
Math.max(p.precision, q.amount.precision)
|
|
488
495
|
);
|
|
489
|
-
return
|
|
496
|
+
return Re(D, q.amount);
|
|
490
497
|
}, de(0));
|
|
491
|
-
return
|
|
498
|
+
return R[_] = w, R;
|
|
492
499
|
},
|
|
493
500
|
{}
|
|
494
|
-
), M = ((
|
|
495
|
-
for (const
|
|
496
|
-
|
|
497
|
-
return
|
|
498
|
-
}),
|
|
499
|
-
var
|
|
500
|
-
const t = ((
|
|
501
|
+
), M = ((T = y.purchaseOrder) == null ? void 0 : T.items) ?? [];
|
|
502
|
+
for (const R of M)
|
|
503
|
+
f[n = R.sku._id] ?? (f[n] = de(0));
|
|
504
|
+
return f;
|
|
505
|
+
}), Q = z(() => {
|
|
506
|
+
var N, T;
|
|
507
|
+
const t = ((N = y.purchaseOrder) == null ? void 0 : N.deliveryOrder) ?? [], s = ((T = y.purchaseOrder) == null ? void 0 : T.deliveryFullfillment) ?? [], g = [
|
|
501
508
|
...t.map((n) => ({
|
|
502
509
|
createdAt: n.createdAt,
|
|
503
510
|
type: "grn",
|
|
@@ -509,23 +516,23 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
509
516
|
doc: n
|
|
510
517
|
}))
|
|
511
518
|
];
|
|
512
|
-
|
|
513
|
-
function
|
|
514
|
-
var
|
|
515
|
-
const
|
|
519
|
+
g.reverse().sort((n, R) => n.createdAt.localeCompare(R.createdAt));
|
|
520
|
+
function f(n) {
|
|
521
|
+
var _;
|
|
522
|
+
const R = s.findIndex((O) => O.id === n.fullfillmentId);
|
|
516
523
|
return {
|
|
517
524
|
header: "Received",
|
|
518
|
-
date:
|
|
525
|
+
date: ge(new Date(n.createdAt)),
|
|
519
526
|
info: [
|
|
520
527
|
{
|
|
521
528
|
label: "Received by",
|
|
522
|
-
values: [(
|
|
529
|
+
values: [(_ = n.createdBy) == null ? void 0 : _.name]
|
|
523
530
|
},
|
|
524
531
|
{
|
|
525
532
|
label: "Received items",
|
|
526
|
-
values: n.received.map((
|
|
533
|
+
values: n.received.map((O) => {
|
|
527
534
|
var w;
|
|
528
|
-
return `(${
|
|
535
|
+
return `(${O.sku.code}) ${O.sku.name}: ${te(O.amount, !1)} ${((w = O.measurement) == null ? void 0 : w.abbrev) ?? O.sku.unit.abbrev}`;
|
|
529
536
|
})
|
|
530
537
|
},
|
|
531
538
|
n.deliveryOrderNumber ? {
|
|
@@ -536,49 +543,49 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
536
543
|
label: "Remark",
|
|
537
544
|
values: [n.remark]
|
|
538
545
|
} : null,
|
|
539
|
-
|
|
546
|
+
R > -1 ? {
|
|
540
547
|
label: "Fulfilment",
|
|
541
|
-
values: [`${
|
|
548
|
+
values: [`${R}`]
|
|
542
549
|
} : null
|
|
543
|
-
].filter((
|
|
550
|
+
].filter((O) => O)
|
|
544
551
|
};
|
|
545
552
|
}
|
|
546
553
|
function M(n) {
|
|
547
|
-
const
|
|
554
|
+
const R = s.findIndex((_) => _.id === n.id);
|
|
548
555
|
return {
|
|
549
556
|
header: "Fulfillment",
|
|
550
|
-
date:
|
|
557
|
+
date: ge(new Date(n.createdAt)),
|
|
551
558
|
info: [
|
|
552
559
|
{
|
|
553
560
|
label: "Sequence",
|
|
554
|
-
values: [String(
|
|
561
|
+
values: [String(R + 1)]
|
|
555
562
|
},
|
|
556
563
|
{
|
|
557
564
|
label: "Receiveable items",
|
|
558
|
-
values: n.items.map((
|
|
559
|
-
var
|
|
560
|
-
return `(${
|
|
565
|
+
values: n.items.map((_) => {
|
|
566
|
+
var O;
|
|
567
|
+
return `(${_.sku.code}) ${_.sku.name}: ${te(_.amount, !1)} ${((O = _.measurement) == null ? void 0 : O.abbrev) ?? _.sku.unit.abbrev}`;
|
|
561
568
|
})
|
|
562
569
|
}
|
|
563
570
|
]
|
|
564
571
|
};
|
|
565
572
|
}
|
|
566
|
-
return
|
|
573
|
+
return g.map((n) => {
|
|
567
574
|
switch (n.type) {
|
|
568
575
|
case "grn":
|
|
569
|
-
return
|
|
576
|
+
return f(n.doc);
|
|
570
577
|
case "fulfillment":
|
|
571
578
|
return M(n.doc);
|
|
572
579
|
}
|
|
573
580
|
});
|
|
574
581
|
});
|
|
575
582
|
return (t, s) => {
|
|
576
|
-
var
|
|
577
|
-
const
|
|
578
|
-
return c(), $(
|
|
579
|
-
header: r(m)("inventory.transfer.receiveRequest.details.title") + ((
|
|
583
|
+
var _, O;
|
|
584
|
+
const g = H("FmButtonGroup"), f = H("FmChip"), M = H("FmMenuDivider"), N = H("FmCard"), T = H("FmSpacer"), n = H("FmButton"), R = H("FmSideSheet");
|
|
585
|
+
return c(), $(R, {
|
|
586
|
+
header: r(m)("inventory.transfer.receiveRequest.details.title") + ((_ = t.purchaseOrder) != null && _.seqNumber ? ` #${(O = t.purchaseOrder) == null ? void 0 : O.seqNumber}` : ""),
|
|
580
587
|
modelValue: r(ce),
|
|
581
|
-
"onUpdate:modelValue": s[9] || (s[9] = (w) =>
|
|
588
|
+
"onUpdate:modelValue": s[9] || (s[9] = (w) => Ce(ce) ? ce.value = w : null),
|
|
582
589
|
"dismiss-away": j.value,
|
|
583
590
|
"close-button": "",
|
|
584
591
|
"max-width": 500
|
|
@@ -586,166 +593,166 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
586
593
|
default: ne(() => {
|
|
587
594
|
var w;
|
|
588
595
|
return [
|
|
589
|
-
e("div",
|
|
596
|
+
e("div", ze, [
|
|
590
597
|
e("div", null, [
|
|
591
|
-
|
|
598
|
+
L(g, {
|
|
592
599
|
items: o,
|
|
593
600
|
modelValue: i.value,
|
|
594
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
601
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => i.value = p)
|
|
595
602
|
}, null, 8, ["modelValue"])
|
|
596
603
|
]),
|
|
597
|
-
i.value.value === "overview" ? (c(),
|
|
604
|
+
i.value.value === "overview" ? (c(), b(J, { key: 0 }, [
|
|
598
605
|
e("div", null, [
|
|
599
|
-
|
|
606
|
+
L(N, {
|
|
600
607
|
variant: "outlined",
|
|
601
608
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
602
609
|
}, {
|
|
603
610
|
default: ne(() => {
|
|
604
|
-
var
|
|
611
|
+
var p, q, D, V, B, G, X, Z, ee, F, me, fe, ve, pe, ye, be;
|
|
605
612
|
return [
|
|
606
|
-
e("div",
|
|
607
|
-
e("div",
|
|
613
|
+
e("div", Ye, [
|
|
614
|
+
e("div", Qe, d(r(m)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
608
615
|
e("div", null, [
|
|
609
|
-
|
|
610
|
-
label: r(m)(`inventory.transfer.status.${(
|
|
611
|
-
class: oe(`fm-status-badge fm-status-badge-${(D = (
|
|
616
|
+
L(f, {
|
|
617
|
+
label: r(m)(`inventory.transfer.status.${(p = t.purchaseOrder) == null ? void 0 : p.status}`),
|
|
618
|
+
class: oe(`fm-status-badge fm-status-badge-${(D = (q = t.purchaseOrder) == null ? void 0 : q.status) == null ? void 0 : D.toLocaleLowerCase("en-us")}`),
|
|
612
619
|
compact: ""
|
|
613
620
|
}, null, 8, ["label", "class"])
|
|
614
621
|
])
|
|
615
622
|
]),
|
|
616
|
-
|
|
617
|
-
e("div",
|
|
618
|
-
e("div",
|
|
619
|
-
e("div",
|
|
620
|
-
e("div",
|
|
623
|
+
L(M),
|
|
624
|
+
e("div", Je, [
|
|
625
|
+
e("div", We, [
|
|
626
|
+
e("div", Xe, [
|
|
627
|
+
e("div", Ze, d(r(m)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
621
628
|
]),
|
|
622
|
-
e("div",
|
|
629
|
+
e("div", et, d(r(ue)(((V = t.purchaseOrder) == null ? void 0 : V._id) ?? "")), 1)
|
|
623
630
|
]),
|
|
624
|
-
(B = t.purchaseOrder) != null && B.effectiveAt ? (c(),
|
|
625
|
-
e("div",
|
|
626
|
-
e("div",
|
|
627
|
-
])) :
|
|
628
|
-
e("div",
|
|
629
|
-
e("div",
|
|
630
|
-
e("div",
|
|
631
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
631
|
+
(B = t.purchaseOrder) != null && B.effectiveAt ? (c(), b("div", tt, [
|
|
632
|
+
e("div", st, d(r(m)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
633
|
+
e("div", rt, d(r(_e)(new Date((G = t.purchaseOrder) == null ? void 0 : G.effectiveAt))), 1)
|
|
634
|
+
])) : x("", !0),
|
|
635
|
+
e("div", at, [
|
|
636
|
+
e("div", nt, d(r(m)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
637
|
+
e("div", ot, d(r(m)(
|
|
638
|
+
`inventory.transfer.receiveRequest.details.type.${U.value.toLocaleLowerCase("en-US")}`
|
|
632
639
|
)), 1)
|
|
633
640
|
]),
|
|
634
|
-
(Z = (X = t.purchaseOrder) == null ? void 0 : X.supplier) != null && Z.name ? (c(),
|
|
635
|
-
e("div",
|
|
636
|
-
e("div",
|
|
637
|
-
])) :
|
|
638
|
-
t.transferTo ? (c(),
|
|
639
|
-
e("div",
|
|
640
|
-
e("div",
|
|
641
|
-
])) :
|
|
642
|
-
r(
|
|
641
|
+
(Z = (X = t.purchaseOrder) == null ? void 0 : X.supplier) != null && Z.name ? (c(), b("div", lt, [
|
|
642
|
+
e("div", it, d(r(m)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
643
|
+
e("div", ut, d((F = (ee = t.purchaseOrder) == null ? void 0 : ee.supplier) == null ? void 0 : F.name), 1)
|
|
644
|
+
])) : x("", !0),
|
|
645
|
+
t.transferTo ? (c(), b("div", ct, [
|
|
646
|
+
e("div", dt, d(r(m)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
647
|
+
e("div", mt, d(t.transferTo), 1)
|
|
648
|
+
])) : x("", !0),
|
|
649
|
+
r(E).isEnabled ? (c(), b("div", ft, [
|
|
643
650
|
s[10] || (s[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
|
|
644
|
-
e("div",
|
|
645
|
-
])) :
|
|
646
|
-
r(
|
|
651
|
+
e("div", vt, d(qe.value), 1)
|
|
652
|
+
])) : x("", !0),
|
|
653
|
+
r(E).isEnabled ? (c(), b("div", pt, [
|
|
647
654
|
s[11] || (s[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order ", -1)),
|
|
648
|
-
e("div",
|
|
649
|
-
])) :
|
|
650
|
-
r(
|
|
655
|
+
e("div", yt, d(((fe = (me = t.purchaseOrder) == null ? void 0 : me.netSuite) == null ? void 0 : fe.id) || ((pe = (ve = t.poRequest) == null ? void 0 : ve.netSuite) == null ? void 0 : pe.id) || "-"), 1)
|
|
656
|
+
])) : x("", !0),
|
|
657
|
+
r(E).isEnabled ? (c(), b("div", bt, [
|
|
651
658
|
s[12] || (s[12] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Fulfilment IDs ", -1)),
|
|
652
|
-
e("div",
|
|
653
|
-
])) :
|
|
654
|
-
(
|
|
655
|
-
e("div",
|
|
656
|
-
e("div",
|
|
657
|
-
])) :
|
|
658
|
-
(
|
|
659
|
-
e("div",
|
|
660
|
-
e("div",
|
|
661
|
-
])) :
|
|
659
|
+
e("div", ht, d(De.value), 1)
|
|
660
|
+
])) : x("", !0),
|
|
661
|
+
(ye = t.purchaseOrder) != null && ye.ref ? (c(), b("div", gt, [
|
|
662
|
+
e("div", Rt, d(r(m)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
663
|
+
e("div", _t, d(t.purchaseOrder.ref), 1)
|
|
664
|
+
])) : x("", !0),
|
|
665
|
+
(be = t.purchaseOrder) != null && be.remark ? (c(), b("div", Ot, [
|
|
666
|
+
e("div", xt, d(r(m)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
667
|
+
e("div", kt, d(t.purchaseOrder.remark), 1)
|
|
668
|
+
])) : x("", !0)
|
|
662
669
|
])
|
|
663
670
|
];
|
|
664
671
|
}),
|
|
665
672
|
_: 1
|
|
666
673
|
})
|
|
667
674
|
]),
|
|
668
|
-
e("div",
|
|
669
|
-
e("div",
|
|
670
|
-
e("div",
|
|
671
|
-
(c(!0),
|
|
672
|
-
key:
|
|
675
|
+
e("div", St, [
|
|
676
|
+
e("div", qt, [
|
|
677
|
+
e("div", Dt, d(Se.value ? r(m)("inventory.transfer.receiveRequest.details.receivedItems") : r(m)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
678
|
+
(c(!0), b(J, null, le(((w = t.purchaseOrder) == null ? void 0 : w.items) ?? [], (p) => (c(), b("div", {
|
|
679
|
+
key: p.code,
|
|
673
680
|
class: "flex flex-col"
|
|
674
681
|
}, [
|
|
675
|
-
e("div",
|
|
676
|
-
e("div",
|
|
677
|
-
e("div",
|
|
682
|
+
e("div", wt, [
|
|
683
|
+
e("div", At, d(p.name), 1),
|
|
684
|
+
e("div", Ct, d(r(te)(we.value[p.sku._id], !1)) + "/" + d(r(Oe)(p.quantity, p.sku.unit, p.measurement)), 1)
|
|
678
685
|
]),
|
|
679
|
-
e("div",
|
|
680
|
-
e("div",
|
|
681
|
-
|
|
686
|
+
e("div", Et, [
|
|
687
|
+
e("div", Nt, d(p.code), 1),
|
|
688
|
+
p.totalCost && r(Y).enableTotalCost ? (c(), b("div", Tt, " (" + d(r(Pe)(p.totalCost)) + ") ", 1)) : x("", !0)
|
|
682
689
|
])
|
|
683
690
|
]))), 128))
|
|
684
691
|
])
|
|
685
692
|
])
|
|
686
|
-
], 64)) :
|
|
687
|
-
i.value.value === "deliveryHistory" ? (c(),
|
|
688
|
-
|
|
689
|
-
(c(!0),
|
|
690
|
-
e("div",
|
|
691
|
-
e("div",
|
|
692
|
-
e("div",
|
|
693
|
+
], 64)) : x("", !0),
|
|
694
|
+
i.value.value === "deliveryHistory" ? (c(), b("div", Pt, [
|
|
695
|
+
Q.value.length ? (c(), b("div", Mt, [
|
|
696
|
+
(c(!0), b(J, null, le(Q.value, (p, q) => (c(), b(J, { key: q }, [
|
|
697
|
+
e("div", Lt, [
|
|
698
|
+
e("div", Ut, [
|
|
699
|
+
e("div", Kt, [
|
|
693
700
|
e("div", {
|
|
694
701
|
class: oe([
|
|
695
702
|
{
|
|
696
|
-
"bg-fm-color-primary":
|
|
697
|
-
"bg-white":
|
|
703
|
+
"bg-fm-color-primary": q !== 0,
|
|
704
|
+
"bg-white": q === 0
|
|
698
705
|
},
|
|
699
706
|
"w-[2px] h-full"
|
|
700
707
|
])
|
|
701
708
|
}, null, 2)
|
|
702
709
|
]),
|
|
703
710
|
s[13] || (s[13] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
704
|
-
e("div",
|
|
711
|
+
e("div", Vt, [
|
|
705
712
|
e("div", {
|
|
706
713
|
class: oe([
|
|
707
714
|
{
|
|
708
|
-
"bg-fm-color-primary":
|
|
709
|
-
"bg-white":
|
|
715
|
+
"bg-fm-color-primary": q < Q.value.length - 1,
|
|
716
|
+
"bg-white": q >= Q.value.length - 1
|
|
710
717
|
},
|
|
711
718
|
"w-[2px] h-full"
|
|
712
719
|
])
|
|
713
720
|
}, null, 2)
|
|
714
721
|
])
|
|
715
722
|
]),
|
|
716
|
-
e("div",
|
|
717
|
-
e("div",
|
|
718
|
-
e("div",
|
|
723
|
+
e("div", Bt, [
|
|
724
|
+
e("div", Gt, d(p.header), 1),
|
|
725
|
+
e("div", Ht, d(p.date), 1)
|
|
719
726
|
])
|
|
720
727
|
]),
|
|
721
|
-
e("div",
|
|
722
|
-
e("div",
|
|
723
|
-
e("div",
|
|
728
|
+
e("div", zt, [
|
|
729
|
+
e("div", Yt, [
|
|
730
|
+
e("div", Qt, [
|
|
724
731
|
e("div", {
|
|
725
732
|
class: oe([
|
|
726
733
|
{
|
|
727
|
-
"bg-fm-color-primary":
|
|
728
|
-
"bg-white":
|
|
734
|
+
"bg-fm-color-primary": q < Q.value.length - 1,
|
|
735
|
+
"bg-white": q >= Q.value.length - 1
|
|
729
736
|
},
|
|
730
737
|
"w-[2px] h-full"
|
|
731
738
|
])
|
|
732
739
|
}, null, 2)
|
|
733
740
|
])
|
|
734
741
|
]),
|
|
735
|
-
e("div",
|
|
736
|
-
|
|
742
|
+
e("div", Jt, [
|
|
743
|
+
L(N, {
|
|
737
744
|
variant: "outlined",
|
|
738
745
|
class: "py-12 px-16"
|
|
739
746
|
}, {
|
|
740
747
|
default: ne(() => [
|
|
741
|
-
e("div",
|
|
742
|
-
(c(!0),
|
|
748
|
+
e("div", Wt, [
|
|
749
|
+
(c(!0), b(J, null, le(p.info, (D, V) => (c(), b("div", {
|
|
743
750
|
key: V,
|
|
744
751
|
class: "flex flex-col gap-4"
|
|
745
752
|
}, [
|
|
746
|
-
e("div",
|
|
747
|
-
e("div",
|
|
748
|
-
(c(!0),
|
|
753
|
+
e("div", Xt, d(D == null ? void 0 : D.label), 1),
|
|
754
|
+
e("div", Zt, [
|
|
755
|
+
(c(!0), b(J, null, le(D == null ? void 0 : D.values, (B, G) => (c(), b("div", {
|
|
749
756
|
key: G,
|
|
750
757
|
class: "fm-typo-en-body-lg-600"
|
|
751
758
|
}, d(B), 1))), 128))
|
|
@@ -758,84 +765,84 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
758
765
|
])
|
|
759
766
|
])
|
|
760
767
|
], 64))), 128))
|
|
761
|
-
])) : (c(),
|
|
762
|
-
|
|
768
|
+
])) : (c(), b("div", Ft, [
|
|
769
|
+
L(T),
|
|
763
770
|
e("div", null, [
|
|
764
771
|
e("img", {
|
|
765
|
-
src: r(
|
|
772
|
+
src: r(Be),
|
|
766
773
|
alt: "List is empty"
|
|
767
|
-
}, null, 8,
|
|
774
|
+
}, null, 8, $t)
|
|
768
775
|
]),
|
|
769
|
-
e("div",
|
|
770
|
-
e("div",
|
|
771
|
-
|
|
772
|
-
|
|
776
|
+
e("div", It, d(r(m)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
777
|
+
e("div", jt, d(r(m)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
778
|
+
L(T),
|
|
779
|
+
L(T)
|
|
773
780
|
]))
|
|
774
|
-
])) :
|
|
781
|
+
])) : x("", !0)
|
|
775
782
|
])
|
|
776
783
|
];
|
|
777
784
|
}),
|
|
778
785
|
"side-sheet-footer": ne(() => {
|
|
779
|
-
var w,
|
|
786
|
+
var w, p, q, D, V, B, G, X, Z, ee;
|
|
780
787
|
return [
|
|
781
|
-
e("div",
|
|
782
|
-
((w = t.purchaseOrder) == null ? void 0 : w.status) === r(A).enum.DRAFT &&
|
|
788
|
+
e("div", es, [
|
|
789
|
+
((w = t.purchaseOrder) == null ? void 0 : w.status) === r(A).enum.DRAFT && U.value === r(ie).PURCHASE ? (c(), $(n, {
|
|
783
790
|
key: 0,
|
|
784
791
|
label: r(m)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
785
|
-
onClick: s[1] || (s[1] = (F) =>
|
|
792
|
+
onClick: s[1] || (s[1] = (F) => K("confirmDraft")),
|
|
786
793
|
loading: u.value === "confirmDraft",
|
|
787
794
|
disabled: u.value !== "confirmDraft" && l.value
|
|
788
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
789
|
-
((
|
|
795
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
796
|
+
((p = t.purchaseOrder) == null ? void 0 : p.status) === r(A).enum.DRAFT && U.value === r(ie).TRANSFER ? (c(), $(n, {
|
|
790
797
|
key: 1,
|
|
791
798
|
label: r(m)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
792
|
-
onClick: s[2] || (s[2] = (F) =>
|
|
799
|
+
onClick: s[2] || (s[2] = (F) => K("submitRequest")),
|
|
793
800
|
loading: u.value === "submitRequest",
|
|
794
801
|
disabled: u.value !== "submitRequest" && l.value
|
|
795
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
796
|
-
((
|
|
802
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
803
|
+
((q = t.purchaseOrder) == null ? void 0 : q.status) === r(A).enum.DRAFT ? (c(), $(n, {
|
|
797
804
|
key: 2,
|
|
798
805
|
label: r(m)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
799
|
-
onClick: s[3] || (s[3] = (F) =>
|
|
806
|
+
onClick: s[3] || (s[3] = (F) => K("cancelDraft")),
|
|
800
807
|
loading: u.value === "cancelDraft",
|
|
801
808
|
disabled: u.value !== "cancelDraft" && l.value,
|
|
802
809
|
variant: "destructive"
|
|
803
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
810
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
804
811
|
((D = t.purchaseOrder) == null ? void 0 : D.status) === r(A).enum.RECEIVING ? (c(), $(n, {
|
|
805
812
|
key: 3,
|
|
806
813
|
label: r(m)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
807
|
-
onClick: s[4] || (s[4] = (F) =>
|
|
814
|
+
onClick: s[4] || (s[4] = (F) => K("completeReceive")),
|
|
808
815
|
loading: u.value === "completeReceive",
|
|
809
816
|
disabled: u.value !== "completeReceive" && l.value
|
|
810
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
817
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
811
818
|
t.canResubmit ? (c(), $(n, {
|
|
812
819
|
key: 4,
|
|
813
820
|
label: r(m)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
|
|
814
|
-
onClick: s[5] || (s[5] = (F) =>
|
|
821
|
+
onClick: s[5] || (s[5] = (F) => K("submitRequest")),
|
|
815
822
|
loading: u.value === "submitRequest",
|
|
816
823
|
disabled: u.value !== "submitRequest" && l.value
|
|
817
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
824
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
818
825
|
(((V = t.purchaseOrder) == null ? void 0 : V.status) === r(A).enum.REQUESTING || ((B = t.purchaseOrder) == null ? void 0 : B.status) === r(A).enum.PROCESSING) && t.canApprove ? (c(), $(n, {
|
|
819
826
|
key: 5,
|
|
820
827
|
label: r(m)("inventory.transfer.approval.actions.approveRequest"),
|
|
821
|
-
onClick: s[6] || (s[6] = (F) =>
|
|
828
|
+
onClick: s[6] || (s[6] = (F) => K("approveRequest")),
|
|
822
829
|
loading: u.value === "approveRequest",
|
|
823
830
|
disabled: u.value !== "approveRequest" && l.value
|
|
824
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
831
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
825
832
|
((G = t.purchaseOrder) == null ? void 0 : G.status) === r(A).enum.REQUESTING && t.canApprove ? (c(), $(n, {
|
|
826
833
|
key: 6,
|
|
827
834
|
label: r(m)("inventory.transfer.approval.actions.rejectRequest"),
|
|
828
|
-
onClick: s[7] || (s[7] = (F) =>
|
|
835
|
+
onClick: s[7] || (s[7] = (F) => K("rejectRequest")),
|
|
829
836
|
loading: u.value === "rejectRequest",
|
|
830
837
|
disabled: u.value !== "rejectRequest" && l.value,
|
|
831
838
|
variant: "destructive"
|
|
832
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
839
|
+
}, null, 8, ["label", "loading", "disabled"])) : x("", !0),
|
|
833
840
|
((X = t.purchaseOrder) == null ? void 0 : X.status) !== r(A).enum.COMPLETE && ((Z = t.purchaseOrder) == null ? void 0 : Z.status) !== r(A).enum.CANCEL && (((ee = t.purchaseOrder) == null ? void 0 : ee.status) !== r(A).enum.REQUESTING || t.canApprove) ? (c(), $(n, {
|
|
834
841
|
key: 7,
|
|
835
842
|
label: r(m)("common.close"),
|
|
836
843
|
variant: "tertiary",
|
|
837
844
|
onClick: s[8] || (s[8] = (F) => a("update:show", !1))
|
|
838
|
-
}, null, 8, ["label"])) :
|
|
845
|
+
}, null, 8, ["label"])) : x("", !0)
|
|
839
846
|
])
|
|
840
847
|
];
|
|
841
848
|
}),
|
|
@@ -845,7 +852,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
845
852
|
}
|
|
846
853
|
});
|
|
847
854
|
export {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
855
|
+
ms as _,
|
|
856
|
+
Ge as g,
|
|
857
|
+
ds as u
|
|
851
858
|
};
|