Skip to content

Commit

Permalink
Merge pull request #33857 from dukenv0307/fix/24169
Browse files Browse the repository at this point in the history
Disable checkbox of task preview if not visit the task report
  • Loading branch information
thienlnam authored Jan 8, 2024
2 parents d067f4b + 60b8a68 commit 26b4006
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ReportActionItem/TaskPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ function TaskPreview(props) {
style={[styles.mr2]}
containerStyle={[styles.taskCheckbox]}
isChecked={isTaskCompleted}
disabled={!Task.canModifyTask(props.taskReport, props.currentUserPersonalDetails.accountID, lodashGet(props.rootParentReportpolicy, 'role', ''))}
disabled={
_.isEmpty(props.taskReport) ||
!Task.canModifyTask(props.taskReport, props.currentUserPersonalDetails.accountID, lodashGet(props.rootParentReportpolicy, 'role', ''))
}
onPress={Session.checkIfActionIsAllowed(() => {
if (isTaskCompleted) {
Task.reopenTask(props.taskReport);
Expand Down

0 comments on commit 26b4006

Please sign in to comment.