You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the backend logic for certifying (closing) a current reporting period and transitioning to the next one. This includes creating a certification record, updating the organization's current reporting period, and handling edge cases.
Requirements
1. Implement certifyReportingPeriod mutation
This mutation should:
a) Create a new ReportingPeriodCertification (use createReportingPeriodCertification below)
b) Update the organization's current reporting period (use updateCurrentReportingPeriod below)
certifiedBy: current user's id
organizationId: current user's organization id
reportingPeriodId: id of the reporting period being certified
3. Implement updateCurrentReportingPeriod function
This should:
a) Remove the certified period from preferences.current_period_id
b) Set preferences.current_period_id to the result of calling nextReportingPeriod (to implement)
4. Implement nextReportingPeriod query
Find the reporting period with the closest future start date
Business Rules
Only one reporting period can be open (accepting uploads) at a time
Users cannot re-certify reporting periods
Maintain the unique constraint on ReportingPeriodCertification (organizationId + reportingPeriodId)
Edge Cases
Handle scenario when no subsequent reporting period exists. On the frontend, we'll display the last closed period but disable file uploads.
The text was updated successfully, but these errors were encountered:
Dependencies
Blocked by: #408
Description
Implement the backend logic for certifying (closing) a current reporting period and transitioning to the next one. This includes creating a certification record, updating the organization's current reporting period, and handling edge cases.
Requirements
1. Implement
certifyReportingPeriod
mutationThis mutation should:
a) Create a new ReportingPeriodCertification (use
createReportingPeriodCertification
below)b) Update the organization's current reporting period (use
updateCurrentReportingPeriod
below)2. Update existing
createReportingPeriodCertification
Ensure it creates a record with:
certifiedBy: current user's id
organizationId: current user's organization id
reportingPeriodId: id of the reporting period being certified
3. Implement
updateCurrentReportingPeriod
functionThis should:
a) Remove the certified period from preferences.current_period_id
b) Set preferences.current_period_id to the result of calling
nextReportingPeriod
(to implement)4. Implement
nextReportingPeriod
queryFind the reporting period with the closest future start date
Business Rules
Edge Cases
Handle scenario when no subsequent reporting period exists. On the frontend, we'll display the last closed period but disable file uploads.
The text was updated successfully, but these errors were encountered: