Skip to content

Commit

Permalink
[Mission] fix infractions tag
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Oct 20, 2023
1 parent 700d0d7 commit bee8c33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/features/missions/Missions.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const controlUnitFactory = ({ ...resourceUnit } = {}): Omit<LegacyControl
})

export const getControlInfractionsTags = (actionNumberOfControls, infractions) => {
const totalInfractions = infractions.length || 0
const totalInfractions = infractions?.length || 0
const ras = (actionNumberOfControls || 0) - totalInfractions
const infractionsWithReport =
infractions?.filter(inf => inf.infractionType === InfractionTypeEnum.WITH_REPORT)?.length || 0
Expand Down

0 comments on commit bee8c33

Please sign in to comment.