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