main
ts 9 lines 366 Bytes
Raw
1 import { ScaComplianceLevel } from "@/types/sca.d"
2
3 export function getComplianceLevel(score: number): ScaComplianceLevel {
4 if (score >= 90) return ScaComplianceLevel.Excellent
5 if (score >= 80) return ScaComplianceLevel.Good
6 if (score >= 70) return ScaComplianceLevel.Average
7 if (score >= 60) return ScaComplianceLevel.Poor
8 return ScaComplianceLevel.Critical
9 }