Files
demat-facturation/shared/bapEligibility.ts

11 lines
442 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** Score minimal requis pour générer et valider un BAP. */
export const BAP_MIN_QUALITY_SCORE = 90;
/**
* Centralise le seuil BAP afin que linterface et le serveur appliquent la
* même règle métier, y compris pour les scores nuls ou absents.
*/
export function meetsBapQualityThreshold(score: number | null | undefined): boolean {
return typeof score === "number" && Number.isFinite(score) && score >= BAP_MIN_QUALITY_SCORE;
}