-
Notifications
You must be signed in to change notification settings - Fork 211
PM-3080 Fix delete submission #7157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| styleName="delete-icon" | ||
| onClick={() => onDelete(submissionObject.id)} | ||
| type="button" | ||
| disabled={!allowDelete} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[correctness]
The disabled attribute is conditionally set based on allowDelete, but the logic for showDeleteButton already checks for allowDelete indirectly through safeForDownloadCheck. Consider reviewing the conditions to ensure they align with the intended behavior.
| status, | ||
| allowDelete, | ||
| hasPendingWorkflowRuns, | ||
| isWorkflowRunComplete, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗ correctness]
The variable isWorkflowRunComplete is used to determine if the delete button should be enabled. Ensure that this variable accurately reflects the completion status of the workflow run, as any discrepancy could lead to incorrect UI behavior.
| */ } | ||
| {showDeleteButton && ( | ||
| !showPendingTooltip ? ( | ||
| isWorkflowRunComplete ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗ correctness]
The logic for enabling the delete button has been changed to depend on isWorkflowRunComplete. Verify that this change aligns with the intended business logic, as it alters when a submission can be deleted.
| const allowDelete = submissionPhaseStartDate | ||
| && moment(subObject.submissionDate).isAfter(submissionPhaseStartDate) | ||
| && isWorkflowRunComplete; | ||
| && moment(subObject.submissionDate).isAfter(submissionPhaseStartDate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗ correctness]
The allowDelete logic has been changed to no longer consider isWorkflowRunComplete. If this was intentional, ensure that it aligns with the desired behavior. If not, this could lead to allowing deletions when there are incomplete workflow runs.
| onOpenDownloadArtifactsModal={onOpenDownloadArtifactsModal} | ||
| onOpenRatingsListModal={onOpenRatingsListModal} | ||
| hasPendingWorkflowRuns={hasPendingWorkflowRuns} | ||
| isWorkflowRunComplete={isWorkflowRunComplete} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗ correctness]
The prop hasPendingWorkflowRuns was replaced with isWorkflowRunComplete. Ensure that the Submission component is updated accordingly to handle this change, as it may affect the component's logic.
No description provided.