@tagsamurai/gsts-api-services 2.0.1-alpha.22 → 2.0.1-alpha.24
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
CHANGED
|
@@ -2,11 +2,11 @@ import R from "axios";
|
|
|
2
2
|
const U = { 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" }, I = (t = "APP_TAGSAMURAI_API") => U["VITE_" + t], p = (t = {}, e = !1) => {
|
|
3
3
|
const {
|
|
4
4
|
env: r = "APP_GLOBAL_SETTINGS_API",
|
|
5
|
-
prefix:
|
|
5
|
+
prefix: o = "",
|
|
6
6
|
headers: a = {},
|
|
7
|
-
...
|
|
8
|
-
} = t, w = "".concat(I(r)).concat(
|
|
9
|
-
...
|
|
7
|
+
...l
|
|
8
|
+
} = t, w = "".concat(I(r)).concat(o), A = R.create({
|
|
9
|
+
...l,
|
|
10
10
|
baseURL: w,
|
|
11
11
|
headers: e ? a : {
|
|
12
12
|
"Content-Type": "application/json",
|
|
@@ -18,49 +18,49 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
18
18
|
const P = JSON.parse((S = localStorage.getItem("user")) != null ? S : "{}"), O = ($ = (y = P.jwt) != null ? y : P.token) != null ? $ : "";
|
|
19
19
|
return h.headers.Authorization = "Bearer ".concat(O), h;
|
|
20
20
|
}), A;
|
|
21
|
-
},
|
|
21
|
+
}, c = p({
|
|
22
22
|
prefix: "/v1/global-settings/auth"
|
|
23
23
|
}), E = (t) => {
|
|
24
|
-
var e, r,
|
|
25
|
-
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((a = (
|
|
24
|
+
var e, r, o, a;
|
|
25
|
+
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((a = (o = t.response) == null ? void 0 : o.data) == null ? void 0 : a.message) === "jwt malformed" ? (window.onblur = null, window.onfocus = null, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
|
|
26
26
|
}, k = {
|
|
27
27
|
login: (t) => {
|
|
28
28
|
const e = { ...t, isMobile: !1 };
|
|
29
|
-
return
|
|
29
|
+
return c.post("/login", e);
|
|
30
30
|
},
|
|
31
|
-
reLogin: (t) => (
|
|
31
|
+
reLogin: (t) => (c.interceptors.response.use((e) => e, E), c.post("/login", t)),
|
|
32
32
|
requestOTP: (t) => {
|
|
33
33
|
const e = { email: t };
|
|
34
|
-
return
|
|
34
|
+
return c.post("/request-otp", e);
|
|
35
35
|
},
|
|
36
36
|
requestResetPassLink: (t) => {
|
|
37
37
|
const e = { email: t };
|
|
38
|
-
return
|
|
38
|
+
return c.post("/request-reset-link", e);
|
|
39
39
|
},
|
|
40
|
-
setPassword: (t) =>
|
|
41
|
-
verifyToken: (t) =>
|
|
40
|
+
setPassword: (t) => c.post("/set-password", t),
|
|
41
|
+
verifyToken: (t) => c.get("/verify-token/".concat(t)),
|
|
42
42
|
confirmEmailChange: (t) => {
|
|
43
43
|
const e = { token: t };
|
|
44
|
-
return
|
|
44
|
+
return c.put("/confirm-email-change/confirm", e);
|
|
45
45
|
},
|
|
46
|
-
postLogout: () =>
|
|
46
|
+
postLogout: () => c.post("/logout"),
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @deprecated use postLogout instead
|
|
50
50
|
*/
|
|
51
|
-
logout: () =>
|
|
51
|
+
logout: () => c.post("/logout")
|
|
52
52
|
}, L = (t, e, r) => {
|
|
53
|
-
const
|
|
54
|
-
let a = t.startsWith("http") ? t : "".concat(
|
|
53
|
+
const o = new URL(I("APP_TAGSAMURAI_API") || "").origin;
|
|
54
|
+
let a = t.startsWith("http") ? t : "".concat(o, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
|
|
55
55
|
if (e || r) {
|
|
56
|
-
const
|
|
57
|
-
e && (
|
|
56
|
+
const l = new URLSearchParams();
|
|
57
|
+
e && (l.set("width", e.toString()), l.set("height", (r == null ? void 0 : r.toString()) || e.toString())), a += "?".concat(l.toString());
|
|
58
58
|
}
|
|
59
59
|
return a;
|
|
60
60
|
}, _ = () => {
|
|
61
|
-
var e, r,
|
|
61
|
+
var e, r, o;
|
|
62
62
|
const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
|
|
63
|
-
return (
|
|
63
|
+
return (o = (r = t.jwt) != null ? r : t.token) != null ? o : "";
|
|
64
64
|
}, x = async (t, e) => {
|
|
65
65
|
const r = await fetch(t, {
|
|
66
66
|
headers: {
|
|
@@ -69,8 +69,8 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
69
69
|
});
|
|
70
70
|
if (!r.ok)
|
|
71
71
|
throw new Error("Image fetch failed: ".concat(r.status, " ").concat(r.statusText));
|
|
72
|
-
const
|
|
73
|
-
return new Blob([
|
|
72
|
+
const o = await r.arrayBuffer();
|
|
73
|
+
return new Blob([o], {
|
|
74
74
|
type: r.headers.get("Content-Type") || "image/webp"
|
|
75
75
|
});
|
|
76
76
|
}, C = async (t) => {
|
|
@@ -80,10 +80,10 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
80
80
|
} catch (e) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
}, H = async (t, e, r,
|
|
83
|
+
}, H = async (t, e, r, o) => {
|
|
84
84
|
if (!t) return;
|
|
85
85
|
const a = L(t, e, r);
|
|
86
|
-
return
|
|
86
|
+
return o ? a : C(a);
|
|
87
87
|
}, J = (t) => {
|
|
88
88
|
if (!t || typeof t == "string")
|
|
89
89
|
return;
|
|
@@ -109,14 +109,14 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
109
109
|
return {};
|
|
110
110
|
const e = {};
|
|
111
111
|
return Object.keys(t).forEach((r) => {
|
|
112
|
-
const
|
|
113
|
-
e[r] = G(
|
|
112
|
+
const o = t[r];
|
|
113
|
+
e[r] = G(o) ? JSON.parse(o.trim()) : o;
|
|
114
114
|
}), e;
|
|
115
|
-
},
|
|
115
|
+
}, T = p({
|
|
116
116
|
prefix: "/v1/global-settings/change-log"
|
|
117
117
|
}), j = {
|
|
118
|
-
getChangelogs: (t) =>
|
|
119
|
-
getChangelogOptions: (t) =>
|
|
118
|
+
getChangelogs: (t) => T.get("", { params: t }),
|
|
119
|
+
getChangelogOptions: (t) => T.get("/options", { params: t })
|
|
120
120
|
}, m = p({
|
|
121
121
|
prefix: "/v1/global-settings/division"
|
|
122
122
|
}), B = {
|
|
@@ -128,88 +128,89 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
128
128
|
const e = { id: JSON.stringify(t) };
|
|
129
129
|
return m.delete("", { params: e });
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, g = p({
|
|
132
132
|
prefix: "/v2/hardware-tagging"
|
|
133
133
|
}), q = {
|
|
134
134
|
getAllTAG: (t) => {
|
|
135
135
|
const e = u(t);
|
|
136
|
-
return
|
|
136
|
+
return g.post("/all-tag/list", e);
|
|
137
137
|
},
|
|
138
138
|
getAllTAGOptions: (t) => {
|
|
139
139
|
const e = u(t);
|
|
140
|
-
return
|
|
140
|
+
return g.post("all-tag/options", e);
|
|
141
141
|
},
|
|
142
|
-
getNotPairedYetCounts: () =>
|
|
142
|
+
getNotPairedYetCounts: () => g.get("/not-paired-yet/tag-count"),
|
|
143
143
|
getNotPairedYetList: (t) => {
|
|
144
144
|
const e = u(t);
|
|
145
|
-
return
|
|
145
|
+
return g.post("/not-paired-yet/list", e);
|
|
146
146
|
},
|
|
147
147
|
getNotPairedYetOptions: (t) => {
|
|
148
148
|
const e = u(t);
|
|
149
|
-
return
|
|
149
|
+
return g.post("/not-paired-yet/options", e);
|
|
150
150
|
},
|
|
151
|
-
getAuditTAGDetail: (t) =>
|
|
152
|
-
submitAuditTAG: (t) =>
|
|
153
|
-
submitCombineTAG: (t) =>
|
|
154
|
-
submitSeparateTAG: (t) =>
|
|
151
|
+
getAuditTAGDetail: (t) => g.post("/audit/detail", t),
|
|
152
|
+
submitAuditTAG: (t) => g.post("/audit/submit", t),
|
|
153
|
+
submitCombineTAG: (t) => g.post("/combine-tag/combine", t),
|
|
154
|
+
submitSeparateTAG: (t) => g.post("/combine-tag/separate", t),
|
|
155
155
|
getPairedList: (t) => {
|
|
156
156
|
const e = u(t);
|
|
157
|
-
return
|
|
157
|
+
return g.post("/paired/list", e);
|
|
158
158
|
},
|
|
159
159
|
getPairedOptions: (t) => {
|
|
160
160
|
const e = u(t);
|
|
161
|
-
return
|
|
162
|
-
}
|
|
163
|
-
|
|
161
|
+
return g.post("/paired/options", e);
|
|
162
|
+
},
|
|
163
|
+
getScanTag: (t) => g.get("/scan-tag", { params: { tag: t } })
|
|
164
|
+
}, n = p({
|
|
164
165
|
prefix: "/v2/hardware-tagging"
|
|
165
166
|
}), V = {
|
|
166
167
|
getHandheldReader: (t) => {
|
|
167
168
|
const e = u(t);
|
|
168
|
-
return
|
|
169
|
-
},
|
|
170
|
-
getHandheldReaderDetail: (t) =>
|
|
171
|
-
getHandheldReaderOptions: (t) =>
|
|
172
|
-
putMarkHandheldStatus: (t, e, r) =>
|
|
173
|
-
postPingReaders: (t) =>
|
|
174
|
-
putMarkIOTStatus: (t, e) =>
|
|
175
|
-
putEditReaderGroup: (t, e, r) =>
|
|
176
|
-
putEditAntennaGroup: (t, e) =>
|
|
177
|
-
putEditPortStatus: (t, e) =>
|
|
178
|
-
putEditAliasName: (t, e, r) =>
|
|
179
|
-
postActivateHardware: (t, e) =>
|
|
180
|
-
deleteHardware: (t, e) =>
|
|
169
|
+
return n.post("/handheld-reader/list", e);
|
|
170
|
+
},
|
|
171
|
+
getHandheldReaderDetail: (t) => n.get("/handheld-reader/".concat(t)),
|
|
172
|
+
getHandheldReaderOptions: (t) => n.post("/handheld-reader/options", t),
|
|
173
|
+
putMarkHandheldStatus: (t, e, r) => n.patch("/".concat(t, "/status"), r, { params: e }),
|
|
174
|
+
postPingReaders: (t) => n.post("/iot-reader/ping", t),
|
|
175
|
+
putMarkIOTStatus: (t, e) => n.put("/".concat(e, "/mark-status"), t),
|
|
176
|
+
putEditReaderGroup: (t, e, r) => n.patch("/".concat(t, "-reader/").concat(r, "/group"), e),
|
|
177
|
+
putEditAntennaGroup: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
178
|
+
putEditPortStatus: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
179
|
+
putEditAliasName: (t, e, r) => n.patch("/".concat(t, "-reader/").concat(r, "/alias-name"), e),
|
|
180
|
+
postActivateHardware: (t, e) => n.post("/".concat(t, "-reader/activate"), e),
|
|
181
|
+
deleteHardware: (t, e) => n.delete("/".concat(t, "-reader"), {
|
|
181
182
|
params: e
|
|
182
183
|
}),
|
|
183
|
-
putAntennaPower: (t, e) =>
|
|
184
|
+
putAntennaPower: (t, e) => n.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
184
185
|
getIotReader: (t) => {
|
|
185
186
|
const e = u({ ...t });
|
|
186
|
-
return
|
|
187
|
-
},
|
|
188
|
-
getIotReaderDetail: (t) =>
|
|
189
|
-
getIotReaderOptions: (t) =>
|
|
190
|
-
getIotReaderPort: (t, e) =>
|
|
191
|
-
getIotReaderTablet: (t, e) =>
|
|
192
|
-
getIotReaderTabletOptions: (t, e) =>
|
|
193
|
-
putEditIotReader: (t, e) =>
|
|
194
|
-
disconnectIotTablet: (t, e) =>
|
|
187
|
+
return n.post("/iot-reader", e);
|
|
188
|
+
},
|
|
189
|
+
getIotReaderDetail: (t) => n.get("/iot-reader/".concat(t)),
|
|
190
|
+
getIotReaderOptions: (t) => n.post("/iot-reader/options", t),
|
|
191
|
+
getIotReaderPort: (t, e) => n.post("/iot-reader/".concat(t, "/port/list"), { params: e }),
|
|
192
|
+
getIotReaderTablet: (t, e) => n.post("/iot-reader/".concat(t, "/tablet/list"), { params: e }),
|
|
193
|
+
getIotReaderTabletOptions: (t, e) => n.post("/iot-reader/".concat(t, "/tablet/options"), e),
|
|
194
|
+
putEditIotReader: (t, e) => n.patch("/iot-reader/".concat(t), e),
|
|
195
|
+
disconnectIotTablet: (t, e) => n.delete("/iot-reader/".concat(t, "/tablet"), {
|
|
195
196
|
data: e
|
|
196
197
|
}),
|
|
197
198
|
// TODO: Activity API spec not finished yet
|
|
198
|
-
getActivityLog: (t) =>
|
|
199
|
-
getActivityLogOptions: (t) =>
|
|
200
|
-
getDetailActivityLog: (t) =>
|
|
201
|
-
getDetailActivityLogOptions: (t) =>
|
|
202
|
-
getExistingAliasNames: () =>
|
|
199
|
+
getActivityLog: (t) => n.get("/activity-log", { params: t }),
|
|
200
|
+
getActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
|
|
201
|
+
getDetailActivityLog: (t) => n.get("/activity-log", { params: t }),
|
|
202
|
+
getDetailActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
|
|
203
|
+
getExistingAliasNames: () => n.get("/reader/alias-names")
|
|
203
204
|
}, N = p({
|
|
204
205
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
205
206
|
prefix: "/v2"
|
|
206
207
|
}), Y = {
|
|
207
208
|
getSessionLogList: (t) => N.get("/session-log", { params: t })
|
|
208
|
-
},
|
|
209
|
+
}, D = p({
|
|
209
210
|
prefix: "/v1/global-settings/option"
|
|
210
211
|
}), z = {
|
|
211
|
-
getPositions: () =>
|
|
212
|
-
getDivisions: () =>
|
|
212
|
+
getPositions: () => D.get("/position"),
|
|
213
|
+
getDivisions: () => D.get("/division")
|
|
213
214
|
}, f = p({
|
|
214
215
|
prefix: "/v1/global-settings/position"
|
|
215
216
|
}), X = {
|
|
@@ -238,36 +239,36 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
238
239
|
return b.post("/tag-event-log/options", e);
|
|
239
240
|
},
|
|
240
241
|
getDetailTAGEventlog: (t) => b.get("/tag-event-log/".concat(t))
|
|
241
|
-
},
|
|
242
|
+
}, d = p({
|
|
242
243
|
prefix: "/v1/global-settings/user"
|
|
243
244
|
}), Q = {
|
|
244
|
-
getUsers: (t) =>
|
|
245
|
-
getUserDetail: (t) =>
|
|
246
|
-
getUserSystemLogs: (t, e) =>
|
|
245
|
+
getUsers: (t) => d.get("", { params: t }),
|
|
246
|
+
getUserDetail: (t) => d.get("/".concat(t)),
|
|
247
|
+
getUserSystemLogs: (t, e) => d.get("/".concat(t, "/system-logs"), { params: e }),
|
|
247
248
|
getUserSystemLogOptions: (t, e) => {
|
|
248
249
|
const r = {};
|
|
249
|
-
return r[e] = !0,
|
|
250
|
+
return r[e] = !0, d.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
250
251
|
},
|
|
251
252
|
postCreateUser: (t) => {
|
|
252
253
|
const e = { "Content-Type": "multipart/form-data" };
|
|
253
|
-
return
|
|
254
|
+
return d.post("", t, { headers: e });
|
|
254
255
|
},
|
|
255
256
|
putEditUser: (t, e) => {
|
|
256
257
|
const r = { "Content-Type": "multipart/form-data" };
|
|
257
|
-
return
|
|
258
|
+
return d.put("/".concat(t), e, { headers: r });
|
|
258
259
|
},
|
|
259
260
|
deleteUsers: (t) => {
|
|
260
261
|
const e = { id: JSON.stringify(t) };
|
|
261
|
-
return
|
|
262
|
+
return d.delete("", { params: e });
|
|
262
263
|
},
|
|
263
|
-
putToggleStatusUsers: (t) =>
|
|
264
|
+
putToggleStatusUsers: (t) => d.put("/active-status", t),
|
|
264
265
|
getUserOptions: (t) => {
|
|
265
266
|
const e = {};
|
|
266
|
-
return e[t] = !0,
|
|
267
|
+
return e[t] = !0, d.get("/options", { params: e });
|
|
267
268
|
},
|
|
268
|
-
deleteCancelEmailChange: (t) =>
|
|
269
|
-
postResendEmail: (t) =>
|
|
270
|
-
putChangePassword: (t, e) =>
|
|
269
|
+
deleteCancelEmailChange: (t) => d.delete("/cancel-email-change/".concat(t)),
|
|
270
|
+
postResendEmail: (t) => d.post("/resend-email", t),
|
|
271
|
+
putChangePassword: (t, e) => d.put("/change-password/".concat(t), e)
|
|
271
272
|
}, v = p({
|
|
272
273
|
prefix: "/v2/hardware-tagging"
|
|
273
274
|
}), Z = {
|
|
@@ -311,8 +312,8 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
311
312
|
},
|
|
312
313
|
createUsers: (t) => {
|
|
313
314
|
const e = new FormData();
|
|
314
|
-
return Object.entries(t).forEach(([r,
|
|
315
|
-
|
|
315
|
+
return Object.entries(t).forEach(([r, o]) => {
|
|
316
|
+
o != null && e.append(r, o);
|
|
316
317
|
}), s.post("/users", e, {
|
|
317
318
|
headers: { "Content-Type": "multipart/form-data" }
|
|
318
319
|
});
|
|
@@ -332,8 +333,8 @@ const U = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
332
333
|
},
|
|
333
334
|
editUsers: (t, e) => {
|
|
334
335
|
const r = new FormData();
|
|
335
|
-
return Object.entries(e).forEach(([
|
|
336
|
-
a != null && r.append(
|
|
336
|
+
return Object.entries(e).forEach(([o, a]) => {
|
|
337
|
+
a != null && r.append(o, a);
|
|
337
338
|
}), s.patch("/users/".concat(t), r, {
|
|
338
339
|
headers: { "Content-Type": "multipart/form-data" }
|
|
339
340
|
});
|
package/package.json
CHANGED
package/src/dto/tag.dto.d.ts
CHANGED
|
@@ -17,6 +17,16 @@ export type TAGDetailAuditResponse = {
|
|
|
17
17
|
detail: TAGDetailCount[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
export type ScanResponse = {
|
|
21
|
+
_id: string;
|
|
22
|
+
rfidCode: string | null;
|
|
23
|
+
nfcCode: string | null;
|
|
24
|
+
qrCode: string | null;
|
|
25
|
+
tagType: string;
|
|
26
|
+
rfidSku: string | null;
|
|
27
|
+
nfcSku: string | null;
|
|
28
|
+
status: string;
|
|
29
|
+
};
|
|
20
30
|
export interface TAGFilterRaw {
|
|
21
31
|
rfidCode?: ('Yes' | 'No')[];
|
|
22
32
|
qrCode?: ('Yes' | 'No')[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { GetAllTAGOptionsQuery, GetAllTAGParams, GetAuditTAGDetailParams, GetNotPairedYetListParams, GetNotPairedYetOptions, SubmitAuditTAGBody, SubmitCombineTAGBody, SubmitSeparateTAGBody } from '../dto/hardware.dto';
|
|
3
|
-
import { TAGFetchOptionResponse } from '../dto/tag.dto';
|
|
3
|
+
import { ScanResponse, TAGFetchOptionResponse } from '../dto/tag.dto';
|
|
4
4
|
import { FetchListResponse } from '../types/fetchResponse.type';
|
|
5
5
|
import { AuditTAGDetailResponse, NotPairedYetCountsResponse, TAGResponseType } from '../types/hardware.type';
|
|
6
6
|
declare const GlobalTagServices: {
|
|
@@ -21,5 +21,6 @@ declare const GlobalTagServices: {
|
|
|
21
21
|
getPairedOptions: (params?: GetAllTAGParams) => Promise<AxiosResponse<{
|
|
22
22
|
data: TAGFetchOptionResponse;
|
|
23
23
|
}>>;
|
|
24
|
+
getScanTag: (tag: string) => Promise<AxiosResponse<FetchListResponse<ScanResponse>>>;
|
|
24
25
|
};
|
|
25
26
|
export default GlobalTagServices;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchResponse } from './fetchResponse.type';
|
|
2
2
|
export type HardwareTabType = 'activity-log' | 'handheld-damaged-missing' | 'handheld' | 'iot-reader' | 'iot-antenna' | 'iot-damaged-missing-reader' | 'iot-damaged-missing-antenna';
|
|
3
3
|
export type HardwareDetailTabType = 'All' | 'Tagging' | 'User' | 'Antenna' | 'Changelog';
|
|
4
|
+
export type ModuleType = 'fixedAsset' | 'supplyAsset';
|
|
4
5
|
export interface HardwareDetailDataType {
|
|
5
6
|
_id: string;
|
|
6
7
|
image?: string;
|
|
@@ -16,17 +17,23 @@ export interface HandheldDataType extends HandheldDetailDataType {
|
|
|
16
17
|
export interface HandheldDetailDataType extends HardwareDetailDataType {
|
|
17
18
|
type: string;
|
|
18
19
|
status: string;
|
|
19
|
-
group:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
group: ReaderGroup;
|
|
21
|
+
}
|
|
22
|
+
export interface ReaderGroup {
|
|
23
|
+
fixedAsset?: {
|
|
24
|
+
_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
supplyAsset?: {
|
|
28
|
+
_id: string;
|
|
29
|
+
name: string;
|
|
28
30
|
};
|
|
29
31
|
}
|
|
32
|
+
export interface ListReaderGroup {
|
|
33
|
+
module: ModuleType;
|
|
34
|
+
_id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}
|
|
30
37
|
export interface IotGroup {
|
|
31
38
|
fixedAsset?: string;
|
|
32
39
|
supplyAsset?: string;
|