@@ -40,6 +40,12 @@ const enrollmentStatusStyles: Record<string, string> = {
4040 Transferred : 'bg-amber-50 text-amber-700 border-amber-200'
4141} ;
4242
43+ const residentStatusStyles : Record < string , string > = {
44+ Active : 'bg-green-100 text-green-800 border-green-300' ,
45+ Inactive : 'bg-gray-100 text-gray-700 border-gray-300' ,
46+ Archived : 'bg-orange-100 text-orange-700 border-orange-300'
47+ } ;
48+
4349type StatusType =
4450 | SelectedClassStatus
4551 | ProgClassStatus
@@ -49,7 +55,7 @@ type StatusType =
4955
5056interface StatusBadgeProps {
5157 status : StatusType ;
52- variant ?: 'class' | 'progClass' | 'program' | 'enrollment' | 'auto' ;
58+ variant ?: 'class' | 'progClass' | 'program' | 'enrollment' | 'resident' | ' auto';
5359 className ?: string ;
5460}
5561
@@ -69,6 +75,9 @@ function getStyleForStatus(
6975 if ( variant === 'enrollment' && status in enrollmentStatusStyles ) {
7076 return enrollmentStatusStyles [ status ] ;
7177 }
78+ if ( variant === 'resident' && status in residentStatusStyles ) {
79+ return residentStatusStyles [ status ] ;
80+ }
7281 if ( variant === 'auto' ) {
7382 if ( status in classStatusStyles )
7483 return classStatusStyles [ status as SelectedClassStatus ] ;
@@ -78,6 +87,8 @@ function getStyleForStatus(
7887 return programStatusStyles [ status as ProgramEffectiveStatus ] ;
7988 if ( status in enrollmentStatusStyles )
8089 return enrollmentStatusStyles [ status ] ;
90+ if ( status in residentStatusStyles )
91+ return residentStatusStyles [ status ] ;
8192 }
8293 return 'bg-muted text-foreground border-border' ;
8394}
0 commit comments