Merge branch 'master' into develop
This commit is contained in:
@@ -12,6 +12,7 @@ import { Dialog } from 'primereact/dialog';
|
|||||||
import { InputSwitch } from 'primereact/inputswitch';
|
import { InputSwitch } from 'primereact/inputswitch';
|
||||||
import renderHtmlContent from '../../helpers/renderHtmlContent';
|
import renderHtmlContent from '../../helpers/renderHtmlContent';
|
||||||
import { Editor } from 'primereact/editor';
|
import { Editor } from 'primereact/editor';
|
||||||
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
const FormFieldRepeaterFaq = ({
|
const FormFieldRepeaterFaq = ({
|
||||||
data,
|
data,
|
||||||
@@ -143,6 +144,10 @@ const FormFieldRepeaterFaq = ({
|
|||||||
|
|
||||||
const header = renderHeader();
|
const header = renderHeader();
|
||||||
|
|
||||||
|
const faqOptionTemplate = (option) => {
|
||||||
|
return DOMPurify.sanitize(option.title, {ALLOWED_TAGS: ['#text']});
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const storeFieldData = data ?? [];
|
const storeFieldData = data ?? [];
|
||||||
setStateFieldData(storeFieldData);
|
setStateFieldData(storeFieldData);
|
||||||
@@ -180,6 +185,7 @@ const FormFieldRepeaterFaq = ({
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
optionDisabled={(opt) => usedExistingValues().includes(opt.title)}
|
optionDisabled={(opt) => usedExistingValues().includes(opt.title)}
|
||||||
options={stateOptionsData}
|
options={stateOptionsData}
|
||||||
|
itemTemplate={faqOptionTemplate}
|
||||||
placeholder={__('Scegli tra quelli pre-creati', 'gepafin')}
|
placeholder={__('Scegli tra quelli pre-creati', 'gepafin')}
|
||||||
optionLabel="title"/>
|
optionLabel="title"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,9 +222,9 @@ const FormFieldRepeaterFaq = ({
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<p className="m-0">
|
<span className="m-0">
|
||||||
{renderHtmlContent(o.response)}
|
{renderHtmlContent(o.response)}
|
||||||
</p>
|
</span>
|
||||||
</AccordionTab>)}
|
</AccordionTab>)}
|
||||||
</Accordion>
|
</Accordion>
|
||||||
<Dialog
|
<Dialog
|
||||||
|
|||||||
@@ -87,6 +87,22 @@ const BandoViewBeneficiario = () => {
|
|||||||
return !isNaN(parsed) ? parsed : 0;
|
return !isNaN(parsed) ? parsed : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const submitBtnLabel = () => {
|
||||||
|
if (applicationObj && applicationObj.id) {
|
||||||
|
return __('Vai alla domanda', 'gepafin');
|
||||||
|
} else {
|
||||||
|
return __('Presenta domanda', 'gepafin');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitBtnIcon = () => {
|
||||||
|
if (applicationObj && applicationObj.id) {
|
||||||
|
return 'pi pi-arrow-right';
|
||||||
|
} else {
|
||||||
|
return 'pi pi-save';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submitApplication = () => {
|
const submitApplication = () => {
|
||||||
if (data.confidi) {
|
if (data.confidi) {
|
||||||
displayConfidiPopup();
|
displayConfidiPopup();
|
||||||
@@ -425,8 +441,8 @@ const BandoViewBeneficiario = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
disabled={isAsyncRequest || chosenCompanyId === 0}
|
disabled={isAsyncRequest || chosenCompanyId === 0}
|
||||||
onClick={submitApplication}
|
onClick={submitApplication}
|
||||||
label={__('Presenta Domanda', 'gepafin')}
|
label={submitBtnLabel()}
|
||||||
icon="pi pi-save" iconPos="right"/>
|
icon={submitBtnIcon()} iconPos="right"/>
|
||||||
{/*<Button
|
{/*<Button
|
||||||
type="button"
|
type="button"
|
||||||
outlined
|
outlined
|
||||||
|
|||||||
@@ -119,14 +119,10 @@ const LatestBandiTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return rowData.confidi
|
return <Link to={`/bandi/${rowData.id}`}>
|
||||||
? <Link to={`/bandi/${rowData.id}`}>
|
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||||
<Button severity="info" label={__('Mostra', 'gepafin')} icon="pi pi-eye" size="small" iconPos="right"/>
|
iconPos="right"/>
|
||||||
</Link>
|
</Link>
|
||||||
: <Link to={`/bandi/${rowData.id}`}>
|
|
||||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
|
||||||
iconPos="right"/>
|
|
||||||
</Link>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const header = renderHeader();
|
const header = renderHeader();
|
||||||
|
|||||||
Reference in New Issue
Block a user