tsv2-library 0.3.6 → 0.3.8
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.
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
type ReportSourceType = 'Available Asset' | 'Audit Asset' | 'Borrowed Asset' | 'Assigned Asset' | 'Tracking Asset' | 'Maintenance Asset';
|
|
2
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
4
|
id: {
|
|
4
5
|
type: __PropType<string>;
|
|
5
6
|
required: true;
|
|
6
7
|
};
|
|
8
|
+
reportSource: {
|
|
9
|
+
type: __PropType<ReportSourceType>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
7
12
|
visible: {
|
|
8
13
|
type: __PropType<boolean | undefined>;
|
|
9
14
|
required: false;
|
|
@@ -31,6 +36,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
31
36
|
type: __PropType<string>;
|
|
32
37
|
required: true;
|
|
33
38
|
};
|
|
39
|
+
reportSource: {
|
|
40
|
+
type: __PropType<ReportSourceType>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
34
43
|
visible: {
|
|
35
44
|
type: __PropType<boolean | undefined>;
|
|
36
45
|
required: false;
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -59982,7 +59982,7 @@ const cme = () => JSON.parse(localStorage.getItem("tableConfig") ?? "{}"), Cd =
|
|
|
59982
59982
|
}
|
|
59983
59983
|
}), u = he(() => {
|
|
59984
59984
|
var yt, Bt, un, Pn;
|
|
59985
|
-
if (n.disableAllRows || !((yt = p.value) != null && yt.length))
|
|
59985
|
+
if (n.disableAllRows || !((yt = p.value) != null && yt.length) || n.selectionType !== "checkbox")
|
|
59986
59986
|
return !1;
|
|
59987
59987
|
const Se = (Bt = n.selectedData) == null ? void 0 : Bt.length, Ee = ((un = re(p.value)) == null ? void 0 : un.map(
|
|
59988
59988
|
(Xn) => Xn[n.dataKey]
|
|
@@ -68620,7 +68620,7 @@ const Uve = {
|
|
|
68620
68620
|
_: 3
|
|
68621
68621
|
}, 8, ["class", "closable", "header", "pt", "visible"]));
|
|
68622
68622
|
}
|
|
68623
|
-
}), Ave = { class: "flex flex-col gap-3 justify-between" }, Mve = { class: "flex flex-col max-h-20 list-inside list-disc" }, Dve = /* @__PURE__ */ x("p", { class: "text-general-800 font-medium" }, " The following assets have other assets linked to them: ", -1), Ive = {
|
|
68623
|
+
}), Ave = { class: "flex flex-col gap-3 justify-between" }, Mve = { class: "flex flex-col max-h-20 overflow-y-auto list-inside list-disc" }, Dve = /* @__PURE__ */ x("p", { class: "text-general-800 font-medium" }, " The following assets have other assets linked to them: ", -1), Ive = {
|
|
68624
68624
|
class: "text-general-800 font-medium",
|
|
68625
68625
|
"data-ts-section": "assetparent"
|
|
68626
68626
|
}, Ove = {
|
|
@@ -70711,6 +70711,7 @@ const lye = /* @__PURE__ */ jl(sye, [["__scopeId", "data-v-349deb23"]]), cye = (
|
|
|
70711
70711
|
__name: "DialogReportDamage",
|
|
70712
70712
|
props: {
|
|
70713
70713
|
id: {},
|
|
70714
|
+
reportSource: {},
|
|
70714
70715
|
visible: { type: Boolean },
|
|
70715
70716
|
byUser: { type: Boolean },
|
|
70716
70717
|
successMessage: {},
|
|
@@ -70728,7 +70729,8 @@ const lye = /* @__PURE__ */ jl(sye, [["__scopeId", "data-v-349deb23"]]), cye = (
|
|
|
70728
70729
|
n(!0);
|
|
70729
70730
|
const _ = {
|
|
70730
70731
|
notes: v.formValues.notes,
|
|
70731
|
-
image: v.formValues.image
|
|
70732
|
+
image: v.formValues.image,
|
|
70733
|
+
reportSource: i.reportSource
|
|
70732
70734
|
}, b = "Success, damaged asset report has been submitted.";
|
|
70733
70735
|
if (i.submitFunction)
|
|
70734
70736
|
await i.submitFunction(_) && (r.add({ message: i.successMessage ?? b }), a("reported"), p());
|
|
@@ -71555,6 +71557,7 @@ const lye = /* @__PURE__ */ jl(sye, [["__scopeId", "data-v-349deb23"]]), cye = (
|
|
|
71555
71557
|
data: u.value,
|
|
71556
71558
|
filters: s.value,
|
|
71557
71559
|
options: _,
|
|
71560
|
+
rows: 10,
|
|
71558
71561
|
search: a.value,
|
|
71559
71562
|
"total-records": d.value,
|
|
71560
71563
|
onToggleOption: R[6] || (R[6] = (k) => h.value = k),
|
|
@@ -74895,8 +74898,8 @@ const s2e = du, l2e = {
|
|
|
74895
74898
|
return qe(
|
|
74896
74899
|
() => n.modelValue,
|
|
74897
74900
|
() => {
|
|
74898
|
-
var _, b;
|
|
74899
|
-
s.value = Tf((
|
|
74901
|
+
var _, b, y;
|
|
74902
|
+
s.value = (_ = n.modelValue) != null && _.currency ? Tf((b = n.modelValue) == null ? void 0 : b.currency) : s.value, l.value = n.modelValue, a.value = (y = n.modelValue) == null ? void 0 : y.value;
|
|
74900
74903
|
}
|
|
74901
74904
|
), (_, b) => (g(), C(yp, S(n, {
|
|
74902
74905
|
modelValue: a.value,
|
|
@@ -74907,7 +74910,7 @@ const s2e = du, l2e = {
|
|
|
74907
74910
|
"input-id": d.value,
|
|
74908
74911
|
"input-number-class": M(h1).value({ isFirefoxBased: M(o), invalidInput: f.value }).class,
|
|
74909
74912
|
locale: u.value,
|
|
74910
|
-
"min-fraction-digits":
|
|
74913
|
+
"min-fraction-digits": 0,
|
|
74911
74914
|
"use-validator": !1,
|
|
74912
74915
|
"addon-left-class": "!p-0 !bg-transparent",
|
|
74913
74916
|
"input-group-class": "!ring-0",
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
3
|
+
import axios, { AxiosInstance, AxiosResponse } from 'axios';
|
|
4
|
+
|
|
5
|
+
const getBaseURL = (env: string): string | undefined => {
|
|
6
|
+
if (window.Cypress) {
|
|
7
|
+
return Cypress.env('CY_' + env); // When running Cypress Intercept
|
|
8
|
+
} else if (import.meta.env) {
|
|
9
|
+
return import.meta.env['VITE_' + env]; // When running in development mode with Vite
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return process.env['VUE_' + env]; // When building for production with Vue CLI
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const API = ({ headers = {}, params = {} } = {}): AxiosInstance => {
|
|
16
|
+
const user = JSON.parse(localStorage.getItem('user') as string) ?? {};
|
|
17
|
+
const BASE_URL = getBaseURL('APP_USERS_V2_API');
|
|
18
|
+
|
|
19
|
+
const instance = axios.create({
|
|
20
|
+
baseURL: `${BASE_URL}/v2`,
|
|
21
|
+
headers: {
|
|
22
|
+
'Content-type': 'application/json',
|
|
23
|
+
'Authorization': `Bearer ${user.token}`,
|
|
24
|
+
...headers,
|
|
25
|
+
},
|
|
26
|
+
params,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return instance;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const UserServices = {
|
|
33
|
+
getUsersSubUsers: (params: any): Promise<AxiosResponse> => {
|
|
34
|
+
return API({ params }).get('/users/user-and-sub-user');
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default UserServices;
|