- updated functionality of downloading company delegation;
This commit is contained in:
@@ -20,7 +20,7 @@ const DownloadCompanyDelegation = ({ applicationId = 0 }) => {
|
|||||||
|
|
||||||
const getDellegaCallback = (data) => {
|
const getDellegaCallback = (data) => {
|
||||||
if (data.data) {
|
if (data.data) {
|
||||||
setDelega([data.data]);
|
setDelega(data.data);
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ const DownloadCompanyDelegation = ({ applicationId = 0 }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
CompanyService.getCompanyDelega(0, getDellegaCallback, errDellegaCallback, [
|
CompanyService.getCompanyDelega(getDellegaCallback, errDellegaCallback, [
|
||||||
['applicationId', applicationId]
|
['applicationId', applicationId]
|
||||||
]);
|
]);
|
||||||
}, [])
|
}, [])
|
||||||
|
|||||||
@@ -341,7 +341,9 @@ const ProfileCompany = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (formInitialData.id) {
|
if (formInitialData.id) {
|
||||||
storeSet.main.setAsyncRequest();
|
storeSet.main.setAsyncRequest();
|
||||||
CompanyService.getCompanyDelega(formInitialData.id, getDellegaCallback, errDellegaCallback);
|
CompanyService.getCompanyDelega(getDellegaCallback, errDellegaCallback, [
|
||||||
|
['companyId', formInitialData.id]
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}, [formInitialData])
|
}, [formInitialData])
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ export default class CompanyService {
|
|||||||
NetworkService.get(`${API_BASE_URL}/company/user/${id}`, callback, errCallback);
|
NetworkService.get(`${API_BASE_URL}/company/user/${id}`, callback, errCallback);
|
||||||
};
|
};
|
||||||
|
|
||||||
static getCompanyDelega = (id, callback, errCallback) => {
|
static getCompanyDelega = (callback, errCallback, queryParams) => {
|
||||||
NetworkService.get(`${API_BASE_URL}/company/${id}/delegation`, callback, errCallback);
|
NetworkService.get(`${API_BASE_URL}/company/delegation`, callback, errCallback, queryParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
static downloadCompanyDelega = (id, body, callback, errCallback) => {
|
static downloadCompanyDelega = (id, body, callback, errCallback) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user