@tagsamurai/fats-api-services 1.0.0-alpha.217 → 1.0.0-alpha.219
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 +2375 -1114
- package/api-services.system.js +2678 -1
- package/main.d.ts +1 -0
- package/package.json +1 -1
- package/src/constants/serverPrefixMap.d.ts +11 -0
- package/src/dto/assetPolicyService.dto.d.ts +25 -0
- package/src/services/assetPolicy.service.d.ts +10 -0
- package/src/services/customField.service.d.ts +3 -0
- package/src/types/assetPolicyService.type.d.ts +18 -0
- package/src/utils/createInstance.util.d.ts +3 -0
package/api-services.es.js
CHANGED
|
@@ -1,362 +1,646 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_ADMIN_API": "https://dev-admin-api.tagsamurai.com", "VITE_APP_API": "https://dev-api.tagsamurai.com", "VITE_APP_ASSETS_URL": "https://assets.tagsamurai.com", "VITE_APP_COUNTRY_STATE_API": "https://api.countrystatecity.in", "VITE_APP_COUNTRY_STATE_API_KEY": "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", "VITE_APP_GLOBAL_SETTINGS_API": "https://dev-api.global-settings.tagsamurai.com", "VITE_APP_LOGS_NOTIFICATION_API": "https://dev-api-logs-notification.tagsamurai.com" };
|
|
3
|
+
const getBaseURL = (env = "APP_API") => {
|
|
4
|
+
return __vite_import_meta_env__["VITE_" + env];
|
|
5
|
+
};
|
|
6
|
+
const createAxiosInstance = (config = {}, useDifferentHeaders = false) => {
|
|
7
|
+
const { env = "APP_API", prefix = "", headers = {}, ...restConfig } = config;
|
|
8
|
+
const baseURL = `${getBaseURL(env)}${prefix}`;
|
|
9
|
+
const instance = axios.create({
|
|
10
|
+
...restConfig,
|
|
11
|
+
baseURL,
|
|
12
|
+
headers: useDifferentHeaders ? headers : {
|
|
7
13
|
"Content-Type": "application/json",
|
|
8
|
-
...
|
|
14
|
+
...headers
|
|
9
15
|
}
|
|
10
16
|
});
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
instance.interceptors.request.use((request) => {
|
|
18
|
+
const user = JSON.parse(localStorage.getItem("user") ?? "{}");
|
|
19
|
+
const jwt = user.jwt ?? user.token ?? "";
|
|
20
|
+
request.headers["Authorization"] = `Bearer ${jwt}`;
|
|
21
|
+
return request;
|
|
22
|
+
});
|
|
23
|
+
return instance;
|
|
24
|
+
};
|
|
25
|
+
const SERVER_PREFIX = {
|
|
26
|
+
SETTINGS_ATTRIBUTES: "settings-attribute"
|
|
27
|
+
};
|
|
28
|
+
const queryParamsStringfy = (data) => {
|
|
29
|
+
if (!data || typeof data === "string") {
|
|
17
30
|
return;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
}
|
|
32
|
+
const assignedData = {};
|
|
33
|
+
Object.keys(data).forEach((item) => {
|
|
34
|
+
if (Array.isArray(data[item])) {
|
|
35
|
+
if (data[item].length > 0) {
|
|
36
|
+
Object.assign(assignedData, {
|
|
37
|
+
[item]: JSON.stringify(data[item])
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
} else if (data[item] !== void 0) {
|
|
41
|
+
Object.assign(assignedData, {
|
|
42
|
+
[item]: data[item]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return assignedData;
|
|
47
|
+
};
|
|
48
|
+
const getImageURL$1 = (name, width, height) => {
|
|
49
|
+
if (!name) return;
|
|
50
|
+
const BASE_URL = getBaseURL("APP_API");
|
|
51
|
+
const filePath = name.startsWith("http") ? name : `${BASE_URL}/utility/v2/files/${name.replace(/^\/+/, "")}`;
|
|
52
|
+
if (width || height) {
|
|
53
|
+
const params = new URLSearchParams();
|
|
54
|
+
if (width) {
|
|
55
|
+
params.set("width", width.toString());
|
|
56
|
+
params.set("height", height ? height == null ? void 0 : height.toString() : width.toString());
|
|
57
|
+
}
|
|
58
|
+
return `${filePath}?${params.toString()}`;
|
|
59
|
+
}
|
|
60
|
+
return filePath;
|
|
61
|
+
};
|
|
62
|
+
const getImageURL = (name) => {
|
|
63
|
+
if (!name) return;
|
|
64
|
+
const BASE_URL = getBaseURL();
|
|
65
|
+
const filePath = name.startsWith("http") ? name : `${BASE_URL}/file-manager/v2/files/${name}`;
|
|
66
|
+
return filePath;
|
|
67
|
+
};
|
|
68
|
+
const getAssetsFile = async (file, type = "excel") => {
|
|
69
|
+
const response = await fetch(
|
|
70
|
+
`${getBaseURL("APP_ASSETS_URL")}/${type}/${file}`
|
|
71
|
+
);
|
|
72
|
+
return response;
|
|
73
|
+
};
|
|
74
|
+
const API$W = createAxiosInstance({
|
|
41
75
|
prefix: "/settings-attribute/v2"
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
76
|
+
});
|
|
77
|
+
const GroupCategoryServices$1 = {
|
|
78
|
+
getGroupCategory: (type, params) => {
|
|
79
|
+
const endpoint = type === "category" ? type : "groups";
|
|
80
|
+
return API$W.get(`/${endpoint}/tree`, { params });
|
|
81
|
+
},
|
|
82
|
+
getGroupCategoryList: (type, groupId, params) => {
|
|
83
|
+
const endpoint = type === "category" ? type : "groups";
|
|
84
|
+
return API$W.get(`/${endpoint}/${groupId}`, { params });
|
|
85
|
+
},
|
|
86
|
+
getNames: (type) => {
|
|
87
|
+
const endpoint = type === "category" ? type : "groups";
|
|
88
|
+
return API$W.get(`/${endpoint}/names`);
|
|
89
|
+
},
|
|
90
|
+
getCodes: (type) => {
|
|
91
|
+
const endpoint = type === "category" ? type : "groups";
|
|
92
|
+
return API$W.get(`/${endpoint}/codes`);
|
|
93
|
+
},
|
|
94
|
+
postCreateGroupCategory: (type, body) => {
|
|
95
|
+
const endpoint = type === "category" ? type : "groups";
|
|
96
|
+
return API$W.post(`/${endpoint}`, body);
|
|
97
|
+
},
|
|
98
|
+
putEditGroupCategory: (type, body, objectId) => {
|
|
99
|
+
const endpoint = type === "category" ? type : "groups";
|
|
100
|
+
return API$W.put(`/${endpoint}/${objectId}`, body);
|
|
101
|
+
},
|
|
102
|
+
putMoveGroup: (body, objectId) => {
|
|
103
|
+
return API$W.put(`/groups/${objectId}/move-group`, body);
|
|
104
|
+
},
|
|
105
|
+
putEditBulkGroups: async (body) => {
|
|
106
|
+
return API$W.put("/groups/bulk", body);
|
|
107
|
+
},
|
|
108
|
+
deleteGroupCategory: (type, body, objectId) => {
|
|
109
|
+
const endpoint = type === "category" ? type : "groups";
|
|
110
|
+
return API$W.delete(`/${endpoint}/${objectId}`, { data: body });
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const API$V = createAxiosInstance({
|
|
74
114
|
prefix: "/settings-attribute-go/v2"
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
115
|
+
});
|
|
116
|
+
const GroupCategoryServices = {
|
|
117
|
+
getGroupCategory: (type, params) => {
|
|
118
|
+
const endpoint = type === "category" ? type : "groups";
|
|
119
|
+
return API$V.get(`/${endpoint}/tree`, { params });
|
|
79
120
|
},
|
|
80
|
-
getGroupCategoryList: (
|
|
81
|
-
const
|
|
82
|
-
return
|
|
121
|
+
getGroupCategoryList: (type, groupId) => {
|
|
122
|
+
const endpoint = type === "category" ? type : "groups";
|
|
123
|
+
return API$V.get(`/${endpoint}/${groupId}`);
|
|
83
124
|
},
|
|
84
|
-
getNames: (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
125
|
+
getNames: (type) => {
|
|
126
|
+
const endpoint = type === "category" ? type : "groups";
|
|
127
|
+
return API$V.get(`/${endpoint}/names`);
|
|
87
128
|
},
|
|
88
|
-
getCodes: (
|
|
89
|
-
const
|
|
90
|
-
return
|
|
129
|
+
getCodes: (type) => {
|
|
130
|
+
const endpoint = type === "category" ? type : "groups";
|
|
131
|
+
return API$V.get(`/${endpoint}/codes`);
|
|
91
132
|
},
|
|
92
|
-
postCreateGroupCategory: (
|
|
93
|
-
const
|
|
94
|
-
return
|
|
133
|
+
postCreateGroupCategory: (type, body) => {
|
|
134
|
+
const endpoint = type === "category" ? type : "groups";
|
|
135
|
+
return API$V.post(`/${endpoint}`, body);
|
|
95
136
|
},
|
|
96
|
-
putEditGroupCategory: (
|
|
97
|
-
const
|
|
98
|
-
return
|
|
137
|
+
putEditGroupCategory: (type, body, objectId) => {
|
|
138
|
+
const endpoint = type === "category" ? type : "groups";
|
|
139
|
+
return API$V.put(`/${endpoint}/${objectId}`, body);
|
|
99
140
|
},
|
|
100
|
-
deleteGroupCategory: (
|
|
101
|
-
const
|
|
102
|
-
return
|
|
141
|
+
deleteGroupCategory: (type, body, objectId) => {
|
|
142
|
+
const endpoint = type === "category" ? type : "groups";
|
|
143
|
+
return API$V.delete(`/${endpoint}/${objectId}`, { data: body });
|
|
103
144
|
}
|
|
104
|
-
}
|
|
145
|
+
};
|
|
146
|
+
const API$U = createAxiosInstance({
|
|
105
147
|
prefix: "/v2",
|
|
106
148
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
|
|
149
|
+
});
|
|
150
|
+
const NotificationApprovalServices = {
|
|
151
|
+
getTotalApprovals: () => {
|
|
152
|
+
return API$U.get("/approval/count");
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
const API$T = createAxiosInstance({
|
|
110
156
|
prefix: "/v2",
|
|
111
157
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
158
|
+
});
|
|
159
|
+
const ChangelogServices$1 = {
|
|
160
|
+
getActionLog: (params) => {
|
|
161
|
+
return API$T.get("/change-log", { params });
|
|
162
|
+
},
|
|
163
|
+
getActionLogOption: (params) => {
|
|
164
|
+
return API$T.get("/change-log/options", { params });
|
|
165
|
+
},
|
|
166
|
+
getSessionLogList: (params) => {
|
|
167
|
+
return API$T.get("/session-log", { params });
|
|
168
|
+
},
|
|
169
|
+
getUserDetailSystemLogList: (params) => {
|
|
170
|
+
return API$T.get("/change-log", { params });
|
|
171
|
+
},
|
|
172
|
+
getUserDetailSystemLogOption: (params) => {
|
|
173
|
+
return API$T.get("/change-log/options", { params });
|
|
174
|
+
},
|
|
118
175
|
/**
|
|
119
176
|
* Retrieves the transaction log.
|
|
120
177
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
121
178
|
*/
|
|
122
|
-
getTransactionLog: (
|
|
179
|
+
getTransactionLog: (params) => {
|
|
180
|
+
return API$T.get("/transaction-log", { params });
|
|
181
|
+
},
|
|
123
182
|
/**
|
|
124
183
|
* Retrieves the transaction log options.
|
|
125
184
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
126
185
|
*/
|
|
127
|
-
getTransactionLogOption: (
|
|
128
|
-
|
|
129
|
-
},
|
|
186
|
+
getTransactionLogOption: (params) => {
|
|
187
|
+
return API$T.get("/transaction-log/options", { params });
|
|
188
|
+
},
|
|
189
|
+
postScanLog: (body) => {
|
|
190
|
+
return API$T.post("/transaction-log/scan-log", body);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const API$S = createAxiosInstance({
|
|
130
194
|
prefix: "/utility/v2"
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
195
|
+
});
|
|
196
|
+
const ChangelogServices = {
|
|
197
|
+
getActionLog: (params) => {
|
|
198
|
+
return API$S.get("/change-log", { params });
|
|
199
|
+
},
|
|
200
|
+
getActionLogOption: (params) => {
|
|
201
|
+
return API$S.get("/change-log/options", { params });
|
|
202
|
+
},
|
|
203
|
+
getSessionLogList: (params) => {
|
|
204
|
+
return API$S.get("/session-log", { params });
|
|
205
|
+
},
|
|
206
|
+
getTransactionLog: (params) => {
|
|
207
|
+
return API$S.get("/transaction-log", { params });
|
|
208
|
+
},
|
|
136
209
|
/**
|
|
137
210
|
* Retrieves the transaction log options.
|
|
138
211
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
139
212
|
*/
|
|
140
|
-
getTransactionLogOption: (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
213
|
+
getTransactionLogOption: (params) => {
|
|
214
|
+
return API$S.get("/transaction-log/options", { params });
|
|
215
|
+
},
|
|
216
|
+
getUserDetailSystemLogList: (params) => {
|
|
217
|
+
return API$S.get("/change-log", { params });
|
|
218
|
+
},
|
|
219
|
+
getUserDetailSystemLogOption: (params) => {
|
|
220
|
+
return API$S.get("/change-log/options", { params });
|
|
221
|
+
},
|
|
222
|
+
getUserDetailUserLogBorrowingList: (userId, params) => {
|
|
223
|
+
return API$S.get(`/borrowing-log/${userId}`, { params });
|
|
224
|
+
},
|
|
225
|
+
getUserDetailUserLogAssignmentList: (userId, params) => {
|
|
226
|
+
return API$S.get(`/assignment-log/${userId}`, { params });
|
|
227
|
+
},
|
|
228
|
+
getUserDetailUserLogBorrowingOption: (userId, params) => {
|
|
229
|
+
return API$S.get(`/borrowing-log/${userId}/options`, { params });
|
|
230
|
+
},
|
|
231
|
+
getUserDetailUserLogAssignmentOption: (userId, params) => {
|
|
232
|
+
return API$S.get(`/assignment-log/${userId}/options`, { params });
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
const AssetsAPIs$1 = createAxiosInstance({
|
|
148
236
|
prefix: "/assets/v2/assets"
|
|
149
|
-
})
|
|
237
|
+
});
|
|
238
|
+
const AttachmentAPIs = createAxiosInstance({
|
|
150
239
|
prefix: "/assets/v2/attachment"
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
params
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
240
|
+
});
|
|
241
|
+
const AssetServices$1 = {
|
|
242
|
+
getScanTag: (tag) => {
|
|
243
|
+
return AssetsAPIs$1.get("/scan", { params: { tag } });
|
|
244
|
+
},
|
|
245
|
+
getAllAssets: (params) => {
|
|
246
|
+
return AssetsAPIs$1.get("/", { params });
|
|
247
|
+
},
|
|
248
|
+
getAllAssetsOptions: (params) => {
|
|
249
|
+
return AssetsAPIs$1.get("/options", { params });
|
|
250
|
+
},
|
|
251
|
+
getAvailableAssets: (params) => {
|
|
252
|
+
return AssetsAPIs$1.get("/available", { params });
|
|
253
|
+
},
|
|
254
|
+
getAvailableAssetOptions: (params) => {
|
|
255
|
+
return AssetsAPIs$1.get("/available/options", { params });
|
|
256
|
+
},
|
|
257
|
+
scanAsset: (tag) => {
|
|
258
|
+
return AssetsAPIs$1.get("", { params: { tag } });
|
|
259
|
+
},
|
|
260
|
+
getAssetsById: (_id, params) => {
|
|
261
|
+
return AssetsAPIs$1.get("/by-id", { params: { _id, ...params } });
|
|
262
|
+
},
|
|
263
|
+
getOptions: (endpoint, params) => {
|
|
264
|
+
return AssetsAPIs$1.get(endpoint ? `/${endpoint}/options` : "/options", {
|
|
265
|
+
params
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
getUnlinkedAssets: (params) => {
|
|
269
|
+
return AssetsAPIs$1.get("/unlinked", { params });
|
|
270
|
+
},
|
|
271
|
+
getAssetDetail: (id, params) => {
|
|
272
|
+
return AssetsAPIs$1.get(`/${id}`, { params });
|
|
273
|
+
},
|
|
274
|
+
getAssetNameTotal: (assetNameId) => {
|
|
275
|
+
return AssetsAPIs$1.get(`/name-amount/${assetNameId}`);
|
|
276
|
+
},
|
|
277
|
+
getLinkedAssetFamily: (id) => {
|
|
278
|
+
return AssetsAPIs$1.get("/family", { params: { id } });
|
|
279
|
+
},
|
|
280
|
+
matchAssetWithTag: (id, tag) => {
|
|
281
|
+
const params = {
|
|
282
|
+
_id: JSON.stringify([id]),
|
|
283
|
+
tag
|
|
170
284
|
};
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
postRegisterAsset: (
|
|
174
|
-
const
|
|
175
|
-
return
|
|
176
|
-
},
|
|
177
|
-
putEditAsset: (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
180
|
-
},
|
|
181
|
-
putEditDetailCustomField: (
|
|
182
|
-
const
|
|
183
|
-
return
|
|
184
|
-
},
|
|
185
|
-
getLinkedAsset: (
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
285
|
+
return AssetsAPIs$1.get("/by-id", { params });
|
|
286
|
+
},
|
|
287
|
+
postRegisterAsset: (body) => {
|
|
288
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
289
|
+
return AssetsAPIs$1.post("/bulk", body, { headers });
|
|
290
|
+
},
|
|
291
|
+
putEditAsset: (id, body) => {
|
|
292
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
293
|
+
return AssetsAPIs$1.put(`/${id}`, body, { headers });
|
|
294
|
+
},
|
|
295
|
+
putEditDetailCustomField: (id, body) => {
|
|
296
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
297
|
+
return AssetsAPIs$1.put(`/${id}`, body, { headers });
|
|
298
|
+
},
|
|
299
|
+
getLinkedAsset: (assetId, params) => {
|
|
300
|
+
return AssetsAPIs$1.get(`/${assetId}/linked`, { params });
|
|
301
|
+
},
|
|
302
|
+
getPurchase: (assetId) => {
|
|
303
|
+
return AssetsAPIs$1.get(`/${assetId}/purchase`);
|
|
304
|
+
},
|
|
305
|
+
putPurchase: (body, assetId) => {
|
|
306
|
+
return AssetsAPIs$1.put(`/${assetId}/purchase`, body);
|
|
307
|
+
},
|
|
308
|
+
getAccounting: (assetId, params) => {
|
|
309
|
+
return AssetsAPIs$1.get(`/${assetId}/accounting`, { params });
|
|
310
|
+
},
|
|
311
|
+
getAssetFamily: (parentId) => {
|
|
312
|
+
return AssetsAPIs$1.get(`/${parentId}/family`);
|
|
313
|
+
},
|
|
314
|
+
getLinkedAssetOption: (parentId, params) => {
|
|
315
|
+
return AssetsAPIs$1.get(`/${parentId}/linked/options`, { params });
|
|
316
|
+
},
|
|
317
|
+
putLinkAsset: (body, parentId) => {
|
|
318
|
+
return AssetsAPIs$1.put(`/${parentId}/link-assets`, body);
|
|
319
|
+
},
|
|
320
|
+
putUnlinkAsset: (body, parentId) => {
|
|
321
|
+
return AssetsAPIs$1.put(`/${parentId}/remove-link-assets`, body);
|
|
322
|
+
},
|
|
193
323
|
// Asset Services prefixed by "attachment"
|
|
194
|
-
getAttachment: (
|
|
195
|
-
|
|
196
|
-
const e = { "Content-Type": "multipart/form-data" };
|
|
197
|
-
return K.post("", t, { headers: e });
|
|
324
|
+
getAttachment: (params) => {
|
|
325
|
+
return AttachmentAPIs.get("", { params });
|
|
198
326
|
},
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
return
|
|
327
|
+
postAttachment: (body) => {
|
|
328
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
329
|
+
return AttachmentAPIs.post("", body, { headers });
|
|
330
|
+
},
|
|
331
|
+
putAttachment: (body, id) => {
|
|
332
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
333
|
+
return AttachmentAPIs.put(`/${id}`, body, { headers });
|
|
202
334
|
},
|
|
203
335
|
/**
|
|
204
336
|
* Deletes the attachment with the given IDs.
|
|
205
337
|
* @param {object} params - The request params containing the IDs of the attachments to delete.
|
|
206
338
|
* @returns {Promise<AxiosResponse>}
|
|
207
339
|
*/
|
|
208
|
-
deleteAttachment: (
|
|
209
|
-
|
|
340
|
+
deleteAttachment: (params) => {
|
|
341
|
+
return AttachmentAPIs.delete("/bulk", { params });
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const AssetsAPIs = createAxiosInstance({
|
|
210
345
|
prefix: "/assets-go/v2/assets"
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
346
|
+
});
|
|
347
|
+
const AssetServices = {
|
|
348
|
+
getAllAssets: (params) => {
|
|
349
|
+
return AssetsAPIs.get("/", { params });
|
|
350
|
+
},
|
|
351
|
+
getAllAssetsOptions: (params) => {
|
|
352
|
+
return AssetsAPIs.get("/options", { params });
|
|
353
|
+
},
|
|
354
|
+
getOptions: (endpoint, params) => {
|
|
355
|
+
return AssetsAPIs.get(endpoint ? `/${endpoint}/options` : "/options", {
|
|
356
|
+
params
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
getUnlinkedAssets: (params) => {
|
|
360
|
+
return AssetsAPIs.get("/unlinked", { params });
|
|
361
|
+
},
|
|
362
|
+
getAssetDetail: (id, params) => {
|
|
363
|
+
return AssetsAPIs.get(`/${id}`, { params });
|
|
364
|
+
},
|
|
365
|
+
getAssetNameTotal: () => {
|
|
366
|
+
return AssetsAPIs.get("/name-amount");
|
|
367
|
+
},
|
|
368
|
+
postRegisterAsset: (body) => {
|
|
369
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
370
|
+
return AssetsAPIs.post("", body, { headers });
|
|
371
|
+
},
|
|
372
|
+
putEditAsset: (id, body) => {
|
|
373
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
374
|
+
return AssetsAPIs.put(`/${id}`, body, { headers });
|
|
375
|
+
},
|
|
376
|
+
putEditDetailCustomField: (id, body) => {
|
|
377
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
378
|
+
return AssetsAPIs.put(`/${id}`, body, { headers });
|
|
379
|
+
},
|
|
380
|
+
getLinkedAsset: (assetId, params) => {
|
|
381
|
+
return AssetsAPIs.get(`/${assetId}/linked-assets`, { params });
|
|
382
|
+
},
|
|
383
|
+
getPurchase: (assetId) => {
|
|
384
|
+
return AssetsAPIs.get(`/${assetId}/purchase`);
|
|
385
|
+
},
|
|
386
|
+
putPurchase: (body, assetId) => {
|
|
387
|
+
return AssetsAPIs.put(`/${assetId}/purchase`, body);
|
|
388
|
+
},
|
|
389
|
+
getAccounting: (assetId, params) => {
|
|
390
|
+
return AssetsAPIs.get(`/${assetId}/accounting`, { params });
|
|
391
|
+
},
|
|
392
|
+
getLinkedAssetOption: (parentId, params) => {
|
|
393
|
+
return AssetsAPIs.get(`/${parentId}/linked-assets/options`, { params });
|
|
394
|
+
},
|
|
395
|
+
putLinkAsset: (body, parentId) => {
|
|
396
|
+
return AssetsAPIs.put(`/${parentId}/linked-assets`, body);
|
|
397
|
+
},
|
|
398
|
+
putUnlinkAsset: (body, parentId) => {
|
|
399
|
+
return AssetsAPIs.put(`/${parentId}/unlink-assets`, body);
|
|
400
|
+
},
|
|
401
|
+
putEditUsefulLife: (body) => {
|
|
402
|
+
return AssetsAPIs.put("/useful-life", body);
|
|
403
|
+
},
|
|
404
|
+
getAttachment: (assetId, params) => {
|
|
405
|
+
return AssetsAPIs.get(`/attachment/${assetId}`, { params });
|
|
406
|
+
},
|
|
407
|
+
postAttachment: (body, assetId) => {
|
|
408
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
409
|
+
return AssetsAPIs.post(`/attachment/${assetId}`, body, { headers });
|
|
410
|
+
},
|
|
411
|
+
putAttachment: (body, id) => {
|
|
412
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
413
|
+
return AssetsAPIs.put(`/attachment/${id}`, body, { headers });
|
|
248
414
|
},
|
|
249
415
|
/**
|
|
250
416
|
* Deletes the attachment with the given IDs.
|
|
251
417
|
* @param {object} params - The request params containing the IDs of the attachments to delete.
|
|
252
418
|
* @returns {Promise<AxiosResponse>}
|
|
253
419
|
*/
|
|
254
|
-
deleteAttachment: (
|
|
255
|
-
|
|
420
|
+
deleteAttachment: (params) => {
|
|
421
|
+
return AssetsAPIs.delete("/attachment/bulk", { params });
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
const API$R = createAxiosInstance({
|
|
256
425
|
prefix: "/tracking/v2/missing"
|
|
257
|
-
})
|
|
426
|
+
});
|
|
427
|
+
const MissingServices$2 = {
|
|
258
428
|
/**
|
|
259
429
|
* To mark as found.
|
|
260
430
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
261
431
|
*/
|
|
262
|
-
putMarkAsFound: (
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
},
|
|
432
|
+
putMarkAsFound: (body) => {
|
|
433
|
+
return API$R.put("/found", body);
|
|
434
|
+
},
|
|
435
|
+
putReportMissing: (id, body) => {
|
|
436
|
+
return API$R.put(`/report-missing/${id}`, body);
|
|
437
|
+
},
|
|
438
|
+
getData: (params) => {
|
|
439
|
+
return API$R.get("/", { params });
|
|
440
|
+
},
|
|
441
|
+
getDetail: (id) => {
|
|
442
|
+
return API$R.get(`/${id}`);
|
|
443
|
+
},
|
|
444
|
+
getOptions: (params) => {
|
|
445
|
+
return API$R.get("/options", { params });
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
const API$Q = createAxiosInstance({
|
|
268
449
|
prefix: "/missing-tracking/v2"
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
450
|
+
});
|
|
451
|
+
const MissingServices$1 = {
|
|
452
|
+
putFoundAsset: (body) => {
|
|
453
|
+
return API$Q.put("/found", body);
|
|
454
|
+
},
|
|
455
|
+
putReportMissing: (id, body) => {
|
|
456
|
+
return API$Q.put(`/${id}/report-missing`, body);
|
|
457
|
+
},
|
|
458
|
+
getData: (params) => {
|
|
459
|
+
return API$Q.get("/", { params });
|
|
460
|
+
},
|
|
461
|
+
getDataOptions: (params) => {
|
|
462
|
+
return API$Q.get("/options", { params });
|
|
463
|
+
},
|
|
464
|
+
getDetail: (id) => {
|
|
465
|
+
return API$Q.get(`/${id}`);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
const API$P = createAxiosInstance({
|
|
276
469
|
prefix: "/v2/notification",
|
|
277
470
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
471
|
+
});
|
|
472
|
+
const NotificationServices$1 = {
|
|
473
|
+
getNotifications: (params) => {
|
|
474
|
+
return API$P.get("/", { params });
|
|
475
|
+
},
|
|
476
|
+
readNotification: (id) => {
|
|
477
|
+
return API$P.put(`/${id}`);
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
const API$O = createAxiosInstance({
|
|
282
481
|
prefix: "/utility/v2/notification"
|
|
283
|
-
})
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
482
|
+
});
|
|
483
|
+
const NotificationServices = {
|
|
484
|
+
getNotifications: (params) => {
|
|
485
|
+
return API$O.get("/", { params });
|
|
486
|
+
},
|
|
487
|
+
readNotification: (id) => {
|
|
488
|
+
return API$O.put(`/${id}`);
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
const API$N = createAxiosInstance({
|
|
287
492
|
prefix: "/v2/session-log",
|
|
288
493
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
|
|
494
|
+
});
|
|
495
|
+
const SessionLogServices = {
|
|
496
|
+
postLogout: () => {
|
|
497
|
+
return API$N.post("/logout");
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
const API$M = createAxiosInstance({
|
|
292
501
|
prefix: "/tag/v2"
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
502
|
+
});
|
|
503
|
+
const TAGServices = {
|
|
504
|
+
getScanQR: (tag) => {
|
|
505
|
+
return API$M.get("/qr", { params: { tag } });
|
|
506
|
+
},
|
|
507
|
+
getScanRFID: (tag) => {
|
|
508
|
+
return API$M.get("/rfid", { params: { tag } });
|
|
509
|
+
},
|
|
510
|
+
getRFIDQRTAG: (params) => {
|
|
511
|
+
return API$M.get("/rfid-qr/scan", { params });
|
|
512
|
+
},
|
|
513
|
+
getEventLog: (params) => {
|
|
514
|
+
return API$M.get("/tag-transaction/event-log", { params });
|
|
515
|
+
},
|
|
298
516
|
// Tab All
|
|
299
|
-
getRfidQrAll: (
|
|
517
|
+
getRfidQrAll: (path, params) => {
|
|
518
|
+
return API$M.get(`/${path}`, { params });
|
|
519
|
+
},
|
|
300
520
|
// Tab Paired
|
|
301
|
-
getRfidQrPaired: (
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
521
|
+
getRfidQrPaired: (tagType, viewBy, params) => {
|
|
522
|
+
return API$M.get(`/${tagType}/paired/${viewBy}`, { params });
|
|
523
|
+
},
|
|
524
|
+
postAddTAGtoPrelist: (body, destination) => {
|
|
525
|
+
return API$M.post(`/prelist/${destination}/asset-name`, body);
|
|
526
|
+
},
|
|
527
|
+
postAddTAGtoReplacePrelist: (body) => {
|
|
528
|
+
return API$M.post("/prelist/replace-tag", body);
|
|
529
|
+
},
|
|
530
|
+
postAddTAGToPrelistUnpair: (body) => {
|
|
531
|
+
return API$M.post("/prelist/unpair-tag", body);
|
|
532
|
+
},
|
|
533
|
+
postAddTAGtoPending: (body) => {
|
|
534
|
+
return API$M.post("/pending-changes", body);
|
|
535
|
+
},
|
|
306
536
|
// Available Tab
|
|
307
|
-
getRFIDQrAvailable: (
|
|
537
|
+
getRFIDQrAvailable: (tagType, params) => {
|
|
538
|
+
return API$M.get(`/${tagType}/available`, { params });
|
|
539
|
+
},
|
|
308
540
|
// Damaged TAB
|
|
309
|
-
getRFIDQrDamaged: (
|
|
541
|
+
getRFIDQrDamaged: (tagType, params) => {
|
|
542
|
+
return API$M.get(`/${tagType}/damaged`, { params });
|
|
543
|
+
},
|
|
310
544
|
// RFID and QR Module
|
|
311
|
-
getRFIDandQRList: (
|
|
312
|
-
|
|
313
|
-
|
|
545
|
+
getRFIDandQRList: (params) => {
|
|
546
|
+
return API$M.get("/rfid-qr", { params });
|
|
547
|
+
},
|
|
548
|
+
deleteUnpairTAG: (body) => {
|
|
549
|
+
return API$M.delete("/rfid-qr", { data: { data: body } });
|
|
550
|
+
},
|
|
551
|
+
postPairTAG: (body) => {
|
|
552
|
+
return API$M.post("/rfid-qr", { body: { data: body } });
|
|
553
|
+
},
|
|
314
554
|
// RFID To Be Returned
|
|
315
|
-
getToBeReturnedTAGList: (
|
|
555
|
+
getToBeReturnedTAGList: (params) => {
|
|
556
|
+
return API$M.get("/rfid/to-be-returned", { params });
|
|
557
|
+
},
|
|
316
558
|
// Handover TAG
|
|
317
|
-
putHandoverTAG: (
|
|
559
|
+
putHandoverTAG: (body) => {
|
|
560
|
+
return API$M.put("/rfid/handover", { body: { data: body } });
|
|
561
|
+
},
|
|
318
562
|
// Table Filter
|
|
319
|
-
getFilterOptions: (
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
563
|
+
getFilterOptions: (path, params) => {
|
|
564
|
+
return API$M.get(`/${path}/options`, { params });
|
|
565
|
+
},
|
|
566
|
+
getHolderListOptions: (params) => {
|
|
567
|
+
return API$M.get("/rfid/holder-list/options", { params });
|
|
568
|
+
},
|
|
569
|
+
getHolderList: (params) => {
|
|
570
|
+
return API$M.get("/rfid/holder-list", { params });
|
|
571
|
+
},
|
|
572
|
+
putAuditTAG: (body, tagType) => {
|
|
573
|
+
return API$M.put(`/${tagType}/audit`, body);
|
|
574
|
+
},
|
|
575
|
+
postLogAudit: (body) => {
|
|
576
|
+
return API$M.post("/tag-transaction/log-audit", body);
|
|
577
|
+
},
|
|
578
|
+
postCreateQr: (amount) => {
|
|
579
|
+
const body = { amount };
|
|
580
|
+
return API$M.post("/qr", body);
|
|
581
|
+
},
|
|
582
|
+
putReportTAG: (id, body) => {
|
|
583
|
+
return API$M.put(`/tag-transaction/report/${id}`, body);
|
|
584
|
+
},
|
|
585
|
+
putReportTAGBulk: (body) => {
|
|
586
|
+
return API$M.put("/tag-transaction/report/bulk", body);
|
|
587
|
+
},
|
|
588
|
+
putDeclineReport: (body, tagType) => {
|
|
589
|
+
return API$M.put(`/report/decline-report/${tagType}`, body);
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
const API$L = createAxiosInstance({
|
|
332
593
|
prefix: "/tracking/v2/tracking"
|
|
333
|
-
})
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
594
|
+
});
|
|
595
|
+
const MissingServices = {
|
|
596
|
+
getTrackingDetail: (trackingId) => {
|
|
597
|
+
return API$L.get(`/${trackingId}`);
|
|
598
|
+
},
|
|
599
|
+
putFoundAsset: (tag, groupId, serialNumber) => {
|
|
600
|
+
const params = {
|
|
601
|
+
tag,
|
|
602
|
+
group: groupId,
|
|
603
|
+
serialNumber,
|
|
340
604
|
type: "Global"
|
|
341
605
|
};
|
|
342
|
-
return
|
|
606
|
+
return API$L.put("/scan", void 0, { params });
|
|
607
|
+
},
|
|
608
|
+
putReportPermanentlyMissing: (trackingId, body) => {
|
|
609
|
+
return API$L.put(`/report-permanently-missing/${trackingId}`, body);
|
|
343
610
|
},
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
611
|
+
putMoveBack: (body) => {
|
|
612
|
+
return API$L.put("/tracking/move-back", body);
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
const API$K = createAxiosInstance({
|
|
347
616
|
prefix: "/settings-user-role/v2"
|
|
348
|
-
})
|
|
349
|
-
|
|
350
|
-
|
|
617
|
+
});
|
|
618
|
+
const UserServices$1 = {
|
|
619
|
+
reLogin: (body) => {
|
|
620
|
+
return API$K.post("/auth/login", body);
|
|
621
|
+
},
|
|
622
|
+
changePassword: (body) => {
|
|
623
|
+
return API$K.put("/users/change-password", body);
|
|
624
|
+
},
|
|
351
625
|
/**
|
|
352
626
|
* Retrieves the user list as dropdown options.
|
|
353
627
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
354
628
|
*/
|
|
355
|
-
getUserDropdown: (
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
629
|
+
getUserDropdown: (params) => {
|
|
630
|
+
return API$K.get("/users/dropdown", { params });
|
|
631
|
+
},
|
|
632
|
+
getUserOptions: (params) => {
|
|
633
|
+
return API$K.get("/users/options", { params });
|
|
634
|
+
},
|
|
635
|
+
getUserList: (params) => {
|
|
636
|
+
return API$K.get("/users", { params });
|
|
637
|
+
},
|
|
638
|
+
getUserDetail: (id) => {
|
|
639
|
+
return API$K.get(`/users/${id}`);
|
|
640
|
+
},
|
|
641
|
+
putSetActiveBulk: (data) => {
|
|
642
|
+
return API$K.put("/users/set-active-bulk", data);
|
|
643
|
+
},
|
|
360
644
|
// User Detail
|
|
361
645
|
/**
|
|
362
646
|
*
|
|
@@ -364,48 +648,94 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
364
648
|
* @param type {"Global" | "Group"} Whether the system role's type is global or group
|
|
365
649
|
* @param params {Record<string, unknown>}
|
|
366
650
|
*/
|
|
367
|
-
getUserDetailSystemRoles: (
|
|
368
|
-
const
|
|
369
|
-
return
|
|
370
|
-
params
|
|
651
|
+
getUserDetailSystemRoles: (id, params, permissionType) => {
|
|
652
|
+
const additionalPath = permissionType ? `/${permissionType}` : "";
|
|
653
|
+
return API$K.get(`/user-detail/${id}/system-roles${additionalPath}`, {
|
|
654
|
+
params
|
|
371
655
|
});
|
|
372
656
|
},
|
|
373
|
-
getUserDetailTransactionRoleList: (
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
657
|
+
getUserDetailTransactionRoleList: (id, params) => {
|
|
658
|
+
return API$K.get(`/user-detail/${id}/transaction-role-list`, { params });
|
|
659
|
+
},
|
|
660
|
+
postUserDetailAddTransactionRole: (userId, data) => {
|
|
661
|
+
return API$K.post(`/user-detail/${userId}/add-transaction-role`, data);
|
|
662
|
+
},
|
|
663
|
+
deleteUserDetailTransactionRole: (userId, data) => {
|
|
664
|
+
return API$K.delete(`/user-detail/${userId}/delete-transaction-role`, {
|
|
665
|
+
data
|
|
666
|
+
});
|
|
667
|
+
},
|
|
668
|
+
putUserDetailEditTransactionRole: (userId, data) => {
|
|
669
|
+
return API$K.put(`/user-detail/${userId}/edit-transaction-role`, data);
|
|
670
|
+
},
|
|
671
|
+
putAssignGroup: (data, permissionType, id) => {
|
|
672
|
+
return API$K.put(`/user-detail/${id}/system-roles/${permissionType}`, data);
|
|
673
|
+
},
|
|
674
|
+
getUserDetailUserLogBorrowingList: (userId, params) => {
|
|
675
|
+
return API$K.get(`/users-log/${userId}/borrowing`, { params });
|
|
676
|
+
},
|
|
677
|
+
getUserDetailUserLogAssignmentList: (userId, params) => {
|
|
678
|
+
return API$K.get(`/users-log/${userId}/assignment`, { params });
|
|
679
|
+
},
|
|
680
|
+
getUserDetailUserLogBorrowingOption: (userId, params) => {
|
|
681
|
+
return API$K.get(`/users-log/${userId}/borrowing/option`, { params });
|
|
682
|
+
},
|
|
683
|
+
getUserDetailUserLogAssignmentOption: (userId, params) => {
|
|
684
|
+
return API$K.get(`/users-log/${userId}/assignment/option`, { params });
|
|
685
|
+
},
|
|
686
|
+
getUserDetailTransactionAdminLogList: (userId, params) => {
|
|
687
|
+
return API$K.get(`/users-log/${userId}/transaction-log`, { params });
|
|
688
|
+
},
|
|
689
|
+
getUserDetailTransactionAdminLogOption: (userId, params) => {
|
|
690
|
+
return API$K.get(`/users-log/${userId}/transaction-log/option`, { params });
|
|
691
|
+
},
|
|
692
|
+
getUserDetailUserAssetBorrowedList: (userId, params) => {
|
|
693
|
+
return API$K.get(`/user-detail/${userId}/assets/borrowed`, { params });
|
|
694
|
+
},
|
|
695
|
+
getUserDetailUserAssetAssignedList: (userId, params) => {
|
|
696
|
+
return API$K.get(`/user-detail/${userId}/assets/assigned`, { params });
|
|
697
|
+
},
|
|
698
|
+
getUserDetailUserAssetBorrowedOption: (userId, params) => {
|
|
699
|
+
return API$K.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
|
|
700
|
+
},
|
|
701
|
+
getUserDetailUserAssetAssignedOption: (userId, params) => {
|
|
702
|
+
return API$K.get(`/user-detail/${userId}/assets/assigned/option`, { params });
|
|
703
|
+
},
|
|
704
|
+
getUserAndSubUser: (params) => {
|
|
705
|
+
return API$K.get("/users/user-and-sub-user", { params });
|
|
706
|
+
},
|
|
707
|
+
getUserAndSubUserOptions: () => {
|
|
708
|
+
return API$K.get("/users/user-and-sub-user/options", {
|
|
709
|
+
params: {
|
|
710
|
+
divisionOptions: "true",
|
|
711
|
+
positionOptions: "true"
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
const API$J = createAxiosInstance({
|
|
398
717
|
prefix: "/settings-user-role-go/v2"
|
|
399
|
-
})
|
|
718
|
+
});
|
|
719
|
+
const UserServices = {
|
|
400
720
|
/**
|
|
401
721
|
* Retrieves the user list as dropdown options.
|
|
402
722
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
403
723
|
*/
|
|
404
|
-
getUserDropdown: (
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
724
|
+
getUserDropdown: (params) => {
|
|
725
|
+
return API$J.get("/users/dropdown", { params });
|
|
726
|
+
},
|
|
727
|
+
getUserOptions: (params) => {
|
|
728
|
+
return API$J.get("/users/options", { params });
|
|
729
|
+
},
|
|
730
|
+
getUserList: (params) => {
|
|
731
|
+
return API$J.get("/users", { params });
|
|
732
|
+
},
|
|
733
|
+
getUserDetail: (id) => {
|
|
734
|
+
return API$J.get(`/users/${id}`);
|
|
735
|
+
},
|
|
736
|
+
putSetActiveBulk: (data) => {
|
|
737
|
+
return API$J.put("/users/set-active-bulk", data);
|
|
738
|
+
},
|
|
409
739
|
// User Detail
|
|
410
740
|
/**
|
|
411
741
|
*
|
|
@@ -413,90 +743,150 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
413
743
|
* @param type {"Global" | "Group"} Whether the system role's type is global or group
|
|
414
744
|
* @param params {Record<string, unknown>}
|
|
415
745
|
*/
|
|
416
|
-
getUserDetailSystemRoles: (
|
|
417
|
-
const
|
|
418
|
-
return
|
|
419
|
-
params
|
|
746
|
+
getUserDetailSystemRoles: (id, params, permissionType) => {
|
|
747
|
+
const additionalPath = permissionType ? `/${permissionType}/groups` : "";
|
|
748
|
+
return API$J.get(`/users/${id}/system-roles${additionalPath}`, {
|
|
749
|
+
params
|
|
420
750
|
});
|
|
421
751
|
},
|
|
422
|
-
getUserDetailTransactionRoleList: (
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
752
|
+
getUserDetailTransactionRoleList: (id, params) => {
|
|
753
|
+
return API$J.get(`/users/${id}/transaction-roles`, { params });
|
|
754
|
+
},
|
|
755
|
+
postUserDetailAddTransactionRole: (userId, data) => {
|
|
756
|
+
return API$J.post(`/users/${userId}/add-transaction-role`, data);
|
|
757
|
+
},
|
|
758
|
+
deleteUserDetailTransactionRole: (userId, body) => {
|
|
759
|
+
return API$J.put(`/users/${userId}/delete-transaction-role`, body);
|
|
760
|
+
},
|
|
761
|
+
putUserDetailEditTransactionRole: (userId, data) => {
|
|
762
|
+
return API$J.put(`/users/${userId}/edit-transaction-role`, data);
|
|
763
|
+
},
|
|
764
|
+
putAssignGroup: (data, permissionType, id) => {
|
|
765
|
+
return API$J.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
|
|
766
|
+
},
|
|
767
|
+
putRoleSetActive: (body, userId) => {
|
|
768
|
+
return API$J.put(`/users/${userId}/system-roles/set-active-bulk`, body);
|
|
769
|
+
},
|
|
770
|
+
getUserDetailTransactionAdminLogList: (userId, params) => {
|
|
771
|
+
return API$J.get(`/users/${userId}/transaction-log`, { params });
|
|
772
|
+
},
|
|
773
|
+
getUserDetailTransactionAdminLogOption: (userId, params) => {
|
|
774
|
+
return API$J.get(`/users/${userId}/transaction-log/option`, { params });
|
|
775
|
+
},
|
|
776
|
+
getUserDetailUserAssetBorrowedList: (userId, params) => {
|
|
777
|
+
return API$J.get(`/users/${userId}/borrowed-asset`, { params });
|
|
778
|
+
},
|
|
779
|
+
getUserDetailUserAssetAssignedList: (userId, params) => {
|
|
780
|
+
return API$J.get(`/users/${userId}/assigned-asset`, { params });
|
|
781
|
+
},
|
|
782
|
+
getUserDetailUserAssetBorrowedOption: (userId, params) => {
|
|
783
|
+
return API$J.get(`/users/${userId}/borrowed-asset/option`, { params });
|
|
784
|
+
},
|
|
785
|
+
getUserDetailUserAssetAssignedOption: (userId, params) => {
|
|
786
|
+
return API$J.get(`/users/${userId}/assigned-asset/option`, { params });
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
const API$I = createAxiosInstance({
|
|
435
790
|
prefix: "/settings-user-role/v2/sub-users"
|
|
436
|
-
})
|
|
791
|
+
});
|
|
792
|
+
const SubUserServices$1 = {
|
|
437
793
|
// Sub User
|
|
438
|
-
getSubUserList: (
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
794
|
+
getSubUserList: (userId, params) => {
|
|
795
|
+
return API$I.get(`/${userId}`, { params });
|
|
796
|
+
},
|
|
797
|
+
getSubUserOptions: (userId, params) => {
|
|
798
|
+
return API$I.get(`/${userId}/option`, { params });
|
|
799
|
+
},
|
|
800
|
+
postCreateSubUser: (userId, data) => {
|
|
801
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
802
|
+
return API$I.post(`/${userId}`, data, { headers });
|
|
803
|
+
},
|
|
804
|
+
putSubUserSetActiveBulk: (data) => {
|
|
805
|
+
return API$I.put("/set-active-bulk", data);
|
|
806
|
+
},
|
|
807
|
+
deleteSubUser: (subUserIds) => {
|
|
808
|
+
return API$I.delete("/bulk", { data: { subUserIds } });
|
|
809
|
+
},
|
|
810
|
+
putEditSubUser: (userId, data) => {
|
|
811
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
812
|
+
return API$I.put(`/${userId}`, data, { headers });
|
|
813
|
+
},
|
|
814
|
+
getBorrowedAsset: (id, params) => {
|
|
815
|
+
return API$I.get(`/${id}/borrowed-asset`, { params });
|
|
816
|
+
},
|
|
817
|
+
getBorrowedAssetOptions: (id, params) => {
|
|
818
|
+
return API$I.get(`/${id}/borrowed-asset/options`, { params });
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
const API$H = createAxiosInstance({
|
|
453
822
|
prefix: "/settings-user-role-go/v2/users"
|
|
454
|
-
})
|
|
823
|
+
});
|
|
824
|
+
const SubUserServices = {
|
|
455
825
|
// Sub User
|
|
456
|
-
getSubUserList: (
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
return
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
826
|
+
getSubUserList: (userId, params) => {
|
|
827
|
+
return API$H.get(`/${userId}/sub-users`, { params });
|
|
828
|
+
},
|
|
829
|
+
getSubUserOptions: (userId, params) => {
|
|
830
|
+
return API$H.get(`/${userId}/sub-users/option`, { params });
|
|
831
|
+
},
|
|
832
|
+
postCreateSubUser: (userId, data) => {
|
|
833
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
834
|
+
return API$H.post(`/${userId}/sub-users`, data, { headers });
|
|
835
|
+
},
|
|
836
|
+
putSubUserSetActiveBulk: (userId, data) => {
|
|
837
|
+
return API$H.put(`/${userId}/sub-users/set-active-bulk`, data);
|
|
838
|
+
},
|
|
839
|
+
deleteSubUser: (userId, subUserIds) => {
|
|
840
|
+
return API$H.put(`/${userId}/sub-users/bulk`, { subUserIds });
|
|
841
|
+
},
|
|
842
|
+
putEditSubUser: (userId, subUserId, data) => {
|
|
843
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
844
|
+
return API$H.put(`/${userId}/sub-users/${subUserId}`, data, {
|
|
845
|
+
headers
|
|
846
|
+
});
|
|
847
|
+
},
|
|
848
|
+
getBorrowedAsset: (userId, subUserId, params) => {
|
|
849
|
+
return API$H.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
|
|
850
|
+
params
|
|
851
|
+
});
|
|
852
|
+
},
|
|
853
|
+
getBorrowedAssetOptions: (userId, subUserId, params) => {
|
|
854
|
+
return API$H.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
|
|
855
|
+
params
|
|
856
|
+
});
|
|
857
|
+
},
|
|
858
|
+
getAssignedAsset: (userId, subUserId, params) => {
|
|
859
|
+
return API$H.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
|
|
860
|
+
params
|
|
468
861
|
});
|
|
469
862
|
},
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
params: r
|
|
478
|
-
}),
|
|
479
|
-
getAssignedAssetOptions: (t, e, r) => f.get(`/${t}/sub-users/${e}/assigned-asset/options`, {
|
|
480
|
-
params: r
|
|
481
|
-
})
|
|
482
|
-
}, Z = s({
|
|
863
|
+
getAssignedAssetOptions: (userId, subUserId, params) => {
|
|
864
|
+
return API$H.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
|
|
865
|
+
params
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
const API$G = createAxiosInstance({
|
|
483
870
|
env: "APP_ADMIN_API",
|
|
484
871
|
prefix: "/settings-attribute/languages"
|
|
485
|
-
})
|
|
872
|
+
});
|
|
873
|
+
const I18nService = {
|
|
486
874
|
/**
|
|
487
875
|
* Fetch all translation messages for a specific locale.
|
|
488
876
|
* @param locale The locale code (e.g., 'en', 'id').
|
|
489
877
|
* @returns A promise resolving to a key-value record of messages.
|
|
490
878
|
*/
|
|
491
|
-
getMessages: (
|
|
879
|
+
getMessages: (isoCode) => {
|
|
880
|
+
return API$G.get(`/${isoCode}/translations`);
|
|
881
|
+
},
|
|
492
882
|
/**
|
|
493
883
|
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
494
884
|
*
|
|
495
885
|
* @returns Promise Array of options
|
|
496
886
|
*/
|
|
497
887
|
getLanguageOptions: async () => {
|
|
498
|
-
const { data
|
|
499
|
-
return
|
|
888
|
+
const { data } = await API$G.get("/dropdown");
|
|
889
|
+
return data.data;
|
|
500
890
|
},
|
|
501
891
|
/**
|
|
502
892
|
* Fetch single lang option meta data
|
|
@@ -504,11 +894,11 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
504
894
|
* @param isoCode The locale code (e.g., 'en', 'id').
|
|
505
895
|
* @returns Promise LanguageMeta
|
|
506
896
|
*/
|
|
507
|
-
getLanguageOptionMeta: async (
|
|
508
|
-
const { data
|
|
509
|
-
"/dropdown/" +
|
|
897
|
+
getLanguageOptionMeta: async (isoCode) => {
|
|
898
|
+
const { data } = await API$G.get(
|
|
899
|
+
"/dropdown/" + isoCode
|
|
510
900
|
);
|
|
511
|
-
return
|
|
901
|
+
return data.data;
|
|
512
902
|
},
|
|
513
903
|
/**
|
|
514
904
|
* Translate a specific text to the target locale.
|
|
@@ -516,104 +906,217 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
516
906
|
* @param key Unique translation key.
|
|
517
907
|
* @param locale Target locale code.
|
|
518
908
|
*/
|
|
519
|
-
translateText: async (
|
|
520
|
-
const { data
|
|
521
|
-
q:
|
|
522
|
-
target:
|
|
909
|
+
translateText: async (key, locale) => {
|
|
910
|
+
const { data } = await API$G.post("/translate", {
|
|
911
|
+
q: key,
|
|
912
|
+
target: locale
|
|
523
913
|
});
|
|
524
|
-
return
|
|
914
|
+
return data.data.translations[key];
|
|
525
915
|
}
|
|
526
|
-
}
|
|
916
|
+
};
|
|
917
|
+
const API$F = createAxiosInstance({
|
|
527
918
|
prefix: "/dashboard/v2/dashboard"
|
|
528
|
-
})
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
919
|
+
});
|
|
920
|
+
const DashboardServices = {
|
|
921
|
+
getLatestTask: (params) => {
|
|
922
|
+
return API$F.get("/latest-task", { params });
|
|
923
|
+
},
|
|
924
|
+
getSummary: (params) => {
|
|
925
|
+
return API$F.get("/summary", { params });
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
const API$E = createAxiosInstance({
|
|
532
929
|
prefix: "/alias-code/api/alias-code"
|
|
533
|
-
})
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
},
|
|
930
|
+
});
|
|
931
|
+
const AliasCodeServices$1 = {
|
|
932
|
+
getAliasCode: () => {
|
|
933
|
+
return API$E.get("/");
|
|
934
|
+
},
|
|
935
|
+
postAliasCode: (data) => {
|
|
936
|
+
return API$E.post("/", data);
|
|
937
|
+
},
|
|
938
|
+
getAliasCodeList: (params) => {
|
|
939
|
+
return API$E.get(`/${params.object}/code-list`, { params });
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
const API$D = createAxiosInstance({
|
|
538
943
|
prefix: "/settings-attribute-go/v2/alias-code"
|
|
539
|
-
})
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
},
|
|
944
|
+
});
|
|
945
|
+
const AliasCodeServices = {
|
|
946
|
+
getAliasCode: () => {
|
|
947
|
+
return API$D.get("/");
|
|
948
|
+
},
|
|
949
|
+
postAliasCode: (data) => {
|
|
950
|
+
return API$D.post("/", data);
|
|
951
|
+
},
|
|
952
|
+
getAliasCodeList: (params) => {
|
|
953
|
+
return API$D.get(`/${params.object}/code-list`, { params });
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
const API$C = createAxiosInstance({
|
|
544
957
|
prefix: "/settings-attribute/v2/general-settings"
|
|
545
|
-
})
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
958
|
+
});
|
|
959
|
+
const GeneralSettingsServices$1 = {
|
|
960
|
+
getGeneralSettings: () => {
|
|
961
|
+
return API$C.get("/");
|
|
962
|
+
},
|
|
963
|
+
putUpdateGeneralSettings: (data) => {
|
|
964
|
+
return API$C.put("/", data);
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
const API$B = createAxiosInstance({
|
|
549
968
|
prefix: "/settings-attribute-go/v2/general-settings"
|
|
550
|
-
})
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
969
|
+
});
|
|
970
|
+
const GeneralSettingsServices = {
|
|
971
|
+
getGeneralSettings: () => {
|
|
972
|
+
return API$B.get("/");
|
|
973
|
+
},
|
|
974
|
+
putUpdateGeneralSettings: (data) => {
|
|
975
|
+
return API$B.put("/", data);
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
const API$A = createAxiosInstance({
|
|
554
979
|
prefix: "/settings-attribute/v2/custom-field"
|
|
555
|
-
})
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
980
|
+
});
|
|
981
|
+
const CustomFieldServices$1 = {
|
|
982
|
+
getCustomField: async (params) => {
|
|
983
|
+
return API$A.get("/", { params });
|
|
984
|
+
},
|
|
985
|
+
getCustomFieldsByCategory: (category, params) => {
|
|
986
|
+
return API$A.get(`/${category}`, { params });
|
|
987
|
+
},
|
|
988
|
+
getOptions: async (params) => {
|
|
989
|
+
return API$A.get("/options", { params });
|
|
990
|
+
},
|
|
991
|
+
postCreateCustomField: async (params, data) => {
|
|
992
|
+
return API$A.post("/", data, { params });
|
|
993
|
+
},
|
|
994
|
+
putEditCustomField: async (params, data, id) => {
|
|
995
|
+
return API$A.put(`/${id}`, data, { params });
|
|
996
|
+
},
|
|
997
|
+
putChangeStatus: async (params, data) => {
|
|
998
|
+
return API$A.put("/bulk", data, { params });
|
|
999
|
+
},
|
|
1000
|
+
deleteCustomField: async (data) => {
|
|
1001
|
+
return API$A.delete("/bulk", { data });
|
|
1002
|
+
},
|
|
1003
|
+
getUsedCustomFields: async () => {
|
|
1004
|
+
return API$A.get("/used-by-assets");
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
const API$z = createAxiosInstance({
|
|
565
1008
|
prefix: "/settings-attribute-go/v2/custom-field"
|
|
566
|
-
})
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
1009
|
+
});
|
|
1010
|
+
const CustomFieldServices = {
|
|
1011
|
+
getCustomField: async (params) => {
|
|
1012
|
+
return API$z.get("/", { params });
|
|
1013
|
+
},
|
|
1014
|
+
getCustomFieldsByCategory: (category, params) => {
|
|
1015
|
+
return API$z.get(`/${category}`, { params });
|
|
1016
|
+
},
|
|
1017
|
+
getOptions: async (params) => {
|
|
1018
|
+
return API$z.get("/options", { params });
|
|
1019
|
+
},
|
|
1020
|
+
postCreateCustomField: async (params, data) => {
|
|
1021
|
+
return API$z.post("/", data, { params });
|
|
1022
|
+
},
|
|
1023
|
+
putEditCustomField: async (params, data, id) => {
|
|
1024
|
+
return API$z.put(`/${id}`, data, { params });
|
|
1025
|
+
},
|
|
1026
|
+
putChangeStatus: async (params, data) => {
|
|
1027
|
+
return API$z.put("/bulk", data, { params });
|
|
1028
|
+
},
|
|
1029
|
+
deleteCustomField: async (params) => {
|
|
1030
|
+
return API$z.delete("/bulk", { params });
|
|
1031
|
+
},
|
|
1032
|
+
getUsedCustomFields: async () => {
|
|
1033
|
+
return API$z.get("/used-by-assets");
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
const API$y = ({ headers = {}, params = {} } = {}) => {
|
|
1037
|
+
const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
|
|
1038
|
+
const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
|
|
1039
|
+
const instance = axios.create({
|
|
1040
|
+
baseURL: `${BASE_URL}/v1`,
|
|
578
1041
|
headers: {
|
|
579
1042
|
"Content-type": "application/json",
|
|
580
|
-
"X-CSCAPI-KEY":
|
|
581
|
-
...
|
|
1043
|
+
"X-CSCAPI-KEY": API_KEY,
|
|
1044
|
+
...headers
|
|
582
1045
|
},
|
|
583
|
-
params
|
|
1046
|
+
params
|
|
584
1047
|
});
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
1048
|
+
return instance;
|
|
1049
|
+
};
|
|
1050
|
+
const CountryStateServices = {
|
|
1051
|
+
getCountry: () => {
|
|
1052
|
+
return API$y().get("/countries");
|
|
1053
|
+
},
|
|
1054
|
+
getState: (country) => {
|
|
1055
|
+
return API$y().get(`/countries/${country}/states`);
|
|
1056
|
+
},
|
|
1057
|
+
getCity: (country, state) => {
|
|
1058
|
+
return API$y().get(`/countries/${country}/states/${state}/cities`);
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
const API$x = createAxiosInstance({
|
|
590
1062
|
prefix: "/routine/v2"
|
|
591
|
-
})
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
1063
|
+
});
|
|
1064
|
+
const ServiceCenterServices = {
|
|
1065
|
+
getList: (params) => {
|
|
1066
|
+
return API$x.get("/service-center", { params });
|
|
1067
|
+
},
|
|
1068
|
+
postList: (body) => {
|
|
1069
|
+
return API$x.post("/service-center", body);
|
|
1070
|
+
},
|
|
1071
|
+
putList: (id, body) => {
|
|
1072
|
+
return API$x.put(`/service-center/${id}`, body);
|
|
1073
|
+
},
|
|
1074
|
+
putActivate: (body) => {
|
|
1075
|
+
return API$x.put("/service-center/bulk", body);
|
|
1076
|
+
},
|
|
1077
|
+
getDetailList: (id) => {
|
|
1078
|
+
return API$x.get(`/service-center/${id}`);
|
|
1079
|
+
},
|
|
1080
|
+
getListOptions: (params) => {
|
|
1081
|
+
return API$x.get("/service-center/options", { params });
|
|
1082
|
+
},
|
|
1083
|
+
deleteList: (params) => {
|
|
1084
|
+
return API$x.delete("/service-center", { params });
|
|
1085
|
+
},
|
|
599
1086
|
// Activities
|
|
600
|
-
getActivities: (
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
1087
|
+
getActivities: (params) => {
|
|
1088
|
+
return API$x.get("/service-activities", { params });
|
|
1089
|
+
},
|
|
1090
|
+
getActivityOptions: (params) => {
|
|
1091
|
+
return API$x.get("/service-activities/options", { params });
|
|
1092
|
+
},
|
|
1093
|
+
getActivityDetail: (id) => {
|
|
1094
|
+
return API$x.get(`/service-activities/${id}`);
|
|
1095
|
+
},
|
|
1096
|
+
getActivityLog: (id) => {
|
|
1097
|
+
return API$x.get(`/service-activities/${id}/activity-log`);
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
const API$w = createAxiosInstance({
|
|
605
1101
|
prefix: "/settings-attribute/v2/brands"
|
|
606
|
-
})
|
|
607
|
-
|
|
608
|
-
|
|
1102
|
+
});
|
|
1103
|
+
const BrandServices = {
|
|
1104
|
+
getDropdown: (params) => {
|
|
1105
|
+
return API$w.get("/dropdown", { params });
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
const API$v = createAxiosInstance({
|
|
609
1109
|
prefix: "/file-manager/v2"
|
|
610
|
-
})
|
|
1110
|
+
});
|
|
1111
|
+
const FileManagerServices$1 = {
|
|
611
1112
|
/**
|
|
612
1113
|
* Get storage information.
|
|
613
1114
|
*
|
|
614
1115
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
615
1116
|
*/
|
|
616
|
-
getStorageInformation: () =>
|
|
1117
|
+
getStorageInformation: () => {
|
|
1118
|
+
return API$v.get("/files/storage");
|
|
1119
|
+
},
|
|
617
1120
|
/**
|
|
618
1121
|
* Get file manager data.
|
|
619
1122
|
*
|
|
@@ -621,7 +1124,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
621
1124
|
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
622
1125
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
623
1126
|
*/
|
|
624
|
-
getFileManager: (
|
|
1127
|
+
getFileManager: (type, params) => {
|
|
1128
|
+
return API$v.get(`/${type}`, { params });
|
|
1129
|
+
},
|
|
625
1130
|
/**
|
|
626
1131
|
* Get file manager options.
|
|
627
1132
|
*
|
|
@@ -629,7 +1134,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
629
1134
|
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
630
1135
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
631
1136
|
*/
|
|
632
|
-
getFileManagerOption: (
|
|
1137
|
+
getFileManagerOption: (type, params) => {
|
|
1138
|
+
return API$v.get(`/${type}/options`, { params });
|
|
1139
|
+
},
|
|
633
1140
|
/**
|
|
634
1141
|
* Recover files.
|
|
635
1142
|
*
|
|
@@ -637,7 +1144,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
637
1144
|
* @param {object} body - The body of the request.
|
|
638
1145
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
639
1146
|
*/
|
|
640
|
-
recoverFiles: (
|
|
1147
|
+
recoverFiles: (type, body) => {
|
|
1148
|
+
return API$v.put(`/${type}/recover`, body);
|
|
1149
|
+
},
|
|
641
1150
|
/**
|
|
642
1151
|
* Delete files.
|
|
643
1152
|
*
|
|
@@ -645,7 +1154,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
645
1154
|
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
646
1155
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
647
1156
|
*/
|
|
648
|
-
deleteFiles: (
|
|
1157
|
+
deleteFiles: (type, params) => {
|
|
1158
|
+
return API$v.delete(`/${type}`, { params });
|
|
1159
|
+
},
|
|
649
1160
|
/**
|
|
650
1161
|
* Delete files permanently.
|
|
651
1162
|
*
|
|
@@ -653,16 +1164,22 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
653
1164
|
* @param {object} body - The body of the request.
|
|
654
1165
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
655
1166
|
*/
|
|
656
|
-
deletePermanently: (
|
|
657
|
-
}
|
|
1167
|
+
deletePermanently: (type, params) => {
|
|
1168
|
+
return API$v.delete(`/${type}/delete-permanent`, { params });
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
const API$u = createAxiosInstance({
|
|
658
1172
|
prefix: "/utility/v2"
|
|
659
|
-
})
|
|
1173
|
+
});
|
|
1174
|
+
const FileManagerServices = {
|
|
660
1175
|
/**
|
|
661
1176
|
* Get storage information.
|
|
662
1177
|
*
|
|
663
1178
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
664
1179
|
*/
|
|
665
|
-
getStorageInformation: () =>
|
|
1180
|
+
getStorageInformation: () => {
|
|
1181
|
+
return API$u.get("/files/storage");
|
|
1182
|
+
},
|
|
666
1183
|
/**
|
|
667
1184
|
* Get file manager data.
|
|
668
1185
|
*
|
|
@@ -670,7 +1187,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
670
1187
|
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
671
1188
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
672
1189
|
*/
|
|
673
|
-
getFileManager: (
|
|
1190
|
+
getFileManager: (type, params) => {
|
|
1191
|
+
return API$u.get(`/${type}`, { params });
|
|
1192
|
+
},
|
|
674
1193
|
/**
|
|
675
1194
|
* Get file manager options.
|
|
676
1195
|
*
|
|
@@ -678,7 +1197,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
678
1197
|
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
679
1198
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
680
1199
|
*/
|
|
681
|
-
getFileManagerOption: (
|
|
1200
|
+
getFileManagerOption: (type, params) => {
|
|
1201
|
+
return API$u.get(`/${type}/options`, { params });
|
|
1202
|
+
},
|
|
682
1203
|
/**
|
|
683
1204
|
* Recover files.
|
|
684
1205
|
*
|
|
@@ -686,7 +1207,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
686
1207
|
* @param {object} body - The body of the request.
|
|
687
1208
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
688
1209
|
*/
|
|
689
|
-
recoverFiles: (
|
|
1210
|
+
recoverFiles: (type, body) => {
|
|
1211
|
+
return API$u.put(`/${type}/recover`, body);
|
|
1212
|
+
},
|
|
690
1213
|
/**
|
|
691
1214
|
* Delete files.
|
|
692
1215
|
*
|
|
@@ -694,7 +1217,9 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
694
1217
|
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
695
1218
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
696
1219
|
*/
|
|
697
|
-
deleteFiles: (
|
|
1220
|
+
deleteFiles: (type, params) => {
|
|
1221
|
+
return API$u.delete(`/${type}`, { params });
|
|
1222
|
+
},
|
|
698
1223
|
/**
|
|
699
1224
|
* Delete files permanently.
|
|
700
1225
|
*
|
|
@@ -702,28 +1227,52 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
702
1227
|
* @param {object} body - The body of the request.
|
|
703
1228
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
704
1229
|
*/
|
|
705
|
-
deletePermanently: (
|
|
706
|
-
}
|
|
1230
|
+
deletePermanently: (type, params) => {
|
|
1231
|
+
return API$u.delete(`/${type}/delete-permanent`, { params });
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
const API$t = createAxiosInstance({
|
|
707
1235
|
prefix: "/iot/v2/reader"
|
|
708
|
-
})
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
1236
|
+
});
|
|
1237
|
+
const ReaderServices = {
|
|
1238
|
+
getData: (params) => {
|
|
1239
|
+
return API$t.get("/", { params });
|
|
1240
|
+
},
|
|
1241
|
+
getDataOptions: (params) => {
|
|
1242
|
+
return API$t.get("/options", { params });
|
|
1243
|
+
},
|
|
1244
|
+
getActivityLogData: (params) => {
|
|
1245
|
+
return API$t.get("/activity-log", { params });
|
|
1246
|
+
},
|
|
1247
|
+
getActivityLogOptions: (params) => {
|
|
1248
|
+
return API$t.get("/activity-log/options", { params });
|
|
1249
|
+
},
|
|
1250
|
+
getDataById: (id) => {
|
|
1251
|
+
return API$t.get(`/${id}`);
|
|
1252
|
+
},
|
|
1253
|
+
getChangeLog: (params) => {
|
|
1254
|
+
return API$t.get(`/${params.id}/change-log`, { params });
|
|
1255
|
+
},
|
|
1256
|
+
getChangeLogOptions: (params) => {
|
|
1257
|
+
return API$t.get(`/${params.id}/change-log/options`, { params });
|
|
1258
|
+
},
|
|
1259
|
+
putData: (id, body) => {
|
|
1260
|
+
return API$t.put(`/${id}`, body);
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
const API$s = createAxiosInstance({
|
|
718
1264
|
prefix: "/settings-user-role/v2"
|
|
719
|
-
})
|
|
1265
|
+
});
|
|
1266
|
+
const RoleServices$1 = {
|
|
720
1267
|
/**
|
|
721
1268
|
* Retrieves the transaction role for the given group and transaction name.
|
|
722
1269
|
* @param {string} groupId - The ID of the group to retrieve the transaction role for.
|
|
723
1270
|
* @param {string} transactionName - The name of the transaction to retrieve the role for.
|
|
724
1271
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
725
1272
|
*/
|
|
726
|
-
getTransactionRole: (
|
|
1273
|
+
getTransactionRole: (groupId, transactionName) => {
|
|
1274
|
+
return API$s.get(`/transaction-roles/${groupId}/${transactionName}`);
|
|
1275
|
+
},
|
|
727
1276
|
/**
|
|
728
1277
|
* Updates the users assigned to the given transaction role.
|
|
729
1278
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -731,10 +1280,12 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
731
1280
|
* @param {UpdateUser} body - The request body containing the updated user information.
|
|
732
1281
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
733
1282
|
*/
|
|
734
|
-
putUpdateUsers: (
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
1283
|
+
putUpdateUsers: (groupId, transactionName, body) => {
|
|
1284
|
+
return API$s.put(
|
|
1285
|
+
`/transaction-roles/${groupId}/${transactionName}/update-user`,
|
|
1286
|
+
body
|
|
1287
|
+
);
|
|
1288
|
+
},
|
|
738
1289
|
/**
|
|
739
1290
|
* Updates the approval level for the given transaction role.
|
|
740
1291
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -742,10 +1293,12 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
742
1293
|
* @param {UserApprovalLevel} body - The request body containing the updated approval level.
|
|
743
1294
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
744
1295
|
*/
|
|
745
|
-
putUpdateLevel: (
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
1296
|
+
putUpdateLevel: (groupId, transactionName, body) => {
|
|
1297
|
+
return API$s.put(
|
|
1298
|
+
`/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
|
|
1299
|
+
body
|
|
1300
|
+
);
|
|
1301
|
+
},
|
|
749
1302
|
/**
|
|
750
1303
|
* Updates the group management settings for the given transaction role.
|
|
751
1304
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -753,66 +1306,84 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
753
1306
|
* @param {GroupManageByParent} body - The request body containing the updated management settings.
|
|
754
1307
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
755
1308
|
*/
|
|
756
|
-
putUpdateGroupManage: (
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1309
|
+
putUpdateGroupManage: (groupId, transactionName, body) => {
|
|
1310
|
+
return API$s.put(
|
|
1311
|
+
`/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
|
|
1312
|
+
body
|
|
1313
|
+
);
|
|
1314
|
+
},
|
|
1315
|
+
getUserAssignedSystemRole: (userId) => {
|
|
1316
|
+
return API$s.get(`/system-roles/user/${userId}`);
|
|
1317
|
+
},
|
|
1318
|
+
getAssignedUserAmounts: () => {
|
|
1319
|
+
return API$s.get("/system-roles/amounts");
|
|
1320
|
+
},
|
|
1321
|
+
getPermissionUser: (permissionType, params) => {
|
|
1322
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1323
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1324
|
+
return API$s.get(`/system-roles/total-control-read-only/${type}`, {
|
|
1325
|
+
params
|
|
767
1326
|
});
|
|
768
1327
|
}
|
|
769
|
-
return
|
|
1328
|
+
return API$s.get(`/system-roles/permission/${permissionType}`, { params });
|
|
770
1329
|
},
|
|
771
|
-
getPermissionUserOptions: (
|
|
772
|
-
if (["totalControl", "readOnly"].includes(
|
|
773
|
-
const
|
|
774
|
-
return
|
|
775
|
-
params
|
|
1330
|
+
getPermissionUserOptions: (permissionType, params) => {
|
|
1331
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1332
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1333
|
+
return API$s.get(`/system-roles/total-control-read-only/${type}/options`, {
|
|
1334
|
+
params
|
|
776
1335
|
});
|
|
777
1336
|
}
|
|
778
|
-
return
|
|
779
|
-
params
|
|
1337
|
+
return API$s.get(`/system-roles/permission/${permissionType}/options`, {
|
|
1338
|
+
params
|
|
1339
|
+
});
|
|
1340
|
+
},
|
|
1341
|
+
getUserGroups: (params, permissionType) => {
|
|
1342
|
+
return API$s.get(`/system-roles/permission/${permissionType}/groups`, {
|
|
1343
|
+
params
|
|
780
1344
|
});
|
|
781
1345
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
787
|
-
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
788
|
-
return d.post(`/system-roles/total-control-read-only/${r}`, t);
|
|
1346
|
+
postAssignUser: (body, permissionType) => {
|
|
1347
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1348
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1349
|
+
return API$s.post(`/system-roles/total-control-read-only/${type}`, body);
|
|
789
1350
|
}
|
|
790
|
-
return
|
|
791
|
-
},
|
|
792
|
-
putEditUser: (
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
1351
|
+
return API$s.post(`/system-roles/permission/${permissionType}`, body);
|
|
1352
|
+
},
|
|
1353
|
+
putEditUser: (body, roleId) => {
|
|
1354
|
+
return API$s.put(`/system-roles/${roleId}`, body);
|
|
1355
|
+
},
|
|
1356
|
+
putRoleSetActive: (body) => {
|
|
1357
|
+
return API$s.put("/system-roles/set-active", body);
|
|
1358
|
+
},
|
|
1359
|
+
deleteRemoveUser: (body, permissionType) => {
|
|
1360
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1361
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1362
|
+
return API$s.delete(`/system-roles/total-control-read-only/${type}`, {
|
|
1363
|
+
data: body
|
|
799
1364
|
});
|
|
800
1365
|
}
|
|
801
|
-
return
|
|
1366
|
+
return API$s.delete("/system-roles", { data: body });
|
|
802
1367
|
}
|
|
803
|
-
}
|
|
1368
|
+
};
|
|
1369
|
+
const API$r = createAxiosInstance({
|
|
804
1370
|
prefix: "/settings-user-role-go/v2"
|
|
805
|
-
})
|
|
1371
|
+
});
|
|
1372
|
+
const RoleServices = {
|
|
806
1373
|
/**
|
|
807
1374
|
* Retrieves the transaction role for the given group and transaction name.
|
|
808
1375
|
* @param {string} groupId - The ID of the group to retrieve the transaction role for.
|
|
809
1376
|
* @param {string} transactionName - The name of the transaction to retrieve the role for.
|
|
810
1377
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
811
1378
|
*/
|
|
812
|
-
getTransactionRole: (
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
1379
|
+
getTransactionRole: (groupId, transactionName) => {
|
|
1380
|
+
return API$r.get(`/transaction-roles/${groupId}/${transactionName}`);
|
|
1381
|
+
},
|
|
1382
|
+
getTransactionRoleTypes: (groupKeys, transactionName) => {
|
|
1383
|
+
return API$r.get(`/transaction-roles/${transactionName}/types`, {
|
|
1384
|
+
params: { groupKeys }
|
|
1385
|
+
});
|
|
1386
|
+
},
|
|
816
1387
|
/**
|
|
817
1388
|
* Updates the users assigned to the given transaction role.
|
|
818
1389
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -820,10 +1391,12 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
820
1391
|
* @param {UpdateUser} body - The request body containing the updated user information.
|
|
821
1392
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
822
1393
|
*/
|
|
823
|
-
putUpdateUsers: (
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1394
|
+
putUpdateUsers: (groupId, transactionName, body) => {
|
|
1395
|
+
return API$r.put(
|
|
1396
|
+
`/transaction-roles/${groupId}/${transactionName}/update-user`,
|
|
1397
|
+
body
|
|
1398
|
+
);
|
|
1399
|
+
},
|
|
827
1400
|
/**
|
|
828
1401
|
* Updates the approval level for the given transaction role.
|
|
829
1402
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -831,10 +1404,12 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
831
1404
|
* @param {UserApprovalLevel} body - The request body containing the updated approval level.
|
|
832
1405
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
833
1406
|
*/
|
|
834
|
-
putUpdateLevel: (
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1407
|
+
putUpdateLevel: (groupId, transactionName, body) => {
|
|
1408
|
+
return API$r.put(
|
|
1409
|
+
`/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
|
|
1410
|
+
body
|
|
1411
|
+
);
|
|
1412
|
+
},
|
|
838
1413
|
/**
|
|
839
1414
|
* Updates the group management settings for the given transaction role.
|
|
840
1415
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -842,636 +1417,1322 @@ const Ct = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE
|
|
|
842
1417
|
* @param {GroupManageByParent} body - The request body containing the updated management settings.
|
|
843
1418
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
844
1419
|
*/
|
|
845
|
-
putUpdateGroupManage: (
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1420
|
+
putUpdateGroupManage: (groupId, transactionName, body) => {
|
|
1421
|
+
return API$r.put(
|
|
1422
|
+
`/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
|
|
1423
|
+
body
|
|
1424
|
+
);
|
|
1425
|
+
},
|
|
1426
|
+
getUserAssignedSystemRole: (userId) => {
|
|
1427
|
+
return API$r.get(`/system-roles/user/${userId}`);
|
|
1428
|
+
},
|
|
1429
|
+
getAssignedUserAmounts: () => {
|
|
1430
|
+
return API$r.get("/system-roles/amounts");
|
|
1431
|
+
},
|
|
1432
|
+
getPermissionUser: (permissionType, params) => {
|
|
1433
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1434
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1435
|
+
return API$r.get(`/system-roles/total-control-read-only/${type}`, {
|
|
1436
|
+
params
|
|
856
1437
|
});
|
|
857
1438
|
}
|
|
858
|
-
return
|
|
1439
|
+
return API$r.get(`/system-roles/permission/${permissionType}`, { params });
|
|
859
1440
|
},
|
|
860
|
-
getPermissionUserOptions: (
|
|
861
|
-
if (["totalControl", "readOnly"].includes(
|
|
862
|
-
const
|
|
863
|
-
return
|
|
864
|
-
params
|
|
1441
|
+
getPermissionUserOptions: (permissionType, params) => {
|
|
1442
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1443
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1444
|
+
return API$r.get(`/system-roles/total-control-read-only/${type}/options`, {
|
|
1445
|
+
params
|
|
865
1446
|
});
|
|
866
1447
|
}
|
|
867
|
-
return
|
|
868
|
-
params
|
|
1448
|
+
return API$r.get(`/system-roles/permission/${permissionType}/options`, {
|
|
1449
|
+
params
|
|
1450
|
+
});
|
|
1451
|
+
},
|
|
1452
|
+
getUserGroups: (params, permissionType) => {
|
|
1453
|
+
return API$r.get(`/system-roles/permission/${permissionType}/groups`, {
|
|
1454
|
+
params
|
|
869
1455
|
});
|
|
870
1456
|
},
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
876
|
-
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
877
|
-
return $.post(`/system-roles/total-control-read-only/${r}`, t);
|
|
1457
|
+
postAssignUser: (body, permissionType) => {
|
|
1458
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1459
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1460
|
+
return API$r.post(`/system-roles/total-control-read-only/${type}`, body);
|
|
878
1461
|
}
|
|
879
|
-
return
|
|
1462
|
+
return API$r.post(`/system-roles/permission/${permissionType}`, body);
|
|
880
1463
|
},
|
|
881
|
-
putEditUser: (
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1464
|
+
putEditUser: (body, roleId) => {
|
|
1465
|
+
return API$r.put(`/system-roles/${roleId}`, body);
|
|
1466
|
+
},
|
|
1467
|
+
deleteRemoveUser: (body, permissionType) => {
|
|
1468
|
+
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
1469
|
+
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
1470
|
+
return API$r.put(`/system-roles/total-control-read-only/${type}`, body);
|
|
886
1471
|
}
|
|
887
|
-
return
|
|
1472
|
+
return API$r.put("/system-roles", body);
|
|
888
1473
|
}
|
|
889
|
-
}
|
|
1474
|
+
};
|
|
1475
|
+
const API$q = createAxiosInstance({
|
|
890
1476
|
prefix: "/settings-attribute/v2/open-api"
|
|
891
|
-
})
|
|
892
|
-
|
|
893
|
-
|
|
1477
|
+
});
|
|
1478
|
+
const OpenAPIServices$1 = {
|
|
1479
|
+
getOpenAPIDocs: (params) => {
|
|
1480
|
+
return API$q.get(`/${params.doc}`);
|
|
1481
|
+
},
|
|
1482
|
+
putGenerateToken: () => {
|
|
1483
|
+
return API$q.put("/generate");
|
|
1484
|
+
},
|
|
894
1485
|
// This is if the dummy was not dummy
|
|
895
|
-
getToken: () =>
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
1486
|
+
getToken: () => {
|
|
1487
|
+
return API$q.get("");
|
|
1488
|
+
},
|
|
1489
|
+
putRequestOpenAPI: () => {
|
|
1490
|
+
return API$q.put("/request");
|
|
1491
|
+
},
|
|
1492
|
+
putCancelRequestOpenAPI: () => {
|
|
1493
|
+
return API$q.put("/cancel-request");
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
const API$p = createAxiosInstance({
|
|
899
1497
|
prefix: "/settings-attribute-go/v2/open-api"
|
|
900
|
-
})
|
|
901
|
-
|
|
1498
|
+
});
|
|
1499
|
+
const OpenAPIServices = {
|
|
1500
|
+
putGenerateToken: () => {
|
|
1501
|
+
return API$p.put("/generate");
|
|
1502
|
+
},
|
|
902
1503
|
// This is if the dummy was not dummy
|
|
903
|
-
getToken: () =>
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1504
|
+
getToken: () => {
|
|
1505
|
+
return API$p.get("");
|
|
1506
|
+
},
|
|
1507
|
+
putRequestOpenAPI: () => {
|
|
1508
|
+
return API$p.put("/request");
|
|
1509
|
+
},
|
|
1510
|
+
putCancelRequestOpenAPI: () => {
|
|
1511
|
+
return API$p.put("/cancel-request");
|
|
1512
|
+
}
|
|
1513
|
+
};
|
|
1514
|
+
const API$o = createAxiosInstance({
|
|
907
1515
|
prefix: "/import/v2"
|
|
908
|
-
})
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
},
|
|
1516
|
+
});
|
|
1517
|
+
const ImportServices$1 = {
|
|
1518
|
+
getImport: (importUrl, params) => {
|
|
1519
|
+
return API$o.get(`/${importUrl}`, { params });
|
|
1520
|
+
},
|
|
1521
|
+
postImportTemporary: (importUrl, data) => {
|
|
1522
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
1523
|
+
return API$o.post(`/${importUrl}/temporary`, data, { headers });
|
|
1524
|
+
},
|
|
1525
|
+
deleteImportTemporary: (importUrl, data) => {
|
|
1526
|
+
return API$o.delete(`/${importUrl}/temporary`, { data });
|
|
1527
|
+
},
|
|
1528
|
+
postDuplicateImport: (importUrl, body) => {
|
|
1529
|
+
return API$o.post(`/${importUrl}/duplicate`, body);
|
|
1530
|
+
},
|
|
1531
|
+
putEditImport: (importUrl, body) => {
|
|
1532
|
+
return API$o.put(`/${importUrl}`, body);
|
|
1533
|
+
},
|
|
1534
|
+
postImport: (importUrl, controller, body) => {
|
|
1535
|
+
return API$o.post(importUrl, body, { signal: controller.signal });
|
|
1536
|
+
},
|
|
1537
|
+
putImportCancelProgress: (importUrl) => {
|
|
1538
|
+
return API$o.put(`/${importUrl}/cancel-progress`);
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
const API$n = createAxiosInstance({
|
|
920
1542
|
prefix: "/import-go/v2"
|
|
921
|
-
})
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
},
|
|
1543
|
+
});
|
|
1544
|
+
const ImportServices = {
|
|
1545
|
+
getImport: (importUrl, params) => {
|
|
1546
|
+
return API$n.get(`/${importUrl}`, { params });
|
|
1547
|
+
},
|
|
1548
|
+
postImportTemporary: (importUrl, data) => {
|
|
1549
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
1550
|
+
return API$n.post(`/${importUrl}/temporary`, data, { headers });
|
|
1551
|
+
},
|
|
1552
|
+
deleteImportTemporary: (importUrl, params) => {
|
|
1553
|
+
return API$n.delete(`/${importUrl}/temporary`, { params });
|
|
1554
|
+
},
|
|
1555
|
+
postDuplicateImport: (importUrl, body) => {
|
|
1556
|
+
return API$n.post(`/${importUrl}/duplicate`, body);
|
|
1557
|
+
},
|
|
1558
|
+
putEditImport: (importUrl, body) => {
|
|
1559
|
+
return API$n.put(`/${importUrl}`, body);
|
|
1560
|
+
},
|
|
1561
|
+
postImport: (importUrl, controller, body) => {
|
|
1562
|
+
return API$n.post(importUrl, body, { signal: controller.signal });
|
|
1563
|
+
},
|
|
1564
|
+
putImportCancelProgress: (importUrl) => {
|
|
1565
|
+
return API$n.put(`/${importUrl}/cancel-progress`);
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
const API$m = createAxiosInstance({
|
|
933
1569
|
prefix: "/settings-attribute/v2/asset-name"
|
|
934
|
-
})
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
},
|
|
1570
|
+
});
|
|
1571
|
+
const AssetNameServices = {
|
|
1572
|
+
getDropdown: (params) => {
|
|
1573
|
+
return API$m.get("/dropdown", { params });
|
|
1574
|
+
},
|
|
1575
|
+
getAssetNameDetail: (id) => {
|
|
1576
|
+
return API$m.get(`/${id}`);
|
|
1577
|
+
},
|
|
1578
|
+
getAssetsByAssetName: (id, params) => {
|
|
1579
|
+
return API$m.get(`/${id}/list-asset`, { params });
|
|
1580
|
+
},
|
|
1581
|
+
getAssetNameList: (params) => {
|
|
1582
|
+
return API$m.get("/", { params });
|
|
1583
|
+
},
|
|
1584
|
+
getUnpairedAssetName: (params) => {
|
|
1585
|
+
return API$m.get("/unpaired", { params });
|
|
1586
|
+
},
|
|
1587
|
+
getOptions: (params) => {
|
|
1588
|
+
return API$m.get("/options", { params });
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
const API$l = createAxiosInstance({
|
|
942
1592
|
prefix: "/assignment/v2"
|
|
943
|
-
})
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1593
|
+
});
|
|
1594
|
+
const AssignmentServices$1 = {
|
|
1595
|
+
getPreListData: (params) => {
|
|
1596
|
+
return API$l.get("/prelist", { params });
|
|
1597
|
+
},
|
|
1598
|
+
getPreListOptions: (params) => {
|
|
1599
|
+
return API$l.get("/prelist/options", { params });
|
|
1600
|
+
},
|
|
1601
|
+
getRequestData: (params) => {
|
|
1602
|
+
return API$l.get("/prelist/request", { params });
|
|
1603
|
+
},
|
|
1604
|
+
postAddPrelistData: (body) => {
|
|
1605
|
+
return API$l.post("/prelist", body);
|
|
1606
|
+
},
|
|
1607
|
+
getDetailRequestData: (id, params) => {
|
|
1608
|
+
return API$l.get(`/transaction/${id}/request`, { params });
|
|
1609
|
+
},
|
|
1610
|
+
getDetailRequestOption: (params, id) => {
|
|
1611
|
+
return API$l.get(`/transaction/${id}/request/options`, { params });
|
|
1612
|
+
},
|
|
1613
|
+
getTransactionData: (params) => {
|
|
1614
|
+
return API$l.get("/transaction", { params });
|
|
1615
|
+
},
|
|
1616
|
+
getTransactionOptions: (params) => {
|
|
1617
|
+
return API$l.get("/transaction/options", { params });
|
|
1618
|
+
},
|
|
1619
|
+
getDetailTransactionData: (id) => {
|
|
1620
|
+
return API$l.get(`/transaction/${id}`);
|
|
1621
|
+
},
|
|
1622
|
+
getTransactionApproval: (params) => {
|
|
1623
|
+
return API$l.get("/approval", { params });
|
|
1624
|
+
},
|
|
1625
|
+
getApprovalData: (transactionId, params) => {
|
|
1626
|
+
return API$l.get(`/approval/transaction/${transactionId}`, { params });
|
|
1627
|
+
},
|
|
1628
|
+
getTransactionApprovalOptions: (params) => {
|
|
1629
|
+
return API$l.get("/approval/options", { params });
|
|
1630
|
+
},
|
|
1631
|
+
getApprovalOptions: (transactionId, params) => {
|
|
1632
|
+
return API$l.get(`/approval/transaction/${transactionId}/options`, {
|
|
1633
|
+
params
|
|
1634
|
+
});
|
|
1635
|
+
},
|
|
1636
|
+
getTransactionApprovers: (id) => {
|
|
1637
|
+
return API$l.get(`/approval/transaction/${id}/transaction`);
|
|
1638
|
+
},
|
|
1639
|
+
putApproveApproval: (body) => {
|
|
1640
|
+
return API$l.put("/approval/approve", body);
|
|
1641
|
+
},
|
|
1642
|
+
getDetailTransactionLog: (id) => {
|
|
1643
|
+
return API$l.get(`/transaction/request/${id}/transaction-log`);
|
|
1644
|
+
},
|
|
1645
|
+
getVerifyAsset: (params, id) => {
|
|
1646
|
+
return API$l.get(`/transaction/${id}/request/scan`, { params });
|
|
1647
|
+
},
|
|
1648
|
+
putEditAssignedUser: (id, body) => {
|
|
1649
|
+
return API$l.put(`/transaction/${id}/user`, body);
|
|
1650
|
+
},
|
|
1651
|
+
putEditEmailConfirmation: (id, body) => {
|
|
1652
|
+
return API$l.put(`/transaction/${id}/update-email-or-assigned-user`, body);
|
|
1653
|
+
},
|
|
1654
|
+
postSendConfirmationEmail: (id) => {
|
|
1655
|
+
return API$l.post(`/transaction/${id}/send-confirmation-email`);
|
|
1656
|
+
},
|
|
1657
|
+
postTransaction: (body) => {
|
|
1658
|
+
return API$l.post("/transaction", body);
|
|
1659
|
+
},
|
|
1660
|
+
putTransaction: (id, body) => {
|
|
1661
|
+
return API$l.put(`/transaction/${id}/request`, body);
|
|
1662
|
+
},
|
|
1663
|
+
putCancelTransaction: (body) => {
|
|
1664
|
+
return API$l.put("/transaction/cancel", body);
|
|
1665
|
+
},
|
|
1666
|
+
putCancelAssignmentRequest: (body) => {
|
|
1667
|
+
return API$l.put("/transaction/request/cancel", body);
|
|
1668
|
+
},
|
|
1669
|
+
putVerifyRequest: (body, id) => {
|
|
1670
|
+
return API$l.put(`/transaction/${id}/verify-requests`, body);
|
|
1671
|
+
},
|
|
1672
|
+
putVerifyToken: (body) => {
|
|
1673
|
+
return API$l.put("/transaction/verify-token", body);
|
|
1674
|
+
},
|
|
1675
|
+
putHandoverConfirm: (body) => {
|
|
1676
|
+
return API$l.put("/transaction/handover-confirmation", body);
|
|
1677
|
+
},
|
|
1678
|
+
putAssignHandover: (transaction) => {
|
|
1679
|
+
return API$l.put(`/transaction/${transaction}/handover`);
|
|
1680
|
+
},
|
|
1681
|
+
deletePrelistData: (params) => {
|
|
1682
|
+
return API$l.delete("/prelist", { params });
|
|
1683
|
+
},
|
|
1684
|
+
deleteRequestPrelistData: (body) => {
|
|
1685
|
+
return API$l.delete("/prelist/request", { data: body });
|
|
1686
|
+
},
|
|
1687
|
+
getAssignedByAsset: (params) => {
|
|
1688
|
+
return API$l.get("/transaction/request/assigned/by-asset", { params });
|
|
1689
|
+
},
|
|
1690
|
+
getAssignedByAssetOptions: (params) => {
|
|
1691
|
+
return API$l.get("/transaction/request/assigned/by-asset/options", {
|
|
1692
|
+
params
|
|
1693
|
+
});
|
|
1694
|
+
},
|
|
1695
|
+
getAssignedByUser: (params) => {
|
|
1696
|
+
return API$l.get("/transaction/request/assigned/by-user", { params });
|
|
1697
|
+
},
|
|
1698
|
+
getAssignedByUserOptions: (params) => {
|
|
1699
|
+
return API$l.get("/transaction/request/assigned/by-user/options", { params });
|
|
1700
|
+
},
|
|
1701
|
+
postUnassignPrelistAsset: (body) => {
|
|
1702
|
+
return API$l.post("/prelist", body);
|
|
1703
|
+
},
|
|
1704
|
+
postUnassignPrelistUser: (body) => {
|
|
1705
|
+
return API$l.post("/prelist/unassign/by-user", body);
|
|
1706
|
+
},
|
|
1707
|
+
putUnassignRequest: (body) => {
|
|
1708
|
+
return API$l.put("/transaction/request/unassign", body);
|
|
1709
|
+
},
|
|
1710
|
+
putReportDone: (id, body) => {
|
|
1711
|
+
return API$l.put(`/transaction/${id}/confirm-report-done`, body);
|
|
1712
|
+
},
|
|
1713
|
+
getHistory: (type, params) => {
|
|
1714
|
+
const urlType = type.split(" ").join("-").toLowerCase();
|
|
1715
|
+
return API$l.get(`/transaction/history/${urlType}`, { params });
|
|
1716
|
+
},
|
|
1717
|
+
getHistoryOptions: (params) => {
|
|
1718
|
+
return API$l.get("/transaction/history/options", { params });
|
|
1719
|
+
},
|
|
1720
|
+
getHistoryByTransactionOptions: (params) => {
|
|
1721
|
+
return API$l.get("/transaction/history/by-transaction/options", { params });
|
|
1722
|
+
},
|
|
1723
|
+
putCancelReport: (body) => {
|
|
1724
|
+
return API$l.put("/transaction/request/cancel-report", body);
|
|
1725
|
+
},
|
|
1726
|
+
getTaskAssignment: async (params) => {
|
|
1727
|
+
return API$l.get("/transaction/my-asset/task", { params });
|
|
1728
|
+
},
|
|
1729
|
+
getTaskAssignmentOptions: async (params) => {
|
|
1730
|
+
return API$l.get("/transaction/my-asset/task/options", { params });
|
|
1731
|
+
},
|
|
1732
|
+
getAssignedAsset: async (params) => {
|
|
1733
|
+
return API$l.get("/transaction/my-asset/assigned-asset", { params });
|
|
1734
|
+
},
|
|
1735
|
+
getAssignedAssetOptions: async (params) => {
|
|
1736
|
+
return API$l.get("/transaction/my-asset/assigned-asset/options", { params });
|
|
1737
|
+
},
|
|
1738
|
+
putCancelAssignment: async (body) => {
|
|
1739
|
+
return API$l.put("/transaction/cancel", { id: body.id });
|
|
1740
|
+
},
|
|
1741
|
+
putCancelReportById: async (body) => {
|
|
1742
|
+
return API$l.put(`/transaction/request/${body.id}/cancel-report`);
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
const API$k = createAxiosInstance({
|
|
1000
1746
|
prefix: "/assignment-go/v2"
|
|
1001
|
-
})
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1747
|
+
});
|
|
1748
|
+
const AssignmentServices = {
|
|
1749
|
+
getTransactionData: (params) => {
|
|
1750
|
+
return API$k.get("/transaction", { params });
|
|
1751
|
+
},
|
|
1752
|
+
getTransactionOptions: (params) => {
|
|
1753
|
+
return API$k.get("/transaction/options", { params });
|
|
1754
|
+
},
|
|
1755
|
+
getDetailTransactionLog: (id) => {
|
|
1756
|
+
return API$k.get(`/transaction/request/${id}/transaction-log`);
|
|
1757
|
+
},
|
|
1758
|
+
postTransaction: (body) => {
|
|
1759
|
+
return API$k.post("/transaction", body);
|
|
1760
|
+
},
|
|
1761
|
+
putTransaction: (body) => {
|
|
1762
|
+
return API$k.put("/transaction", body);
|
|
1763
|
+
},
|
|
1764
|
+
putUnassignTransaction: (body) => {
|
|
1765
|
+
return API$k.put("/transaction/unassign", body);
|
|
1766
|
+
},
|
|
1767
|
+
putCancelReport: (body) => {
|
|
1768
|
+
return API$k.put("/transaction/request/cancel-report", body);
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1771
|
+
const API$j = createAxiosInstance({
|
|
1010
1772
|
prefix: "/license/v2"
|
|
1011
|
-
})
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
|
|
1773
|
+
});
|
|
1774
|
+
const TotalLicenseServices$1 = {
|
|
1775
|
+
getTotalLicense: () => {
|
|
1776
|
+
return API$j.get("/total-license");
|
|
1777
|
+
},
|
|
1778
|
+
getPurchasedData: (params) => {
|
|
1779
|
+
return API$j.get("/purchase", { params });
|
|
1780
|
+
},
|
|
1781
|
+
getCompanyData: () => {
|
|
1782
|
+
return API$j.get("/company");
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
const LicenseAssetAddonServices = {
|
|
1786
|
+
getFixedAssetPerGroup: (groupId, params) => {
|
|
1787
|
+
return API$j.get(`/${groupId}/fixed-asset-list`, { params });
|
|
1788
|
+
},
|
|
1789
|
+
getAssetNameList: (addOnType, groupId, params) => {
|
|
1790
|
+
return API$j.get(`${groupId}/asset-list/${addOnType}`, { params });
|
|
1791
|
+
},
|
|
1018
1792
|
// Get list of assets those already have licenses
|
|
1019
|
-
getLicenseAddonAssetList: (
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
},
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
},
|
|
1793
|
+
getLicenseAddonAssetList: (groupId, addOnType, params) => {
|
|
1794
|
+
return API$j.get(`/${groupId}/fixed-asset-list/${addOnType}`, { params });
|
|
1795
|
+
},
|
|
1796
|
+
removeAddOnLicense: (body, addOnType) => {
|
|
1797
|
+
return API$j.put(`/remove-license/${addOnType}`, body);
|
|
1798
|
+
},
|
|
1799
|
+
addNewLicenses: (body, addOnType) => {
|
|
1800
|
+
return API$j.put(`/add-license/${addOnType}`, body);
|
|
1801
|
+
},
|
|
1802
|
+
deleteAssetData: (body) => {
|
|
1803
|
+
return API$j.delete("/assets", { data: body });
|
|
1804
|
+
},
|
|
1805
|
+
putManageLicense: (licenseType, body) => {
|
|
1806
|
+
return API$j.put(
|
|
1807
|
+
`/manage/${licenseType.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`,
|
|
1808
|
+
body
|
|
1809
|
+
);
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
const LicenseAllocationServices = {
|
|
1813
|
+
getGroupQuota: (groupId) => {
|
|
1814
|
+
return API$j.get(`/${groupId}/allocation-quota`);
|
|
1815
|
+
},
|
|
1816
|
+
getSubGroupQuota: (parentId, params) => {
|
|
1817
|
+
return API$j.get(`/${parentId}/subgroup-quota`, { params });
|
|
1818
|
+
},
|
|
1819
|
+
editSubGroupQuota: (subGroupId, body) => {
|
|
1820
|
+
return API$j.put(`/${subGroupId}/set-group-quota`, body);
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
const LicenseConcurrentServices$1 = {
|
|
1824
|
+
getConcurrentUserData: () => {
|
|
1825
|
+
return API$j.get("/concurrent-user-data");
|
|
1826
|
+
},
|
|
1827
|
+
getConcurrentUserList: (params) => {
|
|
1828
|
+
return API$j.get("/concurrent-user", { params });
|
|
1829
|
+
},
|
|
1830
|
+
putLogoutUsers: (body) => {
|
|
1831
|
+
return API$j.put("/concurrent-user", body);
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
const LicenseServices$1 = {
|
|
1835
|
+
getFilterOptions: (path, params) => {
|
|
1836
|
+
return API$j.get(`/${path}`, { params });
|
|
1837
|
+
},
|
|
1838
|
+
...TotalLicenseServices$1,
|
|
1839
|
+
...LicenseConcurrentServices$1,
|
|
1840
|
+
...LicenseAllocationServices,
|
|
1841
|
+
...LicenseAssetAddonServices
|
|
1842
|
+
};
|
|
1843
|
+
const API$i = createAxiosInstance({
|
|
1042
1844
|
prefix: "/license-go/v2"
|
|
1043
|
-
})
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1845
|
+
});
|
|
1846
|
+
const TotalLicenseServices = {
|
|
1847
|
+
getTotalLicense: () => {
|
|
1848
|
+
return API$i.get("/total-license");
|
|
1849
|
+
},
|
|
1850
|
+
getPurchasedData: (params) => {
|
|
1851
|
+
return API$i.get("/purchase", { params });
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1854
|
+
const LicenseConcurrentServices = {
|
|
1855
|
+
getConcurrentUserData: () => {
|
|
1856
|
+
return API$i.get("/concurrent-user-data");
|
|
1857
|
+
},
|
|
1858
|
+
getConcurrentUserList: (params) => {
|
|
1859
|
+
return API$i.get("/concurrent-user", { params });
|
|
1860
|
+
},
|
|
1861
|
+
putLogoutUsers: (body) => {
|
|
1862
|
+
return API$i.put("/concurrent-user", body);
|
|
1863
|
+
}
|
|
1864
|
+
};
|
|
1865
|
+
const LicenseAssetServices = {
|
|
1866
|
+
getFixedAssetPerGroup: (groupId, params) => {
|
|
1867
|
+
return API$i.get(`/${groupId}/assets`, { params });
|
|
1868
|
+
},
|
|
1869
|
+
deleteAssetData: (body) => {
|
|
1870
|
+
return API$i.delete("/assets", { data: body });
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
const LicenseServices = {
|
|
1874
|
+
getFilterOptions: (path, params) => {
|
|
1875
|
+
return API$i.get(`/${path}`, { params });
|
|
1876
|
+
},
|
|
1877
|
+
...TotalLicenseServices,
|
|
1878
|
+
...LicenseConcurrentServices,
|
|
1879
|
+
...LicenseAssetServices
|
|
1880
|
+
};
|
|
1881
|
+
const API$h = createAxiosInstance({
|
|
1059
1882
|
prefix: "/repair/v2/damage"
|
|
1060
|
-
})
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
return
|
|
1883
|
+
});
|
|
1884
|
+
const DamageServices$1 = {
|
|
1885
|
+
getDamageReportList: (params) => {
|
|
1886
|
+
return API$h.get("/", { params });
|
|
1887
|
+
},
|
|
1888
|
+
getDamageReportListFilterOptions: (params) => {
|
|
1889
|
+
return API$h.get("/options", { params });
|
|
1890
|
+
},
|
|
1891
|
+
getDamageReportDetail: (reportId) => {
|
|
1892
|
+
return API$h.get(`/${reportId}`);
|
|
1893
|
+
},
|
|
1894
|
+
putReportDamage: (id, body) => {
|
|
1895
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
1896
|
+
return API$h.put(`/report-damage/${id}`, body, { headers });
|
|
1067
1897
|
},
|
|
1068
1898
|
/**
|
|
1069
1899
|
* To mark as repaired.
|
|
1070
1900
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
1071
1901
|
*/
|
|
1072
|
-
putMarkAsRepaired: (
|
|
1073
|
-
|
|
1902
|
+
putMarkAsRepaired: (body) => {
|
|
1903
|
+
return API$h.put("/repair", body);
|
|
1904
|
+
}
|
|
1905
|
+
};
|
|
1906
|
+
const API$g = createAxiosInstance({
|
|
1074
1907
|
prefix: "/damage-repair-ticketing/v2"
|
|
1075
|
-
})
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
return
|
|
1082
|
-
},
|
|
1083
|
-
|
|
1084
|
-
|
|
1908
|
+
});
|
|
1909
|
+
const DamageServices = {
|
|
1910
|
+
getDamageReportList: (params) => {
|
|
1911
|
+
return API$g.get("/", { params });
|
|
1912
|
+
},
|
|
1913
|
+
getDamageReportListFilterOptions: (params) => {
|
|
1914
|
+
return API$g.get("/options", { params });
|
|
1915
|
+
},
|
|
1916
|
+
getDamageReportDetail: (reportId) => {
|
|
1917
|
+
return API$g.get(`/${reportId}`);
|
|
1918
|
+
},
|
|
1919
|
+
putReportDamage: (id, body) => {
|
|
1920
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
1921
|
+
return API$g.put(`/${id}/report-damage`, body, { headers });
|
|
1922
|
+
},
|
|
1923
|
+
putMarkAsRepaired: (body) => {
|
|
1924
|
+
return API$g.put("/repair", body);
|
|
1925
|
+
}
|
|
1926
|
+
};
|
|
1927
|
+
const API$f = createAxiosInstance({
|
|
1085
1928
|
prefix: "/borrowing/v2"
|
|
1086
|
-
})
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1929
|
+
});
|
|
1930
|
+
const BorrowServices = {
|
|
1931
|
+
getTaskBorrowing: async (params) => {
|
|
1932
|
+
return API$f.get("/transaction/my-asset/task", { params });
|
|
1933
|
+
},
|
|
1934
|
+
getTaskBorrowingOptions: async (params) => {
|
|
1935
|
+
return API$f.get("/transaction/my-asset/task/options", { params });
|
|
1936
|
+
},
|
|
1937
|
+
getBorrowedAsset: async (params) => {
|
|
1938
|
+
return API$f.get("/transaction/my-asset/borrowed-asset", { params });
|
|
1939
|
+
},
|
|
1940
|
+
getBorrowedOptions: async (params) => {
|
|
1941
|
+
return API$f.get("/transaction/my-asset/borrowed-asset/options", { params });
|
|
1942
|
+
},
|
|
1943
|
+
getHistory: async (params) => {
|
|
1944
|
+
return API$f.get("/transaction/my-asset/history", { params });
|
|
1945
|
+
},
|
|
1946
|
+
getHistoryOptions: async (params) => {
|
|
1947
|
+
return API$f.get("/transaction/my-asset/history/options", { params });
|
|
1948
|
+
},
|
|
1949
|
+
postAddPrelistData: (body) => {
|
|
1950
|
+
return API$f.post("/prelist", body);
|
|
1951
|
+
},
|
|
1952
|
+
putCancelBorrowing: async (body) => {
|
|
1953
|
+
return API$f.put("/transaction/cancel", { id: body.id });
|
|
1954
|
+
},
|
|
1955
|
+
putCancelExtensionRequest: async (body) => {
|
|
1956
|
+
return API$f.put(`/transaction/${body.id}/cancel-extension`);
|
|
1957
|
+
},
|
|
1958
|
+
putCancelRequestReport: async (body) => {
|
|
1959
|
+
return API$f.put(`/transaction/request/${body.id}/cancel-report`);
|
|
1960
|
+
},
|
|
1961
|
+
putDeclineExtensionRequest: async (body) => {
|
|
1962
|
+
return API$f.put("transaction/request/decline", body);
|
|
1963
|
+
},
|
|
1964
|
+
putUpdateRequestExtension: async (body) => {
|
|
1965
|
+
return API$f.put("transaction/request/duration", body);
|
|
1966
|
+
},
|
|
1099
1967
|
// ------------------------------------------------------------------------------------------------------------ //
|
|
1100
|
-
getBorrowingPrelist: (
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1968
|
+
getBorrowingPrelist: (params) => {
|
|
1969
|
+
return API$f.get("/prelist", { params });
|
|
1970
|
+
},
|
|
1971
|
+
getBorrowingPrelistOptions: (params) => {
|
|
1972
|
+
return API$f.get("/prelist/options", { params });
|
|
1973
|
+
},
|
|
1974
|
+
deleteBorrowingPrelist: (id) => {
|
|
1975
|
+
return API$f.delete("/prelist", { data: { id } });
|
|
1976
|
+
},
|
|
1977
|
+
getBorrowingRequest: (params) => {
|
|
1978
|
+
return API$f.get("/prelist/request", { params });
|
|
1979
|
+
},
|
|
1980
|
+
getBorrowingRequestOptions: (params) => {
|
|
1981
|
+
return API$f.get("/prelist/request/options", { params });
|
|
1982
|
+
},
|
|
1983
|
+
postBorrowingRequest: (data) => {
|
|
1984
|
+
return API$f.post("/prelist/request", data);
|
|
1985
|
+
},
|
|
1986
|
+
putBorrowingRequest: (data) => {
|
|
1987
|
+
return API$f.put("/prelist/request", data);
|
|
1988
|
+
},
|
|
1989
|
+
deleteBorrowingRequest: (id) => {
|
|
1990
|
+
return API$f.delete("/prelist/request", { data: { id } });
|
|
1991
|
+
},
|
|
1992
|
+
postBorrowingTransaction: (data) => {
|
|
1993
|
+
return API$f.post("/transaction", data, { params: { sourceWeb: true } });
|
|
1994
|
+
},
|
|
1995
|
+
getBorrowingTransaction: (params) => {
|
|
1996
|
+
return API$f.get("/transaction", { params });
|
|
1997
|
+
},
|
|
1998
|
+
getBorrowingTransactionOptions: (params) => {
|
|
1999
|
+
return API$f.get("/transaction/options", { params });
|
|
2000
|
+
},
|
|
2001
|
+
putCancelBorrowingTransaction: (id) => {
|
|
2002
|
+
return API$f.put("/transaction/cancel", { id });
|
|
2003
|
+
},
|
|
2004
|
+
putCancelBorrowingRequest: (id) => {
|
|
2005
|
+
return API$f.put("/transaction/request/cancel", { id });
|
|
2006
|
+
},
|
|
2007
|
+
putCancelExtendBorrowingRequest: (id) => {
|
|
2008
|
+
return API$f.put("/transaction/request/extend/cancel", { id });
|
|
2009
|
+
},
|
|
2010
|
+
getBorrowingTransactionDetail: (id) => {
|
|
2011
|
+
return API$f.get(`/transaction/${id}`);
|
|
2012
|
+
},
|
|
2013
|
+
getBorrowingTransactionRequestList: (params) => {
|
|
2014
|
+
return API$f.get("/transaction/request", { params });
|
|
2015
|
+
},
|
|
2016
|
+
getBorrowingTransactionRequest: (id, params) => {
|
|
2017
|
+
return API$f.get(`/transaction/${id}/request`, { params });
|
|
2018
|
+
},
|
|
2019
|
+
getBorrowingTransactionRequestOptions: (id, params) => {
|
|
2020
|
+
return API$f.get(`/transaction/${id}/request/options`, { params });
|
|
2021
|
+
},
|
|
2022
|
+
putBorrowingTransactionRequest: (id, data) => {
|
|
2023
|
+
return API$f.put(`/transaction/${id}/request`, data);
|
|
2024
|
+
},
|
|
2025
|
+
getApprovalList: (id) => {
|
|
2026
|
+
return API$f.get(`/approval/transaction/${id}/transaction`);
|
|
2027
|
+
},
|
|
2028
|
+
putUpdateEmailorBorrower: (id, data) => {
|
|
2029
|
+
return API$f.put(`/transaction/${id}/update-email-or-borrower`, data);
|
|
2030
|
+
},
|
|
2031
|
+
getTransactionRequestScan: (id, tag) => {
|
|
2032
|
+
return API$f.get(`/transaction/${id}/request/scan`, { params: { tag } });
|
|
2033
|
+
},
|
|
2034
|
+
putUpdateBorrower: (id, userId) => {
|
|
2035
|
+
return API$f.put(`/transaction/${id}/user`, { user: userId });
|
|
2036
|
+
},
|
|
2037
|
+
postSendConfirmationEmail: (id) => {
|
|
2038
|
+
return API$f.post(`/transaction/${id}/send-confirmation-email`);
|
|
2039
|
+
},
|
|
2040
|
+
putVerifyRequests: (id, data) => {
|
|
2041
|
+
return API$f.put(`/transaction/${id}/verify-requests`, data);
|
|
2042
|
+
},
|
|
2043
|
+
getBorrowingTransactionHistoryByTransaction: (params) => {
|
|
2044
|
+
return API$f.get("/transaction/history/by-transaction", { params });
|
|
2045
|
+
},
|
|
2046
|
+
getBorrowingTransactionHistoryByAsset: (params) => {
|
|
2047
|
+
return API$f.get("/transaction/history/by-asset", { params });
|
|
2048
|
+
},
|
|
2049
|
+
getBorrowingTransactionHistoryOptions: (params) => {
|
|
2050
|
+
return API$f.get("/transaction/history/options", { params });
|
|
2051
|
+
},
|
|
2052
|
+
putBorrowingVerifyToken: (token) => {
|
|
2053
|
+
return API$f.put("/transaction/verify-token", { token });
|
|
2054
|
+
},
|
|
2055
|
+
putBorrowingHandoverConfirmation: (data) => {
|
|
2056
|
+
return API$f.put("/transaction/handover-confirmation", data);
|
|
2057
|
+
},
|
|
2058
|
+
putBorrowingHandover: (id) => {
|
|
2059
|
+
return API$f.put(`/transaction/${id}/handover`);
|
|
2060
|
+
},
|
|
2061
|
+
putBorrowingExtendRequest: (data) => {
|
|
2062
|
+
return API$f.put("/transaction/request/extend", data);
|
|
2063
|
+
},
|
|
2064
|
+
putBorrowingExtendApproval: (data) => {
|
|
2065
|
+
return API$f.put("/approval/approve/request-extension", data, {
|
|
2066
|
+
params: { sourceWeb: true }
|
|
2067
|
+
});
|
|
2068
|
+
},
|
|
2069
|
+
putBorrowingDeclineExtendRequest: (id) => {
|
|
2070
|
+
return API$f.put("/transaction/request/decline", { id });
|
|
2071
|
+
},
|
|
2072
|
+
getBorrowingBorrowedAsset: (params) => {
|
|
2073
|
+
return API$f.get("/transaction/request/borrowed/by-asset", { params });
|
|
2074
|
+
},
|
|
2075
|
+
getBorrowingBorrowedAssetOptions: (params) => {
|
|
2076
|
+
return API$f.get("/transaction/request/borrowed/by-asset/options", {
|
|
2077
|
+
params
|
|
2078
|
+
});
|
|
2079
|
+
},
|
|
2080
|
+
getBorrowingBorrowedBorrower: (params) => {
|
|
2081
|
+
return API$f.get("/transaction/request/borrowed/by-user", { params });
|
|
2082
|
+
},
|
|
2083
|
+
putBorrowingReportDamaged: (id, data) => {
|
|
2084
|
+
return API$f.put(`/transaction/request/${id}/damaged`, data);
|
|
2085
|
+
},
|
|
2086
|
+
putBorrowingReportMissing: (id, data) => {
|
|
2087
|
+
return API$f.put(`/transaction/request/${id}/missing`, data);
|
|
2088
|
+
},
|
|
2089
|
+
putBorrowingReturn: (id) => {
|
|
2090
|
+
return API$f.put("/transaction/request/return", { id });
|
|
2091
|
+
},
|
|
2092
|
+
getBorrowingLog: (id) => {
|
|
2093
|
+
return API$f.get(`/transaction/request/${id}/transaction-log`);
|
|
2094
|
+
},
|
|
2095
|
+
putConfirmReportDone: (id, data) => {
|
|
2096
|
+
return API$f.put(`/transaction/request/${id}/confirm-report-done`, data);
|
|
2097
|
+
},
|
|
2098
|
+
putCancelReportBulk: (id) => {
|
|
2099
|
+
return API$f.put("/transaction/request/cancel-report", {
|
|
2100
|
+
id
|
|
2101
|
+
});
|
|
2102
|
+
},
|
|
2103
|
+
putBorrowingEditExtension: (data) => {
|
|
2104
|
+
return API$f.put("/transaction/request/duration", data);
|
|
2105
|
+
},
|
|
2106
|
+
getApproval: (params) => {
|
|
2107
|
+
return API$f.get("/approval", { params });
|
|
2108
|
+
},
|
|
2109
|
+
getApprovalOptions: (params) => {
|
|
2110
|
+
return API$f.get("/approval/options", { params });
|
|
2111
|
+
},
|
|
2112
|
+
getApprovalTransactionRequest: (id, params) => {
|
|
2113
|
+
return API$f.get(`/approval/transaction/${id}`, { params });
|
|
2114
|
+
},
|
|
2115
|
+
getApprovalTransactionRequestOptions: (id, params) => {
|
|
2116
|
+
return API$f.get(`/approval/transaction/${id}/options`, { params });
|
|
2117
|
+
},
|
|
2118
|
+
putApprovalApprove: (data) => {
|
|
2119
|
+
return API$f.put("/approval/approve", data, {
|
|
2120
|
+
params: { sourceWeb: true }
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
};
|
|
2124
|
+
const API$e = createAxiosInstance({
|
|
1158
2125
|
prefix: "/assets/v2"
|
|
1159
|
-
})
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
2126
|
+
});
|
|
2127
|
+
const MyAssetServices$1 = {
|
|
2128
|
+
getHistory: async (params) => {
|
|
2129
|
+
return API$e.get("/my-asset", { params });
|
|
2130
|
+
},
|
|
2131
|
+
getHistoryOptions: async (params) => {
|
|
2132
|
+
return API$e.get("/my-asset/options", { params });
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
const API$d = createAxiosInstance({
|
|
1163
2136
|
prefix: "/assets-go/v2/my-assets"
|
|
1164
|
-
})
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
},
|
|
2137
|
+
});
|
|
2138
|
+
const MyAssetServices = {
|
|
2139
|
+
getAssigned: async (params) => {
|
|
2140
|
+
return API$d.get("/assigned", { params });
|
|
2141
|
+
},
|
|
2142
|
+
getAssignedOptions: async (params) => {
|
|
2143
|
+
return API$d.get("/assigned/options", { params });
|
|
2144
|
+
},
|
|
2145
|
+
getBorrowed: async (params) => {
|
|
2146
|
+
return API$d.get("/borrowed", { params });
|
|
2147
|
+
},
|
|
2148
|
+
getBorrowedOptions: async (params) => {
|
|
2149
|
+
return API$d.get("/borrowed/options", { params });
|
|
2150
|
+
},
|
|
2151
|
+
getHistory: async (params) => {
|
|
2152
|
+
return API$d.get("/history", { params });
|
|
2153
|
+
},
|
|
2154
|
+
getHistoryOptions: async (params) => {
|
|
2155
|
+
return API$d.get("/history/options", { params });
|
|
2156
|
+
}
|
|
2157
|
+
};
|
|
2158
|
+
const API$c = createAxiosInstance({
|
|
1172
2159
|
prefix: "/repair/v2"
|
|
1173
|
-
})
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
2160
|
+
});
|
|
2161
|
+
const RepairServices = {
|
|
2162
|
+
getRepairList: (params) => {
|
|
2163
|
+
return API$c.get("/my-asset/repair", { params });
|
|
2164
|
+
},
|
|
2165
|
+
getFilterOptions: (params) => {
|
|
2166
|
+
return API$c.get("/my-asset/repair/options", { params });
|
|
2167
|
+
},
|
|
2168
|
+
getAssetRepairTicketing: (assetId, params) => {
|
|
2169
|
+
return API$c.get(`/repair/${assetId}/asset-repair-detail`, { params });
|
|
2170
|
+
},
|
|
2171
|
+
putConfirmRepair: (repairId) => {
|
|
2172
|
+
return API$c.put(`/repair/${repairId}/confirm-repair`);
|
|
2173
|
+
}
|
|
2174
|
+
};
|
|
2175
|
+
const API$b = createAxiosInstance({
|
|
1179
2176
|
prefix: "/settings-user-role-go/v2/auth"
|
|
1180
|
-
})
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
2177
|
+
});
|
|
2178
|
+
const onRejected$1 = (error) => {
|
|
2179
|
+
var _a, _b, _c, _d;
|
|
2180
|
+
if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
|
|
2181
|
+
window.onblur = void 0;
|
|
2182
|
+
window.onfocus = void 0;
|
|
2183
|
+
window.sessionExpired = true;
|
|
2184
|
+
return window.dispatchEvent(new CustomEvent("user:expired"));
|
|
2185
|
+
}
|
|
2186
|
+
return Promise.reject(error);
|
|
2187
|
+
};
|
|
2188
|
+
const AuthServices$1 = {
|
|
2189
|
+
reLogin: (body) => {
|
|
2190
|
+
API$b.interceptors.response.use((response) => {
|
|
2191
|
+
return response;
|
|
2192
|
+
}, onRejected$1);
|
|
2193
|
+
return API$b.post("/login", body);
|
|
2194
|
+
}
|
|
2195
|
+
};
|
|
2196
|
+
const API$a = createAxiosInstance({
|
|
1186
2197
|
env: "APP_GLOBAL_SETTINGS_API",
|
|
1187
2198
|
prefix: "/v1/global-settings/auth"
|
|
1188
|
-
})
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
2199
|
+
});
|
|
2200
|
+
const onRejected = (error) => {
|
|
2201
|
+
var _a, _b, _c, _d;
|
|
2202
|
+
if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
|
|
2203
|
+
window.onblur = void 0;
|
|
2204
|
+
window.onfocus = void 0;
|
|
2205
|
+
window.sessionExpired = true;
|
|
2206
|
+
return window.dispatchEvent(new CustomEvent("user:expired"));
|
|
2207
|
+
}
|
|
2208
|
+
return Promise.reject(error);
|
|
2209
|
+
};
|
|
2210
|
+
const AuthServices = {
|
|
2211
|
+
login: (form) => {
|
|
2212
|
+
const body = { ...form, isMobile: false };
|
|
2213
|
+
return API$a.post("/login", body);
|
|
2214
|
+
},
|
|
2215
|
+
reLogin: (body) => {
|
|
2216
|
+
API$a.interceptors.response.use((response) => {
|
|
2217
|
+
return response;
|
|
2218
|
+
}, onRejected);
|
|
2219
|
+
return API$a.post("/login", body);
|
|
2220
|
+
},
|
|
2221
|
+
requestOTP: (email) => {
|
|
2222
|
+
const body = { email };
|
|
2223
|
+
return API$a.post("/request-otp", body);
|
|
2224
|
+
},
|
|
2225
|
+
requestResetPassLink: (email) => {
|
|
2226
|
+
const body = { email };
|
|
2227
|
+
return API$a.post("/request-reset-link", body);
|
|
2228
|
+
},
|
|
2229
|
+
setPassword: (body) => {
|
|
2230
|
+
return API$a.post("/set-password", body);
|
|
2231
|
+
},
|
|
2232
|
+
verifyToken: (token) => {
|
|
2233
|
+
return API$a.get(`/verify-token/${token}`);
|
|
2234
|
+
},
|
|
2235
|
+
confirmEmailChange: (token) => {
|
|
2236
|
+
const body = { token };
|
|
2237
|
+
return API$a.put("/confirm-email-change/confirm", body);
|
|
2238
|
+
},
|
|
2239
|
+
postLogout: () => {
|
|
2240
|
+
return API$a.post("/logout");
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
const PREFIX = "/transfer/v2";
|
|
2244
|
+
const PrelistAPI = createAxiosInstance({
|
|
2245
|
+
prefix: `${PREFIX}/prelist`
|
|
2246
|
+
});
|
|
2247
|
+
const TransactionAPI = createAxiosInstance({
|
|
2248
|
+
prefix: `${PREFIX}/transaction`
|
|
2249
|
+
});
|
|
2250
|
+
const ApprovalAPI$1 = createAxiosInstance({
|
|
2251
|
+
prefix: `${PREFIX}/approval`
|
|
2252
|
+
});
|
|
2253
|
+
const TransferServices = {
|
|
1219
2254
|
// ------ TRANSACTION ------
|
|
1220
|
-
getTransactions: (
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
putUpdateTransaction: (t, e) => v.put(`/${t}`, e),
|
|
1238
|
-
putCancelRequests: (t) => {
|
|
1239
|
-
const e = { id: t };
|
|
1240
|
-
return v.put("/request/cancel", e);
|
|
1241
|
-
},
|
|
1242
|
-
getHistoryByTransaction: (t) => v.get("/history", { params: t }),
|
|
1243
|
-
getHistoryByTransactionOptions: (t) => {
|
|
1244
|
-
const e = {};
|
|
1245
|
-
return e[t] = !0, v.get("/history/options", { params: e });
|
|
1246
|
-
},
|
|
1247
|
-
getHistoryByAsset: (t) => v.get("/history/by-asset", { params: t }),
|
|
1248
|
-
getHistoryByAssetOptions: (t) => {
|
|
1249
|
-
const e = {};
|
|
1250
|
-
return e[t] = !0, v.get("/history/by-asset/options", { params: e });
|
|
1251
|
-
},
|
|
1252
|
-
getApproverList: (t) => v.get(`/${t}/approval-history`),
|
|
1253
|
-
putHandoverTransaction: (t, e) => v.put(`/${t}/handover`, e),
|
|
1254
|
-
// ------ PRELIST ------
|
|
1255
|
-
getPrelist: (t) => et.get("/", { params: t }),
|
|
1256
|
-
postAddPrelistData: (t) => et.post("/", t),
|
|
1257
|
-
deletePrelist: (t) => et.delete("/", {
|
|
1258
|
-
params: {
|
|
1259
|
-
id: JSON.stringify(t)
|
|
2255
|
+
getTransactions: (params) => {
|
|
2256
|
+
return TransactionAPI.get("/", { params });
|
|
2257
|
+
},
|
|
2258
|
+
getTransactionDetail: (id) => {
|
|
2259
|
+
return TransactionAPI.get(`/${id}`);
|
|
2260
|
+
},
|
|
2261
|
+
getTransactionDetailAssets: (id, params) => {
|
|
2262
|
+
return TransactionAPI.get(`/${id}/request`, { params });
|
|
2263
|
+
},
|
|
2264
|
+
getRequestFilterOptions: (id, field) => {
|
|
2265
|
+
const params = {};
|
|
2266
|
+
if (field) {
|
|
2267
|
+
params[field] = true;
|
|
2268
|
+
} else {
|
|
2269
|
+
params.nameOptions = true;
|
|
2270
|
+
params.brandOptions = true;
|
|
2271
|
+
params.modelOptions = true;
|
|
1260
2272
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
return
|
|
2273
|
+
return TransactionAPI.get(`/${id}/request/options`, { params });
|
|
2274
|
+
},
|
|
2275
|
+
getTransactionLog: (id) => {
|
|
2276
|
+
return TransactionAPI.get(`/request/${id}/transaction-log`);
|
|
2277
|
+
},
|
|
2278
|
+
getTransactionOptions: (field) => {
|
|
2279
|
+
const params = {};
|
|
2280
|
+
params[field] = true;
|
|
2281
|
+
return TransactionAPI.get("/options", { params });
|
|
2282
|
+
},
|
|
2283
|
+
postCreateTransaction: (body) => {
|
|
2284
|
+
return TransactionAPI.post("/", body);
|
|
2285
|
+
},
|
|
2286
|
+
putCancelTransactions: (ids) => {
|
|
2287
|
+
const body = { id: ids };
|
|
2288
|
+
return TransactionAPI.put("/cancel", body);
|
|
2289
|
+
},
|
|
2290
|
+
putUpdateTransaction: (id, body) => {
|
|
2291
|
+
return TransactionAPI.put(`/${id}`, body);
|
|
2292
|
+
},
|
|
2293
|
+
putCancelRequests: (ids) => {
|
|
2294
|
+
const body = { id: ids };
|
|
2295
|
+
return TransactionAPI.put("/request/cancel", body);
|
|
2296
|
+
},
|
|
2297
|
+
getHistoryByTransaction: (params) => {
|
|
2298
|
+
return TransactionAPI.get("/history", { params });
|
|
2299
|
+
},
|
|
2300
|
+
getHistoryByTransactionOptions: (field) => {
|
|
2301
|
+
const params = {};
|
|
2302
|
+
params[field] = true;
|
|
2303
|
+
return TransactionAPI.get("/history/options", { params });
|
|
2304
|
+
},
|
|
2305
|
+
getHistoryByAsset: (params) => {
|
|
2306
|
+
return TransactionAPI.get("/history/by-asset", { params });
|
|
2307
|
+
},
|
|
2308
|
+
getHistoryByAssetOptions: (field) => {
|
|
2309
|
+
const params = {};
|
|
2310
|
+
params[field] = true;
|
|
2311
|
+
return TransactionAPI.get("/history/by-asset/options", { params });
|
|
2312
|
+
},
|
|
2313
|
+
getApproverList: (tranasctionId) => {
|
|
2314
|
+
return TransactionAPI.get(`/${tranasctionId}/approval-history`);
|
|
2315
|
+
},
|
|
2316
|
+
putHandoverTransaction: (id, body) => {
|
|
2317
|
+
return TransactionAPI.put(`/${id}/handover`, body);
|
|
2318
|
+
},
|
|
2319
|
+
// ------ PRELIST ------
|
|
2320
|
+
getPrelist: (params) => {
|
|
2321
|
+
return PrelistAPI.get("/", { params });
|
|
2322
|
+
},
|
|
2323
|
+
postAddPrelistData: (body) => {
|
|
2324
|
+
return PrelistAPI.post("/", body);
|
|
2325
|
+
},
|
|
2326
|
+
deletePrelist: (ids) => {
|
|
2327
|
+
return PrelistAPI.delete("/", {
|
|
2328
|
+
params: {
|
|
2329
|
+
id: JSON.stringify(ids)
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
},
|
|
2333
|
+
getPrelistAssets: (id) => {
|
|
2334
|
+
const params = { id };
|
|
2335
|
+
return PrelistAPI.get("/request", { params });
|
|
1265
2336
|
},
|
|
1266
2337
|
// APPROVAL
|
|
1267
|
-
getApprovals: (
|
|
1268
|
-
const
|
|
1269
|
-
return
|
|
2338
|
+
getApprovals: (status, params) => {
|
|
2339
|
+
const formattedParams = { ...params, status: JSON.stringify([status]) };
|
|
2340
|
+
return ApprovalAPI$1.get("/", { params: formattedParams });
|
|
1270
2341
|
},
|
|
1271
|
-
getApprovalOptions: (
|
|
1272
|
-
const
|
|
1273
|
-
status: JSON.stringify([
|
|
2342
|
+
getApprovalOptions: (status, field) => {
|
|
2343
|
+
const params = {
|
|
2344
|
+
status: JSON.stringify([status])
|
|
1274
2345
|
};
|
|
1275
|
-
|
|
2346
|
+
params[field] = true;
|
|
2347
|
+
return ApprovalAPI$1.get("/options", { params });
|
|
1276
2348
|
},
|
|
1277
|
-
getApprovalDetail: (
|
|
1278
|
-
const
|
|
1279
|
-
groupType:
|
|
2349
|
+
getApprovalDetail: (id, approvalType) => {
|
|
2350
|
+
const params = {
|
|
2351
|
+
groupType: approvalType
|
|
1280
2352
|
};
|
|
1281
|
-
return
|
|
2353
|
+
return ApprovalAPI$1.get(`/transaction/${id}`, { params });
|
|
1282
2354
|
},
|
|
1283
|
-
getApprovalDetailOptions: (
|
|
1284
|
-
const
|
|
1285
|
-
|
|
2355
|
+
getApprovalDetailOptions: (id, field, approvalType) => {
|
|
2356
|
+
const params = {};
|
|
2357
|
+
params[field] = true;
|
|
2358
|
+
params.groupType = approvalType;
|
|
2359
|
+
return ApprovalAPI$1.get(`/transaction/${id}/options`, { params });
|
|
1286
2360
|
},
|
|
1287
|
-
putUpdateApproval: (
|
|
1288
|
-
|
|
2361
|
+
putUpdateApproval: (body) => {
|
|
2362
|
+
return ApprovalAPI$1.put("/approve", body);
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2365
|
+
const ReportAPI = createAxiosInstance({
|
|
1289
2366
|
prefix: "/disposal/v2/report"
|
|
1290
|
-
})
|
|
2367
|
+
});
|
|
2368
|
+
const DisposalAPI = createAxiosInstance({
|
|
1291
2369
|
prefix: "/disposal/v2/disposal"
|
|
1292
|
-
})
|
|
2370
|
+
});
|
|
2371
|
+
const ApprovalAPI = createAxiosInstance({
|
|
1293
2372
|
prefix: "/disposal/v2/approval"
|
|
1294
|
-
})
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
},
|
|
2373
|
+
});
|
|
2374
|
+
const DisposalServices$1 = {
|
|
2375
|
+
getReportedDisposal: (params) => {
|
|
2376
|
+
return ReportAPI.get("", { params });
|
|
2377
|
+
},
|
|
2378
|
+
getReportedDisposalOptions: (params) => {
|
|
2379
|
+
return ReportAPI.get("/options", { params });
|
|
2380
|
+
},
|
|
2381
|
+
postReportDisposal: (body) => {
|
|
2382
|
+
return ReportAPI.post("", body);
|
|
2383
|
+
},
|
|
2384
|
+
deleteCancelReport: (params) => {
|
|
2385
|
+
params.isFromDisposal = "false";
|
|
2386
|
+
return ReportAPI.delete("/cancel-report", { params });
|
|
2387
|
+
},
|
|
2388
|
+
deleteDeclineReport: (params) => {
|
|
2389
|
+
params.isFromDisposal = "true";
|
|
2390
|
+
return ReportAPI.delete("/cancel-report", { params });
|
|
2391
|
+
},
|
|
2392
|
+
getPrelistDisposal: (params) => {
|
|
2393
|
+
return DisposalAPI.get("/prelist", { params });
|
|
2394
|
+
},
|
|
2395
|
+
getPrelistDisposalRequest: (params) => {
|
|
2396
|
+
return DisposalAPI.get("/prelist/request", { params });
|
|
2397
|
+
},
|
|
2398
|
+
postCreatePrelist: (body) => {
|
|
2399
|
+
return DisposalAPI.post("/prelist", body);
|
|
2400
|
+
},
|
|
2401
|
+
deletePrelistData: (params) => {
|
|
2402
|
+
return DisposalAPI.delete("/prelist", { params });
|
|
2403
|
+
},
|
|
2404
|
+
postCreateTransaction: (body) => {
|
|
2405
|
+
return DisposalAPI.post("/transaction", body);
|
|
2406
|
+
},
|
|
2407
|
+
putTransaction: (id, body) => {
|
|
2408
|
+
return DisposalAPI.put(`/disposal/${id}`, body);
|
|
2409
|
+
},
|
|
2410
|
+
getTransactionData: (params) => {
|
|
2411
|
+
return DisposalAPI.get("/transaction", { params });
|
|
2412
|
+
},
|
|
2413
|
+
getTransactionDetail: (transactionId) => {
|
|
2414
|
+
return DisposalAPI.get(`/transaction/${transactionId}`);
|
|
2415
|
+
},
|
|
2416
|
+
getDisposalTransactionLog: (id) => {
|
|
2417
|
+
return DisposalAPI.get(`/request/${id}/disposal-log`);
|
|
2418
|
+
},
|
|
2419
|
+
getTransactionApprovalHistory: (transactionId) => {
|
|
2420
|
+
return ApprovalAPI.get(`/transaction/${transactionId}/approval-history`);
|
|
2421
|
+
},
|
|
2422
|
+
getTransactionOptions: (params) => {
|
|
2423
|
+
return DisposalAPI.get("/transaction/options", { params });
|
|
2424
|
+
},
|
|
2425
|
+
putCancelTransaction: (params) => {
|
|
2426
|
+
return DisposalAPI.put("/cancel", void 0, { params });
|
|
2427
|
+
},
|
|
2428
|
+
putCancelRequest: (body) => {
|
|
2429
|
+
return DisposalAPI.put("/request/cancel", body);
|
|
2430
|
+
},
|
|
2431
|
+
putDisposalVerification: (body, transactionId) => {
|
|
2432
|
+
return DisposalAPI.put(`/${transactionId}/verification`, body);
|
|
2433
|
+
},
|
|
2434
|
+
putDisposalCompletion: (body, transactionId) => {
|
|
2435
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
2436
|
+
return DisposalAPI.put(`/${transactionId}/completion`, body, { headers });
|
|
2437
|
+
},
|
|
2438
|
+
getDisposalRequest: (params) => {
|
|
2439
|
+
return DisposalAPI.get("/request", { params });
|
|
2440
|
+
},
|
|
2441
|
+
getDisposalRequestOptions: (params) => {
|
|
2442
|
+
return DisposalAPI.get("/request/options", { params });
|
|
2443
|
+
},
|
|
2444
|
+
getVerifyAsset: (params) => {
|
|
2445
|
+
return DisposalAPI.get("/request/scan", { params });
|
|
2446
|
+
},
|
|
2447
|
+
getDisposalHistory: (additionalPath, params) => {
|
|
2448
|
+
return DisposalAPI.get(`/history${additionalPath}`, { params });
|
|
2449
|
+
},
|
|
2450
|
+
getHistoryByTransactionOptions: (params) => {
|
|
2451
|
+
return DisposalAPI.get("/history/options", { params });
|
|
2452
|
+
},
|
|
2453
|
+
getHistoryByAssetOptions: (params) => {
|
|
2454
|
+
return DisposalAPI.get("/history/by-asset/options", { params });
|
|
2455
|
+
}
|
|
2456
|
+
};
|
|
2457
|
+
const API$9 = createAxiosInstance({
|
|
1325
2458
|
prefix: "/transfer-go/v2"
|
|
1326
|
-
})
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
2459
|
+
});
|
|
2460
|
+
const TransferServicesGo = {
|
|
2461
|
+
getTransactionData: (params) => {
|
|
2462
|
+
return API$9.get("/transaction", { params });
|
|
2463
|
+
},
|
|
2464
|
+
getTransactionOptions: (params) => {
|
|
2465
|
+
return API$9.get("/transaction/options", { params });
|
|
2466
|
+
},
|
|
2467
|
+
getTransactionLog: (id) => {
|
|
2468
|
+
return API$9.get(`/transaction/request/${id}/transaction-log`);
|
|
2469
|
+
},
|
|
2470
|
+
postCreateTransaction: (body) => {
|
|
2471
|
+
return API$9.post("/transaction", body);
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
const API$8 = createAxiosInstance({
|
|
1332
2475
|
prefix: "/audit/v2"
|
|
1333
|
-
})
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
params
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
|
|
2476
|
+
});
|
|
2477
|
+
const AuditServices = {
|
|
2478
|
+
getAudit: (assetId, params) => {
|
|
2479
|
+
return API$8.get(`/audit/schedule/asset-detail/${assetId}`, { params });
|
|
2480
|
+
},
|
|
2481
|
+
getAuditOption: (assetId, params) => {
|
|
2482
|
+
return API$8.get(`/audit/schedule/asset-detail/${assetId}/options`, {
|
|
2483
|
+
params
|
|
2484
|
+
});
|
|
2485
|
+
},
|
|
2486
|
+
putSetActive: (body) => {
|
|
2487
|
+
return API$8.put("/audit/asset/activation", body);
|
|
2488
|
+
}
|
|
2489
|
+
};
|
|
2490
|
+
const API$7 = createAxiosInstance({
|
|
1340
2491
|
prefix: "/routine/v2"
|
|
1341
|
-
})
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
},
|
|
2492
|
+
});
|
|
2493
|
+
const RoutineServices = {
|
|
2494
|
+
getMaintenance: (assetId, params) => {
|
|
2495
|
+
return API$7.get(`/routine-task/${assetId}`, { params });
|
|
2496
|
+
},
|
|
2497
|
+
getMaintenanceOption: (assetId, params) => {
|
|
2498
|
+
return API$7.get(`/routine-task/${assetId}/options`, { params });
|
|
2499
|
+
},
|
|
2500
|
+
putSetActive: (body) => {
|
|
2501
|
+
return API$7.put("/maintenable-asset/set-active", body);
|
|
2502
|
+
}
|
|
2503
|
+
};
|
|
2504
|
+
const API$6 = createAxiosInstance({
|
|
1346
2505
|
prefix: "/settings-attribute/v2/models"
|
|
1347
|
-
})
|
|
1348
|
-
|
|
1349
|
-
|
|
2506
|
+
});
|
|
2507
|
+
const ModelTypeServices = {
|
|
2508
|
+
getDropdown: (params) => {
|
|
2509
|
+
return API$6.get("/dropdown", { params });
|
|
2510
|
+
}
|
|
2511
|
+
};
|
|
2512
|
+
const API$5 = createAxiosInstance({
|
|
1350
2513
|
prefix: "/settings-attribute/v2/transaction-settings"
|
|
1351
|
-
})
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
2514
|
+
});
|
|
2515
|
+
const TransactionSettingServices = {
|
|
2516
|
+
getData: () => {
|
|
2517
|
+
return API$5.get("/");
|
|
2518
|
+
},
|
|
2519
|
+
putData: (data) => {
|
|
2520
|
+
return API$5.put("/", data);
|
|
2521
|
+
}
|
|
2522
|
+
};
|
|
2523
|
+
const API$4 = createAxiosInstance({
|
|
1355
2524
|
prefix: "/borrowing-go/v2"
|
|
1356
|
-
})
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
return
|
|
1369
|
-
}
|
|
1370
|
-
|
|
2525
|
+
});
|
|
2526
|
+
const BorrowServicesGo = {
|
|
2527
|
+
getTransactions: async (params) => {
|
|
2528
|
+
return API$4.get("/transaction", { params });
|
|
2529
|
+
},
|
|
2530
|
+
getTransactionOptions: async (params) => {
|
|
2531
|
+
return API$4.get("/transaction/options", { params });
|
|
2532
|
+
},
|
|
2533
|
+
getTransactionLog: async (id) => {
|
|
2534
|
+
return API$4.get(`/transaction/request/${id}/transaction-log`);
|
|
2535
|
+
},
|
|
2536
|
+
postTransaction: async (body) => {
|
|
2537
|
+
return API$4.post("/transaction", body);
|
|
2538
|
+
},
|
|
2539
|
+
putTransaction: async (body) => {
|
|
2540
|
+
return API$4.put("/transaction", body);
|
|
2541
|
+
},
|
|
2542
|
+
putTransactionReturn: async (requestIds) => {
|
|
2543
|
+
const body = { id: requestIds };
|
|
2544
|
+
return API$4.put("/transaction/return", body);
|
|
2545
|
+
},
|
|
2546
|
+
putCancelReport: async (requestIds) => {
|
|
2547
|
+
const body = { id: requestIds };
|
|
2548
|
+
return API$4.put("/transaction/request/cancel-report", body);
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
const API$3 = createAxiosInstance({
|
|
1371
2552
|
prefix: "/disposal-go/v2/"
|
|
1372
|
-
})
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
},
|
|
2553
|
+
});
|
|
2554
|
+
const DisposalServices = {
|
|
2555
|
+
getReportedDisposal: (params) => {
|
|
2556
|
+
return API$3.get("/report", { params });
|
|
2557
|
+
},
|
|
2558
|
+
getReportedDisposalOptions: (params) => {
|
|
2559
|
+
return API$3.get("/report/options", { params });
|
|
2560
|
+
},
|
|
2561
|
+
postReportDisposal: (body) => {
|
|
2562
|
+
return API$3.post("/report", body);
|
|
2563
|
+
},
|
|
2564
|
+
deleteCancelReport: (params) => {
|
|
2565
|
+
params.isFromDisposal = "false";
|
|
2566
|
+
return API$3.delete("/report/cancel-report", { params });
|
|
2567
|
+
},
|
|
2568
|
+
deleteDeclineReport: (params) => {
|
|
2569
|
+
params.isFromDisposal = "true";
|
|
2570
|
+
return API$3.delete("/report/cancel-report", { params });
|
|
2571
|
+
},
|
|
2572
|
+
getDisposalHistory: (params) => {
|
|
2573
|
+
return API$3.get("/transaction", { params });
|
|
2574
|
+
},
|
|
2575
|
+
getHistoryByAssetOptions: (params) => {
|
|
2576
|
+
return API$3.get("/transaction/options", { params });
|
|
2577
|
+
},
|
|
2578
|
+
getDisposalTransactionLog: (requestId) => {
|
|
2579
|
+
return API$3.get(`/transaction/request/${requestId}/transaction-log`);
|
|
2580
|
+
},
|
|
2581
|
+
postCreateTransaction: (body) => {
|
|
2582
|
+
return API$3.post("/transaction", body);
|
|
2583
|
+
}
|
|
2584
|
+
};
|
|
2585
|
+
const API$2 = createAxiosInstance({
|
|
1383
2586
|
prefix: "/report/v2/reports"
|
|
1384
|
-
})
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
2587
|
+
});
|
|
2588
|
+
const ReportServices$1 = {
|
|
2589
|
+
getReportList: (params) => {
|
|
2590
|
+
return API$2.get("/schedules", { params });
|
|
2591
|
+
},
|
|
2592
|
+
getReportSchedule: (scheduleId) => {
|
|
2593
|
+
return API$2.get("/schedules/" + scheduleId);
|
|
2594
|
+
},
|
|
2595
|
+
getUniqueScheduleName: (name) => {
|
|
2596
|
+
return API$2.get("/schedules/unique-name", { params: { name } });
|
|
2597
|
+
},
|
|
2598
|
+
getFilterOptions: (params) => {
|
|
2599
|
+
return API$2.get("/schedules/options", { params });
|
|
2600
|
+
},
|
|
2601
|
+
putSetActive: (body) => {
|
|
2602
|
+
return API$2.put("/schedules/activation", body);
|
|
2603
|
+
},
|
|
2604
|
+
putEditSchedule: (body) => {
|
|
2605
|
+
return API$2.put("/schedules/" + body._id, body);
|
|
2606
|
+
},
|
|
2607
|
+
deleteReports: (reportIds) => {
|
|
2608
|
+
return API$2.delete("/schedules", { params: { reportIds } });
|
|
2609
|
+
},
|
|
2610
|
+
postCreateSchedule: (data) => {
|
|
2611
|
+
return API$2.post("/schedules/create", data);
|
|
2612
|
+
},
|
|
2613
|
+
postDownloadReport: (data) => {
|
|
2614
|
+
return API$2.post("/download", data, { responseType: "arraybuffer" });
|
|
2615
|
+
},
|
|
2616
|
+
postGenerateReport: (data) => {
|
|
2617
|
+
return API$2.post("/generate", data);
|
|
2618
|
+
}
|
|
2619
|
+
};
|
|
2620
|
+
const API$1 = createAxiosInstance({
|
|
1396
2621
|
prefix: "/report-go/v2/reports"
|
|
1397
|
-
})
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
2622
|
+
});
|
|
2623
|
+
const ReportServices = {
|
|
2624
|
+
getReportList: (params) => {
|
|
2625
|
+
return API$1.get("/schedules", { params });
|
|
2626
|
+
},
|
|
2627
|
+
getReportSchedule: (scheduleId) => {
|
|
2628
|
+
return API$1.get("/schedules/" + scheduleId);
|
|
2629
|
+
},
|
|
2630
|
+
getUniqueScheduleName: (name) => {
|
|
2631
|
+
return API$1.get("/schedules/unique-name", { params: { name } });
|
|
2632
|
+
},
|
|
2633
|
+
getFilterOptions: (params) => {
|
|
2634
|
+
return API$1.get("/schedules/options", { params });
|
|
2635
|
+
},
|
|
2636
|
+
putSetActive: (body) => {
|
|
2637
|
+
return API$1.put("/schedules/set-active", body);
|
|
2638
|
+
},
|
|
2639
|
+
putEditSchedule: (id, body) => {
|
|
2640
|
+
return API$1.put(`/schedules/${id}`, body);
|
|
2641
|
+
},
|
|
2642
|
+
deleteReports: (id) => {
|
|
2643
|
+
return API$1.delete("/schedules", { params: { id } });
|
|
2644
|
+
},
|
|
2645
|
+
postCreateSchedule: (data) => {
|
|
2646
|
+
return API$1.post("/schedules", data);
|
|
2647
|
+
},
|
|
2648
|
+
postDownloadReport: (data) => {
|
|
2649
|
+
return API$1.post("/download", data, { responseType: "arraybuffer" });
|
|
2650
|
+
},
|
|
2651
|
+
postGenerateReport: (data) => {
|
|
2652
|
+
return API$1.post("/generate", data);
|
|
2653
|
+
}
|
|
2654
|
+
};
|
|
2655
|
+
const API = createAxiosInstance({
|
|
2656
|
+
prefix: `${SERVER_PREFIX.SETTINGS_ATTRIBUTES}/v2/asset-name-policy`
|
|
2657
|
+
});
|
|
2658
|
+
const AssetPolicyServices = {
|
|
2659
|
+
getList: (params) => {
|
|
2660
|
+
return API.get("/", { params });
|
|
2661
|
+
},
|
|
2662
|
+
getListFilterOptions: (params) => {
|
|
2663
|
+
return API.get("/options");
|
|
2664
|
+
},
|
|
2665
|
+
putUpdatePolicy: (body) => {
|
|
2666
|
+
return API.put("/", body);
|
|
2667
|
+
}
|
|
1408
2668
|
};
|
|
1409
2669
|
export {
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
$
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
2670
|
+
AliasCodeServices$1 as AliasCodeServices,
|
|
2671
|
+
AliasCodeServices as AliasCodeServicesGo,
|
|
2672
|
+
AssetNameServices,
|
|
2673
|
+
AssetPolicyServices,
|
|
2674
|
+
AssetServices$1 as AssetServices,
|
|
2675
|
+
AssetServices as AssetServicesGo,
|
|
2676
|
+
AssignmentServices$1 as AssignmentServices,
|
|
2677
|
+
AssignmentServices as AssignmentServicesGo,
|
|
2678
|
+
AuditServices,
|
|
2679
|
+
AuthServices$1 as AuthServices,
|
|
2680
|
+
BorrowServices,
|
|
2681
|
+
BorrowServicesGo,
|
|
2682
|
+
BrandServices,
|
|
2683
|
+
ChangelogServices$1 as ChangelogServices,
|
|
2684
|
+
CountryStateServices,
|
|
2685
|
+
CustomFieldServices$1 as CustomFieldServices,
|
|
2686
|
+
CustomFieldServices as CustomFieldServicesGo,
|
|
2687
|
+
DamageServices$1 as DamageServices,
|
|
2688
|
+
DamageServices as DamageServicesGo,
|
|
2689
|
+
DashboardServices,
|
|
2690
|
+
DisposalServices$1 as DisposalServices,
|
|
2691
|
+
DisposalServices as DisposalServicesGo,
|
|
2692
|
+
FileManagerServices$1 as FileManagerServices,
|
|
2693
|
+
FileManagerServices as FileManagerServicesGo,
|
|
2694
|
+
GeneralSettingsServices$1 as GeneralSettingsServices,
|
|
2695
|
+
GeneralSettingsServices as GeneralSettingsServicesGo,
|
|
2696
|
+
AuthServices as GlobalAuthServices,
|
|
2697
|
+
GroupCategoryServices$1 as GroupCategoryServices,
|
|
2698
|
+
GroupCategoryServices as GroupCategoryServicesGo,
|
|
2699
|
+
I18nService,
|
|
2700
|
+
ImportServices$1 as ImportServices,
|
|
2701
|
+
ImportServices as ImportServicesGo,
|
|
2702
|
+
LicenseServices$1 as LicenseServices,
|
|
2703
|
+
LicenseServices as LicenseServicesGo,
|
|
2704
|
+
ChangelogServices as LogServicesGo,
|
|
2705
|
+
MissingServices$2 as MissingServices,
|
|
2706
|
+
MissingServices$1 as MissingServicesGo,
|
|
2707
|
+
ModelTypeServices,
|
|
2708
|
+
MyAssetServices$1 as MyAssetServices,
|
|
2709
|
+
MyAssetServices as MyAssetServicesGo,
|
|
2710
|
+
NotificationApprovalServices,
|
|
2711
|
+
NotificationServices$1 as NotificationServices,
|
|
2712
|
+
NotificationServices as NotificationServicesGo,
|
|
2713
|
+
OpenAPIServices$1 as OpenAPIServices,
|
|
2714
|
+
OpenAPIServices as OpenAPIServicesGo,
|
|
2715
|
+
ReaderServices,
|
|
2716
|
+
RepairServices,
|
|
2717
|
+
ReportServices$1 as ReportServices,
|
|
2718
|
+
ReportServices as ReportServicesGo,
|
|
2719
|
+
RoleServices$1 as RoleServices,
|
|
2720
|
+
RoleServices as RoleServicesGo,
|
|
2721
|
+
RoutineServices,
|
|
2722
|
+
ServiceCenterServices,
|
|
2723
|
+
SessionLogServices,
|
|
2724
|
+
SubUserServices$1 as SubUserServices,
|
|
2725
|
+
SubUserServices as SubUserServicesGo,
|
|
2726
|
+
TAGServices,
|
|
2727
|
+
MissingServices as TrackingServices,
|
|
2728
|
+
TransactionSettingServices,
|
|
2729
|
+
TransferServices,
|
|
2730
|
+
TransferServicesGo,
|
|
2731
|
+
UserServices$1 as UserServices,
|
|
2732
|
+
UserServices as UserServicesGo,
|
|
2733
|
+
getAssetsFile,
|
|
2734
|
+
getBaseURL,
|
|
2735
|
+
getImageURL,
|
|
2736
|
+
getImageURL$1 as getImageURLGo,
|
|
2737
|
+
queryParamsStringfy
|
|
1477
2738
|
};
|