Skip to content

Commit

Permalink
Fix units availability display
Browse files Browse the repository at this point in the history
  • Loading branch information
software-project committed Jun 22, 2021
1 parent 59c63be commit be5e638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/src/shared/units-transformations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const summarizeUnitsByTypeAndRent = (units: Units, reservedType?: string): UnitS
const finalSummary = unitMap[key].reduce((summary, unit, index) => {
return getUnitsSummary(unit, index === 0 ? null : summary)
}, {} as UnitSummary)
finalSummary.totalAvailable = unitMap[key].length
finalSummary.totalAvailable = unitMap[key].filter((unit) => unit.status === "available").length
summaries.push(finalSummary)
}

Expand Down

0 comments on commit be5e638

Please sign in to comment.