Skip to content
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

Update fuel code explanation for IDIR users #1524

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/assets/locales/en/fuelCode.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"fuelCodeDownloadFailMsg": "Failed to download fuel code information.",
"fuelCodeLoadFailMsg": "Failed to load fuel code information.",
"newFuelCodeTitle": "Add new fuel code(s)",
"fuelCodeEntryGuide": "Draft fuel codes are saved automatically when all mandatory fields have been entered and validated. Click “Approve code” to make it available in compliance reporting.",
"editFuelCodeTitle": "Edit draft fuel code",
"viewFuelCodeTitle": "View fuel code",
"approvedFuelCodeTitle": "Approved draft fuel code",
Expand Down
20 changes: 14 additions & 6 deletions frontend/src/views/FuelCodes/AddFuelCode/AddEditFuelCode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ const AddEditFuelCodeBase = () => {
if (existingFuelCode) {
const transformedData = {
...existingFuelCode,
feedstockFuelTransportMode: existingFuelCode.feedstockFuelTransportModes.map(
(mode) => mode.feedstockFuelTransportMode.transportMode
),
finishedFuelTransportMode: existingFuelCode.finishedFuelTransportModes.map(
(mode) => mode.finishedFuelTransportMode.transportMode
)
feedstockFuelTransportMode:
existingFuelCode.feedstockFuelTransportModes.map(
(mode) => mode.feedstockFuelTransportMode.transportMode
),
finishedFuelTransportMode:
existingFuelCode.finishedFuelTransportModes.map(
(mode) => mode.finishedFuelTransportMode.transportMode
)
}
setRowData([transformedData])
} else {
Expand Down Expand Up @@ -452,6 +454,12 @@ const AddEditFuelCodeBase = () => {
{existingFuelCode?.fuelCodeStatus.status ===
FUEL_CODE_STATUSES.APPROVED && t('fuelCode:viewFuelCodeTitle')}
</BCTypography>
<BCTypography variant="body2" mt={2} mb={3}>
{(!existingFuelCode ||
existingFuelCode?.fuelCodeStatus.status ===
FUEL_CODE_STATUSES.DRAFT) &&
t('fuelCode:fuelCodeEntryGuide')}
</BCTypography>
</div>
<BCGridEditor
gridRef={gridRef}
Expand Down