From be0f73c1df2175f3ef72ff9b20eb66f9ebc18c73 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Tue, 22 Apr 2025 11:20:40 -0700 Subject: [PATCH] Update certifications tab UI Signed-off-by: Bryan Frimin --- apps/console/public/assets/cross-icon.svg | 3 + .../organizations/vendors/ListVendorView.tsx | 1 - .../organizations/vendors/VendorView.tsx | 226 +++++++++++++++--- 3 files changed, 201 insertions(+), 29 deletions(-) create mode 100644 apps/console/public/assets/cross-icon.svg diff --git a/apps/console/public/assets/cross-icon.svg b/apps/console/public/assets/cross-icon.svg new file mode 100644 index 000000000..6b6a8bb6e --- /dev/null +++ b/apps/console/public/assets/cross-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/console/src/pages/organizations/vendors/ListVendorView.tsx b/apps/console/src/pages/organizations/vendors/ListVendorView.tsx index aa2b0bae4..d795b95a4 100644 --- a/apps/console/src/pages/organizations/vendors/ListVendorView.tsx +++ b/apps/console/src/pages/organizations/vendors/ListVendorView.tsx @@ -311,7 +311,6 @@ function ListVendorContent({ return ( void; + onRemove: (tag: string) => void; +}) { + // Common security standards + const securityStandards = ["SOC 2", "ISO 27001", "HITRUST", "NIST"]; + + // Regulatory and legal certifications + const regulatoryLegal = ["HIPAA", "FERPA", "FISMA", "PIPEDA"]; + + // Industry-specific certifications + const industrySpecific = ["FinTech", "MPAA", "GSMA"]; + + // International & government certifications + const internationalGov = ["FedRAMP", "ENS High", "IRAP", "CJIS"]; + + // Check if certification is in vendor's list + const isCertificationActive = (cert: string) => { + return certifications.includes(cert); + }; + + return ( +
+
+

Certifications

+ +
+ +
+ {/* Security Standards */} +
+

Security Standards

+
+ {securityStandards.map(cert => ( + + ))} +
+
+ + {/* Regulatory & Legal */} +
+

Regulatory & Legal

+
+ {regulatoryLegal.map(cert => ( + + ))} +
+
+ + {/* Industry-Specific */} +
+

Industry-Specific

+
+ {industrySpecific.map(cert => ( + + ))} +
+
+ + {/* International & Government */} +
+

International & Government

+
+ {internationalGov.map(cert => ( + + ))} +
+
+ + {/* Custom certifications */} + {certifications.length > 0 && ( +
+

Custom Certifications

+
+ {certifications + .filter(cert => + ![...securityStandards, ...regulatoryLegal, ...industrySpecific, ...internationalGov].includes(cert) + ) + .map(cert => ( +
+ {cert} + +
+ ))} +
+
+ )} +
+
+ ); +} + interface RiskAssessment { id: string; assessedAt: string; @@ -1193,33 +1375,21 @@ function VendorViewContent({ ); case 'certifications': return ( -
-
-

Certifications

-
-
-
-

- List of certifications held by the vendor -

- - handleFieldChange("certifications", [ - ...formData.certifications, - tag, - ]) - } - onRemove={(tag) => - handleFieldChange( - "certifications", - formData.certifications.filter((t) => t !== tag) - ) - } - /> -
-
-
+ + handleFieldChange("certifications", [ + ...formData.certifications.filter(c => c !== cert), + cert, + ]) + } + onRemove={(cert) => + handleFieldChange( + "certifications", + formData.certifications.filter((c) => c !== cert) + ) + } + /> ); case 'complianceReports': return ( @@ -1238,7 +1408,7 @@ function VendorViewContent({
edge.node) ?? [] + (data.node.riskAssessments?.edges.map(edge => edge.node) || []) as RiskAssessment[] } onCreateAssessment={handleCreateRiskAssessment} />