Skip to content

Commit

Permalink
Fix order in inspection plan
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Nov 8, 2023
1 parent 4af547d commit e418191
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ export const compareInspections = (inspection1: Inspection, inspection2: Inspect
if (!inspection1.missionDefinition.lastSuccessfulRun) return -1
if (!inspection2.missionDefinition.lastSuccessfulRun) return 1
} else if (!inspection1.missionDefinition.lastSuccessfulRun && !inspection2.missionDefinition.lastSuccessfulRun) {
if (!inspection1.missionDefinition.inspectionFrequency && !inspection2.missionDefinition.inspectionFrequency) {
return inspection1.missionDefinition.name > inspection2.missionDefinition.name ? 1 : -1
}
if (!inspection1.missionDefinition.inspectionFrequency) return -1
if (!inspection2.missionDefinition.inspectionFrequency) return 1
if (!inspection1.missionDefinition.inspectionFrequency) return 1
if (!inspection2.missionDefinition.inspectionFrequency) return -1
}
if (!inspection1.missionDefinition.inspectionFrequency) return 1
if (!inspection2.missionDefinition.inspectionFrequency) return -1
Expand Down

0 comments on commit e418191

Please sign in to comment.