@feedmepos/mf-inventory-portal 1.0.15-dev.1 → 1.0.15-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-DtuHbzaj.js → App-CgxrN-aD.js} +2 -2
- package/dist/{ApprovalView-C8gHcI4o.js → ApprovalView-DNGhkVc9.js} +2 -2
- package/dist/{BindingsDialog-CLp5DbdF.js → BindingsDialog-B_ZMDl-b.js} +2 -2
- package/dist/{BindingsPicker-ChB_dM_r.js → BindingsPicker-B84BG8zT.js} +1 -1
- package/dist/{BindingsTable-usQiwRyf.js → BindingsTable-DrvoykYc.js} +1 -1
- package/dist/{ClosingDraftView-C7mlsyK5.js → ClosingDraftView-Ds9sI2Eg.js} +2 -2
- package/dist/{ClosingTemplateView-C3csSJ5x.js → ClosingTemplateView-BhZ1OXkD.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-DGI0Mk4p.js → DeliveryOrderPrintPreview-Yuxf-jCh.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D8iQyzaJ.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6ktiUO5.js} +3 -3
- package/dist/{FmMultiselectDialog-B3MYE2b7.js → FmMultiselectDialog-4lVsA2Rn.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DFidOxdU.js → FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CIKQ6nC1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B3PvtR0j.js} +1 -1
- package/dist/{IngredientGroupView-91WE1P4g.js → IngredientGroupView-usK9stxT.js} +2 -2
- package/dist/{IngredientsView-CLZX2W7Y.js → IngredientsView-DPx8Z2zo.js} +4 -4
- package/dist/{IntegrationView-D8VbNV6H.js → IntegrationView-BnrCkjWt.js} +177 -175
- package/dist/{InventoryBindingForm-rGVDi4T8.js → InventoryBindingForm-uyHh2TI_.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dx4rHyb5.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CECDj9Pw.js} +3 -3
- package/dist/{InventoryBindingSummary-BGLbSQRD.js → InventoryBindingSummary-DyHCqgIe.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJ5FPRac.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx2lMf6h.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-qUWKfasI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BCX3vlmU.js} +1 -1
- package/dist/{PublishView-ClqhWcBu.js → PublishView-BVGyY6nn.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-s2TN-ZJL.js → PurchaseOrderPrintPreview-pbYIFiOG.js} +1 -1
- package/dist/{ReceiveRequestView-0r85gHww.js → ReceiveRequestView-DZAgH2_u.js} +10 -10
- package/dist/{RecipeView-FRHv7v2K.js → RecipeView-DcgoCf4g.js} +4 -4
- package/dist/{StockView-DeE60k1a.js → StockView-zO2uL662.js} +7 -7
- package/dist/{SupplierView-DQSYItBZ.js → SupplierView-I5bqiX_2.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bm9lLcf5.js → TransferDetails.vue_vue_type_script_setup_true_lang-NyQg_yR9.js} +325 -325
- package/dist/{TransferTemplateView-rPjPeB7z.js → TransferTemplateView-BDOt17yc.js} +7 -7
- package/dist/{UnitView-BLfRD-MZ.js → UnitView-BVY5S6-3.js} +3 -3
- package/dist/{WarehouseView-DmzmdKUj.js → WarehouseView-m6MKrtYq.js} +1 -1
- package/dist/{app-BmrQUin8.js → app-DtICLubM.js} +194 -194
- package/dist/app.js +1 -1
- package/dist/{decimal-Ba0cFNkn.js → decimal-C1dAcCf3.js} +1 -1
- package/dist/{feature-CAfGclDp.js → feature-Y7qzvbl4.js} +79 -79
- package/dist/{format-unit-display-6JZPqi0z.js → format-unit-display-CPqfS4vp.js} +2 -2
- package/dist/{index-0LAqB9Nf.js → index-0qsqwB0T.js} +2 -2
- package/dist/{index-Df8rBaGT.js → index-DIEdSG3y.js} +1 -1
- package/dist/{stock-Ca2xlSi5.js → stock-CowNp_xM.js} +1 -1
- package/dist/{supplier-BFRlDSmN.js → supplier-JVTTlQNL.js} +2 -2
- package/dist/{use-ingredient-select-dialog-BleZLcKu.js → use-ingredient-select-dialog-Df59lld2.js} +1 -1
- package/dist/{use-inventory-binding-dialog-C8-NZufG.js → use-inventory-binding-dialog-Bxxb93Kz.js} +1 -1
- package/dist/{vue-i18n-CLUATIwy.js → vue-i18n-DJOdRwc3.js} +209 -209
- package/package.json +3 -3
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { Y as lt, u as de, aH as S, b as Ue, a2 as ct, a4 as ut, a5 as dt, aI as mt, d as We, e as Ze, V as et, aJ as ft, $ as
|
|
2
|
-
import { ref as K, computed as W, h as D, defineComponent as
|
|
3
|
-
import { F as wt } from "./decimal-
|
|
4
|
-
import { b as St, u as Rt, f as at, P as ue } from "./format-unit-display-
|
|
5
|
-
import { useCoreStore as
|
|
6
|
-
import { E as
|
|
7
|
-
import { useDialog as Ve, useSnackbar as
|
|
8
|
-
import { u as
|
|
9
|
-
import { _ as kt, F as qt, a as Dt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { Y as lt, u as de, aH as S, b as Ue, a2 as ct, a4 as ut, a5 as dt, aI as mt, d as We, e as Ze, V as et, aJ as ft, $ as Ee, K as ke, i as ie, aK as tt, a9 as qe, f as Ye, h as H, D as ee, aq as le, aL as rt, aM as pt, a3 as yt, ao as Qe, a1 as xe, ae as $e, ar as vt } from "./app-DtICLubM.js";
|
|
2
|
+
import { ref as K, computed as W, h as D, defineComponent as be, reactive as ht, onMounted as st, resolveComponent as G, openBlock as g, createBlock as ae, withCtx as ce, createElementVNode as o, createVNode as B, unref as y, createElementBlock as q, toDisplayString as x, createCommentVNode as E, watch as bt, isRef as gt, Fragment as te, normalizeClass as Oe, createTextVNode as Ce, renderList as ve, resolveDynamicComponent as _t } from "vue";
|
|
3
|
+
import { F as wt } from "./decimal-C1dAcCf3.js";
|
|
4
|
+
import { b as St, u as Rt, f as at, P as ue } from "./format-unit-display-CPqfS4vp.js";
|
|
5
|
+
import { useCoreStore as De, useI18n as nt } from "@feedmepos/mf-common";
|
|
6
|
+
import { E as xt } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
|
+
import { useDialog as Ve, useSnackbar as Ne, components as Je, FmButtonVariant as Z, useProxiedModel as Ot } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as Ae, F as Fe } from "./feature-Y7qzvbl4.js";
|
|
9
|
+
import { _ as kt, F as qt, a as Dt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js";
|
|
10
10
|
import { u as Nt, R as Xe } from "./usePromise-CbVUCxhj.js";
|
|
11
|
-
import { u as At } from "./index-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
11
|
+
import { u as At } from "./index-0qsqwB0T.js";
|
|
12
|
+
const Te = lt((d, s) => {
|
|
13
|
+
const a = de(), k = De();
|
|
14
14
|
return {
|
|
15
15
|
async readRequests(i, e, c) {
|
|
16
|
-
const m = i ??
|
|
17
|
-
return e && c ? await s.get(`${
|
|
16
|
+
const m = i ?? a.currentLocationDBName, n = `${d.inventoryBackendUrl}/${m}/purchase-request`;
|
|
17
|
+
return e && c ? await s.get(`${n}?startDate=${e}&endDate=${c}`) : await s.get(n);
|
|
18
18
|
},
|
|
19
19
|
async readRequestById(i, e) {
|
|
20
|
-
const c = e ??
|
|
20
|
+
const c = e ?? a.currentLocationDBName, m = `${d.inventoryBackendUrl}/${c}/purchase-request/${i}`;
|
|
21
21
|
return await s.get(m);
|
|
22
22
|
},
|
|
23
23
|
async readRequestByIds(i, e) {
|
|
24
|
-
const c = e ??
|
|
24
|
+
const c = e ?? a.currentLocationDBName, m = `${d.inventoryBackendUrl}/${c}/purchase-request/find`;
|
|
25
25
|
return await s.post(m, { requestIds: i });
|
|
26
26
|
},
|
|
27
27
|
async getPurchaseOrders({
|
|
28
28
|
start: i,
|
|
29
29
|
end: e
|
|
30
30
|
}) {
|
|
31
|
-
const c =
|
|
31
|
+
const c = a.currentLocationDBName, m = `${d.inventoryBackendUrl}/${c}/purchase-order`;
|
|
32
32
|
return await s.get(`${m}?start=${i}&end=${e}`);
|
|
33
33
|
},
|
|
34
34
|
async getLatestPurchaseOrderRequest(i) {
|
|
35
|
-
const e =
|
|
35
|
+
const e = a.currentLocationDBName, c = `${d.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
|
|
36
36
|
return await s.get(`${c}/${i}`);
|
|
37
37
|
},
|
|
38
38
|
async getPurchaseOrderById(i) {
|
|
39
|
-
const e =
|
|
39
|
+
const e = a.currentLocationDBName, c = `${d.inventoryBackendUrl}/${e}/purchase-order`;
|
|
40
40
|
return await s.get(`${c}/${i}`);
|
|
41
41
|
},
|
|
42
42
|
/**
|
|
43
43
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
44
44
|
*/
|
|
45
45
|
async processPurchaseOrder(i, e) {
|
|
46
|
-
const c =
|
|
47
|
-
return await s.put(
|
|
46
|
+
const c = a.currentLocationDBName, m = e || c, n = `${d.inventoryBackendUrl}/${m}/purchase-order/run-operation`;
|
|
47
|
+
return await s.put(n, i);
|
|
48
48
|
},
|
|
49
49
|
async createPurchaseOrder(i) {
|
|
50
|
-
const e =
|
|
50
|
+
const e = a.currentLocationDBName, c = `${d.inventoryBackendUrl}/${e}/purchase-order`;
|
|
51
51
|
return await s.post(c, i);
|
|
52
52
|
},
|
|
53
53
|
async updatePurchaseOrder(i) {
|
|
54
|
-
const e =
|
|
54
|
+
const e = a.currentLocationDBName, c = `${d.inventoryBackendUrl}/${e}/purchase-order`;
|
|
55
55
|
return await s.put(c, i);
|
|
56
56
|
},
|
|
57
57
|
async importFromXilnex(i) {
|
|
58
|
-
const e =
|
|
58
|
+
const e = a.currentLocationDBName, c = `${d.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
|
|
59
59
|
return await s.post(c, i);
|
|
60
60
|
},
|
|
61
61
|
async processPurchaseOrderV2(i, e) {
|
|
62
|
-
const c =
|
|
63
|
-
return await s.put(
|
|
62
|
+
const c = a.currentLocationDBName, m = e || c, n = `${d.inventoryBackendUrl}/${m}/v2/purchase-order/run-operation`;
|
|
63
|
+
return await s.put(n, i);
|
|
64
64
|
},
|
|
65
65
|
async getWorkflowConfig() {
|
|
66
66
|
var m;
|
|
@@ -137,7 +137,7 @@ const Pe = lt((d, s) => {
|
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
function it() {
|
|
140
|
-
const d = de(), s =
|
|
140
|
+
const d = de(), s = Te(), a = Ae();
|
|
141
141
|
async function k(e, c) {
|
|
142
142
|
const m = d.currentLocationDBName;
|
|
143
143
|
return e.doc.supplier.internal && e.operation === S.enum.confirmDraft && (e.operation = S.enum.submitRequest), await s.processPurchaseOrder(e, c || m);
|
|
@@ -146,38 +146,38 @@ function it() {
|
|
|
146
146
|
const m = d.currentLocationDBName;
|
|
147
147
|
return await s.processPurchaseOrderV2(e, c || m);
|
|
148
148
|
}
|
|
149
|
-
return (e) =>
|
|
149
|
+
return (e) => a.useOperatePurchaseOrderV2 ? i(e.operateV2, e.transferTo) : k(e.operate, e.transferTo);
|
|
150
150
|
}
|
|
151
151
|
var Le = /* @__PURE__ */ ((d) => (d.RECEIVE_REQUEST = "receive/request", d.APPROVAL = "approval", d))(Le || {});
|
|
152
|
-
const
|
|
152
|
+
const Se = K(), Ie = K();
|
|
153
153
|
function Ns(d, s) {
|
|
154
|
-
const
|
|
154
|
+
const a = Ve(), k = de(), i = Ae();
|
|
155
155
|
Ue();
|
|
156
|
-
const e = St(), c = Rt(), m = K(!1),
|
|
156
|
+
const e = St(), c = Rt(), m = K(!1), n = Ne(), v = Te(), R = K(new Array()), r = K(
|
|
157
157
|
s != null && s.startDate && (s != null && s.endDate) ? s : ct()
|
|
158
158
|
), l = W(() => {
|
|
159
|
-
const
|
|
159
|
+
const O = new Date(r.value.startDate), t = new Date(r.value.endDate);
|
|
160
160
|
return {
|
|
161
|
-
start: ut(
|
|
161
|
+
start: ut(O).toISOString(),
|
|
162
162
|
end: dt(t).toISOString()
|
|
163
163
|
};
|
|
164
164
|
}), f = K(new Array()), b = mt(), w = K(null);
|
|
165
|
-
async function
|
|
165
|
+
async function I(O) {
|
|
166
166
|
function t(_) {
|
|
167
167
|
const h = {
|
|
168
168
|
mode: We.CREATE,
|
|
169
|
-
modelValue:
|
|
169
|
+
modelValue: O || void 0,
|
|
170
170
|
show: !0,
|
|
171
171
|
"onUpdate:show"(N) {
|
|
172
|
-
|
|
172
|
+
Se.value.show = N;
|
|
173
173
|
},
|
|
174
174
|
templateId: _,
|
|
175
175
|
lastClosingDate: w.value
|
|
176
176
|
};
|
|
177
|
-
|
|
177
|
+
Se.value = h;
|
|
178
178
|
}
|
|
179
179
|
let u;
|
|
180
|
-
i.mustUsePoTemplate && !(
|
|
180
|
+
i.mustUsePoTemplate && !(O != null && O.template) ? a.open({
|
|
181
181
|
title: "Create transfer",
|
|
182
182
|
message: "",
|
|
183
183
|
primaryActions: {
|
|
@@ -195,23 +195,23 @@ function Ns(d, s) {
|
|
|
195
195
|
t(void 0);
|
|
196
196
|
}) : t(u);
|
|
197
197
|
}
|
|
198
|
-
function L(
|
|
198
|
+
function L(O) {
|
|
199
199
|
const t = {
|
|
200
200
|
mode: We.UPDATE,
|
|
201
|
-
modelValue: Ze(
|
|
201
|
+
modelValue: Ze(O),
|
|
202
202
|
show: !0,
|
|
203
203
|
"onUpdate:show"(u) {
|
|
204
|
-
|
|
204
|
+
Se.value.show = u;
|
|
205
205
|
},
|
|
206
206
|
lastClosingDate: w.value
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
Se.value = t;
|
|
209
209
|
}
|
|
210
210
|
async function J() {
|
|
211
211
|
R.value = [], m.value = !0;
|
|
212
212
|
try {
|
|
213
213
|
R.value = await v.getPurchaseOrders(l.value).then((_) => _.sort((h, N) => N._id.localeCompare(h._id)));
|
|
214
|
-
const
|
|
214
|
+
const O = await b.readCurrentLocationLastClosing(!0), t = O == null ? void 0 : O._id;
|
|
215
215
|
t && (w.value = ft(t)), await i.awaitFeatureLoaded(() => i.mustUsePoTemplate) && await c.fetchTemplates();
|
|
216
216
|
const u = R.value.map((_) => {
|
|
217
217
|
var h;
|
|
@@ -219,7 +219,7 @@ function Ns(d, s) {
|
|
|
219
219
|
}).filter((_) => _);
|
|
220
220
|
f.value = await v.readRequestByIds(u);
|
|
221
221
|
} catch {
|
|
222
|
-
|
|
222
|
+
n.open({
|
|
223
223
|
title: "Something went wrong",
|
|
224
224
|
message: "Error at fetching purchase orders",
|
|
225
225
|
type: "error"
|
|
@@ -235,9 +235,9 @@ function Ns(d, s) {
|
|
|
235
235
|
void 0,
|
|
236
236
|
l.value.start,
|
|
237
237
|
l.value.end
|
|
238
|
-
).then((
|
|
238
|
+
).then((O) => O.reverse());
|
|
239
239
|
} catch {
|
|
240
|
-
|
|
240
|
+
n.open({
|
|
241
241
|
title: "Something went wrong",
|
|
242
242
|
message: "Error at fetching purchase requests",
|
|
243
243
|
type: "error"
|
|
@@ -254,28 +254,28 @@ function Ns(d, s) {
|
|
|
254
254
|
return Y();
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function ne(O, t) {
|
|
258
258
|
r.value = {
|
|
259
|
-
startDate:
|
|
259
|
+
startDate: O,
|
|
260
260
|
endDate: t
|
|
261
261
|
}, Q();
|
|
262
262
|
}
|
|
263
|
-
k.watchLocation(async (
|
|
264
|
-
if (!
|
|
263
|
+
k.watchLocation(async (O) => {
|
|
264
|
+
if (!O) {
|
|
265
265
|
R.value = [];
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
await Q();
|
|
269
269
|
});
|
|
270
270
|
const X = K(), me = K(Math.random().toString());
|
|
271
|
-
async function se(
|
|
271
|
+
async function se(O, t) {
|
|
272
272
|
const u = Math.random().toString();
|
|
273
273
|
me.value = u, t ?? (t = f.value.computeFirst(
|
|
274
|
-
(N) => N.purchaseOrderId ===
|
|
274
|
+
(N) => N.purchaseOrderId === O._id ? N : null
|
|
275
275
|
) ?? void 0);
|
|
276
276
|
const _ = d === "receive/request" ? k.currentLocation : t == null ? void 0 : t.to, h = {
|
|
277
277
|
poRequest: t,
|
|
278
|
-
purchaseOrder:
|
|
278
|
+
purchaseOrder: O,
|
|
279
279
|
transferTo: _ == null ? void 0 : _.name,
|
|
280
280
|
transferToDbName: _ == null ? void 0 : _.dbName,
|
|
281
281
|
show: !0,
|
|
@@ -288,14 +288,14 @@ function Ns(d, s) {
|
|
|
288
288
|
};
|
|
289
289
|
X.value = h;
|
|
290
290
|
}
|
|
291
|
-
async function fe(
|
|
291
|
+
async function fe(O, t, u, _) {
|
|
292
292
|
const h = it();
|
|
293
293
|
m.value = !0;
|
|
294
294
|
try {
|
|
295
295
|
await h({
|
|
296
296
|
operate: {
|
|
297
297
|
operation: t,
|
|
298
|
-
doc:
|
|
298
|
+
doc: O,
|
|
299
299
|
options: (
|
|
300
300
|
// auto receive for supplier to warehouse
|
|
301
301
|
(t === S.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
@@ -305,36 +305,36 @@ function Ns(d, s) {
|
|
|
305
305
|
)
|
|
306
306
|
},
|
|
307
307
|
operateV2: {
|
|
308
|
-
_id:
|
|
309
|
-
_rev:
|
|
308
|
+
_id: O._id,
|
|
309
|
+
_rev: O._rev ?? "",
|
|
310
310
|
action: t
|
|
311
311
|
},
|
|
312
312
|
transferTo: _
|
|
313
313
|
}), await new Promise((j) => setTimeout(j, 1e3));
|
|
314
314
|
const V = de().currentLocationDBName.startsWith("restaurant_");
|
|
315
|
-
t === S.enum.confirmDraft &&
|
|
315
|
+
t === S.enum.confirmDraft && O.effectiveAt && V ? n.open({
|
|
316
316
|
title: "Success",
|
|
317
317
|
message: `${u}. The backdate will be reflected once your POS has received this change.`,
|
|
318
318
|
type: "success"
|
|
319
|
-
}) :
|
|
319
|
+
}) : n.open({
|
|
320
320
|
title: "Success",
|
|
321
321
|
message: u,
|
|
322
322
|
type: "success"
|
|
323
323
|
});
|
|
324
324
|
} catch (N) {
|
|
325
|
-
|
|
325
|
+
n.open({
|
|
326
326
|
title: "Something went wrong",
|
|
327
327
|
message: "Please try again.",
|
|
328
328
|
type: "error"
|
|
329
|
-
}), console.error("Error when submitting PO operation", t,
|
|
329
|
+
}), console.error("Error when submitting PO operation", t, O, N);
|
|
330
330
|
} finally {
|
|
331
331
|
m.value = !1, Q();
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
334
|
+
async function Pe(O, t, u) {
|
|
335
335
|
const _ = ot[t];
|
|
336
336
|
if (!_) {
|
|
337
|
-
|
|
337
|
+
n.open({
|
|
338
338
|
title: "Something went wrong",
|
|
339
339
|
message: `Cannot process order: ${et(t)}`,
|
|
340
340
|
type: "error"
|
|
@@ -342,16 +342,16 @@ function Ns(d, s) {
|
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
344
|
const { successMessage: h, ...N } = _;
|
|
345
|
-
|
|
345
|
+
a.open({
|
|
346
346
|
title: N.title,
|
|
347
347
|
message: N.message,
|
|
348
348
|
primaryActions: N.primaryActions
|
|
349
349
|
}).onPrimary(() => {
|
|
350
|
-
fe(
|
|
350
|
+
fe(O, t, h, u);
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
async function
|
|
354
|
-
|
|
353
|
+
async function oe() {
|
|
354
|
+
a.open({
|
|
355
355
|
title: "Upload Transfer",
|
|
356
356
|
primaryActions: {
|
|
357
357
|
text: "Xilnex transfer note",
|
|
@@ -362,41 +362,41 @@ function Ns(d, s) {
|
|
|
362
362
|
close: !0
|
|
363
363
|
}
|
|
364
364
|
}).onPrimary(() => {
|
|
365
|
-
const
|
|
365
|
+
const O = {
|
|
366
366
|
show: !0,
|
|
367
367
|
"onUpdate:show"(t) {
|
|
368
|
-
|
|
368
|
+
Ie.value.show = t;
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
|
-
|
|
371
|
+
Ie.value = O;
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
return {
|
|
375
375
|
purchaseOrders: R,
|
|
376
376
|
purchaseRequests: f,
|
|
377
|
-
updateDateRange:
|
|
377
|
+
updateDateRange: ne,
|
|
378
378
|
fetchData: Q,
|
|
379
379
|
loading: m,
|
|
380
|
-
transferDialogProps:
|
|
381
|
-
promptCreateTransferDialog:
|
|
380
|
+
transferDialogProps: Se,
|
|
381
|
+
promptCreateTransferDialog: I,
|
|
382
382
|
promptUpdateTransferDialog: L,
|
|
383
383
|
transferDetailsProps: X,
|
|
384
384
|
promptShowTransferDetails: se,
|
|
385
|
-
submitAction:
|
|
386
|
-
xilnexImportDialogProps:
|
|
387
|
-
promptUploadTransferDialog:
|
|
385
|
+
submitAction: Pe,
|
|
386
|
+
xilnexImportDialogProps: Ie,
|
|
387
|
+
promptUploadTransferDialog: oe
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
390
|
function Tt(d, s) {
|
|
391
391
|
return s.reduce(
|
|
392
392
|
(k, i) => {
|
|
393
393
|
const e = i.received.find((c) => c.sku._id === d._id);
|
|
394
|
-
return e && (k =
|
|
394
|
+
return e && (k = Ee(k, e.amount)), k;
|
|
395
395
|
},
|
|
396
|
-
wt.toPrecision(
|
|
396
|
+
wt.toPrecision(ke(0), d.unit.precision)
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
|
-
function Pt(d, s,
|
|
399
|
+
function Pt(d, s, a, k) {
|
|
400
400
|
const { name: i, address: e, regNo: c } = s.doc.profile, m = {
|
|
401
401
|
name: i,
|
|
402
402
|
registrationNumber: c,
|
|
@@ -406,7 +406,7 @@ function Pt(d, s, n, k) {
|
|
|
406
406
|
city: e == null ? void 0 : e.city,
|
|
407
407
|
state: e == null ? void 0 : e.state,
|
|
408
408
|
country: e == null ? void 0 : e.country
|
|
409
|
-
},
|
|
409
|
+
}, n = {
|
|
410
410
|
name: d.supplier.name,
|
|
411
411
|
phoneNumber: d.supplier.phoneNumber,
|
|
412
412
|
registrationNumber: d.supplier.registrationNumber,
|
|
@@ -417,7 +417,7 @@ function Pt(d, s, n, k) {
|
|
|
417
417
|
state: d.supplier.address.state,
|
|
418
418
|
country: d.supplier.address.country
|
|
419
419
|
}, v = d.items.map((b) => {
|
|
420
|
-
const { sku: w, measurement:
|
|
420
|
+
const { sku: w, measurement: I } = b, L = ie(
|
|
421
421
|
Tt(b.sku, d.deliveryOrder || []),
|
|
422
422
|
!1
|
|
423
423
|
);
|
|
@@ -425,7 +425,7 @@ function Pt(d, s, n, k) {
|
|
|
425
425
|
code: w.code,
|
|
426
426
|
description: w.name,
|
|
427
427
|
quantity: at(b.quantity, w.unit, b.measurement),
|
|
428
|
-
unit: (
|
|
428
|
+
unit: (I == null ? void 0 : I.abbrev) || w.unit.abbrev,
|
|
429
429
|
received: L
|
|
430
430
|
};
|
|
431
431
|
}), R = d.deliveryOrder.map((b) => ({
|
|
@@ -433,30 +433,30 @@ function Pt(d, s, n, k) {
|
|
|
433
433
|
ref: b.deliveryOrderNumber,
|
|
434
434
|
remark: b.remark || "",
|
|
435
435
|
items: b.received.map((w) => {
|
|
436
|
-
var
|
|
436
|
+
var I;
|
|
437
437
|
return {
|
|
438
438
|
code: w.sku.code,
|
|
439
439
|
description: w.sku.name,
|
|
440
|
-
quantity:
|
|
441
|
-
unit: ((
|
|
440
|
+
quantity: ie(w.amount),
|
|
441
|
+
unit: ((I = w.measurement) == null ? void 0 : I.abbrev) || w.sku.unit.abbrev
|
|
442
442
|
};
|
|
443
443
|
})
|
|
444
444
|
})), r = {
|
|
445
|
-
businessName:
|
|
446
|
-
logo:
|
|
445
|
+
businessName: a == null ? void 0 : a.name,
|
|
446
|
+
logo: a == null ? void 0 : a.thumbnail,
|
|
447
447
|
orderNumber: d.seqNumber.toString(),
|
|
448
|
-
createdAt:
|
|
448
|
+
createdAt: qe(d._id),
|
|
449
449
|
ref: d.ref || "",
|
|
450
450
|
remark: d.remark || "",
|
|
451
451
|
buyer: m,
|
|
452
|
-
supplier:
|
|
452
|
+
supplier: n,
|
|
453
453
|
items: v,
|
|
454
454
|
status: d.status,
|
|
455
455
|
deliveryOrders: R
|
|
456
456
|
}, l = new URL(window.location.href), f = k && (d.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
457
457
|
l.pathname = l.hostname.includes("portal.feedme") ? `/inventory/${f}` : `/${f}`, l.searchParams.append("data", JSON.stringify(r)), window.open(l.href, "_blank", "noreferrer");
|
|
458
458
|
}
|
|
459
|
-
const
|
|
459
|
+
const he = {
|
|
460
460
|
submitRequest: {
|
|
461
461
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
462
462
|
color: "text-fm-color-typo-primary",
|
|
@@ -519,26 +519,26 @@ const be = {
|
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
function As(d, s) {
|
|
522
|
-
const
|
|
522
|
+
const a = de(), k = De(), { t: i } = nt();
|
|
523
523
|
function e(r) {
|
|
524
524
|
switch (r.status) {
|
|
525
525
|
case "DRAFT":
|
|
526
526
|
return [
|
|
527
527
|
ee[H.Update],
|
|
528
528
|
ee[H.Details],
|
|
529
|
-
r.supplier.internal === "restaurant" || r.supplier.internal === "warehouse" ?
|
|
530
|
-
|
|
529
|
+
r.supplier.internal === "restaurant" || r.supplier.internal === "warehouse" ? he[S.enum.submitRequest] : he[S.enum.confirmDraft],
|
|
530
|
+
he[S.enum.cancelDraft]
|
|
531
531
|
];
|
|
532
532
|
case "RECEIVING":
|
|
533
533
|
return [
|
|
534
|
-
|
|
534
|
+
he[S.enum.completeReceive],
|
|
535
535
|
ee[H.Details],
|
|
536
536
|
ee[H.Print]
|
|
537
537
|
];
|
|
538
538
|
case "REQUESTING":
|
|
539
539
|
return d === "receive/request" ? [ee[H.Details], ee[H.Print]] : [
|
|
540
|
-
|
|
541
|
-
|
|
540
|
+
he[S.enum.approveRequest],
|
|
541
|
+
he[S.enum.rejectRequest],
|
|
542
542
|
ee[H.Details]
|
|
543
543
|
// DefaultRowActions[RowActionEnum.Print]
|
|
544
544
|
];
|
|
@@ -554,11 +554,11 @@ function As(d, s) {
|
|
|
554
554
|
return Object.values(S.enum).includes(r);
|
|
555
555
|
}
|
|
556
556
|
async function m(r, l, f) {
|
|
557
|
-
var w,
|
|
557
|
+
var w, I, L, J;
|
|
558
558
|
const b = Ze(l);
|
|
559
559
|
if (r === H.Print) {
|
|
560
|
-
const Y = (f == null ? void 0 : f.toInventoryLocation) ??
|
|
561
|
-
b.ref = [((w = f == null ? void 0 : f.netSuite) == null ? void 0 : w.refNo) || ((
|
|
560
|
+
const Y = (f == null ? void 0 : f.toInventoryLocation) ?? a.currentLocation;
|
|
561
|
+
b.ref = [((w = f == null ? void 0 : f.netSuite) == null ? void 0 : w.refNo) || ((I = b.netSuite) == null ? void 0 : I.refNo)].filter((Q) => Q).join(" "), Pt(b, Y, k.currentBusiness.value, d === "approval");
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
564
|
if (r === H.Details) {
|
|
@@ -574,7 +574,7 @@ function As(d, s) {
|
|
|
574
574
|
return;
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function n() {
|
|
578
578
|
return [
|
|
579
579
|
{
|
|
580
580
|
accessorKey: "seqNumber",
|
|
@@ -587,7 +587,7 @@ function As(d, s) {
|
|
|
587
587
|
accessorKey: "_id",
|
|
588
588
|
header: () => i("inventory.transfer.table.createdAt"),
|
|
589
589
|
cell(r) {
|
|
590
|
-
return
|
|
590
|
+
return qe(`${r.getValue()}`);
|
|
591
591
|
},
|
|
592
592
|
enableSorting: !0
|
|
593
593
|
},
|
|
@@ -661,7 +661,7 @@ function As(d, s) {
|
|
|
661
661
|
accessorKey: "purchaseOrder._id",
|
|
662
662
|
header: () => i("inventory.transfer.table.createdAt"),
|
|
663
663
|
cell(r) {
|
|
664
|
-
return
|
|
664
|
+
return qe(`${r.getValue()}`);
|
|
665
665
|
},
|
|
666
666
|
enableSorting: !0
|
|
667
667
|
},
|
|
@@ -724,14 +724,14 @@ function As(d, s) {
|
|
|
724
724
|
}
|
|
725
725
|
];
|
|
726
726
|
}
|
|
727
|
-
const R = W(() => d === "receive/request" ?
|
|
727
|
+
const R = W(() => d === "receive/request" ? n() : v());
|
|
728
728
|
return {
|
|
729
729
|
get columnDefs() {
|
|
730
730
|
return R.value;
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
|
-
const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ct = { class: "flex flex-col gap-8" },
|
|
734
|
+
const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ct = { class: "flex flex-col gap-8" }, Ft = { class: "flex w-full justify-end gap-16" }, It = /* @__PURE__ */ be({
|
|
735
735
|
__name: "FulfillmentForm",
|
|
736
736
|
props: {
|
|
737
737
|
purchaseOrder: {},
|
|
@@ -739,37 +739,37 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
739
739
|
},
|
|
740
740
|
emits: ["update:show"],
|
|
741
741
|
setup(d, { emit: s }) {
|
|
742
|
-
const
|
|
742
|
+
const a = d, k = ht({
|
|
743
743
|
id: "",
|
|
744
744
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
745
745
|
items: []
|
|
746
746
|
}), i = K(), e = s;
|
|
747
747
|
return st(() => {
|
|
748
|
-
|
|
748
|
+
a.purchaseOrder && (k.items = a.purchaseOrder.items.map((c) => ({
|
|
749
749
|
id: c.id,
|
|
750
750
|
sku: c.sku,
|
|
751
751
|
measurement: c.measurement,
|
|
752
752
|
amount: c.quantity ?? { amount: 1, precision: 0 }
|
|
753
753
|
})));
|
|
754
754
|
}), (c, m) => {
|
|
755
|
-
const
|
|
755
|
+
const n = G("FmTable"), v = G("FmButton"), R = G("FmForm");
|
|
756
756
|
return g(), ae(R, {
|
|
757
757
|
ref_key: "formRef",
|
|
758
758
|
ref: i,
|
|
759
759
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
760
760
|
onValidationFailed: console.log,
|
|
761
|
-
onValidationSuccess: m[1] || (m[1] = () =>
|
|
761
|
+
onValidationSuccess: m[1] || (m[1] = () => a.confirm(k))
|
|
762
762
|
}, {
|
|
763
763
|
default: ce(() => [
|
|
764
764
|
m[2] || (m[2] = o("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
765
765
|
o("div", $t, [
|
|
766
766
|
o("div", Ct, [
|
|
767
|
-
|
|
767
|
+
B(n, {
|
|
768
768
|
"column-defs": [
|
|
769
769
|
{
|
|
770
770
|
header: "Code",
|
|
771
771
|
cell: (r) => {
|
|
772
|
-
const l =
|
|
772
|
+
const l = a.purchaseOrder.items.find((f) => f.id === r.row.original.id || f.sku._id === r.row.original.sku._id);
|
|
773
773
|
return D(
|
|
774
774
|
y(Je).FmTooltip,
|
|
775
775
|
{
|
|
@@ -791,7 +791,7 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
791
791
|
{
|
|
792
792
|
header: "Name",
|
|
793
793
|
cell: (r) => {
|
|
794
|
-
const l =
|
|
794
|
+
const l = a.purchaseOrder.items.find((f) => f.id === r.row.original.id || f.sku._id === r.row.original.sku._id);
|
|
795
795
|
return D(
|
|
796
796
|
y(Je).FmTooltip,
|
|
797
797
|
{
|
|
@@ -813,7 +813,7 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
813
813
|
{
|
|
814
814
|
header: "Amount",
|
|
815
815
|
cell: (r) => {
|
|
816
|
-
const l = r.row.original, f =
|
|
816
|
+
const l = r.row.original, f = a.purchaseOrder.items.find((w) => w.id === l.id || w.sku._id === l.sku._id), b = l.amount ?? {
|
|
817
817
|
amount: 1,
|
|
818
818
|
precision: 0
|
|
819
819
|
};
|
|
@@ -829,15 +829,15 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
829
829
|
unit: l.sku.unit,
|
|
830
830
|
"onUpdate:modelValue": (w) => {
|
|
831
831
|
if (!w) return;
|
|
832
|
-
const
|
|
833
|
-
|
|
832
|
+
const I = k.items.find((L) => L.id === l.id || L.sku._id === l.sku._id);
|
|
833
|
+
I && (I.amount = w.amount);
|
|
834
834
|
},
|
|
835
835
|
disableUnit: !0,
|
|
836
836
|
rules: [
|
|
837
837
|
y(qt)(
|
|
838
|
-
+y(
|
|
838
|
+
+y(ie)({ amount: 0, precision: 0 })
|
|
839
839
|
),
|
|
840
|
-
y(Dt)(+y(
|
|
840
|
+
y(Dt)(+y(ie)(f.quantity))
|
|
841
841
|
],
|
|
842
842
|
applyDefaultRules: !0
|
|
843
843
|
});
|
|
@@ -849,15 +849,15 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
849
849
|
}, null, 8, ["column-defs", "row-data"])
|
|
850
850
|
])
|
|
851
851
|
]),
|
|
852
|
-
o("div",
|
|
853
|
-
|
|
852
|
+
o("div", Ft, [
|
|
853
|
+
B(v, {
|
|
854
854
|
class: "px-16",
|
|
855
855
|
label: "Confirm",
|
|
856
856
|
size: "md",
|
|
857
857
|
variant: "primary",
|
|
858
858
|
type: "submit"
|
|
859
859
|
}),
|
|
860
|
-
|
|
860
|
+
B(v, {
|
|
861
861
|
class: "px-16",
|
|
862
862
|
label: "Cancel",
|
|
863
863
|
size: "md",
|
|
@@ -870,7 +870,7 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
870
870
|
}, 8, ["onValidationFailed"]);
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
}),
|
|
873
|
+
}), Be = {
|
|
874
874
|
submitRequest: {
|
|
875
875
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
876
876
|
color: "primary",
|
|
@@ -935,28 +935,28 @@ const $t = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
935
935
|
available: !1
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
|
-
function
|
|
939
|
-
const d =
|
|
938
|
+
function Bt() {
|
|
939
|
+
const d = Ae();
|
|
940
940
|
return {
|
|
941
941
|
ableToMarkReceived(s) {
|
|
942
|
-
if (!s || s.status !==
|
|
942
|
+
if (!s || s.status !== le.enum.RECEIVING)
|
|
943
943
|
return !1;
|
|
944
944
|
const k = de().currentLocationDBName;
|
|
945
945
|
return `${s.supplier.internal}_${s.supplier._id}` !== k;
|
|
946
946
|
},
|
|
947
947
|
ableToMarkApproved(s) {
|
|
948
|
-
return !(!s || (s == null ? void 0 : s.status) !==
|
|
948
|
+
return !(!s || (s == null ? void 0 : s.status) !== le.enum.REQUESTING);
|
|
949
949
|
},
|
|
950
|
-
ableToCreateFulfillment(s,
|
|
950
|
+
ableToCreateFulfillment(s, a) {
|
|
951
951
|
var e, c;
|
|
952
|
-
if (!d.acceptRequireFulfillment || !s || !
|
|
952
|
+
if (!d.acceptRequireFulfillment || !s || !a || s.status !== le.enum.PROCESSING || !a.processedAt)
|
|
953
953
|
return !1;
|
|
954
|
-
const k = (e =
|
|
954
|
+
const k = (e = a == null ? void 0 : a.from) == null ? void 0 : e.dbName, i = (c = a == null ? void 0 : a.to) == null ? void 0 : c.dbName;
|
|
955
955
|
return !(k.startsWith("restaurant_") && i.startsWith("restaurant_"));
|
|
956
956
|
}
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
const
|
|
959
|
+
const Et = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ be({
|
|
960
960
|
__name: "NetSuiteSync",
|
|
961
961
|
props: {
|
|
962
962
|
poRequest: {},
|
|
@@ -965,13 +965,13 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
965
965
|
scope: {}
|
|
966
966
|
},
|
|
967
967
|
setup(d) {
|
|
968
|
-
const s = d,
|
|
968
|
+
const s = d, a = Ue(), k = Ne(), i = Ve(), e = K(!1);
|
|
969
969
|
W(() => {
|
|
970
970
|
var R, r, l, f;
|
|
971
971
|
let m = !0;
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
return
|
|
972
|
+
a.isEnabled || (m = !1);
|
|
973
|
+
const n = s.purchaseOrder, v = s.poRequest;
|
|
974
|
+
return n && ((R = n == null ? void 0 : n.supplier) != null && R.internal ? (!v && n.status == le.enum.DRAFT && (m = !1), v && !((r = v == null ? void 0 : v.netSuite) != null && r.id) && (m = !1), s.isTransferBetweenOutlets && (m = !1)) : ((n == null ? void 0 : n.status) !== le.enum.REQUESTING && n.supplier.internal && (m = !1), !v && !((l = n == null ? void 0 : n.netSuite) != null && l.id) && (m = !1), !v && ((f = n == null ? void 0 : n.netSuite) != null && f.id) && (n == null ? void 0 : n.status) == le.enum.REQUESTING && (m = !1))), m;
|
|
975
975
|
});
|
|
976
976
|
async function c() {
|
|
977
977
|
e.value || i.open({
|
|
@@ -992,11 +992,11 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
992
992
|
},
|
|
993
993
|
secondaryActions: { text: "Not now", close: !0 }
|
|
994
994
|
}).onPrimary(async () => {
|
|
995
|
-
var m,
|
|
995
|
+
var m, n, v;
|
|
996
996
|
try {
|
|
997
997
|
e.value = !0;
|
|
998
|
-
const R = ((m = s.purchaseOrder) == null ? void 0 : m._id) || ((
|
|
999
|
-
await
|
|
998
|
+
const R = ((m = s.purchaseOrder) == null ? void 0 : m._id) || ((n = s.poRequest) == null ? void 0 : n.purchaseOrderId) || "", r = (v = s.poRequest) == null ? void 0 : v.to.dbName;
|
|
999
|
+
await a.syncPurchaseOrder(
|
|
1000
1000
|
R,
|
|
1001
1001
|
s.scope === "approval" ? r : void 0
|
|
1002
1002
|
), k.open({
|
|
@@ -1013,10 +1013,10 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1013
1013
|
}
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
|
-
return (m,
|
|
1016
|
+
return (m, n) => {
|
|
1017
1017
|
const v = G("FmButton");
|
|
1018
|
-
return g(), q("div",
|
|
1019
|
-
|
|
1018
|
+
return g(), q("div", Et, [
|
|
1019
|
+
B(v, {
|
|
1020
1020
|
"prepend-icon": "sync",
|
|
1021
1021
|
variant: "secondary",
|
|
1022
1022
|
label: "Sync",
|
|
@@ -1044,7 +1044,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1044
1044
|
}, er = { class: "fm-typo-en-body-lg-600" }, tr = {
|
|
1045
1045
|
key: 3,
|
|
1046
1046
|
class: "flex flex-col gap-4"
|
|
1047
|
-
}, rr = { class: "fm-typo-en-body-lg-600" }, sr = /* @__PURE__ */
|
|
1047
|
+
}, rr = { class: "fm-typo-en-body-lg-600" }, sr = /* @__PURE__ */ be({
|
|
1048
1048
|
__name: "NetSuiteInfo",
|
|
1049
1049
|
props: {
|
|
1050
1050
|
transferType: {},
|
|
@@ -1055,84 +1055,84 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1055
1055
|
scope: {}
|
|
1056
1056
|
},
|
|
1057
1057
|
setup(d) {
|
|
1058
|
-
const s = d,
|
|
1058
|
+
const s = d, a = Ue(), k = Te(), i = K(s.poRequest);
|
|
1059
1059
|
st(async () => {
|
|
1060
|
-
var
|
|
1061
|
-
if (!s.poRequest && ((
|
|
1060
|
+
var n;
|
|
1061
|
+
if (!s.poRequest && ((n = s.purchaseOrder) != null && n._id)) {
|
|
1062
1062
|
const v = await k.getLatestPurchaseOrderRequest(s.purchaseOrder._id);
|
|
1063
1063
|
i.value = v;
|
|
1064
1064
|
}
|
|
1065
1065
|
});
|
|
1066
1066
|
const e = W(
|
|
1067
1067
|
() => {
|
|
1068
|
-
var
|
|
1069
|
-
return
|
|
1070
|
-
((R = (v = (
|
|
1068
|
+
var n, v, R, r, l, f;
|
|
1069
|
+
return a.getSubsidiaryFullName(
|
|
1070
|
+
((R = (v = (n = s.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : R.id) || ((f = (l = (r = s.poRequest) == null ? void 0 : r.netSuite) == null ? void 0 : l.subsidiary) == null ? void 0 : f.id)
|
|
1071
1071
|
).fullName;
|
|
1072
1072
|
}
|
|
1073
1073
|
), c = W(() => {
|
|
1074
|
-
var
|
|
1075
|
-
return (R = (v = (
|
|
1074
|
+
var n, v, R, r, l, f, b, w, I, L, J, Y;
|
|
1075
|
+
return (R = (v = (n = s.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : v.additionalInfo) != null && R.transactionnumber ? (f = (l = (r = s.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : l.additionalInfo) == null ? void 0 : f.transactionnumber : (I = (w = (b = i.value) == null ? void 0 : b.netSuite) == null ? void 0 : w.additionalInfo) != null && I.transactionnumber ? (Y = (J = (L = i.value) == null ? void 0 : L.netSuite) == null ? void 0 : J.additionalInfo) == null ? void 0 : Y.transactionnumber : null;
|
|
1076
1076
|
}), m = W(() => {
|
|
1077
|
-
var
|
|
1078
|
-
return (v = (
|
|
1077
|
+
var n, v, R, r, l, f;
|
|
1078
|
+
return (v = (n = s.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && v.length && ((r = (R = s.purchaseOrder) == null ? void 0 : R.deliveryFullfillment) == null ? void 0 : r.length) > 0 ? (f = (l = s.purchaseOrder) == null ? void 0 : l.deliveryFullfillment) == null ? void 0 : f.map((b) => {
|
|
1079
1079
|
var w;
|
|
1080
1080
|
return (w = b.netSuite) == null ? void 0 : w.refNo;
|
|
1081
1081
|
}).join(", ") : "N/A";
|
|
1082
1082
|
});
|
|
1083
|
-
return (
|
|
1084
|
-
var R, r, l, f, b, w,
|
|
1085
|
-
return y(
|
|
1083
|
+
return (n, v) => {
|
|
1084
|
+
var R, r, l, f, b, w, I, L, J, Y, Q, ne, X, me, se, fe;
|
|
1085
|
+
return y(a).isEnabled ? (g(), q("div", Ut, [
|
|
1086
1086
|
o("div", Vt, [
|
|
1087
1087
|
v[0] || (v[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1088
|
-
o("div", Mt,
|
|
1088
|
+
o("div", Mt, x(e.value || "N/A"), 1)
|
|
1089
1089
|
]),
|
|
1090
|
-
!
|
|
1091
|
-
o("div", jt, " NetSuite " +
|
|
1090
|
+
!n.isTransferBetweenOutlets && n.scope === y(Le).RECEIVE_REQUEST ? (g(), q("div", Kt, [
|
|
1091
|
+
o("div", jt, " NetSuite " + x((r = (R = n.purchaseOrder) == null ? void 0 : R.netSuite) != null && r.recordType ? y(rt)((f = (l = n.purchaseOrder) == null ? void 0 : l.netSuite) == null ? void 0 : f.recordType) : n.transferType === y(ue).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1092
1092
|
o("div", zt, [
|
|
1093
|
-
(w = (b =
|
|
1093
|
+
(w = (b = n.purchaseOrder) == null ? void 0 : b.netSuite) != null && w.id ? (g(), q("span", Ht, x((L = (I = n.purchaseOrder) == null ? void 0 : I.netSuite) == null ? void 0 : L.refNo) + " (" + x((Y = (J = n.purchaseOrder) == null ? void 0 : J.netSuite) == null ? void 0 : Y.id) + ") ", 1)) : (g(), q("span", Gt, "N/A"))
|
|
1094
1094
|
])
|
|
1095
|
-
])) :
|
|
1096
|
-
!
|
|
1097
|
-
o("div", Yt, " (Request) NetSuite " +
|
|
1095
|
+
])) : E("", !0),
|
|
1096
|
+
!n.isTransferBetweenOutlets && i.value || n.scope === y(Le).APPROVAL ? (g(), q("div", Wt, [
|
|
1097
|
+
o("div", Yt, " (Request) NetSuite " + x(n.transferType === y(ue).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1098
1098
|
o("div", Qt, [
|
|
1099
|
-
(
|
|
1099
|
+
(ne = (Q = i.value) == null ? void 0 : Q.netSuite) != null && ne.id ? (g(), q("span", Jt, x((me = (X = i.value) == null ? void 0 : X.netSuite) == null ? void 0 : me.refNo) + " (" + x((fe = (se = i.value) == null ? void 0 : se.netSuite) == null ? void 0 : fe.id) + ") ", 1)) : (g(), q("span", Xt, "N/A"))
|
|
1100
1100
|
])
|
|
1101
|
-
])) :
|
|
1101
|
+
])) : E("", !0),
|
|
1102
1102
|
c.value ? (g(), q("div", Zt, [
|
|
1103
1103
|
v[1] || (v[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1104
|
-
o("div", er,
|
|
1105
|
-
])) :
|
|
1106
|
-
y(
|
|
1104
|
+
o("div", er, x(c.value), 1)
|
|
1105
|
+
])) : E("", !0),
|
|
1106
|
+
y(a).isEnabled && n.transferType === y(ue).TRANSFER && !n.isTransferBetweenOutlets ? (g(), q("div", tr, [
|
|
1107
1107
|
v[2] || (v[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1108
|
-
o("div", rr,
|
|
1109
|
-
])) :
|
|
1110
|
-
])) :
|
|
1108
|
+
o("div", rr, x(m.value), 1)
|
|
1109
|
+
])) : E("", !0)
|
|
1110
|
+
])) : E("", !0);
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
|
-
}), ar = { class: "flex flex-row-reverse" }, nr = /* @__PURE__ */
|
|
1113
|
+
}), ar = { class: "flex flex-row-reverse" }, nr = /* @__PURE__ */ be({
|
|
1114
1114
|
__name: "NetSuiteLog",
|
|
1115
1115
|
props: {
|
|
1116
1116
|
netsuiteId: {},
|
|
1117
1117
|
purchaseOrderId: {}
|
|
1118
1118
|
},
|
|
1119
1119
|
setup(d) {
|
|
1120
|
-
const s =
|
|
1120
|
+
const s = Ne(), a = pt();
|
|
1121
1121
|
async function k(i, e) {
|
|
1122
1122
|
let c = `attributes.pod:netsuite* AND body.message:*${i}*`;
|
|
1123
|
-
const { url: m } = await
|
|
1123
|
+
const { url: m } = await a.getLogs(c);
|
|
1124
1124
|
s.open(
|
|
1125
1125
|
{
|
|
1126
1126
|
message: "Opening NetSuite logs...",
|
|
1127
1127
|
type: "info"
|
|
1128
1128
|
},
|
|
1129
1129
|
800
|
|
1130
|
-
), await new Promise((
|
|
1130
|
+
), await new Promise((n) => setTimeout(n, 800)), window.open(m, "_blank");
|
|
1131
1131
|
}
|
|
1132
1132
|
return (i, e) => {
|
|
1133
1133
|
const c = G("FmButton");
|
|
1134
1134
|
return g(), q("div", ar, [
|
|
1135
|
-
|
|
1135
|
+
B(c, {
|
|
1136
1136
|
"prepend-icon": "history",
|
|
1137
1137
|
variant: "secondary",
|
|
1138
1138
|
label: "Logs",
|
|
@@ -1147,7 +1147,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1147
1147
|
}), or = {
|
|
1148
1148
|
key: 0,
|
|
1149
1149
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1150
|
-
}, ir = { class: "flex gap-8 items-center" }, lr = { class: "ml-auto" }, cr = { class: "flex gap-4" }, ur = /* @__PURE__ */
|
|
1150
|
+
}, ir = { class: "flex gap-8 items-center" }, lr = { class: "ml-auto" }, cr = { class: "flex gap-4" }, ur = /* @__PURE__ */ be({
|
|
1151
1151
|
__name: "NetSuitePanel",
|
|
1152
1152
|
props: {
|
|
1153
1153
|
poRequest: {},
|
|
@@ -1157,25 +1157,25 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1157
1157
|
scope: {}
|
|
1158
1158
|
},
|
|
1159
1159
|
setup(d) {
|
|
1160
|
-
const s = d,
|
|
1161
|
-
var
|
|
1162
|
-
const e = ((
|
|
1160
|
+
const s = d, a = At(), k = De(), i = W(() => {
|
|
1161
|
+
var n, v, R, r, l, f, b;
|
|
1162
|
+
const e = ((n = s.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((R = (v = s.purchaseOrder) == null ? void 0 : v.supplier) == null ? void 0 : R.internal) === "restaurant", c = s.transferType === ue.PURCHASE, m = s.transferType === ue.TRANSFER;
|
|
1163
1163
|
return c || m && !e || ((l = (r = s.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : l.id) || ((b = (f = s.poRequest) == null ? void 0 : f.netSuite) == null ? void 0 : b.id);
|
|
1164
1164
|
});
|
|
1165
1165
|
return (e, c) => {
|
|
1166
|
-
var
|
|
1166
|
+
var n, v, R, r, l, f;
|
|
1167
1167
|
const m = G("FmMenuDivider");
|
|
1168
|
-
return y(
|
|
1168
|
+
return y(a).isNetSuiteEnabled && i.value ? (g(), q("div", or, [
|
|
1169
1169
|
o("div", ir, [
|
|
1170
1170
|
c[0] || (c[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1171
1171
|
o("div", lr, [
|
|
1172
1172
|
o("div", cr, [
|
|
1173
|
-
(
|
|
1173
|
+
(n = y(k).sessionUser.value) != null && n.role.isAdmin && ((R = (v = s.purchaseOrder) == null ? void 0 : v.netSuite) != null && R.id) ? (g(), ae(nr, {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
"netsuite-id": (l = (r = e.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : l.id,
|
|
1176
1176
|
"purchase-order-id": (f = e.purchaseOrder) == null ? void 0 : f._id
|
|
1177
|
-
}, null, 8, ["netsuite-id", "purchase-order-id"])) :
|
|
1178
|
-
|
|
1177
|
+
}, null, 8, ["netsuite-id", "purchase-order-id"])) : E("", !0),
|
|
1178
|
+
B(Lt, {
|
|
1179
1179
|
"po-request": e.poRequest,
|
|
1180
1180
|
"purchase-order": e.purchaseOrder,
|
|
1181
1181
|
"is-transfer-between-outlets": !i.value,
|
|
@@ -1184,8 +1184,8 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1184
1184
|
])
|
|
1185
1185
|
])
|
|
1186
1186
|
]),
|
|
1187
|
-
|
|
1188
|
-
|
|
1187
|
+
B(m),
|
|
1188
|
+
B(sr, {
|
|
1189
1189
|
"po-request": e.poRequest,
|
|
1190
1190
|
"purchase-order": e.purchaseOrder,
|
|
1191
1191
|
"transfer-type": e.transferType,
|
|
@@ -1193,13 +1193,13 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1193
1193
|
"is-transfer-between-outlets": !i.value,
|
|
1194
1194
|
scope: e.scope
|
|
1195
1195
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1196
|
-
])) :
|
|
1196
|
+
])) : E("", !0);
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
1199
|
}), dr = { class: "flex flex-col gap-16 w-full h-full" }, mr = { class: "flex justify-between" }, fr = { class: "fm-typo-en-body-lg-600" }, pr = { class: "flex flex-col gap-8" }, yr = { class: "flex flex-col gap-4" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hr = { class: "flex gap-1" }, br = { class: "fm-typo-en-body-lg-600" }, gr = {
|
|
1200
1200
|
key: 0,
|
|
1201
1201
|
class: "flex flex-col gap-4"
|
|
1202
|
-
}, _r = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wr = { class: "fm-typo-en-body-lg-600" }, Sr = { class: "flex flex-col gap-4" }, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1202
|
+
}, _r = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wr = { class: "fm-typo-en-body-lg-600" }, Sr = { class: "flex flex-col gap-4" }, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xr = { class: "fm-typo-en-body-lg-600" }, Or = {
|
|
1203
1203
|
key: 1,
|
|
1204
1204
|
class: "flex flex-col gap-4"
|
|
1205
1205
|
}, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qr = { class: "fm-typo-en-body-lg-600" }, Dr = {
|
|
@@ -1211,7 +1211,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1211
1211
|
}, Pr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $r = { class: "fm-typo-en-body-lg-600" }, Cr = {
|
|
1212
1212
|
key: 4,
|
|
1213
1213
|
class: "flex flex-col gap-4"
|
|
1214
|
-
},
|
|
1214
|
+
}, Fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ir = { class: "fm-typo-en-body-lg-600" }, Br = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Er = { class: "flex flex-col gap-8" }, Lr = { class: "flex gap-8 items-center" }, Ur = { class: "flex-1 fm-typo-en-body-lg-600" }, Vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Mr = { class: "flex w-full gap-4" }, Kr = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, jr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, zr = { 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" }, Gr = {
|
|
1215
1215
|
key: 0,
|
|
1216
1216
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1217
1217
|
}, Wr = { class: "py-8" }, Yr = { class: "flex justify-end gap-4 items-center" }, Qr = { class: "fm-typo-en-body-lg-600" }, Jr = {
|
|
@@ -1235,7 +1235,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1235
1235
|
}, ms = { class: "flex-1 flex flex-col items-center" }, fs = {
|
|
1236
1236
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1237
1237
|
name: "delivery details"
|
|
1238
|
-
}, ps = { class: "flex flex-col gap-8" }, ys = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, vs = { class: "flex flex-col gap-4" }, hs = { class: "flex gap-8 xs:flex-col" }, Ts = /* @__PURE__ */
|
|
1238
|
+
}, ps = { class: "flex flex-col gap-8" }, ys = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, vs = { class: "flex flex-col gap-4" }, hs = { class: "flex gap-8 xs:flex-col" }, Ts = /* @__PURE__ */ be({
|
|
1239
1239
|
__name: "TransferDetails",
|
|
1240
1240
|
props: {
|
|
1241
1241
|
poRequest: {},
|
|
@@ -1249,21 +1249,21 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1249
1249
|
},
|
|
1250
1250
|
emits: ["update:show", "submitted"],
|
|
1251
1251
|
setup(d, { emit: s }) {
|
|
1252
|
-
const
|
|
1252
|
+
const a = d, k = s, i = Ve(), e = Ne(), c = Ae(), m = de(), n = De(), v = W(
|
|
1253
1253
|
() => {
|
|
1254
1254
|
var t, u;
|
|
1255
1255
|
return {
|
|
1256
|
-
id: ((t =
|
|
1257
|
-
name: ((u =
|
|
1256
|
+
id: ((t = n.sessionUser.value) == null ? void 0 : t.id) ?? "",
|
|
1257
|
+
name: ((u = n.sessionUser.value) == null ? void 0 : u.displayName) ?? ""
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
1260
|
-
), R =
|
|
1260
|
+
), R = Bt(), { t: r } = nt(), l = W(
|
|
1261
1261
|
() => {
|
|
1262
1262
|
var t, u, _, h;
|
|
1263
|
-
return ((u = (t =
|
|
1263
|
+
return ((u = (t = a.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : u.internal) === "restaurant" || ((h = (_ = a.purchaseOrder) == null ? void 0 : _.supplier) == null ? void 0 : h.internal) === "warehouse" ? ue.TRANSFER : ue.PURCHASE;
|
|
1264
1264
|
}
|
|
1265
|
-
), f = K(!1), b = K(""), w = K(!0),
|
|
1266
|
-
if (!
|
|
1265
|
+
), f = K(!1), b = K(""), w = K(!0), I = Te(), L = Nt(I.getWorkflowConfig), J = it(), Y = W(() => {
|
|
1266
|
+
if (!a.purchaseOrder)
|
|
1267
1267
|
return [];
|
|
1268
1268
|
const t = L.result.value;
|
|
1269
1269
|
if (t.state === Xe.loading)
|
|
@@ -1276,21 +1276,21 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1276
1276
|
return h.dbName === ((N = m._currentLocation) == null ? void 0 : N.dbName) ? h : null;
|
|
1277
1277
|
}
|
|
1278
1278
|
),
|
|
1279
|
-
purchaseOrderRequest:
|
|
1280
|
-
purchaseOrder:
|
|
1279
|
+
purchaseOrderRequest: a.poRequest,
|
|
1280
|
+
purchaseOrder: a.purchaseOrder
|
|
1281
1281
|
};
|
|
1282
1282
|
let _ = [];
|
|
1283
1283
|
try {
|
|
1284
|
-
t.state === Xe.error ? (console.error("Error fetching workflow config:", t.error), _ =
|
|
1284
|
+
t.state === Xe.error ? (console.error("Error fetching workflow config:", t.error), _ = Fe.getAvailableActions({
|
|
1285
1285
|
...u,
|
|
1286
|
-
orderConfig:
|
|
1286
|
+
orderConfig: Fe.getDefaultConfig()
|
|
1287
1287
|
}).actions.filter(
|
|
1288
1288
|
(h) => (
|
|
1289
1289
|
// TODO: create receiveStock & processRequest dialog
|
|
1290
1290
|
// to create their payload
|
|
1291
1291
|
h !== S.enum.receiveStock && h !== S.enum.processRequest && h !== S.enum.closeRequest
|
|
1292
1292
|
)
|
|
1293
|
-
)) : _ =
|
|
1293
|
+
)) : _ = Fe.getAvailableActions({
|
|
1294
1294
|
...u,
|
|
1295
1295
|
orderConfig: t.data
|
|
1296
1296
|
}).actions.filter(
|
|
@@ -1299,8 +1299,8 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1299
1299
|
} catch (h) {
|
|
1300
1300
|
console.error("Error getting available actions:", h);
|
|
1301
1301
|
}
|
|
1302
|
-
return
|
|
1303
|
-
}), Q =
|
|
1302
|
+
return a.scope === "approval" && (_ = _.filter((h) => h !== S.enum.completeReceive)), _;
|
|
1303
|
+
}), Q = Ot(a, "show"), ne = W(() => [
|
|
1304
1304
|
{
|
|
1305
1305
|
label: r("inventory.transfer.receiveRequest.details.overview"),
|
|
1306
1306
|
value: "overview"
|
|
@@ -1309,11 +1309,11 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1309
1309
|
label: r("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1310
1310
|
value: "deliveryHistory"
|
|
1311
1311
|
}
|
|
1312
|
-
]), X = K(
|
|
1312
|
+
]), X = K(ne.value[0]);
|
|
1313
1313
|
bt(
|
|
1314
|
-
() =>
|
|
1314
|
+
() => a.show,
|
|
1315
1315
|
(t) => {
|
|
1316
|
-
t && (X.value =
|
|
1316
|
+
t && (X.value = ne.value[0]);
|
|
1317
1317
|
}
|
|
1318
1318
|
);
|
|
1319
1319
|
async function me(t, u, _, h, N) {
|
|
@@ -1357,13 +1357,13 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1357
1357
|
options: u
|
|
1358
1358
|
},
|
|
1359
1359
|
operateV2: {
|
|
1360
|
-
_id: ((A =
|
|
1361
|
-
_rev: ((P =
|
|
1360
|
+
_id: ((A = a.purchaseOrder) == null ? void 0 : A._id) ?? "",
|
|
1361
|
+
_rev: ((P = a.purchaseOrder) == null ? void 0 : P._rev) ?? "",
|
|
1362
1362
|
action: _,
|
|
1363
1363
|
payloads: p
|
|
1364
1364
|
// add payload if action is receiveStock or processRequest
|
|
1365
1365
|
},
|
|
1366
|
-
transferTo: ($ = (U =
|
|
1366
|
+
transferTo: ($ = (U = a.poRequest) == null ? void 0 : U.to) == null ? void 0 : $.dbName
|
|
1367
1367
|
}).delayed(1e3), V("submitted");
|
|
1368
1368
|
} catch (z) {
|
|
1369
1369
|
j(z);
|
|
@@ -1390,7 +1390,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
1392
|
const { successMessage: _ } = u;
|
|
1393
|
-
if (
|
|
1393
|
+
if (a.purchaseOrder) {
|
|
1394
1394
|
b.value = `${t}`, f.value = !0, w.value = !1;
|
|
1395
1395
|
const p = {};
|
|
1396
1396
|
let A = 0;
|
|
@@ -1398,15 +1398,15 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1398
1398
|
t === S.enum.completeReceive) && c.autoReceiveWarehouse)
|
|
1399
1399
|
p.autoReceive = !0;
|
|
1400
1400
|
else if ((t === S.enum.approveRequest || t === S.enum.processRequest) && c.acceptRequireFulfillment) {
|
|
1401
|
-
const P = (N = (h =
|
|
1401
|
+
const P = (N = (h = a.poRequest) == null ? void 0 : h.from) == null ? void 0 : N.dbName, U = (j = (V = a.poRequest) == null ? void 0 : V.to) == null ? void 0 : j.dbName;
|
|
1402
1402
|
if (P && U && (P.startsWith("warehouse_") || U.startsWith("warehouse_"))) {
|
|
1403
1403
|
const $ = await new Promise((z, C) => {
|
|
1404
1404
|
i.open({
|
|
1405
1405
|
closeButton: !1,
|
|
1406
1406
|
title: "Confirm transfer amount",
|
|
1407
|
-
dialogComponent:
|
|
1407
|
+
dialogComponent: It,
|
|
1408
1408
|
dialogComponentProps: {
|
|
1409
|
-
purchaseOrder:
|
|
1409
|
+
purchaseOrder: a.purchaseOrder,
|
|
1410
1410
|
confirm: z,
|
|
1411
1411
|
"onUpdate:show": (re) => {
|
|
1412
1412
|
re || (b.value = "", f.value = !1, w.value = !0, A++, i.close()), C("cancelled");
|
|
@@ -1419,7 +1419,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1419
1419
|
}
|
|
1420
1420
|
try {
|
|
1421
1421
|
await me(
|
|
1422
|
-
|
|
1422
|
+
a.purchaseOrder,
|
|
1423
1423
|
p,
|
|
1424
1424
|
t,
|
|
1425
1425
|
u,
|
|
@@ -1434,7 +1434,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1434
1434
|
title: "Something went wrong",
|
|
1435
1435
|
message: "Please try again.",
|
|
1436
1436
|
type: "error"
|
|
1437
|
-
}), console.error("Error when submitting PO operation", t,
|
|
1437
|
+
}), console.error("Error when submitting PO operation", t, a.purchaseOrder, P);
|
|
1438
1438
|
} finally {
|
|
1439
1439
|
b.value = "", f.value = !1, w.value = !0;
|
|
1440
1440
|
}
|
|
@@ -1442,10 +1442,10 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1442
1442
|
}
|
|
1443
1443
|
const fe = W(() => {
|
|
1444
1444
|
var t, u;
|
|
1445
|
-
return ((t =
|
|
1446
|
-
}),
|
|
1445
|
+
return ((t = a.purchaseOrder) == null ? void 0 : t.status) === le.enum.RECEIVING || ((u = a.purchaseOrder) == null ? void 0 : u.status) === le.enum.COMPLETE;
|
|
1446
|
+
}), Pe = W(() => {
|
|
1447
1447
|
var V, j, p;
|
|
1448
|
-
const _ = (((V =
|
|
1448
|
+
const _ = (((V = a.purchaseOrder) == null ? void 0 : V.deliveryOrder) ?? []).flatMap((A) => A.received ?? []).reduce(
|
|
1449
1449
|
(A, P) => {
|
|
1450
1450
|
const U = A[P.sku._id] ?? [];
|
|
1451
1451
|
return A[P.sku._id] = [...U, P], A;
|
|
@@ -1458,18 +1458,18 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1458
1458
|
z,
|
|
1459
1459
|
Math.max(z.precision, C.amount.precision)
|
|
1460
1460
|
);
|
|
1461
|
-
return
|
|
1462
|
-
},
|
|
1461
|
+
return Ee(re, C.amount);
|
|
1462
|
+
}, ke(0));
|
|
1463
1463
|
return A[P] = $, A;
|
|
1464
1464
|
},
|
|
1465
1465
|
{}
|
|
1466
|
-
), N = ((j =
|
|
1466
|
+
), N = ((j = a.purchaseOrder) == null ? void 0 : j.items) ?? [];
|
|
1467
1467
|
for (const A of N)
|
|
1468
|
-
h[p = A.sku._id] ?? (h[p] =
|
|
1468
|
+
h[p = A.sku._id] ?? (h[p] = ke(0));
|
|
1469
1469
|
return h;
|
|
1470
|
-
}),
|
|
1470
|
+
}), oe = W(() => {
|
|
1471
1471
|
var V, j;
|
|
1472
|
-
const t = ((V =
|
|
1472
|
+
const t = ((V = a.purchaseOrder) == null ? void 0 : V.deliveryOrder) ?? [], u = ((j = a.purchaseOrder) == null ? void 0 : j.deliveryFullfillment) ?? [], _ = [
|
|
1473
1473
|
...t.map((p) => ({
|
|
1474
1474
|
createdAt: p.createdAt,
|
|
1475
1475
|
type: "grn",
|
|
@@ -1483,7 +1483,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1483
1483
|
];
|
|
1484
1484
|
_.reverse().sort((p, A) => p.createdAt.localeCompare(A.createdAt));
|
|
1485
1485
|
function h(p) {
|
|
1486
|
-
var U, $, z, C, re, _e, we,
|
|
1486
|
+
var U, $, z, C, re, ge, _e, we, F;
|
|
1487
1487
|
const A = u.findIndex((T) => T.id === p.fullfillmentId), P = [
|
|
1488
1488
|
($ = (U = u[A]) == null ? void 0 : U.netSuite) != null && $.refNo ? {
|
|
1489
1489
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
@@ -1491,11 +1491,11 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1491
1491
|
} : null,
|
|
1492
1492
|
(re = p == null ? void 0 : p.netSuite) != null && re.refNo ? {
|
|
1493
1493
|
label: "Netsuite ref no.",
|
|
1494
|
-
values: [(
|
|
1494
|
+
values: [(ge = p == null ? void 0 : p.netSuite) == null ? void 0 : ge.refNo]
|
|
1495
1495
|
} : null,
|
|
1496
|
-
(
|
|
1496
|
+
(_e = p == null ? void 0 : p.netSuite) != null && _e.recordType ? {
|
|
1497
1497
|
label: "Netsuite Type",
|
|
1498
|
-
values: [rt((
|
|
1498
|
+
values: [rt((we = p == null ? void 0 : p.netSuite) == null ? void 0 : we.recordType)]
|
|
1499
1499
|
} : null
|
|
1500
1500
|
];
|
|
1501
1501
|
return {
|
|
@@ -1510,7 +1510,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1510
1510
|
},
|
|
1511
1511
|
{
|
|
1512
1512
|
label: "Received by",
|
|
1513
|
-
values: [(
|
|
1513
|
+
values: [(F = p.createdBy) == null ? void 0 : F.name]
|
|
1514
1514
|
},
|
|
1515
1515
|
{
|
|
1516
1516
|
label: "Received items",
|
|
@@ -1562,7 +1562,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1562
1562
|
{
|
|
1563
1563
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1564
1564
|
},
|
|
1565
|
-
|
|
1565
|
+
ie(T.amount, !1)
|
|
1566
1566
|
),
|
|
1567
1567
|
D(
|
|
1568
1568
|
"span",
|
|
@@ -1664,7 +1664,7 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1664
1664
|
{
|
|
1665
1665
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1666
1666
|
},
|
|
1667
|
-
|
|
1667
|
+
ie($.amount, !1)
|
|
1668
1668
|
),
|
|
1669
1669
|
D(
|
|
1670
1670
|
"span",
|
|
@@ -1704,14 +1704,14 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1704
1704
|
return N(p.doc);
|
|
1705
1705
|
}
|
|
1706
1706
|
});
|
|
1707
|
-
}),
|
|
1707
|
+
}), O = W(() => {
|
|
1708
1708
|
var u;
|
|
1709
1709
|
const t = {
|
|
1710
|
-
...
|
|
1710
|
+
...ke(0),
|
|
1711
1711
|
currency: Qe()
|
|
1712
1712
|
};
|
|
1713
|
-
return ((u =
|
|
1714
|
-
...
|
|
1713
|
+
return ((u = a.purchaseOrder) == null ? void 0 : u.items.reduce((_, h) => ({
|
|
1714
|
+
...Ee(_, h.totalCost ?? t),
|
|
1715
1715
|
currency: Qe()
|
|
1716
1716
|
}), t)) ?? t;
|
|
1717
1717
|
});
|
|
@@ -1727,157 +1727,157 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1727
1727
|
"max-width": 600
|
|
1728
1728
|
}, {
|
|
1729
1729
|
default: ce(() => {
|
|
1730
|
-
var C, re, _e, we
|
|
1730
|
+
var C, re, ge, _e, we;
|
|
1731
1731
|
return [
|
|
1732
1732
|
o("div", dr, [
|
|
1733
1733
|
o("div", null, [
|
|
1734
|
-
|
|
1735
|
-
items:
|
|
1734
|
+
B(_, {
|
|
1735
|
+
items: ne.value,
|
|
1736
1736
|
modelValue: X.value,
|
|
1737
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1737
|
+
"onUpdate:modelValue": u[0] || (u[0] = (F) => X.value = F)
|
|
1738
1738
|
}, null, 8, ["items", "modelValue"])
|
|
1739
1739
|
]),
|
|
1740
1740
|
X.value.value === "overview" ? (g(), q(te, { key: 0 }, [
|
|
1741
1741
|
o("div", null, [
|
|
1742
|
-
|
|
1742
|
+
B(V, {
|
|
1743
1743
|
variant: "outlined",
|
|
1744
1744
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1745
1745
|
}, {
|
|
1746
1746
|
default: ce(() => {
|
|
1747
|
-
var
|
|
1747
|
+
var F, T, M, pe, ye, Re, Me, Ke, je, ze, He, Ge;
|
|
1748
1748
|
return [
|
|
1749
1749
|
o("div", mr, [
|
|
1750
|
-
o("div", fr,
|
|
1750
|
+
o("div", fr, x(y(r)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1751
1751
|
o("div", null, [
|
|
1752
|
-
|
|
1753
|
-
label: y(r)(`inventory.transfer.status.${(
|
|
1754
|
-
class:
|
|
1752
|
+
B(h, {
|
|
1753
|
+
label: y(r)(`inventory.transfer.status.${(F = t.purchaseOrder) == null ? void 0 : F.status}`),
|
|
1754
|
+
class: Oe(`fm-status-badge fm-status-badge-${(M = (T = t.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : M.toLocaleLowerCase("en-us")}`),
|
|
1755
1755
|
compact: ""
|
|
1756
1756
|
}, null, 8, ["label", "class"])
|
|
1757
1757
|
])
|
|
1758
1758
|
]),
|
|
1759
|
-
|
|
1759
|
+
B(N),
|
|
1760
1760
|
o("div", pr, [
|
|
1761
1761
|
o("div", yr, [
|
|
1762
1762
|
o("div", vr, [
|
|
1763
|
-
o("div", hr,
|
|
1763
|
+
o("div", hr, x(y(r)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1764
1764
|
]),
|
|
1765
|
-
o("div", br,
|
|
1765
|
+
o("div", br, x(y(qe)(((pe = t.purchaseOrder) == null ? void 0 : pe._id) ?? "")), 1)
|
|
1766
1766
|
]),
|
|
1767
|
-
(
|
|
1768
|
-
o("div", _r,
|
|
1769
|
-
o("div", wr,
|
|
1770
|
-
])) :
|
|
1767
|
+
(ye = t.purchaseOrder) != null && ye.effectiveAt ? (g(), q("div", gr, [
|
|
1768
|
+
o("div", _r, x(y(r)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1769
|
+
o("div", wr, x(y(tt)(new Date((Re = t.purchaseOrder) == null ? void 0 : Re.effectiveAt))), 1)
|
|
1770
|
+
])) : E("", !0),
|
|
1771
1771
|
o("div", Sr, [
|
|
1772
|
-
o("div", Rr,
|
|
1773
|
-
o("div",
|
|
1772
|
+
o("div", Rr, x(y(r)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1773
|
+
o("div", xr, x(y(r)(
|
|
1774
1774
|
`inventory.transfer.receiveRequest.details.type.${l.value.toLocaleLowerCase("en-US")}`
|
|
1775
1775
|
)), 1)
|
|
1776
1776
|
]),
|
|
1777
|
-
(Ke = (Me = t.purchaseOrder) == null ? void 0 : Me.supplier) != null && Ke.name ? (g(), q("div",
|
|
1778
|
-
o("div", kr,
|
|
1779
|
-
o("div", qr,
|
|
1780
|
-
])) :
|
|
1777
|
+
(Ke = (Me = t.purchaseOrder) == null ? void 0 : Me.supplier) != null && Ke.name ? (g(), q("div", Or, [
|
|
1778
|
+
o("div", kr, x(y(r)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1779
|
+
o("div", qr, x((ze = (je = t.purchaseOrder) == null ? void 0 : je.supplier) == null ? void 0 : ze.name), 1)
|
|
1780
|
+
])) : E("", !0),
|
|
1781
1781
|
t.transferTo ? (g(), q("div", Dr, [
|
|
1782
|
-
o("div", Nr,
|
|
1783
|
-
o("div", Ar,
|
|
1784
|
-
])) :
|
|
1782
|
+
o("div", Nr, x(y(r)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1783
|
+
o("div", Ar, x(t.transferTo), 1)
|
|
1784
|
+
])) : E("", !0),
|
|
1785
1785
|
(He = t.purchaseOrder) != null && He.ref ? (g(), q("div", Tr, [
|
|
1786
|
-
o("div", Pr,
|
|
1787
|
-
o("div", $r,
|
|
1788
|
-
])) :
|
|
1786
|
+
o("div", Pr, x(y(r)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1787
|
+
o("div", $r, x(t.purchaseOrder.ref), 1)
|
|
1788
|
+
])) : E("", !0),
|
|
1789
1789
|
(Ge = t.purchaseOrder) != null && Ge.remark ? (g(), q("div", Cr, [
|
|
1790
|
-
o("div",
|
|
1791
|
-
o("div",
|
|
1792
|
-
])) :
|
|
1790
|
+
o("div", Fr, x(y(r)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1791
|
+
o("div", Ir, x(t.purchaseOrder.remark), 1)
|
|
1792
|
+
])) : E("", !0)
|
|
1793
1793
|
])
|
|
1794
1794
|
];
|
|
1795
1795
|
}),
|
|
1796
1796
|
_: 1
|
|
1797
1797
|
})
|
|
1798
1798
|
]),
|
|
1799
|
-
|
|
1799
|
+
B(ur, {
|
|
1800
1800
|
"po-request": t.poRequest,
|
|
1801
1801
|
purchaseOrder: t.purchaseOrder,
|
|
1802
1802
|
transferType: l.value,
|
|
1803
1803
|
transferToDbName: t.transferToDbName,
|
|
1804
1804
|
scope: t.scope
|
|
1805
1805
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
1806
|
-
o("div",
|
|
1807
|
-
o("div",
|
|
1806
|
+
o("div", Br, [
|
|
1807
|
+
o("div", Er, [
|
|
1808
1808
|
o("div", Lr, [
|
|
1809
1809
|
o("span", Ur, [
|
|
1810
|
-
Ce(
|
|
1811
|
-
(re = (C = t.purchaseOrder) == null ? void 0 : C.netSuite) != null && re.missingItems && ((
|
|
1810
|
+
Ce(x(fe.value ? y(r)("inventory.transfer.receiveRequest.details.receivedItems") : y(r)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1811
|
+
(re = (C = t.purchaseOrder) == null ? void 0 : C.netSuite) != null && re.missingItems && ((_e = (ge = t.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.missingItems.length) > 0 ? (g(), ae(p, {
|
|
1812
1812
|
key: 0,
|
|
1813
1813
|
variant: "rich",
|
|
1814
1814
|
placement: "top",
|
|
1815
1815
|
"z-index": 51
|
|
1816
1816
|
}, {
|
|
1817
1817
|
content: ce(() => {
|
|
1818
|
-
var
|
|
1818
|
+
var F, T;
|
|
1819
1819
|
return [
|
|
1820
1820
|
o("div", Vr, [
|
|
1821
|
-
(g(!0), q(te, null,
|
|
1821
|
+
(g(!0), q(te, null, ve((T = (F = t.purchaseOrder) == null ? void 0 : F.netSuite) == null ? void 0 : T.missingItems, (M, pe) => (g(), q("div", {
|
|
1822
1822
|
class: "flex justify-center align-middle",
|
|
1823
|
-
key:
|
|
1823
|
+
key: pe
|
|
1824
1824
|
}, [
|
|
1825
|
-
|
|
1825
|
+
B(j, {
|
|
1826
1826
|
name: "arrow_right",
|
|
1827
1827
|
size: "sm"
|
|
1828
1828
|
}),
|
|
1829
|
-
Ce(" " +
|
|
1829
|
+
Ce(" " + x(`(${M.netSuiteId}) ${M.name}: ${M.reason}`), 1)
|
|
1830
1830
|
]))), 128))
|
|
1831
1831
|
])
|
|
1832
1832
|
];
|
|
1833
1833
|
}),
|
|
1834
1834
|
default: ce(() => [
|
|
1835
|
-
|
|
1835
|
+
B(j, {
|
|
1836
1836
|
name: "error",
|
|
1837
1837
|
color: "#ff2c2c",
|
|
1838
1838
|
size: "sm"
|
|
1839
1839
|
})
|
|
1840
1840
|
]),
|
|
1841
1841
|
_: 1
|
|
1842
|
-
})) :
|
|
1842
|
+
})) : E("", !0)
|
|
1843
1843
|
])
|
|
1844
1844
|
]),
|
|
1845
|
-
|
|
1846
|
-
(g(!0), q(te, null,
|
|
1845
|
+
B(N),
|
|
1846
|
+
(g(!0), q(te, null, ve(((we = t.purchaseOrder) == null ? void 0 : we.items) ?? [], (F) => {
|
|
1847
1847
|
var T;
|
|
1848
1848
|
return g(), q("div", {
|
|
1849
|
-
key:
|
|
1849
|
+
key: F.code,
|
|
1850
1850
|
class: "flex flex-col"
|
|
1851
1851
|
}, [
|
|
1852
1852
|
o("div", Mr, [
|
|
1853
|
-
o("div", Kr,
|
|
1854
|
-
o("div", jr,
|
|
1853
|
+
o("div", Kr, x(F.name), 1),
|
|
1854
|
+
o("div", jr, x(y(ie)(Pe.value[F.sku._id], !1)) + "/" + x(y(at)(F.quantity, F.sku.unit, F.measurement)), 1)
|
|
1855
1855
|
]),
|
|
1856
1856
|
o("div", zr, [
|
|
1857
|
-
o("div", Hr,
|
|
1858
|
-
(T =
|
|
1857
|
+
o("div", Hr, x(F.code), 1),
|
|
1858
|
+
(T = F.totalCost) != null && T.amount && y(c).enableTotalCost ? (g(), q("div", Gr, " (" + x(y(xe)(F.totalCost)) + ") ", 1)) : E("", !0)
|
|
1859
1859
|
])
|
|
1860
1860
|
]);
|
|
1861
1861
|
}), 128)),
|
|
1862
|
-
+y(
|
|
1862
|
+
+y(ie)(O.value) ? (g(), q(te, { key: 0 }, [
|
|
1863
1863
|
o("div", Wr, [
|
|
1864
|
-
|
|
1864
|
+
B(N)
|
|
1865
1865
|
]),
|
|
1866
1866
|
o("div", Yr, [
|
|
1867
1867
|
u[6] || (u[6] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
1868
|
-
o("div", Qr,
|
|
1868
|
+
o("div", Qr, x(y(xe)(O.value)), 1)
|
|
1869
1869
|
])
|
|
1870
|
-
], 64)) :
|
|
1870
|
+
], 64)) : E("", !0)
|
|
1871
1871
|
])
|
|
1872
1872
|
])
|
|
1873
1873
|
], 64)) : X.value.value === "deliveryHistory" ? (g(), q("div", Jr, [
|
|
1874
|
-
|
|
1875
|
-
(g(!0), q(te, null,
|
|
1874
|
+
oe.value.length ? (g(), q("div", rs, [
|
|
1875
|
+
(g(!0), q(te, null, ve(oe.value, (F, T) => (g(), q(te, { key: T }, [
|
|
1876
1876
|
o("div", ss, [
|
|
1877
1877
|
o("div", as, [
|
|
1878
1878
|
o("div", ns, [
|
|
1879
1879
|
o("div", {
|
|
1880
|
-
class:
|
|
1880
|
+
class: Oe([
|
|
1881
1881
|
{
|
|
1882
1882
|
"bg-fm-color-primary": T !== 0,
|
|
1883
1883
|
"bg-white": T === 0
|
|
@@ -1889,10 +1889,10 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1889
1889
|
u[7] || (u[7] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
1890
1890
|
o("div", os, [
|
|
1891
1891
|
o("div", {
|
|
1892
|
-
class:
|
|
1892
|
+
class: Oe([
|
|
1893
1893
|
{
|
|
1894
|
-
"bg-fm-color-primary": T <
|
|
1895
|
-
"bg-white": T >=
|
|
1894
|
+
"bg-fm-color-primary": T < oe.value.length - 1,
|
|
1895
|
+
"bg-white": T >= oe.value.length - 1
|
|
1896
1896
|
},
|
|
1897
1897
|
"w-[2px] h-full"
|
|
1898
1898
|
])
|
|
@@ -1900,18 +1900,18 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1900
1900
|
])
|
|
1901
1901
|
]),
|
|
1902
1902
|
o("div", is, [
|
|
1903
|
-
o("div", ls,
|
|
1904
|
-
o("div", cs,
|
|
1903
|
+
o("div", ls, x(F.header), 1),
|
|
1904
|
+
o("div", cs, x(F.date), 1)
|
|
1905
1905
|
])
|
|
1906
1906
|
]),
|
|
1907
1907
|
o("div", us, [
|
|
1908
1908
|
o("div", ds, [
|
|
1909
1909
|
o("div", ms, [
|
|
1910
1910
|
o("div", {
|
|
1911
|
-
class:
|
|
1911
|
+
class: Oe([
|
|
1912
1912
|
{
|
|
1913
|
-
"bg-fm-color-primary": T <
|
|
1914
|
-
"bg-white": T >=
|
|
1913
|
+
"bg-fm-color-primary": T < oe.value.length - 1,
|
|
1914
|
+
"bg-white": T >= oe.value.length - 1
|
|
1915
1915
|
},
|
|
1916
1916
|
"w-[2px] h-full"
|
|
1917
1917
|
])
|
|
@@ -1919,25 +1919,25 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1919
1919
|
])
|
|
1920
1920
|
]),
|
|
1921
1921
|
o("div", fs, [
|
|
1922
|
-
|
|
1922
|
+
B(V, {
|
|
1923
1923
|
variant: "outlined",
|
|
1924
1924
|
class: "py-12 px-16"
|
|
1925
1925
|
}, {
|
|
1926
1926
|
default: ce(() => [
|
|
1927
1927
|
o("div", ps, [
|
|
1928
|
-
(g(!0), q(te, null,
|
|
1929
|
-
key:
|
|
1928
|
+
(g(!0), q(te, null, ve(F.info, (M, pe) => (g(), q("div", {
|
|
1929
|
+
key: pe,
|
|
1930
1930
|
class: "flex flex-col gap-4"
|
|
1931
1931
|
}, [
|
|
1932
|
-
o("div", ys,
|
|
1932
|
+
o("div", ys, x(M == null ? void 0 : M.label), 1),
|
|
1933
1933
|
o("div", vs, [
|
|
1934
|
-
(g(!0), q(te, null,
|
|
1935
|
-
key:
|
|
1934
|
+
(g(!0), q(te, null, ve(M == null ? void 0 : M.values, (ye, Re) => (g(), q("div", {
|
|
1935
|
+
key: Re,
|
|
1936
1936
|
class: "fm-typo-en-body-lg-600"
|
|
1937
1937
|
}, [
|
|
1938
|
-
typeof
|
|
1939
|
-
Ce(
|
|
1940
|
-
], 64)) : (g(), ae(_t(
|
|
1938
|
+
typeof ye == "string" ? (g(), q(te, { key: 0 }, [
|
|
1939
|
+
Ce(x(ye), 1)
|
|
1940
|
+
], 64)) : (g(), ae(_t(ye), { key: 1 }))
|
|
1941
1941
|
]))), 128))
|
|
1942
1942
|
])
|
|
1943
1943
|
]))), 128))
|
|
@@ -1949,33 +1949,33 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1949
1949
|
])
|
|
1950
1950
|
], 64))), 128))
|
|
1951
1951
|
])) : (g(), q("div", Xr, [
|
|
1952
|
-
|
|
1952
|
+
B(A),
|
|
1953
1953
|
o("div", null, [
|
|
1954
1954
|
o("img", {
|
|
1955
|
-
src: y(
|
|
1955
|
+
src: y(xt),
|
|
1956
1956
|
alt: "List is empty"
|
|
1957
1957
|
}, null, 8, Zr)
|
|
1958
1958
|
]),
|
|
1959
|
-
o("div", es,
|
|
1960
|
-
o("div", ts,
|
|
1961
|
-
|
|
1962
|
-
|
|
1959
|
+
o("div", es, x(y(r)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1960
|
+
o("div", ts, x(y(r)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1961
|
+
B(A),
|
|
1962
|
+
B(A)
|
|
1963
1963
|
]))
|
|
1964
|
-
])) :
|
|
1964
|
+
])) : E("", !0)
|
|
1965
1965
|
])
|
|
1966
1966
|
];
|
|
1967
1967
|
}),
|
|
1968
1968
|
"side-sheet-footer": ce(() => [
|
|
1969
1969
|
o("div", hs, [
|
|
1970
|
-
(g(!0), q(te, null,
|
|
1971
|
-
y(
|
|
1970
|
+
(g(!0), q(te, null, ve(Y.value, (C) => (g(), q(te, null, [
|
|
1971
|
+
y(Be)[C].available != !1 ? (g(), ae(P, {
|
|
1972
1972
|
key: C,
|
|
1973
|
-
label: y(r)(y(
|
|
1973
|
+
label: y(r)(y(Be)[C].translationKey),
|
|
1974
1974
|
onClick: (re) => se(C),
|
|
1975
1975
|
loading: b.value === C,
|
|
1976
1976
|
disabled: b.value !== C && f.value,
|
|
1977
|
-
variant: y(
|
|
1978
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
1977
|
+
variant: y(Be)[C].buttonVariant
|
|
1978
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : E("", !0)
|
|
1979
1979
|
], 64))), 256)),
|
|
1980
1980
|
y(R).ableToMarkReceived(t.purchaseOrder) && !Y.value.includes("completeReceive") ? (g(), ae(P, {
|
|
1981
1981
|
key: 0,
|
|
@@ -1983,22 +1983,22 @@ const Bt = { class: "flex flex-row-reverse" }, Lt = /* @__PURE__ */ ge({
|
|
|
1983
1983
|
onClick: u[1] || (u[1] = (C) => se("completeReceive")),
|
|
1984
1984
|
loading: b.value === "completeReceive",
|
|
1985
1985
|
disabled: b.value !== "completeReceive" && f.value
|
|
1986
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1986
|
+
}, null, 8, ["label", "loading", "disabled"])) : E("", !0),
|
|
1987
1987
|
y(R).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !Y.value.includes("approveRequest") ? (g(), ae(P, {
|
|
1988
1988
|
key: 1,
|
|
1989
1989
|
label: y(r)("inventory.transfer.approval.actions.approveRequest"),
|
|
1990
1990
|
onClick: u[2] || (u[2] = (C) => se("approveRequest")),
|
|
1991
1991
|
loading: b.value === "approveRequest",
|
|
1992
1992
|
disabled: b.value !== "approveRequest" && f.value
|
|
1993
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
1993
|
+
}, null, 8, ["label", "loading", "disabled"])) : E("", !0),
|
|
1994
1994
|
y(R).ableToCreateFulfillment(t.purchaseOrder, t.poRequest) ? (g(), ae(P, {
|
|
1995
1995
|
key: 2,
|
|
1996
1996
|
label: y(r)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
1997
1997
|
onClick: u[3] || (u[3] = (C) => se("processRequest")),
|
|
1998
1998
|
loading: b.value === "processRequest",
|
|
1999
1999
|
disabled: b.value !== "processRequest" && f.value
|
|
2000
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
2001
|
-
|
|
2000
|
+
}, null, 8, ["label", "loading", "disabled"])) : E("", !0),
|
|
2001
|
+
B(P, {
|
|
2002
2002
|
label: y(r)("common.close"),
|
|
2003
2003
|
variant: "tertiary",
|
|
2004
2004
|
onClick: u[4] || (u[4] = (C) => k("update:show", !1))
|
|
@@ -2016,5 +2016,5 @@ export {
|
|
|
2016
2016
|
Ns as a,
|
|
2017
2017
|
As as b,
|
|
2018
2018
|
Tt as g,
|
|
2019
|
-
|
|
2019
|
+
Te as u
|
|
2020
2020
|
};
|