Skip to content

Commit 9d7d35b

Browse files
committed
OpenConceptLab/ocl_issues#2190 | disabled approve/reject buttons for no decision
1 parent bc9d40d commit 9d7d35b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/map-projects/MapProject.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,13 +1356,13 @@ const MapProject = () => {
13561356
onChange={event => setNotes({...notes, [rowIndex]: event.target.value || ''})}
13571357
/>
13581358
<div className='col-xs-12' style={{padding: '0 0 8px 78px'}}>
1359-
<Button size='small' disabled={rowStatuses.reviewed.includes(rowIndex)} color='primary' onClick={() => onReviewDone(true)} variant='contained' sx={{textTransform: 'none'}}>
1359+
<Button size='small' disabled={rowStatuses.reviewed.includes(rowIndex) || decisions[rowIndex] === 'none' || !decisions[rowIndex]} color='primary' onClick={() => onReviewDone(true)} variant='contained' sx={{textTransform: 'none'}}>
13601360
Approve and Next
13611361
</Button>
1362-
<Button size='small' disabled={rowStatuses.reviewed.includes(rowIndex)} color='primary' onClick={() => onReviewDone(false)} variant='outlined' sx={{textTransform: 'none', marginLeft: '8px'}}>
1362+
<Button size='small' disabled={rowStatuses.reviewed.includes(rowIndex) || decisions[rowIndex] === 'none' || !decisions[rowIndex]} color='primary' onClick={() => onReviewDone(false)} variant='outlined' sx={{textTransform: 'none', marginLeft: '8px'}}>
13631363
Approve
13641364
</Button>
1365-
<Button size='small' color='error' onClick={(event) => onDecisionChange(event, 'rejected')} variant='outlined' sx={{textTransform: 'none', marginLeft: '8px'}}>
1365+
<Button size='small' disabled={decisions[rowIndex] === 'none' || !decisions[rowIndex]} color='error' onClick={(event) => onDecisionChange(event, 'rejected')} variant='outlined' sx={{textTransform: 'none', marginLeft: '8px'}}>
13661366
Reject
13671367
</Button>
13681368
</div>

0 commit comments

Comments
 (0)