- updated call form, new fields;

- updated preview pages for bando;
- fixed bug with decimal number field;
This commit is contained in:
Vitalii Kiiko
2024-10-01 12:55:17 +02:00
parent 111b1b5620
commit 676d7621e7
17 changed files with 282 additions and 56 deletions

View File

@@ -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);