Skip to content

Commit

Permalink
Merge pull request #2056 from bcgov/fix/daniel-fix-export-version-1968
Browse files Browse the repository at this point in the history
fix: Set complianceReportId on Exports
  • Loading branch information
dhaselhan authored Feb 20, 2025
2 parents a92d4bd + 0c1dec5 commit 69ee8c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/views/FuelExports/AddEditFuelExports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const AddEditFuelExports = () => {
if (!isArrayEmpty(data)) {
const updatedRowData = data.fuelExports.map((item) => ({
...item,
complianceReportId, // This takes current reportId, important for versioning
compliancePeriod,
fuelCategory: item.fuelCategory?.category,
fuelType: item.fuelType?.fuelType,
Expand All @@ -78,7 +79,7 @@ export const AddEditFuelExports = () => {
}))
setRowData([...updatedRowData, { id: uuid(), compliancePeriod }])
} else {
setRowData([{ id: uuid(), compliancePeriod }])
setRowData([{ id: uuid(), complianceReportId, compliancePeriod }])
}
params.api.sizeColumnsToFit()

Expand Down

0 comments on commit 69ee8c5

Please sign in to comment.