@feedmepos/mf-inventory-portal 0.0.25-dev.44 → 0.0.25-dev.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-C-NGpd16.js → App-pkjhXf9g.js} +2 -2
- package/dist/{ApprovalView-C0oaxlyw.js → ApprovalView-1a_56XYs.js} +2 -2
- package/dist/{BindingsDialog-C4G4Phac.js → BindingsDialog-DLu9QHGD.js} +2 -2
- package/dist/{BindingsPicker-CzI4_Raq.js → BindingsPicker-DXmMOIwl.js} +1 -1
- package/dist/{BindingsTable-Dx8VBHQi.js → BindingsTable-CAUD4hZv.js} +1 -1
- package/dist/{ClosingDraftView-DrfPuD6D.js → ClosingDraftView-DdooG5iI.js} +2 -2
- package/dist/{ClosingTemplateView-BfK9K6uS.js → ClosingTemplateView-BD4XHuGK.js} +2 -2
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DHLCCxIX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CX6E3y7e.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BuilnrIJ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DMBch-HK.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bf2wbPQC.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bf416BWy.js} +1 -1
- package/dist/{IngredientGroupView-aVA6A5k0.js → IngredientGroupView-D8dTmPiL.js} +1 -1
- package/dist/{IngredientsView-D1zW6mci.js → IngredientsView-BqwnH9Ae.js} +4 -4
- package/dist/{IntegrationView-BIBziuXu.js → IntegrationView-B9ihVgaE.js} +1 -1
- package/dist/{InventoryBindingForm-B_fu7oQz.js → InventoryBindingForm-7RQ9q3SN.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DQj1d2Hq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bdmd5l0w.js} +3 -3
- package/dist/{InventoryBindingSummary-aqsG1cK7.js → InventoryBindingSummary-CSF2fzjd.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4dMmDj3.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dv-SSF1r.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C1MzPeHG.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DyDwJIAd.js} +1 -1
- package/dist/{PublishView-CvxN7h6h.js → PublishView-DZwVo4uk.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-CMHTm9wC.js → PurchaseOrderPrintPreview-CnxE4Wfw.js} +1 -1
- package/dist/{ReceiveRequestView-Cv5X-Ymx.js → ReceiveRequestView-zFdXAq6L.js} +9 -9
- package/dist/{RecipeView-DqErI85P.js → RecipeView-C2DZ6M6k.js} +3 -3
- package/dist/{StockView-CsVcHbDY.js → StockView-DFM-trvP.js} +7 -7
- package/dist/{SupplierView-Dm8FUQ_l.js → SupplierView-DHffdoW_.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BNrw0rsd.js → TransferDetails.vue_vue_type_script_setup_true_lang-DseAaTbl.js} +277 -277
- package/dist/{TransferTemplateView-DWrJYW-m.js → TransferTemplateView-CHZPysze.js} +7 -7
- package/dist/{UnitView-Cnw7nPAH.js → UnitView-Dk6PMBes.js} +3 -3
- package/dist/{WarehouseView-DlSK0ToB.js → WarehouseView-7NkgjnAg.js} +1 -1
- package/dist/{app-DrI7Noeg.js → app-1AEJE-GS.js} +391 -375
- package/dist/app.js +1 -1
- package/dist/{decimal-CTeqx_mb.js → decimal-DDfoHLmD.js} +1 -1
- package/dist/{feature-Bww95HyT.js → feature-Dpqq9nbO.js} +1 -1
- package/dist/{format-unit-display-Dlq_3ypy.js → format-unit-display-RiOciSmt.js} +2 -2
- package/dist/{index-ABCMBFWf.js → index-CKWrNwz7.js} +2 -2
- package/dist/{stock-LR5ztVLT.js → stock-Dulvtkjj.js} +1 -1
- package/dist/{supplier-CkEKjPFL.js → supplier-DAIl-nmu.js} +1 -1
- package/dist/{use-ingredient-select-dialog-xeTUKuPY.js → use-ingredient-select-dialog-C5P_xPWH.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DqL_SxfV.js → use-inventory-binding-dialog-DrwdGL7H.js} +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -6
- package/dist/{vue-i18n-q4Runf79.js → vue-i18n-uuPt2QY7.js} +120 -120
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { W as
|
|
2
|
-
import { ref as G, computed as
|
|
3
|
-
import { F as
|
|
4
|
-
import { b as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { E as
|
|
7
|
-
import { useDialog as
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
10
|
-
const n =
|
|
1
|
+
import { W as Ye, u as Re, aL as N, a5 as Xe, a7 as Je, a8 as Ze, aM as et, d as Ue, e as je, au as F, T as Ve, aN as tt, Y as xe, K as _e, i as me, aO as Ke, ac as Se, f as Le, D as Q, h as V, b as Ge, a6 as rt, ar as Be, a0 as be, ai as Me } from "./app-1AEJE-GS.js";
|
|
2
|
+
import { ref as G, computed as W, h as x, defineComponent as De, onMounted as st, unref as u, openBlock as v, createElementBlock as w, createElementVNode as s, toDisplayString as _, createCommentVNode as A, resolveComponent as re, createVNode as K, watch as at, createBlock as Z, isRef as nt, withCtx as ue, Fragment as ae, normalizeClass as ge, createTextVNode as we, renderList as ve, resolveDynamicComponent as ot } from "vue";
|
|
3
|
+
import { F as lt } from "./decimal-DDfoHLmD.js";
|
|
4
|
+
import { b as ct, u as it, f as He, P as le } from "./format-unit-display-RiOciSmt.js";
|
|
5
|
+
import { useI18n as ze } from "@feedmepos/mf-common";
|
|
6
|
+
import { E as ut } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
|
+
import { useDialog as Ae, useSnackbar as ke, useProxiedModel as dt } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as Te } from "./feature-Dpqq9nbO.js";
|
|
9
|
+
const $e = Ye((m, d) => {
|
|
10
|
+
const n = Re();
|
|
11
11
|
return {
|
|
12
12
|
async readRequests(i) {
|
|
13
13
|
const h = i ?? n.currentLocationDBName, g = `${m.inventoryBackendUrl}/${h}/purchase-request`;
|
|
@@ -53,7 +53,7 @@ const ke = Qe((m, d) => {
|
|
|
53
53
|
return await d.post(g, i);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
}),
|
|
56
|
+
}), Qe = {
|
|
57
57
|
[N.enum.confirmDraft]: {
|
|
58
58
|
primaryActions: {
|
|
59
59
|
text: "Confirm draft",
|
|
@@ -110,8 +110,8 @@ const ke = Qe((m, d) => {
|
|
|
110
110
|
message: "Purchase order will be rejected.",
|
|
111
111
|
successMessage: "Purchase order has been rejected"
|
|
112
112
|
}
|
|
113
|
-
},
|
|
114
|
-
const m =
|
|
113
|
+
}, We = () => {
|
|
114
|
+
const m = Te(), d = $e();
|
|
115
115
|
return (n) => m.enablePoOperateV2 ? d.processPurchaseOrderV2(
|
|
116
116
|
{
|
|
117
117
|
operation: n.operation,
|
|
@@ -128,31 +128,31 @@ const ke = Qe((m, d) => {
|
|
|
128
128
|
n.dbName
|
|
129
129
|
);
|
|
130
130
|
};
|
|
131
|
-
var
|
|
132
|
-
const
|
|
133
|
-
function
|
|
134
|
-
const n =
|
|
135
|
-
d != null && d.startDate && (d != null && d.endDate) ? d :
|
|
136
|
-
), y =
|
|
131
|
+
var Ne = /* @__PURE__ */ ((m) => (m.RECEIVE_REQUEST = "receive/request", m.APPROVAL = "approval", m))(Ne || {});
|
|
132
|
+
const ye = G(), Oe = G();
|
|
133
|
+
function Xr(m, d) {
|
|
134
|
+
const n = Ae(), i = Re(), h = Te(), g = ct(), k = it(), f = G(!1), c = ke(), e = $e(), o = G(new Array()), a = G(
|
|
135
|
+
d != null && d.startDate && (d != null && d.endDate) ? d : Xe()
|
|
136
|
+
), y = We(), O = W(() => {
|
|
137
137
|
const p = new Date(a.value.startDate), t = new Date(a.value.endDate);
|
|
138
138
|
return {
|
|
139
|
-
start:
|
|
140
|
-
end:
|
|
139
|
+
start: Je(p).toISOString(),
|
|
140
|
+
end: Ze(t).toISOString()
|
|
141
141
|
};
|
|
142
|
-
}), T = G(new Array()), E =
|
|
143
|
-
async function
|
|
142
|
+
}), T = G(new Array()), E = et(), H = G(null);
|
|
143
|
+
async function Y(p) {
|
|
144
144
|
function t(S) {
|
|
145
145
|
const P = {
|
|
146
|
-
mode:
|
|
146
|
+
mode: Ue.CREATE,
|
|
147
147
|
modelValue: p || void 0,
|
|
148
148
|
show: !0,
|
|
149
149
|
"onUpdate:show"(R) {
|
|
150
|
-
|
|
150
|
+
ye.value.show = R;
|
|
151
151
|
},
|
|
152
152
|
templateId: S,
|
|
153
153
|
lastClosingDate: H.value
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
ye.value = P;
|
|
156
156
|
}
|
|
157
157
|
let b;
|
|
158
158
|
h.mustUsePoTemplate && !(p != null && p.template) ? n.open({
|
|
@@ -175,22 +175,22 @@ function Wr(m, d) {
|
|
|
175
175
|
}
|
|
176
176
|
function I(p) {
|
|
177
177
|
const t = {
|
|
178
|
-
mode:
|
|
179
|
-
modelValue:
|
|
178
|
+
mode: Ue.UPDATE,
|
|
179
|
+
modelValue: je(p),
|
|
180
180
|
show: !0,
|
|
181
181
|
"onUpdate:show"(b) {
|
|
182
|
-
|
|
182
|
+
ye.value.show = b;
|
|
183
183
|
},
|
|
184
184
|
lastClosingDate: H.value
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
ye.value = t;
|
|
187
187
|
}
|
|
188
188
|
async function J() {
|
|
189
189
|
o.value = [], f.value = !0;
|
|
190
190
|
try {
|
|
191
191
|
o.value = await e.getPurchaseOrders(O.value).then((b) => b.sort((S, P) => P._id.localeCompare(S._id)));
|
|
192
192
|
const p = await E.readLastClosing(!0), t = p == null ? void 0 : p._id;
|
|
193
|
-
t && (H.value =
|
|
193
|
+
t && (H.value = tt(t)), h.mustUsePoTemplate && await k.fetchTemplates();
|
|
194
194
|
} catch {
|
|
195
195
|
c.open({
|
|
196
196
|
title: "Something went wrong",
|
|
@@ -223,7 +223,7 @@ function Wr(m, d) {
|
|
|
223
223
|
return se();
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function ce(p, t) {
|
|
227
227
|
a.value = {
|
|
228
228
|
startDate: p,
|
|
229
229
|
endDate: t
|
|
@@ -258,7 +258,7 @@ function Wr(m, d) {
|
|
|
258
258
|
try {
|
|
259
259
|
t = (await e.readRequests(
|
|
260
260
|
`${p.supplier.internal}_${p.supplier._id}`
|
|
261
|
-
)).find((
|
|
261
|
+
)).find((X) => X.purchaseOrderId === p._id);
|
|
262
262
|
} catch {
|
|
263
263
|
console.error("Error at fetching po request to check");
|
|
264
264
|
}
|
|
@@ -295,7 +295,7 @@ function Wr(m, d) {
|
|
|
295
295
|
},
|
|
296
296
|
dbName: S
|
|
297
297
|
}), await new Promise((M) => setTimeout(M, 1e3));
|
|
298
|
-
const R =
|
|
298
|
+
const R = Re().currentLocationDBName.startsWith("restaurant_");
|
|
299
299
|
t === N.enum.confirmDraft && p.effectiveAt && R ? c.open({
|
|
300
300
|
title: "Success",
|
|
301
301
|
message: `${b}. The backdate will be reflected once your POS has received this change.`,
|
|
@@ -316,11 +316,11 @@ function Wr(m, d) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
async function ee(p, t, b) {
|
|
319
|
-
const S =
|
|
319
|
+
const S = Qe[t];
|
|
320
320
|
if (!S) {
|
|
321
321
|
c.open({
|
|
322
322
|
title: "Something went wrong",
|
|
323
|
-
message: `Cannot process order: ${
|
|
323
|
+
message: `Cannot process order: ${Ve(t)}`,
|
|
324
324
|
type: "error"
|
|
325
325
|
});
|
|
326
326
|
return;
|
|
@@ -349,38 +349,38 @@ function Wr(m, d) {
|
|
|
349
349
|
const p = {
|
|
350
350
|
show: !0,
|
|
351
351
|
"onUpdate:show"(t) {
|
|
352
|
-
|
|
352
|
+
Oe.value.show = t;
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
|
-
|
|
355
|
+
Oe.value = p;
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
return {
|
|
359
359
|
purchaseOrders: o,
|
|
360
360
|
purchaseRequests: T,
|
|
361
|
-
updateDateRange:
|
|
361
|
+
updateDateRange: ce,
|
|
362
362
|
fetchData: B,
|
|
363
363
|
loading: f,
|
|
364
|
-
transferDialogProps:
|
|
365
|
-
promptCreateTransferDialog:
|
|
364
|
+
transferDialogProps: ye,
|
|
365
|
+
promptCreateTransferDialog: Y,
|
|
366
366
|
promptUpdateTransferDialog: I,
|
|
367
367
|
transferDetailsProps: r,
|
|
368
368
|
promptShowTransferDetails: q,
|
|
369
369
|
submitAction: ee,
|
|
370
|
-
xilnexImportDialogProps:
|
|
370
|
+
xilnexImportDialogProps: Oe,
|
|
371
371
|
promptUploadTransferDialog: te
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function mt(m, d) {
|
|
375
375
|
return d.reduce(
|
|
376
376
|
(i, h) => {
|
|
377
377
|
const g = h.received.find((k) => k.sku._id === m._id);
|
|
378
|
-
return g && (i =
|
|
378
|
+
return g && (i = xe(i, g.amount)), i;
|
|
379
379
|
},
|
|
380
|
-
|
|
380
|
+
lt.toPrecision(_e(0), m.unit.precision)
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function ft(m, d) {
|
|
384
384
|
const { name: n, address: i, regNo: h } = d.doc.profile, g = {
|
|
385
385
|
name: n,
|
|
386
386
|
registrationNumber: h,
|
|
@@ -400,19 +400,19 @@ function dt(m, d) {
|
|
|
400
400
|
state: m.supplier.address.state,
|
|
401
401
|
country: m.supplier.address.country
|
|
402
402
|
}, f = m.items.map((a) => {
|
|
403
|
-
const { sku: y, measurement: O } = a, T =
|
|
404
|
-
|
|
403
|
+
const { sku: y, measurement: O } = a, T = me(
|
|
404
|
+
mt(a.sku, m.deliveryOrder || []),
|
|
405
405
|
!1
|
|
406
406
|
);
|
|
407
407
|
return {
|
|
408
408
|
code: y.code,
|
|
409
409
|
description: y.name,
|
|
410
|
-
quantity:
|
|
410
|
+
quantity: He(a.quantity, y.unit, a.measurement),
|
|
411
411
|
unit: (O == null ? void 0 : O.abbrev) || y.unit.abbrev,
|
|
412
412
|
received: T
|
|
413
413
|
};
|
|
414
414
|
}), c = m.deliveryOrder.map((a) => ({
|
|
415
|
-
createdAt:
|
|
415
|
+
createdAt: Ke(new Date(a.createdAt)),
|
|
416
416
|
ref: a.deliveryOrderNumber,
|
|
417
417
|
remark: a.remark || "",
|
|
418
418
|
items: a.received.map((y) => {
|
|
@@ -420,13 +420,13 @@ function dt(m, d) {
|
|
|
420
420
|
return {
|
|
421
421
|
code: y.sku.code,
|
|
422
422
|
description: y.sku.name,
|
|
423
|
-
quantity:
|
|
423
|
+
quantity: me(y.amount),
|
|
424
424
|
unit: ((O = y.measurement) == null ? void 0 : O.abbrev) || y.sku.unit.abbrev
|
|
425
425
|
};
|
|
426
426
|
})
|
|
427
427
|
})), e = {
|
|
428
428
|
orderNumber: m.seqNumber.toString(),
|
|
429
|
-
createdAt:
|
|
429
|
+
createdAt: Se(m._id),
|
|
430
430
|
ref: m.ref || "",
|
|
431
431
|
remark: m.remark || "",
|
|
432
432
|
buyer: g,
|
|
@@ -437,7 +437,7 @@ function dt(m, d) {
|
|
|
437
437
|
}, o = new URL(window.location.href);
|
|
438
438
|
o.pathname = o.hostname.includes("inventory.feedme") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(e)), window.open(o.href, "_blank", "noreferrer");
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const de = {
|
|
441
441
|
submitRequest: {
|
|
442
442
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
443
443
|
color: "text-fm-color-typo-primary",
|
|
@@ -479,45 +479,45 @@ const me = {
|
|
|
479
479
|
value: N.enum.completeReceive
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
|
-
function
|
|
483
|
-
const { t: n } =
|
|
482
|
+
function Jr(m, d) {
|
|
483
|
+
const { t: n } = ze();
|
|
484
484
|
function i(e) {
|
|
485
485
|
switch (e.status) {
|
|
486
486
|
case "DRAFT":
|
|
487
487
|
return [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
e.supplier.internal === "restaurant" || e.supplier.internal === "warehouse" ?
|
|
491
|
-
|
|
492
|
-
|
|
488
|
+
Q[V.Update],
|
|
489
|
+
Q[V.Details],
|
|
490
|
+
e.supplier.internal === "restaurant" || e.supplier.internal === "warehouse" ? de[N.enum.submitRequest] : de[N.enum.confirmDraft],
|
|
491
|
+
de[N.enum.cancelDraft],
|
|
492
|
+
Q[V.Print]
|
|
493
493
|
];
|
|
494
494
|
case "RECEIVING":
|
|
495
495
|
return [
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
de[N.enum.completeReceive],
|
|
497
|
+
Q[V.Details],
|
|
498
|
+
Q[V.Print]
|
|
499
499
|
];
|
|
500
500
|
case "REQUESTING":
|
|
501
|
-
return m === "receive/request" ? [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
501
|
+
return m === "receive/request" ? [Q[V.Details], Q[V.Print]] : [
|
|
502
|
+
de[N.enum.approveRequest],
|
|
503
|
+
de[N.enum.rejectRequest],
|
|
504
|
+
Q[V.Details],
|
|
505
|
+
Q[V.Print]
|
|
506
506
|
];
|
|
507
507
|
case "PROCESSING":
|
|
508
|
-
return [
|
|
508
|
+
return [Q[V.Details], Q[V.Print]];
|
|
509
509
|
case "COMPLETE":
|
|
510
510
|
case "CANCEL":
|
|
511
511
|
default:
|
|
512
|
-
return [
|
|
512
|
+
return [Q[V.Details], Q[V.Print]];
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
function h(e) {
|
|
516
516
|
return Object.values(N.enum).includes(e);
|
|
517
517
|
}
|
|
518
518
|
async function g(e, o, a) {
|
|
519
|
-
var O, T, E, H,
|
|
520
|
-
const y =
|
|
519
|
+
var O, T, E, H, Y, I;
|
|
520
|
+
const y = je(o);
|
|
521
521
|
if (e === V.Print) {
|
|
522
522
|
const J = (a == null ? void 0 : a.toInventoryLocation) ?? {
|
|
523
523
|
name: "",
|
|
@@ -530,7 +530,7 @@ function Yr(m, d) {
|
|
|
530
530
|
profile: {}
|
|
531
531
|
}
|
|
532
532
|
}, se = `${((O = a == null ? void 0 : a.netSuite) == null ? void 0 : O.id) ?? ""} ${((T = a == null ? void 0 : a.netSuite) == null ? void 0 : T.refNo) ?? ""}`.trim() || `${((E = y.netSuite) == null ? void 0 : E.id) ?? ""} ${((H = y.netSuite) == null ? void 0 : H.refNo) ?? ""}`.trim();
|
|
533
|
-
y.ref = [se ? `Netsuite: (${se})` : "", y.ref].filter((B) => B).join(" "),
|
|
533
|
+
y.ref = [se ? `Netsuite: (${se})` : "", y.ref].filter((B) => B).join(" "), ft(y, J);
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
536
536
|
if (e === V.Details) {
|
|
@@ -538,7 +538,7 @@ function Yr(m, d) {
|
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
540
|
if (e === V.Update) {
|
|
541
|
-
(
|
|
541
|
+
(Y = d.promptUpdateTransferDialog) == null || Y.call(d, y);
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
544
544
|
if (h(e)) {
|
|
@@ -559,7 +559,7 @@ function Yr(m, d) {
|
|
|
559
559
|
accessorKey: "_id",
|
|
560
560
|
header: () => n("inventory.transfer.table.createdAt"),
|
|
561
561
|
cell(e) {
|
|
562
|
-
return
|
|
562
|
+
return Se(`${e.getValue()}`);
|
|
563
563
|
},
|
|
564
564
|
enableSorting: !0
|
|
565
565
|
},
|
|
@@ -609,7 +609,7 @@ function Yr(m, d) {
|
|
|
609
609
|
id: "action",
|
|
610
610
|
cell(e) {
|
|
611
611
|
const o = e.row.original, a = i(o);
|
|
612
|
-
return
|
|
612
|
+
return Le(a, (y) => g(y, o));
|
|
613
613
|
},
|
|
614
614
|
enableSorting: !1,
|
|
615
615
|
size: 40,
|
|
@@ -633,7 +633,7 @@ function Yr(m, d) {
|
|
|
633
633
|
accessorKey: "purchaseOrder._id",
|
|
634
634
|
header: () => n("inventory.transfer.table.createdAt"),
|
|
635
635
|
cell(e) {
|
|
636
|
-
return
|
|
636
|
+
return Se(`${e.getValue()}`);
|
|
637
637
|
},
|
|
638
638
|
enableSorting: !0
|
|
639
639
|
},
|
|
@@ -679,7 +679,7 @@ function Yr(m, d) {
|
|
|
679
679
|
id: "action",
|
|
680
680
|
cell(e) {
|
|
681
681
|
const o = e.row.original, a = o.purchaseOrder ? i(o.purchaseOrder) : [];
|
|
682
|
-
return
|
|
682
|
+
return Le(
|
|
683
683
|
a,
|
|
684
684
|
(y) => o.purchaseOrder ? g(y, o.purchaseOrder, o) : void 0
|
|
685
685
|
);
|
|
@@ -693,29 +693,29 @@ function Yr(m, d) {
|
|
|
693
693
|
}
|
|
694
694
|
];
|
|
695
695
|
}
|
|
696
|
-
const c =
|
|
696
|
+
const c = W(() => m === "receive/request" ? k() : f());
|
|
697
697
|
return {
|
|
698
698
|
get columnDefs() {
|
|
699
699
|
return c.value;
|
|
700
700
|
}
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
const
|
|
703
|
+
const pt = {
|
|
704
704
|
key: 0,
|
|
705
705
|
class: "flex flex-col gap-8"
|
|
706
|
-
},
|
|
706
|
+
}, vt = { class: "flex flex-col gap-4" }, yt = { class: "fm-typo-en-body-lg-600" }, ht = {
|
|
707
707
|
key: 0,
|
|
708
708
|
class: "flex flex-col gap-4"
|
|
709
|
-
},
|
|
709
|
+
}, bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "fm-typo-en-body-lg-600" }, _t = { key: 0 }, St = { key: 1 }, wt = {
|
|
710
710
|
key: 1,
|
|
711
711
|
class: "flex flex-col gap-4"
|
|
712
|
-
},
|
|
712
|
+
}, Ot = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, xt = { key: 0 }, Nt = { key: 1 }, Dt = {
|
|
713
713
|
key: 2,
|
|
714
714
|
class: "flex flex-col gap-4"
|
|
715
|
-
},
|
|
715
|
+
}, At = { class: "fm-typo-en-body-lg-600" }, kt = {
|
|
716
716
|
key: 3,
|
|
717
717
|
class: "flex flex-col gap-4"
|
|
718
|
-
},
|
|
718
|
+
}, Tt = { class: "fm-typo-en-body-lg-600" }, $t = /* @__PURE__ */ De({
|
|
719
719
|
__name: "NetSuiteInfo",
|
|
720
720
|
props: {
|
|
721
721
|
transferType: {},
|
|
@@ -726,25 +726,25 @@ const mt = {
|
|
|
726
726
|
scope: {}
|
|
727
727
|
},
|
|
728
728
|
setup(m) {
|
|
729
|
-
const d = m, n =
|
|
730
|
-
|
|
729
|
+
const d = m, n = Ge(), i = $e(), h = G(d.poRequest);
|
|
730
|
+
st(async () => {
|
|
731
731
|
var c;
|
|
732
732
|
if (!d.poRequest && ((c = d.purchaseOrder) != null && c._id)) {
|
|
733
733
|
const e = await i.getLatestPurchaseOrderRequest(d.purchaseOrder._id);
|
|
734
734
|
h.value = e;
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
const g =
|
|
737
|
+
const g = W(
|
|
738
738
|
() => {
|
|
739
739
|
var c, e, o, a, y, O;
|
|
740
740
|
return n.getSubsidiaryFullName(
|
|
741
741
|
((o = (e = (c = d.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : e.subsidiary) == null ? void 0 : o.id) || ((O = (y = (a = d.poRequest) == null ? void 0 : a.netSuite) == null ? void 0 : y.subsidiary) == null ? void 0 : O.id)
|
|
742
742
|
).fullName;
|
|
743
743
|
}
|
|
744
|
-
), k =
|
|
745
|
-
var c, e, o, a, y, O, T, E, H,
|
|
746
|
-
return (o = (e = (c = d.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : e.additionalInfo) != null && o.transactionnumber ? (O = (y = (a = d.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : y.additionalInfo) == null ? void 0 : O.transactionnumber : (H = (E = (T = h.value) == null ? void 0 : T.netSuite) == null ? void 0 : E.additionalInfo) != null && H.transactionnumber ? (J = (I = (
|
|
747
|
-
}), f =
|
|
744
|
+
), k = W(() => {
|
|
745
|
+
var c, e, o, a, y, O, T, E, H, Y, I, J;
|
|
746
|
+
return (o = (e = (c = d.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : e.additionalInfo) != null && o.transactionnumber ? (O = (y = (a = d.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : y.additionalInfo) == null ? void 0 : O.transactionnumber : (H = (E = (T = h.value) == null ? void 0 : T.netSuite) == null ? void 0 : E.additionalInfo) != null && H.transactionnumber ? (J = (I = (Y = h.value) == null ? void 0 : Y.netSuite) == null ? void 0 : I.additionalInfo) == null ? void 0 : J.transactionnumber : null;
|
|
747
|
+
}), f = W(() => {
|
|
748
748
|
var c, e, o, a, y, O;
|
|
749
749
|
return (e = (c = d.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && e.length && ((a = (o = d.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) == null ? void 0 : a.length) > 0 ? (O = (y = d.purchaseOrder) == null ? void 0 : y.deliveryFullfillment) == null ? void 0 : O.map((T) => {
|
|
750
750
|
var E;
|
|
@@ -752,39 +752,39 @@ const mt = {
|
|
|
752
752
|
}).join(", ") : "N/A";
|
|
753
753
|
});
|
|
754
754
|
return (c, e) => {
|
|
755
|
-
var o, a, y, O, T, E, H,
|
|
756
|
-
return u(n).isEnabled ? (v(), w("div",
|
|
757
|
-
s("div",
|
|
755
|
+
var o, a, y, O, T, E, H, Y, I, J, se, B, ce, r;
|
|
756
|
+
return u(n).isEnabled ? (v(), w("div", pt, [
|
|
757
|
+
s("div", vt, [
|
|
758
758
|
e[0] || (e[0] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
759
|
-
s("div",
|
|
759
|
+
s("div", yt, _(g.value || "N/A"), 1)
|
|
760
760
|
]),
|
|
761
|
-
!c.isTransferBetweenOutlets && ((o = c.purchaseOrder) == null ? void 0 : o.status) !== u(F).Enum.REQUESTING && c.scope === u(
|
|
762
|
-
s("div",
|
|
763
|
-
s("div",
|
|
764
|
-
(y = (a = c.purchaseOrder) == null ? void 0 : a.netSuite) != null && y.id ? (v(), w("span",
|
|
761
|
+
!c.isTransferBetweenOutlets && ((o = c.purchaseOrder) == null ? void 0 : o.status) !== u(F).Enum.REQUESTING && c.scope === u(Ne).RECEIVE_REQUEST ? (v(), w("div", ht, [
|
|
762
|
+
s("div", bt, " NetSuite " + _(c.transferType === u(le).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
763
|
+
s("div", gt, [
|
|
764
|
+
(y = (a = c.purchaseOrder) == null ? void 0 : a.netSuite) != null && y.id ? (v(), w("span", _t, _((T = (O = c.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : T.refNo) + " (" + _((H = (E = c.purchaseOrder) == null ? void 0 : E.netSuite) == null ? void 0 : H.id) + ") ", 1)) : (v(), w("span", St, "N/A"))
|
|
765
765
|
])
|
|
766
766
|
])) : A("", !0),
|
|
767
|
-
!c.isTransferBetweenOutlets && h.value && ((
|
|
768
|
-
s("div",
|
|
769
|
-
s("div",
|
|
770
|
-
(J = (I = h.value) == null ? void 0 : I.netSuite) != null && J.id ? (v(), w("span",
|
|
767
|
+
!c.isTransferBetweenOutlets && h.value && ((Y = c.purchaseOrder) == null ? void 0 : Y.status) === u(F).Enum.REQUESTING || c.scope === u(Ne).APPROVAL ? (v(), w("div", wt, [
|
|
768
|
+
s("div", Ot, " (Request) NetSuite " + _(c.transferType === u(le).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
769
|
+
s("div", Rt, [
|
|
770
|
+
(J = (I = h.value) == null ? void 0 : I.netSuite) != null && J.id ? (v(), w("span", xt, _((B = (se = h.value) == null ? void 0 : se.netSuite) == null ? void 0 : B.refNo) + " (" + _((r = (ce = h.value) == null ? void 0 : ce.netSuite) == null ? void 0 : r.id) + ") ", 1)) : (v(), w("span", Nt, "N/A"))
|
|
771
771
|
])
|
|
772
772
|
])) : A("", !0),
|
|
773
|
-
k.value ? (v(), w("div",
|
|
773
|
+
k.value ? (v(), w("div", Dt, [
|
|
774
774
|
e[1] || (e[1] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
775
|
-
s("div",
|
|
775
|
+
s("div", At, _(k.value), 1)
|
|
776
776
|
])) : A("", !0),
|
|
777
|
-
u(n).isEnabled && c.transferType === u(
|
|
777
|
+
u(n).isEnabled && c.transferType === u(le).TRANSFER && !c.isTransferBetweenOutlets ? (v(), w("div", kt, [
|
|
778
778
|
e[2] || (e[2] = s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
779
|
-
s("div",
|
|
779
|
+
s("div", Tt, _(f.value), 1)
|
|
780
780
|
])) : A("", !0)
|
|
781
781
|
])) : A("", !0);
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
}),
|
|
784
|
+
}), Pt = {
|
|
785
785
|
key: 0,
|
|
786
786
|
class: "flex flex-row-reverse"
|
|
787
|
-
},
|
|
787
|
+
}, qt = /* @__PURE__ */ De({
|
|
788
788
|
__name: "NetSuiteSync",
|
|
789
789
|
props: {
|
|
790
790
|
poRequest: {},
|
|
@@ -792,7 +792,7 @@ const mt = {
|
|
|
792
792
|
isTransferBetweenOutlets: { type: Boolean }
|
|
793
793
|
},
|
|
794
794
|
setup(m) {
|
|
795
|
-
const d = m, n =
|
|
795
|
+
const d = m, n = Ge(), i = ke(), h = Ae(), g = G(!1), k = W(() => {
|
|
796
796
|
var a, y, O, T;
|
|
797
797
|
let c = !0;
|
|
798
798
|
n.isEnabled || (c = !1);
|
|
@@ -850,7 +850,7 @@ const mt = {
|
|
|
850
850
|
}
|
|
851
851
|
return (c, e) => {
|
|
852
852
|
const o = re("FmButton");
|
|
853
|
-
return k.value ? (v(), w("div",
|
|
853
|
+
return k.value ? (v(), w("div", Pt, [
|
|
854
854
|
K(o, {
|
|
855
855
|
"prepend-icon": "sync",
|
|
856
856
|
variant: "secondary",
|
|
@@ -864,49 +864,49 @@ const mt = {
|
|
|
864
864
|
])) : A("", !0);
|
|
865
865
|
};
|
|
866
866
|
}
|
|
867
|
-
}),
|
|
867
|
+
}), Et = { class: "flex flex-col gap-16 w-full h-full" }, Ct = { class: "flex justify-between" }, It = { class: "fm-typo-en-body-lg-600" }, Ft = { class: "flex flex-col gap-8" }, Ut = { class: "flex flex-col gap-4" }, Lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bt = { class: "flex gap-1" }, Mt = { class: "fm-typo-en-body-lg-600" }, jt = {
|
|
868
868
|
key: 0,
|
|
869
869
|
class: "flex flex-col gap-4"
|
|
870
|
-
},
|
|
870
|
+
}, Vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600" }, Gt = { class: "flex flex-col gap-4" }, Ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zt = { class: "fm-typo-en-body-lg-600" }, Qt = {
|
|
871
871
|
key: 1,
|
|
872
872
|
class: "flex flex-col gap-4"
|
|
873
|
-
},
|
|
873
|
+
}, Wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600" }, Xt = {
|
|
874
874
|
key: 2,
|
|
875
875
|
class: "flex flex-col gap-4"
|
|
876
|
-
},
|
|
876
|
+
}, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zt = { class: "fm-typo-en-body-lg-600" }, er = {
|
|
877
877
|
key: 3,
|
|
878
878
|
class: "flex flex-col gap-4"
|
|
879
|
-
},
|
|
879
|
+
}, tr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rr = { class: "fm-typo-en-body-lg-600" }, sr = {
|
|
880
880
|
key: 4,
|
|
881
881
|
class: "flex flex-col gap-4"
|
|
882
|
-
},
|
|
882
|
+
}, ar = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nr = { class: "fm-typo-en-body-lg-600" }, or = {
|
|
883
883
|
key: 0,
|
|
884
884
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
885
|
-
},
|
|
885
|
+
}, lr = { class: "flex gap-8 items-center" }, cr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ir = { class: "flex flex-col gap-8" }, ur = { class: "flex gap-8 items-center" }, dr = { class: "flex-1 fm-typo-en-body-lg-600" }, mr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, fr = { class: "flex w-full gap-4" }, pr = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, vr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, yr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, hr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, br = {
|
|
886
886
|
key: 0,
|
|
887
887
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
888
|
-
},
|
|
888
|
+
}, gr = { class: "py-8" }, _r = { class: "flex justify-end gap-4 items-center" }, Sr = { class: "fm-typo-en-body-lg-600" }, wr = {
|
|
889
889
|
key: 1,
|
|
890
890
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
891
|
-
},
|
|
891
|
+
}, Or = {
|
|
892
892
|
key: 0,
|
|
893
893
|
class: "flex flex-col items-center gap-8 h-full"
|
|
894
|
-
},
|
|
894
|
+
}, Rr = ["src"], xr = { class: "fm-typo-en-body-lg-600" }, Nr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Dr = {
|
|
895
895
|
key: 1,
|
|
896
896
|
class: "px-4 flex flex-col"
|
|
897
|
-
},
|
|
897
|
+
}, Ar = { class: "flex gap-12 content-stretch" }, kr = {
|
|
898
898
|
class: "flex flex-col w-24",
|
|
899
899
|
name: "circles"
|
|
900
|
-
},
|
|
900
|
+
}, Tr = { class: "flex-1 flex flex-col items-center" }, $r = { class: "flex-1 flex flex-col items-center" }, Pr = {
|
|
901
901
|
class: "py-12 flex flex-col gap-4",
|
|
902
902
|
name: "received-at header"
|
|
903
|
-
},
|
|
903
|
+
}, qr = { class: "fm-typo-en-body-lg-400" }, Er = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Cr = { class: "flex gap-12 content-stretch" }, Ir = {
|
|
904
904
|
class: "flex flex-col w-24",
|
|
905
905
|
name: "circles"
|
|
906
|
-
},
|
|
906
|
+
}, Fr = { class: "flex-1 flex flex-col items-center" }, Ur = {
|
|
907
907
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
908
908
|
name: "delivery details"
|
|
909
|
-
},
|
|
909
|
+
}, Lr = { class: "flex flex-col gap-8" }, Br = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Mr = { class: "flex flex-col gap-4" }, jr = { class: "flex gap-8 xs:flex-col" }, Zr = /* @__PURE__ */ De({
|
|
910
910
|
__name: "TransferDetails",
|
|
911
911
|
props: {
|
|
912
912
|
poRequest: {},
|
|
@@ -920,15 +920,15 @@ const mt = {
|
|
|
920
920
|
},
|
|
921
921
|
emits: ["update:show", "submitted"],
|
|
922
922
|
setup(m, { emit: d }) {
|
|
923
|
-
const n = m, i = d, h =
|
|
923
|
+
const n = m, i = d, h = Ae(), g = ke(), k = Te(), { t: f } = ze(), c = W(
|
|
924
924
|
() => {
|
|
925
925
|
var r, l, q, $;
|
|
926
|
-
return ((l = (r = n.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : l.internal) === "restaurant" || (($ = (q = n.purchaseOrder) == null ? void 0 : q.supplier) == null ? void 0 : $.internal) === "warehouse" ?
|
|
926
|
+
return ((l = (r = n.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : l.internal) === "restaurant" || (($ = (q = n.purchaseOrder) == null ? void 0 : q.supplier) == null ? void 0 : $.internal) === "warehouse" ? le.TRANSFER : le.PURCHASE;
|
|
927
927
|
}
|
|
928
|
-
), e =
|
|
928
|
+
), e = W(() => {
|
|
929
929
|
var r, l, q;
|
|
930
|
-
return c.value ===
|
|
931
|
-
}), o = G(!1), a = G(""), y = G(!0), O =
|
|
930
|
+
return c.value === le.TRANSFER && ((r = n.transferToDbName) == null ? void 0 : r.startsWith("restaurant")) && ((q = (l = n.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : q.internal) === "restaurant";
|
|
931
|
+
}), o = G(!1), a = G(""), y = G(!0), O = dt(n, "show"), T = W(() => [
|
|
932
932
|
{
|
|
933
933
|
label: f("inventory.transfer.receiveRequest.details.overview"),
|
|
934
934
|
value: "overview"
|
|
@@ -937,14 +937,14 @@ const mt = {
|
|
|
937
937
|
label: f("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
938
938
|
value: "deliveryHistory"
|
|
939
939
|
}
|
|
940
|
-
]), E = G(T.value[0]), H =
|
|
941
|
-
|
|
940
|
+
]), E = G(T.value[0]), H = We();
|
|
941
|
+
at(
|
|
942
942
|
() => n.show,
|
|
943
943
|
(r) => {
|
|
944
944
|
r && (E.value = T.value[0]);
|
|
945
945
|
}
|
|
946
946
|
);
|
|
947
|
-
async function
|
|
947
|
+
async function Y(r, l, q) {
|
|
948
948
|
a.value = `${l}`, o.value = !0, y.value = !1;
|
|
949
949
|
try {
|
|
950
950
|
await H({
|
|
@@ -991,11 +991,11 @@ const mt = {
|
|
|
991
991
|
async function I(r) {
|
|
992
992
|
if (r === N.enum.receiveStock)
|
|
993
993
|
return;
|
|
994
|
-
const l =
|
|
994
|
+
const l = Qe[r];
|
|
995
995
|
if (!l) {
|
|
996
996
|
g.open({
|
|
997
997
|
title: "Something went wrong",
|
|
998
|
-
message: `Cannot process order: ${
|
|
998
|
+
message: `Cannot process order: ${Ve(r)}`,
|
|
999
999
|
type: "error"
|
|
1000
1000
|
});
|
|
1001
1001
|
return;
|
|
@@ -1006,13 +1006,13 @@ const mt = {
|
|
|
1006
1006
|
message: $.message,
|
|
1007
1007
|
primaryActions: $.primaryActions
|
|
1008
1008
|
}).onPrimary(() => {
|
|
1009
|
-
n.purchaseOrder &&
|
|
1009
|
+
n.purchaseOrder && Y(n.purchaseOrder, r, q);
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
|
-
const J =
|
|
1012
|
+
const J = W(() => {
|
|
1013
1013
|
var r, l;
|
|
1014
1014
|
return ((r = n.purchaseOrder) == null ? void 0 : r.status) === F.enum.RECEIVING || ((l = n.purchaseOrder) == null ? void 0 : l.status) === F.enum.COMPLETE;
|
|
1015
|
-
}), se =
|
|
1015
|
+
}), se = W(() => {
|
|
1016
1016
|
var te, p, t;
|
|
1017
1017
|
const q = (((te = n.purchaseOrder) == null ? void 0 : te.deliveryOrder) ?? []).flatMap((b) => b.received ?? []).reduce(
|
|
1018
1018
|
(b, S) => {
|
|
@@ -1023,20 +1023,20 @@ const mt = {
|
|
|
1023
1023
|
), $ = Object.entries(q).reduce(
|
|
1024
1024
|
(b, [S, P]) => {
|
|
1025
1025
|
const R = P.reduce((M, U) => {
|
|
1026
|
-
const
|
|
1026
|
+
const X = rt(
|
|
1027
1027
|
M,
|
|
1028
1028
|
Math.max(M.precision, U.amount.precision)
|
|
1029
1029
|
);
|
|
1030
|
-
return
|
|
1031
|
-
},
|
|
1030
|
+
return xe(X, U.amount);
|
|
1031
|
+
}, _e(0));
|
|
1032
1032
|
return b[S] = R, b;
|
|
1033
1033
|
},
|
|
1034
1034
|
{}
|
|
1035
1035
|
), ee = ((p = n.purchaseOrder) == null ? void 0 : p.items) ?? [];
|
|
1036
1036
|
for (const b of ee)
|
|
1037
|
-
$[t = b.sku._id] ?? ($[t] =
|
|
1037
|
+
$[t = b.sku._id] ?? ($[t] = _e(0));
|
|
1038
1038
|
return $;
|
|
1039
|
-
}), B =
|
|
1039
|
+
}), B = W(() => {
|
|
1040
1040
|
var te, p;
|
|
1041
1041
|
const r = ((te = n.purchaseOrder) == null ? void 0 : te.deliveryOrder) ?? [], l = ((p = n.purchaseOrder) == null ? void 0 : p.deliveryFullfillment) ?? [], q = [
|
|
1042
1042
|
...r.map((t) => ({
|
|
@@ -1052,11 +1052,11 @@ const mt = {
|
|
|
1052
1052
|
];
|
|
1053
1053
|
q.reverse().sort((t, b) => t.createdAt.localeCompare(b.createdAt));
|
|
1054
1054
|
function $(t) {
|
|
1055
|
-
var S, P, R, M, U,
|
|
1055
|
+
var S, P, R, M, U, X, ne;
|
|
1056
1056
|
const b = l.findIndex((L) => L.id === t.fullfillmentId);
|
|
1057
1057
|
return {
|
|
1058
1058
|
header: "Received",
|
|
1059
|
-
date:
|
|
1059
|
+
date: Me(new Date(t.createdAt)),
|
|
1060
1060
|
info: [
|
|
1061
1061
|
{
|
|
1062
1062
|
label: "Received by",
|
|
@@ -1065,7 +1065,7 @@ const mt = {
|
|
|
1065
1065
|
{
|
|
1066
1066
|
label: "Received items",
|
|
1067
1067
|
values: t.received.map((L) => {
|
|
1068
|
-
var
|
|
1068
|
+
var oe;
|
|
1069
1069
|
return x("div", [
|
|
1070
1070
|
x(
|
|
1071
1071
|
"div",
|
|
@@ -1112,14 +1112,14 @@ const mt = {
|
|
|
1112
1112
|
{
|
|
1113
1113
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1114
1114
|
},
|
|
1115
|
-
|
|
1115
|
+
me(L.amount, !1)
|
|
1116
1116
|
),
|
|
1117
1117
|
x(
|
|
1118
1118
|
"span",
|
|
1119
1119
|
{
|
|
1120
1120
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1121
1121
|
},
|
|
1122
|
-
((
|
|
1122
|
+
((oe = L.measurement) == null ? void 0 : oe.abbrev) ?? L.sku.unit.abbrev
|
|
1123
1123
|
)
|
|
1124
1124
|
]
|
|
1125
1125
|
),
|
|
@@ -1128,7 +1128,7 @@ const mt = {
|
|
|
1128
1128
|
{
|
|
1129
1129
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1130
1130
|
},
|
|
1131
|
-
`${L.cost ? `(${
|
|
1131
|
+
`${L.cost ? `(${be(L.cost)})` : ""}`
|
|
1132
1132
|
)
|
|
1133
1133
|
]
|
|
1134
1134
|
)
|
|
@@ -1153,9 +1153,9 @@ const mt = {
|
|
|
1153
1153
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1154
1154
|
values: [(U = (M = l[b]) == null ? void 0 : M.netSuite) == null ? void 0 : U.refNo]
|
|
1155
1155
|
} : null,
|
|
1156
|
-
(
|
|
1156
|
+
(X = t == null ? void 0 : t.netSuite) != null && X.refNo ? {
|
|
1157
1157
|
label: "Item receipt (Netsuite)",
|
|
1158
|
-
values: [(
|
|
1158
|
+
values: [(ne = t == null ? void 0 : t.netSuite) == null ? void 0 : ne.refNo]
|
|
1159
1159
|
} : null
|
|
1160
1160
|
].filter((L) => L)
|
|
1161
1161
|
};
|
|
@@ -1165,7 +1165,7 @@ const mt = {
|
|
|
1165
1165
|
const b = l.findIndex((R) => R.id === t.id);
|
|
1166
1166
|
return {
|
|
1167
1167
|
header: "Fulfillment",
|
|
1168
|
-
date:
|
|
1168
|
+
date: Me(new Date(t.createdAt)),
|
|
1169
1169
|
info: [
|
|
1170
1170
|
{
|
|
1171
1171
|
label: "Sequence",
|
|
@@ -1221,7 +1221,7 @@ const mt = {
|
|
|
1221
1221
|
{
|
|
1222
1222
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1223
1223
|
},
|
|
1224
|
-
|
|
1224
|
+
me(R.amount, !1)
|
|
1225
1225
|
),
|
|
1226
1226
|
x(
|
|
1227
1227
|
"span",
|
|
@@ -1237,7 +1237,7 @@ const mt = {
|
|
|
1237
1237
|
{
|
|
1238
1238
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1239
1239
|
},
|
|
1240
|
-
`${R.cost ? `(${
|
|
1240
|
+
`${R.cost ? `(${be(R.cost)})` : ""}`
|
|
1241
1241
|
)
|
|
1242
1242
|
]
|
|
1243
1243
|
)
|
|
@@ -1261,15 +1261,15 @@ const mt = {
|
|
|
1261
1261
|
return ee(t.doc);
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
|
-
}),
|
|
1264
|
+
}), ce = W(() => {
|
|
1265
1265
|
var l;
|
|
1266
1266
|
const r = {
|
|
1267
|
-
...
|
|
1268
|
-
currency:
|
|
1267
|
+
..._e(0),
|
|
1268
|
+
currency: Be()
|
|
1269
1269
|
};
|
|
1270
1270
|
return ((l = n.purchaseOrder) == null ? void 0 : l.items.reduce((q, $) => ({
|
|
1271
|
-
...
|
|
1272
|
-
currency:
|
|
1271
|
+
...xe(q, $.totalCost ?? r),
|
|
1272
|
+
currency: Be()
|
|
1273
1273
|
}), r)) ?? r;
|
|
1274
1274
|
});
|
|
1275
1275
|
return (r, l) => {
|
|
@@ -1278,15 +1278,15 @@ const mt = {
|
|
|
1278
1278
|
return v(), Z(P, {
|
|
1279
1279
|
header: u(f)("inventory.transfer.receiveRequest.details.title") + ((R = r.purchaseOrder) != null && R.seqNumber ? ` #${(M = r.purchaseOrder) == null ? void 0 : M.seqNumber}` : ""),
|
|
1280
1280
|
modelValue: u(O),
|
|
1281
|
-
"onUpdate:modelValue": l[9] || (l[9] = (U) =>
|
|
1281
|
+
"onUpdate:modelValue": l[9] || (l[9] = (U) => nt(O) ? O.value = U : null),
|
|
1282
1282
|
"dismiss-away": y.value,
|
|
1283
1283
|
"close-button": "",
|
|
1284
1284
|
"max-width": 600
|
|
1285
1285
|
}, {
|
|
1286
|
-
default:
|
|
1287
|
-
var U,
|
|
1286
|
+
default: ue(() => {
|
|
1287
|
+
var U, X, ne, L, oe, fe, pe;
|
|
1288
1288
|
return [
|
|
1289
|
-
s("div",
|
|
1289
|
+
s("div", Et, [
|
|
1290
1290
|
s("div", null, [
|
|
1291
1291
|
K(q, {
|
|
1292
1292
|
items: T.value,
|
|
@@ -1294,58 +1294,58 @@ const mt = {
|
|
|
1294
1294
|
"onUpdate:modelValue": l[0] || (l[0] = (D) => E.value = D)
|
|
1295
1295
|
}, null, 8, ["items", "modelValue"])
|
|
1296
1296
|
]),
|
|
1297
|
-
E.value.value === "overview" ? (v(), w(
|
|
1297
|
+
E.value.value === "overview" ? (v(), w(ae, { key: 0 }, [
|
|
1298
1298
|
s("div", null, [
|
|
1299
1299
|
K(te, {
|
|
1300
1300
|
variant: "outlined",
|
|
1301
1301
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1302
1302
|
}, {
|
|
1303
|
-
default:
|
|
1304
|
-
var D, C, j,
|
|
1303
|
+
default: ue(() => {
|
|
1304
|
+
var D, C, j, z, ie, he, Pe, qe, Ee, Ce, Ie, Fe;
|
|
1305
1305
|
return [
|
|
1306
|
-
s("div",
|
|
1307
|
-
s("div",
|
|
1306
|
+
s("div", Ct, [
|
|
1307
|
+
s("div", It, _(u(f)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1308
1308
|
s("div", null, [
|
|
1309
1309
|
K($, {
|
|
1310
1310
|
label: u(f)(`inventory.transfer.status.${(D = r.purchaseOrder) == null ? void 0 : D.status}`),
|
|
1311
|
-
class:
|
|
1311
|
+
class: ge(`fm-status-badge fm-status-badge-${(j = (C = r.purchaseOrder) == null ? void 0 : C.status) == null ? void 0 : j.toLocaleLowerCase("en-us")}`),
|
|
1312
1312
|
compact: ""
|
|
1313
1313
|
}, null, 8, ["label", "class"])
|
|
1314
1314
|
])
|
|
1315
1315
|
]),
|
|
1316
1316
|
K(ee),
|
|
1317
|
-
s("div",
|
|
1318
|
-
s("div",
|
|
1319
|
-
s("div",
|
|
1320
|
-
s("div",
|
|
1317
|
+
s("div", Ft, [
|
|
1318
|
+
s("div", Ut, [
|
|
1319
|
+
s("div", Lt, [
|
|
1320
|
+
s("div", Bt, _(u(f)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1321
1321
|
]),
|
|
1322
|
-
s("div",
|
|
1322
|
+
s("div", Mt, _(u(Se)(((z = r.purchaseOrder) == null ? void 0 : z._id) ?? "")), 1)
|
|
1323
1323
|
]),
|
|
1324
|
-
(
|
|
1325
|
-
s("div",
|
|
1326
|
-
s("div",
|
|
1324
|
+
(ie = r.purchaseOrder) != null && ie.effectiveAt ? (v(), w("div", jt, [
|
|
1325
|
+
s("div", Vt, _(u(f)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1326
|
+
s("div", Kt, _(u(Ke)(new Date((he = r.purchaseOrder) == null ? void 0 : he.effectiveAt))), 1)
|
|
1327
1327
|
])) : A("", !0),
|
|
1328
|
-
s("div",
|
|
1329
|
-
s("div",
|
|
1330
|
-
s("div",
|
|
1328
|
+
s("div", Gt, [
|
|
1329
|
+
s("div", Ht, _(u(f)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1330
|
+
s("div", zt, _(u(f)(
|
|
1331
1331
|
`inventory.transfer.receiveRequest.details.type.${c.value.toLocaleLowerCase("en-US")}`
|
|
1332
1332
|
)), 1)
|
|
1333
1333
|
]),
|
|
1334
|
-
(
|
|
1335
|
-
s("div",
|
|
1336
|
-
s("div",
|
|
1334
|
+
(qe = (Pe = r.purchaseOrder) == null ? void 0 : Pe.supplier) != null && qe.name ? (v(), w("div", Qt, [
|
|
1335
|
+
s("div", Wt, _(u(f)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1336
|
+
s("div", Yt, _((Ce = (Ee = r.purchaseOrder) == null ? void 0 : Ee.supplier) == null ? void 0 : Ce.name), 1)
|
|
1337
1337
|
])) : A("", !0),
|
|
1338
|
-
r.transferTo ? (v(), w("div",
|
|
1339
|
-
s("div",
|
|
1340
|
-
s("div",
|
|
1338
|
+
r.transferTo ? (v(), w("div", Xt, [
|
|
1339
|
+
s("div", Jt, _(u(f)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1340
|
+
s("div", Zt, _(r.transferTo), 1)
|
|
1341
1341
|
])) : A("", !0),
|
|
1342
|
-
(
|
|
1343
|
-
s("div",
|
|
1344
|
-
s("div",
|
|
1342
|
+
(Ie = r.purchaseOrder) != null && Ie.ref ? (v(), w("div", er, [
|
|
1343
|
+
s("div", tr, _(u(f)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1344
|
+
s("div", rr, _(r.purchaseOrder.ref), 1)
|
|
1345
1345
|
])) : A("", !0),
|
|
1346
|
-
(
|
|
1347
|
-
s("div",
|
|
1348
|
-
s("div",
|
|
1346
|
+
(Fe = r.purchaseOrder) != null && Fe.remark ? (v(), w("div", sr, [
|
|
1347
|
+
s("div", ar, _(u(f)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1348
|
+
s("div", nr, _(r.purchaseOrder.remark), 1)
|
|
1349
1349
|
])) : A("", !0)
|
|
1350
1350
|
])
|
|
1351
1351
|
];
|
|
@@ -1353,11 +1353,11 @@ const mt = {
|
|
|
1353
1353
|
_: 1
|
|
1354
1354
|
})
|
|
1355
1355
|
]),
|
|
1356
|
-
|
|
1357
|
-
s("div",
|
|
1356
|
+
(X = (U = r.purchaseOrder) == null ? void 0 : U.netSuite) != null && X.id ? A("", !0) : (v(), w("div", or, [
|
|
1357
|
+
s("div", lr, [
|
|
1358
1358
|
l[10] || (l[10] = s("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1359
1359
|
s("div", null, [
|
|
1360
|
-
K(
|
|
1360
|
+
K(qt, {
|
|
1361
1361
|
"po-request": r.poRequest,
|
|
1362
1362
|
"purchase-order": r.purchaseOrder,
|
|
1363
1363
|
"is-transfer-between-outlets": e.value
|
|
@@ -1365,7 +1365,7 @@ const mt = {
|
|
|
1365
1365
|
])
|
|
1366
1366
|
]),
|
|
1367
1367
|
K(ee),
|
|
1368
|
-
K(
|
|
1368
|
+
K($t, {
|
|
1369
1369
|
"po-request": r.poRequest,
|
|
1370
1370
|
"purchase-order": r.purchaseOrder,
|
|
1371
1371
|
"transfer-type": c.value,
|
|
@@ -1374,35 +1374,35 @@ const mt = {
|
|
|
1374
1374
|
scope: r.scope
|
|
1375
1375
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1376
1376
|
])),
|
|
1377
|
-
s("div",
|
|
1378
|
-
s("div",
|
|
1379
|
-
s("div",
|
|
1380
|
-
s("span",
|
|
1381
|
-
|
|
1382
|
-
(
|
|
1377
|
+
s("div", cr, [
|
|
1378
|
+
s("div", ir, [
|
|
1379
|
+
s("div", ur, [
|
|
1380
|
+
s("span", dr, [
|
|
1381
|
+
we(_(J.value ? u(f)("inventory.transfer.receiveRequest.details.receivedItems") : u(f)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1382
|
+
(L = (ne = r.purchaseOrder) == null ? void 0 : ne.netSuite) != null && L.missingItems && ((fe = (oe = r.purchaseOrder) == null ? void 0 : oe.netSuite) == null ? void 0 : fe.missingItems.length) > 0 ? (v(), Z(t, {
|
|
1383
1383
|
key: 0,
|
|
1384
1384
|
variant: "rich",
|
|
1385
1385
|
placement: "top",
|
|
1386
1386
|
"z-index": 51
|
|
1387
1387
|
}, {
|
|
1388
|
-
content:
|
|
1388
|
+
content: ue(() => {
|
|
1389
1389
|
var D, C;
|
|
1390
1390
|
return [
|
|
1391
|
-
s("div",
|
|
1392
|
-
(v(!0), w(
|
|
1391
|
+
s("div", mr, [
|
|
1392
|
+
(v(!0), w(ae, null, ve((C = (D = r.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : C.missingItems, (j, z) => (v(), w("div", {
|
|
1393
1393
|
class: "flex justify-center align-middle",
|
|
1394
|
-
key:
|
|
1394
|
+
key: z
|
|
1395
1395
|
}, [
|
|
1396
1396
|
K(p, {
|
|
1397
1397
|
name: "arrow_right",
|
|
1398
1398
|
size: "sm"
|
|
1399
1399
|
}),
|
|
1400
|
-
|
|
1400
|
+
we(" " + _(`(${j.netSuiteId}) ${j.name}: ${j.reason}`), 1)
|
|
1401
1401
|
]))), 128))
|
|
1402
1402
|
])
|
|
1403
1403
|
];
|
|
1404
1404
|
}),
|
|
1405
|
-
default:
|
|
1405
|
+
default: ue(() => [
|
|
1406
1406
|
K(p, {
|
|
1407
1407
|
name: "error",
|
|
1408
1408
|
color: "#ff2c2c",
|
|
@@ -1414,41 +1414,41 @@ const mt = {
|
|
|
1414
1414
|
])
|
|
1415
1415
|
]),
|
|
1416
1416
|
K(ee),
|
|
1417
|
-
(v(!0), w(
|
|
1417
|
+
(v(!0), w(ae, null, ve(((pe = r.purchaseOrder) == null ? void 0 : pe.items) ?? [], (D) => {
|
|
1418
1418
|
var C;
|
|
1419
1419
|
return v(), w("div", {
|
|
1420
1420
|
key: D.code,
|
|
1421
1421
|
class: "flex flex-col"
|
|
1422
1422
|
}, [
|
|
1423
|
-
s("div",
|
|
1424
|
-
s("div",
|
|
1425
|
-
s("div",
|
|
1423
|
+
s("div", fr, [
|
|
1424
|
+
s("div", pr, _(D.name), 1),
|
|
1425
|
+
s("div", vr, _(u(me)(se.value[D.sku._id], !1)) + "/" + _(u(He)(D.quantity, D.sku.unit, D.measurement)), 1)
|
|
1426
1426
|
]),
|
|
1427
|
-
s("div",
|
|
1428
|
-
s("div",
|
|
1429
|
-
(C = D.totalCost) != null && C.amount && u(k).enableTotalCost ? (v(), w("div",
|
|
1427
|
+
s("div", yr, [
|
|
1428
|
+
s("div", hr, _(D.code), 1),
|
|
1429
|
+
(C = D.totalCost) != null && C.amount && u(k).enableTotalCost ? (v(), w("div", br, " (" + _(u(be)(D.totalCost)) + ") ", 1)) : A("", !0)
|
|
1430
1430
|
])
|
|
1431
1431
|
]);
|
|
1432
1432
|
}), 128)),
|
|
1433
|
-
+u(
|
|
1434
|
-
s("div",
|
|
1433
|
+
+u(me)(ce.value) ? (v(), w(ae, { key: 0 }, [
|
|
1434
|
+
s("div", gr, [
|
|
1435
1435
|
K(ee)
|
|
1436
1436
|
]),
|
|
1437
|
-
s("div",
|
|
1437
|
+
s("div", _r, [
|
|
1438
1438
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
1439
|
-
s("div",
|
|
1439
|
+
s("div", Sr, _(u(be)(ce.value)), 1)
|
|
1440
1440
|
])
|
|
1441
1441
|
], 64)) : A("", !0)
|
|
1442
1442
|
])
|
|
1443
1443
|
])
|
|
1444
|
-
], 64)) : E.value.value === "deliveryHistory" ? (v(), w("div",
|
|
1445
|
-
B.value.length ? (v(), w("div",
|
|
1446
|
-
(v(!0), w(
|
|
1447
|
-
s("div",
|
|
1448
|
-
s("div",
|
|
1449
|
-
s("div",
|
|
1444
|
+
], 64)) : E.value.value === "deliveryHistory" ? (v(), w("div", wr, [
|
|
1445
|
+
B.value.length ? (v(), w("div", Dr, [
|
|
1446
|
+
(v(!0), w(ae, null, ve(B.value, (D, C) => (v(), w(ae, { key: C }, [
|
|
1447
|
+
s("div", Ar, [
|
|
1448
|
+
s("div", kr, [
|
|
1449
|
+
s("div", Tr, [
|
|
1450
1450
|
s("div", {
|
|
1451
|
-
class:
|
|
1451
|
+
class: ge([
|
|
1452
1452
|
{
|
|
1453
1453
|
"bg-fm-color-primary": C !== 0,
|
|
1454
1454
|
"bg-white": C === 0
|
|
@@ -1458,9 +1458,9 @@ const mt = {
|
|
|
1458
1458
|
}, null, 2)
|
|
1459
1459
|
]),
|
|
1460
1460
|
l[12] || (l[12] = s("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
1461
|
-
s("div",
|
|
1461
|
+
s("div", $r, [
|
|
1462
1462
|
s("div", {
|
|
1463
|
-
class:
|
|
1463
|
+
class: ge([
|
|
1464
1464
|
{
|
|
1465
1465
|
"bg-fm-color-primary": C < B.value.length - 1,
|
|
1466
1466
|
"bg-white": C >= B.value.length - 1
|
|
@@ -1470,16 +1470,16 @@ const mt = {
|
|
|
1470
1470
|
}, null, 2)
|
|
1471
1471
|
])
|
|
1472
1472
|
]),
|
|
1473
|
-
s("div",
|
|
1474
|
-
s("div",
|
|
1475
|
-
s("div",
|
|
1473
|
+
s("div", Pr, [
|
|
1474
|
+
s("div", qr, _(D.header), 1),
|
|
1475
|
+
s("div", Er, _(D.date), 1)
|
|
1476
1476
|
])
|
|
1477
1477
|
]),
|
|
1478
|
-
s("div",
|
|
1479
|
-
s("div",
|
|
1480
|
-
s("div",
|
|
1478
|
+
s("div", Cr, [
|
|
1479
|
+
s("div", Ir, [
|
|
1480
|
+
s("div", Fr, [
|
|
1481
1481
|
s("div", {
|
|
1482
|
-
class:
|
|
1482
|
+
class: ge([
|
|
1483
1483
|
{
|
|
1484
1484
|
"bg-fm-color-primary": C < B.value.length - 1,
|
|
1485
1485
|
"bg-white": C >= B.value.length - 1
|
|
@@ -1489,26 +1489,26 @@ const mt = {
|
|
|
1489
1489
|
}, null, 2)
|
|
1490
1490
|
])
|
|
1491
1491
|
]),
|
|
1492
|
-
s("div",
|
|
1492
|
+
s("div", Ur, [
|
|
1493
1493
|
K(te, {
|
|
1494
1494
|
variant: "outlined",
|
|
1495
1495
|
class: "py-12 px-16"
|
|
1496
1496
|
}, {
|
|
1497
|
-
default:
|
|
1498
|
-
s("div",
|
|
1499
|
-
(v(!0), w(
|
|
1500
|
-
key:
|
|
1497
|
+
default: ue(() => [
|
|
1498
|
+
s("div", Lr, [
|
|
1499
|
+
(v(!0), w(ae, null, ve(D.info, (j, z) => (v(), w("div", {
|
|
1500
|
+
key: z,
|
|
1501
1501
|
class: "flex flex-col gap-4"
|
|
1502
1502
|
}, [
|
|
1503
|
-
s("div",
|
|
1504
|
-
s("div",
|
|
1505
|
-
(v(!0), w(
|
|
1506
|
-
key:
|
|
1503
|
+
s("div", Br, _(j == null ? void 0 : j.label), 1),
|
|
1504
|
+
s("div", Mr, [
|
|
1505
|
+
(v(!0), w(ae, null, ve(j == null ? void 0 : j.values, (ie, he) => (v(), w("div", {
|
|
1506
|
+
key: he,
|
|
1507
1507
|
class: "fm-typo-en-body-lg-600"
|
|
1508
1508
|
}, [
|
|
1509
|
-
typeof
|
|
1510
|
-
|
|
1511
|
-
], 64)) : (v(), Z(
|
|
1509
|
+
typeof ie == "string" ? (v(), w(ae, { key: 0 }, [
|
|
1510
|
+
we(_(ie), 1)
|
|
1511
|
+
], 64)) : (v(), Z(ot(ie), { key: 1 }))
|
|
1512
1512
|
]))), 128))
|
|
1513
1513
|
])
|
|
1514
1514
|
]))), 128))
|
|
@@ -1519,16 +1519,16 @@ const mt = {
|
|
|
1519
1519
|
])
|
|
1520
1520
|
])
|
|
1521
1521
|
], 64))), 128))
|
|
1522
|
-
])) : (v(), w("div",
|
|
1522
|
+
])) : (v(), w("div", Or, [
|
|
1523
1523
|
K(b),
|
|
1524
1524
|
s("div", null, [
|
|
1525
1525
|
s("img", {
|
|
1526
|
-
src: u(
|
|
1526
|
+
src: u(ut),
|
|
1527
1527
|
alt: "List is empty"
|
|
1528
|
-
}, null, 8,
|
|
1528
|
+
}, null, 8, Rr)
|
|
1529
1529
|
]),
|
|
1530
|
-
s("div",
|
|
1531
|
-
s("div",
|
|
1530
|
+
s("div", xr, _(u(f)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1531
|
+
s("div", Nr, _(u(f)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1532
1532
|
K(b),
|
|
1533
1533
|
K(b)
|
|
1534
1534
|
]))
|
|
@@ -1536,28 +1536,28 @@ const mt = {
|
|
|
1536
1536
|
])
|
|
1537
1537
|
];
|
|
1538
1538
|
}),
|
|
1539
|
-
"side-sheet-footer":
|
|
1540
|
-
var U,
|
|
1539
|
+
"side-sheet-footer": ue(() => {
|
|
1540
|
+
var U, X, ne, L, oe, fe, pe, D, C, j;
|
|
1541
1541
|
return [
|
|
1542
|
-
s("div",
|
|
1543
|
-
((U = r.purchaseOrder) == null ? void 0 : U.status) === u(F).enum.DRAFT && c.value === u(
|
|
1542
|
+
s("div", jr, [
|
|
1543
|
+
((U = r.purchaseOrder) == null ? void 0 : U.status) === u(F).enum.DRAFT && c.value === u(le).PURCHASE ? (v(), Z(S, {
|
|
1544
1544
|
key: 0,
|
|
1545
1545
|
label: u(f)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
1546
|
-
onClick: l[1] || (l[1] = (
|
|
1546
|
+
onClick: l[1] || (l[1] = (z) => I("confirmDraft")),
|
|
1547
1547
|
loading: a.value === "confirmDraft",
|
|
1548
1548
|
disabled: a.value !== "confirmDraft" && o.value
|
|
1549
1549
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1550
|
-
((
|
|
1550
|
+
((X = r.purchaseOrder) == null ? void 0 : X.status) === u(F).enum.DRAFT && c.value === u(le).TRANSFER ? (v(), Z(S, {
|
|
1551
1551
|
key: 1,
|
|
1552
1552
|
label: u(f)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
1553
|
-
onClick: l[2] || (l[2] = (
|
|
1553
|
+
onClick: l[2] || (l[2] = (z) => I("submitRequest")),
|
|
1554
1554
|
loading: a.value === "submitRequest",
|
|
1555
1555
|
disabled: a.value !== "submitRequest" && o.value
|
|
1556
1556
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1557
|
-
((
|
|
1557
|
+
((ne = r.purchaseOrder) == null ? void 0 : ne.status) === u(F).enum.DRAFT ? (v(), Z(S, {
|
|
1558
1558
|
key: 2,
|
|
1559
1559
|
label: u(f)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
1560
|
-
onClick: l[3] || (l[3] = (
|
|
1560
|
+
onClick: l[3] || (l[3] = (z) => I("cancelDraft")),
|
|
1561
1561
|
loading: a.value === "cancelDraft",
|
|
1562
1562
|
disabled: a.value !== "cancelDraft" && o.value,
|
|
1563
1563
|
variant: "destructive"
|
|
@@ -1565,37 +1565,37 @@ const mt = {
|
|
|
1565
1565
|
((L = r.purchaseOrder) == null ? void 0 : L.status) === u(F).enum.RECEIVING ? (v(), Z(S, {
|
|
1566
1566
|
key: 3,
|
|
1567
1567
|
label: u(f)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1568
|
-
onClick: l[4] || (l[4] = (
|
|
1568
|
+
onClick: l[4] || (l[4] = (z) => I("completeReceive")),
|
|
1569
1569
|
loading: a.value === "completeReceive",
|
|
1570
1570
|
disabled: a.value !== "completeReceive" && o.value
|
|
1571
1571
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1572
1572
|
r.canResubmit ? (v(), Z(S, {
|
|
1573
1573
|
key: 4,
|
|
1574
1574
|
label: u(f)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
|
|
1575
|
-
onClick: l[5] || (l[5] = (
|
|
1575
|
+
onClick: l[5] || (l[5] = (z) => I("submitRequest")),
|
|
1576
1576
|
loading: a.value === "submitRequest",
|
|
1577
1577
|
disabled: a.value !== "submitRequest" && o.value
|
|
1578
1578
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1579
|
-
(((
|
|
1579
|
+
(((oe = r.purchaseOrder) == null ? void 0 : oe.status) === u(F).enum.REQUESTING || ((fe = r.purchaseOrder) == null ? void 0 : fe.status) === u(F).enum.PROCESSING) && r.canApprove ? (v(), Z(S, {
|
|
1580
1580
|
key: 5,
|
|
1581
1581
|
label: u(f)("inventory.transfer.approval.actions.approveRequest"),
|
|
1582
|
-
onClick: l[6] || (l[6] = (
|
|
1582
|
+
onClick: l[6] || (l[6] = (z) => I("approveRequest")),
|
|
1583
1583
|
loading: a.value === "approveRequest",
|
|
1584
1584
|
disabled: a.value !== "approveRequest" && o.value
|
|
1585
1585
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1586
|
-
((
|
|
1586
|
+
((pe = r.purchaseOrder) == null ? void 0 : pe.status) === u(F).enum.REQUESTING && r.canApprove ? (v(), Z(S, {
|
|
1587
1587
|
key: 6,
|
|
1588
1588
|
label: u(f)("inventory.transfer.approval.actions.rejectRequest"),
|
|
1589
|
-
onClick: l[7] || (l[7] = (
|
|
1589
|
+
onClick: l[7] || (l[7] = (z) => I("rejectRequest")),
|
|
1590
1590
|
loading: a.value === "rejectRequest",
|
|
1591
1591
|
disabled: a.value !== "rejectRequest" && o.value,
|
|
1592
1592
|
variant: "destructive"
|
|
1593
1593
|
}, null, 8, ["label", "loading", "disabled"])) : A("", !0),
|
|
1594
|
-
((
|
|
1594
|
+
((D = r.purchaseOrder) == null ? void 0 : D.status) !== u(F).enum.COMPLETE && ((C = r.purchaseOrder) == null ? void 0 : C.status) !== u(F).enum.CANCEL && (((j = r.purchaseOrder) == null ? void 0 : j.status) !== u(F).enum.REQUESTING || r.canApprove) ? (v(), Z(S, {
|
|
1595
1595
|
key: 7,
|
|
1596
1596
|
label: u(f)("common.close"),
|
|
1597
1597
|
variant: "tertiary",
|
|
1598
|
-
onClick: l[8] || (l[8] = (
|
|
1598
|
+
onClick: l[8] || (l[8] = (z) => i("update:show", !1))
|
|
1599
1599
|
}, null, 8, ["label"])) : A("", !0)
|
|
1600
1600
|
])
|
|
1601
1601
|
];
|
|
@@ -1606,10 +1606,10 @@ const mt = {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
});
|
|
1608
1608
|
export {
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1609
|
+
Ne as P,
|
|
1610
|
+
Zr as _,
|
|
1611
|
+
Xr as a,
|
|
1612
|
+
Jr as b,
|
|
1613
|
+
mt as g,
|
|
1614
|
+
$e as u
|
|
1615
1615
|
};
|