@tagsamurai/gsts-api-services 1.0.1-beta.0 → 1.0.2-alpha.1
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/api-services.es.js +138 -73
- package/index.html +172 -0
- package/main.d.ts +4 -0
- package/manifest.json +8 -0
- package/microtsm.config.d.ts +2 -0
- package/package.json +1 -1
- package/src/dto/changelog.dto.d.ts +3 -2
- package/src/dto/dataTable.dto.d.ts +42 -0
- package/src/dto/hardware.dto.d.ts +99 -0
- package/src/dto/tag.dto.d.ts +52 -0
- package/src/dto/tagEventlog.dto.d.ts +22 -0
- package/src/dto/user.dto.d.ts +2 -1
- package/src/services/auth.service.d.ts +5 -0
- package/src/services/globalTag.service.d.ts +26 -0
- package/src/services/hardware.service.d.ts +35 -0
- package/src/services/tagEventlog.service.d.ts +9 -0
- package/src/types/changelog.type.d.ts +5 -5
- package/src/types/fetchResponse.type.d.ts +2 -2
- package/src/types/hardware.type.d.ts +88 -0
- package/src/types/tag.type.d.ts +28 -0
- package/src/types/tagEventlog.type.d.ts +19 -0
- package/src/utils/getImageURL.util.d.ts +1 -1
- package/api-services.system.js +0 -1
package/api-services.es.js
CHANGED
|
@@ -1,113 +1,178 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import m from "axios";
|
|
2
|
+
const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_IMAGE_BASE_URL: "https://dev-api.tagsamurai.com/fam/utility/v2/files", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, _ = (t = "APP_TAGSAMURAI_API") => E["VITE_" + t], o = (t = {}, e = !1) => {
|
|
3
3
|
const {
|
|
4
|
-
env:
|
|
5
|
-
prefix:
|
|
6
|
-
headers:
|
|
7
|
-
...
|
|
8
|
-
} = t,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
headers: e ? g : {
|
|
4
|
+
env: r = "APP_GLOBAL_SETTINGS_API",
|
|
5
|
+
prefix: c = "",
|
|
6
|
+
headers: a = {},
|
|
7
|
+
...l
|
|
8
|
+
} = t, g = "".concat(_(r)).concat(c), d = m.create({
|
|
9
|
+
...l,
|
|
10
|
+
baseURL: g,
|
|
11
|
+
headers: e ? a : {
|
|
13
12
|
"Content-Type": "application/json",
|
|
14
|
-
|
|
15
|
-
...g
|
|
13
|
+
...a
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
|
-
|
|
16
|
+
return d.interceptors.request.use((v) => {
|
|
17
|
+
var $, S, I;
|
|
18
|
+
const P = JSON.parse(($ = localStorage.getItem("user")) != null ? $ : "{}"), O = (I = (S = P.jwt) != null ? S : P.token) != null ? I : "";
|
|
19
|
+
return v.headers.Authorization = "Bearer ".concat(O), v;
|
|
20
|
+
}), d;
|
|
21
|
+
}, D = (t, e, r) => {
|
|
22
|
+
var l;
|
|
23
|
+
if (!t) return;
|
|
24
|
+
const c = _("APP_IMAGE_BASE_URL"), a = t.startsWith("http") ? t : "".concat(c, "/").concat(t.replace(/^\/+/, ""));
|
|
25
|
+
if (e || r) {
|
|
26
|
+
const g = new URLSearchParams();
|
|
27
|
+
return e && g.set("width", e.toString()), r && g.set("height", (l = r == null ? void 0 : r.toString()) != null ? l : e == null ? void 0 : e.toString()), "".concat(a, "?").concat(g.toString());
|
|
28
|
+
}
|
|
29
|
+
return a;
|
|
30
|
+
}, b = (t) => {
|
|
19
31
|
if (!t || typeof t == "string")
|
|
20
32
|
return;
|
|
21
33
|
const e = {};
|
|
22
|
-
return Object.keys(t).forEach((
|
|
23
|
-
Array.isArray(t[
|
|
24
|
-
[
|
|
25
|
-
}) : t[
|
|
26
|
-
[
|
|
34
|
+
return Object.keys(t).forEach((r) => {
|
|
35
|
+
Array.isArray(t[r]) ? t[r].length > 0 && Object.assign(e, {
|
|
36
|
+
[r]: JSON.stringify(t[r])
|
|
37
|
+
}) : t[r] !== void 0 && Object.assign(e, {
|
|
38
|
+
[r]: t[r]
|
|
27
39
|
});
|
|
28
40
|
}), e;
|
|
29
|
-
},
|
|
41
|
+
}, G = o({
|
|
42
|
+
prefix: "/v1/global-settings/auth"
|
|
43
|
+
}), y = () => G.post("/logout"), h = { logout: y }, f = o({
|
|
30
44
|
prefix: "/v1/global-settings/change-log"
|
|
31
|
-
}),
|
|
32
|
-
getChangelogs: (t) =>
|
|
33
|
-
getChangelogOptions: (t) =>
|
|
34
|
-
},
|
|
45
|
+
}), x = {
|
|
46
|
+
getChangelogs: (t) => f.get("", { params: t }),
|
|
47
|
+
getChangelogOptions: (t) => f.get("/options", { params: t })
|
|
48
|
+
}, u = o({
|
|
35
49
|
prefix: "/v1/global-settings/division"
|
|
36
|
-
}),
|
|
37
|
-
getDivisions: (t) =>
|
|
38
|
-
getDivisionDetail: (t) =>
|
|
39
|
-
postCreateDivision: (t) =>
|
|
40
|
-
putEditDivision: (t, e) =>
|
|
50
|
+
}), C = {
|
|
51
|
+
getDivisions: (t) => u.get("", { params: t }),
|
|
52
|
+
getDivisionDetail: (t) => u.get("/".concat(t)),
|
|
53
|
+
postCreateDivision: (t) => u.post("/", t),
|
|
54
|
+
putEditDivision: (t, e) => u.put("/".concat(t), e),
|
|
41
55
|
deleteDivisions: (t) => {
|
|
42
56
|
const e = { id: JSON.stringify(t) };
|
|
43
|
-
return
|
|
57
|
+
return u.delete("", { params: e });
|
|
44
58
|
}
|
|
45
|
-
},
|
|
59
|
+
}, i = o({
|
|
60
|
+
prefix: "/v1/global-settings"
|
|
61
|
+
}), N = {
|
|
62
|
+
getTAGAllPaired: (t, e) => i.get("/".concat(t), { params: e }),
|
|
63
|
+
getTAGAllPairedOptions: (t, e) => i.get("/".concat(t, "/options"), { params: e }),
|
|
64
|
+
getTAGNotPaired: (t, e) => i.get("/".concat(t, "/not-paired"), { params: e }),
|
|
65
|
+
getTAGNotPairedOptions: (t, e) => i.get("/".concat(t, "/not-paired/options"), { params: e }),
|
|
66
|
+
getScanTAG: (t, e) => i.get("/".concat(t, "/scan"), { params: e }),
|
|
67
|
+
putDetailAuditTAG: (t, e) => i.put("/".concat(t, "/audit-detail"), e),
|
|
68
|
+
putAuditTAG: (t, e) => i.put("/".concat(t, "/audit"), e),
|
|
69
|
+
putAllocateTAG: (t, e) => i.put("/".concat(t, "/allocate"), e),
|
|
70
|
+
putCombineTAG: (t) => i.put("/combine", t)
|
|
71
|
+
}, s = o({
|
|
72
|
+
prefix: "/v1/global-settings"
|
|
73
|
+
}), B = {
|
|
74
|
+
getHandheldReader: (t) => s.get("/reader", { params: t }),
|
|
75
|
+
getHandheldReaderDetail: (t) => s.get("/reader/".concat(t)),
|
|
76
|
+
getHandheldReaderOptions: (t) => s.get("/reader/options", { params: t }),
|
|
77
|
+
putMarkHandheldStatus: (t) => s.put("/reader/mark-status", t),
|
|
78
|
+
putPingReaders: (t) => s.put("/iot-reader/ping", t),
|
|
79
|
+
putMarkIOTStatus: (t, e) => s.put("/".concat(e, "/mark-status"), t),
|
|
80
|
+
putEditReaderGroup: (t, e, r) => s.put(
|
|
81
|
+
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-group"),
|
|
82
|
+
e
|
|
83
|
+
),
|
|
84
|
+
putEditAntennaGroup: (t, e) => s.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
85
|
+
putEditPortStatus: (t, e) => s.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
86
|
+
putEditAliasName: (t, e, r) => s.put(
|
|
87
|
+
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-alias-name"),
|
|
88
|
+
e
|
|
89
|
+
),
|
|
90
|
+
putAntennaPower: (t, e) => s.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
91
|
+
getIOTReaderOrAntenna: (t, e) => s.get("/".concat(t), { params: e }),
|
|
92
|
+
getIOTReaderDetail: (t) => s.get("/iot-reader/".concat(t)),
|
|
93
|
+
getIOTReaderOrAntennaOptions: (t, e) => s.get("/".concat(t, "/options"), { params: e }),
|
|
94
|
+
getActivityLog: (t) => s.get("/activity-log", { params: t }),
|
|
95
|
+
getActivityLogOptions: (t) => s.get("/activity-log/options", { params: t }),
|
|
96
|
+
getDetailActivityLog: (t) => s.get("/activity-log", { params: t }),
|
|
97
|
+
getDetailActivityLogOptions: (t) => s.get("/activity-log/options", { params: t }),
|
|
98
|
+
getExistingAliasNames: () => s.get("/reader/alias-names"),
|
|
99
|
+
getIotReaderPort: (t, e) => s.get("/iot-reader/".concat(t, "/ports"), { params: e })
|
|
100
|
+
}, L = o({
|
|
46
101
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
47
102
|
prefix: "/v2"
|
|
48
|
-
}),
|
|
49
|
-
getSessionLogList: (t) =>
|
|
50
|
-
},
|
|
103
|
+
}), M = {
|
|
104
|
+
getSessionLogList: (t) => L.get("/session-log", { params: t })
|
|
105
|
+
}, T = o({
|
|
51
106
|
prefix: "/v1/global-settings/option"
|
|
52
|
-
}),
|
|
53
|
-
getPositions: () =>
|
|
54
|
-
getDivisions: () =>
|
|
55
|
-
},
|
|
107
|
+
}), j = {
|
|
108
|
+
getPositions: () => T.get("/position"),
|
|
109
|
+
getDivisions: () => T.get("/division")
|
|
110
|
+
}, p = o({
|
|
56
111
|
prefix: "/v1/global-settings/position"
|
|
57
|
-
}),
|
|
58
|
-
getPositions: (t) =>
|
|
59
|
-
getPositionDetail: (t) =>
|
|
60
|
-
postCreatePosition: (t) =>
|
|
61
|
-
putEditPosition: (t, e) =>
|
|
112
|
+
}), k = {
|
|
113
|
+
getPositions: (t) => p.get("", { params: t }),
|
|
114
|
+
getPositionDetail: (t) => p.get("/".concat(t)),
|
|
115
|
+
postCreatePosition: (t) => p.post("/", t),
|
|
116
|
+
putEditPosition: (t, e) => p.put("/".concat(t), e),
|
|
62
117
|
deletePositions: (t) => {
|
|
63
118
|
const e = { id: JSON.stringify(t) };
|
|
64
|
-
return
|
|
119
|
+
return p.delete("", { params: e });
|
|
65
120
|
}
|
|
66
|
-
},
|
|
121
|
+
}, R = o({
|
|
67
122
|
env: "APP_TAGSAMURAI_API",
|
|
68
123
|
prefix: "/tag/v2"
|
|
69
|
-
}),
|
|
70
|
-
getTagInfo: (t) =>
|
|
71
|
-
},
|
|
124
|
+
}), V = {
|
|
125
|
+
getTagInfo: (t) => R.get("/rfid-qr/scan", { params: t })
|
|
126
|
+
}, A = o({
|
|
127
|
+
prefix: "/v1/global-settings/change-log"
|
|
128
|
+
}), H = {
|
|
129
|
+
getTAGEventlog: (t) => A.get("/tag-event-log", { params: t }),
|
|
130
|
+
getTAGEventlogOptions: (t) => A.get("/tag-event-log/options", { params: t }),
|
|
131
|
+
getDetailTAGEventlog: (t) => A.get("/tag-event-log/".concat(t))
|
|
132
|
+
}, n = o({
|
|
72
133
|
prefix: "/v1/global-settings/user"
|
|
73
|
-
}),
|
|
74
|
-
getUsers: (t) =>
|
|
75
|
-
getUserDetail: (t) =>
|
|
76
|
-
getUserSystemLogs: (t, e) =>
|
|
134
|
+
}), J = {
|
|
135
|
+
getUsers: (t) => n.get("", { params: t }),
|
|
136
|
+
getUserDetail: (t) => n.get("/".concat(t)),
|
|
137
|
+
getUserSystemLogs: (t, e) => n.get("/".concat(t, "/system-logs"), { params: e }),
|
|
77
138
|
getUserSystemLogOptions: (t, e) => {
|
|
78
|
-
const
|
|
79
|
-
return
|
|
139
|
+
const r = {};
|
|
140
|
+
return r[e] = !0, n.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
80
141
|
},
|
|
81
142
|
postCreateUser: (t) => {
|
|
82
143
|
const e = { "Content-Type": "multipart/form-data" };
|
|
83
|
-
return
|
|
144
|
+
return n.post("", t, { headers: e });
|
|
84
145
|
},
|
|
85
146
|
putEditUser: (t, e) => {
|
|
86
|
-
const
|
|
87
|
-
return
|
|
147
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
148
|
+
return n.put("/".concat(t), e, { headers: r });
|
|
88
149
|
},
|
|
89
150
|
deleteUsers: (t) => {
|
|
90
151
|
const e = { id: JSON.stringify(t) };
|
|
91
|
-
return
|
|
152
|
+
return n.delete("", { params: e });
|
|
92
153
|
},
|
|
93
|
-
putToggleStatusUsers: (t) =>
|
|
154
|
+
putToggleStatusUsers: (t) => n.put("/active-status", t),
|
|
94
155
|
getUserOptions: (t) => {
|
|
95
156
|
const e = {};
|
|
96
|
-
return e[t] = !0,
|
|
157
|
+
return e[t] = !0, n.get("/options", { params: e });
|
|
97
158
|
},
|
|
98
|
-
deleteCancelEmailChange: (t) =>
|
|
99
|
-
postResendEmail: (t) =>
|
|
100
|
-
putChangePassword: (t, e) =>
|
|
159
|
+
deleteCancelEmailChange: (t) => n.delete("/cancel-email-change/".concat(t)),
|
|
160
|
+
postResendEmail: (t) => n.post("/resend-email", t),
|
|
161
|
+
putChangePassword: (t, e) => n.put("/change-password/".concat(t), e)
|
|
101
162
|
};
|
|
102
163
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
164
|
+
h as AuthServices,
|
|
165
|
+
x as ChangelogServices,
|
|
166
|
+
C as DivisionServices,
|
|
167
|
+
N as GlobalTagServices,
|
|
168
|
+
B as HardwareServices,
|
|
169
|
+
M as LogServices,
|
|
170
|
+
j as OptionServices,
|
|
171
|
+
k as PositionServices,
|
|
172
|
+
H as TagEventlogServices,
|
|
173
|
+
V as TagServices,
|
|
174
|
+
J as UserServices,
|
|
175
|
+
_ as getBaseURL,
|
|
176
|
+
D as getImageURL,
|
|
177
|
+
b as queryParamsStringfy
|
|
113
178
|
};
|
package/index.html
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8"/>
|
|
6
|
+
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
7
|
+
<title>MicroApp Integration Guide</title>
|
|
8
|
+
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet"/>
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet"/>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
|
11
|
+
rel="stylesheet"/>
|
|
12
|
+
<style>
|
|
13
|
+
body {
|
|
14
|
+
font-family: 'Inter', sans-serif;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body class="bg-gray-100">
|
|
20
|
+
<header class="bg-white shadow-sm">
|
|
21
|
+
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
|
|
22
|
+
<div class="flex items-center">
|
|
23
|
+
<span class="material-icons text-purple-600 text-3xl mr-2">widgets</span>
|
|
24
|
+
<h1 class="text-xl font-semibold text-gray-800">MicroApp Guide</h1>
|
|
25
|
+
</div>
|
|
26
|
+
<nav class="flex items-center space-x-6">
|
|
27
|
+
<a class="text-gray-600 hover:text-purple-600" href="#">Overview</a>
|
|
28
|
+
<a class="text-purple-600 font-medium border-b-2 border-purple-600 pb-1" href="#">Development</a>
|
|
29
|
+
<a class="text-gray-600 hover:text-purple-600" href="#">Deployment</a>
|
|
30
|
+
<a class="text-gray-600 hover:text-purple-600" href="#">Troubleshooting</a>
|
|
31
|
+
<a class="text-gray-600 hover:text-purple-600" href="#">
|
|
32
|
+
<span class="material-icons">help_outline</span>
|
|
33
|
+
</a>
|
|
34
|
+
<img alt="User avatar" class="rounded-full w-8 h-8"
|
|
35
|
+
src="https://lh3.googleusercontent.com/aida-public/AB6AXuBYomsI9qOSrR7mdND8D_9i1n-qfVQ929APFVQrN1jJ7nv9Pg2sh20GXu9OrHOXWKm2TGiBp24isi352RxMi-e4cf_8Ju180_J1C1B4uX6PjQKaglT2dh6xrx5CsdW1ByZtZGrj9qPVdGBMxU7_r8cqlAKacqx9XUmOvluxOQxfOwOXmqNdV0xtrtyYa1z9v6ITJLWUF4rnXCbLRIZ77KhDGUL6d9U-HCKFWZzl-4gY7Y7GiYPC7tNfPxjAbqvgcxbH7_NLhmpCdPg"/>
|
|
36
|
+
</nav>
|
|
37
|
+
</div>
|
|
38
|
+
</header>
|
|
39
|
+
<main class="container mx-auto px-6 py-12">
|
|
40
|
+
<div class="bg-white p-8 md:p-12 rounded-xl shadow-xl max-w-4xl mx-auto">
|
|
41
|
+
<section class="text-center mb-12">
|
|
42
|
+
<h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">MicroApp Integration Guide</h2>
|
|
43
|
+
<p class="text-gray-600 text-lg mb-8">
|
|
44
|
+
Welcome! This guide provides step-by-step instructions for integrating and developing
|
|
45
|
+
your @tagsamurai/gsts-api-services MicroApp within a single-spa application.
|
|
46
|
+
</p>
|
|
47
|
+
<button
|
|
48
|
+
class="bg-purple-600 hover:bg-purple-700 text-white font-medium py-3 px-6 rounded-lg inline-flex items-center text-lg transition duration-150 ease-in-out">
|
|
49
|
+
<span class="material-icons mr-2">play_arrow</span>
|
|
50
|
+
Start Here
|
|
51
|
+
</button>
|
|
52
|
+
</section>
|
|
53
|
+
<section class="mb-12">
|
|
54
|
+
<div class="flex items-center mb-6">
|
|
55
|
+
<span class="material-icons text-purple-600 text-3xl mr-3">settings_ethernet</span>
|
|
56
|
+
<h3 class="text-2xl font-semibold text-gray-800">Local Development</h3>
|
|
57
|
+
</div>
|
|
58
|
+
<p class="text-gray-600 mb-8">To develop your MicroApp locally, follow these steps:</p>
|
|
59
|
+
<div class="space-y-8">
|
|
60
|
+
<div class="bg-gray-50 p-6 rounded-lg">
|
|
61
|
+
<div class="flex items-start">
|
|
62
|
+
<div class="flex shrink-0 bg-purple-100 p-3 rounded-full mr-4">
|
|
63
|
+
<span class="material-icons text-purple-600">link</span>
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<h4 class="font-semibold text-gray-700 text-lg mb-1">1. Copy MicroApp URL</h4>
|
|
67
|
+
<p class="text-gray-600 mb-2">
|
|
68
|
+
Copy the URL of your MicroApp's development server. This URL is crucial for
|
|
69
|
+
registering your MicroApp
|
|
70
|
+
with the main single-spa application.
|
|
71
|
+
</p>
|
|
72
|
+
<p class="text-gray-500 text-sm">Your local URL:
|
|
73
|
+
<code class="bg-gray-200 text-purple-700 px-2 py-1 rounded-md text-xs">
|
|
74
|
+
<a id="mfe-url" target="_blank"></a>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
const mfeUrl = document.getElementById('mfe-url');
|
|
78
|
+
const entryUrl = window.location.origin + ('/' + 'api-services.es.js').replace(/\/+/g, '/');
|
|
79
|
+
mfeUrl.href = entryUrl;
|
|
80
|
+
mfeUrl.innerText = entryUrl;
|
|
81
|
+
</script>
|
|
82
|
+
</code>
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="bg-gray-50 p-6 rounded-lg">
|
|
88
|
+
<div class="flex items-start">
|
|
89
|
+
<div class="flex shrink-0 bg-purple-100 p-3 rounded-full mr-4">
|
|
90
|
+
<span class="material-icons text-purple-600">open_in_browser</span>
|
|
91
|
+
</div>
|
|
92
|
+
<div>
|
|
93
|
+
<h4 class="font-semibold text-gray-700 text-lg mb-1">2. Open Single-Spa App</h4>
|
|
94
|
+
<p class="text-gray-600">
|
|
95
|
+
Open your single-spa application in a web browser. This is the primary application
|
|
96
|
+
that will host and
|
|
97
|
+
manage your MicroApp.
|
|
98
|
+
</p>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="bg-gray-50 p-6 rounded-lg">
|
|
103
|
+
<div class="flex items-start">
|
|
104
|
+
<div class="flex shrink-0 bg-purple-100 p-3 rounded-full mr-4">
|
|
105
|
+
<span class="material-icons text-purple-600">build</span>
|
|
106
|
+
</div>
|
|
107
|
+
<div>
|
|
108
|
+
<h4 class="font-semibold text-gray-700 text-lg mb-1">3. Enable Dev Tools</h4>
|
|
109
|
+
<p class="text-gray-600 mb-2">
|
|
110
|
+
Enable your browser's development tools. This will allow you to inspect elements,
|
|
111
|
+
debug JavaScript,
|
|
112
|
+
and monitor network requests for your MicroApp.
|
|
113
|
+
</p>
|
|
114
|
+
<code
|
|
115
|
+
class="bg-gray-200 text-gray-700 px-3 py-2 rounded-md text-sm block w-full overflow-x-auto">localStorage.setItem('devtools',
|
|
116
|
+
true);</code>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="bg-gray-50 p-6 rounded-lg">
|
|
121
|
+
<div class="flex items-start">
|
|
122
|
+
<div class="flex shrink-0 bg-purple-100 p-3 rounded-full mr-4">
|
|
123
|
+
<span class="material-icons text-purple-600">input</span>
|
|
124
|
+
</div>
|
|
125
|
+
<div>
|
|
126
|
+
<h4 class="font-semibold text-gray-700 text-lg mb-1">4. Activate Local Instance</h4>
|
|
127
|
+
<p class="text-gray-600">
|
|
128
|
+
Activate your local MicroApp instance by pasting the copied URL into the single-spa
|
|
129
|
+
application's
|
|
130
|
+
import map or configuration.
|
|
131
|
+
</p>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
<section>
|
|
138
|
+
<div class="flex items-center mb-6">
|
|
139
|
+
<span class="material-icons text-purple-600 text-3xl mr-3">bolt</span>
|
|
140
|
+
<h3 class="text-2xl font-semibold text-gray-800">Standalone Mode with MicroTSM CLI</h3>
|
|
141
|
+
</div>
|
|
142
|
+
<p class="text-gray-600 mb-6">
|
|
143
|
+
To start developing your MicroApp locally, use the MicroTSM CLI which provides a streamlined development
|
|
144
|
+
experience powered by Vite. Run:
|
|
145
|
+
</p>
|
|
146
|
+
<div class="bg-gray-800 text-white rounded-lg p-4 mb-8 font-mono">
|
|
147
|
+
<span class="text-green-500">$</span><span class="text-green-300"> microtsm dev</span>
|
|
148
|
+
</div>
|
|
149
|
+
<p class="text-gray-600 mb-8">
|
|
150
|
+
This command will start the development server with hot module replacement (HMR) enabled, allowing you
|
|
151
|
+
to see your changes instantly.
|
|
152
|
+
</p>
|
|
153
|
+
<div class="flex space-x-4">
|
|
154
|
+
<button class="border border-purple-600 text-purple-600 hover:bg-purple-50 font-medium py-3 px-6 rounded-lg inline-flex items-center transition duration-150 ease-in-out">
|
|
155
|
+
<span class="material-icons mr-2">terminal</span>
|
|
156
|
+
View CLI Commands
|
|
157
|
+
</button>
|
|
158
|
+
<button class="border border-purple-600 text-purple-600 hover:bg-purple-50 font-medium py-3 px-6 rounded-lg inline-flex items-center transition duration-150 ease-in-out">
|
|
159
|
+
<span class="material-icons mr-2">description</span>
|
|
160
|
+
CLI Documentation
|
|
161
|
+
</button>
|
|
162
|
+
</div>
|
|
163
|
+
</section>
|
|
164
|
+
</div>
|
|
165
|
+
</main>
|
|
166
|
+
<footer class="text-center py-8 text-gray-500 text-sm">
|
|
167
|
+
© 2025 MicroTSM CLI. All rights reserved.
|
|
168
|
+
</footer>
|
|
169
|
+
|
|
170
|
+
</body>
|
|
171
|
+
|
|
172
|
+
</html>
|
package/main.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
export { default as AuthServices } from './src/services/auth.service';
|
|
1
2
|
export { default as ChangelogServices } from './src/services/changelog.service';
|
|
2
3
|
export { default as DivisionServices } from './src/services/division.service';
|
|
4
|
+
export { default as GlobalTagServices } from './src/services/globalTag.service';
|
|
5
|
+
export { default as HardwareServices } from './src/services/hardware.service';
|
|
3
6
|
export { default as LogServices } from './src/services/logNotification.service';
|
|
4
7
|
export { default as OptionServices } from './src/services/option.service';
|
|
5
8
|
export { default as PositionServices } from './src/services/position.service';
|
|
6
9
|
export { default as TagServices } from './src/services/tag.service';
|
|
10
|
+
export { default as TagEventlogServices } from './src/services/tagEventlog.service';
|
|
7
11
|
export { default as UserServices } from './src/services/user.service';
|
|
8
12
|
export { getBaseURL, getImageURL, queryParamsStringfy } from './src/utils';
|
package/manifest.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangelogType } from '../types/changelog.type';
|
|
2
2
|
import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
|
|
3
|
+
import { FilterOptions } from './dataTable.dto';
|
|
3
4
|
export type ChangelogResponse = FetchListResponse<ChangelogType>;
|
|
4
|
-
export type ChangelogOptionResponse = FetchOptionResponse<
|
|
5
|
+
export type ChangelogOptionResponse = FetchOptionResponse<FilterOptions>;
|
|
5
6
|
export type ChangelogFilterQuery = {
|
|
6
7
|
object?: string;
|
|
7
8
|
objectName?: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { MultiSelectOption } from '../types/options.type';
|
|
2
|
+
import { ApplicationModule } from '../types/tag.type';
|
|
3
|
+
export type FilterOptions = {
|
|
4
|
+
skuOptions?: MultiSelectOption[];
|
|
5
|
+
statusOptions?: MultiSelectOption[];
|
|
6
|
+
typeOptions?: MultiSelectOption[];
|
|
7
|
+
modifiedByOptions?: MultiSelectOption[];
|
|
8
|
+
fieldOptions?: MultiSelectOption[];
|
|
9
|
+
deviceNameOptions?: MultiSelectOption[];
|
|
10
|
+
nameOptions?: MultiSelectOption[];
|
|
11
|
+
userFullNameOptions?: MultiSelectOption[];
|
|
12
|
+
networkStatusOptions?: MultiSelectOption[];
|
|
13
|
+
brandOptions?: MultiSelectOption[];
|
|
14
|
+
modelOptions?: MultiSelectOption[];
|
|
15
|
+
moduleOptions?: MultiSelectOption[];
|
|
16
|
+
reportedByOptions?: MultiSelectOption[];
|
|
17
|
+
activityOptions?: MultiSelectOption[];
|
|
18
|
+
pairedInOptions?: MultiSelectOption[];
|
|
19
|
+
availabilityOptions?: MultiSelectOption[];
|
|
20
|
+
actionOptions?: MultiSelectOption[];
|
|
21
|
+
objectNameOptions?: MultiSelectOption[];
|
|
22
|
+
};
|
|
23
|
+
export type BooleanOptions = {
|
|
24
|
+
deviceNameOptions?: boolean;
|
|
25
|
+
nameOptions?: boolean;
|
|
26
|
+
userFullNameOptions?: boolean;
|
|
27
|
+
networkStatusOptions?: boolean;
|
|
28
|
+
brandOptions?: boolean;
|
|
29
|
+
modelOptions?: boolean;
|
|
30
|
+
moduleOptions?: boolean;
|
|
31
|
+
reportedByOptions?: boolean;
|
|
32
|
+
modifiedByOptions?: boolean;
|
|
33
|
+
fieldOptions?: boolean;
|
|
34
|
+
activityOptions?: boolean;
|
|
35
|
+
pairedInOptions?: boolean;
|
|
36
|
+
availabilityOptions?: boolean;
|
|
37
|
+
module?: ApplicationModule;
|
|
38
|
+
status?: string;
|
|
39
|
+
skuOptions?: boolean;
|
|
40
|
+
statusOptions?: boolean;
|
|
41
|
+
typeOptions?: boolean;
|
|
42
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { AntennaPortDetail, HardwareDataType, HardwareDetailDataType } from '../types/hardware.type';
|
|
2
|
+
import { MultiSelectOption } from '../types/options.type';
|
|
3
|
+
export interface HardwareFetchResponse<T = HardwareDataType> {
|
|
4
|
+
message: string;
|
|
5
|
+
status: number;
|
|
6
|
+
data: {
|
|
7
|
+
data: T[];
|
|
8
|
+
totalRecords: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface HardwareFetchDetailResponse<T = HardwareDetailDataType> {
|
|
12
|
+
message: string;
|
|
13
|
+
status: number;
|
|
14
|
+
data: T;
|
|
15
|
+
}
|
|
16
|
+
export type HardwareFetchOptionResponse<Opt = Record<string, boolean>> = Record<keyof Opt, MultiSelectOption[]>;
|
|
17
|
+
export interface HardwareShortFetchResponse<T = AntennaPortDetail> {
|
|
18
|
+
message: string;
|
|
19
|
+
status: number;
|
|
20
|
+
data: T[];
|
|
21
|
+
}
|
|
22
|
+
export type HardwareFilterRaw = {
|
|
23
|
+
deviceName?: number[];
|
|
24
|
+
name?: number[];
|
|
25
|
+
type?: string[];
|
|
26
|
+
readerGroup?: number[];
|
|
27
|
+
readerType?: string;
|
|
28
|
+
networkStatus?: string[];
|
|
29
|
+
brand?: number[];
|
|
30
|
+
model?: number[];
|
|
31
|
+
status?: string[];
|
|
32
|
+
tag?: string;
|
|
33
|
+
sku?: string[];
|
|
34
|
+
groupModule?: string[];
|
|
35
|
+
antennaGroupModule?: string[];
|
|
36
|
+
antennaGroup?: number[];
|
|
37
|
+
userFullName?: number[];
|
|
38
|
+
action?: string[];
|
|
39
|
+
reportedBy?: number[];
|
|
40
|
+
createdAt?: number[];
|
|
41
|
+
lastReportDate?: number[];
|
|
42
|
+
};
|
|
43
|
+
export type HardwareFilterQuery = Partial<Record<keyof HardwareFilterRaw, string>>;
|
|
44
|
+
export type HardwareDetailFilterRaw = {
|
|
45
|
+
date?: number[];
|
|
46
|
+
readerId?: string;
|
|
47
|
+
groupModule?: string[];
|
|
48
|
+
antennaGroupModule?: string[];
|
|
49
|
+
action?: string[];
|
|
50
|
+
userFullName?: number[];
|
|
51
|
+
modifiedBy?: number[];
|
|
52
|
+
isActive?: string[];
|
|
53
|
+
field?: string[];
|
|
54
|
+
};
|
|
55
|
+
export type HardwareDetailFilterQuery = Partial<Record<keyof HardwareDetailFilterRaw, string>>;
|
|
56
|
+
export type DetailTableFilterParams = {
|
|
57
|
+
createdAt?: string;
|
|
58
|
+
activity?: string;
|
|
59
|
+
assetName?: string;
|
|
60
|
+
assignedTo?: string;
|
|
61
|
+
borrower?: string;
|
|
62
|
+
type?: string;
|
|
63
|
+
condition?: string;
|
|
64
|
+
reportedBy?: string;
|
|
65
|
+
staff?: string;
|
|
66
|
+
manager?: string;
|
|
67
|
+
group?: string;
|
|
68
|
+
tag?: string;
|
|
69
|
+
};
|
|
70
|
+
export type DetailTableFilteredParams = Partial<Record<keyof DetailTableFilterParams, string>>;
|
|
71
|
+
export interface PutEditAliasName {
|
|
72
|
+
aliasName: string;
|
|
73
|
+
}
|
|
74
|
+
export interface PutEditReaderGroup {
|
|
75
|
+
fixedAssetGroup?: string;
|
|
76
|
+
supplyAssetGroup?: string;
|
|
77
|
+
receivingFixedAssetGroup?: string[];
|
|
78
|
+
receivingSupplyAssetGroup?: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface PutEditAntennaGroup {
|
|
81
|
+
group: Omit<PutEditReaderGroup, 'receivingFixedAssetGroup' | 'receivingSupplyAssetGroup'>[];
|
|
82
|
+
}
|
|
83
|
+
export interface PutEditAntennaPower {
|
|
84
|
+
power: number[];
|
|
85
|
+
}
|
|
86
|
+
export interface PutEditPortStatus {
|
|
87
|
+
data: {
|
|
88
|
+
isActive: boolean;
|
|
89
|
+
port: number;
|
|
90
|
+
}[];
|
|
91
|
+
}
|
|
92
|
+
export interface PutPingReadersBody {
|
|
93
|
+
ids: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface PutHardwareStatusBody {
|
|
96
|
+
status: 'Missing' | 'Damaged' | 'Available';
|
|
97
|
+
ids?: string[];
|
|
98
|
+
}
|
|
99
|
+
export type HardwareFormType = PutEditAliasName | PutEditAntennaGroup | PutEditAntennaPower | PutHardwareStatusBody | PutEditReaderGroup;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { MultiSelectOption } from '../types/options.type';
|
|
2
|
+
import { ApplicationModule, TAGCountType, TAGDataType } from '../types/tag.type';
|
|
3
|
+
import { TAGDetailCount } from '../types/tagEventlog.type';
|
|
4
|
+
export interface TAGFetchResponse<T = TAGDataType> {
|
|
5
|
+
message: string;
|
|
6
|
+
status: number;
|
|
7
|
+
data: {
|
|
8
|
+
data: T[];
|
|
9
|
+
totalRecords: number;
|
|
10
|
+
} & TAGCountType;
|
|
11
|
+
}
|
|
12
|
+
export type TAGFetchOptionResponse<Opt = Record<string, boolean>> = Record<keyof Opt, MultiSelectOption[]>;
|
|
13
|
+
export type TAGDetailAuditResponse = {
|
|
14
|
+
status: number;
|
|
15
|
+
message: string;
|
|
16
|
+
data: {
|
|
17
|
+
detail: TAGDetailCount[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export interface TAGFilterRaw {
|
|
21
|
+
rfidCode?: ('Yes' | 'No')[];
|
|
22
|
+
qrCode?: ('Yes' | 'No')[];
|
|
23
|
+
nfcCode?: ('Yes' | 'No')[];
|
|
24
|
+
sku?: string[];
|
|
25
|
+
type?: string[];
|
|
26
|
+
status?: string[];
|
|
27
|
+
pairedIn?: string[];
|
|
28
|
+
fixedAssetGroup?: number[];
|
|
29
|
+
supplyAssetGroup?: number[];
|
|
30
|
+
tag?: string[];
|
|
31
|
+
}
|
|
32
|
+
export type TAGFilterQuery = Partial<Record<keyof TAGFilterRaw, string>>;
|
|
33
|
+
export interface PUTAuditTAGBody {
|
|
34
|
+
ids: string[];
|
|
35
|
+
markNotFoundAsDamagedMissing: boolean;
|
|
36
|
+
moveFoundFixedAssetToPortal: boolean;
|
|
37
|
+
moveFoundSupplyAssetToPortal: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface PUTAllocateTAGBody {
|
|
40
|
+
ids: string[];
|
|
41
|
+
group?: number;
|
|
42
|
+
module?: ApplicationModule;
|
|
43
|
+
}
|
|
44
|
+
export type CombineSeparateActions = 'Combine RFID & QR' | 'Combine RFID & NFC' | 'Combine RFID & NFC & QR' | 'Combine NFC & QR' | 'Separate RFID & QR' | 'Separate RFID & NFC' | 'Separate RFID & NFC & QR' | 'Separate NFC & QR';
|
|
45
|
+
export interface PUTCombineTAGBody {
|
|
46
|
+
ids: {
|
|
47
|
+
rfid?: string;
|
|
48
|
+
nfc?: string;
|
|
49
|
+
qr?: string;
|
|
50
|
+
}[];
|
|
51
|
+
action: CombineSeparateActions;
|
|
52
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
|
|
2
|
+
import { MultiSelectOption } from '../types/options.type';
|
|
3
|
+
import { ApplicationModule, TAGType } from '../types/tag.type';
|
|
4
|
+
import { TAGDetailCount, TAGEventlogData } from '../types/tagEventlog.type';
|
|
5
|
+
export interface TAGEventlogFilterQuery {
|
|
6
|
+
status?: string[];
|
|
7
|
+
modifiedBy?: number[];
|
|
8
|
+
type?: TAGType;
|
|
9
|
+
}
|
|
10
|
+
export type TAGEventlogFetchResponse = FetchListResponse<TAGEventlogData>;
|
|
11
|
+
export type TAGEventlogFetchOptionResponse = FetchOptionResponse<{
|
|
12
|
+
modifiedByOptions?: MultiSelectOption[];
|
|
13
|
+
}>;
|
|
14
|
+
export type TAGEventlogDetailResponse = {
|
|
15
|
+
status: number;
|
|
16
|
+
message: string;
|
|
17
|
+
data: {
|
|
18
|
+
type: 'Audit' | 'Allocation';
|
|
19
|
+
module?: ApplicationModule;
|
|
20
|
+
detail: TAGDetailCount[];
|
|
21
|
+
};
|
|
22
|
+
};
|
package/src/dto/user.dto.d.ts
CHANGED
|
@@ -53,13 +53,14 @@ export interface GetUserOptionsParam {
|
|
|
53
53
|
divisionOptions?: boolean;
|
|
54
54
|
positionOptions?: boolean;
|
|
55
55
|
modifiedByOptions?: boolean;
|
|
56
|
+
activeStatusOption?: boolean;
|
|
56
57
|
}
|
|
57
58
|
export interface PutToggleStatusUsersBody {
|
|
58
59
|
user: string[];
|
|
59
60
|
isActive: boolean;
|
|
60
61
|
}
|
|
61
62
|
export interface PostResendEmailBody {
|
|
62
|
-
|
|
63
|
+
user: string[];
|
|
63
64
|
}
|
|
64
65
|
export interface PutChangePasswordBody {
|
|
65
66
|
oldPassword: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { BooleanOptions } from '../dto/dataTable.dto';
|
|
3
|
+
import { HardwareFilterQuery } from '../dto/hardware.dto';
|
|
4
|
+
import { PUTAllocateTAGBody, PUTAuditTAGBody, PUTCombineTAGBody, TAGDetailAuditResponse, TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
|
|
5
|
+
import { FetchResponse } from '../types/fetchResponse.type';
|
|
6
|
+
import { TAGType } from '../types/tag.type';
|
|
7
|
+
declare const GlobalTagServices: {
|
|
8
|
+
getTAGAllPaired: (tagType: TAGType, params?: HardwareFilterQuery) => Promise<AxiosResponse<TAGFetchResponse>>;
|
|
9
|
+
getTAGAllPairedOptions: (tagType: TAGType, params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
10
|
+
data: TAGFetchOptionResponse;
|
|
11
|
+
}>>;
|
|
12
|
+
getTAGNotPaired: (tagType: TAGType, params?: HardwareFilterQuery) => Promise<AxiosResponse<TAGFetchResponse>>;
|
|
13
|
+
getTAGNotPairedOptions: (tagType: TAGType, params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
14
|
+
data: TAGFetchOptionResponse;
|
|
15
|
+
}>>;
|
|
16
|
+
getScanTAG: (tagType: TAGType, params?: {
|
|
17
|
+
tag: string;
|
|
18
|
+
}) => Promise<AxiosResponse>;
|
|
19
|
+
putDetailAuditTAG: (tagType: TAGType, body: {
|
|
20
|
+
ids: string[];
|
|
21
|
+
}) => Promise<AxiosResponse<TAGDetailAuditResponse>>;
|
|
22
|
+
putAuditTAG: (tagType: TAGType, body: PUTAuditTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
23
|
+
putAllocateTAG: (tagType: TAGType, body: PUTAllocateTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
24
|
+
putCombineTAG: (body: PUTCombineTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
25
|
+
};
|
|
26
|
+
export default GlobalTagServices;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { BooleanOptions } from '../dto/dataTable.dto';
|
|
3
|
+
import { HardwareDetailFilterQuery, HardwareFetchDetailResponse, HardwareFetchOptionResponse, HardwareFetchResponse, HardwareFilterQuery, PutEditAliasName, PutEditAntennaGroup, PutEditAntennaPower, PutEditPortStatus, PutEditReaderGroup, PutHardwareStatusBody, PutPingReadersBody } from '../dto/hardware.dto';
|
|
4
|
+
import { AntennaPortDetail, HardwareDataType, HardwareDetailUserActivity } from '../types/hardware.type';
|
|
5
|
+
declare const HardwareServices: {
|
|
6
|
+
getHandheldReader: (params?: HardwareFilterQuery) => Promise<AxiosResponse<HardwareFetchResponse>>;
|
|
7
|
+
getHandheldReaderDetail: (handheldId?: string) => Promise<AxiosResponse<HardwareFetchDetailResponse>>;
|
|
8
|
+
getHandheldReaderOptions: (params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
9
|
+
data: HardwareFetchOptionResponse;
|
|
10
|
+
}>>;
|
|
11
|
+
putMarkHandheldStatus: (body: PutHardwareStatusBody) => Promise<AxiosResponse>;
|
|
12
|
+
putPingReaders: (body: PutPingReadersBody) => Promise<AxiosResponse>;
|
|
13
|
+
putMarkIOTStatus: (body: PutHardwareStatusBody, subTab: "iot-reader" | "antenna") => Promise<AxiosResponse>;
|
|
14
|
+
putEditReaderGroup: (moduleTab: "iot" | "handheld", body: PutEditReaderGroup, hardwareId?: string) => Promise<AxiosResponse>;
|
|
15
|
+
putEditAntennaGroup: (body: PutEditAntennaGroup, hardwareId?: string) => Promise<AxiosResponse>;
|
|
16
|
+
putEditPortStatus: (body: PutEditPortStatus, hardwareId?: string) => Promise<AxiosResponse>;
|
|
17
|
+
putEditAliasName: (moduleTab: "iot" | "handheld", body: PutEditAliasName, hardwareId?: string) => Promise<AxiosResponse>;
|
|
18
|
+
putAntennaPower: (body: PutEditAntennaPower, iotId?: string) => Promise<AxiosResponse>;
|
|
19
|
+
getIOTReaderOrAntenna: (subTab: "iot-reader" | "antenna", params?: HardwareFilterQuery) => Promise<AxiosResponse<HardwareFetchResponse>>;
|
|
20
|
+
getIOTReaderDetail: (iotId?: string) => Promise<AxiosResponse<HardwareFetchDetailResponse>>;
|
|
21
|
+
getIOTReaderOrAntennaOptions: (subTab: "iot-reader" | "antenna", params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
22
|
+
data: HardwareFetchOptionResponse;
|
|
23
|
+
}>>;
|
|
24
|
+
getActivityLog: (params?: HardwareFilterQuery) => Promise<AxiosResponse<HardwareFetchResponse<HardwareDataType>>>;
|
|
25
|
+
getActivityLogOptions: (params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
26
|
+
data: HardwareFetchOptionResponse;
|
|
27
|
+
}>>;
|
|
28
|
+
getDetailActivityLog: (params?: HardwareDetailFilterQuery) => Promise<AxiosResponse<HardwareFetchResponse<HardwareDetailUserActivity>>>;
|
|
29
|
+
getDetailActivityLogOptions: (params?: BooleanOptions) => Promise<AxiosResponse<{
|
|
30
|
+
data: HardwareFetchOptionResponse;
|
|
31
|
+
}>>;
|
|
32
|
+
getExistingAliasNames: () => Promise<AxiosResponse>;
|
|
33
|
+
getIotReaderPort: (id: string, params?: HardwareDetailFilterQuery) => Promise<AxiosResponse<HardwareFetchResponse<AntennaPortDetail>>>;
|
|
34
|
+
};
|
|
35
|
+
export default HardwareServices;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { BooleanOptions } from '../dto/dataTable.dto';
|
|
3
|
+
import { TAGEventlogDetailResponse, TAGEventlogFetchOptionResponse, TAGEventlogFetchResponse, TAGEventlogFilterQuery } from '../dto/tagEventlog.dto';
|
|
4
|
+
declare const TagEventlogServices: {
|
|
5
|
+
getTAGEventlog: (params?: TAGEventlogFilterQuery) => Promise<AxiosResponse<TAGEventlogFetchResponse>>;
|
|
6
|
+
getTAGEventlogOptions: (params?: BooleanOptions) => Promise<AxiosResponse<TAGEventlogFetchOptionResponse>>;
|
|
7
|
+
getDetailTAGEventlog: (eventlogId?: string) => Promise<AxiosResponse<TAGEventlogDetailResponse>>;
|
|
8
|
+
};
|
|
9
|
+
export default TagEventlogServices;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Option } from '../../node_modules/@fewangsit/wangsvue-gsts/dropdown';
|
|
2
2
|
export type ChangelogType = {
|
|
3
3
|
_id: string;
|
|
4
4
|
action: string;
|
|
@@ -14,8 +14,8 @@ export type ChangelogType = {
|
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
};
|
|
16
16
|
export type ChangelogOptionFilter = {
|
|
17
|
-
actionOptions?:
|
|
18
|
-
modifiedByOptions?:
|
|
19
|
-
fieldOptions?:
|
|
20
|
-
objectNameOptions?:
|
|
17
|
+
actionOptions?: Option[];
|
|
18
|
+
modifiedByOptions?: Option[];
|
|
19
|
+
fieldOptions?: Option[];
|
|
20
|
+
objectNameOptions?: Option[];
|
|
21
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Option } from '../../node_modules/@fewangsit/wangsvue-gsts/dropdown';
|
|
1
2
|
import { Data } from './dataTable.type';
|
|
2
|
-
import { MultiSelectOption } from './options.type';
|
|
3
3
|
export type FetchListResponse<T = Data> = {
|
|
4
4
|
status: number;
|
|
5
5
|
message: string;
|
|
@@ -22,7 +22,7 @@ export type FetchResponse = {
|
|
|
22
22
|
status: number;
|
|
23
23
|
message: string;
|
|
24
24
|
};
|
|
25
|
-
export type FilterOptions<Opt = Record<string, boolean>> = Record<keyof Opt,
|
|
25
|
+
export type FilterOptions<Opt = Record<string, boolean>> = Record<keyof Opt, Option[]>;
|
|
26
26
|
export type FetchOptionResponse<Opt = Record<string, boolean>> = {
|
|
27
27
|
message: string;
|
|
28
28
|
data: FilterOptions<Opt>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type HardwareTabType = 'activity-log' | 'handheld-damaged-missing' | 'handheld' | 'iot-reader' | 'iot-antenna' | 'iot-damaged-missing-reader' | 'iot-damaged-missing-antenna';
|
|
2
|
+
export type HardwareDetailTabType = 'All' | 'Tagging' | 'User' | 'Antenna' | 'Changelog';
|
|
3
|
+
export type ModuleGroup = {
|
|
4
|
+
_id: string;
|
|
5
|
+
key: number;
|
|
6
|
+
name: string;
|
|
7
|
+
module: 'fixedAsset' | 'supplyAsset';
|
|
8
|
+
};
|
|
9
|
+
export interface HardwareDataType {
|
|
10
|
+
_id: string;
|
|
11
|
+
imageSmall?: string;
|
|
12
|
+
imageBig?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
sku: string;
|
|
15
|
+
aliasName?: string;
|
|
16
|
+
brand?: string;
|
|
17
|
+
model?: string;
|
|
18
|
+
type: string;
|
|
19
|
+
networkStatus?: 'Online' | 'Offline';
|
|
20
|
+
status: string;
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
updatedAt?: string;
|
|
23
|
+
group?: ModuleGroup[];
|
|
24
|
+
antennaGroup?: {
|
|
25
|
+
port?: number;
|
|
26
|
+
groups?: ModuleGroup[];
|
|
27
|
+
}[];
|
|
28
|
+
activePort?: string;
|
|
29
|
+
reportedBy?: string;
|
|
30
|
+
lastReportDate?: string;
|
|
31
|
+
action?: string;
|
|
32
|
+
userFullName?: string;
|
|
33
|
+
readerName?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface HardwareDetailDataType {
|
|
36
|
+
_id: string;
|
|
37
|
+
imageSmall?: string;
|
|
38
|
+
imageBig?: string;
|
|
39
|
+
readerName?: string;
|
|
40
|
+
serialNumber?: string;
|
|
41
|
+
name: {
|
|
42
|
+
_id: string;
|
|
43
|
+
nameWithSequence: string;
|
|
44
|
+
name: string;
|
|
45
|
+
key: number;
|
|
46
|
+
nameNumber?: number;
|
|
47
|
+
};
|
|
48
|
+
aliasName?: string;
|
|
49
|
+
networkStatus?: 'Online' | 'Offline';
|
|
50
|
+
lastReportDate?: string;
|
|
51
|
+
group?: ModuleGroup[];
|
|
52
|
+
brand?: {
|
|
53
|
+
name?: string;
|
|
54
|
+
key?: number;
|
|
55
|
+
};
|
|
56
|
+
model?: {
|
|
57
|
+
name?: string;
|
|
58
|
+
key?: number;
|
|
59
|
+
};
|
|
60
|
+
manager?: {
|
|
61
|
+
_id: string;
|
|
62
|
+
name?: string;
|
|
63
|
+
key?: number;
|
|
64
|
+
};
|
|
65
|
+
type: string;
|
|
66
|
+
status: string;
|
|
67
|
+
key: number;
|
|
68
|
+
}
|
|
69
|
+
export interface AntennaPortDetail {
|
|
70
|
+
_id: number;
|
|
71
|
+
isActive: boolean;
|
|
72
|
+
port: string;
|
|
73
|
+
group: ModuleGroup[];
|
|
74
|
+
antennaPower: string;
|
|
75
|
+
powerInt: number;
|
|
76
|
+
invalid?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface HardwareDetailUserActivity {
|
|
79
|
+
_id: string;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
userFullName?: string;
|
|
82
|
+
action?: string;
|
|
83
|
+
objectName?: string;
|
|
84
|
+
field?: string;
|
|
85
|
+
oldValue?: string;
|
|
86
|
+
newValue?: string;
|
|
87
|
+
modifiedBy?: string;
|
|
88
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type TAGType = 'rfid' | 'nfc' | 'qr';
|
|
2
|
+
export type TAGTabType = 'all' | 'paired' | 'not-paired' | 'combine-tag';
|
|
3
|
+
export type ApplicationModule = 'Settings Portal' | 'Fixed Asset' | 'Supply Asset';
|
|
4
|
+
export interface TAGCountType {
|
|
5
|
+
settingsPortalAvailable?: number;
|
|
6
|
+
settingsPortalDamagedMissing?: number;
|
|
7
|
+
fixedAssetAvailable?: number;
|
|
8
|
+
fixedAssetDamagedMissing?: number;
|
|
9
|
+
supplyAssetAvailable?: number;
|
|
10
|
+
supplyAssetDamagedMissing?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TAGDataType {
|
|
13
|
+
_id: string;
|
|
14
|
+
rfidCode: string;
|
|
15
|
+
nfcCode: string;
|
|
16
|
+
qrCode: string;
|
|
17
|
+
sku: string;
|
|
18
|
+
type: 'Asset TAG' | 'User TAG';
|
|
19
|
+
status: 'Available' | 'Paired' | 'Damaged/Missing';
|
|
20
|
+
pairedIn: ApplicationModule;
|
|
21
|
+
}
|
|
22
|
+
export interface TAGInfomartion {
|
|
23
|
+
_id: '662f63b17adde9b58b0eb152';
|
|
24
|
+
rfidCode: 'E*40B105';
|
|
25
|
+
nfcCode: 'B*EASD';
|
|
26
|
+
qrCode: 'C*EASDF';
|
|
27
|
+
module: 'Fixed Asset';
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TAGEventlogData {
|
|
2
|
+
_id: string;
|
|
3
|
+
status?: 'Audit' | 'Allocate';
|
|
4
|
+
activity?: string;
|
|
5
|
+
totalTagScanned: number;
|
|
6
|
+
modifiedBy?: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TAGDetailCount {
|
|
10
|
+
type: 'availableFound' | 'damagedMissingFound' | 'availableMarkDamagedMissing' | 'fixedAssetMoveToPortal' | 'supplyAssetMoveToPortal' | 'allocated';
|
|
11
|
+
isChecked?: boolean;
|
|
12
|
+
groupName?: string;
|
|
13
|
+
rfid?: number;
|
|
14
|
+
nfc?: number;
|
|
15
|
+
rfidQr?: number;
|
|
16
|
+
nfcQr?: number;
|
|
17
|
+
rfidNfc?: number;
|
|
18
|
+
rfidNfcQr?: number;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getImageURL: (name?: string | null) => string | undefined;
|
|
1
|
+
export declare const getImageURL: (name?: string | null, width?: number, height?: number) => string | undefined;
|
package/api-services.system.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["axios"],function(r,d){"use strict";var c;return{setters:[a=>{c=a.default}],execute:function(){const a={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_GLOBAL_SETTINGS_API:"https://staging-api.global-settings.tagsamurai.com",VITE_APP_LOGS_NOTIFICATION_API:"https://staging-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://staging-api.tagsamurai.com"},u=r("getBaseURL",(e="APP_TAGSAMURAI_API")=>a["VITE_"+e]),i=(e={},t=!1)=>{const{env:s="APP_GLOBAL_SETTINGS_API",prefix:I="",headers:A={},...f}=e,_=`${u(s)}${I}`,P=JSON.parse(localStorage.getItem("user")??"{}"),m=P.jwt??P.token??"";return c.create({...f,baseURL:_,headers:t?A:{"Content-Type":"application/json",Authorization:`Bearer ${m}`,...A}})},O=r("getImageURL",e=>e?`${u("APP_TAGSAMURAI_API")}/file-manager/v2/files/${e}`:void 0),T=r("queryParamsStringfy",e=>{if(!e||typeof e=="string")return;const t={};return Object.keys(e).forEach(s=>{Array.isArray(e[s])?e[s].length>0&&Object.assign(t,{[s]:JSON.stringify(e[s])}):e[s]!==void 0&&Object.assign(t,{[s]:e[s]})}),t}),l=i({prefix:"/v1/global-settings/change-log"}),U=r("ChangelogServices",{getChangelogs:e=>l.get("",{params:e}),getChangelogOptions:e=>l.get("/options",{params:e})}),o=i({prefix:"/v1/global-settings/division"}),$=r("DivisionServices",{getDivisions:e=>o.get("",{params:e}),getDivisionDetail:e=>o.get(`/${e}`),postCreateDivision:e=>o.post("/",e),putEditDivision:(e,t)=>o.put(`/${e}`,t),deleteDivisions:e=>{const t={id:JSON.stringify(e)};return o.delete("",{params:t})}}),S=i({env:"APP_LOGS_NOTIFICATION_API",prefix:"/v2"}),y=r("LogServices",{getSessionLogList:e=>S.get("/session-log",{params:e})}),p=i({prefix:"/v1/global-settings/option"}),L=r("OptionServices",{getPositions:()=>p.get("/position"),getDivisions:()=>p.get("/division")}),g=i({prefix:"/v1/global-settings/position"}),h=r("PositionServices",{getPositions:e=>g.get("",{params:e}),getPositionDetail:e=>g.get(`/${e}`),postCreatePosition:e=>g.post("/",e),putEditPosition:(e,t)=>g.put(`/${e}`,t),deletePositions:e=>{const t={id:JSON.stringify(e)};return g.delete("",{params:t})}}),v=i({env:"APP_TAGSAMURAI_API",prefix:"/tag/v2"}),E=r("TagServices",{getTagInfo:e=>v.get("/rfid-qr/scan",{params:e})}),n=i({prefix:"/v1/global-settings/user"}),C=r("UserServices",{getUsers:e=>n.get("",{params:e}),getUserDetail:e=>n.get(`/${e}`),getUserSystemLogs:(e,t)=>n.get(`/${e}/system-logs`,{params:t}),getUserSystemLogOptions:(e,t)=>{const s={};return s[t]=!0,n.get(`/${e}/system-logs/options`,{params:s})},postCreateUser:e=>{const t={"Content-Type":"multipart/form-data"};return n.post("",e,{headers:t})},putEditUser:(e,t)=>{const s={"Content-Type":"multipart/form-data"};return n.put(`/${e}`,t,{headers:s})},deleteUsers:e=>{const t={id:JSON.stringify(e)};return n.delete("",{params:t})},putToggleStatusUsers:e=>n.put("/active-status",e),getUserOptions:e=>{const t={};return t[e]=!0,n.get("/options",{params:t})},deleteCancelEmailChange:e=>n.delete(`/cancel-email-change/${e}`),postResendEmail:e=>n.post("/resend-email",e),putChangePassword:(e,t)=>n.put(`/change-password/${e}`,t)})}}});
|