Skip to content

Commit

Permalink
Merge pull request #1524 from bcgov/feat/prashanth-fuel-entry-guide-1469
Browse files Browse the repository at this point in the history
Update fuel code explanation for IDIR users
  • Loading branch information
prv-proton authored Dec 20, 2024
2 parents 30d75c4 + f4d17b4 commit 15ff76b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
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

0 comments on commit 15ff76b

Please sign in to comment.