- added setting for documents category selection for fileselect;
- added confirmation popup for fileselect and fileinput;
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user