Describe the task
If a user tries to deselect an activity from the review facility information page or the review operation information page, and that activity form is not empty, show a warning
Acceptance Criteria
Given I am on the Review Operation Information page,
If I deselect an activity AND this activity in any of my facility reports is NOT empty,
Dev checklist
activities_with_data = list(
ReportActivity.objects.filter(
facility_report__report_version_id=version_id
).values_list('activity_id', flat=True).distinct()
)
<SimpleModal
title="Confirmation"
open={pendingDeselectionActivity !== undefined}
onCancel={cancelActivityDeselection}
onConfirm={confirmActivityDeselection}
confirmText="Remove Activity"
>
Are you sure you want to remove this activity? If you proceed, all of the form data you have entered will be lost.
</SimpleModal>
Definition of Done
Additional context
- Add any other context about the task here.
- Or here
Describe the task
If a user tries to deselect an activity from the review facility information page or the review operation information page, and that activity form is not empty, show a warning
Acceptance Criteria
Given I am on the Review Operation Information page,
If I deselect an activity AND this activity in any of my facility reports is NOT empty,
Wireframe
Dev checklist
- If has data: show modal, don't update state
- If no data: update state normally
Definition of Done
Additional context