@tagsamurai/fats-api-services 1.0.9 → 1.1.0-dev-alpha.7
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 +121 -2872
- package/api-services.system.js +120 -2822
- package/main.d.ts +0 -50
- package/package.json +1 -1
package/api-services.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "
|
|
2
|
+
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_API": "https://dev-api.tagsamurai.local", "VITE_APP_ASSETS_URL": "https://assets.tagsamurai.com", "VITE_APP_COUNTRY_STATE_API": "https://api.countrystatecity.in", "VITE_APP_COUNTRY_STATE_API_KEY": "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==" };
|
|
3
3
|
const getBaseURL = (env = "APP_API") => {
|
|
4
4
|
return __vite_import_meta_env__["VITE_" + env];
|
|
5
5
|
};
|
|
@@ -119,188 +119,8 @@ const getAssetsFile = async (file, type = "excel") => {
|
|
|
119
119
|
);
|
|
120
120
|
return response;
|
|
121
121
|
};
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
const s = value.trim();
|
|
125
|
-
if (!s) return false;
|
|
126
|
-
try {
|
|
127
|
-
JSON.parse(s);
|
|
128
|
-
return true;
|
|
129
|
-
} catch {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
const buildBodyParams = (params) => {
|
|
134
|
-
if (!params) {
|
|
135
|
-
return {};
|
|
136
|
-
}
|
|
137
|
-
const result = {};
|
|
138
|
-
Object.keys(params).forEach((key) => {
|
|
139
|
-
const val = params[key];
|
|
140
|
-
result[key] = isValidJSON(val) ? JSON.parse(val.trim()) : val;
|
|
141
|
-
});
|
|
142
|
-
return result;
|
|
143
|
-
};
|
|
144
|
-
const API$O = createAxiosInstance({
|
|
145
|
-
prefix: "/utility/v2"
|
|
146
|
-
});
|
|
147
|
-
const ChangelogServices = {
|
|
148
|
-
getChangelogList: (params) => {
|
|
149
|
-
return API$O.get("/change-log", { params });
|
|
150
|
-
},
|
|
151
|
-
getChangelogListOptions: (params) => {
|
|
152
|
-
return API$O.get("/change-log/options", { params });
|
|
153
|
-
},
|
|
154
|
-
getSessionLogList: (params) => {
|
|
155
|
-
return API$O.get("/session-log", { params });
|
|
156
|
-
},
|
|
157
|
-
getSessionLogListOptions: (params) => {
|
|
158
|
-
return API$O.get("/session-log/options", {
|
|
159
|
-
params
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
getTransactionLog: (params) => {
|
|
163
|
-
return API$O.get("/transaction-log", { params });
|
|
164
|
-
},
|
|
165
|
-
/**
|
|
166
|
-
* Retrieves the transaction log options.
|
|
167
|
-
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
168
|
-
*/
|
|
169
|
-
getTransactionLogOption: (params) => {
|
|
170
|
-
return API$O.get("/transaction-log/options", { params });
|
|
171
|
-
},
|
|
172
|
-
getUserDetailSystemLogList: (params) => {
|
|
173
|
-
return API$O.get("/change-log", { params });
|
|
174
|
-
},
|
|
175
|
-
getUserDetailSystemLogOption: (params) => {
|
|
176
|
-
return API$O.get("/change-log/options", { params });
|
|
177
|
-
},
|
|
178
|
-
getUserDetailUserLogBorrowingList: (userId, params) => {
|
|
179
|
-
return API$O.get(`/borrowing-log/${userId}`, { params });
|
|
180
|
-
},
|
|
181
|
-
getUserDetailUserLogAssignmentList: (userId, params) => {
|
|
182
|
-
return API$O.get(`/assignment-log/${userId}`, { params });
|
|
183
|
-
},
|
|
184
|
-
getUserDetailUserLogBorrowingOption: (userId, params) => {
|
|
185
|
-
return API$O.get(`/borrowing-log/${userId}/options`, { params });
|
|
186
|
-
},
|
|
187
|
-
getUserDetailUserLogAssignmentOption: (userId, params) => {
|
|
188
|
-
return API$O.get(`/assignment-log/${userId}/options`, { params });
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
const AssetsAPIs = createAxiosInstance({
|
|
192
|
-
prefix: "/assets/v2/assets"
|
|
193
|
-
});
|
|
194
|
-
const AssetServices = {
|
|
195
|
-
getAllAssets: (params) => {
|
|
196
|
-
return AssetsAPIs.get("/", { params });
|
|
197
|
-
},
|
|
198
|
-
getAllAssetsOptions: (params) => {
|
|
199
|
-
return AssetsAPIs.get("/options", { params });
|
|
200
|
-
},
|
|
201
|
-
getOptions: (endpoint, params) => {
|
|
202
|
-
return AssetsAPIs.get(endpoint ? `/${endpoint}/options` : "/options", {
|
|
203
|
-
params
|
|
204
|
-
});
|
|
205
|
-
},
|
|
206
|
-
getUnlinkedAssets: (params) => {
|
|
207
|
-
return AssetsAPIs.get("/unlinked", { params });
|
|
208
|
-
},
|
|
209
|
-
getAssetDetail: (id, params) => {
|
|
210
|
-
return AssetsAPIs.get(`/${id}`, { params });
|
|
211
|
-
},
|
|
212
|
-
getAssetNameTotal: () => {
|
|
213
|
-
return AssetsAPIs.get("/name-amount");
|
|
214
|
-
},
|
|
215
|
-
postRegisterAsset: (body) => {
|
|
216
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
217
|
-
return AssetsAPIs.post("", body, { headers });
|
|
218
|
-
},
|
|
219
|
-
putEditAsset: (id, body) => {
|
|
220
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
221
|
-
return AssetsAPIs.put(`/${id}`, body, { headers });
|
|
222
|
-
},
|
|
223
|
-
putEditDetailCustomField: (id, body) => {
|
|
224
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
225
|
-
return AssetsAPIs.put(`/${id}`, body, { headers });
|
|
226
|
-
},
|
|
227
|
-
getLinkedAsset: (assetId, params) => {
|
|
228
|
-
return AssetsAPIs.get(`/${assetId}/linked-assets`, { params });
|
|
229
|
-
},
|
|
230
|
-
getPurchase: (assetId) => {
|
|
231
|
-
return AssetsAPIs.get(`/${assetId}/purchase`);
|
|
232
|
-
},
|
|
233
|
-
putPurchase: (body, assetId) => {
|
|
234
|
-
return AssetsAPIs.put(`/${assetId}/purchase`, body);
|
|
235
|
-
},
|
|
236
|
-
getAccounting: (assetId, params) => {
|
|
237
|
-
return AssetsAPIs.get(`/${assetId}/accounting`, { params });
|
|
238
|
-
},
|
|
239
|
-
getLinkedAssetOption: (parentId, params) => {
|
|
240
|
-
return AssetsAPIs.get(`/${parentId}/linked-assets/options`, { params });
|
|
241
|
-
},
|
|
242
|
-
putLinkAsset: (body, parentId) => {
|
|
243
|
-
return AssetsAPIs.put(`/${parentId}/linked-assets`, body);
|
|
244
|
-
},
|
|
245
|
-
putUnlinkAsset: (body, parentId) => {
|
|
246
|
-
return AssetsAPIs.put(`/${parentId}/unlink-assets`, body);
|
|
247
|
-
},
|
|
248
|
-
putEditUsefulLife: (body) => {
|
|
249
|
-
return AssetsAPIs.put("/useful-life", body);
|
|
250
|
-
},
|
|
251
|
-
getAttachment: (assetId, params) => {
|
|
252
|
-
return AssetsAPIs.get(`/attachment/${assetId}`, { params });
|
|
253
|
-
},
|
|
254
|
-
postAttachment: (body, assetId) => {
|
|
255
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
256
|
-
return AssetsAPIs.post(`/attachment/${assetId}`, body, { headers });
|
|
257
|
-
},
|
|
258
|
-
putAttachment: (body, id) => {
|
|
259
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
260
|
-
return AssetsAPIs.put(`/attachment/${id}`, body, { headers });
|
|
261
|
-
},
|
|
262
|
-
/**
|
|
263
|
-
* Deletes the attachment with the given IDs.
|
|
264
|
-
* @param {object} params - The request params containing the IDs of the attachments to delete.
|
|
265
|
-
* @returns {Promise<AxiosResponse>}
|
|
266
|
-
*/
|
|
267
|
-
deleteAttachment: (params) => {
|
|
268
|
-
return AssetsAPIs.delete("/attachment/bulk", { params });
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const API$N = createAxiosInstance({
|
|
272
|
-
prefix: "/missing-tracking/v2"
|
|
273
|
-
});
|
|
274
|
-
const MissingServices = {
|
|
275
|
-
putFoundAsset: (body) => {
|
|
276
|
-
return API$N.put("/found", body);
|
|
277
|
-
},
|
|
278
|
-
putReportMissing: (id, body) => {
|
|
279
|
-
return API$N.put(`/${id}/report-missing`, body);
|
|
280
|
-
},
|
|
281
|
-
getData: (params) => {
|
|
282
|
-
return API$N.get("/", { params });
|
|
283
|
-
},
|
|
284
|
-
getDataOptions: (params) => {
|
|
285
|
-
return API$N.get("/options", { params });
|
|
286
|
-
},
|
|
287
|
-
getDetail: (id) => {
|
|
288
|
-
return API$N.get(`/${id}`);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
const API$M = createAxiosInstance({
|
|
292
|
-
prefix: "/utility/v2/notification"
|
|
293
|
-
});
|
|
294
|
-
const NotificationServices = {
|
|
295
|
-
getNotifications: (params) => {
|
|
296
|
-
return API$M.get("/", { params });
|
|
297
|
-
},
|
|
298
|
-
readNotification: (id) => {
|
|
299
|
-
return API$M.put(`/${id}`);
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
const API$L = createAxiosInstance({
|
|
303
|
-
prefix: "/settings-user-role/v2"
|
|
122
|
+
const API$5 = createAxiosInstance({
|
|
123
|
+
prefix: "/fam/settings-user-role/v2"
|
|
304
124
|
});
|
|
305
125
|
const UserServices = {
|
|
306
126
|
/**
|
|
@@ -308,19 +128,19 @@ const UserServices = {
|
|
|
308
128
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
309
129
|
*/
|
|
310
130
|
getUserDropdown: (params) => {
|
|
311
|
-
return API$
|
|
131
|
+
return API$5.get("/users/dropdown", { params });
|
|
312
132
|
},
|
|
313
133
|
getUserOptions: (params) => {
|
|
314
|
-
return API$
|
|
134
|
+
return API$5.get("/users/options", { params });
|
|
315
135
|
},
|
|
316
136
|
getUserList: (params) => {
|
|
317
|
-
return API$
|
|
137
|
+
return API$5.get("/users", { params });
|
|
318
138
|
},
|
|
319
139
|
getUserDetail: (id) => {
|
|
320
|
-
return API$
|
|
140
|
+
return API$5.get(`/users/${id}`);
|
|
321
141
|
},
|
|
322
142
|
putSetActiveBulk: (data) => {
|
|
323
|
-
return API$
|
|
143
|
+
return API$5.put("/users/set-active-bulk", data);
|
|
324
144
|
},
|
|
325
145
|
// User Detail
|
|
326
146
|
/**
|
|
@@ -331,160 +151,97 @@ const UserServices = {
|
|
|
331
151
|
*/
|
|
332
152
|
getUserDetailSystemRoles: (id, params, permissionType) => {
|
|
333
153
|
const additionalPath = permissionType ? `/${permissionType}` : "";
|
|
334
|
-
return API$
|
|
154
|
+
return API$5.get(`/users/${id}/system-roles${additionalPath}`, {
|
|
335
155
|
params
|
|
336
156
|
});
|
|
337
157
|
},
|
|
338
158
|
getUserDetailTransactionRoleList: (id, params) => {
|
|
339
|
-
return API$
|
|
159
|
+
return API$5.get(`/user-detail/${id}/transaction-role-list`, { params });
|
|
340
160
|
},
|
|
341
161
|
postUserDetailAddTransactionRole: (userId, data) => {
|
|
342
|
-
return API$
|
|
162
|
+
return API$5.post(`/users/${userId}/add-transaction-role`, data);
|
|
343
163
|
},
|
|
344
164
|
deleteUserDetailTransactionRole: (userId, body) => {
|
|
345
|
-
return API$
|
|
165
|
+
return API$5.put(`/users/${userId}/delete-transaction-role`, body);
|
|
346
166
|
},
|
|
347
167
|
putUserDetailEditTransactionRole: (userId, data) => {
|
|
348
|
-
return API$
|
|
168
|
+
return API$5.put(`/users/${userId}/edit-transaction-role`, data);
|
|
349
169
|
},
|
|
350
170
|
putAssignGroup: (data, permissionType, id) => {
|
|
351
|
-
return API$
|
|
171
|
+
return API$5.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
|
|
352
172
|
},
|
|
353
173
|
putRoleSetActive: (body, userId) => {
|
|
354
|
-
return API$
|
|
174
|
+
return API$5.put(`/users/${userId}/system-roles/set-active-bulk`, body);
|
|
355
175
|
},
|
|
356
176
|
getUserDetailTransactionAdminLogList: (userId, params) => {
|
|
357
|
-
return API$
|
|
177
|
+
return API$5.get(`/users-log/${userId}/transaction-log`, { params });
|
|
358
178
|
},
|
|
359
179
|
getUserDetailTransactionAdminLogOption: (userId, params) => {
|
|
360
|
-
return API$
|
|
180
|
+
return API$5.get(`/users-log/${userId}/transaction-log/options`, { params });
|
|
361
181
|
},
|
|
362
182
|
getUserDetailUserAssetBorrowedList: (userId, params) => {
|
|
363
|
-
return API$
|
|
183
|
+
return API$5.get(`/user-detail/${userId}/assets/borrowed`, { params });
|
|
364
184
|
},
|
|
365
185
|
getUserDetailUserAssetAssignedList: (userId, params) => {
|
|
366
|
-
return API$
|
|
186
|
+
return API$5.get(`/user-detail/${userId}/assets/assigned`, { params });
|
|
367
187
|
},
|
|
368
188
|
getUserDetailUserAssetBorrowedOption: (userId, params) => {
|
|
369
|
-
return API$
|
|
189
|
+
return API$5.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
|
|
370
190
|
},
|
|
371
191
|
getUserDetailUserAssetAssignedOption: (userId, params) => {
|
|
372
|
-
return API$
|
|
192
|
+
return API$5.get(`/user-detail/${userId}/assets/assigned/option`, { params });
|
|
373
193
|
}
|
|
374
194
|
};
|
|
375
|
-
const API$
|
|
376
|
-
prefix: "/settings-user-role/v2/sub-users"
|
|
195
|
+
const API$4 = createAxiosInstance({
|
|
196
|
+
prefix: "/fam/settings-user-role/v2/sub-users"
|
|
377
197
|
});
|
|
378
198
|
const SubUserServices = {
|
|
379
199
|
// Sub User
|
|
380
200
|
getSubUserList: (userId, params) => {
|
|
381
|
-
return API$
|
|
201
|
+
return API$4.get(`/${userId}`, { params });
|
|
382
202
|
},
|
|
383
203
|
getSubUserOptions: (userId, params) => {
|
|
384
|
-
return API$
|
|
204
|
+
return API$4.get(`/${userId}/option`, { params });
|
|
385
205
|
},
|
|
386
206
|
postCreateSubUser: (userId, data) => {
|
|
387
207
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
388
|
-
return API$
|
|
208
|
+
return API$4.post(`/${userId}`, data, { headers });
|
|
389
209
|
},
|
|
390
210
|
putSubUserSetActiveBulk: (userId, data) => {
|
|
391
|
-
return API$
|
|
211
|
+
return API$4.put(`/${userId}/set-active-bulk`, data);
|
|
392
212
|
},
|
|
393
213
|
deleteSubUser: (userId, subUserIds) => {
|
|
394
|
-
return API$
|
|
214
|
+
return API$4.put(`/${userId}/bulk`, { subUserIds });
|
|
395
215
|
},
|
|
396
216
|
putEditSubUser: (userId, subUserId, data) => {
|
|
397
217
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
398
|
-
return API$
|
|
218
|
+
return API$4.put(`/${userId}/${subUserId}`, data, {
|
|
399
219
|
headers
|
|
400
220
|
});
|
|
401
221
|
},
|
|
402
222
|
getBorrowedAsset: (userId, subUserId, params) => {
|
|
403
|
-
return API$
|
|
223
|
+
return API$4.get(`/${userId}/${subUserId}/borrowed-asset`, {
|
|
404
224
|
params
|
|
405
225
|
});
|
|
406
226
|
},
|
|
407
227
|
getBorrowedAssetOptions: (userId, subUserId, params) => {
|
|
408
|
-
return API$
|
|
228
|
+
return API$4.get(`/${userId}/${subUserId}/borrowed-asset/options`, {
|
|
409
229
|
params
|
|
410
230
|
});
|
|
411
231
|
},
|
|
412
232
|
getAssignedAsset: (userId, subUserId, params) => {
|
|
413
|
-
return API$
|
|
233
|
+
return API$4.get(`/${userId}/${subUserId}/assigned-asset`, {
|
|
414
234
|
params
|
|
415
235
|
});
|
|
416
236
|
},
|
|
417
237
|
getAssignedAssetOptions: (userId, subUserId, params) => {
|
|
418
|
-
return API$
|
|
238
|
+
return API$4.get(`/${userId}/${subUserId}/assigned-asset/options`, {
|
|
419
239
|
params
|
|
420
240
|
});
|
|
421
241
|
}
|
|
422
242
|
};
|
|
423
|
-
const API$
|
|
424
|
-
prefix: "/
|
|
425
|
-
});
|
|
426
|
-
const FileManagerServices = {
|
|
427
|
-
/**
|
|
428
|
-
* Get storage information.
|
|
429
|
-
*
|
|
430
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
431
|
-
*/
|
|
432
|
-
getStorageInformation: () => {
|
|
433
|
-
return API$J.get("/files/storage");
|
|
434
|
-
},
|
|
435
|
-
/**
|
|
436
|
-
* Get file manager data.
|
|
437
|
-
*
|
|
438
|
-
* @param {FileType} type - The type of the file.
|
|
439
|
-
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
440
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
441
|
-
*/
|
|
442
|
-
getFileManager: (type, params) => {
|
|
443
|
-
return API$J.get(`/${type}`, { params });
|
|
444
|
-
},
|
|
445
|
-
/**
|
|
446
|
-
* Get file manager options.
|
|
447
|
-
*
|
|
448
|
-
* @param {FileType} type - The type of the file.
|
|
449
|
-
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
450
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
451
|
-
*/
|
|
452
|
-
getFileManagerOption: (type, params) => {
|
|
453
|
-
return API$J.get(`/${type}/options`, { params });
|
|
454
|
-
},
|
|
455
|
-
/**
|
|
456
|
-
* Recover files.
|
|
457
|
-
*
|
|
458
|
-
* @param {FileType} type - The type of the file.
|
|
459
|
-
* @param {object} body - The body of the request.
|
|
460
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
461
|
-
*/
|
|
462
|
-
recoverFiles: (type, body) => {
|
|
463
|
-
return API$J.put(`/${type}/recover`, body);
|
|
464
|
-
},
|
|
465
|
-
/**
|
|
466
|
-
* Delete files.
|
|
467
|
-
*
|
|
468
|
-
* @param {FileType} type - The type of the file.
|
|
469
|
-
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
470
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
471
|
-
*/
|
|
472
|
-
deleteFiles: (type, params) => {
|
|
473
|
-
return API$J.delete(`/${type}`, { params });
|
|
474
|
-
},
|
|
475
|
-
/**
|
|
476
|
-
* Delete files permanently.
|
|
477
|
-
*
|
|
478
|
-
* @param {FileType} type - The type of the file.
|
|
479
|
-
* @param {object} body - The body of the request.
|
|
480
|
-
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
481
|
-
*/
|
|
482
|
-
deletePermanently: (type, params) => {
|
|
483
|
-
return API$J.delete(`/${type}/delete-permanent`, { params });
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
const API$I = createAxiosInstance({
|
|
487
|
-
prefix: "/settings-user-role/v2"
|
|
243
|
+
const API$3 = createAxiosInstance({
|
|
244
|
+
prefix: "/fam/settings-user-role/v2"
|
|
488
245
|
});
|
|
489
246
|
const RoleServices = {
|
|
490
247
|
/**
|
|
@@ -494,10 +251,10 @@ const RoleServices = {
|
|
|
494
251
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
495
252
|
*/
|
|
496
253
|
getTransactionRole: (groupId, transactionName) => {
|
|
497
|
-
return API$
|
|
254
|
+
return API$3.get(`/transaction-roles/${groupId}/${transactionName}`);
|
|
498
255
|
},
|
|
499
256
|
getTransactionRoleTypes: (groupKeys, transactionName) => {
|
|
500
|
-
return API$
|
|
257
|
+
return API$3.get(`/transaction-roles/${transactionName}/types`, {
|
|
501
258
|
params: { groupKeys }
|
|
502
259
|
});
|
|
503
260
|
},
|
|
@@ -509,7 +266,7 @@ const RoleServices = {
|
|
|
509
266
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
510
267
|
*/
|
|
511
268
|
putUpdateUsers: (groupId, transactionName, body) => {
|
|
512
|
-
return API$
|
|
269
|
+
return API$3.put(
|
|
513
270
|
`/transaction-roles/${groupId}/${transactionName}/update-user`,
|
|
514
271
|
body
|
|
515
272
|
);
|
|
@@ -522,7 +279,7 @@ const RoleServices = {
|
|
|
522
279
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
523
280
|
*/
|
|
524
281
|
putUpdateLevel: (groupId, transactionName, body) => {
|
|
525
|
-
return API$
|
|
282
|
+
return API$3.put(
|
|
526
283
|
`/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
|
|
527
284
|
body
|
|
528
285
|
);
|
|
@@ -535,2671 +292,163 @@ const RoleServices = {
|
|
|
535
292
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
536
293
|
*/
|
|
537
294
|
putUpdateGroupManage: (groupId, transactionName, body) => {
|
|
538
|
-
return API$
|
|
295
|
+
return API$3.put(
|
|
539
296
|
`/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
|
|
540
297
|
body
|
|
541
298
|
);
|
|
542
299
|
},
|
|
543
300
|
getUserAssignedSystemRole: (userId) => {
|
|
544
|
-
return API$
|
|
301
|
+
return API$3.get(`/system-roles/user/${userId}`);
|
|
545
302
|
},
|
|
546
303
|
getAssignedUserAmounts: () => {
|
|
547
|
-
return API$
|
|
304
|
+
return API$3.get("/system-roles/amounts");
|
|
548
305
|
},
|
|
549
306
|
getPermissionUser: (permissionType, params) => {
|
|
550
307
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
551
308
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
552
|
-
return API$
|
|
309
|
+
return API$3.get(`/system-roles/total-control-read-only/${type}`, {
|
|
553
310
|
params
|
|
554
311
|
});
|
|
555
312
|
}
|
|
556
|
-
return API$
|
|
313
|
+
return API$3.get(`/system-roles/permission/${permissionType}`, { params });
|
|
557
314
|
},
|
|
558
315
|
getPermissionUserOptions: (permissionType, params) => {
|
|
559
316
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
560
317
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
561
|
-
return API$
|
|
318
|
+
return API$3.get(`/system-roles/total-control-read-only/${type}/options`, {
|
|
562
319
|
params
|
|
563
320
|
});
|
|
564
321
|
}
|
|
565
|
-
return API$
|
|
322
|
+
return API$3.get(`/system-roles/permission/${permissionType}/options`, {
|
|
566
323
|
params
|
|
567
324
|
});
|
|
568
325
|
},
|
|
569
326
|
getUserGroups: (params, permissionType) => {
|
|
570
|
-
return API$
|
|
327
|
+
return API$3.get(`/system-roles/permission/${permissionType}/groups`, {
|
|
571
328
|
params
|
|
572
329
|
});
|
|
573
330
|
},
|
|
574
331
|
postAssignUser: (body, permissionType) => {
|
|
575
332
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
576
333
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
577
|
-
return API$
|
|
334
|
+
return API$3.post(`/system-roles/total-control-read-only/${type}`, body);
|
|
578
335
|
}
|
|
579
|
-
return API$
|
|
336
|
+
return API$3.post(`/system-roles/permission/${permissionType}`, body);
|
|
580
337
|
},
|
|
581
338
|
putEditUser: (body, roleId) => {
|
|
582
|
-
return API$
|
|
339
|
+
return API$3.put(`/system-roles/${roleId}`, body);
|
|
583
340
|
},
|
|
584
341
|
deleteRemoveUser: (body, permissionType) => {
|
|
585
342
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
586
343
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
587
|
-
return API$
|
|
344
|
+
return API$3.put(`/system-roles/total-control-read-only/${type}`, body);
|
|
588
345
|
}
|
|
589
|
-
return API$
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
const API$H = createAxiosInstance({
|
|
593
|
-
prefix: "/settings-attribute/v2/open-api"
|
|
594
|
-
});
|
|
595
|
-
const OpenAPIServices = {
|
|
596
|
-
getOpenAPIDocs: (params) => {
|
|
597
|
-
return API$H.get(`/${params.doc}`);
|
|
598
|
-
},
|
|
599
|
-
putGenerateToken: () => {
|
|
600
|
-
return API$H.put("/generate");
|
|
601
|
-
},
|
|
602
|
-
// This is if the dummy was not dummy
|
|
603
|
-
getToken: () => {
|
|
604
|
-
return API$H.get("");
|
|
605
|
-
},
|
|
606
|
-
putRequestOpenAPI: () => {
|
|
607
|
-
return API$H.put("/request");
|
|
608
|
-
},
|
|
609
|
-
putCancelRequestOpenAPI: () => {
|
|
610
|
-
return API$H.put("/cancel-request");
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
const API$G = createAxiosInstance({
|
|
614
|
-
prefix: "/import/v2"
|
|
615
|
-
});
|
|
616
|
-
const ImportServices = {
|
|
617
|
-
getImport: (importUrl, params) => {
|
|
618
|
-
return API$G.get(`/${importUrl}`, { params });
|
|
619
|
-
},
|
|
620
|
-
postImportTemporary: (importUrl, data) => {
|
|
621
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
622
|
-
return API$G.post(`/${importUrl}/temporary`, data, { headers });
|
|
623
|
-
},
|
|
624
|
-
deleteImportTemporary: (importUrl, params) => {
|
|
625
|
-
return API$G.delete(`/${importUrl}/temporary`, { params });
|
|
626
|
-
},
|
|
627
|
-
postDuplicateImport: (importUrl, body) => {
|
|
628
|
-
return API$G.post(`/${importUrl}/duplicate`, body);
|
|
629
|
-
},
|
|
630
|
-
putEditImport: (importUrl, body) => {
|
|
631
|
-
return API$G.put(`/${importUrl}`, body);
|
|
632
|
-
},
|
|
633
|
-
postImport: (importUrl, controller, body) => {
|
|
634
|
-
return API$G.post(importUrl, body, { signal: controller.signal });
|
|
635
|
-
},
|
|
636
|
-
putImportCancelProgress: (importUrl) => {
|
|
637
|
-
return API$G.put(`/${importUrl}/cancel-progress`);
|
|
346
|
+
return API$3.put("/system-roles", body);
|
|
638
347
|
}
|
|
639
348
|
};
|
|
640
|
-
const API$
|
|
641
|
-
|
|
642
|
-
prefix: "/assignment/v2"
|
|
643
|
-
});
|
|
644
|
-
const AssignmentServices$1 = {
|
|
645
|
-
getPreListData: (params) => {
|
|
646
|
-
return API$F.get("/prelist", { params });
|
|
647
|
-
},
|
|
648
|
-
getPreListOptions: (params) => {
|
|
649
|
-
return API$F.get("/prelist/options", { params });
|
|
650
|
-
},
|
|
651
|
-
getRequestData: (params) => {
|
|
652
|
-
return API$F.get("/prelist/request", { params });
|
|
653
|
-
},
|
|
654
|
-
postAddPrelistData: (body) => {
|
|
655
|
-
return API$F.post("/prelist", body);
|
|
656
|
-
},
|
|
657
|
-
getDetailRequestData: (id, params) => {
|
|
658
|
-
return API$F.get(`/transaction/${id}/request`, { params });
|
|
659
|
-
},
|
|
660
|
-
getDetailRequestOption: (params, id) => {
|
|
661
|
-
return API$F.get(`/transaction/${id}/request/options`, { params });
|
|
662
|
-
},
|
|
663
|
-
getTransactionData: (params) => {
|
|
664
|
-
return API$F.get("/transaction", { params });
|
|
665
|
-
},
|
|
666
|
-
getTransactionOptions: (params) => {
|
|
667
|
-
return API$F.get("/transaction/options", { params });
|
|
668
|
-
},
|
|
669
|
-
getDetailTransactionData: (id) => {
|
|
670
|
-
return API$F.get(`/transaction/${id}`);
|
|
671
|
-
},
|
|
672
|
-
getTransactionApproval: (params) => {
|
|
673
|
-
return API$F.get("/approval", { params });
|
|
674
|
-
},
|
|
675
|
-
getApprovalData: (transactionId, params) => {
|
|
676
|
-
return API$F.get(`/approval/transaction/${transactionId}`, { params });
|
|
677
|
-
},
|
|
678
|
-
getTransactionApprovalOptions: (params) => {
|
|
679
|
-
return API$F.get("/approval/options", { params });
|
|
680
|
-
},
|
|
681
|
-
getApprovalOptions: (transactionId, params) => {
|
|
682
|
-
return API$F.get(`/approval/transaction/${transactionId}/options`, {
|
|
683
|
-
params
|
|
684
|
-
});
|
|
685
|
-
},
|
|
686
|
-
getTransactionApprovers: (id) => {
|
|
687
|
-
return API$F.get(`/approval/transaction/${id}/transaction`);
|
|
688
|
-
},
|
|
689
|
-
putApproveApproval: (body) => {
|
|
690
|
-
return API$F.put("/approval/approve", body);
|
|
691
|
-
},
|
|
692
|
-
getDetailTransactionLog: (id) => {
|
|
693
|
-
return API$F.get(`/transaction/request/${id}/transaction-log`);
|
|
694
|
-
},
|
|
695
|
-
getVerifyAsset: (params, id) => {
|
|
696
|
-
return API$F.get(`/transaction/${id}/request/scan`, { params });
|
|
697
|
-
},
|
|
698
|
-
putEditAssignedUser: (id, body) => {
|
|
699
|
-
return API$F.put(`/transaction/${id}/user`, body);
|
|
700
|
-
},
|
|
701
|
-
putEditEmailConfirmation: (id, body) => {
|
|
702
|
-
return API$F.put(`/transaction/${id}/update-email-or-assigned-user`, body);
|
|
703
|
-
},
|
|
704
|
-
postSendConfirmationEmail: (id) => {
|
|
705
|
-
return API$F.post(`/transaction/${id}/send-confirmation-email`);
|
|
706
|
-
},
|
|
707
|
-
postTransaction: (body) => {
|
|
708
|
-
return API$F.post("/transaction", body);
|
|
709
|
-
},
|
|
710
|
-
putTransactionRequest: (id, body) => {
|
|
711
|
-
return API$F.put(`/transaction/${id}/request`, body);
|
|
712
|
-
},
|
|
713
|
-
putCancelTransaction: (body) => {
|
|
714
|
-
return API$F.put("/transaction/cancel", body);
|
|
715
|
-
},
|
|
716
|
-
putCancelAssignmentRequest: (body) => {
|
|
717
|
-
return API$F.put("/transaction/request/cancel", body);
|
|
718
|
-
},
|
|
719
|
-
putVerifyRequest: (body, id) => {
|
|
720
|
-
return API$F.put(`/transaction/${id}/verify-requests`, body);
|
|
721
|
-
},
|
|
722
|
-
putVerifyToken: (body) => {
|
|
723
|
-
return API$F.put("/transaction/verify-token", body);
|
|
724
|
-
},
|
|
725
|
-
putHandoverConfirm: (body) => {
|
|
726
|
-
return API$F.put("/transaction/handover-confirmation", body);
|
|
727
|
-
},
|
|
728
|
-
putAssignHandover: (transaction) => {
|
|
729
|
-
return API$F.put(`/transaction/${transaction}/handover`);
|
|
730
|
-
},
|
|
731
|
-
deletePrelistData: (params) => {
|
|
732
|
-
return API$F.delete("/prelist", { params });
|
|
733
|
-
},
|
|
734
|
-
deleteRequestPrelistData: (body) => {
|
|
735
|
-
return API$F.delete("/prelist/request", { data: body });
|
|
736
|
-
},
|
|
737
|
-
getAssignedByAsset: (params) => {
|
|
738
|
-
return API$F.get("/transaction/request/assigned/by-asset", { params });
|
|
739
|
-
},
|
|
740
|
-
getAssignedByAssetOptions: (params) => {
|
|
741
|
-
return API$F.get("/transaction/request/assigned/by-asset/options", {
|
|
742
|
-
params
|
|
743
|
-
});
|
|
744
|
-
},
|
|
745
|
-
getAssignedByUser: (params) => {
|
|
746
|
-
return API$F.get("/transaction/request/assigned/by-user", { params });
|
|
747
|
-
},
|
|
748
|
-
getAssignedByUserOptions: (params) => {
|
|
749
|
-
return API$F.get("/transaction/request/assigned/by-user/options", { params });
|
|
750
|
-
},
|
|
751
|
-
postUnassignPrelistAsset: (body) => {
|
|
752
|
-
return API$F.post("/prelist", body);
|
|
753
|
-
},
|
|
754
|
-
postUnassignPrelistUser: (body) => {
|
|
755
|
-
return API$F.post("/prelist/unassign/by-user", body);
|
|
756
|
-
},
|
|
757
|
-
putUnassignRequest: (body) => {
|
|
758
|
-
return API$F.put("/transaction/request/unassign", body);
|
|
759
|
-
},
|
|
760
|
-
putReportDone: (id, body) => {
|
|
761
|
-
return API$F.put(`/transaction/${id}/confirm-report-done`, body);
|
|
762
|
-
},
|
|
763
|
-
getHistory: (type, params) => {
|
|
764
|
-
const urlType = type.split(" ").join("-").toLowerCase();
|
|
765
|
-
return API$F.get(`/transaction/history/${urlType}`, { params });
|
|
766
|
-
},
|
|
767
|
-
getHistoryOptions: (params) => {
|
|
768
|
-
return API$F.get("/transaction/history/options", { params });
|
|
769
|
-
},
|
|
770
|
-
getHistoryByTransactionOptions: (params) => {
|
|
771
|
-
return API$F.get("/transaction/history/by-transaction/options", { params });
|
|
772
|
-
},
|
|
773
|
-
putCancelReport: (body) => {
|
|
774
|
-
return API$F.put("/transaction/request/cancel-report", body);
|
|
775
|
-
},
|
|
776
|
-
getTaskAssignment: async (params) => {
|
|
777
|
-
return API$F.get("/transaction/my-asset/task", { params });
|
|
778
|
-
},
|
|
779
|
-
getTaskAssignmentOptions: async (params) => {
|
|
780
|
-
return API$F.get("/transaction/my-asset/task/options", { params });
|
|
781
|
-
},
|
|
782
|
-
getAssignedAsset: async (params) => {
|
|
783
|
-
return API$F.get("/transaction/my-asset/assigned-asset", { params });
|
|
784
|
-
},
|
|
785
|
-
getAssignedAssetOptions: async (params) => {
|
|
786
|
-
return API$F.get("/transaction/my-asset/assigned-asset/options", { params });
|
|
787
|
-
},
|
|
788
|
-
putCancelAssignment: async (body) => {
|
|
789
|
-
return API$F.put("/transaction/cancel", { id: body.id });
|
|
790
|
-
},
|
|
791
|
-
putCancelReportById: async (body) => {
|
|
792
|
-
return API$F.put(`/transaction/request/${body.id}/cancel-report`);
|
|
793
|
-
}
|
|
794
|
-
};
|
|
795
|
-
const API$E = createAxiosInstance({
|
|
796
|
-
prefix: "/assignment/v2"
|
|
349
|
+
const API$2 = createAxiosInstance({
|
|
350
|
+
prefix: "/fam/settings-attribute/v2/custom-field"
|
|
797
351
|
});
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
getTransactionData: (params) => {
|
|
802
|
-
return API$E.get("/transaction", { params });
|
|
803
|
-
},
|
|
804
|
-
getTransactionOptions: (params) => {
|
|
805
|
-
return API$E.get("/transaction/options", { params });
|
|
806
|
-
},
|
|
807
|
-
getDetailTransactionLog: (id) => {
|
|
808
|
-
return API$E.get(`/transaction/request/${id}/transaction-log`);
|
|
809
|
-
},
|
|
810
|
-
postTransaction: (body) => {
|
|
811
|
-
return API$E.post("/transaction", body);
|
|
352
|
+
const CustomFieldServices = {
|
|
353
|
+
getCustomField: async (params) => {
|
|
354
|
+
return API$2.get("/", { params });
|
|
812
355
|
},
|
|
813
|
-
|
|
814
|
-
return API$
|
|
356
|
+
getCustomFieldsByCategory: (category, params) => {
|
|
357
|
+
return API$2.get(`/${category}`, { params });
|
|
815
358
|
},
|
|
816
|
-
|
|
817
|
-
return API$
|
|
359
|
+
getOptions: async (params) => {
|
|
360
|
+
return API$2.get("/options", { params });
|
|
818
361
|
},
|
|
819
|
-
|
|
820
|
-
return API$
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
const API$D = createAxiosInstance({
|
|
824
|
-
prefix: "/license/v2"
|
|
825
|
-
});
|
|
826
|
-
const TotalLicenseServices = {
|
|
827
|
-
getTotalLicense: () => {
|
|
828
|
-
return API$D.get("/total-license");
|
|
362
|
+
postCreateCustomField: async (params, data) => {
|
|
363
|
+
return API$2.post("/", data, { params });
|
|
829
364
|
},
|
|
830
|
-
|
|
831
|
-
return API$
|
|
832
|
-
}
|
|
833
|
-
};
|
|
834
|
-
const LicenseConcurrentServices = {
|
|
835
|
-
getConcurrentUserData: () => {
|
|
836
|
-
return API$D.get("/concurrent-user-data");
|
|
365
|
+
putEditCustomField: async (params, data, id) => {
|
|
366
|
+
return API$2.put(`/${id}`, data, { params });
|
|
837
367
|
},
|
|
838
|
-
|
|
839
|
-
return API$
|
|
368
|
+
putChangeStatus: async (params, data) => {
|
|
369
|
+
return API$2.put("/bulk", data, { params });
|
|
840
370
|
},
|
|
841
|
-
|
|
842
|
-
return API$
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
const LicenseAssetServices = {
|
|
846
|
-
getFixedAssetPerGroup: (groupId, params) => {
|
|
847
|
-
return API$D.get(`/${groupId}/assets`, { params });
|
|
371
|
+
deleteCustomField: async (params) => {
|
|
372
|
+
return API$2.delete("/bulk", { params });
|
|
848
373
|
},
|
|
849
|
-
|
|
850
|
-
return API$
|
|
374
|
+
getUsedCustomFields: async () => {
|
|
375
|
+
return API$2.get("/used-by-assets");
|
|
851
376
|
}
|
|
852
377
|
};
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
return API$D.get(`/${path}`, { params });
|
|
856
|
-
},
|
|
857
|
-
...TotalLicenseServices,
|
|
858
|
-
...LicenseConcurrentServices,
|
|
859
|
-
...LicenseAssetServices
|
|
860
|
-
};
|
|
861
|
-
const API$C = createAxiosInstance({
|
|
862
|
-
prefix: "/damage-repair-ticketing/v2"
|
|
378
|
+
const API$1 = createAxiosInstance({
|
|
379
|
+
prefix: "/fam/settings-user-role/v2/auth"
|
|
863
380
|
});
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
getDamageReportDetail: (reportId) => {
|
|
872
|
-
return API$C.get(`/${reportId}`);
|
|
873
|
-
},
|
|
874
|
-
putReportDamage: (id, body) => {
|
|
875
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
876
|
-
return API$C.put(`/${id}/report-damage`, body, { headers });
|
|
877
|
-
},
|
|
878
|
-
putMarkAsRepaired: (body) => {
|
|
879
|
-
return API$C.put("/repair", body);
|
|
381
|
+
const onRejected = (error) => {
|
|
382
|
+
var _a, _b, _c, _d;
|
|
383
|
+
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") {
|
|
384
|
+
window.onblur = void 0;
|
|
385
|
+
window.onfocus = void 0;
|
|
386
|
+
window.sessionExpired = true;
|
|
387
|
+
return window.dispatchEvent(new CustomEvent("user:expired"));
|
|
880
388
|
}
|
|
389
|
+
return Promise.reject(error);
|
|
881
390
|
};
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
return API$
|
|
888
|
-
},
|
|
889
|
-
getAssignedOptions: async (params) => {
|
|
890
|
-
return API$B.get("/assigned/options", { params });
|
|
891
|
-
},
|
|
892
|
-
getBorrowed: async (params) => {
|
|
893
|
-
return API$B.get("/borrowed", { params });
|
|
894
|
-
},
|
|
895
|
-
getBorrowedOptions: async (params) => {
|
|
896
|
-
return API$B.get("/borrowed/options", { params });
|
|
897
|
-
},
|
|
898
|
-
getHistory: async (params) => {
|
|
899
|
-
return API$B.get("/history", { params });
|
|
900
|
-
},
|
|
901
|
-
getHistoryOptions: async (params) => {
|
|
902
|
-
return API$B.get("/history/options", { params });
|
|
391
|
+
const AuthServices = {
|
|
392
|
+
reLogin: (body) => {
|
|
393
|
+
API$1.interceptors.response.use((response) => {
|
|
394
|
+
return response;
|
|
395
|
+
}, onRejected);
|
|
396
|
+
return API$1.post("/login", body);
|
|
903
397
|
}
|
|
904
398
|
};
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
env: "APP_TAGSAMURAI_API",
|
|
908
|
-
prefix: `${PREFIX}/prelist`
|
|
909
|
-
});
|
|
910
|
-
const TransactionAPI = createAxiosInstance({
|
|
911
|
-
env: "APP_TAGSAMURAI_API",
|
|
912
|
-
prefix: `${PREFIX}/transaction`
|
|
913
|
-
});
|
|
914
|
-
const ApprovalAPI$1 = createAxiosInstance({
|
|
915
|
-
env: "APP_TAGSAMURAI_API",
|
|
916
|
-
prefix: `${PREFIX}/approval`
|
|
399
|
+
const API = createAxiosInstance({
|
|
400
|
+
prefix: "/fam/utility/v2"
|
|
917
401
|
});
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
return TransactionAPI.get("/", { params });
|
|
922
|
-
},
|
|
923
|
-
getTransactionDetail: (id) => {
|
|
924
|
-
return TransactionAPI.get(`/${id}`);
|
|
925
|
-
},
|
|
926
|
-
getTransactionDetailAssets: (id, params) => {
|
|
927
|
-
return TransactionAPI.get(`/${id}/request`, { params });
|
|
928
|
-
},
|
|
929
|
-
getRequestFilterOptions: (id, field) => {
|
|
930
|
-
const params = {};
|
|
931
|
-
if (field) {
|
|
932
|
-
params[field] = true;
|
|
933
|
-
} else {
|
|
934
|
-
params.nameOptions = true;
|
|
935
|
-
params.brandOptions = true;
|
|
936
|
-
params.modelOptions = true;
|
|
937
|
-
}
|
|
938
|
-
return TransactionAPI.get(`/${id}/request/options`, { params });
|
|
939
|
-
},
|
|
940
|
-
getOldTransactionLog: (id) => {
|
|
941
|
-
return TransactionAPI.get(`/request/${id}/transaction-log`);
|
|
942
|
-
},
|
|
943
|
-
getOldTransactionOptions: (field) => {
|
|
944
|
-
const params = {};
|
|
945
|
-
params[field] = true;
|
|
946
|
-
return TransactionAPI.get("/options", { params });
|
|
947
|
-
},
|
|
948
|
-
postOldCreateTransaction: (body) => {
|
|
949
|
-
return TransactionAPI.post("/", body);
|
|
950
|
-
},
|
|
951
|
-
putCancelTransactions: (ids) => {
|
|
952
|
-
const body = { id: ids };
|
|
953
|
-
return TransactionAPI.put("/cancel", body);
|
|
402
|
+
const ChangelogServices = {
|
|
403
|
+
getChangelogList: (params) => {
|
|
404
|
+
return API.get("/change-log", { params });
|
|
954
405
|
},
|
|
955
|
-
|
|
956
|
-
return
|
|
406
|
+
getChangelogListOptions: (params) => {
|
|
407
|
+
return API.get("/change-log/options", { params });
|
|
957
408
|
},
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
return TransactionAPI.put("/request/cancel", body);
|
|
409
|
+
getSessionLogList: (params) => {
|
|
410
|
+
return API.get("/session-log", { params });
|
|
961
411
|
},
|
|
962
|
-
|
|
963
|
-
return
|
|
412
|
+
getSessionLogListOptions: (params) => {
|
|
413
|
+
return API.get("/session-log/options", {
|
|
414
|
+
params
|
|
415
|
+
});
|
|
964
416
|
},
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
params[field] = true;
|
|
968
|
-
return TransactionAPI.get("/history/options", { params });
|
|
417
|
+
getTransactionLog: (params) => {
|
|
418
|
+
return API.get("/transaction-log", { params });
|
|
969
419
|
},
|
|
970
|
-
|
|
971
|
-
|
|
420
|
+
/**
|
|
421
|
+
* Retrieves the transaction log options.
|
|
422
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
423
|
+
*/
|
|
424
|
+
getTransactionLogOption: (params) => {
|
|
425
|
+
return API.get("/transaction-log/options", { params });
|
|
972
426
|
},
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
params[field] = true;
|
|
976
|
-
return TransactionAPI.get("/history/by-asset/options", { params });
|
|
427
|
+
getUserDetailSystemLogList: (params) => {
|
|
428
|
+
return API.get("/change-log", { params });
|
|
977
429
|
},
|
|
978
|
-
|
|
979
|
-
return
|
|
430
|
+
getUserDetailSystemLogOption: (params) => {
|
|
431
|
+
return API.get("/change-log/options", { params });
|
|
980
432
|
},
|
|
981
|
-
|
|
982
|
-
return
|
|
433
|
+
getUserDetailUserLogBorrowingList: (userId, params) => {
|
|
434
|
+
return API.get(`/borrowing-log/${userId}`, { params });
|
|
983
435
|
},
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
return PrelistAPI.get("/", { params });
|
|
436
|
+
getUserDetailUserLogAssignmentList: (userId, params) => {
|
|
437
|
+
return API.get(`/assignment-log/${userId}`, { params });
|
|
987
438
|
},
|
|
988
|
-
|
|
989
|
-
return
|
|
439
|
+
getUserDetailUserLogBorrowingOption: (userId, params) => {
|
|
440
|
+
return API.get(`/borrowing-log/${userId}/options`, { params });
|
|
990
441
|
},
|
|
991
|
-
|
|
992
|
-
return
|
|
993
|
-
params: {
|
|
994
|
-
id: JSON.stringify(ids)
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
},
|
|
998
|
-
getPrelistAssets: (id) => {
|
|
999
|
-
const params = { id };
|
|
1000
|
-
return PrelistAPI.get("/request", { params });
|
|
1001
|
-
},
|
|
1002
|
-
// APPROVAL
|
|
1003
|
-
getApprovals: (status, params) => {
|
|
1004
|
-
const formattedParams = { ...params, status: JSON.stringify([status]) };
|
|
1005
|
-
return ApprovalAPI$1.get("/", { params: formattedParams });
|
|
1006
|
-
},
|
|
1007
|
-
getApprovalOptions: (status, field) => {
|
|
1008
|
-
const params = {
|
|
1009
|
-
status: JSON.stringify([status])
|
|
1010
|
-
};
|
|
1011
|
-
params[field] = true;
|
|
1012
|
-
return ApprovalAPI$1.get("/options", { params });
|
|
1013
|
-
},
|
|
1014
|
-
getApprovalDetail: (id, approvalType) => {
|
|
1015
|
-
const params = {
|
|
1016
|
-
groupType: approvalType
|
|
1017
|
-
};
|
|
1018
|
-
return ApprovalAPI$1.get(`/transaction/${id}`, { params });
|
|
1019
|
-
},
|
|
1020
|
-
getApprovalDetailOptions: (id, field, approvalType) => {
|
|
1021
|
-
const params = {};
|
|
1022
|
-
params[field] = true;
|
|
1023
|
-
params.groupType = approvalType;
|
|
1024
|
-
return ApprovalAPI$1.get(`/transaction/${id}/options`, { params });
|
|
1025
|
-
},
|
|
1026
|
-
putUpdateApproval: (body) => {
|
|
1027
|
-
return ApprovalAPI$1.put("/approve", body);
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
|
-
const API$A = createAxiosInstance({
|
|
1031
|
-
prefix: "/transfer/v2"
|
|
1032
|
-
});
|
|
1033
|
-
const TransferServicesGo = {
|
|
1034
|
-
...TransferServices,
|
|
1035
|
-
getTransactionData: (params) => {
|
|
1036
|
-
return API$A.get("/transaction", { params });
|
|
1037
|
-
},
|
|
1038
|
-
getTransactionOptions: (params) => {
|
|
1039
|
-
return API$A.get("/transaction/options", { params });
|
|
1040
|
-
},
|
|
1041
|
-
getTransactionLog: (id) => {
|
|
1042
|
-
return API$A.get(`/transaction/request/${id}/transaction-log`);
|
|
1043
|
-
},
|
|
1044
|
-
postCreateTransaction: (body) => {
|
|
1045
|
-
return API$A.post("/transaction", body);
|
|
1046
|
-
}
|
|
1047
|
-
};
|
|
1048
|
-
const API$z = createAxiosInstance({
|
|
1049
|
-
env: "APP_TAGSAMURAI_API",
|
|
1050
|
-
prefix: "/borrowing/v2"
|
|
1051
|
-
});
|
|
1052
|
-
const BorrowServices = {
|
|
1053
|
-
getTaskBorrowing: async (params) => {
|
|
1054
|
-
return API$z.get("/transaction/my-asset/task", { params });
|
|
1055
|
-
},
|
|
1056
|
-
getTaskBorrowingOptions: async (params) => {
|
|
1057
|
-
return API$z.get("/transaction/my-asset/task/options", { params });
|
|
1058
|
-
},
|
|
1059
|
-
getBorrowedAsset: async (params) => {
|
|
1060
|
-
return API$z.get("/transaction/my-asset/borrowed-asset", { params });
|
|
1061
|
-
},
|
|
1062
|
-
getBorrowedOptions: async (params) => {
|
|
1063
|
-
return API$z.get("/transaction/my-asset/borrowed-asset/options", { params });
|
|
1064
|
-
},
|
|
1065
|
-
getHistory: async (params) => {
|
|
1066
|
-
return API$z.get("/transaction/my-asset/history", { params });
|
|
1067
|
-
},
|
|
1068
|
-
getHistoryOptions: async (params) => {
|
|
1069
|
-
return API$z.get("/transaction/my-asset/history/options", { params });
|
|
1070
|
-
},
|
|
1071
|
-
postAddPrelistData: (body) => {
|
|
1072
|
-
return API$z.post("/prelist", body);
|
|
1073
|
-
},
|
|
1074
|
-
putCancelBorrowing: async (body) => {
|
|
1075
|
-
return API$z.put("/transaction/cancel", { id: body.id });
|
|
1076
|
-
},
|
|
1077
|
-
putCancelExtensionRequest: async (body) => {
|
|
1078
|
-
return API$z.put(`/transaction/${body.id}/cancel-extension`);
|
|
1079
|
-
},
|
|
1080
|
-
putCancelRequestReport: async (body) => {
|
|
1081
|
-
return API$z.put(`/transaction/request/${body.id}/cancel-report`);
|
|
1082
|
-
},
|
|
1083
|
-
putDeclineExtensionRequest: async (body) => {
|
|
1084
|
-
return API$z.put("transaction/request/decline", body);
|
|
1085
|
-
},
|
|
1086
|
-
putUpdateRequestExtension: async (body) => {
|
|
1087
|
-
return API$z.put("transaction/request/duration", body);
|
|
1088
|
-
},
|
|
1089
|
-
// ------------------------------------------------------------------------------------------------------------ //
|
|
1090
|
-
getBorrowingPrelist: (params) => {
|
|
1091
|
-
return API$z.get("/prelist", { params });
|
|
1092
|
-
},
|
|
1093
|
-
getBorrowingPrelistOptions: (params) => {
|
|
1094
|
-
return API$z.get("/prelist/options", { params });
|
|
1095
|
-
},
|
|
1096
|
-
deleteBorrowingPrelist: (id) => {
|
|
1097
|
-
return API$z.delete("/prelist", { data: { id } });
|
|
1098
|
-
},
|
|
1099
|
-
getBorrowingRequest: (params) => {
|
|
1100
|
-
return API$z.get("/prelist/request", { params });
|
|
1101
|
-
},
|
|
1102
|
-
getBorrowingRequestOptions: (params) => {
|
|
1103
|
-
return API$z.get("/prelist/request/options", { params });
|
|
1104
|
-
},
|
|
1105
|
-
postBorrowingRequest: (data) => {
|
|
1106
|
-
return API$z.post("/prelist/request", data);
|
|
1107
|
-
},
|
|
1108
|
-
putBorrowingRequest: (data) => {
|
|
1109
|
-
return API$z.put("/prelist/request", data);
|
|
1110
|
-
},
|
|
1111
|
-
deleteBorrowingRequest: (id) => {
|
|
1112
|
-
return API$z.delete("/prelist/request", { data: { id } });
|
|
1113
|
-
},
|
|
1114
|
-
postBorrowingTransaction: (data) => {
|
|
1115
|
-
return API$z.post("/transaction", data, { params: { sourceWeb: true } });
|
|
1116
|
-
},
|
|
1117
|
-
getBorrowingTransaction: (params) => {
|
|
1118
|
-
return API$z.get("/transaction", { params });
|
|
1119
|
-
},
|
|
1120
|
-
getBorrowingTransactionOptions: (params) => {
|
|
1121
|
-
return API$z.get("/transaction/options", { params });
|
|
1122
|
-
},
|
|
1123
|
-
putCancelBorrowingTransaction: (id) => {
|
|
1124
|
-
return API$z.put("/transaction/cancel", { id });
|
|
1125
|
-
},
|
|
1126
|
-
putCancelBorrowingRequest: (id) => {
|
|
1127
|
-
return API$z.put("/transaction/request/cancel", { id });
|
|
1128
|
-
},
|
|
1129
|
-
putCancelExtendBorrowingRequest: (id) => {
|
|
1130
|
-
return API$z.put("/transaction/request/extend/cancel", { id });
|
|
1131
|
-
},
|
|
1132
|
-
getBorrowingTransactionDetail: (id) => {
|
|
1133
|
-
return API$z.get(`/transaction/${id}`);
|
|
1134
|
-
},
|
|
1135
|
-
getBorrowingTransactionRequestList: (params) => {
|
|
1136
|
-
return API$z.get("/transaction/request", { params });
|
|
1137
|
-
},
|
|
1138
|
-
getBorrowingTransactionRequest: (id, params) => {
|
|
1139
|
-
return API$z.get(`/transaction/${id}/request`, { params });
|
|
1140
|
-
},
|
|
1141
|
-
getBorrowingTransactionRequestOptions: (id, params) => {
|
|
1142
|
-
return API$z.get(`/transaction/${id}/request/options`, { params });
|
|
1143
|
-
},
|
|
1144
|
-
putBorrowingTransactionRequest: (id, data) => {
|
|
1145
|
-
return API$z.put(`/transaction/${id}/request`, data);
|
|
1146
|
-
},
|
|
1147
|
-
getApprovalList: (id) => {
|
|
1148
|
-
return API$z.get(`/approval/transaction/${id}/transaction`);
|
|
1149
|
-
},
|
|
1150
|
-
putUpdateEmailorBorrower: (id, data) => {
|
|
1151
|
-
return API$z.put(`/transaction/${id}/update-email-or-borrower`, data);
|
|
1152
|
-
},
|
|
1153
|
-
getTransactionRequestScan: (id, tag) => {
|
|
1154
|
-
return API$z.get(`/transaction/${id}/request/scan`, { params: { tag } });
|
|
1155
|
-
},
|
|
1156
|
-
putUpdateBorrower: (id, userId) => {
|
|
1157
|
-
return API$z.put(`/transaction/${id}/user`, { user: userId });
|
|
1158
|
-
},
|
|
1159
|
-
postSendConfirmationEmail: (id) => {
|
|
1160
|
-
return API$z.post(`/transaction/${id}/send-confirmation-email`);
|
|
1161
|
-
},
|
|
1162
|
-
putVerifyRequests: (id, data) => {
|
|
1163
|
-
return API$z.put(`/transaction/${id}/verify-requests`, data);
|
|
1164
|
-
},
|
|
1165
|
-
getBorrowingTransactionHistoryByTransaction: (params) => {
|
|
1166
|
-
return API$z.get("/transaction/history/by-transaction", { params });
|
|
1167
|
-
},
|
|
1168
|
-
getBorrowingTransactionHistoryByAsset: (params) => {
|
|
1169
|
-
return API$z.get("/transaction/history/by-asset", { params });
|
|
1170
|
-
},
|
|
1171
|
-
getBorrowingTransactionHistoryOptions: (params) => {
|
|
1172
|
-
return API$z.get("/transaction/history/options", { params });
|
|
1173
|
-
},
|
|
1174
|
-
putBorrowingVerifyToken: (token) => {
|
|
1175
|
-
return API$z.put("/transaction/verify-token", { token });
|
|
1176
|
-
},
|
|
1177
|
-
putBorrowingHandoverConfirmation: (data) => {
|
|
1178
|
-
return API$z.put("/transaction/handover-confirmation", data);
|
|
1179
|
-
},
|
|
1180
|
-
putBorrowingHandover: (id) => {
|
|
1181
|
-
return API$z.put(`/transaction/${id}/handover`);
|
|
1182
|
-
},
|
|
1183
|
-
putBorrowingExtendRequest: (data) => {
|
|
1184
|
-
return API$z.put("/transaction/request/extend", data);
|
|
1185
|
-
},
|
|
1186
|
-
putBorrowingExtendApproval: (data) => {
|
|
1187
|
-
return API$z.put("/approval/approve/request-extension", data, {
|
|
1188
|
-
params: { sourceWeb: true }
|
|
1189
|
-
});
|
|
1190
|
-
},
|
|
1191
|
-
putBorrowingDeclineExtendRequest: (id) => {
|
|
1192
|
-
return API$z.put("/transaction/request/decline", { id });
|
|
1193
|
-
},
|
|
1194
|
-
getBorrowingBorrowedAsset: (params) => {
|
|
1195
|
-
return API$z.get("/transaction/request/borrowed/by-asset", { params });
|
|
1196
|
-
},
|
|
1197
|
-
getBorrowingBorrowedAssetOptions: (params) => {
|
|
1198
|
-
return API$z.get("/transaction/request/borrowed/by-asset/options", {
|
|
1199
|
-
params
|
|
1200
|
-
});
|
|
1201
|
-
},
|
|
1202
|
-
getBorrowingBorrowedBorrower: (params) => {
|
|
1203
|
-
return API$z.get("/transaction/request/borrowed/by-user", { params });
|
|
1204
|
-
},
|
|
1205
|
-
putBorrowingReportDamaged: (id, data) => {
|
|
1206
|
-
return API$z.put(`/transaction/request/${id}/damaged`, data);
|
|
1207
|
-
},
|
|
1208
|
-
putBorrowingReportMissing: (id, data) => {
|
|
1209
|
-
return API$z.put(`/transaction/request/${id}/missing`, data);
|
|
1210
|
-
},
|
|
1211
|
-
putBorrowingReturn: (id) => {
|
|
1212
|
-
return API$z.put("/transaction/request/return", { id });
|
|
1213
|
-
},
|
|
1214
|
-
getBorrowingLog: (id) => {
|
|
1215
|
-
return API$z.get(`/transaction/request/${id}/transaction-log`);
|
|
1216
|
-
},
|
|
1217
|
-
putConfirmReportDone: (id, data) => {
|
|
1218
|
-
return API$z.put(`/transaction/request/${id}/confirm-report-done`, data);
|
|
1219
|
-
},
|
|
1220
|
-
putCancelReportBulk: (id) => {
|
|
1221
|
-
return API$z.put("/transaction/request/cancel-report", {
|
|
1222
|
-
id
|
|
1223
|
-
});
|
|
1224
|
-
},
|
|
1225
|
-
putBorrowingEditExtension: (data) => {
|
|
1226
|
-
return API$z.put("/transaction/request/duration", data);
|
|
1227
|
-
},
|
|
1228
|
-
getApproval: (params) => {
|
|
1229
|
-
return API$z.get("/approval", { params });
|
|
1230
|
-
},
|
|
1231
|
-
getApprovalOptions: (params) => {
|
|
1232
|
-
return API$z.get("/approval/options", { params });
|
|
1233
|
-
},
|
|
1234
|
-
getApprovalTransactionRequest: (id, params) => {
|
|
1235
|
-
return API$z.get(`/approval/transaction/${id}`, { params });
|
|
1236
|
-
},
|
|
1237
|
-
getApprovalTransactionRequestOptions: (id, params) => {
|
|
1238
|
-
return API$z.get(`/approval/transaction/${id}/options`, { params });
|
|
1239
|
-
},
|
|
1240
|
-
putApprovalApprove: (data) => {
|
|
1241
|
-
return API$z.put("/approval/approve", data, {
|
|
1242
|
-
params: { sourceWeb: true }
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
const API$y = createAxiosInstance({
|
|
1247
|
-
prefix: "/borrowing/v2"
|
|
1248
|
-
});
|
|
1249
|
-
const BorrowServicesGo = {
|
|
1250
|
-
...BorrowServices,
|
|
1251
|
-
// Temporary inclusion of methods from OldBorrowServices. Move individual methods here once they are refactored and ready.
|
|
1252
|
-
getTransactions: async (params) => {
|
|
1253
|
-
return API$y.get("/transaction", { params });
|
|
1254
|
-
},
|
|
1255
|
-
getTransactionOptions: async (params) => {
|
|
1256
|
-
return API$y.get("/transaction/options", { params });
|
|
1257
|
-
},
|
|
1258
|
-
getTransactionLog: async (id) => {
|
|
1259
|
-
return API$y.get(`/transaction/request/${id}/transaction-log`);
|
|
1260
|
-
},
|
|
1261
|
-
postTransaction: async (body) => {
|
|
1262
|
-
return API$y.post("/transaction", body);
|
|
1263
|
-
},
|
|
1264
|
-
putTransaction: async (body) => {
|
|
1265
|
-
return API$y.put("/transaction", body);
|
|
1266
|
-
},
|
|
1267
|
-
putTransactionReturn: async (requestIds) => {
|
|
1268
|
-
const body = { id: requestIds };
|
|
1269
|
-
return API$y.put("/transaction/return", body);
|
|
1270
|
-
},
|
|
1271
|
-
putCancelReport: async (requestIds) => {
|
|
1272
|
-
const body = { id: requestIds };
|
|
1273
|
-
return API$y.put("/transaction/request/cancel-report", body);
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
const API$x = createAxiosInstance({
|
|
1277
|
-
prefix: "/disposal/v2/"
|
|
1278
|
-
});
|
|
1279
|
-
const DisposalServices$1 = {
|
|
1280
|
-
getReportedDisposal: (params) => {
|
|
1281
|
-
return API$x.get("/report", { params });
|
|
1282
|
-
},
|
|
1283
|
-
getReportedDisposalOptions: (params) => {
|
|
1284
|
-
return API$x.get("/report/options", { params });
|
|
1285
|
-
},
|
|
1286
|
-
postReportDisposal: (body) => {
|
|
1287
|
-
return API$x.post("/report", body);
|
|
1288
|
-
},
|
|
1289
|
-
deleteCancelReport: (params) => {
|
|
1290
|
-
params.isFromDisposal = "false";
|
|
1291
|
-
return API$x.delete("/report/cancel-report", { params });
|
|
1292
|
-
},
|
|
1293
|
-
deleteDeclineReport: (params) => {
|
|
1294
|
-
params.isFromDisposal = "true";
|
|
1295
|
-
return API$x.delete("/report/cancel-report", { params });
|
|
1296
|
-
},
|
|
1297
|
-
getDisposalHistory: (params) => {
|
|
1298
|
-
return API$x.get("/transaction", { params });
|
|
1299
|
-
},
|
|
1300
|
-
getHistoryByAssetOptions: (params) => {
|
|
1301
|
-
return API$x.get("/transaction/options", { params });
|
|
1302
|
-
},
|
|
1303
|
-
getDisposalTransactionLog: (requestId) => {
|
|
1304
|
-
return API$x.get(`/transaction/request/${requestId}/transaction-log`);
|
|
1305
|
-
},
|
|
1306
|
-
postCreateTransaction: (body) => {
|
|
1307
|
-
return API$x.post("/transaction", body);
|
|
1308
|
-
}
|
|
1309
|
-
};
|
|
1310
|
-
const API$w = createAxiosInstance({
|
|
1311
|
-
prefix: "/report/v2/reports"
|
|
1312
|
-
});
|
|
1313
|
-
const ReportServices = {
|
|
1314
|
-
getReportList: (params) => {
|
|
1315
|
-
return API$w.get("/schedules", { params });
|
|
1316
|
-
},
|
|
1317
|
-
getReportSchedule: (scheduleId) => {
|
|
1318
|
-
return API$w.get("/schedules/" + scheduleId);
|
|
1319
|
-
},
|
|
1320
|
-
getUniqueScheduleName: (name) => {
|
|
1321
|
-
return API$w.get("/schedules/unique-name", { params: { name } });
|
|
1322
|
-
},
|
|
1323
|
-
getFilterOptions: (params) => {
|
|
1324
|
-
return API$w.get("/schedules/options", { params });
|
|
1325
|
-
},
|
|
1326
|
-
putSetActive: (body) => {
|
|
1327
|
-
return API$w.put("/schedules/set-active", body);
|
|
1328
|
-
},
|
|
1329
|
-
putEditSchedule: (id, body) => {
|
|
1330
|
-
return API$w.put(`/schedules/${id}`, body);
|
|
1331
|
-
},
|
|
1332
|
-
deleteReports: (id) => {
|
|
1333
|
-
return API$w.delete("/schedules", { params: { id } });
|
|
1334
|
-
},
|
|
1335
|
-
postCreateSchedule: (data) => {
|
|
1336
|
-
return API$w.post("/schedules", data);
|
|
1337
|
-
},
|
|
1338
|
-
postDownloadReport: (data) => {
|
|
1339
|
-
return API$w.post("/download", data, { responseType: "arraybuffer" });
|
|
1340
|
-
},
|
|
1341
|
-
postGenerateReport: (data) => {
|
|
1342
|
-
return API$w.post("/generate", data);
|
|
1343
|
-
}
|
|
1344
|
-
};
|
|
1345
|
-
const API$v = createAxiosInstance({
|
|
1346
|
-
prefix: "/settings-attribute/v2"
|
|
1347
|
-
});
|
|
1348
|
-
const getEndpoint = (type) => {
|
|
1349
|
-
return type === "category" ? "category" : "groups";
|
|
1350
|
-
};
|
|
1351
|
-
const GroupCategoryServices = {
|
|
1352
|
-
getGroupCategory: (type, params) => {
|
|
1353
|
-
return API$v.get(`/${getEndpoint(type)}/tree`, { params });
|
|
1354
|
-
},
|
|
1355
|
-
getCategoryTree: () => {
|
|
1356
|
-
return API$v.get("/category/tree");
|
|
1357
|
-
},
|
|
1358
|
-
getGroupTree: (params) => {
|
|
1359
|
-
return API$v.get("/groups/tree", { params });
|
|
1360
|
-
},
|
|
1361
|
-
// Doesn't exist in company plan other than "Basic"
|
|
1362
|
-
getGroupCategoryList: (type, groupId, params) => {
|
|
1363
|
-
return API$v.get(`/${getEndpoint(type)}/${groupId}`, { params });
|
|
1364
|
-
},
|
|
1365
|
-
getNames: (type) => {
|
|
1366
|
-
return API$v.get(`/${getEndpoint(type)}/names`);
|
|
1367
|
-
},
|
|
1368
|
-
getCodes: (type) => {
|
|
1369
|
-
return API$v.get(`/${getEndpoint(type)}/codes`);
|
|
1370
|
-
},
|
|
1371
|
-
postCreateGroupCategory: (type, body) => {
|
|
1372
|
-
return API$v.post(`/${getEndpoint(type)}`, body);
|
|
1373
|
-
},
|
|
1374
|
-
putEditGroupCategory: (type, body, objectId) => {
|
|
1375
|
-
return API$v.put(`/${getEndpoint(type)}/${objectId}`, body);
|
|
1376
|
-
},
|
|
1377
|
-
// Doesn't exist in company plan other than "Enterprise"
|
|
1378
|
-
putMoveGroup: (body, objectId) => {
|
|
1379
|
-
return API$v.put(`/groups/${objectId}/move-group`, body);
|
|
1380
|
-
},
|
|
1381
|
-
// Doesn't exist in company plan other than "Enterprise"
|
|
1382
|
-
putEditBulkGroups: async (body) => {
|
|
1383
|
-
return API$v.put("/groups/bulk", body);
|
|
1384
|
-
},
|
|
1385
|
-
deleteGroupCategory: (type, body, objectId) => {
|
|
1386
|
-
return API$v.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
|
|
1387
|
-
}
|
|
1388
|
-
};
|
|
1389
|
-
const API$u = createAxiosInstance({
|
|
1390
|
-
prefix: "/settings-attribute/v2/alias-code"
|
|
1391
|
-
});
|
|
1392
|
-
const AliasCodeServices = {
|
|
1393
|
-
getAliasCode: () => {
|
|
1394
|
-
return API$u.get("/");
|
|
1395
|
-
},
|
|
1396
|
-
postAliasCode: (data) => {
|
|
1397
|
-
return API$u.post("/", data);
|
|
1398
|
-
},
|
|
1399
|
-
getAliasCodeList: (params) => {
|
|
1400
|
-
return API$u.get(`/${params.object}/code-list`, { params });
|
|
1401
|
-
}
|
|
1402
|
-
};
|
|
1403
|
-
const API$t = createAxiosInstance({
|
|
1404
|
-
prefix: "/settings-attribute/v2/general-settings"
|
|
1405
|
-
});
|
|
1406
|
-
const GeneralSettingsServices = {
|
|
1407
|
-
getGeneralSettings: () => {
|
|
1408
|
-
return API$t.get("/");
|
|
1409
|
-
},
|
|
1410
|
-
putUpdateGeneralSettings: (data) => {
|
|
1411
|
-
return API$t.put("/", data);
|
|
1412
|
-
}
|
|
1413
|
-
};
|
|
1414
|
-
const API$s = createAxiosInstance({
|
|
1415
|
-
prefix: "/settings-attribute/v2/custom-field"
|
|
1416
|
-
});
|
|
1417
|
-
const CustomFieldServices = {
|
|
1418
|
-
getCustomField: async (params) => {
|
|
1419
|
-
return API$s.get("/", { params });
|
|
1420
|
-
},
|
|
1421
|
-
getCustomFieldsByCategory: (category, params) => {
|
|
1422
|
-
return API$s.get(`/${category}`, { params });
|
|
1423
|
-
},
|
|
1424
|
-
getOptions: async (params) => {
|
|
1425
|
-
return API$s.get("/options", { params });
|
|
1426
|
-
},
|
|
1427
|
-
postCreateCustomField: async (params, data) => {
|
|
1428
|
-
return API$s.post("/", data, { params });
|
|
1429
|
-
},
|
|
1430
|
-
putEditCustomField: async (params, data, id) => {
|
|
1431
|
-
return API$s.put(`/${id}`, data, { params });
|
|
1432
|
-
},
|
|
1433
|
-
putChangeStatus: async (params, data) => {
|
|
1434
|
-
return API$s.put("/bulk", data, { params });
|
|
1435
|
-
},
|
|
1436
|
-
deleteCustomField: async (params) => {
|
|
1437
|
-
return API$s.delete("/bulk", { params });
|
|
1438
|
-
},
|
|
1439
|
-
getUsedCustomFields: async () => {
|
|
1440
|
-
return API$s.get("/used-by-assets");
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
const API$r = createAxiosInstance({
|
|
1444
|
-
prefix: "/settings-attribute/v2/asset-name-policy"
|
|
1445
|
-
});
|
|
1446
|
-
const AssetPolicyServices = {
|
|
1447
|
-
getList: (params) => {
|
|
1448
|
-
return API$r.get("/", { params });
|
|
1449
|
-
},
|
|
1450
|
-
getListFilterOptions: (params) => {
|
|
1451
|
-
return API$r.get("/options");
|
|
1452
|
-
},
|
|
1453
|
-
putUpdatePolicy: (body) => {
|
|
1454
|
-
return API$r.put("/", body);
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
const API$q = createAxiosInstance({
|
|
1458
|
-
prefix: "/settings-user-role/v2/auth"
|
|
1459
|
-
});
|
|
1460
|
-
const onRejected$1 = (error) => {
|
|
1461
|
-
var _a, _b, _c, _d;
|
|
1462
|
-
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") {
|
|
1463
|
-
window.onblur = void 0;
|
|
1464
|
-
window.onfocus = void 0;
|
|
1465
|
-
window.sessionExpired = true;
|
|
1466
|
-
return window.dispatchEvent(new CustomEvent("user:expired"));
|
|
1467
|
-
}
|
|
1468
|
-
return Promise.reject(error);
|
|
1469
|
-
};
|
|
1470
|
-
const AuthServices$1 = {
|
|
1471
|
-
reLogin: (body) => {
|
|
1472
|
-
API$q.interceptors.response.use((response) => {
|
|
1473
|
-
return response;
|
|
1474
|
-
}, onRejected$1);
|
|
1475
|
-
return API$q.post("/login", body);
|
|
1476
|
-
}
|
|
1477
|
-
};
|
|
1478
|
-
const DepreciationMethodAPI = createAxiosInstance({
|
|
1479
|
-
prefix: "/settings-attribute/v2/depreciation-method"
|
|
1480
|
-
});
|
|
1481
|
-
const DepreciationGroupAPI = createAxiosInstance({
|
|
1482
|
-
prefix: "/settings-attribute/v2/depreciation-group"
|
|
1483
|
-
});
|
|
1484
|
-
const AccountCodeAPI = createAxiosInstance({
|
|
1485
|
-
prefix: "/settings-attribute/v2/account-code"
|
|
1486
|
-
});
|
|
1487
|
-
const AccountingServices = {
|
|
1488
|
-
getDepreciationGroupDropdown: () => {
|
|
1489
|
-
return DepreciationGroupAPI.get("/dropdown");
|
|
1490
|
-
},
|
|
1491
|
-
//https://dev-api.tagsamurai.com/settings-attribute-go/v2/account-code/dropdown
|
|
1492
|
-
getAccountDropdown: () => {
|
|
1493
|
-
return AccountCodeAPI.get("/dropdown");
|
|
1494
|
-
},
|
|
1495
|
-
// Depreciation Method API Services
|
|
1496
|
-
getDepreciationMethod: () => {
|
|
1497
|
-
return DepreciationMethodAPI.get("");
|
|
1498
|
-
},
|
|
1499
|
-
changeDepreciationMethod: (body) => {
|
|
1500
|
-
return DepreciationMethodAPI.put("", {
|
|
1501
|
-
depreciationMethod: body
|
|
1502
|
-
});
|
|
1503
|
-
},
|
|
1504
|
-
cancelChangeDepreciationMethod: () => {
|
|
1505
|
-
return DepreciationMethodAPI.put("/cancel");
|
|
1506
|
-
},
|
|
1507
|
-
// Depreciation Group API Services
|
|
1508
|
-
getDepreciationGroupList: (params) => {
|
|
1509
|
-
return DepreciationGroupAPI.get("", { params });
|
|
1510
|
-
},
|
|
1511
|
-
deleteDepreciationGroup: (id) => {
|
|
1512
|
-
return DepreciationGroupAPI.delete("", {
|
|
1513
|
-
data: { id }
|
|
1514
|
-
});
|
|
1515
|
-
},
|
|
1516
|
-
createNewDepreciationGroup: (body) => {
|
|
1517
|
-
return DepreciationGroupAPI.post("", body);
|
|
1518
|
-
},
|
|
1519
|
-
editDepreciationGroup: (body, id) => {
|
|
1520
|
-
return DepreciationGroupAPI.put(`/${id}`, body);
|
|
1521
|
-
},
|
|
1522
|
-
getFilterOptions: (params) => {
|
|
1523
|
-
return DepreciationGroupAPI.get("/options", { params });
|
|
1524
|
-
},
|
|
1525
|
-
// Account Code API Services
|
|
1526
|
-
getAccountCodeList: (params) => {
|
|
1527
|
-
return AccountCodeAPI.get("", { params });
|
|
1528
|
-
},
|
|
1529
|
-
deleteAccountCode: (id) => {
|
|
1530
|
-
return AccountCodeAPI.delete("", {
|
|
1531
|
-
data: { id }
|
|
1532
|
-
});
|
|
1533
|
-
},
|
|
1534
|
-
createNewAccountCode: (body) => {
|
|
1535
|
-
return AccountCodeAPI.post("", body);
|
|
1536
|
-
},
|
|
1537
|
-
editAccountCode: (body, id) => {
|
|
1538
|
-
return AccountCodeAPI.put(`/${id}`, body);
|
|
1539
|
-
}
|
|
1540
|
-
};
|
|
1541
|
-
const API$p = createAxiosInstance({
|
|
1542
|
-
env: "APP_TAGSAMURAI_API",
|
|
1543
|
-
prefix: "/settings-attribute/v2/asset-name"
|
|
1544
|
-
});
|
|
1545
|
-
const AssetNameServices = {
|
|
1546
|
-
getDropdown: (params) => {
|
|
1547
|
-
return API$p.get("/dropdown", { params });
|
|
1548
|
-
},
|
|
1549
|
-
getAssetNameDetail: (id) => {
|
|
1550
|
-
return API$p.get(`/${id}`);
|
|
1551
|
-
},
|
|
1552
|
-
getAssetsByAssetName: (id, params) => {
|
|
1553
|
-
return API$p.get(`/${id}/list-asset`, { params });
|
|
1554
|
-
},
|
|
1555
|
-
getAssetNameList: (params) => {
|
|
1556
|
-
return API$p.get("/", { params });
|
|
1557
|
-
},
|
|
1558
|
-
getUnpairedAssetName: (params) => {
|
|
1559
|
-
return API$p.get("/unpaired", { params });
|
|
1560
|
-
},
|
|
1561
|
-
getOptions: (params) => {
|
|
1562
|
-
return API$p.get("/options", { params });
|
|
1563
|
-
}
|
|
1564
|
-
};
|
|
1565
|
-
const API$o = createAxiosInstance({
|
|
1566
|
-
env: "APP_TAGSAMURAI_API",
|
|
1567
|
-
prefix: "/audit/v2"
|
|
1568
|
-
});
|
|
1569
|
-
const API_IOT = createAxiosInstance({
|
|
1570
|
-
env: "APP_TAGSAMURAI_API",
|
|
1571
|
-
prefix: "/iot/v2"
|
|
1572
|
-
});
|
|
1573
|
-
const TaskServices = {
|
|
1574
|
-
getTaskList: (params) => {
|
|
1575
|
-
return API$o.get("/audit/task", { params });
|
|
1576
|
-
},
|
|
1577
|
-
getTaskHistory: (params) => {
|
|
1578
|
-
return API$o.get("/audit/task/history", { params });
|
|
1579
|
-
},
|
|
1580
|
-
extendAuditDuration: (body, id) => {
|
|
1581
|
-
return API$o.put(`/audit/task/${id}/extend`, body);
|
|
1582
|
-
},
|
|
1583
|
-
stopAudit: (id, body) => {
|
|
1584
|
-
return API$o.put(`/audit/task/${id}/stop`, body);
|
|
1585
|
-
},
|
|
1586
|
-
cancelAuditTask: (id) => {
|
|
1587
|
-
return API$o.put(`/audit/task/${id}/cancel`);
|
|
1588
|
-
},
|
|
1589
|
-
getTaskDetail: (id) => {
|
|
1590
|
-
return API$o.get(`/audit/task/${id}`);
|
|
1591
|
-
},
|
|
1592
|
-
getInAuditTask: (params) => {
|
|
1593
|
-
return API$o.get("/audit/scheduled-asset/in-audit", { params });
|
|
1594
|
-
},
|
|
1595
|
-
getTaskDetailAssets: (params, taskId) => {
|
|
1596
|
-
return API$o.get(`/audit/task/${taskId}/view-asset-detail`, { params });
|
|
1597
|
-
},
|
|
1598
|
-
getAuditedTask: (params) => {
|
|
1599
|
-
return API$o.get("/audit/scheduled-asset/audited", { params });
|
|
1600
|
-
},
|
|
1601
|
-
getAuditLog: (id) => {
|
|
1602
|
-
return API$o.get(`/audit/scheduled-asset/${id}/log`);
|
|
1603
|
-
},
|
|
1604
|
-
getTaskEventLog: (params) => {
|
|
1605
|
-
return API$o.get("/audit/task/task-event-log", { params });
|
|
1606
|
-
},
|
|
1607
|
-
getTaskTimelineEventLog: (idTask) => {
|
|
1608
|
-
return API$o.get(`/audit/task/${idTask}/event-log`);
|
|
1609
|
-
},
|
|
1610
|
-
scanAssetTAG: (body, idTask) => {
|
|
1611
|
-
return API$o.put(`/audit/task/${idTask}/scan`, body);
|
|
1612
|
-
},
|
|
1613
|
-
submitAssetCondition: (body, idAsset) => {
|
|
1614
|
-
const headers = body.picture ? { "Content-Type": "multipart/form-data" } : { "Content-Type": "application/json" };
|
|
1615
|
-
return API$o.put(`/audit/scheduled-asset/${idAsset}/update/condition`, body, {
|
|
1616
|
-
headers
|
|
1617
|
-
});
|
|
1618
|
-
},
|
|
1619
|
-
submitAuditedAsset: (idTask) => {
|
|
1620
|
-
return API$o.put(`/audit/task/${idTask}/submit`);
|
|
1621
|
-
},
|
|
1622
|
-
reportTAGMissing: (note, idAsset) => {
|
|
1623
|
-
return API$o.put(`/audit/scheduled-asset/${idAsset}/report-missing`, {
|
|
1624
|
-
note
|
|
1625
|
-
});
|
|
1626
|
-
},
|
|
1627
|
-
reportTAG: (id, body) => {
|
|
1628
|
-
return API$o.put(`/audit/scheduled-asset/${id}/tag-reported`, body);
|
|
1629
|
-
},
|
|
1630
|
-
getTaskInitialState: (idTask) => {
|
|
1631
|
-
return API$o.get(`/audit/scheduled-asset/${idTask}`);
|
|
1632
|
-
},
|
|
1633
|
-
cancelTaskReport: (scheduledAssetId) => {
|
|
1634
|
-
return API$o.put(`/audit/scheduled-asset/${scheduledAssetId}/cancel-report`);
|
|
1635
|
-
}
|
|
1636
|
-
};
|
|
1637
|
-
const ScheduleServices = {
|
|
1638
|
-
getScheduleList: (params) => {
|
|
1639
|
-
return API$o.get("/audit/schedule", { params });
|
|
1640
|
-
},
|
|
1641
|
-
getScheduleDetail: (id) => {
|
|
1642
|
-
return API$o.get("/audit/schedule/" + id);
|
|
1643
|
-
},
|
|
1644
|
-
deleteSchedule: (scheduleId) => {
|
|
1645
|
-
return API$o.put("/audit/schedule/bulk-delete", {
|
|
1646
|
-
id: scheduleId
|
|
1647
|
-
});
|
|
1648
|
-
},
|
|
1649
|
-
inactivateSchedule: (id) => {
|
|
1650
|
-
return API$o.put("/audit/schedule/bulk-inactive", { id });
|
|
1651
|
-
},
|
|
1652
|
-
activateSchedule: (id) => {
|
|
1653
|
-
return API$o.put("/audit/schedule/bulk-active", { id });
|
|
1654
|
-
},
|
|
1655
|
-
createNewSchedule: (body) => {
|
|
1656
|
-
return API$o.post("/audit/schedule", body);
|
|
1657
|
-
},
|
|
1658
|
-
editSchedule: (body, id) => {
|
|
1659
|
-
return API$o.put("/audit/schedule/" + id, body);
|
|
1660
|
-
},
|
|
1661
|
-
getActiveAsset: (id, params) => {
|
|
1662
|
-
return API$o.get(`/audit/asset/schedule/${id}`, { params });
|
|
1663
|
-
},
|
|
1664
|
-
setAssetActivation: (body) => {
|
|
1665
|
-
return API$o.put("/audit/asset/activation", body);
|
|
1666
|
-
},
|
|
1667
|
-
getAuditableAssetAmount: (params) => {
|
|
1668
|
-
return API$o.get("/audit/asset/auditable/total-asset", { params });
|
|
1669
|
-
}
|
|
1670
|
-
};
|
|
1671
|
-
const IOTAuditServices = {
|
|
1672
|
-
getReaderList: (params) => {
|
|
1673
|
-
return API_IOT.get("/iot/antenna/available", { params });
|
|
1674
|
-
},
|
|
1675
|
-
putSetReaderParams: (body) => {
|
|
1676
|
-
return API_IOT.put("/iot/reader/set-scan-params", body);
|
|
1677
|
-
},
|
|
1678
|
-
putAuditUsingIOT: (auditId, body) => {
|
|
1679
|
-
return API_IOT.put(`/iot/audit/${auditId}`, body);
|
|
1680
|
-
},
|
|
1681
|
-
getReaderTotalAsset: (taskId, params) => {
|
|
1682
|
-
return API$o.get(`/audit/task/${taskId}/reader/total-assets`, {
|
|
1683
|
-
params
|
|
1684
|
-
});
|
|
1685
|
-
},
|
|
1686
|
-
getAssetList: (params) => {
|
|
1687
|
-
return API$o.get("/audit/scheduled-asset", { params });
|
|
1688
|
-
}
|
|
1689
|
-
};
|
|
1690
|
-
const FilterServices = {
|
|
1691
|
-
getFilterOptions: (path, params) => {
|
|
1692
|
-
return API$o.get(`/${path}/options`, { params });
|
|
1693
|
-
},
|
|
1694
|
-
getIOTFilterOptions: (path, params) => {
|
|
1695
|
-
return API_IOT.get(`/${path}/options`, { params });
|
|
1696
|
-
}
|
|
1697
|
-
};
|
|
1698
|
-
const AuditableAssetServices = {
|
|
1699
|
-
getAudiableAssetList: (params) => {
|
|
1700
|
-
return API$o.get("/audit/asset/auditable", { params });
|
|
1701
|
-
},
|
|
1702
|
-
getAuditableAssetDetail: (id) => {
|
|
1703
|
-
return API$o.get("/audit/asset/auditable/" + id);
|
|
1704
|
-
}
|
|
1705
|
-
};
|
|
1706
|
-
const ApprovalServices = {
|
|
1707
|
-
getApprovalList: (idTask, approvalRound) => {
|
|
1708
|
-
return API$o.get(`/audit/approval/task/${idTask}/transaction`, {
|
|
1709
|
-
params: {
|
|
1710
|
-
approvalRound
|
|
1711
|
-
}
|
|
1712
|
-
});
|
|
1713
|
-
},
|
|
1714
|
-
getActiveApprovalList: (params) => {
|
|
1715
|
-
return API$o.get("/audit/approval/active", { params });
|
|
1716
|
-
},
|
|
1717
|
-
getHisotryApprovalList: (params) => {
|
|
1718
|
-
return API$o.get("/audit/approval/history", { params });
|
|
1719
|
-
},
|
|
1720
|
-
getTaskDetail: (id) => {
|
|
1721
|
-
return API$o.get(`/audit/task/${id}`);
|
|
1722
|
-
},
|
|
1723
|
-
getApprovalHistoryDetail: (idApproval) => {
|
|
1724
|
-
return API$o.get(`/audit/approval/${idApproval}`);
|
|
1725
|
-
},
|
|
1726
|
-
getApprovalAssetList: (params) => {
|
|
1727
|
-
return API$o.get("/audit/scheduled-asset/audited", { params });
|
|
1728
|
-
},
|
|
1729
|
-
submitApprovalAction: (body) => {
|
|
1730
|
-
return API$o.put("/audit/approval/approve", body);
|
|
1731
|
-
}
|
|
1732
|
-
};
|
|
1733
|
-
const AuditServices = {
|
|
1734
|
-
getAudit: (assetId, params) => {
|
|
1735
|
-
return API$o.get(`/audit/schedule/asset-detail/${assetId}`, { params });
|
|
1736
|
-
},
|
|
1737
|
-
getAuditOption: (assetId, params) => {
|
|
1738
|
-
return API$o.get(`/audit/schedule/asset-detail/${assetId}/options`, {
|
|
1739
|
-
params
|
|
1740
|
-
});
|
|
1741
|
-
},
|
|
1742
|
-
putSetActive: (body) => {
|
|
1743
|
-
return API$o.put("/audit/asset/activation", body);
|
|
1744
|
-
},
|
|
1745
|
-
...TaskServices,
|
|
1746
|
-
...ScheduleServices,
|
|
1747
|
-
...IOTAuditServices,
|
|
1748
|
-
...FilterServices,
|
|
1749
|
-
...AuditableAssetServices,
|
|
1750
|
-
...ApprovalServices
|
|
1751
|
-
};
|
|
1752
|
-
const API$n = createAxiosInstance({
|
|
1753
|
-
env: "APP_TAGSAMURAI_API",
|
|
1754
|
-
prefix: "/settings-attribute/v2/brands"
|
|
1755
|
-
});
|
|
1756
|
-
const BrandServices = {
|
|
1757
|
-
getDropdown: (params) => {
|
|
1758
|
-
return API$n.get("/dropdown", { params });
|
|
1759
|
-
}
|
|
1760
|
-
};
|
|
1761
|
-
const API$m = ({ headers = {}, params = {} } = {}) => {
|
|
1762
|
-
const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
|
|
1763
|
-
const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
|
|
1764
|
-
const instance = axios.create({
|
|
1765
|
-
baseURL: `${BASE_URL}/v1`,
|
|
1766
|
-
headers: {
|
|
1767
|
-
"Content-type": "application/json",
|
|
1768
|
-
"X-CSCAPI-KEY": API_KEY,
|
|
1769
|
-
...headers
|
|
1770
|
-
},
|
|
1771
|
-
params
|
|
1772
|
-
});
|
|
1773
|
-
return instance;
|
|
1774
|
-
};
|
|
1775
|
-
const CountryStateServices = {
|
|
1776
|
-
getCountry: () => {
|
|
1777
|
-
return API$m().get("/countries");
|
|
1778
|
-
},
|
|
1779
|
-
getState: (country) => {
|
|
1780
|
-
return API$m().get(`/countries/${country}/states`);
|
|
1781
|
-
},
|
|
1782
|
-
getCity: (country, state) => {
|
|
1783
|
-
return API$m().get(`/countries/${country}/states/${state}/cities`);
|
|
1784
|
-
}
|
|
1785
|
-
};
|
|
1786
|
-
const API$l = createAxiosInstance({
|
|
1787
|
-
env: "APP_TAGSAMURAI_API",
|
|
1788
|
-
prefix: "/dashboard/v2/dashboard"
|
|
1789
|
-
});
|
|
1790
|
-
const DashboardServices = {
|
|
1791
|
-
getLatestTask: (params) => {
|
|
1792
|
-
return API$l.get("/latest-task", { params });
|
|
1793
|
-
},
|
|
1794
|
-
getSummary: (params) => {
|
|
1795
|
-
return API$l.get("/summary", { params });
|
|
1796
|
-
}
|
|
1797
|
-
};
|
|
1798
|
-
const API$k = createAxiosInstance({
|
|
1799
|
-
env: "APP_GLOBAL_SETTINGS_API",
|
|
1800
|
-
prefix: "/v1/global-settings/auth"
|
|
1801
|
-
});
|
|
1802
|
-
const onRejected = (error) => {
|
|
1803
|
-
var _a, _b, _c, _d;
|
|
1804
|
-
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") {
|
|
1805
|
-
window.onblur = void 0;
|
|
1806
|
-
window.onfocus = void 0;
|
|
1807
|
-
window.sessionExpired = true;
|
|
1808
|
-
return window.dispatchEvent(new CustomEvent("user:expired"));
|
|
1809
|
-
}
|
|
1810
|
-
return Promise.reject(error);
|
|
1811
|
-
};
|
|
1812
|
-
const AuthServices = {
|
|
1813
|
-
login: (form) => {
|
|
1814
|
-
const body = { ...form, isMobile: false };
|
|
1815
|
-
return API$k.post("/login", body);
|
|
1816
|
-
},
|
|
1817
|
-
reLogin: (body) => {
|
|
1818
|
-
API$k.interceptors.response.use((response) => {
|
|
1819
|
-
return response;
|
|
1820
|
-
}, onRejected);
|
|
1821
|
-
return API$k.post("/login", {
|
|
1822
|
-
...body,
|
|
1823
|
-
ignoreAccess: true
|
|
1824
|
-
// Allow users without access to Global Settings to hit relogin
|
|
1825
|
-
});
|
|
1826
|
-
},
|
|
1827
|
-
requestOTP: (email) => {
|
|
1828
|
-
const body = { email };
|
|
1829
|
-
return API$k.post("/request-otp", body);
|
|
1830
|
-
},
|
|
1831
|
-
requestResetPassLink: (email) => {
|
|
1832
|
-
const body = { email };
|
|
1833
|
-
return API$k.post("/request-reset-link", body);
|
|
1834
|
-
},
|
|
1835
|
-
setPassword: (body) => {
|
|
1836
|
-
return API$k.post("/set-password", body);
|
|
1837
|
-
},
|
|
1838
|
-
verifyToken: (token) => {
|
|
1839
|
-
return API$k.get(`/verify-token/${token}`);
|
|
1840
|
-
},
|
|
1841
|
-
confirmEmailChange: (token) => {
|
|
1842
|
-
const body = { token };
|
|
1843
|
-
return API$k.put("/confirm-email-change/confirm", body);
|
|
1844
|
-
},
|
|
1845
|
-
postLogout: () => {
|
|
1846
|
-
return API$k.post("/logout");
|
|
1847
|
-
}
|
|
1848
|
-
};
|
|
1849
|
-
const API$j = createAxiosInstance({
|
|
1850
|
-
env: "APP_ADMIN_API",
|
|
1851
|
-
prefix: "/settings-attribute/languages"
|
|
1852
|
-
});
|
|
1853
|
-
const I18nService = {
|
|
1854
|
-
/**
|
|
1855
|
-
* Fetch all translation messages for a specific locale.
|
|
1856
|
-
* @param locale The locale code (e.g., 'en', 'id').
|
|
1857
|
-
* @returns A promise resolving to a key-value record of messages.
|
|
1858
|
-
*/
|
|
1859
|
-
getMessages: (isoCode) => {
|
|
1860
|
-
return API$j.get(`/${isoCode}/translations`);
|
|
1861
|
-
},
|
|
1862
|
-
/**
|
|
1863
|
-
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
1864
|
-
*
|
|
1865
|
-
* @returns Promise Array of options
|
|
1866
|
-
*/
|
|
1867
|
-
getLanguageOptions: async () => {
|
|
1868
|
-
const { data } = await API$j.get("/dropdown");
|
|
1869
|
-
return data.data;
|
|
1870
|
-
},
|
|
1871
|
-
/**
|
|
1872
|
-
* Fetch single lang option meta data
|
|
1873
|
-
*
|
|
1874
|
-
* @param isoCode The locale code (e.g., 'en', 'id').
|
|
1875
|
-
* @returns Promise LanguageMeta
|
|
1876
|
-
*/
|
|
1877
|
-
getLanguageOptionMeta: async (isoCode) => {
|
|
1878
|
-
const { data } = await API$j.get(
|
|
1879
|
-
"/dropdown/" + isoCode
|
|
1880
|
-
);
|
|
1881
|
-
return data.data;
|
|
1882
|
-
},
|
|
1883
|
-
/**
|
|
1884
|
-
* Translate a specific text to the target locale.
|
|
1885
|
-
*
|
|
1886
|
-
* @param key Unique translation key.
|
|
1887
|
-
* @param locale Target locale code.
|
|
1888
|
-
*/
|
|
1889
|
-
translateText: async (key, locale) => {
|
|
1890
|
-
const { data } = await API$j.post("/translate", {
|
|
1891
|
-
q: key,
|
|
1892
|
-
target: locale
|
|
1893
|
-
});
|
|
1894
|
-
return data.data.translations[key];
|
|
1895
|
-
}
|
|
1896
|
-
};
|
|
1897
|
-
const API$i = createAxiosInstance({
|
|
1898
|
-
env: "APP_TAGSAMURAI_API",
|
|
1899
|
-
prefix: "/settings-attribute/v2/models"
|
|
1900
|
-
});
|
|
1901
|
-
const ModelTypeServices = {
|
|
1902
|
-
getDropdown: (params) => {
|
|
1903
|
-
return API$i.get("/dropdown", { params });
|
|
1904
|
-
}
|
|
1905
|
-
};
|
|
1906
|
-
const API$h = createAxiosInstance({
|
|
1907
|
-
prefix: "/v2",
|
|
1908
|
-
env: "APP_LOGS_NOTIFICATION_API"
|
|
1909
|
-
});
|
|
1910
|
-
const NotificationApprovalServices = {
|
|
1911
|
-
getTotalApprovals: () => {
|
|
1912
|
-
return API$h.get("/approval/count");
|
|
1913
|
-
}
|
|
1914
|
-
};
|
|
1915
|
-
const ReaderAPI$1 = createAxiosInstance({
|
|
1916
|
-
prefix: "/iot/v2/reader"
|
|
1917
|
-
});
|
|
1918
|
-
const IOTAntennaAPI$1 = createAxiosInstance({
|
|
1919
|
-
prefix: "/iot/v2/iot/antenna"
|
|
1920
|
-
});
|
|
1921
|
-
const IOTReaderAPI$1 = createAxiosInstance({
|
|
1922
|
-
prefix: "/iot/v2/iot/reader"
|
|
1923
|
-
});
|
|
1924
|
-
const ReaderServices = {
|
|
1925
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader
|
|
1926
|
-
getIOTReaderList: (params) => {
|
|
1927
|
-
return IOTReaderAPI$1.get("", { params: queryParamsStringfy(params) });
|
|
1928
|
-
},
|
|
1929
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/options
|
|
1930
|
-
getIOTReaderListOptions: (params) => {
|
|
1931
|
-
return IOTReaderAPI$1.get("/options", { params });
|
|
1932
|
-
},
|
|
1933
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-alias-name
|
|
1934
|
-
setIOTAliasName: (body) => {
|
|
1935
|
-
return IOTReaderAPI$1.put("/set-alias-name", body);
|
|
1936
|
-
},
|
|
1937
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ping
|
|
1938
|
-
pingIOTSingle: (id) => {
|
|
1939
|
-
return IOTReaderAPI$1.put(`/${id}/ping`);
|
|
1940
|
-
},
|
|
1941
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/ping/bulk
|
|
1942
|
-
pingIOTBulk: (body) => {
|
|
1943
|
-
return IOTReaderAPI$1.put("/ping/bulk", body);
|
|
1944
|
-
},
|
|
1945
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-antenna-power
|
|
1946
|
-
setIOTAntennaPowerBulk: (id, body) => {
|
|
1947
|
-
return IOTReaderAPI$1.put(`/${id}/set-antenna-power`, body);
|
|
1948
|
-
},
|
|
1949
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ports
|
|
1950
|
-
getIOTPortList: (id, params) => {
|
|
1951
|
-
return IOTReaderAPI$1.get(`/${id}/ports`, { params });
|
|
1952
|
-
},
|
|
1953
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id
|
|
1954
|
-
getIOTDetail: (id) => {
|
|
1955
|
-
return IOTReaderAPI$1.get(`/${id}`);
|
|
1956
|
-
},
|
|
1957
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/check-manager
|
|
1958
|
-
getIOTCheckManager: () => {
|
|
1959
|
-
return IOTReaderAPI$1.get("/check-manager");
|
|
1960
|
-
},
|
|
1961
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/:id
|
|
1962
|
-
updateReader: (id, body) => {
|
|
1963
|
-
return ReaderAPI$1.put(`/${id}`, body);
|
|
1964
|
-
},
|
|
1965
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
1966
|
-
updateReaderStatus: (body) => {
|
|
1967
|
-
return IOTReaderAPI$1.put("/set-status", body);
|
|
1968
|
-
},
|
|
1969
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/set-status
|
|
1970
|
-
updateAntennaStatus: (body) => {
|
|
1971
|
-
return IOTAntennaAPI$1.put("/set-status", body);
|
|
1972
|
-
},
|
|
1973
|
-
setIOTPortGroup: (id, body) => {
|
|
1974
|
-
return IOTReaderAPI$1.put(`/${id}/set-port-group`, body);
|
|
1975
|
-
},
|
|
1976
|
-
setGroupIOT: (body) => {
|
|
1977
|
-
return IOTReaderAPI$1.put("/set-group", body);
|
|
1978
|
-
},
|
|
1979
|
-
getDataById: (id) => {
|
|
1980
|
-
return IOTReaderAPI$1.get(`/${id}`);
|
|
1981
|
-
},
|
|
1982
|
-
getChangeLog: (params) => {
|
|
1983
|
-
return IOTReaderAPI$1.get(`/${params.id}/change-log`, { params });
|
|
1984
|
-
},
|
|
1985
|
-
getChangeLogOptions: (params) => {
|
|
1986
|
-
return IOTReaderAPI$1.get(`/${params.id}/change-log/options`, { params });
|
|
1987
|
-
},
|
|
1988
|
-
putData: (id, body) => {
|
|
1989
|
-
return IOTReaderAPI$1.put(`/${id}`, body);
|
|
1990
|
-
}
|
|
1991
|
-
};
|
|
1992
|
-
const API$g = createAxiosInstance({
|
|
1993
|
-
env: "APP_TAGSAMURAI_API",
|
|
1994
|
-
prefix: "/repair/v2"
|
|
1995
|
-
});
|
|
1996
|
-
const RepairServices = {
|
|
1997
|
-
getRepairList: (params) => {
|
|
1998
|
-
return API$g.get("/my-asset/repair", { params });
|
|
1999
|
-
},
|
|
2000
|
-
getFilterOptions: (params) => {
|
|
2001
|
-
return API$g.get("/my-asset/repair/options", { params });
|
|
2002
|
-
},
|
|
2003
|
-
getAssetRepairTicketing: (assetId, params) => {
|
|
2004
|
-
return API$g.get(`/repair/${assetId}/asset-repair-detail`, { params });
|
|
2005
|
-
},
|
|
2006
|
-
putConfirmRepair: (repairId) => {
|
|
2007
|
-
return API$g.put(`/repair/${repairId}/confirm-repair`);
|
|
2008
|
-
}
|
|
2009
|
-
};
|
|
2010
|
-
const API$f = createAxiosInstance({
|
|
2011
|
-
env: "APP_TAGSAMURAI_API",
|
|
2012
|
-
prefix: "/routine/v2"
|
|
2013
|
-
});
|
|
2014
|
-
const RoutineServices = {
|
|
2015
|
-
getMaintenance: (assetId, params) => {
|
|
2016
|
-
return API$f.get(`/routine-task/${assetId}`, { params });
|
|
2017
|
-
},
|
|
2018
|
-
getMaintenanceOption: (assetId, params) => {
|
|
2019
|
-
return API$f.get(`/routine-task/${assetId}/options`, { params });
|
|
2020
|
-
},
|
|
2021
|
-
putSetActive: (body) => {
|
|
2022
|
-
return API$f.put("/maintenable-asset/set-active", body);
|
|
2023
|
-
},
|
|
2024
|
-
getRoutineTask: (params) => {
|
|
2025
|
-
return API$f.get("/routine-task", { params });
|
|
2026
|
-
},
|
|
2027
|
-
getRoutineTaskOptions: (params) => {
|
|
2028
|
-
return API$f.get("/routine-task/options", { params });
|
|
2029
|
-
},
|
|
2030
|
-
getRoutineSchedule: (params) => {
|
|
2031
|
-
return API$f.get("/routine-schedule", { params });
|
|
2032
|
-
},
|
|
2033
|
-
getRoutineScheduleOptions: (params) => {
|
|
2034
|
-
return API$f.get("/routine-schedule/options", { params });
|
|
2035
|
-
},
|
|
2036
|
-
getRoutineTaskEventLog: (params) => {
|
|
2037
|
-
return API$f.get("/routine-task/event-log", { params });
|
|
2038
|
-
},
|
|
2039
|
-
getRoutineTaskEventLogOptions: (params) => {
|
|
2040
|
-
return API$f.get("/routine-task/event-log/options", { params });
|
|
2041
|
-
},
|
|
2042
|
-
getAssetName: (params) => {
|
|
2043
|
-
return API$f.get("/asset-name", { params });
|
|
2044
|
-
},
|
|
2045
|
-
getAssetNameOptions: (params) => {
|
|
2046
|
-
return API$f.get("/asset-name/options", { params });
|
|
2047
|
-
},
|
|
2048
|
-
postCreateRoutineSchedule: (data) => {
|
|
2049
|
-
return API$f.post("/routine-schedule", data);
|
|
2050
|
-
},
|
|
2051
|
-
postDuplicateRoutineSchedule: (id, data) => {
|
|
2052
|
-
return API$f.post(`/routine-schedule/duplicate/${id}`, data);
|
|
2053
|
-
},
|
|
2054
|
-
putEditRoutineSchedule: (id, data) => {
|
|
2055
|
-
return API$f.put(`/routine-schedule/${id}`, data);
|
|
2056
|
-
},
|
|
2057
|
-
getUserStaff: (params) => {
|
|
2058
|
-
return API$f.get("/user-transaction-role/maintenance-role/staff", { params });
|
|
2059
|
-
},
|
|
2060
|
-
getUserStaffOptions: (params) => {
|
|
2061
|
-
return API$f.get("/user-transaction-role/maintenance-role/staff/options", {
|
|
2062
|
-
params
|
|
2063
|
-
});
|
|
2064
|
-
},
|
|
2065
|
-
getRoutineScheduleDetail: (id) => {
|
|
2066
|
-
return API$f.get(`/routine-schedule/${id}`);
|
|
2067
|
-
},
|
|
2068
|
-
deleteRoutineSchedule: (id) => {
|
|
2069
|
-
return API$f.delete("/routine-schedule/bulk-delete", {
|
|
2070
|
-
params: {
|
|
2071
|
-
id: JSON.stringify(id)
|
|
2072
|
-
}
|
|
2073
|
-
});
|
|
2074
|
-
},
|
|
2075
|
-
putRoutineTaskCancel: (id) => {
|
|
2076
|
-
return API$f.put("/routine-task/cancel", { id });
|
|
2077
|
-
},
|
|
2078
|
-
getMaintainableAsset: (params) => {
|
|
2079
|
-
return API$f.get("/maintenable-asset", { params });
|
|
2080
|
-
},
|
|
2081
|
-
getMaintainableAssetOptions: (params) => {
|
|
2082
|
-
return API$f.get("/maintenable-asset/options", { params });
|
|
2083
|
-
},
|
|
2084
|
-
getMaintenanceHistory: (params) => {
|
|
2085
|
-
return API$f.get("/routine-task/history", { params });
|
|
2086
|
-
},
|
|
2087
|
-
getMaintenanceHistoryOptions: (params) => {
|
|
2088
|
-
return API$f.get("/routine-task/history/options", { params });
|
|
2089
|
-
},
|
|
2090
|
-
getActiveAsset: (id) => {
|
|
2091
|
-
return API$f.get(`/routine-schedule/${id}/assets`);
|
|
2092
|
-
},
|
|
2093
|
-
getActiveAssetOptions: (id, params) => {
|
|
2094
|
-
return API$f.get(`/routine-schedule/${id}/assets/options`, { params });
|
|
2095
|
-
},
|
|
2096
|
-
getRoutineTaskDetail: (id) => {
|
|
2097
|
-
return API$f.get(`/routine-task/${id}/detail`);
|
|
2098
|
-
},
|
|
2099
|
-
getApproverList: (id, approvalRound) => {
|
|
2100
|
-
return API$f.get(`/routine-task/${id}/approval-history`, {
|
|
2101
|
-
params: {
|
|
2102
|
-
approvalRound
|
|
2103
|
-
}
|
|
2104
|
-
});
|
|
2105
|
-
},
|
|
2106
|
-
getReviewerList: (id) => {
|
|
2107
|
-
return API$f.get(`/routine-task/${id}/review-history`);
|
|
2108
|
-
},
|
|
2109
|
-
getMaintainableAssetDetail: (id) => {
|
|
2110
|
-
return API$f.get(`/maintenable-asset/${id}`);
|
|
2111
|
-
},
|
|
2112
|
-
putSetActiveTasks: (id, isActive) => {
|
|
2113
|
-
return API$f.put(`/maintenable-asset/${id}/set-tasks-active`, {
|
|
2114
|
-
isActive
|
|
2115
|
-
});
|
|
2116
|
-
},
|
|
2117
|
-
putAssignStaff: (routineId, staffId) => {
|
|
2118
|
-
return API$f.put(`/routine-task/${routineId}/assign-staff`, {
|
|
2119
|
-
id: staffId
|
|
2120
|
-
});
|
|
2121
|
-
},
|
|
2122
|
-
getServiceCenter: () => {
|
|
2123
|
-
return API$f.get("/service-center/dropdown");
|
|
2124
|
-
},
|
|
2125
|
-
putCompleteRoutineTask: (id, data) => {
|
|
2126
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
2127
|
-
return API$f.put(`/routine-task/${id}/completion`, data, { headers });
|
|
2128
|
-
},
|
|
2129
|
-
getApprovalDetail: (id) => {
|
|
2130
|
-
return API$f.get(`/approval/${id}`);
|
|
2131
|
-
},
|
|
2132
|
-
putApprovalApprove: (id, data) => {
|
|
2133
|
-
return API$f.put(`/approval/${id}/approve`, data);
|
|
2134
|
-
},
|
|
2135
|
-
putReviewRoutine: (id, data) => {
|
|
2136
|
-
return API$f.put(`/routine-task/${id}/review`, data);
|
|
2137
|
-
},
|
|
2138
|
-
putUpdateRoutineTask: (id, data) => {
|
|
2139
|
-
return API$f.put(`/routine-task/${id}/handle-overdue`, data);
|
|
2140
|
-
},
|
|
2141
|
-
getApproval: (params) => {
|
|
2142
|
-
return API$f.get("/approval", { params });
|
|
2143
|
-
},
|
|
2144
|
-
getApprovalOptions: (params) => {
|
|
2145
|
-
return API$f.get("/approval/options", { params });
|
|
2146
|
-
}
|
|
2147
|
-
};
|
|
2148
|
-
const API$e = createAxiosInstance({
|
|
2149
|
-
env: "APP_TAGSAMURAI_API",
|
|
2150
|
-
prefix: "/routine/v2"
|
|
2151
|
-
});
|
|
2152
|
-
const ServiceCenterServices = {
|
|
2153
|
-
getList: (params) => {
|
|
2154
|
-
return API$e.get("/service-center", { params });
|
|
2155
|
-
},
|
|
2156
|
-
postList: (body) => {
|
|
2157
|
-
return API$e.post("/service-center", body);
|
|
2158
|
-
},
|
|
2159
|
-
putList: (id, body) => {
|
|
2160
|
-
return API$e.put(`/service-center/${id}`, body);
|
|
2161
|
-
},
|
|
2162
|
-
putActivate: (body) => {
|
|
2163
|
-
return API$e.put("/service-center/bulk", body);
|
|
2164
|
-
},
|
|
2165
|
-
getDetailList: (id) => {
|
|
2166
|
-
return API$e.get(`/service-center/${id}`);
|
|
2167
|
-
},
|
|
2168
|
-
getListOptions: (params) => {
|
|
2169
|
-
return API$e.get("/service-center/options", { params });
|
|
2170
|
-
},
|
|
2171
|
-
deleteList: (params) => {
|
|
2172
|
-
return API$e.delete("/service-center", { params });
|
|
2173
|
-
},
|
|
2174
|
-
// Activities
|
|
2175
|
-
getActivities: (params) => {
|
|
2176
|
-
return API$e.get("/service-activities", { params });
|
|
2177
|
-
},
|
|
2178
|
-
getActivityOptions: (params) => {
|
|
2179
|
-
return API$e.get("/service-activities/options", { params });
|
|
2180
|
-
},
|
|
2181
|
-
getActivityDetail: (id) => {
|
|
2182
|
-
return API$e.get(`/service-activities/${id}`);
|
|
2183
|
-
},
|
|
2184
|
-
getActivityLog: (id) => {
|
|
2185
|
-
return API$e.get(`/service-activities/${id}/activity-log`);
|
|
2186
|
-
}
|
|
2187
|
-
};
|
|
2188
|
-
const API$d = createAxiosInstance({
|
|
2189
|
-
prefix: "/v2/session-log",
|
|
2190
|
-
env: "APP_LOGS_NOTIFICATION_API"
|
|
2191
|
-
});
|
|
2192
|
-
const SessionLogServices = {
|
|
2193
|
-
postLogout: () => {
|
|
2194
|
-
return API$d.post("/logout");
|
|
2195
|
-
}
|
|
2196
|
-
};
|
|
2197
|
-
const API$c = createAxiosInstance({
|
|
2198
|
-
env: "APP_TAGSAMURAI_API",
|
|
2199
|
-
prefix: "/tag/v2"
|
|
2200
|
-
});
|
|
2201
|
-
const TAGServices = {
|
|
2202
|
-
getScanQR: (tag) => {
|
|
2203
|
-
return API$c.get("/qr", { params: { tag } });
|
|
2204
|
-
},
|
|
2205
|
-
getScanRFID: (tag) => {
|
|
2206
|
-
return API$c.get("/rfid", { params: { tag } });
|
|
2207
|
-
},
|
|
2208
|
-
getRFIDQRTAG: (params) => {
|
|
2209
|
-
return API$c.get("/rfid-qr/scan", { params });
|
|
2210
|
-
},
|
|
2211
|
-
getEventLog: (params) => {
|
|
2212
|
-
return API$c.get("/tag-transaction/event-log", { params });
|
|
2213
|
-
},
|
|
2214
|
-
// Tab All
|
|
2215
|
-
getRfidQrAll: (path, params) => {
|
|
2216
|
-
return API$c.get(`/${path}`, { params });
|
|
2217
|
-
},
|
|
2218
|
-
// Tab Paired
|
|
2219
|
-
getRfidQrPaired: (tagType, viewBy, params) => {
|
|
2220
|
-
return API$c.get(`/${tagType}/paired/${viewBy}`, { params });
|
|
2221
|
-
},
|
|
2222
|
-
postAddTAGtoPrelist: (body, destination) => {
|
|
2223
|
-
return API$c.post(`/prelist/${destination}/asset-name`, body);
|
|
2224
|
-
},
|
|
2225
|
-
postAddTAGtoReplacePrelist: (body) => {
|
|
2226
|
-
return API$c.post("/prelist/replace-tag", body);
|
|
2227
|
-
},
|
|
2228
|
-
postAddTAGToPrelistUnpair: (body) => {
|
|
2229
|
-
return API$c.post("/prelist/unpair-tag", body);
|
|
2230
|
-
},
|
|
2231
|
-
postAddTAGtoPending: (body) => {
|
|
2232
|
-
return API$c.post("/pending-changes", body);
|
|
2233
|
-
},
|
|
2234
|
-
// Available Tab
|
|
2235
|
-
getRFIDQrAvailable: (tagType, params) => {
|
|
2236
|
-
return API$c.get(`/${tagType}/available`, { params });
|
|
2237
|
-
},
|
|
2238
|
-
// Damaged TAB
|
|
2239
|
-
getRFIDQrDamaged: (tagType, params) => {
|
|
2240
|
-
return API$c.get(`/${tagType}/damaged`, { params });
|
|
2241
|
-
},
|
|
2242
|
-
// RFID and QR Module
|
|
2243
|
-
getRFIDandQRList: (params) => {
|
|
2244
|
-
return API$c.get("/rfid-qr", { params });
|
|
2245
|
-
},
|
|
2246
|
-
deleteUnpairTAG: (body) => {
|
|
2247
|
-
return API$c.delete("/rfid-qr", { data: { data: body } });
|
|
2248
|
-
},
|
|
2249
|
-
postPairTAG: (body) => {
|
|
2250
|
-
return API$c.post("/rfid-qr", { body: { data: body } });
|
|
2251
|
-
},
|
|
2252
|
-
// RFID To Be Returned
|
|
2253
|
-
getToBeReturnedTAGList: (params) => {
|
|
2254
|
-
return API$c.get("/rfid/to-be-returned", { params });
|
|
2255
|
-
},
|
|
2256
|
-
// Handover TAG
|
|
2257
|
-
putHandoverTAG: (body) => {
|
|
2258
|
-
return API$c.put("/rfid/handover", { body: { data: body } });
|
|
2259
|
-
},
|
|
2260
|
-
// Table Filter
|
|
2261
|
-
getFilterOptions: (path, params) => {
|
|
2262
|
-
return API$c.get(`/${path}/options`, { params });
|
|
2263
|
-
},
|
|
2264
|
-
getHolderListOptions: (params) => {
|
|
2265
|
-
return API$c.get("/rfid/holder-list/options", { params });
|
|
2266
|
-
},
|
|
2267
|
-
getHolderList: (params) => {
|
|
2268
|
-
return API$c.get("/rfid/holder-list", { params });
|
|
2269
|
-
},
|
|
2270
|
-
putAuditTAG: (body, tagType) => {
|
|
2271
|
-
return API$c.put(`/${tagType}/audit`, body);
|
|
2272
|
-
},
|
|
2273
|
-
postLogAudit: (body) => {
|
|
2274
|
-
return API$c.post("/tag-transaction/log-audit", body);
|
|
2275
|
-
},
|
|
2276
|
-
postCreateQr: (amount) => {
|
|
2277
|
-
const body = { amount };
|
|
2278
|
-
return API$c.post("/qr", body);
|
|
2279
|
-
},
|
|
2280
|
-
putReportTAG: (id, body) => {
|
|
2281
|
-
return API$c.put(`/tag-transaction/report/${id}`, body);
|
|
2282
|
-
},
|
|
2283
|
-
putReportTAGBulk: (body) => {
|
|
2284
|
-
return API$c.put("/tag-transaction/report/bulk", body);
|
|
2285
|
-
},
|
|
2286
|
-
putDeclineReport: (body, tagType) => {
|
|
2287
|
-
return API$c.put(`/report/decline-report/${tagType}`, body);
|
|
2288
|
-
}
|
|
2289
|
-
};
|
|
2290
|
-
const API$b = createAxiosInstance({
|
|
2291
|
-
env: "APP_TAGSAMURAI_API",
|
|
2292
|
-
prefix: "/tracking/v2/tracking"
|
|
2293
|
-
});
|
|
2294
|
-
const API_APPROVAL = createAxiosInstance({
|
|
2295
|
-
env: "APP_TAGSAMURAI_API",
|
|
2296
|
-
prefix: "/tracking/v2/tracking-approval"
|
|
2297
|
-
});
|
|
2298
|
-
const TrackingServices = {
|
|
2299
|
-
getTrackingDetail: (trackingId) => {
|
|
2300
|
-
return API$b.get(`/${trackingId}`);
|
|
2301
|
-
},
|
|
2302
|
-
putFoundAsset: (tag, groupId, serialNumber, type) => {
|
|
2303
|
-
const params = {
|
|
2304
|
-
tag,
|
|
2305
|
-
group: groupId,
|
|
2306
|
-
serialNumber,
|
|
2307
|
-
type: type ?? "Global"
|
|
2308
|
-
};
|
|
2309
|
-
return API$b.put("/scan", void 0, { params });
|
|
2310
|
-
},
|
|
2311
|
-
putReportPermanentlyMissing: (trackingId, body) => {
|
|
2312
|
-
return API$b.put(`/report-permanently-missing/${trackingId}`, body);
|
|
2313
|
-
},
|
|
2314
|
-
putUpdateTrackingAsset: (id, body) => {
|
|
2315
|
-
const headers = { "Content-type": "multipart/form-data" };
|
|
2316
|
-
return API$b.put(`/update/${id}`, body, { headers });
|
|
2317
|
-
},
|
|
2318
|
-
putMoveBack: (body) => {
|
|
2319
|
-
return API$b.put("/tracking/move-back", body);
|
|
2320
|
-
},
|
|
2321
|
-
getTrackingList: (endpoint, params) => {
|
|
2322
|
-
return API$b.get(endpoint, { params });
|
|
2323
|
-
},
|
|
2324
|
-
getTrackingDetailByScan: (tag) => {
|
|
2325
|
-
return API$b.get("/scan", { params: { tag } });
|
|
2326
|
-
},
|
|
2327
|
-
getFilterOptions: (endPoint, params) => {
|
|
2328
|
-
return API$b.get(endPoint + "/options", { params });
|
|
2329
|
-
},
|
|
2330
|
-
getApproverList: (id) => {
|
|
2331
|
-
return API_APPROVAL.get(`/${id}/approval-history`);
|
|
2332
|
-
},
|
|
2333
|
-
getApprovalList: (params) => {
|
|
2334
|
-
return API_APPROVAL.get("", { params });
|
|
2335
|
-
},
|
|
2336
|
-
getApprovalFilterOptions: (params) => {
|
|
2337
|
-
return API_APPROVAL.get("/options", { params });
|
|
2338
|
-
},
|
|
2339
|
-
putApproval: (body) => {
|
|
2340
|
-
return API_APPROVAL.put("/approval", body);
|
|
2341
|
-
}
|
|
2342
|
-
};
|
|
2343
|
-
const API$a = createAxiosInstance({
|
|
2344
|
-
env: "APP_TAGSAMURAI_API",
|
|
2345
|
-
prefix: "/settings-attribute/v2/transaction-settings"
|
|
2346
|
-
});
|
|
2347
|
-
const TransactionSettingServices = {
|
|
2348
|
-
getData: () => {
|
|
2349
|
-
return API$a.get("/");
|
|
2350
|
-
},
|
|
2351
|
-
putData: (data) => {
|
|
2352
|
-
return API$a.put("/", data);
|
|
2353
|
-
}
|
|
2354
|
-
};
|
|
2355
|
-
const API$9 = createAxiosInstance({
|
|
2356
|
-
prefix: "/settings-attribute/v2/asset-name"
|
|
2357
|
-
});
|
|
2358
|
-
const SettingAssetNameServiceGo = {
|
|
2359
|
-
getAssetNameList: (params) => {
|
|
2360
|
-
const body = buildBodyParams(params);
|
|
2361
|
-
return API$9.post("/list", body);
|
|
2362
|
-
},
|
|
2363
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/options
|
|
2364
|
-
getAssetNameListOptions: (params) => {
|
|
2365
|
-
const body = buildBodyParams(params);
|
|
2366
|
-
return API$9.post("/list/options", body);
|
|
2367
|
-
},
|
|
2368
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/dropdown
|
|
2369
|
-
getAssetNameDropdown: (params) => {
|
|
2370
|
-
return API$9.get("/dropdown", { params });
|
|
2371
|
-
},
|
|
2372
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/unpaired
|
|
2373
|
-
getAssetUnpairedNameList: (params) => {
|
|
2374
|
-
return API$9.get("/unpaired", { params });
|
|
2375
|
-
},
|
|
2376
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/unpaired/options
|
|
2377
|
-
getAssetUnpairedNameListOptions: (params) => {
|
|
2378
|
-
return API$9.get("/unpaired/options", { params });
|
|
2379
|
-
},
|
|
2380
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id
|
|
2381
|
-
getAssetNameDetail: (id) => {
|
|
2382
|
-
return API$9.get(`/${id}`);
|
|
2383
|
-
},
|
|
2384
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-brand
|
|
2385
|
-
getAssetNameBrands: (id, params) => {
|
|
2386
|
-
return API$9.get(`/${id}/list-brand`, { params });
|
|
2387
|
-
},
|
|
2388
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-asset
|
|
2389
|
-
getAssetNameAssets: (id, params) => {
|
|
2390
|
-
return API$9.get(`/${id}/list-asset`, { params });
|
|
2391
|
-
},
|
|
2392
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-asset/options
|
|
2393
|
-
getAssetNameAssetsOptions: (id, params) => {
|
|
2394
|
-
return API$9.get(`/${id}/list-asset/options`, { params });
|
|
2395
|
-
},
|
|
2396
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-brand/options
|
|
2397
|
-
getAssetNameBrandsOptions: (id, params) => {
|
|
2398
|
-
return API$9.get(`/${id}/list-brand/options`, { params });
|
|
2399
|
-
},
|
|
2400
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name
|
|
2401
|
-
createAssetName: (body) => {
|
|
2402
|
-
return API$9.post("", body);
|
|
2403
|
-
},
|
|
2404
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/depreciation-setting
|
|
2405
|
-
updateDepreciationSetting: (body) => {
|
|
2406
|
-
return API$9.put("/depreciation-setting", body);
|
|
2407
|
-
},
|
|
2408
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/set-tagtype
|
|
2409
|
-
setTagType: (body) => {
|
|
2410
|
-
return API$9.put("/set-tagtype", body);
|
|
2411
|
-
},
|
|
2412
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id
|
|
2413
|
-
updateAssetName: (body, id) => {
|
|
2414
|
-
return API$9.put(`/${id}`, body);
|
|
2415
|
-
},
|
|
2416
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name
|
|
2417
|
-
deleteAssetName: (body) => {
|
|
2418
|
-
return API$9.delete("", {
|
|
2419
|
-
data: body
|
|
2420
|
-
});
|
|
2421
|
-
}
|
|
2422
|
-
};
|
|
2423
|
-
const API$8 = createAxiosInstance({
|
|
2424
|
-
prefix: "/settings-attribute/v2/brands"
|
|
2425
|
-
});
|
|
2426
|
-
const SettingBrandServiceGo = {
|
|
2427
|
-
getBrandList: (params) => {
|
|
2428
|
-
const body = buildBodyParams(params);
|
|
2429
|
-
return API$8.post("/list", body);
|
|
2430
|
-
},
|
|
2431
|
-
getBrandListOptionsFA: (params) => {
|
|
2432
|
-
const body = buildBodyParams(params);
|
|
2433
|
-
return API$8.post("/list/options", body);
|
|
2434
|
-
},
|
|
2435
|
-
getBrandDropdown: (params) => {
|
|
2436
|
-
return API$8.get("/dropdown", { params });
|
|
2437
|
-
},
|
|
2438
|
-
getBrandDetail: (id) => {
|
|
2439
|
-
return API$8.get(`/${id}`);
|
|
2440
|
-
},
|
|
2441
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-category
|
|
2442
|
-
getBrandListCategory: (id, params) => {
|
|
2443
|
-
return API$8.get(`/${id}/list-category`, { params });
|
|
2444
|
-
},
|
|
2445
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-category/options
|
|
2446
|
-
getBrandListCategoryOptions: (id, params) => {
|
|
2447
|
-
return API$8.get(`/${id}/list-category/options`, { params });
|
|
2448
|
-
},
|
|
2449
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-asset
|
|
2450
|
-
getBrandListAsset: (id, params) => {
|
|
2451
|
-
return API$8.get(`/${id}/list-asset`, { params });
|
|
2452
|
-
},
|
|
2453
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-asset/options
|
|
2454
|
-
getBrandListAssetOptions: (id, params) => {
|
|
2455
|
-
return API$8.get(`/${id}/list-asset/options`, { params });
|
|
2456
|
-
},
|
|
2457
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands
|
|
2458
|
-
createBrand: (body) => {
|
|
2459
|
-
return API$8.post("", body);
|
|
2460
|
-
},
|
|
2461
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/assign-category
|
|
2462
|
-
brandAssignCategory: (body) => {
|
|
2463
|
-
return API$8.put("/assign-category", body);
|
|
2464
|
-
},
|
|
2465
|
-
brandUnassignCategory: (body) => {
|
|
2466
|
-
return API$8.put("/unassign-category", body);
|
|
2467
|
-
},
|
|
2468
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id
|
|
2469
|
-
updateBrand: (body, id) => {
|
|
2470
|
-
return API$8.put(`/${id}`, body);
|
|
2471
|
-
},
|
|
2472
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands
|
|
2473
|
-
deleteBrand: (body) => {
|
|
2474
|
-
return API$8.delete("", {
|
|
2475
|
-
data: body
|
|
2476
|
-
});
|
|
2477
|
-
}
|
|
2478
|
-
};
|
|
2479
|
-
const API$7 = createAxiosInstance({
|
|
2480
|
-
prefix: "/settings-attribute/v2/measurement"
|
|
2481
|
-
});
|
|
2482
|
-
const SettingMeasurementServiceGo = {
|
|
2483
|
-
getMeasurementList: (params) => {
|
|
2484
|
-
return API$7.get("", { params });
|
|
2485
|
-
},
|
|
2486
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/measurement/dropdown
|
|
2487
|
-
getMeasurementDropdown: () => {
|
|
2488
|
-
return API$7.get("/dropdown");
|
|
2489
|
-
},
|
|
2490
|
-
createMeasurement: (body) => {
|
|
2491
|
-
return API$7.post("", body);
|
|
2492
|
-
},
|
|
2493
|
-
updateMeasurement: (body, id) => {
|
|
2494
|
-
return API$7.put(`/${id}`, body);
|
|
2495
|
-
},
|
|
2496
|
-
//https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/measurement
|
|
2497
|
-
deleteMeasurement: (body) => {
|
|
2498
|
-
return API$7.delete("", {
|
|
2499
|
-
data: body
|
|
2500
|
-
});
|
|
2501
|
-
}
|
|
2502
|
-
};
|
|
2503
|
-
const API$6 = createAxiosInstance({
|
|
2504
|
-
env: "APP_TAGSAMURAI_API",
|
|
2505
|
-
prefix: "/iot/v2/iot"
|
|
2506
|
-
});
|
|
2507
|
-
const IOTServices = {
|
|
2508
|
-
getReaderList: () => {
|
|
2509
|
-
return API$6.get("/antenna/available");
|
|
2510
|
-
},
|
|
2511
|
-
getReaderOptions: (params) => {
|
|
2512
|
-
return API$6.get("/reader/options", { params });
|
|
2513
|
-
},
|
|
2514
|
-
putSetScanParams: (body) => {
|
|
2515
|
-
return API$6.put("/reader/set-scan-params", body);
|
|
2516
|
-
},
|
|
2517
|
-
putIOTTracking: (body) => {
|
|
2518
|
-
return API$6.put("/tracking", body);
|
|
2519
|
-
},
|
|
2520
|
-
getActivityLogData: (params) => {
|
|
2521
|
-
return API$6.get("/activity-log", { params });
|
|
2522
|
-
},
|
|
2523
|
-
getActivityLogOptions: (params) => {
|
|
2524
|
-
return API$6.get("/activity-log/options", { params });
|
|
2525
|
-
}
|
|
2526
|
-
};
|
|
2527
|
-
const ReaderAPI = createAxiosInstance({
|
|
2528
|
-
prefix: "/iot/v2/reader"
|
|
2529
|
-
});
|
|
2530
|
-
const IOTAntennaAPI = createAxiosInstance({
|
|
2531
|
-
prefix: "/iot/v2/iot/antenna"
|
|
2532
|
-
});
|
|
2533
|
-
const IOTReaderAPI = createAxiosInstance({
|
|
2534
|
-
prefix: "/iot/v2/iot/reader"
|
|
2535
|
-
});
|
|
2536
|
-
const IOTActivityLogAPI = createAxiosInstance({
|
|
2537
|
-
prefix: "/iot/v2/iot/activity-log"
|
|
2538
|
-
});
|
|
2539
|
-
const IOTService = {
|
|
2540
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna
|
|
2541
|
-
getIOTAntennaList: (params) => {
|
|
2542
|
-
return IOTAntennaAPI.get("", { params: queryParamsStringfy(params) });
|
|
2543
|
-
},
|
|
2544
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/options
|
|
2545
|
-
getIOTAntennaListOptions: (params) => {
|
|
2546
|
-
return IOTAntennaAPI.get("/options", { params });
|
|
2547
|
-
},
|
|
2548
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/options
|
|
2549
|
-
getIOTReaderListOptions: (params) => {
|
|
2550
|
-
return IOTReaderAPI.get("/options", { params });
|
|
2551
|
-
},
|
|
2552
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader
|
|
2553
|
-
getIOTReaderList: (params) => {
|
|
2554
|
-
return IOTReaderAPI.get("", { params: queryParamsStringfy(params) });
|
|
2555
|
-
},
|
|
2556
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/activity-log
|
|
2557
|
-
getActivityLog: (params) => {
|
|
2558
|
-
return IOTActivityLogAPI.get("", { params });
|
|
2559
|
-
},
|
|
2560
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/activity-log/options
|
|
2561
|
-
getActivityLogOptions: (params) => {
|
|
2562
|
-
return IOTActivityLogAPI.get("/options", { params });
|
|
2563
|
-
},
|
|
2564
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-alias-name
|
|
2565
|
-
setIOTAliasName: (body) => {
|
|
2566
|
-
return IOTReaderAPI.put("/set-alias-name", body);
|
|
2567
|
-
},
|
|
2568
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ping
|
|
2569
|
-
pingIOTSingle: (id) => {
|
|
2570
|
-
return IOTReaderAPI.put(`/${id}/ping`);
|
|
2571
|
-
},
|
|
2572
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/ping/bulk
|
|
2573
|
-
pingIOTBulk: (body) => {
|
|
2574
|
-
return IOTReaderAPI.put("/ping/bulk", body);
|
|
2575
|
-
},
|
|
2576
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-antenna-power
|
|
2577
|
-
setIOTAntennaPowerBulk: (id, body) => {
|
|
2578
|
-
return IOTReaderAPI.put(`/${id}/set-antenna-power`, body);
|
|
2579
|
-
},
|
|
2580
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ports
|
|
2581
|
-
getIOTPortList: (id, params) => {
|
|
2582
|
-
return IOTReaderAPI.get(`/${id}/ports`, { params });
|
|
2583
|
-
},
|
|
2584
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id
|
|
2585
|
-
getIOTDetail: (id) => {
|
|
2586
|
-
return IOTReaderAPI.get(`/${id}`);
|
|
2587
|
-
},
|
|
2588
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/check-manager
|
|
2589
|
-
getIOTCheckManager: () => {
|
|
2590
|
-
return IOTReaderAPI.get("/check-manager");
|
|
2591
|
-
},
|
|
2592
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/:id
|
|
2593
|
-
updateReader: (id, body) => {
|
|
2594
|
-
return ReaderAPI.put(`/${id}`, body);
|
|
2595
|
-
},
|
|
2596
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
2597
|
-
updateReaderStatus: (body) => {
|
|
2598
|
-
return IOTReaderAPI.put("/set-status", body);
|
|
2599
|
-
},
|
|
2600
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/set-status
|
|
2601
|
-
updateAntennaStatus: (body) => {
|
|
2602
|
-
return IOTAntennaAPI.put("/set-status", body);
|
|
2603
|
-
},
|
|
2604
|
-
setIOTPortGroup: (id, body) => {
|
|
2605
|
-
return IOTReaderAPI.put(`/${id}/set-port-group`, body);
|
|
2606
|
-
},
|
|
2607
|
-
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-port-status
|
|
2608
|
-
setIOTPortStatus: (id, body) => {
|
|
2609
|
-
return IOTReaderAPI.put(`/${id}/set-port-status`, body);
|
|
2610
|
-
},
|
|
2611
|
-
setGroupIOT: (body) => {
|
|
2612
|
-
return IOTReaderAPI.put("/set-group", body);
|
|
2613
|
-
},
|
|
2614
|
-
getDataById: (id) => {
|
|
2615
|
-
return IOTReaderAPI.get(`/${id}`);
|
|
2616
|
-
},
|
|
2617
|
-
getChangeLog: (params) => {
|
|
2618
|
-
return IOTReaderAPI.get(`/${params.id}/change-log`, { params });
|
|
2619
|
-
},
|
|
2620
|
-
getChangeLogOptions: (params) => {
|
|
2621
|
-
return IOTReaderAPI.get(`/${params.id}/change-log/options`, { params });
|
|
2622
|
-
},
|
|
2623
|
-
putData: (id, body) => {
|
|
2624
|
-
return IOTReaderAPI.put(`/${id}`, body);
|
|
2625
|
-
}
|
|
2626
|
-
};
|
|
2627
|
-
const ReportAPI = createAxiosInstance({
|
|
2628
|
-
env: "APP_TAGSAMURAI_API",
|
|
2629
|
-
prefix: "/disposal/v2/report"
|
|
2630
|
-
});
|
|
2631
|
-
const DisposalAPI = createAxiosInstance({
|
|
2632
|
-
env: "APP_TAGSAMURAI_API",
|
|
2633
|
-
prefix: "/disposal/v2/disposal"
|
|
2634
|
-
});
|
|
2635
|
-
const ApprovalAPI = createAxiosInstance({
|
|
2636
|
-
env: "APP_TAGSAMURAI_API",
|
|
2637
|
-
prefix: "/disposal/v2/approval"
|
|
2638
|
-
});
|
|
2639
|
-
const DisposalServices = {
|
|
2640
|
-
getReportedDisposal: (params) => {
|
|
2641
|
-
return ReportAPI.get("", { params });
|
|
2642
|
-
},
|
|
2643
|
-
getReportedDisposalOptions: (params) => {
|
|
2644
|
-
return ReportAPI.get("/options", { params });
|
|
2645
|
-
},
|
|
2646
|
-
postReportDisposal: (body) => {
|
|
2647
|
-
return ReportAPI.post("", body);
|
|
2648
|
-
},
|
|
2649
|
-
deleteCancelReport: (params) => {
|
|
2650
|
-
params.isFromDisposal = "false";
|
|
2651
|
-
return ReportAPI.delete("/cancel-report", { params });
|
|
2652
|
-
},
|
|
2653
|
-
deleteDeclineReport: (params) => {
|
|
2654
|
-
params.isFromDisposal = "true";
|
|
2655
|
-
return ReportAPI.delete("/cancel-report", { params });
|
|
2656
|
-
},
|
|
2657
|
-
getPrelistDisposal: (params) => {
|
|
2658
|
-
return DisposalAPI.get("/prelist", { params });
|
|
2659
|
-
},
|
|
2660
|
-
getPrelistDisposalRequest: (params) => {
|
|
2661
|
-
return DisposalAPI.get("/prelist/request", { params });
|
|
2662
|
-
},
|
|
2663
|
-
postCreatePrelist: (body) => {
|
|
2664
|
-
return DisposalAPI.post("/prelist", body);
|
|
2665
|
-
},
|
|
2666
|
-
deletePrelistData: (params) => {
|
|
2667
|
-
return DisposalAPI.delete("/prelist", { params });
|
|
2668
|
-
},
|
|
2669
|
-
postCreateTransaction: (body) => {
|
|
2670
|
-
return DisposalAPI.post("/transaction", body);
|
|
2671
|
-
},
|
|
2672
|
-
putTransaction: (id, body) => {
|
|
2673
|
-
return DisposalAPI.put(`/disposal/${id}`, body);
|
|
2674
|
-
},
|
|
2675
|
-
getTransactionData: (params) => {
|
|
2676
|
-
return DisposalAPI.get("/transaction", { params });
|
|
2677
|
-
},
|
|
2678
|
-
getTransactionDetail: (transactionId, params) => {
|
|
2679
|
-
return DisposalAPI.get(`/transaction/${transactionId}`, { params });
|
|
2680
|
-
},
|
|
2681
|
-
getDisposalTransactionLog: (id) => {
|
|
2682
|
-
return DisposalAPI.get(`/request/${id}/disposal-log`);
|
|
2683
|
-
},
|
|
2684
|
-
getTransactionApprovalHistory: (transactionId) => {
|
|
2685
|
-
return ApprovalAPI.get(`/transaction/${transactionId}/approval-history`);
|
|
2686
|
-
},
|
|
2687
|
-
getTransactionOptions: (params) => {
|
|
2688
|
-
return DisposalAPI.get("/transaction/options", { params });
|
|
2689
|
-
},
|
|
2690
|
-
putCancelTransaction: (params) => {
|
|
2691
|
-
return DisposalAPI.put("/cancel", void 0, { params });
|
|
2692
|
-
},
|
|
2693
|
-
putCancelRequest: (body) => {
|
|
2694
|
-
return DisposalAPI.put("/request/cancel", body);
|
|
2695
|
-
},
|
|
2696
|
-
putDisposalVerification: (body, transactionId) => {
|
|
2697
|
-
return DisposalAPI.put(`/${transactionId}/verification`, body);
|
|
2698
|
-
},
|
|
2699
|
-
putDisposalCompletion: (body, transactionId) => {
|
|
2700
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
2701
|
-
return DisposalAPI.put(`/${transactionId}/completion`, body, { headers });
|
|
2702
|
-
},
|
|
2703
|
-
getDisposalRequest: (params) => {
|
|
2704
|
-
return DisposalAPI.get("/request", { params });
|
|
2705
|
-
},
|
|
2706
|
-
getDisposalRequestOptions: (params) => {
|
|
2707
|
-
return DisposalAPI.get("/request/options", { params });
|
|
2708
|
-
},
|
|
2709
|
-
getVerifyAsset: (params) => {
|
|
2710
|
-
return DisposalAPI.get("/request/scan", { params });
|
|
2711
|
-
},
|
|
2712
|
-
getDisposalHistory: (additionalPath, params) => {
|
|
2713
|
-
return DisposalAPI.get(`/history${additionalPath}`, { params });
|
|
2714
|
-
},
|
|
2715
|
-
getHistoryByTransactionOptions: (params) => {
|
|
2716
|
-
return DisposalAPI.get("/history/options", { params });
|
|
2717
|
-
},
|
|
2718
|
-
getHistoryByAssetOptions: (params) => {
|
|
2719
|
-
return DisposalAPI.get("/history/by-asset/options", { params });
|
|
2720
|
-
},
|
|
2721
|
-
getTransactionApproval: (params) => {
|
|
2722
|
-
return ApprovalAPI.get("", { params });
|
|
2723
|
-
},
|
|
2724
|
-
getApprovalOptions: (params) => {
|
|
2725
|
-
return ApprovalAPI.get("/options", { params });
|
|
2726
|
-
},
|
|
2727
|
-
getApprovalData: (transactionId, params) => {
|
|
2728
|
-
return ApprovalAPI.get(`/transaction/${transactionId}`, { params });
|
|
2729
|
-
},
|
|
2730
|
-
getApprovalTransactionOptions: (transactionId, params) => {
|
|
2731
|
-
return ApprovalAPI.get(`/transaction/${transactionId}/options`, {
|
|
2732
|
-
params
|
|
2733
|
-
});
|
|
2734
|
-
},
|
|
2735
|
-
putApproveApproval: (body) => {
|
|
2736
|
-
return ApprovalAPI.put("/approve", body);
|
|
2737
|
-
},
|
|
2738
|
-
putApproveCompletionApproval: (body, transactionId) => {
|
|
2739
|
-
return ApprovalAPI.put(`/approval-completion/${transactionId}`, body);
|
|
2740
|
-
}
|
|
2741
|
-
};
|
|
2742
|
-
const API$5 = createAxiosInstance({
|
|
2743
|
-
prefix: "/planning-strategy/risk-register"
|
|
2744
|
-
});
|
|
2745
|
-
const RiskRegisterServices = {
|
|
2746
|
-
getActiveRisk: (params) => {
|
|
2747
|
-
return API$5.post("/active/list", params);
|
|
2748
|
-
},
|
|
2749
|
-
getActiveRiskOptions: (params) => {
|
|
2750
|
-
return API$5.post("/active/options", params);
|
|
2751
|
-
},
|
|
2752
|
-
getClosedRisk: (params) => {
|
|
2753
|
-
return API$5.post("/closed/list", params);
|
|
2754
|
-
},
|
|
2755
|
-
getClosedRiskOptions: (params) => {
|
|
2756
|
-
return API$5.post("/closed/options", params);
|
|
2757
|
-
},
|
|
2758
|
-
postRisk: (data) => {
|
|
2759
|
-
return API$5.post("", data);
|
|
2760
|
-
},
|
|
2761
|
-
editRisk: (id, data) => {
|
|
2762
|
-
return API$5.patch(`/${id}`, data);
|
|
2763
|
-
},
|
|
2764
|
-
cancelRisk: (id, data) => {
|
|
2765
|
-
return API$5.patch(`/${id}/cancel`, data);
|
|
2766
|
-
},
|
|
2767
|
-
reviewRisk: (id, data) => {
|
|
2768
|
-
return API$5.patch(`/${id}/review`, data);
|
|
2769
|
-
},
|
|
2770
|
-
completeRisk: (id, data) => {
|
|
2771
|
-
return API$5.patch(`/${id}/complete`, data);
|
|
2772
|
-
},
|
|
2773
|
-
getRiskLogs: (id) => {
|
|
2774
|
-
return API$5.get(`/${id}/log`);
|
|
2775
|
-
}
|
|
2776
|
-
};
|
|
2777
|
-
const API$4 = createAxiosInstance({
|
|
2778
|
-
prefix: "/v2/documents"
|
|
2779
|
-
});
|
|
2780
|
-
const DocumentServices = {
|
|
2781
|
-
getAllDocuments: (params) => {
|
|
2782
|
-
return API$4.get("", { params });
|
|
2783
|
-
},
|
|
2784
|
-
getDocumentOptions: (params) => {
|
|
2785
|
-
return API$4.get("/options", { params });
|
|
2786
|
-
},
|
|
2787
|
-
addDocument: (data) => {
|
|
2788
|
-
return API$4.post("", data);
|
|
2789
|
-
},
|
|
2790
|
-
editDocument: (id, data) => {
|
|
2791
|
-
return API$4.put(`/${id}`, data);
|
|
2792
|
-
},
|
|
2793
|
-
deleteDocument: (id) => {
|
|
2794
|
-
return API$4.delete("/bulk", { data: { ids: id } });
|
|
2795
|
-
},
|
|
2796
|
-
getDocumentFilterOptions: (params) => {
|
|
2797
|
-
return API$4.get("/filter-options", { params });
|
|
2798
|
-
}
|
|
2799
|
-
};
|
|
2800
|
-
const API$3 = createAxiosInstance({
|
|
2801
|
-
prefix: "/planning-strategy/opportunity-register"
|
|
2802
|
-
});
|
|
2803
|
-
const OpportunityRegisterServices = {
|
|
2804
|
-
getOpportunityRegisterActiveList: (params) => {
|
|
2805
|
-
return API$3.get("/active/list", { params: queryParamsStringfy(params) });
|
|
2806
|
-
},
|
|
2807
|
-
getOpportunityRegisterActiveListOptions: (params) => {
|
|
2808
|
-
return API$3.get("/active/options", { params });
|
|
2809
|
-
},
|
|
2810
|
-
getOpportunityRegisterClosedList: (params) => {
|
|
2811
|
-
return API$3.get("/closed/list", { params: queryParamsStringfy(params) });
|
|
2812
|
-
},
|
|
2813
|
-
getOpportunityRegisterClosedListOptions: (params) => {
|
|
2814
|
-
return API$3.get("/closed/options", { params });
|
|
2815
|
-
},
|
|
2816
|
-
getOpportunityLogData: (opportunityId) => {
|
|
2817
|
-
return API$3.get(`/${opportunityId}/log`);
|
|
2818
|
-
},
|
|
2819
|
-
editActiveOpportunity: (opportunityId, body) => {
|
|
2820
|
-
return API$3.patch(`/${opportunityId}`, body);
|
|
2821
|
-
},
|
|
2822
|
-
addActiveOpportunity: (body) => {
|
|
2823
|
-
return API$3.post("/active", body);
|
|
2824
|
-
},
|
|
2825
|
-
reviewOpportunityAction: (opportunityId, body) => {
|
|
2826
|
-
return API$3.post(`/${opportunityId}/review`, body);
|
|
2827
|
-
},
|
|
2828
|
-
cancelOpportunity: (opportunityId, body) => {
|
|
2829
|
-
return API$3.put(`/${opportunityId}/cancel`, body);
|
|
2830
|
-
}
|
|
2831
|
-
};
|
|
2832
|
-
const API$2 = createAxiosInstance({
|
|
2833
|
-
prefix: "/planning-strategy/continuous-improvement"
|
|
2834
|
-
});
|
|
2835
|
-
const ContinuousImprovementServices = {
|
|
2836
|
-
getContinuousImprovementActive: (params) => {
|
|
2837
|
-
return API$2.post("/continuous-improvement-log/active/list", { params });
|
|
2838
|
-
},
|
|
2839
|
-
getContinuousImprovementActiveOptions: (params) => {
|
|
2840
|
-
return API$2.post("/continuous-improvement-log/active/options", { params });
|
|
2841
|
-
},
|
|
2842
|
-
getContinuousImprovementClosed: (params) => {
|
|
2843
|
-
return API$2.post("/continuous-improvement-log/closed/list", { params });
|
|
2844
|
-
},
|
|
2845
|
-
getContinuousImprovementClosedOptions: (params) => {
|
|
2846
|
-
return API$2.post("/continuous-improvement-log/closed/options", { params });
|
|
2847
|
-
},
|
|
2848
|
-
getContinuousImprovementLog: (id) => {
|
|
2849
|
-
return API$2.get(`/continuous-improvement-log/${id}/log`);
|
|
2850
|
-
},
|
|
2851
|
-
createContinuousImprovementLog: (data) => {
|
|
2852
|
-
return API$2.post("/continuous-improvement-log", data);
|
|
2853
|
-
},
|
|
2854
|
-
editContinuousImprovementLog: (id, data) => {
|
|
2855
|
-
return API$2.patch(`/continuous-improvement-log/${id}`, data);
|
|
2856
|
-
},
|
|
2857
|
-
cancelImprovement: (id, payload) => {
|
|
2858
|
-
return API$2.patch(`/continuous-improvement-log/${id}/cancel`, payload);
|
|
2859
|
-
},
|
|
2860
|
-
reviewImprovement: (id, payload) => {
|
|
2861
|
-
return API$2.patch(`/continuous-improvement-log/${id}/review`, payload);
|
|
2862
|
-
},
|
|
2863
|
-
completeImprovement: (id, payload) => {
|
|
2864
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
2865
|
-
return API$2.patch(`/continuous-improvement-log/${id}/complete`, { headers });
|
|
2866
|
-
},
|
|
2867
|
-
getLessonLearned: (params) => {
|
|
2868
|
-
return API$2.post("/lesson-learned/list", { params });
|
|
2869
|
-
},
|
|
2870
|
-
getLessonLearnedOptions: (params) => {
|
|
2871
|
-
return API$2.post("/lesson-learned/options", { params });
|
|
2872
|
-
},
|
|
2873
|
-
createLessonLearned: (data) => {
|
|
2874
|
-
return API$2.post("/lesson-learned", data);
|
|
2875
|
-
},
|
|
2876
|
-
editLessonLearned: (id, data) => {
|
|
2877
|
-
return API$2.patch(`/lesson-learned/${id}`, data);
|
|
2878
|
-
},
|
|
2879
|
-
archiveLessonLearned: (id, payload) => {
|
|
2880
|
-
return API$2.patch(`/lesson-learned/${id}/archive`, payload);
|
|
2881
|
-
},
|
|
2882
|
-
restoreLessonLearned: (id, payload) => {
|
|
2883
|
-
return API$2.patch(`/lesson-learned/${id}/restore`, payload);
|
|
2884
|
-
},
|
|
2885
|
-
getLessonLearnedLog: (id) => {
|
|
2886
|
-
return API$2.get(`/lesson-learned/${id}/log`);
|
|
2887
|
-
},
|
|
2888
|
-
getAuditFindingCorrectiveActionActive: (params) => {
|
|
2889
|
-
return API$2.post("/audit-finding-and-corrective-action/active/list", { params });
|
|
2890
|
-
},
|
|
2891
|
-
getAuditFindingActiveOptions: (params) => {
|
|
2892
|
-
return API$2.post("/audit-finding-and-corrective-action/active/options", {
|
|
2893
|
-
params
|
|
2894
|
-
});
|
|
2895
|
-
},
|
|
2896
|
-
getAuditFindingCorrectiveActionClosed: (params) => {
|
|
2897
|
-
return API$2.post("/audit-finding-and-corrective-action/closed/list", { params });
|
|
2898
|
-
},
|
|
2899
|
-
getAuditFindingClosedOptions: (params) => {
|
|
2900
|
-
return API$2.post("/audit-finding-and-corrective-action/closed/options", {
|
|
2901
|
-
params
|
|
2902
|
-
});
|
|
2903
|
-
},
|
|
2904
|
-
createAuditFindingCorrectiveAction: (data) => {
|
|
2905
|
-
return API$2.post("/audit-finding-and-corrective-action", data);
|
|
2906
|
-
},
|
|
2907
|
-
editAuditFindingCorrectiveAction: (id, data) => {
|
|
2908
|
-
return API$2.patch(`/audit-finding-and-corrective-action/${id}`, data);
|
|
2909
|
-
},
|
|
2910
|
-
cancelAuditFindingCorrectiveAction: (id) => {
|
|
2911
|
-
return API$2.patch(`/audit-finding-and-corrective-action/${id}/cancel`);
|
|
2912
|
-
},
|
|
2913
|
-
reviewAuditFindingCorrectiveAction: (id, payload) => {
|
|
2914
|
-
return API$2.patch(
|
|
2915
|
-
`/audit-finding-and-corrective-action/${id}/review`,
|
|
2916
|
-
payload
|
|
2917
|
-
);
|
|
2918
|
-
},
|
|
2919
|
-
completeAuditFindingCorrectiveAction: (id, payload) => {
|
|
2920
|
-
const headers = { "Content-Type": "multipart/form-data" };
|
|
2921
|
-
return API$2.patch(
|
|
2922
|
-
`/audit-finding-and-corrective-action/${id}/complete`,
|
|
2923
|
-
payload,
|
|
2924
|
-
{ headers }
|
|
2925
|
-
);
|
|
2926
|
-
},
|
|
2927
|
-
getAuditFindingCorrectiveActionLog: (id) => {
|
|
2928
|
-
return API$2.get(`/audit-finding-and-corrective-action/${id}/log`);
|
|
2929
|
-
}
|
|
2930
|
-
};
|
|
2931
|
-
const API$1 = createAxiosInstance({ prefix: "/planning-strategy/amp" });
|
|
2932
|
-
const AmpManagementServices = {
|
|
2933
|
-
getAmpActive(params) {
|
|
2934
|
-
return API$1.post(`/active/list`, { params });
|
|
2935
|
-
},
|
|
2936
|
-
getAmpActiveFilterOptions(params) {
|
|
2937
|
-
return API$1.post(`/active/options`, { params });
|
|
2938
|
-
},
|
|
2939
|
-
getAmpPrevious(params) {
|
|
2940
|
-
return API$1.post(`/previous-version/list`, { params });
|
|
2941
|
-
},
|
|
2942
|
-
getAmpPreviousFilterOptions(params) {
|
|
2943
|
-
return API$1.post(`/previous-version/options`, { params });
|
|
2944
|
-
},
|
|
2945
|
-
initAmp() {
|
|
2946
|
-
return API$1.post("");
|
|
2947
|
-
},
|
|
2948
|
-
cancelAmp(ampId) {
|
|
2949
|
-
return API$1.delete(`/${ampId}/cancel`);
|
|
2950
|
-
},
|
|
2951
|
-
submitAmp(ampId, payload) {
|
|
2952
|
-
return API$1.patch(`/${ampId}`, payload);
|
|
2953
|
-
},
|
|
2954
|
-
getAmpDetail(ampId) {
|
|
2955
|
-
return API$1.get(`/${ampId}`);
|
|
2956
|
-
},
|
|
2957
|
-
deleteAmp(params) {
|
|
2958
|
-
return API$1.delete("", { params });
|
|
2959
|
-
},
|
|
2960
|
-
getSampDropdown() {
|
|
2961
|
-
return API$1.get(`/samp/dropdown`);
|
|
2962
|
-
},
|
|
2963
|
-
getDemandPerformanceRequirement(ampId, params) {
|
|
2964
|
-
return API$1.post(`/${ampId}/demand-and-performance-requirements/list`, {
|
|
2965
|
-
params
|
|
2966
|
-
});
|
|
2967
|
-
},
|
|
2968
|
-
createDemandPerformanceRequirement(ampId, payload) {
|
|
2969
|
-
return API$1.post(`/${ampId}/demand-and-performance-requirements`, payload);
|
|
2970
|
-
},
|
|
2971
|
-
editDemandPerformanceRequirement(ampId, payload) {
|
|
2972
|
-
return API$1.patch(`/${ampId}/demand-and-performance-requirements`, payload);
|
|
2973
|
-
},
|
|
2974
|
-
deleteDemandPerformanceRequirement(ampId, params) {
|
|
2975
|
-
return API$1.delete(`/${ampId}/demand-and-performance-requirements`, {
|
|
2976
|
-
params
|
|
2977
|
-
});
|
|
2978
|
-
},
|
|
2979
|
-
getLifecycleManagementPlan(ampId, params) {
|
|
2980
|
-
return API$1.post(`/${ampId}/lifecycle-management-plan/list`, { params });
|
|
2981
|
-
},
|
|
2982
|
-
getLifecycleManagementPlanOptions(ampId, payload) {
|
|
2983
|
-
return API$1.post(`/${ampId}/lifecycle-management-plan/options`, payload);
|
|
2984
|
-
},
|
|
2985
|
-
createLifecycleManagementPlan(ampId, payload) {
|
|
2986
|
-
return API$1.post(`/${ampId}/lifecycle-management-plan`, payload);
|
|
2987
|
-
},
|
|
2988
|
-
editLifecycleManagementPlan(ampId, payload) {
|
|
2989
|
-
return API$1.patch(`/${ampId}/lifecycle-management-plan`, payload);
|
|
2990
|
-
},
|
|
2991
|
-
deleteLifecycleManagementPlan(ampId, params) {
|
|
2992
|
-
return API$1.delete(`${ampId}/lifecycle-management-plan`, { params });
|
|
2993
|
-
},
|
|
2994
|
-
getResourceBudgetPlan(ampId, params) {
|
|
2995
|
-
return API$1.post(`/${ampId}/resource-budget-plan/list`, { params });
|
|
2996
|
-
},
|
|
2997
|
-
createResourceBudgetPlan(ampId, payload) {
|
|
2998
|
-
return API$1.post(`/${ampId}/resource-budget-plan`, payload);
|
|
2999
|
-
},
|
|
3000
|
-
editResourceBudgetPlan(ampId, payload) {
|
|
3001
|
-
return API$1.patch(`/${ampId}/resource-budget-plan`, payload);
|
|
3002
|
-
},
|
|
3003
|
-
deleteResourceBudgetPlan(ampId, params) {
|
|
3004
|
-
return API$1.delete(`/${ampId}/resource-budget-plan`, { params });
|
|
3005
|
-
}
|
|
3006
|
-
};
|
|
3007
|
-
const API = createAxiosInstance({
|
|
3008
|
-
prefix: "/planning-strategy/samp"
|
|
3009
|
-
});
|
|
3010
|
-
const SAMPServices = {
|
|
3011
|
-
getActiveSAMP: (params) => {
|
|
3012
|
-
return API.post("/active/list", params);
|
|
3013
|
-
},
|
|
3014
|
-
getActiveSAMPOptions: (params) => {
|
|
3015
|
-
return API.post("/active/options", params);
|
|
3016
|
-
},
|
|
3017
|
-
getPreviousVersionSAMP: (params) => {
|
|
3018
|
-
return API.post("/previous-version/list", params);
|
|
3019
|
-
},
|
|
3020
|
-
getPreviousSAMPOptions: (params) => {
|
|
3021
|
-
return API.post("/previous-version/options", params);
|
|
3022
|
-
},
|
|
3023
|
-
initSAMP: () => {
|
|
3024
|
-
return API.post("/init");
|
|
3025
|
-
},
|
|
3026
|
-
saveSubmitSAMP: (data, sampId) => {
|
|
3027
|
-
return API.patch(`/${sampId}`, data);
|
|
3028
|
-
},
|
|
3029
|
-
getDetailSAMP: (sampId) => {
|
|
3030
|
-
return API.get(`/${sampId}`);
|
|
3031
|
-
},
|
|
3032
|
-
deleteSAMP: (params) => {
|
|
3033
|
-
return API.delete("", { params });
|
|
3034
|
-
},
|
|
3035
|
-
cancelSAMPCreate: (sampId) => {
|
|
3036
|
-
return API.delete(`/${sampId}/cancel`);
|
|
3037
|
-
},
|
|
3038
|
-
getInternalContextData: (params, sampId) => {
|
|
3039
|
-
return API.post(`${sampId}/internal-context/list`, params);
|
|
3040
|
-
},
|
|
3041
|
-
postInternalContext: (data, sampId) => {
|
|
3042
|
-
return API.post(`${sampId}/internal-context`, data);
|
|
3043
|
-
},
|
|
3044
|
-
editInternalContext: (contextId, data, sampId) => {
|
|
3045
|
-
return API.patch(`${sampId}/internal-context/${contextId}`, data);
|
|
3046
|
-
},
|
|
3047
|
-
deleteInternalContext: (params, sampId) => {
|
|
3048
|
-
return API.delete(`${sampId}/internal-context`, { params });
|
|
3049
|
-
},
|
|
3050
|
-
getExternalContextData: (params, sampId) => {
|
|
3051
|
-
return API.post(`${sampId}/external-context/list`, params);
|
|
3052
|
-
},
|
|
3053
|
-
postExternalContext: (data, sampId) => {
|
|
3054
|
-
return API.post(`${sampId}/external-context`, data);
|
|
3055
|
-
},
|
|
3056
|
-
editExternalContext: (contextId, data, sampId) => {
|
|
3057
|
-
return API.patch(`${sampId}/external-context/${contextId}`, data);
|
|
3058
|
-
},
|
|
3059
|
-
deleteExternalContext: (params, sampId) => {
|
|
3060
|
-
return API.delete(`${sampId}/external-context`, { params });
|
|
3061
|
-
},
|
|
3062
|
-
getStakeholders: (params, sampId) => {
|
|
3063
|
-
return API.post(`${sampId}/stakeholders/list`, params);
|
|
3064
|
-
},
|
|
3065
|
-
postStakeholders: (data, sampId) => {
|
|
3066
|
-
return API.post(`${sampId}/stakeholders`, data);
|
|
3067
|
-
},
|
|
3068
|
-
editStakeholders: (stakeholderId, data, sampId) => {
|
|
3069
|
-
return API.patch(`${sampId}/stakeholders/${stakeholderId}`, data);
|
|
3070
|
-
},
|
|
3071
|
-
deleteStakeholders: (params, sampId) => {
|
|
3072
|
-
return API.delete(`${sampId}/stakeholders`, { params });
|
|
3073
|
-
},
|
|
3074
|
-
getRolesResponsibility: (params, sampId) => {
|
|
3075
|
-
return API.post(`${sampId}/roles-and-responsibility/list`, params);
|
|
3076
|
-
},
|
|
3077
|
-
postRolesResponsibility: (data, sampId) => {
|
|
3078
|
-
return API.post(`${sampId}/roles-and-responsibility`, data);
|
|
3079
|
-
},
|
|
3080
|
-
editRolesResponsibility: (rolesResId, data, sampId) => {
|
|
3081
|
-
return API.patch(`${sampId}/roles-and-responsibility/${rolesResId}`, data);
|
|
3082
|
-
},
|
|
3083
|
-
deleteRolesResponsibility: (params, sampId) => {
|
|
3084
|
-
return API.delete(`${sampId}/roles-and-responsibility`, { params });
|
|
3085
|
-
},
|
|
3086
|
-
getSupportingSystemTools: (params, sampId) => {
|
|
3087
|
-
return API.post(`${sampId}/supporting-system-tools/list`, params);
|
|
3088
|
-
},
|
|
3089
|
-
postSupportingSystemTools: (data, sampId) => {
|
|
3090
|
-
return API.post(`${sampId}/supporting-system-tools`, data);
|
|
3091
|
-
},
|
|
3092
|
-
editSupportingSystemTools: (toolsId, data, sampId) => {
|
|
3093
|
-
return API.patch(`${sampId}/supporting-system-tools/${toolsId}`, data);
|
|
3094
|
-
},
|
|
3095
|
-
deleteSupportingSystemTools: (params, sampId) => {
|
|
3096
|
-
return API.delete(`${sampId}/supporting-system-tools`, { params });
|
|
3097
|
-
},
|
|
3098
|
-
getAMObjectives: (params, sampId) => {
|
|
3099
|
-
return API.post(`${sampId}/am-objective/list`, params);
|
|
3100
|
-
},
|
|
3101
|
-
getAMObjectivesOptions: (params, sampId) => {
|
|
3102
|
-
return API.post(`${sampId}/am-objective/options`, params);
|
|
3103
|
-
},
|
|
3104
|
-
postAMObjectives: (data, sampId) => {
|
|
3105
|
-
return API.post(`${sampId}/am-objective`, data);
|
|
3106
|
-
},
|
|
3107
|
-
editAMObjectives: (objectiveId, data, sampId) => {
|
|
3108
|
-
return API.put(`${sampId}/am-objective/${objectiveId}`, data);
|
|
3109
|
-
},
|
|
3110
|
-
deleteAMObjectives: (params, sampId) => {
|
|
3111
|
-
return API.delete(`${sampId}/am-objective`, { params });
|
|
3112
|
-
},
|
|
3113
|
-
getRisk: (params, sampId) => {
|
|
3114
|
-
return API.post(`${sampId}/strategic-risk-register/list`, params);
|
|
3115
|
-
},
|
|
3116
|
-
getRiskOptions: (params, sampId) => {
|
|
3117
|
-
return API.post(`${sampId}/strategic-risk-register/options`, params);
|
|
3118
|
-
},
|
|
3119
|
-
postRisk: (data, sampId) => {
|
|
3120
|
-
return API.post(`${sampId}/strategic-risk-register`, data);
|
|
3121
|
-
},
|
|
3122
|
-
editRisk: (riskId, data, sampId) => {
|
|
3123
|
-
return API.put(`${sampId}/strategic-risk-register/${riskId}`, data);
|
|
3124
|
-
},
|
|
3125
|
-
deleteRisk: (params, sampId) => {
|
|
3126
|
-
return API.delete(`${sampId}/strategic-risk-register`, { params });
|
|
3127
|
-
},
|
|
3128
|
-
getOpportunity: (params, sampId) => {
|
|
3129
|
-
return API.post(`${sampId}/strategic-opportunity-register/list`, params);
|
|
3130
|
-
},
|
|
3131
|
-
getOpportunityOptions: (params, sampId) => {
|
|
3132
|
-
return API.post(`${sampId}/strategic-opportunity-register/options`, params);
|
|
3133
|
-
},
|
|
3134
|
-
postOpportunity: (data, sampId) => {
|
|
3135
|
-
return API.post(`${sampId}/strategic-opportunity-register`, data);
|
|
3136
|
-
},
|
|
3137
|
-
editOpportunity: (opportunityId, data, sampId) => {
|
|
3138
|
-
return API.put(
|
|
3139
|
-
`${sampId}/strategic-opportunity-register/${opportunityId}`,
|
|
3140
|
-
data
|
|
3141
|
-
);
|
|
3142
|
-
},
|
|
3143
|
-
deleteOpportunity: (params, sampId) => {
|
|
3144
|
-
return API.delete(`${sampId}/strategic-opportunity-register`, { params });
|
|
442
|
+
getUserDetailUserLogAssignmentOption: (userId, params) => {
|
|
443
|
+
return API.get(`/assignment-log/${userId}/options`, { params });
|
|
3145
444
|
}
|
|
3146
445
|
};
|
|
3147
446
|
export {
|
|
3148
|
-
|
|
3149
|
-
AliasCodeServices,
|
|
3150
|
-
AmpManagementServices,
|
|
3151
|
-
AssetNameServices,
|
|
3152
|
-
AssetPolicyServices,
|
|
3153
|
-
AssetServices,
|
|
3154
|
-
AssignmentServices,
|
|
3155
|
-
AuditServices,
|
|
3156
|
-
AuthServices$1 as AuthServices,
|
|
3157
|
-
BorrowServicesGo as BorrowServices,
|
|
3158
|
-
BrandServices,
|
|
447
|
+
AuthServices,
|
|
3159
448
|
ChangelogServices,
|
|
3160
|
-
ContinuousImprovementServices,
|
|
3161
|
-
CountryStateServices,
|
|
3162
449
|
CustomFieldServices,
|
|
3163
|
-
DamageServices,
|
|
3164
|
-
DashboardServices,
|
|
3165
|
-
DisposalServices$1 as DisposalServices,
|
|
3166
|
-
DocumentServices,
|
|
3167
|
-
FileManagerServices,
|
|
3168
|
-
GeneralSettingsServices,
|
|
3169
|
-
AuthServices as GlobalAuthServices,
|
|
3170
|
-
GroupCategoryServices,
|
|
3171
|
-
I18nService,
|
|
3172
|
-
IOTServices,
|
|
3173
|
-
ImportServices,
|
|
3174
|
-
LicenseServices,
|
|
3175
|
-
ChangelogServices as LogServices,
|
|
3176
|
-
MissingServices,
|
|
3177
|
-
ModelTypeServices,
|
|
3178
|
-
MyAssetServices,
|
|
3179
|
-
ChangelogServices as NewChangelogServices,
|
|
3180
|
-
IOTService as NewIOTServices,
|
|
3181
|
-
NotificationApprovalServices,
|
|
3182
|
-
NotificationServices,
|
|
3183
|
-
DisposalServices as OldDisposalServices,
|
|
3184
|
-
OpenAPIServices,
|
|
3185
|
-
OpportunityRegisterServices,
|
|
3186
|
-
ReaderServices,
|
|
3187
|
-
RepairServices,
|
|
3188
|
-
ReportServices,
|
|
3189
|
-
RiskRegisterServices,
|
|
3190
450
|
RoleServices,
|
|
3191
|
-
RoutineServices,
|
|
3192
|
-
SAMPServices,
|
|
3193
|
-
ServiceCenterServices,
|
|
3194
|
-
SessionLogServices,
|
|
3195
|
-
SettingAssetNameServiceGo as SettingAssetNameService,
|
|
3196
|
-
SettingBrandServiceGo as SettingBrandService,
|
|
3197
|
-
SettingMeasurementServiceGo as SettingMeasurementService,
|
|
3198
451
|
SubUserServices,
|
|
3199
|
-
TAGServices,
|
|
3200
|
-
TrackingServices,
|
|
3201
|
-
TransactionSettingServices,
|
|
3202
|
-
TransferServicesGo as TransferServices,
|
|
3203
452
|
UserServices,
|
|
3204
453
|
buildFileURL,
|
|
3205
454
|
downloadFile,
|