Frontend: - Replace Next.js with Vite + React + TypeScript - Add new component architecture (app-shell, sidebar, dashboard modules) - Implement product modules: FRAME, safety protocols, walkthrough checkin, campus/staff attendance, personality quiz, sign language, classroom timer - Add shadcn/ui component library with Tailwind CSS - Remove legacy generated components, stores, and pages Backend: - Add product migrations: frame_entries, user_progress, safety_quiz_results, walkthrough_checkins, communication_events, personality_quiz_results, campus_attendance_config/summaries, staff_attendance_records, content_catalog - Add corresponding models, services, and routes - Implement cookie-based auth with refresh token rotation - Add content catalog seeder with product content - Migrate to ESLint flat config - Switch from yarn to npm Infrastructure: - Update .gitignore for new tooling - Add project documentation (CLAUDE.md, docs/) - Remove deprecated config files and yarn.lock Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.7 KiB
TypeScript
49 lines
1.7 KiB
TypeScript
import type { ModuleId } from '@/shared/types/app';
|
|
import type { DirectorRiskArea } from '@/business/director-dashboard/types';
|
|
import { Button } from '@/components/ui/button';
|
|
import {
|
|
directorNavigateIcon,
|
|
directorRiskIcon,
|
|
directorRiskSeverityClasses,
|
|
} from '@/components/director-dashboard/directorDashboardViewConfig';
|
|
|
|
interface DirectorRiskListProps {
|
|
readonly risks: readonly DirectorRiskArea[];
|
|
readonly onOpenModule: (module: ModuleId) => void;
|
|
}
|
|
|
|
export function DirectorRiskList({
|
|
risks,
|
|
onOpenModule,
|
|
}: DirectorRiskListProps) {
|
|
const RiskIcon = directorRiskIcon;
|
|
const NavigateIcon = directorNavigateIcon;
|
|
|
|
return (
|
|
<div className="bg-white rounded-2xl border border-violet-100 shadow-sm p-5">
|
|
<h3 className="font-semibold text-gray-800 mb-4 flex items-center gap-2">
|
|
<RiskIcon size={18} className="text-amber-500" />
|
|
Risk Areas
|
|
</h3>
|
|
<div className="space-y-3">
|
|
{risks.map((risk) => (
|
|
<Button
|
|
key={`${risk.module}-${risk.issue}`}
|
|
type="button"
|
|
onClick={() => onOpenModule(risk.module)}
|
|
className={`w-full h-auto text-left p-4 rounded-xl border ${directorRiskSeverityClasses[risk.severity]} flex items-center justify-between hover:shadow-sm transition-all`}
|
|
>
|
|
<div className="flex items-center gap-3">
|
|
<span className={`px-2 py-1 rounded-lg text-[10px] font-bold uppercase ${directorRiskSeverityClasses[risk.severity]}`}>
|
|
{risk.severity}
|
|
</span>
|
|
<p className="text-sm font-medium text-gray-700">{risk.issue}</p>
|
|
</div>
|
|
<NavigateIcon size={14} className="text-gray-400" />
|
|
</Button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|