@@ -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";
|
||||
|
||||
33
packages/helpers/src/snapshots.ts
Normal file
33
packages/helpers/src/snapshots.ts
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user