- updated edit application page for instructor;
This commit is contained in:
@@ -615,7 +615,7 @@ const DomandaEditPreInstructor = () => {
|
||||
data,
|
||||
['evaluationDocument']
|
||||
)}
|
||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus)}
|
||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationShouldBeBlocked(data)}
|
||||
sourceId={data.assignedApplicationId}
|
||||
sourceName="evaluation"/>
|
||||
</div>
|
||||
@@ -629,7 +629,7 @@ const DomandaEditPreInstructor = () => {
|
||||
<div className="appPageSection__checklist">
|
||||
{data.checklist.map((o, i) => <div key={o.id}>
|
||||
<Checkbox
|
||||
disabled={shouldDisableField('checklist')}
|
||||
disabled={shouldDisableField('checklist') || evaluationShouldBeBlocked(data)}
|
||||
inputId={`checklist_${o.id}`}
|
||||
onChange={(e) => updateEvaluationValue(
|
||||
e.checked,
|
||||
@@ -645,7 +645,7 @@ const DomandaEditPreInstructor = () => {
|
||||
<div>
|
||||
<Editor
|
||||
value={data.note}
|
||||
readOnly={shouldDisableField('note')}
|
||||
readOnly={shouldDisableField('note') || evaluationShouldBeBlocked(data)}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => updateEvaluationValue(
|
||||
@@ -661,7 +661,7 @@ const DomandaEditPreInstructor = () => {
|
||||
<ListOfFiles
|
||||
files={data.files}
|
||||
updateFn={updateEvaluationValue}
|
||||
shouldDisableFieldFn={shouldDisableField}
|
||||
shouldDisableFieldFn={(name) => shouldDisableField(name) || evaluationShouldBeBlocked(data)}
|
||||
name="files"
|
||||
ndg={data.ndg}
|
||||
applicationId={id}/>
|
||||
@@ -675,7 +675,7 @@ const DomandaEditPreInstructor = () => {
|
||||
<ListOfFiles
|
||||
files={data.amendmentDetails}
|
||||
updateFn={updateEvaluationValue}
|
||||
shouldDisableFieldFn={shouldDisableField}
|
||||
shouldDisableFieldFn={(name) => shouldDisableField(name) || evaluationShouldBeBlocked(data)}
|
||||
name="amendmentDetails"
|
||||
ndg={data.ndg}
|
||||
applicationId={id}/>
|
||||
@@ -698,7 +698,7 @@ const DomandaEditPreInstructor = () => {
|
||||
<td>
|
||||
<div className="p-inputgroup">
|
||||
<InputNumber
|
||||
disabled={shouldDisableField('criteria')}
|
||||
disabled={shouldDisableField('criteria') || evaluationShouldBeBlocked(data)}
|
||||
placeholder={__('Punteggio', 'gepafin')}
|
||||
keyfilter="int"
|
||||
value={o.score}
|
||||
@@ -721,7 +721,7 @@ const DomandaEditPreInstructor = () => {
|
||||
onClick={() => displayCriterionData(o.id)}
|
||||
aria-label={__('Mostra', 'gepafin')}/> : null}
|
||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||
disabled={shouldDisableField('criteria')}
|
||||
disabled={shouldDisableField('criteria') || evaluationShouldBeBlocked(data)}
|
||||
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
||||
onClick={() => updateEvaluationValue(
|
||||
true,
|
||||
@@ -729,7 +729,7 @@ const DomandaEditPreInstructor = () => {
|
||||
)}
|
||||
aria-label={__('Su', 'gepafin')}/>
|
||||
<Button icon="pi pi-thumbs-down" rounded outlined
|
||||
disabled={shouldDisableField('criteria')}
|
||||
disabled={shouldDisableField('criteria') || evaluationShouldBeBlocked(data)}
|
||||
severity={!isNil(o.valid) && !o.valid ? 'danger' : 'secondary'}
|
||||
onClick={() => updateEvaluationValue(
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user