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:
committed by
Sacha Al Himdani
parent
f9d1f033e0
commit
7903bd3a77
@@ -8,3 +8,4 @@ export {
|
||||
} from "./risk";
|
||||
export { times, groupBy, isEmpty } from "./array";
|
||||
export { randomInt } from "./number";
|
||||
export { getMeasureStateLabel, measureStates } from "./measure";
|
||||
|
||||
23
packages/helpers/src/measure.ts
Normal file
23
packages/helpers/src/measure.ts
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user