Skip to content

Conversation

@himaniraghav3
Copy link
Collaborator

No description provided.

styleName="delete-icon"
onClick={() => onDelete(submissionObject.id)}
type="button"
disabled={!allowDelete}
Copy link

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,
Copy link

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 ? (
Copy link

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);
Copy link

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}
Copy link

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.

@himaniraghav3 himaniraghav3 merged commit 3cddd60 into develop Dec 4, 2025
8 checks passed
@himaniraghav3 himaniraghav3 deleted the PM-3080 branch December 5, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants