Merge branch 'develop' into feature/92-notifications
This commit is contained in:
@@ -97,7 +97,14 @@ const AllBandiTable = () => {
|
||||
};
|
||||
|
||||
const statusFilterTemplate = (options) => {
|
||||
return <Dropdown value={options.value} options={statuses} onChange={(e) => options.filterCallback(e.value, options.index)} itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter" showClear />;
|
||||
return <Dropdown
|
||||
value={options.value}
|
||||
options={statuses}
|
||||
onChange={(e) => options.filterCallback(e.value, options.index)}
|
||||
itemTemplate={statusItemTemplate}
|
||||
placeholder={translationStrings.selectOneLabel}
|
||||
className="p-column-filter"
|
||||
showClear />;
|
||||
};
|
||||
|
||||
const statusItemTemplate = (option) => {
|
||||
|
||||
@@ -30,6 +30,8 @@ import { Button } from 'primereact/button';
|
||||
// i18n
|
||||
import translationStrings from '../../../../translationStringsForComponents';
|
||||
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const AllBandiAccordion = ({ showOnlyPreferred = false }) => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
@@ -182,11 +184,13 @@ const AllBandiAccordion = ({ showOnlyPreferred = false }) => {
|
||||
<div className="p-3">
|
||||
{renderHtmlContent(data.descriptionShort)}
|
||||
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && !data.confidi
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && (!data.confidi
|
||||
|| (data.confidi && data.id === 6 && REACT_APP_HUB_ID === 'p4lk3bcx1RStqTaIVVbXs'))
|
||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||
{__('Partecipa', 'gepafin')}
|
||||
</Button> : null}
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && data.confidi
|
||||
&& (data.id !== 6 || (data.id === 6 && REACT_APP_HUB_ID !== 'p4lk3bcx1RStqTaIVVbXs'))
|
||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||
{__('Mostra', 'gepafin')}
|
||||
</Button> : null}
|
||||
|
||||
@@ -116,7 +116,16 @@ const BandoViewBeneficiario = () => {
|
||||
|
||||
const submitApplication = () => {
|
||||
if (data.confidi) {
|
||||
displayConfidiPopup();
|
||||
if (data.id === 6 && REACT_APP_HUB_ID === 'p4lk3bcx1RStqTaIVVbXs') {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
navigate(`/imieibandi/${applicationObj.id}`);
|
||||
} else {
|
||||
const bandoId = getBandoId();
|
||||
ApplicationService.createApplication(bandoId, {}, createApplCallback, errCreateApplCallback, [['companyId', chosenCompanyId]]);
|
||||
}
|
||||
} else {
|
||||
displayConfidiPopup();
|
||||
}
|
||||
} else {
|
||||
if (REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE') {
|
||||
const bandoId = getBandoId();
|
||||
|
||||
@@ -446,7 +446,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
{data.formFields.map((o, i) => {
|
||||
return <FormField
|
||||
key={o.fieldId}
|
||||
disabled={data.status === 'CLOSE' || data.status === 'AWAITING'}
|
||||
disabled={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}
|
||||
type="fileupload"
|
||||
setDataFn={setValue}
|
||||
saveFormCallback={doUpdateAmendment}
|
||||
@@ -470,10 +470,10 @@ const SoccorsoEditPreInstructor = () => {
|
||||
<div className="appPageSection">
|
||||
<h3>{__('Notes', 'gepafin')}</h3>
|
||||
<div style={{ marginBottom: '30px', width: '100%', position: 'relative' }}>
|
||||
<BlockingOverlay shouldDisplay={data.status === 'CLOSE' || data.status === 'AWAITING'}/>
|
||||
<BlockingOverlay shouldDisplay={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}/>
|
||||
<Editor
|
||||
value={data.amendmentNotes}
|
||||
readOnly={data.status === 'CLOSE' || data.status === 'AWAITING'}
|
||||
readOnly={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => updateNewAmendmentData(
|
||||
@@ -485,7 +485,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
</div>
|
||||
<FormField
|
||||
type="fileupload"
|
||||
disabled={data.status === 'CLOSE' || data.status === 'AWAITING'}
|
||||
disabled={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}
|
||||
setDataFn={setValue}
|
||||
saveFormCallback={doUpdateAmendment}
|
||||
fieldName="amendmentDocuments"
|
||||
@@ -513,7 +513,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
<Button
|
||||
type="button"
|
||||
onClick={sendReminder}
|
||||
disabled={isLoadingReminding || data.status === 'CLOSE'}
|
||||
disabled={isLoadingReminding || ['CLOSE', 'EXPIRED'].includes(data.status)}
|
||||
outlined
|
||||
label={__('Invia Sollecito', 'gepafin')}
|
||||
icon="pi pi-send"
|
||||
@@ -521,7 +521,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
<Button
|
||||
type="button"
|
||||
onClick={openExtendResponseTimeDialog}
|
||||
disabled={isLoadingExtendingTime || data.status === 'CLOSE'}
|
||||
disabled={isLoadingExtendingTime || ['CLOSE', 'EXPIRED'].includes(data.status)}
|
||||
outlined
|
||||
label={__('Estendi Scadenza', 'gepafin')}
|
||||
icon="pi pi-stopwatch"
|
||||
@@ -529,13 +529,13 @@ const SoccorsoEditPreInstructor = () => {
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => doUpdateAmendment()}
|
||||
disabled={isAsyncRequest || data.status === 'CLOSE' || data.status === 'AWAITING'}
|
||||
disabled={isAsyncRequest || ['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}
|
||||
label={__('Salva bozza', 'gepafin')}
|
||||
icon="pi pi-save" iconPos="right"/>
|
||||
<Button
|
||||
type="button"
|
||||
onClick={openCloseAmendmentDialog}
|
||||
disabled={isAsyncRequest || data.status === 'CLOSE'}
|
||||
disabled={isAsyncRequest || ['CLOSE', 'EXPIRED'].includes(data.status)}
|
||||
label={__('Chiudi Soccorso Istruttorio', 'gepafin')}
|
||||
icon="pi pi-times" iconPos="right"/>
|
||||
</div>
|
||||
@@ -557,7 +557,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
</label>
|
||||
<InputNumber
|
||||
keyfilter="int"
|
||||
disabled={data.status === 'CLOSE'}
|
||||
disabled={['CLOSE', 'EXPIRED'].includes(data.status)}
|
||||
value={extendedTime}
|
||||
showButtons
|
||||
onChange={(e) => setExtendedTime(e.value)}/>
|
||||
@@ -577,7 +577,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
<BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/>
|
||||
<Editor
|
||||
value={internalNote}
|
||||
readOnly={data.status === 'CLOSE'}
|
||||
readOnly={['CLOSE', 'EXPIRED'].includes(data.status)}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => setInternalNote(e.htmlValue)}
|
||||
|
||||
Reference in New Issue
Block a user