diff --git a/frontend/src/BackstoryApp.css b/frontend/src/BackstoryApp.css index 0142ca6..04d6700 100644 --- a/frontend/src/BackstoryApp.css +++ b/frontend/src/BackstoryApp.css @@ -205,7 +205,7 @@ button { } /* Reduce space between headings and content */ -* h1.MuiTypography-root, +/* * h1.MuiTypography-root, * h2.MuiTypography-root, * h3.MuiTypography-root, * h4.MuiTypography-root, @@ -214,7 +214,7 @@ button { margin-top: 1rem; margin-bottom: 0.5rem; font-size: 1rem; -} +} */ /* Reduce space in lists */ * ul.MuiTypography-root, diff --git a/frontend/src/components/JobMatchAnalysis.tsx b/frontend/src/components/JobMatchAnalysis.tsx index 1ba25bf..30d016f 100644 --- a/frontend/src/components/JobMatchAnalysis.tsx +++ b/frontend/src/components/JobMatchAnalysis.tsx @@ -13,6 +13,7 @@ import { LinearProgress, useMediaQuery, Button, + Paper, } from '@mui/material'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; @@ -53,6 +54,7 @@ const JobMatchAnalysis: React.FC = (props: JobAnalysisProps) = const [analyzing, setAnalyzing] = useState(false); const [matchStatus, setMatchStatus] = useState(''); const [_matchStatusType, setMatchStatusType] = useState(null); + const [percentage, setPercentage] = useState(0); const isMobile = useMediaQuery(theme.breakpoints.down('sm')); @@ -239,10 +241,12 @@ const JobMatchAnalysis: React.FC = (props: JobAnalysisProps) = return updated; }); } + setPercentage(Math.round(((i + 1) / requirements.length) * 100)); } }; setAnalyzing(true); + setPercentage(0); const skills: SkillAssessment[] = []; fetchMatchData(skills).then(() => { setAnalyzing(false); @@ -305,62 +309,95 @@ const JobMatchAnalysis: React.FC = (props: JobAnalysisProps) = gap: 1, }} > - {overallScore !== 0 && ( - <> - - Overall Match: - - - - - - {`${Math.round(overallScore)}%`} - - - - = 80 - ? 'Excellent Match' - : overallScore >= 60 + {overallScore !== 0 && + = 80 + ? 'Excellent Match' + : overallScore >= 60 ? 'Good Match' : overallScore >= 40 - ? 'Partial Match' - : 'Low Match' - } + ? 'Partial Match' + : 'Low Match' + } + sx={{ + bgcolor: getMatchColor(overallScore), + color: 'white', + fontWeight: 'bold', + }} + /> + + - - )} + + + {`${Math.round(overallScore)}%`} + + + + + } + {analyzing && + + Analyzing + + + + + + {`${Math.round(percentage)}%`} + + + + } +