Create assets helper

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-06-12 19:45:15 -07:00
parent 24154cc3a2
commit 187bc84365
4 changed files with 4 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
export const getAssetTypeVariant = (type: string) => {
switch (type) {
case "PHYSICAL":
return "neutral";
case "VIRTUAL":
return "info";
default:
return "neutral";
}
};
export const getCriticityVariant = (criticity: string) => {
switch (criticity) {
case "HIGH":
return "danger";
case "MEDIUM":
return "warning";
case "LOW":
return "neutral";
default:
return "neutral";
}
};

View File

@@ -14,5 +14,6 @@ export { getRole, getRoles, peopleRoles } from "./people";
export { certificationCategoryLabel, certifications } from "./certifications";
export { availableFrameworks } from "./frameworks";
export { getDocumentTypeLabel, documentTypes } from "./documents";
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
export { promisifyMutation } from "./relay";
export { fileType, fileSize } from "./file";