Description:
Enable the ability to download Fuel Code information from the main Fuel Code page into an Excel spreadsheet. Includes the following elements:
IDIR users only
Download button (see wireframe)
User information to download includes the full data set: Prefix, Fuel code, Company, Carbon intensity, Application date, Approval date, Effective date, Expiry date, Fuel, Feedstock, Feedstock location, Feedstock misc., Fuel production facility Location, Facility nameplate capacity, Feedstock transport mode, Finished fuel transport mode, Former company, Last updated, Notes.
File type = .xls
Workbook name format: LCFS-fuel_codes-YYYY-MM-DD.xls, where YYYY-MM-DD is the day the file was downloaded
Worksheet name: LCFS Fuel Codes
Spreadsheet columns should be formatted to give adequate spacing for the information displayed
The button label switches to "Downloading..." after the user clicks on the button and the sheet is being downloaded (loading). The button then switches back to the regular label after it has downloaded.
Allows user to extract fuel code data in an Excel format for other uses outside of the LCFS portal.
Acceptance Criteria:
[ ] Given I am an IDIR user, when I access the main Fuel Code page, then I should see a download button enabled.
[ ] Given I am an IDIR user, when I click the download button on the main Fuel Code page, then the button label should switch to "Downloading..." and the Excel file (LCFS-fuel_codes-YYYY-MM-DD.xls) should begin to download.
[ ] Given I am an IDIR user, when the Excel file download is complete, then the button label should revert back to its original state and the Excel file should contain all specified fields with data formatted correctly.
Development Checklist:
[ ] To implement this ticket, there is an Excel sheet generator available at backend/lcfs/utils/spreadsheet_builder.py.
[ ] For the download button component, you can use frontend/src/components/DownloadButton.jsx.
Description: Enable the ability to download Fuel Code information from the main Fuel Code page into an Excel spreadsheet. Includes the following elements:
Wireframe: https://preview.uxpin.com/59145260c7d8cc48969ac79401cc03d84843c3d9#/pages/164563748/simulate/sitemap
Purpose and benefit to user:
Allows user to extract fuel code data in an Excel format for other uses outside of the LCFS portal.
Acceptance Criteria:
Development Checklist:
backend/lcfs/utils/spreadsheet_builder.py
.frontend/src/components/DownloadButton.jsx
.Notes: