Skip to content

Commit 69ee8c5

Browse files
authored
Merge pull request #2056 from bcgov/fix/daniel-fix-export-version-1968
fix: Set complianceReportId on Exports
2 parents a92d4bd + 0c1dec5 commit 69ee8c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/src/views/FuelExports/AddEditFuelExports.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const AddEditFuelExports = () => {
6868
if (!isArrayEmpty(data)) {
6969
const updatedRowData = data.fuelExports.map((item) => ({
7070
...item,
71+
complianceReportId, // This takes current reportId, important for versioning
7172
compliancePeriod,
7273
fuelCategory: item.fuelCategory?.category,
7374
fuelType: item.fuelType?.fuelType,
@@ -78,7 +79,7 @@ export const AddEditFuelExports = () => {
7879
}))
7980
setRowData([...updatedRowData, { id: uuid(), compliancePeriod }])
8081
} else {
81-
setRowData([{ id: uuid(), compliancePeriod }])
82+
setRowData([{ id: uuid(), complianceReportId, compliancePeriod }])
8283
}
8384
params.api.sizeColumnsToFit()
8485

0 commit comments

Comments
 (0)