Skip to content

LCFS - Add a button to the approved fuel code page that allows admin users to edit (in progress) #2483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
14 tasks
Grulin opened this issue Apr 16, 2025 · 0 comments
Labels
Fuel Codes Medium Medium priority Story User story

Comments

@Grulin
Copy link
Collaborator

Grulin commented Apr 16, 2025

Description:
Currently, once a fuel code is approved under the Low Carbon Fuels Regulation, it becomes locked in an uneditable state. However, updates may be required in cases of typographical errors, changes to expiry dates, or updates to organization information.

This story introduces functionality to allow IDIR users with the Admin role to edit approved fuel codes. An “Edit” button will be added below the approved fuel code, which, when selected, will revert the fuel code to a draft state. The fuel code must then be re-approved before it can be used again.

The verification team has confirmed that designated Admin users will be responsible for initiating these edits and maintaining records of the rationale for each change.

Purpose and benefit to user:
To enable authorized users to make corrections or updates to approved fuel codes, while ensuring that all edits are subject to re-approval and proper record keeping.

Acceptance Criteria:

  • Edit" button is visible only to IDIR users with the Admin role
  • Clicking "Edit" reverts the approved fuel code to a draft state
  • A confirmation message is displayed to the user
  • The original approval metadata is retained for audit purposes
  • A rationale field must be completed before edits can be saved
  • Fuel code must be re-approved before it becomes valid for use
  • All actions are logged and auditable
  • Non-IDIR users and non-Admin IDIR users cannot access the Edit functionality

Development Checklist:

  • Add "Edit" button with role-based visibility
  • Implement transition logic from approved to draft state
  • Add frontend and backend validation to require rationale entry
  • Ensure audit logging is implemented for all edits
  • Update fuel code list and detail views to reflect status changes
  • Implement test cases for permissions, state transitions, and audit logging

Notes:

  • Fuel codes in draft status following an edit cannot be used for compliance reporting until re-approved
  • Historical transactions associated with the originally approved version of the fuel code must be reviewed and compliance reports that previously used these code will need to be resubmitted.
@Grulin Grulin added Fuel Codes Story User story Medium Medium priority labels Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fuel Codes Medium Medium priority Story User story
Projects
None yet
Development

No branches or pull requests

1 participant