Skip to content

Issue 974 - added validation for comparing report year and baseline year in report#2127

Merged
rmroot merged 1 commit intodevelopfrom
issue-974
Nov 3, 2025
Merged

Issue 974 - added validation for comparing report year and baseline year in report#2127
rmroot merged 1 commit intodevelopfrom
issue-974

Conversation

@jamlokim
Copy link
Copy Markdown
Contributor

connects #974

This pull request introduces improved validation logic for report year selection in both account and facility report components, ensuring that users cannot select a report year earlier than the baseline year for certain report types. It also adds new error messaging to guide users and updates the validation flow for report setup forms.

Account Report Year Validation and Error Messaging:

  • Added a new error message display in account-report-setup.component.html to inform users when the report year is earlier than the baseline year.
  • Introduced a compareBaselineYearToReportYearError observable in AccountReportsService and integrated its subscription into both AccountReportSetupComponent and AccountReportsBannerComponent to trigger error messages and validation updates.
  • Implemented the compareBaselineYearToReportYear method in AccountReportsService to set the error state when the report year is less than the baseline year for 'performance' and 'betterClimate' report types.

Account Report Setup Validation Logic:

  • Updated the report setup validation in AccountReportsBannerComponent to consider the new year comparison error for 'performance' and 'betterClimate' reports, preventing form submission when the error is present.

Facility Report Year Validation:

  • Enhanced FacilityReportsService validation to handle 'emissionFactors' reports, ensuring the start year is not later than the end year and providing appropriate error messaging.

@jamlokim jamlokim requested a review from rmroot October 27, 2025 18:35
@rmroot rmroot merged commit 6276cc2 into develop Nov 3, 2025
3 checks passed
@jamlokim jamlokim deleted the issue-974 branch January 12, 2026 16:09
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