@fewangsit/wangsvue-fats 1.0.1-alpha.57 → 1.0.1-alpha.58
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/disposalreporttable/index.es.js +11 -11
- package/package.json +1 -1
- package/stats.html +1 -1
- package/wangsvue-fats.esm.browser.js +1 -1
- package/wangsvue-fats.system.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Y, onMounted as Z, shallowRef as f, ref as ee, createElementBlock as te, openBlock as se, Fragment as ae, createElementVNode as g, createVNode as i, mergeProps as oe, unref as d, withCtx as re, toDisplayString as M } from "vue";
|
|
2
|
-
import { AssetServices as
|
|
2
|
+
import { AssetServices as D, DisposalServices as ne, DamageServices as T, MissingServices as N } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as le } from "../assetinfo/index.es.js";
|
|
4
4
|
import { u as ie } from "../plugins/basei18n.es.js";
|
|
5
5
|
import "../utils/role.util.es.js";
|
|
@@ -18,7 +18,7 @@ import { _ as ve } from "../disposalreporttablefilter/index.es.js";
|
|
|
18
18
|
const be = {
|
|
19
19
|
class: "flex flex-col gap-2",
|
|
20
20
|
"data-ts-section": "disposalreporttablewrapper"
|
|
21
|
-
}, he = { class: "flex gap-1 justify-end" },
|
|
21
|
+
}, he = { class: "flex gap-1 justify-end" }, _e = { class: "flex gap-1 justify-end" }, Le = /* @__PURE__ */ Y({
|
|
22
22
|
__name: "DisposalReportTable",
|
|
23
23
|
props: {
|
|
24
24
|
treeTable: { type: Boolean },
|
|
@@ -187,7 +187,7 @@ const be = {
|
|
|
187
187
|
}
|
|
188
188
|
try {
|
|
189
189
|
c(!0);
|
|
190
|
-
const { data: e } = await
|
|
190
|
+
const { data: e } = await D.getAllAssets({ _id: s });
|
|
191
191
|
e.data.data.forEach((t) => {
|
|
192
192
|
u.value.set(t._id ?? "", {
|
|
193
193
|
notes: null,
|
|
@@ -218,7 +218,7 @@ const be = {
|
|
|
218
218
|
}, F = (s) => {
|
|
219
219
|
s.forEach((e) => {
|
|
220
220
|
u.value.delete(e._id ?? "");
|
|
221
|
-
}), n.value.length ||
|
|
221
|
+
}), n.value.length || _(), m.add({
|
|
222
222
|
message: r("Success, asset has been removed from the list."),
|
|
223
223
|
severity: "success"
|
|
224
224
|
});
|
|
@@ -229,7 +229,7 @@ const be = {
|
|
|
229
229
|
reason: ["Damaged", "Missing"].includes(t.status) ? t.status : p.reason
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
|
-
},
|
|
232
|
+
}, _ = () => {
|
|
233
233
|
const s = window.location.pathname, e = s.slice(0, s.lastIndexOf("/"));
|
|
234
234
|
p.router.replace(e), sessionStorage.removeItem("assetsDisposalReport");
|
|
235
235
|
}, U = async () => {
|
|
@@ -245,7 +245,7 @@ const be = {
|
|
|
245
245
|
try {
|
|
246
246
|
c(!0), await ne.postReportDisposal({ data: s }), m.add({
|
|
247
247
|
message: r("Success, disposal report has been submitted.")
|
|
248
|
-
}),
|
|
248
|
+
}), _();
|
|
249
249
|
} catch (e) {
|
|
250
250
|
console.error(e), m.add({
|
|
251
251
|
error: e,
|
|
@@ -322,12 +322,12 @@ const be = {
|
|
|
322
322
|
}, W = async (s) => {
|
|
323
323
|
var a;
|
|
324
324
|
const e = JSON.stringify(
|
|
325
|
-
((a = n.value) == null ? void 0 : a.map((l) => l.reportId)) ?? []
|
|
325
|
+
((a = n.value) == null ? void 0 : a.map((l) => l.reportId ?? l._id)) ?? []
|
|
326
326
|
), t = {
|
|
327
327
|
excludeId: e,
|
|
328
328
|
excludeIds: e,
|
|
329
329
|
...s
|
|
330
|
-
}, { data: o } = await
|
|
330
|
+
}, { data: o } = await D.getAllAssets(t);
|
|
331
331
|
return o;
|
|
332
332
|
}, j = async (s) => p.from === "damage" ? V(s) : p.from === "missing" ? z(s) : W(s), H = async (s) => {
|
|
333
333
|
var a;
|
|
@@ -361,7 +361,7 @@ const be = {
|
|
|
361
361
|
excludeId: e,
|
|
362
362
|
excludeIds: e,
|
|
363
363
|
[s]: !0
|
|
364
|
-
}, { data: o } = await
|
|
364
|
+
}, { data: o } = await D.getAllAssetsOptions(t);
|
|
365
365
|
return o.data[s] ?? [];
|
|
366
366
|
}, X = async (s) => p.from === "damage" ? H(s) : p.from === "missing" ? K(s) : Q(s);
|
|
367
367
|
return (s, e) => (se(), te(ae, null, [
|
|
@@ -427,7 +427,7 @@ const be = {
|
|
|
427
427
|
"onUpdate:visible": e[8] || (e[8] = (t) => b.value = t),
|
|
428
428
|
"confirm-label": d(r)("Continue"),
|
|
429
429
|
header: d(r)("Cancel Report"),
|
|
430
|
-
onConfirm:
|
|
430
|
+
onConfirm: _,
|
|
431
431
|
severity: "danger"
|
|
432
432
|
}, {
|
|
433
433
|
body: re(() => [
|
|
@@ -436,7 +436,7 @@ const be = {
|
|
|
436
436
|
]),
|
|
437
437
|
_: 1
|
|
438
438
|
}, 8, ["visible", "confirm-label", "header"]),
|
|
439
|
-
g("div",
|
|
439
|
+
g("div", _e, [
|
|
440
440
|
i(x, {
|
|
441
441
|
label: d(r)("Cancel"),
|
|
442
442
|
onClick: e[9] || (e[9] = (t) => b.value = !0),
|