Add measure listing page

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Jonathan
2025-05-26 00:20:26 +02:00
committed by Sacha Al Himdani
parent f9d1f033e0
commit 7903bd3a77
21 changed files with 1301 additions and 6 deletions

View File

@@ -8,3 +8,4 @@ export {
} from "./risk";
export { times, groupBy, isEmpty } from "./array";
export { randomInt } from "./number";
export { getMeasureStateLabel, measureStates } from "./measure";

View File

@@ -0,0 +1,23 @@
type Translator = (s: string) => string;
export const measureStates = [
"IMPLEMENTED",
"IN_PROGRESS",
"NOT_APPLICABLE",
"NOT_STARTED",
] as const;
export function getMeasureStateLabel(__: Translator, state: string) {
switch (state) {
case "IMPLEMENTED":
return __("Implemented");
case "IN_PROGRESS":
return __("In Progress");
case "NOT_APPLICABLE":
return __("Not Applicable");
case "NOT_STARTED":
return __("Not Started");
default:
return __("Unknown");
}
}