:
This commit is contained in:
@@ -21,6 +21,7 @@ import LookupdataService from '../../../../service/lookupdata-service';
|
||||
// store
|
||||
import { storeSet } from '../../../../store';
|
||||
import getTimeParsedFromString from '../../../../helpers/getTimeParsedFromString';
|
||||
import { mimeTypes } from '../../../../configData';
|
||||
|
||||
const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, status }, ref) {
|
||||
const navigate = useNavigate();
|
||||
@@ -211,6 +212,11 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
return values.status === 'PUBLISH'
|
||||
}
|
||||
|
||||
const acceptAllFormats = () => {
|
||||
console.log(mimeTypes.map(o => o.code))
|
||||
return mimeTypes.map(o => o.code);
|
||||
}
|
||||
|
||||
return (
|
||||
<form className="appForm" onSubmit={handleSubmit(onSubmit)}>
|
||||
<UnsavedChangesDetector getValuesFn={getValues}/>
|
||||
@@ -243,7 +249,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
errors={errors}
|
||||
defaultValue={values['docs']}
|
||||
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||
accept={["application/pdf", "application/vnd.ms-excel"]}
|
||||
accept={acceptAllFormats()}
|
||||
chooseLabel={__('Aggiungi documento', 'gepafin')}
|
||||
multiple={true}
|
||||
doctype='document'
|
||||
|
||||
Reference in New Issue
Block a user