Merge branch 'master' into develop
This commit is contained in:
@@ -154,6 +154,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.appForm__field--required.appForm__field--required {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Controller } from 'react-hook-form';
|
||||
import { is, isEmpty } from 'ramda';
|
||||
|
||||
import { InputNumber } from 'primereact/inputnumber';
|
||||
import { isNaN } from 'mathjs';
|
||||
|
||||
const NumberInput = ({
|
||||
fieldName,
|
||||
@@ -29,13 +30,13 @@ const NumberInput = ({
|
||||
const input = <Controller
|
||||
name={fieldName}
|
||||
control={control}
|
||||
defaultValue={is(Number, defaultValue) ? defaultValue : ''}
|
||||
defaultValue={is(Number, defaultValue) || (!is(Number, defaultValue) && !isNaN(parseFloat(defaultValue))) ? defaultValue : ''}
|
||||
rules={config}
|
||||
render={({ field, fieldState }) => (
|
||||
<InputNumber inputId={field.name}
|
||||
disabled={disabled}
|
||||
readOnly={readOnly}
|
||||
value={is(Number, field.value) ? field.value : ''}
|
||||
value={is(Number, field.value) || (!is(Number, field.value) && !isNaN(parseFloat(field.value))) ? field.value : ''}
|
||||
onValueChange={(e) => field.onChange(e.value)}
|
||||
min={minAttr}
|
||||
max={maxAttr}
|
||||
|
||||
@@ -42,7 +42,7 @@ const FormField = (props) => {
|
||||
const Comp = !isNil(fields[props.type]) ? fields[props.type] : null;
|
||||
|
||||
return (!isNil(Comp)
|
||||
? <div className={classNames(['appForm__field', props.type])}>
|
||||
? <div className={classNames(['appForm__field', props.type, props.additionalClass])}>
|
||||
<Comp {...props} />
|
||||
</div>
|
||||
: null
|
||||
|
||||
@@ -5,25 +5,22 @@ import CodiceFiscale from 'codice-fiscale-js';
|
||||
export const isPIVA = (v) => {
|
||||
const regexp = new RegExp(/^[0-9]{11}$/);
|
||||
//console.log('isPIVA', !isEmpty(match(regexp, String(v))))
|
||||
return !isEmpty(match(regexp, String(v)));
|
||||
return v && !isEmpty(v) && !isEmpty(match(regexp, String(v)));
|
||||
}
|
||||
|
||||
// example: DSDDSD99P23B352G
|
||||
export const isCodiceFiscale = (v) => {
|
||||
//const regexp = new RegExp(/^(?:[A-Z][AEIOU][AEIOUX]|[AEIOU]X{2}|[B-DF-HJ-NP-TV-Z]{2}[A-Z]){2}(?:[\dLMNP-V]{2}(?:[A-EHLMPR-T](?:[04LQ][1-9MNP-V]|[15MR][\dLMNP-V]|[26NS][0-8LMNP-U])|[DHPS][37PT][0L]|[ACELMRT][37PT][01LM]|[AC-EHLMPR-T][26NS][9V])|(?:[02468LNQSU][048LQU]|[13579MPRTV][26NS])B[26NS][9V])(?:[A-MZ][1-9MNP-V][\dLMNP-V]{2}|[A-M][0L](?:[1-9MNP-V][\dLMNP-V]|[0L][1-9MNP-V]))[A-Z]$/, 'i')
|
||||
//return !isEmpty(match(regexp, v));
|
||||
//console.log('isCodiceFiscale', CodiceFiscale.check(v))
|
||||
return CodiceFiscale.check(v);
|
||||
return v && !isEmpty(v) && CodiceFiscale.check(v);
|
||||
}
|
||||
|
||||
export const isCAP = (v) => {
|
||||
const regexp = new RegExp(/^[0-9]{5}$/);
|
||||
return !isEmpty(match(regexp, String(v)));
|
||||
return v && !isEmpty(v) && !isEmpty(match(regexp, String(v)));
|
||||
}
|
||||
|
||||
export const isIBAN = (v) => {
|
||||
const regexp = new RegExp(/^((NO)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{3}|(NO)[0-9A-Z]{13}|(BE)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}|(BE)[0-9A-Z]{14}|(DK|FO|FI|GL|NL)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{2}|(DK|FO|FI|GL|NL)[0-9A-Z]{16}|(MK|SI)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{3}|(MK|SI)[0-9A-Z]{17}|(BA|EE|KZ|LT|LU|AT)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}|(BA|EE|KZ|LT|LU|AT)[0-9A-Z]{18}|(HR|LI|LV|CH)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{1}|(HR|LI|LV|CH)[0-9A-Z]{19}|(BG|DE|IE|ME|RS|GB)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{2}|(BG|DE|IE|ME|RS|GB)[0-9A-Z]{20}|(GI|IL)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{3}|(GI|IL)[0-9A-Z]{21}|(AD|CZ|SA|RO|SK|ES|SE|TN)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}|(AD|CZ|SA|RO|SK|ES|SE|TN)[0-9A-Z]{22}|(PT)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{1}|(PT)[0-9A-Z]{23}|(IS|TR)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{2}|(IS|TR)[0-9A-Z]{24}|(FR|GR|IT|MC|SM)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{3}|(FR|GR|IT|MC|SM)[0-9A-Z]{25}|(AL|CY|HU|LB|PL)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}|(AL|CY|HU|LB|PL)[0-9A-Z]{26}|(MU)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{2}|(MU)[0-9A-Z]{28}|(MT)[0-9A-Z]{2}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{4}[ ][0-9A-Z]{3}|(MT)[0-9A-Z]{29})$/)
|
||||
return !isEmpty(match(regexp, v));
|
||||
return v && !isEmpty(v) && !isEmpty(match(regexp, v));
|
||||
}
|
||||
|
||||
export const isEmail = (v) => {
|
||||
@@ -58,7 +55,7 @@ export const isUrl = (v) => {
|
||||
|
||||
export const isMarcaDaBollo = (v) => {
|
||||
const regexp = new RegExp(/^[0-9]{14}$/);
|
||||
return !isEmpty(match(regexp, String(v)));
|
||||
return v && !isEmpty(match(regexp, String(v)));
|
||||
}
|
||||
|
||||
export const minChecks = (v, num) => {
|
||||
|
||||
@@ -52,6 +52,7 @@ import { defaultMaxFileSize } from '../../configData';
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const BandoApplication = () => {
|
||||
const antiMoneyLaundryCalls = useStoreValue('antiMoneyLaundryCalls');
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const { id } = useParams();
|
||||
const [isExpired, setIsExpired] = useState(false);
|
||||
@@ -460,7 +461,7 @@ const BandoApplication = () => {
|
||||
type="button"
|
||||
disabled={'SUBMIT' === applicationStatus || isExpired}
|
||||
onClick={onValidate}
|
||||
label={__('Convalidare', 'gepafin')}
|
||||
label={__('Convalida per la firma', 'gepafin')}
|
||||
icon="pi pi-check"
|
||||
iconPos="right"/>
|
||||
</div>
|
||||
@@ -572,6 +573,7 @@ const BandoApplication = () => {
|
||||
formData.map((o) => {
|
||||
const variable = head(o.settings.filter(o => o.name === 'variable'));
|
||||
const formula = head(o.settings.filter(o => o.name === 'formula'));
|
||||
const isRequestedAmount = head(o.settings.filter(o => o.name === 'isRequestedAmount'));
|
||||
|
||||
if (formula && !isEmpty(formula.value)) {
|
||||
try {
|
||||
@@ -600,6 +602,10 @@ const BandoApplication = () => {
|
||||
? pathOr(0, [o.id, 'total'], updatedFormValues)
|
||||
: pathOr(0, [o.id], updatedFormValues);
|
||||
}
|
||||
|
||||
if (REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(bandoId) && isRequestedAmount && isRequestedAmount.value) {
|
||||
updatedFormValues[o.id] = 100;
|
||||
}
|
||||
});
|
||||
|
||||
if (!isEmpty(updatedFormValues) && !equal(updatedFormValues, formValues)) {
|
||||
@@ -713,6 +719,7 @@ const BandoApplication = () => {
|
||||
{'DRAFT' === applicationStatus
|
||||
/*|| 'AWAITING' === applicationStatus*/
|
||||
? formData.map(o => {
|
||||
const isRequestedAmount = head(o.settings.filter(o => o.name === 'isRequestedAmount'));
|
||||
const label = head(o.settings.filter(o => o.name === 'label'));
|
||||
const text = head(o.settings.filter(o => o.name === 'text'));
|
||||
const placeholder = head(o.settings.filter(o => o.name === 'placeholder'));
|
||||
@@ -756,6 +763,7 @@ const BandoApplication = () => {
|
||||
/*if (o.name === 'fileselect') {
|
||||
console.log('options::', options)
|
||||
}*/
|
||||
const hideField = REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(bandoId) && isRequestedAmount && isRequestedAmount.value
|
||||
|
||||
return ['paragraph'].includes(o.name) && text
|
||||
? <div key={o.id}>
|
||||
@@ -765,6 +773,7 @@ const BandoApplication = () => {
|
||||
</div>
|
||||
: <FormField
|
||||
key={o.id}
|
||||
additionalClass={hideField ? 'hidden' : ''}
|
||||
disabled={isExpired}
|
||||
readOnly={formula && !isEmpty(formula.value)}
|
||||
type={o.name}
|
||||
|
||||
@@ -35,6 +35,7 @@ const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
|
||||
step: __('Numero Decimali', 'gepafin'),
|
||||
isRequestedAmount: __('Importo richiesto', 'gepafin'),
|
||||
isDelegation: __('Delega', 'gepafin'),
|
||||
isPecEmail: __('PEC email', 'gepafin'),
|
||||
options: __('Opzioni', 'gepafin'),
|
||||
mime: __('Tipo di file', 'gepafin'),
|
||||
documentCategories: __('Categorie dei documenti', 'gepafin'),
|
||||
@@ -130,7 +131,7 @@ const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
|
||||
name={setting.name}
|
||||
bandoStatus={bandoStatus}
|
||||
setDataFn={updateDataFn}/>
|
||||
} else if (['isRequestedAmount', 'isDelegation', 'isChecklistItem'].includes(setting.name)) {
|
||||
} else if (['isRequestedAmount', 'isDelegation', 'isPecEmail', 'isChecklistItem'].includes(setting.name)) {
|
||||
return <InputSwitch
|
||||
checked={setting.value}
|
||||
onChange={(e) => changeFn(e.value, setting.name)}/>
|
||||
|
||||
@@ -36,6 +36,7 @@ const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
const BandoViewBeneficiario = () => {
|
||||
const isAsyncRequest = useStoreValue('isAsyncRequest');
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const antiMoneyLaundryCalls = useStoreValue('antiMoneyLaundryCalls');
|
||||
const { id } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const [data, setData] = useState({});
|
||||
@@ -98,7 +99,7 @@ const BandoViewBeneficiario = () => {
|
||||
if (REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE') {
|
||||
return __('Presenta domanda', 'gepafin');
|
||||
} else {
|
||||
if(data.allowMultipleApplications){
|
||||
if (data.allowMultipleApplications) {
|
||||
return __('Presenta domanda', 'gepafin');
|
||||
} else {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
@@ -115,10 +116,10 @@ const BandoViewBeneficiario = () => {
|
||||
if (REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE') {
|
||||
return 'pi pi-save';
|
||||
} else {
|
||||
if(data.allowMultipleApplications){
|
||||
if (data.allowMultipleApplications) {
|
||||
return 'pi pi-save';
|
||||
} else {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
return 'pi pi-arrow-right';
|
||||
} else {
|
||||
return 'pi pi-save';
|
||||
@@ -132,7 +133,7 @@ const BandoViewBeneficiario = () => {
|
||||
|
||||
if (data.confidi) {
|
||||
if ((data.id === 6 && REACT_APP_HUB_ID === 'p4lk3bcx1RStqTaIVVbXs') || role === 'ROLE_CONFIDI') {
|
||||
if(data.allowMultipleApplications){
|
||||
if (data.allowMultipleApplications) {
|
||||
const bandoId = getBandoId();
|
||||
ApplicationService.createApplication(bandoId, {}, createApplCallback, errCreateApplCallback, [['companyId', chosenCompanyId]]);
|
||||
} else {
|
||||
@@ -151,7 +152,7 @@ const BandoViewBeneficiario = () => {
|
||||
const bandoId = getBandoId();
|
||||
ApplicationService.createApplication(bandoId, {}, createApplCallback, errCreateApplCallback, [['companyId', chosenCompanyId]]);
|
||||
} else {
|
||||
if(data.allowMultipleApplications){
|
||||
if (data.allowMultipleApplications) {
|
||||
const bandoId = getBandoId();
|
||||
ApplicationService.createApplication(bandoId, {}, createApplCallback, errCreateApplCallback, [['companyId', chosenCompanyId]]);
|
||||
} else {
|
||||
@@ -397,51 +398,57 @@ const BandoViewBeneficiario = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__row">
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo totale', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amount)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo minimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMin)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo massimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMax)}</span>
|
||||
</p>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__row">
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo totale', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amount)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo minimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMin)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo massimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMax)}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data apertura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[0])} {data.startTime}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data chiusura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[1])} {data.endTime}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data apertura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[0])} {data.startTime}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data chiusura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[1])} {data.endTime}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Descrizione dettagliata', 'gepafin')}</h2>
|
||||
<div className="ql-editor">
|
||||
{renderHtmlContent(data.descriptionLong)}
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Descrizione dettagliata', 'gepafin')}</h2>
|
||||
<div className="ql-editor">
|
||||
{renderHtmlContent(data.descriptionLong)}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Requisiti di Partecipazione', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.aimedTo.map((o, i) => <li key={i}>
|
||||
{o.value}
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Requisiti di Partecipazione', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.aimedTo.map((o, i) => <li key={i}>
|
||||
{o.value}
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Documentazione richiesta', 'gepafin')}</h2>
|
||||
@@ -461,18 +468,20 @@ const BandoViewBeneficiario = () => {
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Allegati', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.docs
|
||||
.filter(o => o.source === 'CALL' && o.type === 'DOCUMENT')
|
||||
.map((o, i) => <li key={i}>
|
||||
<a href={o.filePath} target="_blank" rel="noreferrer">{o.name}</a>
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Allegati', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.docs
|
||||
.filter(o => o.source === 'CALL' && o.type === 'DOCUMENT')
|
||||
.map((o, i) => <li key={i}>
|
||||
<a href={o.filePath} target="_blank" rel="noreferrer">{o.name}</a>
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('FAQ', 'gepafin')}</h2>
|
||||
@@ -534,7 +543,9 @@ const BandoViewBeneficiario = () => {
|
||||
: null}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Download Documenti', 'gepafin')}</h2>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <h2>{__('Download Documenti', 'gepafin')}</h2>}
|
||||
<div className="appPageSection__actions">
|
||||
{/* <Button
|
||||
type="button"
|
||||
@@ -543,13 +554,15 @@ const BandoViewBeneficiario = () => {
|
||||
onClick={scaricaBando}
|
||||
label={__('Scarica Bando Completo', 'gepafin')}
|
||||
icon="pi pi-download" iconPos="right"/>*/}
|
||||
<Button
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <Button
|
||||
type="button"
|
||||
disabled={isExpired}
|
||||
outlined
|
||||
onClick={scaricaModulistica}
|
||||
label={__('Scarica Bando Completo e Modulistica', 'gepafin')}
|
||||
icon="pi pi-download" iconPos="right"/>
|
||||
icon="pi pi-download" iconPos="right"/>}
|
||||
{applicationObj.status && applicationObj.status === 'APPROVED'
|
||||
? null
|
||||
: <Button
|
||||
@@ -558,7 +571,9 @@ const BandoViewBeneficiario = () => {
|
||||
onClick={submitApplication}
|
||||
label={submitBtnLabel()}
|
||||
icon={submitBtnIcon()} iconPos="right"/>}
|
||||
<Button
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <Button
|
||||
type="button"
|
||||
disabled={isExpired}
|
||||
outlined={isNil(data.preferredCallId)}
|
||||
@@ -567,7 +582,7 @@ const BandoViewBeneficiario = () => {
|
||||
label={isNil(data.preferredCallId)
|
||||
? __('Aggiungi a preferiti', 'gepafin')
|
||||
: __('Rimuovi dai preferiti', 'gepafin')}
|
||||
icon="pi pi-heart" iconPos="left"/>
|
||||
icon="pi pi-heart" iconPos="left"/>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const BandoViewPreInstructor = () => {
|
||||
const isAsyncRequest = useStoreValue('isAsyncRequest');
|
||||
const antiMoneyLaundryCalls = useStoreValue('antiMoneyLaundryCalls');
|
||||
const { id } = useParams();
|
||||
const [data, setData] = useState({});
|
||||
const [newQuestion, setNewQuestion] = useState('');
|
||||
@@ -97,51 +98,57 @@ const BandoViewPreInstructor = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__row">
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo totale', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amount)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo minimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMin)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo massimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMax)}</span>
|
||||
</p>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__row">
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo totale', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amount)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo minimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMin)}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Importo massimo per progetto', 'gepafin')}</span>
|
||||
<span>{getNumberWithCurrency(data.amountMax)}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data apertura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[0])} {data.startTime}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data chiusura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[1])} {data.endTime}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="appPageSection__withBorder">
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data apertura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[0])} {data.startTime}</span>
|
||||
</p>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('Data chiusura', 'gepafin')}</span>
|
||||
<span>{getDateFromISOstring(data.dates[1])} {data.endTime}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Descrizione dettagliata', 'gepafin')}</h2>
|
||||
<div className="ql-editor">
|
||||
{renderHtmlContent(data.descriptionLong)}
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Descrizione dettagliata', 'gepafin')}</h2>
|
||||
<div className="ql-editor">
|
||||
{renderHtmlContent(data.descriptionLong)}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Requisiti di Partecipazione', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.aimedTo.map((o, i) => <li key={i}>
|
||||
{o.value}
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Requisiti di Partecipazione', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.aimedTo.map((o, i) => <li key={i}>
|
||||
{o.value}
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Documentazione richiesta', 'gepafin')}</h2>
|
||||
@@ -161,18 +168,20 @@ const BandoViewPreInstructor = () => {
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
<div className="appPageSection__withBorder">
|
||||
<h2>{__('Allegati', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.docs
|
||||
.filter(o => o.source === 'CALL' && o.type === 'DOCUMENT')
|
||||
.map((o, i) => <li key={i}>
|
||||
<a href={o.filePath} target="_blank" rel="noreferrer">{o.name}</a>
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE' && antiMoneyLaundryCalls.includes(data.id)
|
||||
? null
|
||||
: <div className="appPageSection__withBorder">
|
||||
<h2>{__('Allegati', 'gepafin')}</h2>
|
||||
<div className="row rowContent">
|
||||
<ul>
|
||||
{data.docs
|
||||
.filter(o => o.source === 'CALL' && o.type === 'DOCUMENT')
|
||||
.map((o, i) => <li key={i}>
|
||||
<a href={o.filePath} target="_blank" rel="noreferrer">{o.name}</a>
|
||||
</li>)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('FAQ', 'gepafin')}</h2>
|
||||
|
||||
@@ -30,10 +30,19 @@ import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import { isNil } from 'ramda';
|
||||
|
||||
const LatestBandiBeneficiarioTableAsync = () => {
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const LatestBandiBeneficiarioTableAsync = ({ isAntiMoneylaundry = false }) => {
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const antiMoneyLaundryCalls = useStoreValue('antiMoneyLaundryCalls');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
const [items, setItems] = useState(null);
|
||||
const [items, setItems] = useState([]);
|
||||
let filteredItems = items;
|
||||
if (REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE') {
|
||||
filteredItems = isAntiMoneylaundry
|
||||
? items.filter(o => antiMoneyLaundryCalls.includes(o.id))
|
||||
: items.filter(o => !antiMoneyLaundryCalls.includes(o.id));
|
||||
}
|
||||
const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||
const [lazyState, setLazyState] = useState({
|
||||
first: 0,
|
||||
@@ -154,7 +163,7 @@ const LatestBandiBeneficiarioTableAsync = () => {
|
||||
<i className="pi pi-heart" style={{ fontSize: '1rem' }}></i>
|
||||
</button>
|
||||
<Link to={`/bandi/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
<Button severity="info" label={__('Compila', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
iconPos="right"/>
|
||||
</Link></div>
|
||||
}
|
||||
@@ -217,7 +226,7 @@ const LatestBandiBeneficiarioTableAsync = () => {
|
||||
return (
|
||||
<div className="appPageSection__table">
|
||||
<DataTable
|
||||
value={items} stripedRows showGridlines
|
||||
value={filteredItems} stripedRows showGridlines
|
||||
lazy filterDisplay="menu" dataKey="id" paginator
|
||||
first={lazyState.first} rows={lazyState.rows} totalRecords={totalRecordsNum} onPage={onPage}
|
||||
onSort={onSort} sortField={lazyState.sortField} sortOrder={lazyState.sortOrder}
|
||||
|
||||
@@ -29,6 +29,8 @@ import { Calendar } from 'primereact/calendar';
|
||||
import { confirmPopup, ConfirmPopup } from 'primereact/confirmpopup';
|
||||
import { ProgressBar } from 'primereact/progressbar';
|
||||
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const MyLatestSubmissionsTableAsync = () => {
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
@@ -50,6 +52,9 @@ const MyLatestSubmissionsTableAsync = () => {
|
||||
status: { value: null, matchMode: 'equals' }
|
||||
}
|
||||
});
|
||||
const colBandoLabel = REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE'
|
||||
? __('Bando', 'gepafin')
|
||||
: __('Bandi e modello AR1', 'gepafin');
|
||||
|
||||
const statuses = ['DRAFT', 'AWAITING', 'READY'];
|
||||
|
||||
@@ -212,7 +217,7 @@ const MyLatestSubmissionsTableAsync = () => {
|
||||
onSort={onSort} sortField={lazyState.sortField} sortOrder={lazyState.sortOrder}
|
||||
onFilter={onFilter} filters={lazyState.filters} loading={localAsyncRequest}
|
||||
emptyMessage={translationStrings.emptyMessage}>
|
||||
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||
<Column field="callTitle" header={colBandoLabel}
|
||||
filterField="callTitle" filter
|
||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||
|
||||
@@ -16,7 +16,7 @@ import ErrorBoundary from '../../components/ErrorBoundary';
|
||||
import LatestBandiBeneficiarioTableAsync from './components/LatestBandiBeneficiarioTableAsync';
|
||||
import MyLatestSubmissionsTableAsync from './components/MyLatestSubmissionsTableAsync';
|
||||
|
||||
//const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const DashboardBeneficiario = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -102,7 +102,7 @@ const DashboardBeneficiario = () => {
|
||||
<span className="summary">{__('Attenzione', 'gepafin')}</span>
|
||||
<span>
|
||||
{__('Per applicare ai bandi devi Registare un Azienda clicca', 'gepafin')}
|
||||
<Link to={`/agguingi-azienda`} style={{marginLeft: '0.5ch'}}>{__('qua', 'gepafin')}</Link>
|
||||
<Link to={`/agguingi-azienda`} style={{ marginLeft: '0.5ch' }}>{__('qua', 'gepafin')}</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="appPage__spacer"></div>
|
||||
@@ -127,6 +127,16 @@ const DashboardBeneficiario = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE'
|
||||
? <>
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Questionario Antiriciclaggio', 'gepafin')}</h2>
|
||||
<ErrorBoundary><LatestBandiBeneficiarioTableAsync isAntiMoneylaundry={true}/></ErrorBoundary>
|
||||
</div>
|
||||
<div className="appPage__spacer"></div>
|
||||
</>
|
||||
: null}
|
||||
|
||||
<div className="appPageSection__hr">
|
||||
<span>{__('Azioni rapide', 'gepafin')}</span>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ import ErrorBoundary from '../../components/ErrorBoundary';
|
||||
import MyLatestSubmissionsTableAsync from '../DashboardBeneficiario/components/MyLatestSubmissionsTableAsync';
|
||||
import LatestBandiBeneficiarioTableAsync from '../DashboardBeneficiario/components/LatestBandiBeneficiarioTableAsync';
|
||||
|
||||
//const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const DashboardBeneficiarioConfidi = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -127,6 +127,16 @@ const DashboardBeneficiarioConfidi = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
{REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE'
|
||||
? <>
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Questionario Antiriciclaggio', 'gepafin')}</h2>
|
||||
<ErrorBoundary><LatestBandiBeneficiarioTableAsync isAntiMoneylaundry={true}/></ErrorBoundary>
|
||||
</div>
|
||||
<div className="appPage__spacer"></div>
|
||||
</>
|
||||
: null}
|
||||
|
||||
<div className="appPageSection__hr">
|
||||
<span>{__('Azioni rapide', 'gepafin')}</span>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,9 @@ const initialStore = {
|
||||
// flow
|
||||
flowData: [],
|
||||
flowForms: [],
|
||||
flowEdges: []
|
||||
flowEdges: [],
|
||||
// misc
|
||||
antiMoneyLaundryCalls: [23]
|
||||
}
|
||||
|
||||
export default initialStore;
|
||||
Reference in New Issue
Block a user