@fewangsit/wangsvue-fats 1.0.1-alpha.14 → 1.0.1-alpha.16
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/assetinfo/index.es.js +1 -1
- package/buttonaddbyscan/index.es.js +7 -7
- package/buttonscan/index.es.js +16 -16
- package/config/defaultProps.es.js +1 -1
- package/dialogassetnamedetail/index.es.js +1 -1
- package/dialogbasictransferlog/index.es.js +10 -10
- package/dialogdamagelog/index.es.js +1 -1
- package/dialogfulltransferlog/index.es.js +17 -17
- package/dialoglinkedasset/index.es.js +1 -1
- package/dialogprintqr/index.es.js +1 -1
- package/dialogreportdamage/index.es.js +9 -9
- package/dialogreportmissing/index.es.js +15 -15
- package/dialogreporttag/index.es.js +1 -1
- package/dialogselectuser/index.es.js +6 -6
- package/disposalreporttable/index.es.js +5 -5
- package/disposalreporttablefilter/index.es.js +1 -1
- package/imagecompressor/index.es.js +3 -3
- package/inputcurrency/index.es.js +19 -19
- package/inputphonenumber/index.es.js +27 -27
- package/package.json +1 -1
- package/plugins/i18n.es.js +1 -1
- package/stats.html +1 -1
- package/wangsvue-fats.esm.browser.js +9828 -10174
- package/wangsvue-fats.system.js +1 -1
- package/vendor/@tagsamurai/fats-api-services/api-services.es.es.js +0 -362
package/assetinfo/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef as J, ref as X, defineComponent as Y, onMounted as Z, computed as f, watch as ee, createElementBlock as c, openBlock as p, createVNode as m, createElementVNode as l, createCommentVNode as v, toDisplayString as k, Fragment as se, unref as W, normalizeClass as b } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetServices as ae } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { g as te } from "../utils/getStatusSeverity.util.es.js";
|
|
4
4
|
import { u as le } from "../utils/toast.util.es.js";
|
|
5
5
|
import { _ as h } from "../badge/index.es.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as v, createElementBlock as D, openBlock as E, Fragment as x, createVNode as g } from "vue";
|
|
2
|
+
import { DisposalServices as S, AssetServices as y } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as B } from "../assetinfo/index.es.js";
|
|
4
4
|
import { u as w } from "../utils/toast.util.es.js";
|
|
5
5
|
import { _ as P } from "../buttonsearchbyscan/index.es.js";
|
|
6
6
|
import { _ as q } from "../toast/index.es.js";
|
|
7
|
-
const $ = /* @__PURE__ */
|
|
7
|
+
const $ = /* @__PURE__ */ v({
|
|
8
8
|
__name: "ButtonAddByScan",
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: {},
|
|
@@ -13,8 +13,8 @@ const $ = /* @__PURE__ */ D({
|
|
|
13
13
|
queryParams: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue", "scan"],
|
|
16
|
-
setup(f, { emit:
|
|
17
|
-
const d = w(), { setLoading: c } = B(), s = f, m =
|
|
16
|
+
setup(f, { emit: h }) {
|
|
17
|
+
const d = w(), { setLoading: c } = B(), s = f, m = h, A = async (t) => {
|
|
18
18
|
var o, l, i, n;
|
|
19
19
|
try {
|
|
20
20
|
c(!0);
|
|
@@ -127,9 +127,9 @@ const $ = /* @__PURE__ */ D({
|
|
|
127
127
|
c(!1);
|
|
128
128
|
}
|
|
129
129
|
}, V = async (t) => {
|
|
130
|
-
s.reportedDisposalAssets ? await _(t) : s.noDisposalAssets ? await b(t) : await
|
|
130
|
+
s.reportedDisposalAssets ? await _(t) : s.noDisposalAssets ? await b(t) : await A(t);
|
|
131
131
|
};
|
|
132
|
-
return (t, o) => (E(),
|
|
132
|
+
return (t, o) => (E(), D(x, null, [
|
|
133
133
|
g(q, {
|
|
134
134
|
"base-z-index": 9997,
|
|
135
135
|
class: "!absolute !bottom-[80px] !h-max",
|
package/buttonscan/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AxiosError as ye } from "axios";
|
|
2
|
-
import { ref as re, defineComponent as _e, onBeforeUnmount as Re, shallowRef as v, computed as
|
|
3
|
-
import {
|
|
2
|
+
import { ref as re, defineComponent as _e, onBeforeUnmount as Re, shallowRef as v, computed as E, createElementBlock as D, openBlock as u, Fragment as F, createVNode as b, createBlock as M, createCommentVNode as U, mergeProps as De, withCtx as ke, createElementVNode as C, normalizeClass as ee, createTextVNode as se, toDisplayString as A, Teleport as Ne } from "vue";
|
|
3
|
+
import { ChangelogServices as he } from "@tagsamurai/fats-api-services";
|
|
4
4
|
import { u as Ie } from "../utils/baseToast.util.es.js";
|
|
5
5
|
import { _ as ne } from "../button/index.es.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
6
|
+
import { _ as Ee } from "../dialogconfirm/index.es.js";
|
|
7
|
+
import { _ as Ce } from "../hardwaresync/index.es.js";
|
|
8
8
|
import { _ as $ } from "../icon/index.es.js";
|
|
9
9
|
import { _ as z } from "../toast/index.es.js";
|
|
10
10
|
import { v as J } from "../vendor/uuid/dist/esm-browser/v4.es.js";
|
|
@@ -96,12 +96,12 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
96
96
|
Re(() => {
|
|
97
97
|
X();
|
|
98
98
|
});
|
|
99
|
-
const c = Ie(), { devices: le, device: S, saveDevices: ue, setDevice: G } = Be(), w = v(!1), O = v(!1), k = v(!1), N = v(!1), y = v(!1), V = v(!1), f = v(), H = v(0), o = v(s.type ?? "RFID"), P = [], T =
|
|
99
|
+
const c = Ie(), { devices: le, device: S, saveDevices: ue, setDevice: G } = Be(), w = v(!1), O = v(!1), k = v(!1), N = v(!1), y = v(!1), V = v(!1), f = v(), H = v(0), o = v(s.type ?? "RFID"), P = [], T = E(
|
|
100
100
|
() => o.value === "RFID" ? "RFID_Scanning" : "QR_Scanning"
|
|
101
|
-
), g =
|
|
101
|
+
), g = E(
|
|
102
102
|
() => o.value === "RFID" ? "RFID_Connecting" : "QR_Connecting"
|
|
103
103
|
);
|
|
104
|
-
|
|
104
|
+
E(() => `The scanner could not identify the ${o.value} code. It may be damaged or improperly positioned. Please check the code and try again.`);
|
|
105
105
|
const de = () => {
|
|
106
106
|
window.scannerWorker ?? (window.scannerWorker = new Te());
|
|
107
107
|
}, x = () => {
|
|
@@ -293,10 +293,10 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
293
293
|
}, ge = () => {
|
|
294
294
|
const { userAgent: e } = navigator;
|
|
295
295
|
return e.includes("Windows");
|
|
296
|
-
}, be =
|
|
296
|
+
}, be = E(() => {
|
|
297
297
|
if (!s.labelOnly)
|
|
298
298
|
return s.icon ? s.icon : s.autoSwitch ? "qr-scan" : o.value === "QR" ? "qr" : "rfid";
|
|
299
|
-
}), Se =
|
|
299
|
+
}), Se = E(() => s.label ? s.label : s.autoSwitch ? "SCAN TAG" : o.value === "QR" ? "Scan QR" : "Scan RFID");
|
|
300
300
|
return l({
|
|
301
301
|
onBeforeStartScan: B,
|
|
302
302
|
startScan: q,
|
|
@@ -318,7 +318,7 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
318
318
|
size: s.size,
|
|
319
319
|
onClick: B
|
|
320
320
|
}), null, 16, ["class", "disabled", "icon", "label", "outlined", "severity", "size"]),
|
|
321
|
-
b(
|
|
321
|
+
b(Ce, {
|
|
322
322
|
visible: N.value,
|
|
323
323
|
"onUpdate:visible": t[0] || (t[0] = (n) => N.value = n),
|
|
324
324
|
bulk: e.bulk,
|
|
@@ -345,18 +345,18 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
345
345
|
class: "[&_[data-pc-section=buttoncontainer]]"
|
|
346
346
|
}, {
|
|
347
347
|
message: ke(({ message: n }) => [
|
|
348
|
-
|
|
348
|
+
C("div", {
|
|
349
349
|
class: ee(
|
|
350
350
|
n.detail == "scanning" ? "w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 text-xs font-normal" : "w-full"
|
|
351
351
|
)
|
|
352
352
|
}, [
|
|
353
353
|
n.detail === "scanning" ? (u(), D(F, { key: 0 }, [
|
|
354
|
-
|
|
354
|
+
C("section", Le, [
|
|
355
355
|
b($, {
|
|
356
356
|
class: "animate-spin text-base",
|
|
357
357
|
icon: "loader-4"
|
|
358
358
|
}),
|
|
359
|
-
|
|
359
|
+
C("span", We, [
|
|
360
360
|
o.value === "RFID" ? (u(), D(F, { key: 0 }, [
|
|
361
361
|
b($, {
|
|
362
362
|
class: "text-base !w-4 !h-4",
|
|
@@ -372,8 +372,8 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
372
372
|
], 64))
|
|
373
373
|
])
|
|
374
374
|
]),
|
|
375
|
-
|
|
376
|
-
t[4] || (t[4] =
|
|
375
|
+
C("section", Fe, [
|
|
376
|
+
t[4] || (t[4] = C("span", null, "do not leave this page", -1)),
|
|
377
377
|
b(ne, {
|
|
378
378
|
onClick: t[1] || (t[1] = (_) => I(!0)),
|
|
379
379
|
label: "Stop Scan",
|
|
@@ -385,7 +385,7 @@ const ie = () => window.devices ?? [], xe = () => window.device ?? { RFID: null,
|
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["group"])) : U("", !0),
|
|
388
|
-
b(
|
|
388
|
+
b(Ee, {
|
|
389
389
|
visible: O.value,
|
|
390
390
|
"onUpdate:visible": t[2] || (t[2] = (n) => O.value = n),
|
|
391
391
|
header: `${o.value} SCAN STOPPED`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getImageURL as c, GroupCategoryServices as l } from "@tagsamurai/fats-api-services";
|
|
2
2
|
import { g } from "../utils/role.util.es.js";
|
|
3
3
|
import "../event-bus/index.es.js";
|
|
4
4
|
import "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as D, computed as x, shallowRef as O, ref as T, createBlock as k, openBlock as B, withCtx as C, createElementVNode as m, createVNode as u, toDisplayString as b, unref as g } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetNameServices as y } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { _ as p } from "../badge/index.es.js";
|
|
4
4
|
import { u as R } from "../utils/toast.util.es.js";
|
|
5
5
|
import { _ as G } from "../buttonfilter/index.es.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as O, mergeModels as S, useModel as F, ref as v, inject as K, computed as p, watch as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as O, mergeModels as S, useModel as F, ref as v, inject as K, computed as p, watch as T, createBlock as x, openBlock as r, withCtx as b, createElementBlock as m, createCommentVNode as M, createElementVNode as a, createVNode as i, toDisplayString as L } from "vue";
|
|
2
|
+
import { TransferServices as q } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as E } from "../utils/baseToast.util.es.js";
|
|
4
4
|
import { _ as d } from "../badge/index.es.js";
|
|
5
5
|
import { _ as A } from "../button/index.es.js";
|
|
@@ -53,8 +53,8 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
53
53
|
title: e.action + " by",
|
|
54
54
|
date: e.updatedAt,
|
|
55
55
|
username: e.userFullName,
|
|
56
|
-
body: e.action === "Handed over" ? void 0 :
|
|
57
|
-
detail: e.action === "Handed over" ? void 0 :
|
|
56
|
+
body: e.action === "Handed over" ? void 0 : j(e.detail),
|
|
57
|
+
detail: e.action === "Handed over" ? void 0 : j(e.detail)
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
60
|
), G = (t) => {
|
|
@@ -71,7 +71,7 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
71
71
|
default:
|
|
72
72
|
return "primary";
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, j = (t) => {
|
|
75
75
|
if (!t || !Object.keys(t).length)
|
|
76
76
|
return;
|
|
77
77
|
const e = {}, s = Object.keys(t);
|
|
@@ -94,15 +94,15 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
94
94
|
message: "Error, failed to load transfer transaction log"
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, N = (t) => {
|
|
98
98
|
if (_.value === -1 || t === "prev" && h.value || t === "next" && $.value)
|
|
99
99
|
return;
|
|
100
100
|
const e = t === "prev" ? _.value - 1 : _.value + 1;
|
|
101
101
|
o.value = u.value[e];
|
|
102
102
|
};
|
|
103
|
-
return
|
|
103
|
+
return T(g, (t) => {
|
|
104
104
|
t && (o.value = C.id);
|
|
105
|
-
}),
|
|
105
|
+
}), T(o, (t) => {
|
|
106
106
|
t && I();
|
|
107
107
|
}), (t, e) => (r(), x(H, {
|
|
108
108
|
visible: g.value,
|
|
@@ -121,14 +121,14 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
121
121
|
a("div", J, [
|
|
122
122
|
i(A, {
|
|
123
123
|
disabled: h.value,
|
|
124
|
-
onClick: e[0] || (e[0] = (s) =>
|
|
124
|
+
onClick: e[0] || (e[0] = (s) => N("prev")),
|
|
125
125
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
126
126
|
label: "<Prev",
|
|
127
127
|
text: ""
|
|
128
128
|
}, null, 8, ["disabled"]),
|
|
129
129
|
i(A, {
|
|
130
130
|
disabled: $.value,
|
|
131
|
-
onClick: e[1] || (e[1] = (s) =>
|
|
131
|
+
onClick: e[1] || (e[1] = (s) => N("next")),
|
|
132
132
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
133
133
|
label: "Next>",
|
|
134
134
|
text: ""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as ge, mergeModels as ee, useModel as xe, ref as m, computed as te, watch as be, createBlock as p, openBlock as r, withCtx as g, createElementVNode as t, createVNode as n, createCommentVNode as x, toDisplayString as u, createElementBlock as se, unref as _e, Fragment as ye, normalizeClass as b } from "vue";
|
|
2
2
|
import { t as he } from "../vendor/single-spa/lib/es2015/esm/single-spa.min.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { DamageServices as we } from "@tagsamurai/fats-api-services";
|
|
4
4
|
import { u as De } from "../assetinfo/index.es.js";
|
|
5
5
|
import { a as Ie } from "../utils/role.util.es.js";
|
|
6
6
|
import { u as ke } from "../utils/toast.util.es.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as G, mergeModels as M, useModel as O, onMounted as S, inject as K, ref as m, computed as p, watch as C, createBlock as x, openBlock as o, withCtx as b, createElementBlock as v, createCommentVNode as q, createElementVNode as a, createVNode as i, toDisplayString as y } from "vue";
|
|
2
|
+
import { TransferServices as E } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as H } from "../utils/baseToast.util.es.js";
|
|
4
4
|
import { _ as f } from "../badge/index.es.js";
|
|
5
5
|
import { _ as L } from "../button/index.es.js";
|
|
@@ -25,7 +25,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
25
25
|
}, ce = { class: "text-xs font-medium text-general-400" }, fe = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "text-xs font-medium"
|
|
28
|
-
},
|
|
28
|
+
}, je = /* @__PURE__ */ G({
|
|
29
29
|
__name: "DialogFullTransferLog",
|
|
30
30
|
props: /* @__PURE__ */ M({
|
|
31
31
|
id: {}
|
|
@@ -45,7 +45,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
45
45
|
}), $ = p(() => {
|
|
46
46
|
var t, e;
|
|
47
47
|
return (t = r.value) != null && t.length ? u.value === ((e = r.value) == null ? void 0 : e[0]) : !1;
|
|
48
|
-
}),
|
|
48
|
+
}), j = p(() => {
|
|
49
49
|
var t, e, l;
|
|
50
50
|
return (t = r.value) != null && t.length ? u.value === ((l = r.value) == null ? void 0 : l[((e = r.value) == null ? void 0 : e.length) - 1]) : !1;
|
|
51
51
|
}), D = p(
|
|
@@ -58,11 +58,11 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
58
58
|
title: e.action + " by",
|
|
59
59
|
date: e.updatedAt,
|
|
60
60
|
username: e.userFullName,
|
|
61
|
-
body: e.action === "Handed over" ? void 0 :
|
|
62
|
-
detail: e.action === "Handed over" ? void 0 :
|
|
61
|
+
body: e.action === "Handed over" ? void 0 : N(e.detail),
|
|
62
|
+
detail: e.action === "Handed over" ? void 0 : N(e.detail)
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
|
-
),
|
|
65
|
+
), B = (t) => {
|
|
66
66
|
switch (t) {
|
|
67
67
|
case "Rejected":
|
|
68
68
|
case "Reported Missing":
|
|
@@ -76,7 +76,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
76
76
|
default:
|
|
77
77
|
return "primary";
|
|
78
78
|
}
|
|
79
|
-
},
|
|
79
|
+
}, N = (t) => {
|
|
80
80
|
if (!t || !Object.keys(t).length)
|
|
81
81
|
return;
|
|
82
82
|
const e = {}, l = Object.keys(t);
|
|
@@ -85,7 +85,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
85
85
|
e[n === "Notes" ? "Note" : n] = t[d] ?? "-";
|
|
86
86
|
}
|
|
87
87
|
return e;
|
|
88
|
-
},
|
|
88
|
+
}, F = async () => {
|
|
89
89
|
var t;
|
|
90
90
|
if ((t = u.value) != null && t.length)
|
|
91
91
|
try {
|
|
@@ -99,8 +99,8 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
99
99
|
message: "Error, failed to load transfer transaction log"
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
},
|
|
103
|
-
if (g.value === -1 || t === "prev" && $.value || t === "next" &&
|
|
102
|
+
}, T = (t) => {
|
|
103
|
+
if (g.value === -1 || t === "prev" && $.value || t === "next" && j.value)
|
|
104
104
|
return;
|
|
105
105
|
const e = t === "prev" ? g.value - 1 : g.value + 1;
|
|
106
106
|
u.value = r.value[e];
|
|
@@ -108,7 +108,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
108
108
|
return C(_, (t) => {
|
|
109
109
|
t && (u.value = A.id);
|
|
110
110
|
}), C(u, (t) => {
|
|
111
|
-
t &&
|
|
111
|
+
t && F();
|
|
112
112
|
}), (t, e) => (o(), x(R, {
|
|
113
113
|
visible: _.value,
|
|
114
114
|
"onUpdate:visible": e[2] || (e[2] = (l) => _.value = l),
|
|
@@ -134,14 +134,14 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
134
134
|
a("div", ee, [
|
|
135
135
|
i(L, {
|
|
136
136
|
disabled: $.value,
|
|
137
|
-
onClick: e[0] || (e[0] = (c) =>
|
|
137
|
+
onClick: e[0] || (e[0] = (c) => T("prev")),
|
|
138
138
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
139
139
|
label: "<Prev",
|
|
140
140
|
text: ""
|
|
141
141
|
}, null, 8, ["disabled"]),
|
|
142
142
|
i(L, {
|
|
143
|
-
disabled:
|
|
144
|
-
onClick: e[1] || (e[1] = (c) =>
|
|
143
|
+
disabled: j.value,
|
|
144
|
+
onClick: e[1] || (e[1] = (c) => T("next")),
|
|
145
145
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
146
146
|
label: "Next>",
|
|
147
147
|
text: ""
|
|
@@ -185,7 +185,7 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
185
185
|
e[6] || (e[6] = a("span", null, "Status:", -1)),
|
|
186
186
|
i(f, {
|
|
187
187
|
label: s.value.status,
|
|
188
|
-
severity:
|
|
188
|
+
severity: B(s.value.status),
|
|
189
189
|
format: "nowrap"
|
|
190
190
|
}, null, 8, ["label", "severity"])
|
|
191
191
|
]),
|
|
@@ -233,5 +233,5 @@ const Q = { class: "w-full flex items-center justify-between pr-4" }, X = { clas
|
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
235
|
export {
|
|
236
|
-
|
|
236
|
+
je as _
|
|
237
237
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as W, computed as b, ref as k, watch as T, createBlock as L, openBlock as n, mergeProps as j, createSlots as G, withCtx as C, createElementVNode as m, createVNode as S, createElementBlock as i, createCommentVNode as $, Fragment as u, renderList as w, toDisplayString as p } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetServices as J } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as O } from "../utils/toast.util.es.js";
|
|
4
4
|
import { _ as P } from "../button/index.es.js";
|
|
5
5
|
import { _ as R } from "../dialogconfirm/index.es.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as S, getCurrentInstance as N, onMounted as D, shallowRef as z, ref as G, computed as T, watch as F, nextTick as U, createBlock as K, openBlock as r, withCtx as h, createVNode as a, createElementBlock as f, createCommentVNode as V, createElementVNode as e, Fragment as l, renderList as p, unref as X, normalizeStyle as c, toDisplayString as q } from "vue";
|
|
2
2
|
import { r as E } from "../vendor/qrcode/lib/browser.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { TAGServices as C } from "@tagsamurai/fats-api-services";
|
|
4
4
|
import { u as B } from "../assetinfo/index.es.js";
|
|
5
5
|
import { f as Q } from "../utils/formatTagCode.util.es.js";
|
|
6
6
|
import { u as I } from "../utils/toast.util.es.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as j, computed as v, ref as B, shallowRef as $, watch as V, createElementBlock as R, openBlock as u, Fragment as J, createVNode as l, withCtx as S, createElementVNode as b, createCommentVNode as m, unref as q, createBlock as k, createTextVNode as O, toDisplayString as H } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { DamageServices as K, AssetServices as P } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as X, _ as Y } from "../assetinfo/index.es.js";
|
|
4
4
|
import { a as Z } from "../utils/role.util.es.js";
|
|
5
5
|
import { u as ee } from "../utils/toast.util.es.js";
|
|
@@ -22,7 +22,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
22
22
|
}, pe = { class: "flex" }, fe = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "flex mr-1"
|
|
25
|
-
},
|
|
25
|
+
}, Ue = /* @__PURE__ */ j({
|
|
26
26
|
__name: "DialogReportDamage",
|
|
27
27
|
props: {
|
|
28
28
|
id: {},
|
|
@@ -48,7 +48,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
48
48
|
var o, d, f, _, C, N;
|
|
49
49
|
const s = (o = p.value) == null ? void 0 : o.qr, e = (d = p.value) == null ? void 0 : d.rfid, t = !!((_ = (f = i.value) == null ? void 0 : f.asset) != null && _.qr), a = !!((N = (C = i.value) == null ? void 0 : C.asset) != null && N.rfid);
|
|
50
50
|
return (!e && !s || !s && t || !e && a) && !n.value;
|
|
51
|
-
}),
|
|
51
|
+
}), U = v(() => {
|
|
52
52
|
const { qr: s, rfid: e } = p.value ?? {};
|
|
53
53
|
return s && e ? "RFID & QR Reported" : e ? "RFID Reported" : s ? "QR Reported" : "";
|
|
54
54
|
}), W = async (s) => {
|
|
@@ -71,7 +71,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
71
71
|
} finally {
|
|
72
72
|
F(!1);
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, A = async (s, e, t) => {
|
|
75
75
|
var a;
|
|
76
76
|
try {
|
|
77
77
|
const { data: o } = await P.matchAssetWithTag(r.id, e);
|
|
@@ -155,7 +155,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
155
155
|
(o = (a = i.value) == null ? void 0 : a.asset) != null && o.rfid ? (u(), R("div", fe, [
|
|
156
156
|
l(E, {
|
|
157
157
|
disabled: p.value.rfid,
|
|
158
|
-
"scan-validation":
|
|
158
|
+
"scan-validation": A,
|
|
159
159
|
onScan: e[0] || (e[0] = (_) => n.value = !0),
|
|
160
160
|
size: "small"
|
|
161
161
|
}, null, 8, ["disabled"]),
|
|
@@ -169,7 +169,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
169
169
|
(f = (d = i.value) == null ? void 0 : d.asset) != null && f.qr ? (u(), k(E, {
|
|
170
170
|
key: 1,
|
|
171
171
|
disabled: p.value.qr,
|
|
172
|
-
"scan-validation":
|
|
172
|
+
"scan-validation": A,
|
|
173
173
|
onScan: e[1] || (e[1] = (_) => n.value = !0),
|
|
174
174
|
size: "small",
|
|
175
175
|
type: "QR"
|
|
@@ -179,9 +179,9 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
179
179
|
label: n.value ? "Verified" : "Unverified",
|
|
180
180
|
severity: n.value ? "success" : "warning"
|
|
181
181
|
}, null, 8, ["label", "severity"]),
|
|
182
|
-
|
|
182
|
+
U.value ? (u(), k(I, {
|
|
183
183
|
key: 0,
|
|
184
|
-
label:
|
|
184
|
+
label: U.value,
|
|
185
185
|
format: "nowrap",
|
|
186
186
|
severity: "danger"
|
|
187
187
|
}, null, 8, ["label"])) : m("", !0),
|
|
@@ -238,5 +238,5 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
export {
|
|
241
|
-
|
|
241
|
+
Ue as _
|
|
242
242
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as x, computed as r, ref as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as x, computed as r, ref as k, createBlock as f, openBlock as b, withCtx as l, createElementVNode as o, createVNode as y, unref as R, createTextVNode as B, toDisplayString as v } from "vue";
|
|
2
|
+
import { TrackingServices as C, MissingServices as $ } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as F, _ as N } from "../assetinfo/index.es.js";
|
|
4
4
|
import { a as A } from "../utils/role.util.es.js";
|
|
5
5
|
import { u as E } from "../utils/toast.util.es.js";
|
|
6
6
|
import { _ as I } from "../dialogconfirm/index.es.js";
|
|
7
7
|
import { _ as U } from "../dialogform/index.es.js";
|
|
8
8
|
import { _ as V } from "../textarea/index.es.js";
|
|
9
|
-
const
|
|
9
|
+
const T = { class: "font-bold" }, W = { class: "flex flex-col gap-3" }, J = /* @__PURE__ */ x({
|
|
10
10
|
__name: "DialogReportMissing",
|
|
11
11
|
props: {
|
|
12
12
|
id: {},
|
|
@@ -19,16 +19,16 @@ const W = { class: "font-bold" }, D = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
19
19
|
submitFunction: { type: Function }
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:visible", "reported"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
22
|
+
setup(_, { emit: M }) {
|
|
23
|
+
const e = _, a = M, { setLoading: m } = F(), n = E(), p = r(() => e.visible), h = r(
|
|
24
24
|
() => e.permanentlyMissing ? "Report Permanently Missing" : "Report Missing"
|
|
25
25
|
), S = r(
|
|
26
26
|
() => e.permanentlyMissing ? "Report as Permanenly Missing" : "Report Missing Asset"
|
|
27
|
-
), d =
|
|
27
|
+
), d = k(), w = async (c) => {
|
|
28
28
|
try {
|
|
29
29
|
m(!0);
|
|
30
30
|
const s = {
|
|
31
|
-
notes:
|
|
31
|
+
notes: c.formValues.notes,
|
|
32
32
|
reportSource: e.reportSource
|
|
33
33
|
}, t = e.permanentlyMissing ? "Success, asset has been reported as permanently missing." : "Success, missing asset has been reported.";
|
|
34
34
|
if (e.submitWithoutApi)
|
|
@@ -36,10 +36,10 @@ const W = { class: "font-bold" }, D = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
36
36
|
else if (e.submitFunction)
|
|
37
37
|
await e.submitFunction(s) && (n.add({ message: e.successMessage ?? t }), a("reported"), a("update:visible", !1));
|
|
38
38
|
else {
|
|
39
|
-
const { data: i } = e.permanentlyMissing ? await
|
|
39
|
+
const { data: i } = e.permanentlyMissing ? await C.putReportPermanentlyMissing(
|
|
40
40
|
e.trackingId ?? "",
|
|
41
41
|
s
|
|
42
|
-
) : await
|
|
42
|
+
) : await $.putReportMissing(e.id, s);
|
|
43
43
|
i && (n.add({ message: e.successMessage ?? t }), a("reported"), a("update:visible", !1));
|
|
44
44
|
}
|
|
45
45
|
} catch (s) {
|
|
@@ -49,7 +49,7 @@ const W = { class: "font-bold" }, D = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
49
49
|
m(!1);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
return (
|
|
52
|
+
return (c, s) => (b(), f(U, {
|
|
53
53
|
visible: p.value,
|
|
54
54
|
"onUpdate:visible": s[0] || (s[0] = (t) => p.value = t),
|
|
55
55
|
"buttons-template": ["cancel", "submit"],
|
|
@@ -74,11 +74,11 @@ const W = { class: "font-bold" }, D = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
74
74
|
severity: "danger"
|
|
75
75
|
}, {
|
|
76
76
|
body: l(() => {
|
|
77
|
-
var i,
|
|
77
|
+
var i, u, g;
|
|
78
78
|
return [
|
|
79
79
|
o("p", null, [
|
|
80
|
-
o("span",
|
|
81
|
-
|
|
80
|
+
o("span", T, v(((g = (u = (i = d.value) == null ? void 0 : i.asset) == null ? void 0 : u.name) == null ? void 0 : g.nameWithSequence) ?? "-"), 1),
|
|
81
|
+
B(" will be reported as " + v(e.permanentlyMissing ? "permanently missing asset" : "missing asset") + ". ", 1)
|
|
82
82
|
]),
|
|
83
83
|
s[2] || (s[2] = o("p", null, "Are you sure you want to report it?", -1))
|
|
84
84
|
];
|
|
@@ -87,13 +87,13 @@ const W = { class: "font-bold" }, D = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
87
87
|
}, 1032, ["header", "visible", "onConfirm", "onUpdate:visible"])
|
|
88
88
|
]),
|
|
89
89
|
fields: l(() => [
|
|
90
|
-
o("div",
|
|
90
|
+
o("div", W, [
|
|
91
91
|
(b(), f(N, {
|
|
92
92
|
id: e.id,
|
|
93
93
|
key: e.id,
|
|
94
94
|
ref_key: "assetInfo",
|
|
95
95
|
ref: d,
|
|
96
|
-
"use-tag-type":
|
|
96
|
+
"use-tag-type": R(A)() !== "Basic"
|
|
97
97
|
}, null, 8, ["id", "use-tag-type"])),
|
|
98
98
|
y(V, {
|
|
99
99
|
"custom-validation": { empty: "Note must not be empty" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as U, computed as c, ref as W, createBlock as k, openBlock as x, withCtx as C, createElementVNode as E, createVNode as V, createCommentVNode as O } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { TAGServices as j } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as z, _ as H } from "../assetinfo/index.es.js";
|
|
4
4
|
import { u as J } from "../utils/toast.util.es.js";
|
|
5
5
|
import { _ as K } from "../dialogconfirm/index.es.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as u, defineComponent as S, computed as U, watch as $, createBlock as C, openBlock as c, withCtx as v, createElementVNode as i, createElementBlock as f, createCommentVNode as y, createVNode as n, Fragment as N, renderList as B, toDisplayString as h, unref as D, renderSlot as P } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { getImageURL as E } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { _ as I } from "../image/index.es.js";
|
|
4
|
-
import { _
|
|
4
|
+
import { _ } from "../button/index.es.js";
|
|
5
5
|
import { _ as L } from "../buttonfilter/index.es.js";
|
|
6
6
|
import { _ as O } from "../buttonsearch/index.es.js";
|
|
7
7
|
import { D as j } from "../datatable/index.es.js";
|
|
@@ -93,8 +93,8 @@ const R = () => u([
|
|
|
93
93
|
fetchOptionFunction: {}
|
|
94
94
|
},
|
|
95
95
|
emits: ["update:visible", "selected"],
|
|
96
|
-
setup(e, { emit:
|
|
97
|
-
const t = e, m =
|
|
96
|
+
setup(e, { emit: g }) {
|
|
97
|
+
const t = e, m = g, p = U(() => t.visible), d = u(!1), b = u(), r = u([]), a = u(), k = R(), x = () => {
|
|
98
98
|
!r.value.length && !a.value ? d.value = !0 : (t.selectionType === "checkbox" ? m("selected", r.value) : m("selected", a.value), m("update:visible", !1));
|
|
99
99
|
}, w = () => {
|
|
100
100
|
r.value = [], a.value = void 0, d.value = !1;
|
|
@@ -126,13 +126,13 @@ const R = () => u([
|
|
|
126
126
|
i("div", H, [
|
|
127
127
|
d.value ? (c(), f("span", J, " You must pick a user ")) : y("", !0),
|
|
128
128
|
i("div", null, [
|
|
129
|
-
n(
|
|
129
|
+
n(_, {
|
|
130
130
|
onClick: l[2] || (l[2] = (s) => o.$emit("update:visible", !1)),
|
|
131
131
|
label: "Cancel",
|
|
132
132
|
severity: "dark",
|
|
133
133
|
text: ""
|
|
134
134
|
}),
|
|
135
|
-
n(
|
|
135
|
+
n(_, {
|
|
136
136
|
label: t.selectButtonLabel,
|
|
137
137
|
onClick: x,
|
|
138
138
|
"data-ts-section": "select-button",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as E, onMounted as I, shallowRef as i, ref as M, createElementBlock as N, openBlock as F, Fragment as L, createElementVNode as d, createVNode as a, mergeProps as P, unref as l, withCtx as U, toDisplayString as _ } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetServices as V, DisposalServices as q } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as z } from "../assetinfo/index.es.js";
|
|
4
4
|
import { u as O } from "../plugins/basei18n.es.js";
|
|
5
5
|
import { u as W } from "../utils/toast.util.es.js";
|
|
@@ -202,7 +202,7 @@ const Y = {
|
|
|
202
202
|
message: s("Success, asset has been removed from the list."),
|
|
203
203
|
severity: "success"
|
|
204
204
|
});
|
|
205
|
-
},
|
|
205
|
+
}, $ = (o, e) => {
|
|
206
206
|
o.forEach((t) => {
|
|
207
207
|
n.value.set(t._id ?? "", {
|
|
208
208
|
notes: e ?? null,
|
|
@@ -212,7 +212,7 @@ const Y = {
|
|
|
212
212
|
}, v = () => {
|
|
213
213
|
const o = window.location.pathname, e = o.slice(0, o.lastIndexOf("/"));
|
|
214
214
|
u.router.replace(e), sessionStorage.removeItem("assetsDisposalReport");
|
|
215
|
-
},
|
|
215
|
+
}, A = async () => {
|
|
216
216
|
const o = [];
|
|
217
217
|
n.value.forEach((e, t) => {
|
|
218
218
|
const k = {
|
|
@@ -243,7 +243,7 @@ const Y = {
|
|
|
243
243
|
"onUpdate:assetsToReport": e[0] || (e[0] = (t) => r.value = t),
|
|
244
244
|
"selected-data": y.value,
|
|
245
245
|
"onUpdate:selectedData": e[1] || (e[1] = (t) => y.value = t),
|
|
246
|
-
onNoted:
|
|
246
|
+
onNoted: $,
|
|
247
247
|
onRemoved: e[2] || (e[2] = (t) => h(t)),
|
|
248
248
|
"table-name": "disposal-report-page-table"
|
|
249
249
|
}, null, 8, ["assets-to-report", "selected-data"]),
|
|
@@ -306,7 +306,7 @@ const Y = {
|
|
|
306
306
|
}, null, 8, ["label"]),
|
|
307
307
|
a(w, {
|
|
308
308
|
label: l(s)("Submit"),
|
|
309
|
-
onClick:
|
|
309
|
+
onClick: A,
|
|
310
310
|
severity: "success"
|
|
311
311
|
}, null, 8, ["label"])
|
|
312
312
|
])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, shallowRef as r, ref as g, createBlock as b, openBlock as h } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetServices as _ } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as O } from "../plugins/basei18n.es.js";
|
|
4
4
|
import { u as k } from "../utils/toast.util.es.js";
|
|
5
5
|
import { _ as v } from "../filtercontainer/index.es.js";
|
|
@@ -218,7 +218,7 @@ const He = /* @__PURE__ */ Ae(Ke), We = {
|
|
|
218
218
|
d.value = e, a != null && a.includes("blob") ? (d.value = e, g.value = !0) : (Y(e), U());
|
|
219
219
|
}, Ie = () => {
|
|
220
220
|
U();
|
|
221
|
-
}, le = oe(() => navigator.userAgent.includes("
|
|
221
|
+
}, le = oe(() => navigator.userAgent.includes("Chrome"));
|
|
222
222
|
return N(
|
|
223
223
|
() => i.value,
|
|
224
224
|
(e) => {
|
|
@@ -408,8 +408,8 @@ const He = /* @__PURE__ */ Ae(Ke), We = {
|
|
|
408
408
|
"ring-inset",
|
|
409
409
|
"cursor-pointer",
|
|
410
410
|
{
|
|
411
|
-
"ring-1": le.value,
|
|
412
|
-
"ring-[0.5px]":
|
|
411
|
+
"ring-1": !le.value,
|
|
412
|
+
"ring-[0.5px]": le.value
|
|
413
413
|
},
|
|
414
414
|
{ "rounded-full": e.rounded, "rounded-lg": !e.rounded },
|
|
415
415
|
{
|