11"use client" ;
22
3- import { Task , Control } from "@comp/db/types" ;
3+ import type { Task , Control } from "@comp/db/types" ;
44import { Badge } from "@comp/ui/badge" ;
55import {
66 Card ,
@@ -14,7 +14,7 @@ import { cn } from "@comp/ui/cn";
1414import { ClipboardCheck , ClipboardList , Clock } from "lucide-react" ;
1515import Link from "next/link" ;
1616import { useParams } from "next/navigation" ;
17- import { FrameworkInstanceWithControls } from "../types" ;
17+ import type { FrameworkInstanceWithControls } from "../types" ;
1818
1919interface FrameworkCardProps {
2020 frameworkInstance : FrameworkInstanceWithControls ;
@@ -44,17 +44,20 @@ export function FrameworkCard({
4444 if ( score >= 95 )
4545 return {
4646 label : "Compliant" ,
47- color : "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" ,
47+ color :
48+ "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" ,
4849 } ;
4950 if ( score >= 80 )
5051 return {
5152 label : "Nearly Compliant" ,
52- color : "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400" ,
53+ color :
54+ "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400" ,
5355 } ;
5456 if ( score >= 50 )
5557 return {
5658 label : "In Progress" ,
57- color : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400" ,
59+ color :
60+ "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400" ,
5861 } ;
5962 return {
6063 label : "Needs Attention" ,
@@ -116,13 +119,10 @@ export function FrameworkCard({
116119 className = "block"
117120 >
118121 < Card className = "select-none hover:bg-muted/40 transition-colors duration-200 overflow-hidden h-full flex flex-col" >
119- < CardHeader className = "flex- shrink-0" >
122+ < CardHeader className = "shrink-0" >
120123 < CardTitle className = "flex items-center" >
121124 { frameworkDetails . name }
122- < Badge
123- variant = "outline"
124- className = "ml-2 text-xs font-normal"
125- >
125+ < Badge variant = "outline" className = "ml-2 text-xs font-normal" >
126126 { frameworkDetails . version }
127127 </ Badge >
128128 </ CardTitle >
@@ -131,12 +131,7 @@ export function FrameworkCard({
131131 < p className = "text-sm text-muted-foreground line-clamp-2" >
132132 { frameworkDetails . description }
133133 </ p >
134- < Badge
135- className = { cn (
136- "hidden md:block" ,
137- statusBadge . color ,
138- ) }
139- >
134+ < Badge className = { cn ( "hidden md:block" , statusBadge . color ) } >
140135 { statusBadge . label }
141136 </ Badge >
142137 </ div >
@@ -146,9 +141,7 @@ export function FrameworkCard({
146141 < div className = "flex flex-col gap-3" >
147142 < div className = "space-y-1.5" >
148143 < div className = "flex items-center justify-between text-sm" >
149- < span className = "text-muted-foreground" >
150- { "Status" }
151- </ span >
144+ < span className = "text-muted-foreground" > { "Status" } </ span >
152145 < span
153146 className = { cn (
154147 "font-medium" ,
@@ -162,9 +155,7 @@ export function FrameworkCard({
162155 < div
163156 className = { cn (
164157 "h-full transition-all" ,
165- getComplianceProgressColor (
166- complianceScore ,
167- ) ,
158+ getComplianceProgressColor ( complianceScore ) ,
168159 ) }
169160 style = { { width : `${ complianceScore } %` } }
170161 />
@@ -176,9 +167,7 @@ export function FrameworkCard({
176167 < div className = "flex flex-col items-start gap-1 border-r pr-3" >
177168 < div className = "flex items-center text-muted-foreground" >
178169 < ClipboardList className = "h-3.5 w-3.5 mr-1" />
179- < span className = "text-xs" >
180- { "Controls" }
181- </ span >
170+ < span className = "text-xs" > { "Controls" } </ span >
182171 </ div >
183172 < p className = "font-medium text-sm" >
184173 { controlsCount } { "Tasks" }
@@ -187,9 +176,7 @@ export function FrameworkCard({
187176 < div className = "flex flex-col items-start gap-1 border-r pr-3" >
188177 < div className = "flex items-center text-muted-foreground" >
189178 < ClipboardCheck className = "h-3.5 w-3.5 mr-1" />
190- < span className = "text-xs" >
191- { "Completed" }
192- </ span >
179+ < span className = "text-xs" > { "Completed" } </ span >
193180 </ div >
194181 < p className = "font-medium text-sm" >
195182 { compliantControlsCount } / { controlsCount }
@@ -198,17 +185,15 @@ export function FrameworkCard({
198185 < div className = "flex flex-col items-start gap-1" >
199186 < div className = "flex items-center text-muted-foreground" >
200187 < Clock className = "h-3.5 w-3.5 mr-1" />
201- < span className = "text-xs" >
202- { "In Progress" }
203- </ span >
188+ < span className = "text-xs" > { "In Progress" } </ span >
204189 </ div >
205190 < p className = "font-medium text-sm" >
206191 { inProgressCount } / { controlsCount }
207192 </ p >
208193 </ div >
209194 </ div >
210195 </ CardContent >
211- < CardFooter className = "text-xs text-muted-foreground flex justify-between mt-auto flex- shrink-0" >
196+ < CardFooter className = "text-xs text-muted-foreground flex justify-between mt-auto shrink-0" >
212197 < div className = "flex items-center" >
213198 < Clock className = "h-3.5 w-3.5 mr-1.5" />
214199 { "Last Updated" } : { lastActivityDate }
0 commit comments