Add snapshots

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-19 14:28:13 +02:00
parent 9a7add8577
commit e12d04c947
49 changed files with 5560 additions and 185 deletions

View File

@@ -15,6 +15,7 @@ export { certificationCategoryLabel, certifications } from "./certifications";
export { availableFrameworks } from "./frameworks";
export { getDocumentTypeLabel, documentTypes } from "./documents";
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
export { getSnapshotTypeLabel, snapshotTypes } from "./snapshots";
export { getAuditStateLabel, getAuditStateVariant, auditStates } from "./audits";
export { getStatusVariant, getStatusLabel, getNonconformityRegistryStatusOptions, getComplianceRegistryStatusOptions, registryStatuses } from "./registryStatus";
export { promisifyMutation } from "./relay";

View File

@@ -0,0 +1,33 @@
type Translator = (s: string) => string;
export const snapshotTypes = [
"RISKS",
"VENDORS",
"ASSETS",
"DATA",
"NON_CONFORMITY_REGISTRIES",
"COMPLIANCE_REGISTRIES"
] as const;
export function getSnapshotTypeLabel(__: Translator, type: string | null | undefined) {
if (!type) {
return __("Unknown");
}
switch (type) {
case "RISKS":
return __("Risks");
case "VENDORS":
return __("Vendors");
case "ASSETS":
return __("Assets");
case "DATA":
return __("Data");
case "NON_CONFORMITY_REGISTRIES":
return __("Non Conformity Registries");
case "COMPLIANCE_REGISTRIES":
return __("Compliance Registries");
default:
return __("Unknown");
}
}