- added setting for documents category selection for fileselect;

- added confirmation popup for fileselect and fileinput;
This commit is contained in:
Vitalii Kiiko
2025-03-12 12:45:08 +01:00
parent c9770eb91b
commit 8a62213bad
10 changed files with 77 additions and 15 deletions

View File

@@ -25,6 +25,7 @@ import BandoService from '../../service/bando-service';
// TODO temp data
import { elementItems } from '../../tempData';
import DocumentCategoryService from '../../service/document-category-service';
const BandoFormsEdit = () => {
const { id, formId } = useParams();
@@ -257,6 +258,15 @@ const BandoFormsEdit = () => {
set404FromErrorResponse(data);
}
const getCategories = (resp) => {
if (resp.status === 'SUCCESS') {
storeSet.main.documentCategories(resp.data.map(o => ({value: o.id, label: o.description})));
}
}
const errGetCategories = () => {
}
useEffect(() => {
const bandoId = getBandoId();
const parsedFormId = parseInt(formId)
@@ -283,6 +293,10 @@ const BandoFormsEdit = () => {
}
}, [id, formId]);
useEffect(() => {
DocumentCategoryService.getCategories(getCategories, errGetCategories)
}, []);
return (
<div className="appPage">
<div className="appPage__pageHeader">