@@ -17,7 +17,7 @@ import { z } from 'zod';
1717import { isFriendlyAvailable } from '../actions/is-friendly-available' ;
1818import { trustPortalSwitchAction } from '../actions/trust-portal-switch' ;
1919import { updateTrustPortalFrameworks } from '../actions/update-trust-portal-frameworks' ;
20- import { GDPR , HIPAA , ISO27001 , SOC2 , SOC2Type1 , SOC2Type2 , PCIDSS } from './logos' ;
20+ import { GDPR , HIPAA , ISO27001 , SOC2Type1 , SOC2Type2 , PCIDSS , ISO42001 } from './logos' ;
2121
2222const trustPortalSwitchSchema = z . object ( {
2323 enabled : z . boolean ( ) ,
@@ -26,12 +26,14 @@ const trustPortalSwitchSchema = z.object({
2626 soc2type1 : z . boolean ( ) ,
2727 soc2type2 : z . boolean ( ) ,
2828 iso27001 : z . boolean ( ) ,
29+ iso42001 : z . boolean ( ) ,
2930 gdpr : z . boolean ( ) ,
3031 hipaa : z . boolean ( ) ,
3132 pcidss : z . boolean ( ) ,
3233 soc2type1Status : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
3334 soc2type2Status : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
3435 iso27001Status : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
36+ iso42001Status : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
3537 gdprStatus : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
3638 hipaaStatus : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
3739 pcidssStatus : z . enum ( [ 'started' , 'in_progress' , 'compliant' ] ) ,
@@ -47,12 +49,14 @@ export function TrustPortalSwitch({
4749 soc2type1,
4850 soc2type2,
4951 iso27001,
52+ iso42001,
5053 gdpr,
5154 hipaa,
5255 pcidss,
5356 soc2type1Status,
5457 soc2type2Status,
5558 iso27001Status,
59+ iso42001Status,
5660 gdprStatus,
5761 hipaaStatus,
5862 pcidssStatus,
@@ -67,12 +71,14 @@ export function TrustPortalSwitch({
6771 soc2type1 : boolean ;
6872 soc2type2 : boolean ;
6973 iso27001 : boolean ;
74+ iso42001 : boolean ;
7075 gdpr : boolean ;
7176 hipaa : boolean ;
7277 pcidss : boolean ;
7378 soc2type1Status : 'started' | 'in_progress' | 'compliant' ;
7479 soc2type2Status : 'started' | 'in_progress' | 'compliant' ;
7580 iso27001Status : 'started' | 'in_progress' | 'compliant' ;
81+ iso42001Status : 'started' | 'in_progress' | 'compliant' ;
7682 gdprStatus : 'started' | 'in_progress' | 'compliant' ;
7783 hipaaStatus : 'started' | 'in_progress' | 'compliant' ;
7884 pcidssStatus : 'started' | 'in_progress' | 'compliant' ;
@@ -97,12 +103,14 @@ export function TrustPortalSwitch({
97103 soc2type1 : soc2type1 ?? false ,
98104 soc2type2 : soc2type2 ?? false ,
99105 iso27001 : iso27001 ?? false ,
106+ iso42001 : iso42001 ?? false ,
100107 gdpr : gdpr ?? false ,
101108 hipaa : hipaa ?? false ,
102109 pcidss : pcidss ?? false ,
103110 soc2type1Status : soc2type1Status ?? 'started' ,
104111 soc2type2Status : soc2type2Status ?? 'started' ,
105112 iso27001Status : iso27001Status ?? 'started' ,
113+ iso42001Status : iso42001Status ?? 'started' ,
106114 gdprStatus : gdprStatus ?? 'started' ,
107115 hipaaStatus : hipaaStatus ?? 'started' ,
108116 pcidssStatus : pcidssStatus ?? 'started' ,
@@ -359,6 +367,35 @@ export function TrustPortalSwitch({
359367 }
360368 } }
361369 />
370+ { /* ISO 42001 */ }
371+ < ComplianceFramework
372+ title = "ISO 42001"
373+ description = "An international standard for an Artificial Intelligence Management System."
374+ isEnabled = { iso42001 }
375+ status = { iso42001Status }
376+ onStatusChange = { async ( value ) => {
377+ try {
378+ await updateTrustPortalFrameworks ( {
379+ orgId,
380+ iso42001Status : value as 'started' | 'in_progress' | 'compliant' ,
381+ } ) ;
382+ toast . success ( 'ISO 42001 status updated' ) ;
383+ } catch ( error ) {
384+ toast . error ( 'Failed to update ISO 42001 status' ) ;
385+ }
386+ } }
387+ onToggle = { async ( checked ) => {
388+ try {
389+ await updateTrustPortalFrameworks ( {
390+ orgId,
391+ iso42001 : checked ,
392+ } ) ;
393+ toast . success ( 'ISO 42001 status updated' ) ;
394+ } catch ( error ) {
395+ toast . error ( 'Failed to update ISO 42001 status' ) ;
396+ }
397+ } }
398+ />
362399 { /* GDPR */ }
363400 < ComplianceFramework
364401 title = "GDPR"
@@ -536,6 +573,10 @@ function ComplianceFramework({
536573 < div className = "h-16 w-16 flex items-center justify-center" >
537574 < ISO27001 className = "max-h-full max-w-full" />
538575 </ div >
576+ ) : title === 'ISO 42001' ? (
577+ < div className = "h-16 w-16 flex items-center justify-center" >
578+ < ISO42001 className = "max-h-full max-w-full" />
579+ </ div >
539580 ) : title === 'GDPR' ? (
540581 < div className = "h-16 w-16 flex items-center justify-center" >
541582 < GDPR className = "max-h-full max-w-full" />
0 commit comments