@feedmepos/mf-inventory-portal 1.1.9-dev.2 → 1.2.0-dev.2
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-Bl6ZKF4W.js → App-Cn6ZbJ9V.js} +1 -1
- package/dist/{ApprovalView-FzJ8P0IL.js → ApprovalView-BEBrOuKS.js} +2 -2
- package/dist/{BindingsDialog-DGSxOWVa.js → BindingsDialog-BXTIEM-C.js} +2 -2
- package/dist/{BindingsPicker-C6FKHX3t.js → BindingsPicker-Dln1VJdF.js} +1 -1
- package/dist/{BindingsTable-CHLftqik.js → BindingsTable-DjIEJjR0.js} +1 -1
- package/dist/{ClosingDraftView-BcMFFxOs.js → ClosingDraftView-Dl53X3sQ.js} +2 -2
- package/dist/{ClosingTemplateView-CTZ0Im5J.js → ClosingTemplateView-CHjTBGjQ.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CnFrbjUj.js → DeliveryOrderPrintPreview-DuFlghMm.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Blboq4ih.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CYBgTivO.js} +3 -3
- package/dist/{FmMultiselectDialog-DlSHfTNw.js → FmMultiselectDialog-MP5_M7P7.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-iQKBGj46.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CZzBZmX6.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BPVvemT9.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-HdFYzIac.js} +1 -1
- package/dist/{IngredientGroupView--m_tFqXz.js → IngredientGroupView-WeKUyj_j.js} +2 -2
- package/dist/{IngredientsView-BJHKoWFU.js → IngredientsView-CXuBqL8l.js} +4 -4
- package/dist/{IntegrationView-D-6dYaoz.js → IntegrationView-DaXuIEsQ.js} +3 -3
- package/dist/{InventoryBindingForm-BxXRhkoy.js → InventoryBindingForm-CF4S5FKy.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CcFaix3Z.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7oE_5vm.js} +3 -3
- package/dist/{InventoryBindingSummary-Do1L4Kap.js → InventoryBindingSummary-B62JgE3E.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BE_Jy7Io.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-LU6H0km1.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DzgBomgA.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D89P4Qmb.js} +1 -1
- package/dist/{PublishView-BnY9WgxW.js → PublishView-mEpPGhPa.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-Cuq1Zceg.js → PurchaseOrderPrintPreview-C-AYYN_A.js} +1 -1
- package/dist/{ReceiveRequestView-KLZlhvM6.js → ReceiveRequestView-CdAk58O7.js} +8 -8
- package/dist/{RecipeView-CBZne8rg.js → RecipeView-CYFVAEGK.js} +3 -3
- package/dist/{StockView-DgWMvwqm.js → StockView-B8miUD_1.js} +6 -6
- package/dist/{SupplierView-CrjALklK.js → SupplierView-DOUMGjwC.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D4tM1-2p.js → TransferDetails.vue_vue_type_script_setup_true_lang-8EHU5GHB.js} +460 -448
- package/dist/{TransferTemplateView-CZcn88V4.js → TransferTemplateView-JN6X7cL7.js} +6 -6
- package/dist/{UnitView-DN13NHa8.js → UnitView-BgAL1J1L.js} +3 -3
- package/dist/{WarehouseView--6xAFFrZ.js → WarehouseView-CYjou0HU.js} +1 -1
- package/dist/{app-DR4vpC3Q.js → app-2UW9ih37.js} +6878 -5895
- package/dist/app.d.ts +1071 -94
- package/dist/app.js +1 -1
- package/dist/{decimal-DLlwiD5M.js → decimal-BVjUqeiV.js} +1 -1
- package/dist/{format-unit-display-DMEOal9Y.js → format-unit-display-p37d7NSx.js} +2 -2
- package/dist/{index-Bb4SDHt3.js → index-BpzemzqA.js} +1 -1
- package/dist/{index-D1CdY2Uk.js → index-CL-1GwmK.js} +1 -1
- package/dist/{stock-BxL1U8Yv.js → stock-B7mG_P1Y.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CyfjkbzV.js → supplier-D9coSvOP.js} +1 -1
- package/dist/{use-ingredient-select-dialog-D1hBQJiq.js → use-ingredient-select-dialog-BDRHJkpA.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BWUWgYax.js → use-inventory-binding-dialog-B0_Biu6_.js} +1 -1
- package/package.json +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a3 as pt, u as me, aS as O, aT as Ae, aA as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { F as kt } from "./decimal-
|
|
4
|
-
import { useCoreStore as Pe, useI18n as
|
|
5
|
-
import { useDialog as
|
|
6
|
-
import { b as
|
|
1
|
+
import { a3 as pt, u as me, aS as O, aT as Ae, aA as J, c as Te, b as Ce, ab as vt, ad as yt, ae as ht, aU as bt, e as et, f as nt, a0 as We, aV as gt, a8 as at, T as ot, j as fe, a6 as _t, aW as it, ai as De, h as tt, i as ee, D as ae, aX as lt, aY as ct, aZ as Le, ay as rt, aa as xe, a4 as Be, a5 as St, a_ as ke, Q as wt } from "./app-2UW9ih37.js";
|
|
2
|
+
import { ref as z, computed as Z, h as q, defineComponent as he, reactive as Rt, onMounted as ut, resolveComponent as H, openBlock as g, createBlock as ie, withCtx as oe, createElementVNode as o, createVNode as F, unref as w, createElementBlock as N, toDisplayString as $, createCommentVNode as M, Fragment as ne, renderList as ve, watch as Ot, isRef as Nt, normalizeClass as $e, createTextVNode as Ve, resolveDynamicComponent as xt } from "vue";
|
|
3
|
+
import { F as kt } from "./decimal-BVjUqeiV.js";
|
|
4
|
+
import { useCoreStore as Pe, useI18n as dt } from "@feedmepos/mf-common";
|
|
5
|
+
import { useDialog as Ge, useSnackbar as Fe, components as Ke, FmButtonVariant as se, useProxiedModel as $t } from "@feedmepos/ui-library";
|
|
6
|
+
import { b as Dt, u as qt, P as ye, f as At } from "./format-unit-display-p37d7NSx.js";
|
|
7
7
|
import { E as Tt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as Et } from "./index-
|
|
8
|
+
import { _ as Ct, F as Pt, a as Ft } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CZzBZmX6.js";
|
|
9
|
+
import { u as It, R as st } from "./usePromise-CbVUCxhj.js";
|
|
10
|
+
import { u as Et } from "./index-CL-1GwmK.js";
|
|
11
11
|
const Ie = pt((p, e) => {
|
|
12
12
|
const a = me(), b = Pe();
|
|
13
13
|
return {
|
|
@@ -67,7 +67,7 @@ const Ie = pt((p, e) => {
|
|
|
67
67
|
return await e.get(u);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
}),
|
|
70
|
+
}), ft = {
|
|
71
71
|
[O.enum.confirmDraft]: {
|
|
72
72
|
primaryActions: {
|
|
73
73
|
text: "Confirm draft",
|
|
@@ -135,7 +135,7 @@ const Ie = pt((p, e) => {
|
|
|
135
135
|
successMessage: "Purchase order has been processed"
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
-
function
|
|
138
|
+
function qe(p) {
|
|
139
139
|
return Ae.generatedPOReceivedMap({
|
|
140
140
|
purchaseOrder: p
|
|
141
141
|
});
|
|
@@ -145,15 +145,15 @@ function Lt(p) {
|
|
|
145
145
|
dto: p
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function je(p) {
|
|
149
149
|
return Ae.validatePOReceivedStatus({
|
|
150
150
|
receivedMap: p
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (!
|
|
153
|
+
function ze(p, e, a) {
|
|
154
|
+
if (!J.safeParse(p).success)
|
|
155
155
|
throw new Error(`Invalid purchase order status: ${p}`);
|
|
156
|
-
const b =
|
|
156
|
+
const b = J.parse(p);
|
|
157
157
|
return Ae.orderStatusCombination({
|
|
158
158
|
status: b,
|
|
159
159
|
isPOPartialReceive: e,
|
|
@@ -161,7 +161,7 @@ function ft(p, e, a) {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function mt() {
|
|
164
|
-
const p = me(), e = Ie(), a =
|
|
164
|
+
const p = me(), e = Ie(), a = Te();
|
|
165
165
|
async function b(t, u) {
|
|
166
166
|
const i = p.currentLocationDBName;
|
|
167
167
|
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, u || i);
|
|
@@ -172,12 +172,12 @@ function mt() {
|
|
|
172
172
|
}
|
|
173
173
|
return (t) => a.useOperatePurchaseOrderV2 ? c(t.operateV2, t.transferTo) : b(t.operate, t.transferTo);
|
|
174
174
|
}
|
|
175
|
-
var
|
|
176
|
-
const Oe =
|
|
175
|
+
var He = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(He || {});
|
|
176
|
+
const Oe = z(), Ue = z();
|
|
177
177
|
function zs(p, e) {
|
|
178
|
-
const a =
|
|
179
|
-
|
|
180
|
-
const t =
|
|
178
|
+
const a = Ge(), b = me(), c = Te();
|
|
179
|
+
Ce();
|
|
180
|
+
const t = Dt(), u = qt(), i = z(!1), n = Fe(), h = Ie(), _ = z(new Array()), v = z(
|
|
181
181
|
e != null && e.startDate && (e != null && e.endDate) ? e : vt()
|
|
182
182
|
), m = Z(() => {
|
|
183
183
|
const k = new Date(v.value.startDate), T = new Date(v.value.endDate);
|
|
@@ -185,11 +185,11 @@ function zs(p, e) {
|
|
|
185
185
|
start: yt(k).toISOString(),
|
|
186
186
|
end: ht(T).toISOString()
|
|
187
187
|
};
|
|
188
|
-
}), l =
|
|
188
|
+
}), l = z(new Array()), r = bt(), d = z(null);
|
|
189
189
|
async function S(k) {
|
|
190
190
|
function T(s) {
|
|
191
191
|
const f = {
|
|
192
|
-
mode:
|
|
192
|
+
mode: et.CREATE,
|
|
193
193
|
modelValue: k || void 0,
|
|
194
194
|
show: !0,
|
|
195
195
|
"onUpdate:show"(R) {
|
|
@@ -200,7 +200,7 @@ function zs(p, e) {
|
|
|
200
200
|
};
|
|
201
201
|
Oe.value = f;
|
|
202
202
|
}
|
|
203
|
-
let
|
|
203
|
+
let W;
|
|
204
204
|
c.mustUsePoTemplate && !(k != null && k.template) ? a.open({
|
|
205
205
|
title: "Create transfer",
|
|
206
206
|
message: "",
|
|
@@ -214,34 +214,34 @@ function zs(p, e) {
|
|
|
214
214
|
close: !0
|
|
215
215
|
}
|
|
216
216
|
}).onPrimary(async () => {
|
|
217
|
-
|
|
217
|
+
W = await t.getTemplateId(), W && T(W);
|
|
218
218
|
}).onSecondary(() => {
|
|
219
219
|
T(void 0);
|
|
220
|
-
}) : T(
|
|
220
|
+
}) : T(W);
|
|
221
221
|
}
|
|
222
222
|
function x(k) {
|
|
223
223
|
const T = {
|
|
224
|
-
mode:
|
|
225
|
-
modelValue:
|
|
224
|
+
mode: et.UPDATE,
|
|
225
|
+
modelValue: nt(k),
|
|
226
226
|
show: !0,
|
|
227
|
-
"onUpdate:show"(
|
|
228
|
-
Oe.value.show =
|
|
227
|
+
"onUpdate:show"(W) {
|
|
228
|
+
Oe.value.show = W;
|
|
229
229
|
},
|
|
230
230
|
lastClosingDate: d.value
|
|
231
231
|
};
|
|
232
232
|
Oe.value = T;
|
|
233
233
|
}
|
|
234
|
-
async function
|
|
234
|
+
async function I() {
|
|
235
235
|
_.value = [], i.value = !0;
|
|
236
236
|
try {
|
|
237
237
|
_.value = await h.getPurchaseOrders(m.value).then((s) => s.sort((f, R) => R._id.localeCompare(f._id)));
|
|
238
238
|
const k = await r.readCurrentLocationLastClosing(!0), T = k == null ? void 0 : k._id;
|
|
239
239
|
T && (d.value = gt(T)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await u.fetchTemplates();
|
|
240
|
-
const
|
|
240
|
+
const W = _.value.map((s) => {
|
|
241
241
|
var f;
|
|
242
242
|
return ((f = s.request) == null ? void 0 : f.id) ?? "";
|
|
243
243
|
}).filter((s) => s);
|
|
244
|
-
l.value = await h.readRequestByIds(
|
|
244
|
+
l.value = await h.readRequestByIds(W);
|
|
245
245
|
} catch {
|
|
246
246
|
n.open({
|
|
247
247
|
title: "Something went wrong",
|
|
@@ -252,7 +252,7 @@ function zs(p, e) {
|
|
|
252
252
|
i.value = !1;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function A() {
|
|
256
256
|
l.value = [], i.value = !0;
|
|
257
257
|
try {
|
|
258
258
|
l.value = await h.readRequests(
|
|
@@ -270,31 +270,31 @@ function zs(p, e) {
|
|
|
270
270
|
i.value = !1;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function C() {
|
|
274
274
|
switch (p) {
|
|
275
275
|
case "receive/request":
|
|
276
|
-
return
|
|
276
|
+
return I();
|
|
277
277
|
case "approval":
|
|
278
|
-
return
|
|
278
|
+
return A();
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
function K(k, T) {
|
|
282
282
|
v.value = {
|
|
283
283
|
startDate: k,
|
|
284
284
|
endDate: T
|
|
285
|
-
},
|
|
285
|
+
}, C();
|
|
286
286
|
}
|
|
287
287
|
b.watchLocation(async (k) => {
|
|
288
288
|
if (!k) {
|
|
289
289
|
_.value = [];
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
await
|
|
292
|
+
await C();
|
|
293
293
|
});
|
|
294
|
-
const G =
|
|
294
|
+
const G = z(), ce = z(Math.random().toString());
|
|
295
295
|
async function le(k, T) {
|
|
296
|
-
const
|
|
297
|
-
ce.value =
|
|
296
|
+
const W = Math.random().toString();
|
|
297
|
+
ce.value = W, T ?? (T = l.value.computeFirst(
|
|
298
298
|
(R) => R.purchaseOrderId === k._id ? R : null
|
|
299
299
|
) ?? void 0);
|
|
300
300
|
const s = p === "receive/request" ? b.currentLocation : T == null ? void 0 : T.to, f = {
|
|
@@ -309,11 +309,11 @@ function zs(p, e) {
|
|
|
309
309
|
G.value.show = R;
|
|
310
310
|
},
|
|
311
311
|
scope: p,
|
|
312
|
-
receivedMap:
|
|
312
|
+
receivedMap: qe(k) ?? {}
|
|
313
313
|
};
|
|
314
314
|
G.value = f;
|
|
315
315
|
}
|
|
316
|
-
async function be(k, T,
|
|
316
|
+
async function be(k, T, W, s) {
|
|
317
317
|
const f = mt();
|
|
318
318
|
i.value = !0;
|
|
319
319
|
try {
|
|
@@ -336,15 +336,15 @@ function zs(p, e) {
|
|
|
336
336
|
payloads: []
|
|
337
337
|
},
|
|
338
338
|
transferTo: s
|
|
339
|
-
}), await new Promise((
|
|
340
|
-
const
|
|
341
|
-
T === O.enum.confirmDraft && k.effectiveAt &&
|
|
339
|
+
}), await new Promise((B) => setTimeout(B, 1e3));
|
|
340
|
+
const D = me().currentLocationDBName.startsWith("restaurant_");
|
|
341
|
+
T === O.enum.confirmDraft && k.effectiveAt && D ? n.open({
|
|
342
342
|
title: "Success",
|
|
343
|
-
message: `${
|
|
343
|
+
message: `${W}. The backdate will be reflected once your POS has received this change.`,
|
|
344
344
|
type: "success"
|
|
345
345
|
}) : n.open({
|
|
346
346
|
title: "Success",
|
|
347
|
-
message:
|
|
347
|
+
message: W,
|
|
348
348
|
type: "success"
|
|
349
349
|
});
|
|
350
350
|
} catch (R) {
|
|
@@ -354,15 +354,15 @@ function zs(p, e) {
|
|
|
354
354
|
type: "error"
|
|
355
355
|
}), console.error("Error when submitting PO operation", T, k, R);
|
|
356
356
|
} finally {
|
|
357
|
-
i.value = !1,
|
|
357
|
+
i.value = !1, C();
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
async function
|
|
361
|
-
const s =
|
|
360
|
+
async function Ee(k, T, W) {
|
|
361
|
+
const s = ft[T];
|
|
362
362
|
if (!s) {
|
|
363
363
|
n.open({
|
|
364
364
|
title: "Something went wrong",
|
|
365
|
-
message: `Cannot process order: ${
|
|
365
|
+
message: `Cannot process order: ${We(T)}`,
|
|
366
366
|
type: "error"
|
|
367
367
|
});
|
|
368
368
|
return;
|
|
@@ -373,7 +373,7 @@ function zs(p, e) {
|
|
|
373
373
|
message: R.message,
|
|
374
374
|
primaryActions: R.primaryActions
|
|
375
375
|
}).onPrimary(() => {
|
|
376
|
-
be(k, T, f,
|
|
376
|
+
be(k, T, f, W);
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
async function ue() {
|
|
@@ -391,25 +391,25 @@ function zs(p, e) {
|
|
|
391
391
|
const k = {
|
|
392
392
|
show: !0,
|
|
393
393
|
"onUpdate:show"(T) {
|
|
394
|
-
|
|
394
|
+
Ue.value.show = T;
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
|
-
|
|
397
|
+
Ue.value = k;
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
400
|
return {
|
|
401
401
|
purchaseOrders: _,
|
|
402
402
|
purchaseRequests: l,
|
|
403
403
|
updateDateRange: K,
|
|
404
|
-
fetchData:
|
|
404
|
+
fetchData: C,
|
|
405
405
|
loading: i,
|
|
406
406
|
transferDialogProps: Oe,
|
|
407
407
|
promptCreateTransferDialog: S,
|
|
408
408
|
promptUpdateTransferDialog: x,
|
|
409
409
|
transferDetailsProps: G,
|
|
410
410
|
promptShowTransferDetails: le,
|
|
411
|
-
submitAction:
|
|
412
|
-
xilnexImportDialogProps:
|
|
411
|
+
submitAction: Ee,
|
|
412
|
+
xilnexImportDialogProps: Ue,
|
|
413
413
|
promptUploadTransferDialog: ue
|
|
414
414
|
};
|
|
415
415
|
}
|
|
@@ -417,9 +417,9 @@ function Bt(p, e) {
|
|
|
417
417
|
return e.reduce(
|
|
418
418
|
(b, c) => {
|
|
419
419
|
const t = c.received.find((u) => u.sku._id === p._id);
|
|
420
|
-
return t && (b =
|
|
420
|
+
return t && (b = at(b, t.amount)), b;
|
|
421
421
|
},
|
|
422
|
-
kt.toPrecision(
|
|
422
|
+
kt.toPrecision(ot(0), p.unit.precision)
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
function Vt(p) {
|
|
@@ -442,32 +442,32 @@ function Vt(p) {
|
|
|
442
442
|
city: e.supplier.address.city,
|
|
443
443
|
state: e.supplier.address.state,
|
|
444
444
|
country: e.supplier.address.country
|
|
445
|
-
}, v = e.items.map((
|
|
446
|
-
const { sku:
|
|
447
|
-
Bt(
|
|
445
|
+
}, v = e.items.map((A) => {
|
|
446
|
+
const { sku: C, measurement: K } = A, G = fe(
|
|
447
|
+
Bt(A.sku, e.deliveryOrder || []),
|
|
448
448
|
!1
|
|
449
449
|
);
|
|
450
450
|
return {
|
|
451
|
-
code:
|
|
452
|
-
description:
|
|
453
|
-
quantity: fe(
|
|
454
|
-
unit: (K == null ? void 0 : K.abbrev) ||
|
|
451
|
+
code: C.code,
|
|
452
|
+
description: C.name,
|
|
453
|
+
quantity: fe(A.quantity, !1),
|
|
454
|
+
unit: (K == null ? void 0 : K.abbrev) || C.unit.abbrev,
|
|
455
455
|
received: G,
|
|
456
|
-
cost:
|
|
457
|
-
value:
|
|
456
|
+
cost: A.totalCost ? `${A.totalCost.currency} ${_t.toFormatString({
|
|
457
|
+
value: A.totalCost
|
|
458
458
|
})}` : void 0
|
|
459
459
|
};
|
|
460
|
-
}), m = e.deliveryOrder.map((
|
|
461
|
-
createdAt:
|
|
462
|
-
ref:
|
|
463
|
-
remark:
|
|
464
|
-
items:
|
|
460
|
+
}), m = e.deliveryOrder.map((A) => ({
|
|
461
|
+
createdAt: it(new Date(A.createdAt)),
|
|
462
|
+
ref: A.deliveryOrderNumber,
|
|
463
|
+
remark: A.remark || "",
|
|
464
|
+
items: A.received.map((C) => {
|
|
465
465
|
var K;
|
|
466
466
|
return {
|
|
467
|
-
code:
|
|
468
|
-
description:
|
|
469
|
-
quantity: fe(
|
|
470
|
-
unit: ((K =
|
|
467
|
+
code: C.sku.code,
|
|
468
|
+
description: C.sku.name,
|
|
469
|
+
quantity: fe(C.amount),
|
|
470
|
+
unit: ((K = C.measurement) == null ? void 0 : K.abbrev) || C.sku.unit.abbrev
|
|
471
471
|
};
|
|
472
472
|
})
|
|
473
473
|
})), l = [
|
|
@@ -478,15 +478,15 @@ function Vt(p) {
|
|
|
478
478
|
];
|
|
479
479
|
let r = "Inventory Receive Note";
|
|
480
480
|
if (e.supplier.internal ? (r = "Inventory Transfer Note", l.includes((b == null ? void 0 : b._id) || "") && (r = "Stock Request")) : r = "Purchase Order", t) {
|
|
481
|
-
const
|
|
482
|
-
a.dbName ===
|
|
481
|
+
const A = t.from.dbName;
|
|
482
|
+
a.dbName === A || (r = "Inventory Receive Note");
|
|
483
483
|
}
|
|
484
484
|
const S = {
|
|
485
485
|
title: r,
|
|
486
486
|
businessName: b == null ? void 0 : b.name,
|
|
487
487
|
logo: b == null ? void 0 : b.thumbnail,
|
|
488
488
|
orderNumber: e.seqNumber.toString(),
|
|
489
|
-
createdAt:
|
|
489
|
+
createdAt: De(e._id),
|
|
490
490
|
ref: e.ref || "",
|
|
491
491
|
remark: e.remark || "",
|
|
492
492
|
buyer: h,
|
|
@@ -494,8 +494,8 @@ function Vt(p) {
|
|
|
494
494
|
items: v,
|
|
495
495
|
status: e.status,
|
|
496
496
|
deliveryOrders: m
|
|
497
|
-
}, x = new URL(window.location.href),
|
|
498
|
-
x.pathname = x.hostname.includes("portal.feedme") ? `/inventory/${
|
|
497
|
+
}, x = new URL(window.location.href), I = c && (e.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
498
|
+
x.pathname = x.hostname.includes("portal.feedme") ? `/inventory/${I}` : `/${I}`, x.searchParams.append("data", JSON.stringify(S)), window.open(x.href, "_blank", "noreferrer");
|
|
499
499
|
}
|
|
500
500
|
const Se = {
|
|
501
501
|
submitRequest: {
|
|
@@ -560,46 +560,46 @@ const Se = {
|
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
562
|
function Hs(p, e) {
|
|
563
|
-
const a = me(), b =
|
|
563
|
+
const a = me(), b = Ce(), c = Pe(), { t } = dt();
|
|
564
564
|
function u(m) {
|
|
565
565
|
switch (m.status) {
|
|
566
566
|
case "DRAFT":
|
|
567
567
|
return [
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
ae[ee.Update],
|
|
569
|
+
ae[ee.Details],
|
|
570
570
|
m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? Se[O.enum.submitRequest] : Se[O.enum.confirmDraft],
|
|
571
571
|
Se[O.enum.cancelDraft]
|
|
572
572
|
];
|
|
573
573
|
case "RECEIVING":
|
|
574
574
|
return [
|
|
575
575
|
Se[O.enum.completeReceive],
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
ae[ee.Details],
|
|
577
|
+
ae[ee.Print]
|
|
578
578
|
];
|
|
579
579
|
case "REQUESTING":
|
|
580
|
-
return p === "receive/request" ? [
|
|
580
|
+
return p === "receive/request" ? [ae[ee.Details], ae[ee.Print]] : [
|
|
581
581
|
Se[O.enum.approveRequest],
|
|
582
582
|
Se[O.enum.rejectRequest],
|
|
583
|
-
|
|
583
|
+
ae[ee.Details]
|
|
584
584
|
// DefaultRowActions[RowActionEnum.Print]
|
|
585
585
|
];
|
|
586
586
|
case "PROCESSING":
|
|
587
|
-
return [
|
|
587
|
+
return [ae[ee.Details], ae[ee.Print]];
|
|
588
588
|
case "COMPLETE":
|
|
589
589
|
case "CANCEL":
|
|
590
590
|
default:
|
|
591
|
-
return [
|
|
591
|
+
return [ae[ee.Details], ae[ee.Print]];
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
function i(m) {
|
|
595
595
|
return Object.values(O.enum).includes(m);
|
|
596
596
|
}
|
|
597
597
|
async function n(m, l, r) {
|
|
598
|
-
var S, x,
|
|
599
|
-
const d =
|
|
600
|
-
if (m ===
|
|
598
|
+
var S, x, I, A, C, K;
|
|
599
|
+
const d = nt(l);
|
|
600
|
+
if (m === ee.Print) {
|
|
601
601
|
const G = (r == null ? void 0 : r.toInventoryLocation) ?? a.currentLocation;
|
|
602
|
-
((S = r == null ? void 0 : r.netSuite) != null && S.refNo || (x = d.netSuite) != null && x.refNo) && (d.ref = [((
|
|
602
|
+
((S = r == null ? void 0 : r.netSuite) != null && S.refNo || (x = d.netSuite) != null && x.refNo) && (d.ref = [((I = r == null ? void 0 : r.netSuite) == null ? void 0 : I.refNo) || ((A = d.netSuite) == null ? void 0 : A.refNo)].filter((ce) => ce).join(" ")), Vt({
|
|
603
603
|
po: d,
|
|
604
604
|
currentLocation: G,
|
|
605
605
|
business: c.currentBusiness.value,
|
|
@@ -608,12 +608,12 @@ function Hs(p, e) {
|
|
|
608
608
|
});
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
|
-
if (m ===
|
|
611
|
+
if (m === ee.Details) {
|
|
612
612
|
e.promptShowTransferDetails(d, r);
|
|
613
613
|
return;
|
|
614
614
|
}
|
|
615
|
-
if (m ===
|
|
616
|
-
(
|
|
615
|
+
if (m === ee.Update) {
|
|
616
|
+
(C = e.promptUpdateTransferDialog) == null || C.call(e, d);
|
|
617
617
|
return;
|
|
618
618
|
}
|
|
619
619
|
if (i(m)) {
|
|
@@ -634,7 +634,7 @@ function Hs(p, e) {
|
|
|
634
634
|
accessorKey: "_id",
|
|
635
635
|
header: () => t("inventory.transfer.table.createdAt"),
|
|
636
636
|
cell(l) {
|
|
637
|
-
return
|
|
637
|
+
return De(`${l.getValue()}`);
|
|
638
638
|
},
|
|
639
639
|
enableSorting: !0
|
|
640
640
|
},
|
|
@@ -650,9 +650,9 @@ function Hs(p, e) {
|
|
|
650
650
|
cell: (l) => {
|
|
651
651
|
var S;
|
|
652
652
|
const r = l.row.original.version || "1", d = l.getValue();
|
|
653
|
-
return
|
|
653
|
+
return q("div", { class: "flex items-center gap-2" }, [
|
|
654
654
|
d,
|
|
655
|
-
r !== "1" && ((S = c.sessionUser.value) != null && S.role.isAdmin) ?
|
|
655
|
+
r !== "1" && ((S = c.sessionUser.value) != null && S.role.isAdmin) ? q(
|
|
656
656
|
"div",
|
|
657
657
|
{
|
|
658
658
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
@@ -676,24 +676,24 @@ function Hs(p, e) {
|
|
|
676
676
|
accessorKey: "status",
|
|
677
677
|
header: () => t("inventory.transfer.table.status"),
|
|
678
678
|
cell(l) {
|
|
679
|
-
const r = l.getValue(), d =
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
return A(
|
|
679
|
+
const r = l.getValue(), d = qe(l.row.original), { partial: S, over: x } = je(d), I = ze(r ?? "", S, x);
|
|
680
|
+
let A = t(`inventory.transfer.status.${I}`);
|
|
681
|
+
const C = `${r ?? ""}`.toLocaleLowerCase("en-us");
|
|
682
|
+
return I === J.enum.CLOSE && (A = `${t(`inventory.transfer.status.${J.enum.COMPLETE}`)} (${A})`), q(
|
|
683
683
|
"div",
|
|
684
684
|
{
|
|
685
685
|
class: "flex"
|
|
686
686
|
},
|
|
687
|
-
|
|
687
|
+
q(
|
|
688
688
|
"div",
|
|
689
689
|
{
|
|
690
690
|
class: [
|
|
691
691
|
"fm-status-badge",
|
|
692
|
-
`fm-status-badge-${
|
|
692
|
+
`fm-status-badge-${C}`,
|
|
693
693
|
x && "fm-status-badge-error"
|
|
694
694
|
].filter(Boolean).join(" ")
|
|
695
695
|
},
|
|
696
|
-
`${
|
|
696
|
+
`${A}`
|
|
697
697
|
)
|
|
698
698
|
);
|
|
699
699
|
},
|
|
@@ -704,7 +704,7 @@ function Hs(p, e) {
|
|
|
704
704
|
id: "action",
|
|
705
705
|
cell(l) {
|
|
706
706
|
const r = l.row.original, d = u(r);
|
|
707
|
-
return
|
|
707
|
+
return tt(d, (S) => n(S, r));
|
|
708
708
|
},
|
|
709
709
|
enableSorting: !1,
|
|
710
710
|
size: 40,
|
|
@@ -771,7 +771,7 @@ function Hs(p, e) {
|
|
|
771
771
|
accessorKey: "purchaseOrder._id",
|
|
772
772
|
header: () => t("inventory.transfer.table.createdAt"),
|
|
773
773
|
cell(l) {
|
|
774
|
-
return
|
|
774
|
+
return De(`${l.getValue()}`);
|
|
775
775
|
},
|
|
776
776
|
enableSorting: !0
|
|
777
777
|
},
|
|
@@ -796,19 +796,30 @@ function Hs(p, e) {
|
|
|
796
796
|
accessorKey: "purchaseOrder.status",
|
|
797
797
|
header: () => t("inventory.transfer.table.status"),
|
|
798
798
|
cell(l) {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
799
|
+
const r = l.row.original, d = l.getValue();
|
|
800
|
+
if (!r.purchaseOrder)
|
|
801
|
+
return q(Ke.FmChip, {
|
|
802
|
+
label: "N/A",
|
|
803
|
+
compact: !0
|
|
804
|
+
});
|
|
805
|
+
const S = qe(r.purchaseOrder), { partial: x, over: I } = je(S), A = ze(d ?? "", x, I);
|
|
806
|
+
let C = t(`inventory.transfer.status.${A}`);
|
|
807
|
+
const K = `${d ?? ""}`.toLocaleLowerCase("en-us");
|
|
808
|
+
return A === J.enum.CLOSE && (C = `${t(`inventory.transfer.status.${J.enum.COMPLETE}`)} (${C})`), q(
|
|
802
809
|
"div",
|
|
803
810
|
{
|
|
804
811
|
class: "flex"
|
|
805
812
|
},
|
|
806
|
-
|
|
813
|
+
q(
|
|
807
814
|
"div",
|
|
808
815
|
{
|
|
809
|
-
class:
|
|
816
|
+
class: [
|
|
817
|
+
"fm-status-badge",
|
|
818
|
+
`fm-status-badge-${K}`,
|
|
819
|
+
I && "fm-status-badge-error"
|
|
820
|
+
].filter(Boolean).join(" ")
|
|
810
821
|
},
|
|
811
|
-
|
|
822
|
+
`${C}`
|
|
812
823
|
)
|
|
813
824
|
);
|
|
814
825
|
},
|
|
@@ -817,11 +828,11 @@ function Hs(p, e) {
|
|
|
817
828
|
{
|
|
818
829
|
id: "action",
|
|
819
830
|
cell(l) {
|
|
820
|
-
const r = l.row.original, S = (r.purchaseOrder ? u(r.purchaseOrder) : []).map((x) => x.value ===
|
|
831
|
+
const r = l.row.original, S = (r.purchaseOrder ? u(r.purchaseOrder) : []).map((x) => x.value === ee.Print ? {
|
|
821
832
|
...x,
|
|
822
833
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
823
834
|
} : x);
|
|
824
|
-
return
|
|
835
|
+
return tt(
|
|
825
836
|
S,
|
|
826
837
|
(x) => r.purchaseOrder ? n(x, r.purchaseOrder, r) : void 0
|
|
827
838
|
);
|
|
@@ -894,8 +905,8 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
894
905
|
id: "",
|
|
895
906
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
896
907
|
items: []
|
|
897
|
-
}), c =
|
|
898
|
-
|
|
908
|
+
}), c = z(), t = e;
|
|
909
|
+
ut(() => {
|
|
899
910
|
a.purchaseOrder && (b.items = a.purchaseOrder.items.map((i) => ({
|
|
900
911
|
id: i.id,
|
|
901
912
|
sku: i.sku,
|
|
@@ -905,33 +916,33 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
905
916
|
});
|
|
906
917
|
const u = Z(() => b.items.length <= 10);
|
|
907
918
|
return (i, n) => {
|
|
908
|
-
const h =
|
|
909
|
-
return g(),
|
|
919
|
+
const h = H("FmTable"), _ = H("FmButton"), v = H("FmForm");
|
|
920
|
+
return g(), ie(v, {
|
|
910
921
|
ref_key: "formRef",
|
|
911
922
|
ref: c,
|
|
912
923
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
913
924
|
onValidationFailed: console.log,
|
|
914
925
|
onValidationSuccess: n[1] || (n[1] = () => a.confirm(b))
|
|
915
926
|
}, {
|
|
916
|
-
default:
|
|
927
|
+
default: oe(() => [
|
|
917
928
|
n[2] || (n[2] = o("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
918
929
|
o("div", Ut, [
|
|
919
930
|
o("div", Mt, [
|
|
920
|
-
|
|
931
|
+
F(h, {
|
|
921
932
|
"column-defs": [
|
|
922
933
|
{
|
|
923
934
|
header: "Code",
|
|
924
935
|
cell: (m) => {
|
|
925
936
|
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
926
|
-
return
|
|
927
|
-
w(
|
|
937
|
+
return q(
|
|
938
|
+
w(Ke).FmTooltip,
|
|
928
939
|
{
|
|
929
940
|
content: l.code,
|
|
930
941
|
placement: "top",
|
|
931
942
|
variant: "plain",
|
|
932
943
|
zIndex: 50
|
|
933
944
|
},
|
|
934
|
-
|
|
945
|
+
q(
|
|
935
946
|
"span",
|
|
936
947
|
{
|
|
937
948
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -945,15 +956,15 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
945
956
|
header: "Name",
|
|
946
957
|
cell: (m) => {
|
|
947
958
|
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
948
|
-
return
|
|
949
|
-
w(
|
|
959
|
+
return q(
|
|
960
|
+
w(Ke).FmTooltip,
|
|
950
961
|
{
|
|
951
962
|
content: l.name,
|
|
952
963
|
placement: "top",
|
|
953
964
|
variant: "plain",
|
|
954
965
|
zIndex: 50
|
|
955
966
|
},
|
|
956
|
-
|
|
967
|
+
q(
|
|
957
968
|
"span",
|
|
958
969
|
{
|
|
959
970
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -970,7 +981,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
970
981
|
amount: 1,
|
|
971
982
|
precision: 0
|
|
972
983
|
};
|
|
973
|
-
return
|
|
984
|
+
return q(Ct, {
|
|
974
985
|
style: {
|
|
975
986
|
flex: "1 1 0%"
|
|
976
987
|
},
|
|
@@ -982,15 +993,15 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
982
993
|
unit: l.sku.unit,
|
|
983
994
|
"onUpdate:modelValue": (S) => {
|
|
984
995
|
if (!S) return;
|
|
985
|
-
const x = b.items.find((
|
|
996
|
+
const x = b.items.find((I) => I.id === l.id || I.sku._id === l.sku._id);
|
|
986
997
|
x && (x.amount = S.amount);
|
|
987
998
|
},
|
|
988
999
|
disableUnit: !0,
|
|
989
1000
|
rules: [
|
|
990
|
-
w(
|
|
1001
|
+
w(Pt)(
|
|
991
1002
|
+w(fe)({ amount: 0, precision: 0 })
|
|
992
1003
|
),
|
|
993
|
-
w(
|
|
1004
|
+
w(Ft)(+w(fe)(r.quantity))
|
|
994
1005
|
],
|
|
995
1006
|
applyDefaultRules: !0
|
|
996
1007
|
});
|
|
@@ -1003,14 +1014,14 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1003
1014
|
])
|
|
1004
1015
|
]),
|
|
1005
1016
|
o("div", Kt, [
|
|
1006
|
-
|
|
1017
|
+
F(_, {
|
|
1007
1018
|
class: "px-16",
|
|
1008
1019
|
label: "Confirm",
|
|
1009
1020
|
size: "md",
|
|
1010
1021
|
variant: "primary",
|
|
1011
1022
|
type: "submit"
|
|
1012
1023
|
}),
|
|
1013
|
-
|
|
1024
|
+
F(_, {
|
|
1014
1025
|
class: "px-16",
|
|
1015
1026
|
label: "Cancel",
|
|
1016
1027
|
size: "md",
|
|
@@ -1023,93 +1034,93 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1023
1034
|
}, 8, ["onValidationFailed"]);
|
|
1024
1035
|
};
|
|
1025
1036
|
}
|
|
1026
|
-
}),
|
|
1037
|
+
}), Me = {
|
|
1027
1038
|
submitRequest: {
|
|
1028
1039
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
1029
1040
|
color: "primary",
|
|
1030
|
-
buttonVariant:
|
|
1041
|
+
buttonVariant: se.Primary
|
|
1031
1042
|
},
|
|
1032
1043
|
confirmDraft: {
|
|
1033
1044
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
1034
1045
|
color: "primary",
|
|
1035
|
-
buttonVariant:
|
|
1046
|
+
buttonVariant: se.Primary
|
|
1036
1047
|
},
|
|
1037
1048
|
cancelDraft: {
|
|
1038
1049
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
1039
1050
|
color: "system-error-300",
|
|
1040
|
-
buttonVariant:
|
|
1051
|
+
buttonVariant: se.Destructive
|
|
1041
1052
|
},
|
|
1042
1053
|
approveDraft: {
|
|
1043
1054
|
translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
|
|
1044
1055
|
color: "primary",
|
|
1045
|
-
buttonVariant:
|
|
1056
|
+
buttonVariant: se.Primary
|
|
1046
1057
|
},
|
|
1047
1058
|
rejectDraft: {
|
|
1048
1059
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
|
|
1049
1060
|
color: "system-error-300",
|
|
1050
|
-
buttonVariant:
|
|
1061
|
+
buttonVariant: se.Destructive
|
|
1051
1062
|
},
|
|
1052
1063
|
approveRequest: {
|
|
1053
1064
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
1054
1065
|
color: "primary",
|
|
1055
|
-
buttonVariant:
|
|
1066
|
+
buttonVariant: se.Primary
|
|
1056
1067
|
},
|
|
1057
1068
|
processRequest: {
|
|
1058
1069
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
1059
1070
|
color: "primary",
|
|
1060
|
-
buttonVariant:
|
|
1071
|
+
buttonVariant: se.Primary
|
|
1061
1072
|
},
|
|
1062
1073
|
receiveStock: {
|
|
1063
1074
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
1064
1075
|
color: "primary",
|
|
1065
|
-
buttonVariant:
|
|
1076
|
+
buttonVariant: se.Primary,
|
|
1066
1077
|
available: !1
|
|
1067
1078
|
},
|
|
1068
1079
|
completeReceive: {
|
|
1069
1080
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
1070
1081
|
color: "primary",
|
|
1071
|
-
buttonVariant:
|
|
1082
|
+
buttonVariant: se.Plain
|
|
1072
1083
|
},
|
|
1073
1084
|
rejectRequest: {
|
|
1074
1085
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
1075
1086
|
color: "system-error-300",
|
|
1076
|
-
buttonVariant:
|
|
1087
|
+
buttonVariant: se.Destructive
|
|
1077
1088
|
},
|
|
1078
1089
|
closeRequest: {
|
|
1079
1090
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
1080
1091
|
color: "system-error-300",
|
|
1081
|
-
buttonVariant:
|
|
1092
|
+
buttonVariant: se.Destructive,
|
|
1082
1093
|
available: !1
|
|
1083
1094
|
},
|
|
1084
1095
|
returnStock: {
|
|
1085
1096
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
1086
1097
|
color: "primary",
|
|
1087
|
-
buttonVariant:
|
|
1098
|
+
buttonVariant: se.Primary,
|
|
1088
1099
|
available: !1
|
|
1089
1100
|
}
|
|
1090
1101
|
};
|
|
1091
1102
|
function zt() {
|
|
1092
|
-
const p =
|
|
1103
|
+
const p = Te();
|
|
1093
1104
|
return {
|
|
1094
1105
|
ableToMarkReceived(e) {
|
|
1095
|
-
if (!e || e.status !==
|
|
1106
|
+
if (!e || e.status !== J.enum.RECEIVING)
|
|
1096
1107
|
return !1;
|
|
1097
1108
|
const b = me().currentLocationDBName;
|
|
1098
1109
|
return `${e.supplier.internal}_${e.supplier._id}` !== b;
|
|
1099
1110
|
},
|
|
1100
1111
|
ableToMarkApproved(e) {
|
|
1101
|
-
return !(!e || (e == null ? void 0 : e.status) !==
|
|
1112
|
+
return !(!e || (e == null ? void 0 : e.status) !== J.enum.REQUESTING);
|
|
1102
1113
|
},
|
|
1103
1114
|
ableToCreateFulfillment(e, a) {
|
|
1104
1115
|
var t, u;
|
|
1105
|
-
if (!p.acceptRequireFulfillment || !e || !a || e.status !==
|
|
1116
|
+
if (!p.acceptRequireFulfillment || !e || !a || e.status !== J.enum.PROCESSING || !a.processedAt)
|
|
1106
1117
|
return !1;
|
|
1107
1118
|
const b = (t = a == null ? void 0 : a.from) == null ? void 0 : t.dbName, c = (u = a == null ? void 0 : a.to) == null ? void 0 : u.dbName;
|
|
1108
1119
|
return !(b.startsWith("restaurant_") && c.startsWith("restaurant_"));
|
|
1109
1120
|
}
|
|
1110
1121
|
};
|
|
1111
1122
|
}
|
|
1112
|
-
const Ht = { class: "flex flex-row-reverse" },
|
|
1123
|
+
const Ht = { class: "flex flex-row-reverse" }, Wt = /* @__PURE__ */ he({
|
|
1113
1124
|
__name: "NetSuiteSync",
|
|
1114
1125
|
props: {
|
|
1115
1126
|
poRequest: {},
|
|
@@ -1118,21 +1129,21 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1118
1129
|
scope: {}
|
|
1119
1130
|
},
|
|
1120
1131
|
setup(p) {
|
|
1121
|
-
const e = p, a =
|
|
1132
|
+
const e = p, a = Ce(), b = Fe(), c = Ge(), t = z(!1);
|
|
1122
1133
|
Z(() => {
|
|
1123
1134
|
var _, v, m, l;
|
|
1124
1135
|
let i = !0;
|
|
1125
1136
|
a.isEnabled || (i = !1);
|
|
1126
1137
|
const n = e.purchaseOrder, h = e.poRequest;
|
|
1127
|
-
return n && ((_ = n == null ? void 0 : n.supplier) != null && _.internal ? (!h && n.status ==
|
|
1138
|
+
return n && ((_ = n == null ? void 0 : n.supplier) != null && _.internal ? (!h && n.status == J.enum.DRAFT && (i = !1), h && !((v = h == null ? void 0 : h.netSuite) != null && v.id) && (i = !1), e.isTransferBetweenOutlets && (i = !1)) : ((n == null ? void 0 : n.status) !== J.enum.REQUESTING && n.supplier.internal && (i = !1), !h && !((m = n == null ? void 0 : n.netSuite) != null && m.id) && (i = !1), !h && ((l = n == null ? void 0 : n.netSuite) != null && l.id) && (n == null ? void 0 : n.status) == J.enum.REQUESTING && (i = !1))), i;
|
|
1128
1139
|
});
|
|
1129
1140
|
async function u() {
|
|
1130
1141
|
t.value || c.open({
|
|
1131
1142
|
title: "Sync with NetSuite",
|
|
1132
|
-
contentComponent:
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1143
|
+
contentComponent: q("div", [
|
|
1144
|
+
q("p", "Are you sure you want to sync now?"),
|
|
1145
|
+
q("br"),
|
|
1146
|
+
q(
|
|
1136
1147
|
"p",
|
|
1137
1148
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1138
1149
|
"Please wait a moment before syncing manually to avoid unnecessary actions."
|
|
@@ -1167,9 +1178,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1167
1178
|
});
|
|
1168
1179
|
}
|
|
1169
1180
|
return (i, n) => {
|
|
1170
|
-
const h =
|
|
1181
|
+
const h = H("FmButton");
|
|
1171
1182
|
return g(), N("div", Ht, [
|
|
1172
|
-
|
|
1183
|
+
F(h, {
|
|
1173
1184
|
"prepend-icon": "sync",
|
|
1174
1185
|
variant: "secondary",
|
|
1175
1186
|
label: "Sync",
|
|
@@ -1182,7 +1193,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1182
1193
|
]);
|
|
1183
1194
|
};
|
|
1184
1195
|
}
|
|
1185
|
-
}),
|
|
1196
|
+
}), Gt = {
|
|
1186
1197
|
key: 0,
|
|
1187
1198
|
class: "flex flex-col gap-8"
|
|
1188
1199
|
}, Yt = { class: "flex flex-col gap-4" }, Qt = { class: "fm-typo-en-body-lg-600" }, Xt = {
|
|
@@ -1208,8 +1219,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1208
1219
|
scope: {}
|
|
1209
1220
|
},
|
|
1210
1221
|
setup(p) {
|
|
1211
|
-
const e = p, a =
|
|
1212
|
-
|
|
1222
|
+
const e = p, a = Ce(), b = Ie(), c = z(e.poRequest);
|
|
1223
|
+
ut(async () => {
|
|
1213
1224
|
var n;
|
|
1214
1225
|
if (!e.poRequest && ((n = e.purchaseOrder) != null && n._id)) {
|
|
1215
1226
|
const h = await b.getLatestPurchaseOrderRequest(e.purchaseOrder._id);
|
|
@@ -1224,8 +1235,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1224
1235
|
).fullName;
|
|
1225
1236
|
}
|
|
1226
1237
|
), u = Z(() => {
|
|
1227
|
-
var n, h, _, v, m, l, r, d, S, x,
|
|
1228
|
-
return (_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && _.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (S = (d = (r = c.value) == null ? void 0 : r.netSuite) == null ? void 0 : d.additionalInfo) != null && S.transactionnumber ? (
|
|
1238
|
+
var n, h, _, v, m, l, r, d, S, x, I, A;
|
|
1239
|
+
return (_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && _.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (S = (d = (r = c.value) == null ? void 0 : r.netSuite) == null ? void 0 : d.additionalInfo) != null && S.transactionnumber ? (A = (I = (x = c.value) == null ? void 0 : x.netSuite) == null ? void 0 : I.additionalInfo) == null ? void 0 : A.transactionnumber : null;
|
|
1229
1240
|
}), i = Z(() => {
|
|
1230
1241
|
var n, h, _, v, m, l;
|
|
1231
1242
|
return (h = (n = e.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && h.length && ((v = (_ = e.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) == null ? void 0 : v.length) > 0 ? (l = (m = e.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : l.map((r) => {
|
|
@@ -1234,33 +1245,33 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1234
1245
|
}).join(", ") : "N/A";
|
|
1235
1246
|
});
|
|
1236
1247
|
return (n, h) => {
|
|
1237
|
-
var _, v, m, l, r, d, S, x,
|
|
1238
|
-
return w(a).isEnabled ? (g(), N("div",
|
|
1248
|
+
var _, v, m, l, r, d, S, x, I, A, C, K, G, ce, le, be;
|
|
1249
|
+
return w(a).isEnabled ? (g(), N("div", Gt, [
|
|
1239
1250
|
o("div", Yt, [
|
|
1240
1251
|
h[0] || (h[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1241
|
-
o("div", Qt,
|
|
1252
|
+
o("div", Qt, $(t.value || "N/A"), 1)
|
|
1242
1253
|
]),
|
|
1243
|
-
!n.isTransferBetweenOutlets && n.scope === w(
|
|
1244
|
-
o("div", Zt, " NetSuite " +
|
|
1254
|
+
!n.isTransferBetweenOutlets && n.scope === w(He).RECEIVE_REQUEST ? (g(), N("div", Xt, [
|
|
1255
|
+
o("div", Zt, " NetSuite " + $((v = (_ = n.purchaseOrder) == null ? void 0 : _.netSuite) != null && v.recordType ? w(lt)((l = (m = n.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : l.recordType) : n.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1245
1256
|
o("div", Jt, [
|
|
1246
|
-
(d = (r = n.purchaseOrder) == null ? void 0 : r.netSuite) != null && d.id ? (g(), N("span", er,
|
|
1257
|
+
(d = (r = n.purchaseOrder) == null ? void 0 : r.netSuite) != null && d.id ? (g(), N("span", er, $((x = (S = n.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : x.refNo) + " (" + $((A = (I = n.purchaseOrder) == null ? void 0 : I.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (g(), N("span", tr, "N/A"))
|
|
1247
1258
|
])
|
|
1248
|
-
])) :
|
|
1249
|
-
!n.isTransferBetweenOutlets && c.value || n.scope === w(
|
|
1250
|
-
o("div", sr, " (Request) NetSuite " +
|
|
1259
|
+
])) : M("", !0),
|
|
1260
|
+
!n.isTransferBetweenOutlets && c.value || n.scope === w(He).APPROVAL ? (g(), N("div", rr, [
|
|
1261
|
+
o("div", sr, " (Request) NetSuite " + $(n.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1251
1262
|
o("div", nr, [
|
|
1252
|
-
(K = (
|
|
1263
|
+
(K = (C = c.value) == null ? void 0 : C.netSuite) != null && K.id ? (g(), N("span", ar, $((ce = (G = c.value) == null ? void 0 : G.netSuite) == null ? void 0 : ce.refNo) + " (" + $((be = (le = c.value) == null ? void 0 : le.netSuite) == null ? void 0 : be.id) + ") ", 1)) : (g(), N("span", or, "N/A"))
|
|
1253
1264
|
])
|
|
1254
|
-
])) :
|
|
1265
|
+
])) : M("", !0),
|
|
1255
1266
|
u.value ? (g(), N("div", ir, [
|
|
1256
1267
|
h[1] || (h[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1257
|
-
o("div", lr,
|
|
1258
|
-
])) :
|
|
1268
|
+
o("div", lr, $(u.value), 1)
|
|
1269
|
+
])) : M("", !0),
|
|
1259
1270
|
w(a).isEnabled && n.transferType === w(ye).TRANSFER && !n.isTransferBetweenOutlets ? (g(), N("div", cr, [
|
|
1260
1271
|
h[2] || (h[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1261
|
-
o("div", ur,
|
|
1262
|
-
])) :
|
|
1263
|
-
])) :
|
|
1272
|
+
o("div", ur, $(i.value), 1)
|
|
1273
|
+
])) : M("", !0)
|
|
1274
|
+
])) : M("", !0);
|
|
1264
1275
|
};
|
|
1265
1276
|
}
|
|
1266
1277
|
}), fr = { class: "flex flex-row-reverse" }, mr = /* @__PURE__ */ he({
|
|
@@ -1270,7 +1281,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1270
1281
|
purchaseOrderId: {}
|
|
1271
1282
|
},
|
|
1272
1283
|
setup(p) {
|
|
1273
|
-
const e =
|
|
1284
|
+
const e = Fe(), a = ct();
|
|
1274
1285
|
async function b(c, t) {
|
|
1275
1286
|
const u = [];
|
|
1276
1287
|
if (c && u.push(`body.message:*${c}*`), t) {
|
|
@@ -1294,9 +1305,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1294
1305
|
), await new Promise((_) => setTimeout(_, 800)), window.open(h, "_blank");
|
|
1295
1306
|
}
|
|
1296
1307
|
return (c, t) => {
|
|
1297
|
-
const u =
|
|
1308
|
+
const u = H("FmButton");
|
|
1298
1309
|
return g(), N("div", fr, [
|
|
1299
|
-
|
|
1310
|
+
F(u, {
|
|
1300
1311
|
"prepend-icon": "history",
|
|
1301
1312
|
variant: "secondary",
|
|
1302
1313
|
label: "Logs",
|
|
@@ -1318,7 +1329,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1318
1329
|
purchaseOrderId: {}
|
|
1319
1330
|
},
|
|
1320
1331
|
setup(p) {
|
|
1321
|
-
const e = p, a =
|
|
1332
|
+
const e = p, a = ct(), b = z(!1), c = me(), t = z(!0), u = z(!1), i = z(null);
|
|
1322
1333
|
async function n() {
|
|
1323
1334
|
if (!i.value) {
|
|
1324
1335
|
b.value = !0;
|
|
@@ -1337,15 +1348,15 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1337
1348
|
}
|
|
1338
1349
|
}
|
|
1339
1350
|
return (h, _) => {
|
|
1340
|
-
const v =
|
|
1351
|
+
const v = H("FmButton"), m = H("FmLabel"), l = H("FmDialog");
|
|
1341
1352
|
return g(), N("div", pr, [
|
|
1342
|
-
|
|
1353
|
+
F(l, {
|
|
1343
1354
|
modelValue: b.value,
|
|
1344
1355
|
"onUpdate:modelValue": _[2] || (_[2] = (r) => b.value = r),
|
|
1345
1356
|
overlay: !0
|
|
1346
1357
|
}, {
|
|
1347
|
-
"dialog-button":
|
|
1348
|
-
|
|
1358
|
+
"dialog-button": oe(() => [
|
|
1359
|
+
F(v, {
|
|
1349
1360
|
"prepend-icon": "info",
|
|
1350
1361
|
variant: "secondary",
|
|
1351
1362
|
label: "Latest Info",
|
|
@@ -1355,11 +1366,11 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1355
1366
|
"border-color": "primary"
|
|
1356
1367
|
})
|
|
1357
1368
|
]),
|
|
1358
|
-
"dialog-header":
|
|
1369
|
+
"dialog-header": oe(() => _[3] || (_[3] = [
|
|
1359
1370
|
o("div", null, "NetSuite latest info", -1)
|
|
1360
1371
|
])),
|
|
1361
|
-
"dialog-footer":
|
|
1362
|
-
|
|
1372
|
+
"dialog-footer": oe(() => [
|
|
1373
|
+
F(v, {
|
|
1363
1374
|
class: "ml-auto sm:w-full xs:w-full",
|
|
1364
1375
|
label: "Close",
|
|
1365
1376
|
size: "md",
|
|
@@ -1367,18 +1378,18 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1367
1378
|
onClick: _[1] || (_[1] = (r) => b.value = !1)
|
|
1368
1379
|
})
|
|
1369
1380
|
]),
|
|
1370
|
-
default:
|
|
1381
|
+
default: oe(() => [
|
|
1371
1382
|
t.value ? (g(), N("div", vr, "Loading...")) : (g(), N("div", yr, [
|
|
1372
|
-
u.value ? (g(), N("p", _r, "Something went wrong.")) : (g(!0), N(
|
|
1383
|
+
u.value ? (g(), N("p", _r, "Something went wrong.")) : (g(!0), N(ne, { key: 0 }, ve(i.value, (r, d) => (g(), N("div", {
|
|
1373
1384
|
key: d,
|
|
1374
1385
|
class: "mb-2"
|
|
1375
1386
|
}, [
|
|
1376
1387
|
o("div", null, [
|
|
1377
|
-
|
|
1378
|
-
label: w(
|
|
1388
|
+
F(m, {
|
|
1389
|
+
label: w(We)(d)
|
|
1379
1390
|
}, null, 8, ["label"]),
|
|
1380
1391
|
o("div", hr, [
|
|
1381
|
-
Array.isArray(r) ? (g(), N("span", br,
|
|
1392
|
+
Array.isArray(r) ? (g(), N("span", br, $(r.length > 0 ? r.join(", ") : "N/A"), 1)) : (g(), N("span", gr, $(r), 1))
|
|
1382
1393
|
])
|
|
1383
1394
|
])
|
|
1384
1395
|
]))), 128))
|
|
@@ -1409,23 +1420,23 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1409
1420
|
});
|
|
1410
1421
|
return (t, u) => {
|
|
1411
1422
|
var n, h, _, v, m, l, r, d, S, x;
|
|
1412
|
-
const i =
|
|
1423
|
+
const i = H("FmMenuDivider");
|
|
1413
1424
|
return w(a).isNetSuiteEnabled && c.value ? (g(), N("div", wr, [
|
|
1414
1425
|
o("div", Rr, [
|
|
1415
1426
|
u[0] || (u[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1416
1427
|
o("div", Or, [
|
|
1417
1428
|
o("div", Nr, [
|
|
1418
|
-
(n = w(b).sessionUser.value) != null && n.role.isAdmin && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.netSuite) != null && _.id) ? (g(),
|
|
1429
|
+
(n = w(b).sessionUser.value) != null && n.role.isAdmin && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.netSuite) != null && _.id) ? (g(), ie(Sr, {
|
|
1419
1430
|
key: 0,
|
|
1420
1431
|
"netsuite-id": (m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id,
|
|
1421
1432
|
"purchase-order-id": (l = t.purchaseOrder) == null ? void 0 : l._id
|
|
1422
|
-
}, null, 8, ["netsuite-id", "purchase-order-id"])) :
|
|
1423
|
-
(r = w(b).sessionUser.value) != null && r.role.isAdmin ? (g(),
|
|
1433
|
+
}, null, 8, ["netsuite-id", "purchase-order-id"])) : M("", !0),
|
|
1434
|
+
(r = w(b).sessionUser.value) != null && r.role.isAdmin ? (g(), ie(mr, {
|
|
1424
1435
|
key: 1,
|
|
1425
1436
|
"netsuite-id": (S = (d = t.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : S.id,
|
|
1426
1437
|
"purchase-order-id": (x = t.purchaseOrder) == null ? void 0 : x._id
|
|
1427
|
-
}, null, 8, ["netsuite-id", "purchase-order-id"])) :
|
|
1428
|
-
|
|
1438
|
+
}, null, 8, ["netsuite-id", "purchase-order-id"])) : M("", !0),
|
|
1439
|
+
F(Wt, {
|
|
1429
1440
|
"po-request": t.poRequest,
|
|
1430
1441
|
"purchase-order": t.purchaseOrder,
|
|
1431
1442
|
"is-transfer-between-outlets": !c.value,
|
|
@@ -1434,8 +1445,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1434
1445
|
])
|
|
1435
1446
|
])
|
|
1436
1447
|
]),
|
|
1437
|
-
|
|
1438
|
-
|
|
1448
|
+
F(i),
|
|
1449
|
+
F(dr, {
|
|
1439
1450
|
"po-request": t.poRequest,
|
|
1440
1451
|
"purchase-order": t.purchaseOrder,
|
|
1441
1452
|
"transfer-type": t.transferType,
|
|
@@ -1443,22 +1454,22 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1443
1454
|
"is-transfer-between-outlets": !c.value,
|
|
1444
1455
|
scope: t.scope
|
|
1445
1456
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1446
|
-
])) :
|
|
1457
|
+
])) : M("", !0);
|
|
1447
1458
|
};
|
|
1448
1459
|
}
|
|
1449
|
-
}), kr = { class: "flex flex-col gap-16 w-full h-full" },
|
|
1460
|
+
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, $r = { class: "flex justify-between" }, Dr = { class: "fm-typo-en-body-lg-600" }, qr = { class: "flex flex-col gap-8" }, Ar = { class: "flex flex-col gap-4" }, Tr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Cr = { class: "flex gap-1" }, Pr = { class: "fm-typo-en-body-lg-600" }, Fr = {
|
|
1450
1461
|
key: 0,
|
|
1451
1462
|
class: "flex flex-col gap-4"
|
|
1452
|
-
},
|
|
1463
|
+
}, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Er = { class: "fm-typo-en-body-lg-600" }, Lr = { class: "flex flex-col gap-4" }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vr = { class: "fm-typo-en-body-lg-600" }, Ur = {
|
|
1453
1464
|
key: 1,
|
|
1454
1465
|
class: "flex flex-col gap-4"
|
|
1455
1466
|
}, Mr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kr = { class: "fm-typo-en-body-lg-600" }, jr = {
|
|
1456
1467
|
key: 2,
|
|
1457
1468
|
class: "flex flex-col gap-4"
|
|
1458
|
-
}, zr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Hr = { class: "fm-typo-en-body-lg-600" },
|
|
1469
|
+
}, zr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Hr = { class: "fm-typo-en-body-lg-600" }, Wr = {
|
|
1459
1470
|
key: 3,
|
|
1460
1471
|
class: "flex flex-col gap-4"
|
|
1461
|
-
},
|
|
1472
|
+
}, Gr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yr = { class: "fm-typo-en-body-lg-600" }, Qr = {
|
|
1462
1473
|
key: 4,
|
|
1463
1474
|
class: "flex flex-col gap-4"
|
|
1464
1475
|
}, Xr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zr = { class: "fm-typo-en-body-lg-600" }, Jr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "flex gap-8 items-center" }, rs = { class: "flex-1 fm-typo-en-body-lg-600" }, ss = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, ns = { class: "flex w-full gap-4" }, as = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, os = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, is = ["innerHTML"], ls = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, cs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, us = {
|
|
@@ -1479,13 +1490,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1479
1490
|
}, ws = { class: "flex-1 flex flex-col items-center" }, Rs = { class: "flex-1 flex flex-col items-center" }, Os = {
|
|
1480
1491
|
class: "py-12 flex flex-col gap-4",
|
|
1481
1492
|
name: "received-at header"
|
|
1482
|
-
}, Ns = { class: "fm-typo-en-body-lg-400" }, xs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ks = { class: "flex gap-12 content-stretch" },
|
|
1493
|
+
}, Ns = { class: "fm-typo-en-body-lg-400" }, xs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ks = { class: "flex gap-12 content-stretch" }, $s = {
|
|
1483
1494
|
class: "flex flex-col w-24",
|
|
1484
1495
|
name: "circles"
|
|
1485
|
-
},
|
|
1496
|
+
}, Ds = { class: "flex-1 flex flex-col items-center" }, qs = {
|
|
1486
1497
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1487
1498
|
name: "delivery details"
|
|
1488
|
-
},
|
|
1499
|
+
}, As = { class: "flex flex-col gap-8" }, Ts = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Cs = { class: "flex flex-col gap-4" }, Ps = { class: "flex gap-8 xs:flex-col" }, Ws = /* @__PURE__ */ he({
|
|
1489
1500
|
__name: "TransferDetails",
|
|
1490
1501
|
props: {
|
|
1491
1502
|
poRequest: {},
|
|
@@ -1500,7 +1511,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1500
1511
|
},
|
|
1501
1512
|
emits: ["update:show", "submitted"],
|
|
1502
1513
|
setup(p, { emit: e }) {
|
|
1503
|
-
const a = p, b = e, c =
|
|
1514
|
+
const a = p, b = e, c = Ge(), t = Fe(), u = Te(), i = me(), n = Pe(), h = Z(
|
|
1504
1515
|
() => {
|
|
1505
1516
|
var s, f;
|
|
1506
1517
|
return {
|
|
@@ -1508,23 +1519,23 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1508
1519
|
name: ((f = n.sessionUser.value) == null ? void 0 : f.displayName) ?? ""
|
|
1509
1520
|
};
|
|
1510
1521
|
}
|
|
1511
|
-
), _ = zt(), { t: v } =
|
|
1522
|
+
), _ = zt(), { t: v } = dt(), m = Z(
|
|
1512
1523
|
() => {
|
|
1513
|
-
var s, f, R,
|
|
1514
|
-
return ((f = (s = a.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : f.internal) === "restaurant" || ((
|
|
1524
|
+
var s, f, R, D;
|
|
1525
|
+
return ((f = (s = a.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : f.internal) === "restaurant" || ((D = (R = a.purchaseOrder) == null ? void 0 : R.supplier) == null ? void 0 : D.internal) === "warehouse" ? ye.TRANSFER : ye.PURCHASE;
|
|
1515
1526
|
}
|
|
1516
|
-
), l =
|
|
1527
|
+
), l = z(!1), r = z(""), d = z(!0), S = Ie(), x = It(S.getWorkflowConfig), I = mt(), A = Z(() => {
|
|
1517
1528
|
if (!a.purchaseOrder)
|
|
1518
1529
|
return [];
|
|
1519
1530
|
const s = x.result.value;
|
|
1520
|
-
if (s.state ===
|
|
1531
|
+
if (s.state === st.loading)
|
|
1521
1532
|
return [];
|
|
1522
1533
|
const f = {
|
|
1523
1534
|
user: h.value,
|
|
1524
1535
|
executedAt: i.locations.computeFirst(
|
|
1525
|
-
(
|
|
1526
|
-
var
|
|
1527
|
-
return
|
|
1536
|
+
(D) => {
|
|
1537
|
+
var B;
|
|
1538
|
+
return D.dbName === ((B = i._currentLocation) == null ? void 0 : B.dbName) ? D : null;
|
|
1528
1539
|
}
|
|
1529
1540
|
),
|
|
1530
1541
|
purchaseOrderRequest: a.poRequest,
|
|
@@ -1532,26 +1543,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1532
1543
|
};
|
|
1533
1544
|
let R = [];
|
|
1534
1545
|
try {
|
|
1535
|
-
s.state ===
|
|
1546
|
+
s.state === st.error ? (console.error("Error fetching workflow config:", s.error), R = Le.getAvailableActions({
|
|
1536
1547
|
...f,
|
|
1537
|
-
orderConfig:
|
|
1548
|
+
orderConfig: Le.getDefaultConfig()
|
|
1538
1549
|
}).actions.filter(
|
|
1539
|
-
(
|
|
1550
|
+
(D) => (
|
|
1540
1551
|
// TODO: create receiveStock & processRequest dialog
|
|
1541
1552
|
// to create their payload
|
|
1542
|
-
|
|
1553
|
+
D !== O.enum.receiveStock && D !== O.enum.processRequest && D !== O.enum.closeRequest
|
|
1543
1554
|
)
|
|
1544
|
-
)) : R =
|
|
1555
|
+
)) : R = Le.getAvailableActions({
|
|
1545
1556
|
...f,
|
|
1546
1557
|
orderConfig: s.data
|
|
1547
1558
|
}).actions.filter(
|
|
1548
|
-
(
|
|
1559
|
+
(D) => D !== O.enum.receiveStock && D !== O.enum.processRequest && D !== O.enum.closeRequest
|
|
1549
1560
|
);
|
|
1550
|
-
} catch (
|
|
1551
|
-
console.error("Error getting available actions:",
|
|
1561
|
+
} catch (D) {
|
|
1562
|
+
console.error("Error getting available actions:", D);
|
|
1552
1563
|
}
|
|
1553
|
-
return a.scope === "approval" && (R = R.filter((
|
|
1554
|
-
}),
|
|
1564
|
+
return a.scope === "approval" && (R = R.filter((D) => D !== O.enum.completeReceive)), R;
|
|
1565
|
+
}), C = $t(a, "show"), K = Z(() => [
|
|
1555
1566
|
{
|
|
1556
1567
|
label: v("inventory.transfer.receiveRequest.details.overview"),
|
|
1557
1568
|
value: "overview"
|
|
@@ -1560,23 +1571,23 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1560
1571
|
label: v("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1561
1572
|
value: "deliveryHistory"
|
|
1562
1573
|
}
|
|
1563
|
-
]), G =
|
|
1574
|
+
]), G = z(K.value[0]);
|
|
1564
1575
|
Ot(
|
|
1565
1576
|
() => a.show,
|
|
1566
1577
|
(s) => {
|
|
1567
1578
|
s && (G.value = K.value[0]);
|
|
1568
1579
|
}
|
|
1569
1580
|
);
|
|
1570
|
-
async function ce(s, f, R,
|
|
1571
|
-
return new Promise((
|
|
1581
|
+
async function ce(s, f, R, D, B) {
|
|
1582
|
+
return new Promise((j, te) => {
|
|
1572
1583
|
c.open({
|
|
1573
1584
|
closeButton: !1,
|
|
1574
|
-
title:
|
|
1575
|
-
message:
|
|
1576
|
-
primaryActions:
|
|
1585
|
+
title: D.title,
|
|
1586
|
+
message: D.message,
|
|
1587
|
+
primaryActions: D.primaryActions,
|
|
1577
1588
|
secondaryActions: { text: "No", close: !1 }
|
|
1578
1589
|
}).onPrimary(async () => {
|
|
1579
|
-
var L, Y, Q,
|
|
1590
|
+
var L, Y, Q, E;
|
|
1580
1591
|
const y = [];
|
|
1581
1592
|
R === O.enum.approveRequest ? (y.push({
|
|
1582
1593
|
action: "approveRequest",
|
|
@@ -1607,7 +1618,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1607
1618
|
payload: null
|
|
1608
1619
|
});
|
|
1609
1620
|
try {
|
|
1610
|
-
await
|
|
1621
|
+
await I({
|
|
1611
1622
|
operate: {
|
|
1612
1623
|
operation: R,
|
|
1613
1624
|
doc: s,
|
|
@@ -1620,33 +1631,33 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1620
1631
|
payloads: y
|
|
1621
1632
|
// add payload if action is receiveStock or processRequest
|
|
1622
1633
|
},
|
|
1623
|
-
transferTo: (
|
|
1624
|
-
}).delayed(1e3),
|
|
1625
|
-
} catch (
|
|
1626
|
-
|
|
1634
|
+
transferTo: (E = (Q = a.poRequest) == null ? void 0 : Q.to) == null ? void 0 : E.dbName
|
|
1635
|
+
}).delayed(1e3), j("submitted");
|
|
1636
|
+
} catch (re) {
|
|
1637
|
+
te(re);
|
|
1627
1638
|
}
|
|
1628
1639
|
}).onSecondary(() => {
|
|
1629
|
-
|
|
1630
|
-
for (let y = 0; y <
|
|
1640
|
+
j("cancelled");
|
|
1641
|
+
for (let y = 0; y < B + 2; y++)
|
|
1631
1642
|
c.close();
|
|
1632
1643
|
}).onClose(() => {
|
|
1633
1644
|
});
|
|
1634
1645
|
});
|
|
1635
1646
|
}
|
|
1636
1647
|
async function le(s) {
|
|
1637
|
-
var
|
|
1648
|
+
var B, j, te, y;
|
|
1638
1649
|
if (s === O.enum.receiveStock)
|
|
1639
1650
|
return;
|
|
1640
|
-
const f =
|
|
1651
|
+
const f = ft[s];
|
|
1641
1652
|
if (!f) {
|
|
1642
1653
|
t.open({
|
|
1643
1654
|
title: "Something went wrong",
|
|
1644
|
-
message: `Cannot process order: ${
|
|
1655
|
+
message: `Cannot process order: ${We(s)}`,
|
|
1645
1656
|
type: "error"
|
|
1646
1657
|
});
|
|
1647
1658
|
return;
|
|
1648
1659
|
}
|
|
1649
|
-
const { successMessage: R, ...
|
|
1660
|
+
const { successMessage: R, ...D } = f;
|
|
1650
1661
|
if (a.purchaseOrder) {
|
|
1651
1662
|
r.value = `${s}`, l.value = !0, d.value = !1;
|
|
1652
1663
|
const L = {};
|
|
@@ -1655,23 +1666,23 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1655
1666
|
s === O.enum.completeReceive) && u.autoReceiveWarehouse)
|
|
1656
1667
|
L.autoReceive = !0;
|
|
1657
1668
|
else if ((s === O.enum.approveRequest || s === O.enum.processRequest) && u.acceptRequireFulfillment) {
|
|
1658
|
-
const Q = (
|
|
1659
|
-
if (Q &&
|
|
1660
|
-
const
|
|
1669
|
+
const Q = (j = (B = a.poRequest) == null ? void 0 : B.from) == null ? void 0 : j.dbName, E = (y = (te = a.poRequest) == null ? void 0 : te.to) == null ? void 0 : y.dbName;
|
|
1670
|
+
if (Q && E && (Q.startsWith("warehouse_") || E.startsWith("warehouse_"))) {
|
|
1671
|
+
const re = await new Promise((V, de) => {
|
|
1661
1672
|
c.open({
|
|
1662
1673
|
closeButton: !1,
|
|
1663
1674
|
title: "Confirm transfer amount",
|
|
1664
1675
|
dialogComponent: jt,
|
|
1665
1676
|
dialogComponentProps: {
|
|
1666
1677
|
purchaseOrder: a.purchaseOrder,
|
|
1667
|
-
confirm:
|
|
1678
|
+
confirm: V,
|
|
1668
1679
|
"onUpdate:show": (pe) => {
|
|
1669
1680
|
pe || (r.value = "", l.value = !1, d.value = !0, Y++, c.close()), de("cancelled");
|
|
1670
1681
|
}
|
|
1671
1682
|
}
|
|
1672
1683
|
});
|
|
1673
1684
|
});
|
|
1674
|
-
L.fulfillment =
|
|
1685
|
+
L.fulfillment = re;
|
|
1675
1686
|
}
|
|
1676
1687
|
}
|
|
1677
1688
|
try {
|
|
@@ -1699,15 +1710,16 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1699
1710
|
}
|
|
1700
1711
|
const be = Z(() => {
|
|
1701
1712
|
var s, f;
|
|
1702
|
-
return ((s = a.purchaseOrder) == null ? void 0 : s.status) ===
|
|
1703
|
-
}),
|
|
1713
|
+
return ((s = a.purchaseOrder) == null ? void 0 : s.status) === J.enum.RECEIVING || ((f = a.purchaseOrder) == null ? void 0 : f.status) === J.enum.COMPLETE;
|
|
1714
|
+
}), Ee = Z(() => {
|
|
1704
1715
|
const s = a.purchaseOrder;
|
|
1705
1716
|
if (!s) return;
|
|
1706
|
-
const f =
|
|
1707
|
-
|
|
1717
|
+
const f = qe(s), { partial: R, over: D } = je(f), B = ze(s.status, R, D);
|
|
1718
|
+
let j = v(`inventory.transfer.status.${B}`);
|
|
1719
|
+
return B === J.enum.CLOSE && (j = `${v(`inventory.transfer.status.${J.enum.COMPLETE}`)} (${j})`), j;
|
|
1708
1720
|
}), ue = Z(() => {
|
|
1709
|
-
var
|
|
1710
|
-
const s = ((
|
|
1721
|
+
var j, te;
|
|
1722
|
+
const s = ((j = a.purchaseOrder) == null ? void 0 : j.deliveryOrder) ?? [], f = ((te = a.purchaseOrder) == null ? void 0 : te.deliveryFullfillment) ?? [], R = [
|
|
1711
1723
|
...s.map((y) => ({
|
|
1712
1724
|
createdAt: y.createdAt,
|
|
1713
1725
|
type: "grn",
|
|
@@ -1720,12 +1732,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1720
1732
|
}))
|
|
1721
1733
|
];
|
|
1722
1734
|
R.reverse().sort((y, L) => y.createdAt.localeCompare(L.createdAt));
|
|
1723
|
-
function
|
|
1724
|
-
var Q,
|
|
1725
|
-
const L = f.findIndex((
|
|
1726
|
-
(
|
|
1735
|
+
function D(y) {
|
|
1736
|
+
var Q, E, re, V, de, pe, we, Re, U;
|
|
1737
|
+
const L = f.findIndex((P) => P.id === y.fullfillmentId), Y = [
|
|
1738
|
+
(E = (Q = f[L]) == null ? void 0 : Q.netSuite) != null && E.refNo ? {
|
|
1727
1739
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1728
|
-
values: [(
|
|
1740
|
+
values: [(V = (re = f[L]) == null ? void 0 : re.netSuite) == null ? void 0 : V.refNo]
|
|
1729
1741
|
} : null,
|
|
1730
1742
|
(de = y == null ? void 0 : y.netSuite) != null && de.refNo ? {
|
|
1731
1743
|
label: "Netsuite ref no.",
|
|
@@ -1733,90 +1745,90 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1733
1745
|
} : null,
|
|
1734
1746
|
(we = y == null ? void 0 : y.netSuite) != null && we.recordType ? {
|
|
1735
1747
|
label: "Netsuite Type",
|
|
1736
|
-
values: [
|
|
1748
|
+
values: [lt((Re = y == null ? void 0 : y.netSuite) == null ? void 0 : Re.recordType)]
|
|
1737
1749
|
} : null
|
|
1738
1750
|
];
|
|
1739
1751
|
return {
|
|
1740
1752
|
header: "Received",
|
|
1741
|
-
date:
|
|
1753
|
+
date: Be(new Date(y.createdAt)),
|
|
1742
1754
|
info: [
|
|
1743
1755
|
{
|
|
1744
1756
|
label: "Adjustment date",
|
|
1745
1757
|
values: [
|
|
1746
|
-
y.adjustment ?
|
|
1758
|
+
y.adjustment ? Be(new Date(St(y.adjustment))) : "-"
|
|
1747
1759
|
]
|
|
1748
1760
|
},
|
|
1749
1761
|
{
|
|
1750
1762
|
label: "Received by",
|
|
1751
|
-
values: [(
|
|
1763
|
+
values: [(U = y.createdBy) == null ? void 0 : U.name]
|
|
1752
1764
|
},
|
|
1753
1765
|
{
|
|
1754
1766
|
label: "Received items",
|
|
1755
|
-
values: y.received.map((
|
|
1767
|
+
values: y.received.map((P) => {
|
|
1756
1768
|
var X;
|
|
1757
|
-
return
|
|
1758
|
-
|
|
1769
|
+
return q("div", [
|
|
1770
|
+
q(
|
|
1759
1771
|
"div",
|
|
1760
1772
|
{
|
|
1761
1773
|
class: "flex gap-4"
|
|
1762
1774
|
},
|
|
1763
1775
|
[
|
|
1764
|
-
|
|
1776
|
+
q(
|
|
1765
1777
|
"div",
|
|
1766
1778
|
{
|
|
1767
1779
|
class: "flex flex-col"
|
|
1768
1780
|
},
|
|
1769
1781
|
[
|
|
1770
|
-
|
|
1782
|
+
q(
|
|
1771
1783
|
"span",
|
|
1772
1784
|
{
|
|
1773
1785
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1774
1786
|
},
|
|
1775
|
-
`${
|
|
1787
|
+
`${P.sku.name}`
|
|
1776
1788
|
),
|
|
1777
|
-
|
|
1789
|
+
q(
|
|
1778
1790
|
"span",
|
|
1779
1791
|
{
|
|
1780
1792
|
class: "fm-typo-en-body-md-400"
|
|
1781
1793
|
},
|
|
1782
|
-
`${
|
|
1794
|
+
`${P.sku.code} `
|
|
1783
1795
|
)
|
|
1784
1796
|
]
|
|
1785
1797
|
),
|
|
1786
|
-
|
|
1798
|
+
q(
|
|
1787
1799
|
"div",
|
|
1788
1800
|
{
|
|
1789
1801
|
class: "ml-auto flex flex-col"
|
|
1790
1802
|
},
|
|
1791
1803
|
[
|
|
1792
|
-
|
|
1804
|
+
q(
|
|
1793
1805
|
"div",
|
|
1794
1806
|
{
|
|
1795
1807
|
class: "ml-auto flex gap-1"
|
|
1796
1808
|
},
|
|
1797
1809
|
[
|
|
1798
|
-
|
|
1810
|
+
q(
|
|
1799
1811
|
"span",
|
|
1800
1812
|
{
|
|
1801
1813
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1802
1814
|
},
|
|
1803
|
-
fe(
|
|
1815
|
+
fe(P.amount, !1)
|
|
1804
1816
|
),
|
|
1805
|
-
|
|
1817
|
+
q(
|
|
1806
1818
|
"span",
|
|
1807
1819
|
{
|
|
1808
1820
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1809
1821
|
},
|
|
1810
|
-
((X =
|
|
1822
|
+
((X = P.measurement) == null ? void 0 : X.abbrev) ?? P.sku.unit.abbrev
|
|
1811
1823
|
)
|
|
1812
1824
|
]
|
|
1813
1825
|
),
|
|
1814
|
-
|
|
1826
|
+
q(
|
|
1815
1827
|
"div",
|
|
1816
1828
|
{
|
|
1817
1829
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1818
1830
|
},
|
|
1819
|
-
`${
|
|
1831
|
+
`${P.cost ? `(${xe(P.cost)})` : ""}`
|
|
1820
1832
|
)
|
|
1821
1833
|
]
|
|
1822
1834
|
)
|
|
@@ -1838,15 +1850,15 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1838
1850
|
values: [`${L + 1}`]
|
|
1839
1851
|
} : null,
|
|
1840
1852
|
...Y
|
|
1841
|
-
].filter((
|
|
1853
|
+
].filter((P) => P)
|
|
1842
1854
|
};
|
|
1843
1855
|
}
|
|
1844
|
-
function
|
|
1856
|
+
function B(y) {
|
|
1845
1857
|
var Y, Q;
|
|
1846
|
-
const L = f.findIndex((
|
|
1858
|
+
const L = f.findIndex((E) => E.id === y.id);
|
|
1847
1859
|
return {
|
|
1848
1860
|
header: "Fulfillment",
|
|
1849
|
-
date:
|
|
1861
|
+
date: Be(new Date(y.createdAt)),
|
|
1850
1862
|
info: [
|
|
1851
1863
|
{
|
|
1852
1864
|
label: "Sequence",
|
|
@@ -1854,71 +1866,71 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1854
1866
|
},
|
|
1855
1867
|
{
|
|
1856
1868
|
label: "Receiveable items",
|
|
1857
|
-
values: y.items.map((
|
|
1858
|
-
var
|
|
1859
|
-
return
|
|
1860
|
-
|
|
1869
|
+
values: y.items.map((E) => {
|
|
1870
|
+
var re;
|
|
1871
|
+
return q("div", [
|
|
1872
|
+
q(
|
|
1861
1873
|
"div",
|
|
1862
1874
|
{
|
|
1863
1875
|
class: "flex gap-4"
|
|
1864
1876
|
},
|
|
1865
1877
|
[
|
|
1866
|
-
|
|
1878
|
+
q(
|
|
1867
1879
|
"div",
|
|
1868
1880
|
{
|
|
1869
1881
|
class: "flex flex-col"
|
|
1870
1882
|
},
|
|
1871
1883
|
[
|
|
1872
|
-
|
|
1884
|
+
q(
|
|
1873
1885
|
"span",
|
|
1874
1886
|
{
|
|
1875
1887
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1876
1888
|
},
|
|
1877
|
-
`${
|
|
1889
|
+
`${E.sku.name}`
|
|
1878
1890
|
),
|
|
1879
|
-
|
|
1891
|
+
q(
|
|
1880
1892
|
"span",
|
|
1881
1893
|
{
|
|
1882
1894
|
class: "fm-typo-en-body-md-400"
|
|
1883
1895
|
},
|
|
1884
|
-
`${
|
|
1896
|
+
`${E.sku.code} `
|
|
1885
1897
|
)
|
|
1886
1898
|
]
|
|
1887
1899
|
),
|
|
1888
|
-
|
|
1900
|
+
q(
|
|
1889
1901
|
"div",
|
|
1890
1902
|
{
|
|
1891
1903
|
class: "ml-auto flex flex-col"
|
|
1892
1904
|
},
|
|
1893
1905
|
[
|
|
1894
|
-
|
|
1906
|
+
q(
|
|
1895
1907
|
"div",
|
|
1896
1908
|
{
|
|
1897
1909
|
class: "ml-auto flex gap-1"
|
|
1898
1910
|
},
|
|
1899
1911
|
[
|
|
1900
|
-
|
|
1912
|
+
q(
|
|
1901
1913
|
"span",
|
|
1902
1914
|
{
|
|
1903
1915
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1904
1916
|
},
|
|
1905
|
-
fe(
|
|
1917
|
+
fe(E.amount, !1)
|
|
1906
1918
|
),
|
|
1907
|
-
|
|
1919
|
+
q(
|
|
1908
1920
|
"span",
|
|
1909
1921
|
{
|
|
1910
1922
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1911
1923
|
},
|
|
1912
|
-
((
|
|
1924
|
+
((re = E.measurement) == null ? void 0 : re.abbrev) ?? E.sku.unit.abbrev
|
|
1913
1925
|
)
|
|
1914
1926
|
]
|
|
1915
1927
|
),
|
|
1916
|
-
|
|
1928
|
+
q(
|
|
1917
1929
|
"div",
|
|
1918
1930
|
{
|
|
1919
1931
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1920
1932
|
},
|
|
1921
|
-
`${
|
|
1933
|
+
`${E.cost ? `(${xe(E.cost)})` : ""}`
|
|
1922
1934
|
)
|
|
1923
1935
|
]
|
|
1924
1936
|
)
|
|
@@ -1931,120 +1943,120 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1931
1943
|
label: "Ref no. (Netsuite)",
|
|
1932
1944
|
values: [(Q = y.netSuite) == null ? void 0 : Q.refNo]
|
|
1933
1945
|
} : null
|
|
1934
|
-
].filter((
|
|
1946
|
+
].filter((E) => E)
|
|
1935
1947
|
};
|
|
1936
1948
|
}
|
|
1937
1949
|
return R.map((y) => {
|
|
1938
1950
|
switch (y.type) {
|
|
1939
1951
|
case "grn":
|
|
1940
|
-
return
|
|
1952
|
+
return D(y.doc);
|
|
1941
1953
|
case "fulfillment":
|
|
1942
|
-
return
|
|
1954
|
+
return B(y.doc);
|
|
1943
1955
|
}
|
|
1944
1956
|
});
|
|
1945
1957
|
}), k = Z(() => {
|
|
1946
1958
|
var f;
|
|
1947
1959
|
const s = {
|
|
1948
|
-
...
|
|
1949
|
-
currency:
|
|
1960
|
+
...ot(0),
|
|
1961
|
+
currency: rt()
|
|
1950
1962
|
};
|
|
1951
|
-
return ((f = a.purchaseOrder) == null ? void 0 : f.items.reduce((R,
|
|
1952
|
-
...
|
|
1953
|
-
currency:
|
|
1963
|
+
return ((f = a.purchaseOrder) == null ? void 0 : f.items.reduce((R, D) => ({
|
|
1964
|
+
...at(R, D.totalCost ?? s),
|
|
1965
|
+
currency: rt()
|
|
1954
1966
|
}), s)) ?? s;
|
|
1955
1967
|
});
|
|
1956
1968
|
function T(s) {
|
|
1957
|
-
var
|
|
1958
|
-
const R = (((
|
|
1959
|
-
return `<span class="${
|
|
1969
|
+
var j;
|
|
1970
|
+
const R = (((j = a.purchaseOrder) == null ? void 0 : j.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id, D = a.receivedMap[R];
|
|
1971
|
+
return `<span class="${W(s)} fm-typo-en-body-lg-600">${wt.toFormatString({ value: D.received })}</span>/${At(s.quantity, s.sku.unit, s.measurement)}`;
|
|
1960
1972
|
}
|
|
1961
|
-
function
|
|
1973
|
+
function W(s) {
|
|
1962
1974
|
var L;
|
|
1963
|
-
const R = (((L = a.purchaseOrder) == null ? void 0 : L.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id,
|
|
1964
|
-
return
|
|
1975
|
+
const R = (((L = a.purchaseOrder) == null ? void 0 : L.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id, D = a.receivedMap[R], { isPartialReceive: B, isNoReceive: j, isOverReceive: te, isFullReceive: y } = Lt(D);
|
|
1976
|
+
return j ? "text-fm-color-typo-tertiary" : B ? "text-fm-color-system-warning-300" : te ? "text-fm-color-system-error-300" : y ? "text-fm-color-system-success-300" : "";
|
|
1965
1977
|
}
|
|
1966
1978
|
return (s, f) => {
|
|
1967
|
-
var
|
|
1968
|
-
const R =
|
|
1969
|
-
return g(),
|
|
1970
|
-
header: w(v)("inventory.transfer.receiveRequest.details.title") + ((
|
|
1971
|
-
modelValue: w(
|
|
1972
|
-
"onUpdate:modelValue": f[5] || (f[5] = (
|
|
1979
|
+
var E, re;
|
|
1980
|
+
const R = H("FmButtonGroup"), D = H("FmChip"), B = H("FmMenuDivider"), j = H("FmCard"), te = H("FmIcon"), y = H("FmTooltip"), L = H("FmSpacer"), Y = H("FmButton"), Q = H("FmSideSheet");
|
|
1981
|
+
return g(), ie(Q, {
|
|
1982
|
+
header: w(v)("inventory.transfer.receiveRequest.details.title") + ((E = s.purchaseOrder) != null && E.seqNumber ? ` #${(re = s.purchaseOrder) == null ? void 0 : re.seqNumber}` : ""),
|
|
1983
|
+
modelValue: w(C),
|
|
1984
|
+
"onUpdate:modelValue": f[5] || (f[5] = (V) => Nt(C) ? C.value = V : null),
|
|
1973
1985
|
"dismiss-away": d.value,
|
|
1974
1986
|
"close-button": "",
|
|
1975
1987
|
"max-width": 600
|
|
1976
1988
|
}, {
|
|
1977
|
-
default:
|
|
1978
|
-
var
|
|
1989
|
+
default: oe(() => {
|
|
1990
|
+
var V, de, pe, we, Re;
|
|
1979
1991
|
return [
|
|
1980
1992
|
o("div", kr, [
|
|
1981
1993
|
o("div", null, [
|
|
1982
|
-
|
|
1994
|
+
F(R, {
|
|
1983
1995
|
items: K.value,
|
|
1984
1996
|
modelValue: G.value,
|
|
1985
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
1997
|
+
"onUpdate:modelValue": f[0] || (f[0] = (U) => G.value = U)
|
|
1986
1998
|
}, null, 8, ["items", "modelValue"])
|
|
1987
1999
|
]),
|
|
1988
|
-
G.value.value === "overview" ? (g(), N(
|
|
2000
|
+
G.value.value === "overview" ? (g(), N(ne, { key: 0 }, [
|
|
1989
2001
|
o("div", null, [
|
|
1990
|
-
|
|
2002
|
+
F(j, {
|
|
1991
2003
|
variant: "outlined",
|
|
1992
2004
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1993
2005
|
}, {
|
|
1994
|
-
default:
|
|
1995
|
-
var
|
|
2006
|
+
default: oe(() => {
|
|
2007
|
+
var U, P, X, ge, _e, Ne, Ye, Qe, Xe, Ze, Je;
|
|
1996
2008
|
return [
|
|
1997
|
-
o("div",
|
|
1998
|
-
o("div",
|
|
2009
|
+
o("div", $r, [
|
|
2010
|
+
o("div", Dr, $(w(v)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1999
2011
|
o("div", null, [
|
|
2000
|
-
|
|
2001
|
-
label:
|
|
2002
|
-
class:
|
|
2012
|
+
F(D, {
|
|
2013
|
+
label: Ee.value,
|
|
2014
|
+
class: $e(`fm-status-badge fm-status-badge-${(P = (U = s.purchaseOrder) == null ? void 0 : U.status) == null ? void 0 : P.toLocaleLowerCase("en-us")}`),
|
|
2003
2015
|
compact: ""
|
|
2004
2016
|
}, null, 8, ["label", "class"])
|
|
2005
2017
|
])
|
|
2006
2018
|
]),
|
|
2007
|
-
|
|
2008
|
-
o("div",
|
|
2009
|
-
o("div",
|
|
2019
|
+
F(B),
|
|
2020
|
+
o("div", qr, [
|
|
2021
|
+
o("div", Ar, [
|
|
2010
2022
|
o("div", Tr, [
|
|
2011
|
-
o("div",
|
|
2023
|
+
o("div", Cr, $(w(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2012
2024
|
]),
|
|
2013
|
-
o("div",
|
|
2025
|
+
o("div", Pr, $(w(De)(((X = s.purchaseOrder) == null ? void 0 : X._id) ?? "")), 1)
|
|
2014
2026
|
]),
|
|
2015
|
-
(ge = s.purchaseOrder) != null && ge.effectiveAt ? (g(), N("div",
|
|
2016
|
-
o("div",
|
|
2017
|
-
o("div", Er,
|
|
2018
|
-
])) :
|
|
2027
|
+
(ge = s.purchaseOrder) != null && ge.effectiveAt ? (g(), N("div", Fr, [
|
|
2028
|
+
o("div", Ir, $(w(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2029
|
+
o("div", Er, $(w(it)(new Date((_e = s.purchaseOrder) == null ? void 0 : _e.effectiveAt))), 1)
|
|
2030
|
+
])) : M("", !0),
|
|
2019
2031
|
o("div", Lr, [
|
|
2020
|
-
o("div", Br,
|
|
2021
|
-
o("div", Vr,
|
|
2032
|
+
o("div", Br, $(w(v)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2033
|
+
o("div", Vr, $(w(v)(
|
|
2022
2034
|
`inventory.transfer.receiveRequest.details.type.${m.value.toLocaleLowerCase("en-US")}`
|
|
2023
2035
|
)), 1)
|
|
2024
2036
|
]),
|
|
2025
|
-
(
|
|
2026
|
-
o("div", Mr,
|
|
2027
|
-
o("div", Kr,
|
|
2028
|
-
])) :
|
|
2037
|
+
(Ye = (Ne = s.purchaseOrder) == null ? void 0 : Ne.supplier) != null && Ye.name ? (g(), N("div", Ur, [
|
|
2038
|
+
o("div", Mr, $(w(v)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2039
|
+
o("div", Kr, $((Xe = (Qe = s.purchaseOrder) == null ? void 0 : Qe.supplier) == null ? void 0 : Xe.name), 1)
|
|
2040
|
+
])) : M("", !0),
|
|
2029
2041
|
s.transferTo ? (g(), N("div", jr, [
|
|
2030
|
-
o("div", zr,
|
|
2031
|
-
o("div", Hr,
|
|
2032
|
-
])) :
|
|
2033
|
-
(
|
|
2034
|
-
o("div",
|
|
2035
|
-
o("div", Yr,
|
|
2036
|
-
])) :
|
|
2037
|
-
(
|
|
2038
|
-
o("div", Xr,
|
|
2039
|
-
o("div", Zr,
|
|
2040
|
-
])) :
|
|
2042
|
+
o("div", zr, $(w(v)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2043
|
+
o("div", Hr, $(s.transferTo), 1)
|
|
2044
|
+
])) : M("", !0),
|
|
2045
|
+
(Ze = s.purchaseOrder) != null && Ze.ref ? (g(), N("div", Wr, [
|
|
2046
|
+
o("div", Gr, $(w(v)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2047
|
+
o("div", Yr, $(s.purchaseOrder.ref), 1)
|
|
2048
|
+
])) : M("", !0),
|
|
2049
|
+
(Je = s.purchaseOrder) != null && Je.remark ? (g(), N("div", Qr, [
|
|
2050
|
+
o("div", Xr, $(w(v)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2051
|
+
o("div", Zr, $(s.purchaseOrder.remark), 1)
|
|
2052
|
+
])) : M("", !0)
|
|
2041
2053
|
])
|
|
2042
2054
|
];
|
|
2043
2055
|
}),
|
|
2044
2056
|
_: 1
|
|
2045
2057
|
})
|
|
2046
2058
|
]),
|
|
2047
|
-
|
|
2059
|
+
F(xr, {
|
|
2048
2060
|
"po-request": s.poRequest,
|
|
2049
2061
|
purchaseOrder: s.purchaseOrder,
|
|
2050
2062
|
transferType: m.value,
|
|
@@ -2055,84 +2067,84 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2055
2067
|
o("div", es, [
|
|
2056
2068
|
o("div", ts, [
|
|
2057
2069
|
o("span", rs, [
|
|
2058
|
-
|
|
2059
|
-
(de = (
|
|
2070
|
+
Ve($(be.value ? w(v)("inventory.transfer.receiveRequest.details.receivedItems") : w(v)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2071
|
+
(de = (V = s.purchaseOrder) == null ? void 0 : V.netSuite) != null && de.missingItems && ((we = (pe = s.purchaseOrder) == null ? void 0 : pe.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (g(), ie(y, {
|
|
2060
2072
|
key: 0,
|
|
2061
2073
|
variant: "rich",
|
|
2062
2074
|
placement: "top",
|
|
2063
2075
|
"z-index": 51
|
|
2064
2076
|
}, {
|
|
2065
|
-
content:
|
|
2066
|
-
var
|
|
2077
|
+
content: oe(() => {
|
|
2078
|
+
var U, P;
|
|
2067
2079
|
return [
|
|
2068
2080
|
o("div", ss, [
|
|
2069
|
-
(g(!0), N(
|
|
2081
|
+
(g(!0), N(ne, null, ve((P = (U = s.purchaseOrder) == null ? void 0 : U.netSuite) == null ? void 0 : P.missingItems, (X, ge) => (g(), N("div", {
|
|
2070
2082
|
class: "flex justify-center align-middle",
|
|
2071
2083
|
key: ge
|
|
2072
2084
|
}, [
|
|
2073
|
-
|
|
2085
|
+
F(te, {
|
|
2074
2086
|
name: "arrow_right",
|
|
2075
2087
|
size: "sm"
|
|
2076
2088
|
}),
|
|
2077
|
-
|
|
2089
|
+
Ve(" " + $(`(${X.netSuiteId}) ${X.name}: ${X.reason}`), 1)
|
|
2078
2090
|
]))), 128))
|
|
2079
2091
|
])
|
|
2080
2092
|
];
|
|
2081
2093
|
}),
|
|
2082
|
-
default:
|
|
2083
|
-
|
|
2094
|
+
default: oe(() => [
|
|
2095
|
+
F(te, {
|
|
2084
2096
|
name: "error",
|
|
2085
2097
|
color: "#ff2c2c",
|
|
2086
2098
|
size: "sm"
|
|
2087
2099
|
})
|
|
2088
2100
|
]),
|
|
2089
2101
|
_: 1
|
|
2090
|
-
})) :
|
|
2102
|
+
})) : M("", !0)
|
|
2091
2103
|
])
|
|
2092
2104
|
]),
|
|
2093
|
-
|
|
2094
|
-
(g(!0), N(
|
|
2095
|
-
var
|
|
2105
|
+
F(B),
|
|
2106
|
+
(g(!0), N(ne, null, ve(((Re = s.purchaseOrder) == null ? void 0 : Re.items) ?? [], (U) => {
|
|
2107
|
+
var P;
|
|
2096
2108
|
return g(), N("div", {
|
|
2097
|
-
key:
|
|
2109
|
+
key: U.code,
|
|
2098
2110
|
class: "flex flex-col"
|
|
2099
2111
|
}, [
|
|
2100
2112
|
o("div", ns, [
|
|
2101
|
-
o("div", as,
|
|
2113
|
+
o("div", as, $(U.name), 1),
|
|
2102
2114
|
o("div", os, [
|
|
2103
2115
|
o("span", {
|
|
2104
|
-
innerHTML: T(
|
|
2116
|
+
innerHTML: T(U)
|
|
2105
2117
|
}, null, 8, is)
|
|
2106
2118
|
])
|
|
2107
2119
|
]),
|
|
2108
2120
|
o("div", ls, [
|
|
2109
|
-
o("div", cs,
|
|
2110
|
-
(
|
|
2121
|
+
o("div", cs, $(U.code), 1),
|
|
2122
|
+
(P = U.totalCost) != null && P.amount && w(u).enableTotalCost ? (g(), N("div", us, " (" + $(w(xe)(U.totalCost)) + ") ", 1)) : M("", !0)
|
|
2111
2123
|
])
|
|
2112
2124
|
]);
|
|
2113
2125
|
}), 128)),
|
|
2114
|
-
+w(fe)(k.value) ? (g(), N(
|
|
2126
|
+
+w(fe)(k.value) ? (g(), N(ne, { key: 0 }, [
|
|
2115
2127
|
o("div", ds, [
|
|
2116
|
-
|
|
2128
|
+
F(B)
|
|
2117
2129
|
]),
|
|
2118
2130
|
o("div", fs, [
|
|
2119
2131
|
f[6] || (f[6] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2120
|
-
o("div", ms,
|
|
2132
|
+
o("div", ms, $(w(xe)(k.value)), 1)
|
|
2121
2133
|
])
|
|
2122
|
-
], 64)) :
|
|
2134
|
+
], 64)) : M("", !0)
|
|
2123
2135
|
])
|
|
2124
2136
|
])
|
|
2125
2137
|
], 64)) : G.value.value === "deliveryHistory" ? (g(), N("div", ps, [
|
|
2126
2138
|
ue.value.length ? (g(), N("div", gs, [
|
|
2127
|
-
(g(!0), N(
|
|
2139
|
+
(g(!0), N(ne, null, ve(ue.value, (U, P) => (g(), N(ne, { key: P }, [
|
|
2128
2140
|
o("div", _s, [
|
|
2129
2141
|
o("div", Ss, [
|
|
2130
2142
|
o("div", ws, [
|
|
2131
2143
|
o("div", {
|
|
2132
|
-
class:
|
|
2144
|
+
class: $e([
|
|
2133
2145
|
{
|
|
2134
|
-
"bg-fm-color-primary":
|
|
2135
|
-
"bg-white":
|
|
2146
|
+
"bg-fm-color-primary": P !== 0,
|
|
2147
|
+
"bg-white": P === 0
|
|
2136
2148
|
},
|
|
2137
2149
|
"w-[2px] h-full"
|
|
2138
2150
|
])
|
|
@@ -2141,10 +2153,10 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2141
2153
|
f[7] || (f[7] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
2142
2154
|
o("div", Rs, [
|
|
2143
2155
|
o("div", {
|
|
2144
|
-
class:
|
|
2156
|
+
class: $e([
|
|
2145
2157
|
{
|
|
2146
|
-
"bg-fm-color-primary":
|
|
2147
|
-
"bg-white":
|
|
2158
|
+
"bg-fm-color-primary": P < ue.value.length - 1,
|
|
2159
|
+
"bg-white": P >= ue.value.length - 1
|
|
2148
2160
|
},
|
|
2149
2161
|
"w-[2px] h-full"
|
|
2150
2162
|
])
|
|
@@ -2152,44 +2164,44 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2152
2164
|
])
|
|
2153
2165
|
]),
|
|
2154
2166
|
o("div", Os, [
|
|
2155
|
-
o("div", Ns,
|
|
2156
|
-
o("div", xs,
|
|
2167
|
+
o("div", Ns, $(U.header), 1),
|
|
2168
|
+
o("div", xs, $(U.date), 1)
|
|
2157
2169
|
])
|
|
2158
2170
|
]),
|
|
2159
2171
|
o("div", ks, [
|
|
2160
|
-
o("div",
|
|
2161
|
-
o("div",
|
|
2172
|
+
o("div", $s, [
|
|
2173
|
+
o("div", Ds, [
|
|
2162
2174
|
o("div", {
|
|
2163
|
-
class:
|
|
2175
|
+
class: $e([
|
|
2164
2176
|
{
|
|
2165
|
-
"bg-fm-color-primary":
|
|
2166
|
-
"bg-white":
|
|
2177
|
+
"bg-fm-color-primary": P < ue.value.length - 1,
|
|
2178
|
+
"bg-white": P >= ue.value.length - 1
|
|
2167
2179
|
},
|
|
2168
2180
|
"w-[2px] h-full"
|
|
2169
2181
|
])
|
|
2170
2182
|
}, null, 2)
|
|
2171
2183
|
])
|
|
2172
2184
|
]),
|
|
2173
|
-
o("div",
|
|
2174
|
-
|
|
2185
|
+
o("div", qs, [
|
|
2186
|
+
F(j, {
|
|
2175
2187
|
variant: "outlined",
|
|
2176
2188
|
class: "py-12 px-16"
|
|
2177
2189
|
}, {
|
|
2178
|
-
default:
|
|
2179
|
-
o("div",
|
|
2180
|
-
(g(!0), N(
|
|
2190
|
+
default: oe(() => [
|
|
2191
|
+
o("div", As, [
|
|
2192
|
+
(g(!0), N(ne, null, ve(U.info, (X, ge) => (g(), N("div", {
|
|
2181
2193
|
key: ge,
|
|
2182
2194
|
class: "flex flex-col gap-4"
|
|
2183
2195
|
}, [
|
|
2184
|
-
o("div", Ts,
|
|
2185
|
-
o("div",
|
|
2186
|
-
(g(!0), N(
|
|
2196
|
+
o("div", Ts, $(X == null ? void 0 : X.label), 1),
|
|
2197
|
+
o("div", Cs, [
|
|
2198
|
+
(g(!0), N(ne, null, ve(X == null ? void 0 : X.values, (_e, Ne) => (g(), N("div", {
|
|
2187
2199
|
key: Ne,
|
|
2188
2200
|
class: "fm-typo-en-body-lg-600"
|
|
2189
2201
|
}, [
|
|
2190
|
-
typeof _e == "string" ? (g(), N(
|
|
2191
|
-
|
|
2192
|
-
], 64)) : (g(),
|
|
2202
|
+
typeof _e == "string" ? (g(), N(ne, { key: 0 }, [
|
|
2203
|
+
Ve($(_e), 1)
|
|
2204
|
+
], 64)) : (g(), ie(xt(_e), { key: 1 }))
|
|
2193
2205
|
]))), 128))
|
|
2194
2206
|
])
|
|
2195
2207
|
]))), 128))
|
|
@@ -2201,59 +2213,59 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2201
2213
|
])
|
|
2202
2214
|
], 64))), 128))
|
|
2203
2215
|
])) : (g(), N("div", vs, [
|
|
2204
|
-
|
|
2216
|
+
F(L),
|
|
2205
2217
|
o("div", null, [
|
|
2206
2218
|
o("img", {
|
|
2207
2219
|
src: w(Tt),
|
|
2208
2220
|
alt: "List is empty"
|
|
2209
2221
|
}, null, 8, ys)
|
|
2210
2222
|
]),
|
|
2211
|
-
o("div", hs,
|
|
2212
|
-
o("div", bs,
|
|
2213
|
-
|
|
2214
|
-
|
|
2223
|
+
o("div", hs, $(w(v)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2224
|
+
o("div", bs, $(w(v)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2225
|
+
F(L),
|
|
2226
|
+
F(L)
|
|
2215
2227
|
]))
|
|
2216
|
-
])) :
|
|
2228
|
+
])) : M("", !0)
|
|
2217
2229
|
])
|
|
2218
2230
|
];
|
|
2219
2231
|
}),
|
|
2220
|
-
"side-sheet-footer":
|
|
2221
|
-
o("div",
|
|
2222
|
-
(g(!0), N(
|
|
2223
|
-
w(
|
|
2224
|
-
key:
|
|
2225
|
-
label: w(v)(w(
|
|
2226
|
-
onClick: (de) => le(
|
|
2227
|
-
loading: r.value ===
|
|
2228
|
-
disabled: r.value !==
|
|
2229
|
-
variant: w(
|
|
2230
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
2232
|
+
"side-sheet-footer": oe(() => [
|
|
2233
|
+
o("div", Ps, [
|
|
2234
|
+
(g(!0), N(ne, null, ve(A.value, (V) => (g(), N(ne, null, [
|
|
2235
|
+
w(Me)[V].available != !1 ? (g(), ie(Y, {
|
|
2236
|
+
key: V,
|
|
2237
|
+
label: w(v)(w(Me)[V].translationKey),
|
|
2238
|
+
onClick: (de) => le(V),
|
|
2239
|
+
loading: r.value === V,
|
|
2240
|
+
disabled: r.value !== V && l.value,
|
|
2241
|
+
variant: w(Me)[V].buttonVariant
|
|
2242
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
|
|
2231
2243
|
], 64))), 256)),
|
|
2232
|
-
w(_).ableToMarkReceived(s.purchaseOrder) &&
|
|
2244
|
+
w(_).ableToMarkReceived(s.purchaseOrder) && !A.value.includes("completeReceive") ? (g(), ie(Y, {
|
|
2233
2245
|
key: 0,
|
|
2234
2246
|
label: w(v)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2235
|
-
onClick: f[1] || (f[1] = (
|
|
2247
|
+
onClick: f[1] || (f[1] = (V) => le("completeReceive")),
|
|
2236
2248
|
loading: r.value === "completeReceive",
|
|
2237
2249
|
disabled: r.value !== "completeReceive" && l.value
|
|
2238
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
2239
|
-
w(_).ableToMarkApproved(s.purchaseOrder) && s.canApprove &&
|
|
2250
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
2251
|
+
w(_).ableToMarkApproved(s.purchaseOrder) && s.canApprove && !A.value.includes("approveRequest") ? (g(), ie(Y, {
|
|
2240
2252
|
key: 1,
|
|
2241
2253
|
label: w(v)("inventory.transfer.approval.actions.approveRequest"),
|
|
2242
|
-
onClick: f[2] || (f[2] = (
|
|
2254
|
+
onClick: f[2] || (f[2] = (V) => le("approveRequest")),
|
|
2243
2255
|
loading: r.value === "approveRequest",
|
|
2244
2256
|
disabled: r.value !== "approveRequest" && l.value
|
|
2245
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
2246
|
-
w(_).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && a.scope === "approval" ? (g(),
|
|
2257
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
2258
|
+
w(_).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && a.scope === "approval" ? (g(), ie(Y, {
|
|
2247
2259
|
key: 2,
|
|
2248
2260
|
label: w(v)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2249
|
-
onClick: f[3] || (f[3] = (
|
|
2261
|
+
onClick: f[3] || (f[3] = (V) => le("processRequest")),
|
|
2250
2262
|
loading: r.value === "processRequest",
|
|
2251
2263
|
disabled: r.value !== "processRequest" && l.value
|
|
2252
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
2253
|
-
|
|
2264
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
2265
|
+
F(Y, {
|
|
2254
2266
|
label: w(v)("common.close"),
|
|
2255
2267
|
variant: "tertiary",
|
|
2256
|
-
onClick: f[4] || (f[4] = (
|
|
2268
|
+
onClick: f[4] || (f[4] = (V) => b("update:show", !1))
|
|
2257
2269
|
}, null, 8, ["label"])
|
|
2258
2270
|
])
|
|
2259
2271
|
]),
|
|
@@ -2263,8 +2275,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2263
2275
|
}
|
|
2264
2276
|
});
|
|
2265
2277
|
export {
|
|
2266
|
-
|
|
2267
|
-
|
|
2278
|
+
He as P,
|
|
2279
|
+
Ws as _,
|
|
2268
2280
|
zs as a,
|
|
2269
2281
|
Hs as b,
|
|
2270
2282
|
Bt as g,
|