- updated call form, new fields;
- updated preview pages for bando; - fixed bug with decimal number field;
This commit is contained in:
15
src/App.js
15
src/App.js
@@ -8,6 +8,7 @@ import AuthenticationService from './service/authentication-service';
|
||||
|
||||
// store
|
||||
import { useStore, storeSet } from './store';
|
||||
import CompanyService from './service/company-service';
|
||||
|
||||
const i18n = createI18n({}, 'gepafin');
|
||||
|
||||
@@ -17,6 +18,8 @@ function App() {
|
||||
const callback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
storeSet.main.userData(data.data);
|
||||
storeSet.main.setAsyncRequest();
|
||||
CompanyService.getCompanyForUser(data.data.id, companyCallback, errCompanyCallback)
|
||||
} else {
|
||||
storeSet.main.doLogout();
|
||||
}
|
||||
@@ -28,6 +31,18 @@ function App() {
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
const companyCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
storeSet.main.companies(data.data);
|
||||
}
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
const errCompanyCallback = (data) => {
|
||||
storeSet.main.doLogout();
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
storeSet.main.setAsyncRequest();
|
||||
AuthenticationService.me(callback, errCallback);
|
||||
|
||||
Reference in New Issue
Block a user