-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update site visited logic for report verification page (#2629)
### Changes - Card: bcgov/cas-reporting#199 (comment) - Updated `ReportVerification` model to include new fields and modify existing ones - Modified `BaseReportVerificationSchema` to align with new model changes - Updated `verificationSchema` and `verificationUiSchema` in frontend to reflect new requirements - Adjusted `VerificationForm` component to handle new form structure ### Acceptance Criteria - "Site visited" options (Facility X, Other, None) include required fields for threats to independence and verification conclusion - Facility X and Other options include "Type of site visit" field - Other option shows additional fields for site name and geographic location - Backend model and schema align with frontend changes - Form validation works correctly for all new fields and dependencies ### Test Plan 1. Run migrations and start the application 2. Navigate to the Verification form 3. Test each "Site visited" option: - Verify required fields appear for each option - Ensure conditional fields show/hide appropriately 4. Submit the form with various combinations of inputs 5. Verify data is correctly saved to the database 6. Check API responses include all new fields https://www.loom.com/share/8d7c765181ea42daad40b1b9dac8669a?sid=2b18080d-aff5-4fc5-a73c-f392d83265fb
- Loading branch information
Showing
8 changed files
with
167 additions
and
61 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
...reporting/migrations/0042_alter_reportverification_other_facility_coordinates_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Generated by Django 5.0.10 on 2024-12-28 07:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('reporting', '0041_reportnewentrant_reportnewentrantemission_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='other_facility_coordinates', | ||
field=models.CharField( | ||
blank=True, db_comment='Geographic location of the other facility visited', max_length=100, null=True | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='other_facility_name', | ||
field=models.CharField( | ||
blank=True, | ||
db_comment="Name of the other facility visited if 'Other' is selected", | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='threats_to_independence', | ||
field=models.BooleanField( | ||
db_comment='Indicates whether there were any threats to independence noted', default=False | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='verification_conclusion', | ||
field=models.CharField( | ||
choices=[('Positive', 'Positive'), ('Modified', 'Modified'), ('Negative', 'Negative')], | ||
db_comment='The conclusion of the verification', | ||
default='Positive', | ||
max_length=8, | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='visit_name', | ||
field=models.CharField( | ||
db_comment='The name of the site visited (Facility X, Other, or None)', max_length=100 | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='reportverification', | ||
name='visit_type', | ||
field=models.CharField( | ||
blank=True, | ||
choices=[('In person', 'In Person'), ('Virtual', 'Virtual')], | ||
db_comment='The type of visit conducted (Virtual or In Person)', | ||
max_length=10, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.