Cooooool!

This commit is contained in:
James Ketr 2025-06-05 16:42:40 -07:00
parent b88949bb76
commit b76141f3d1

View File

@ -36,6 +36,7 @@ import { CandidateInfo } from 'components/CandidateInfo';
import { ComingSoon } from 'components/ui/ComingSoon'; import { ComingSoon } from 'components/ui/ComingSoon';
import { JobManagement } from 'components/JobManagement'; import { JobManagement } from 'components/JobManagement';
import { LoginRequired } from 'components/ui/LoginRequired'; import { LoginRequired } from 'components/ui/LoginRequired';
import { Scrollable } from 'components/Scrollable';
// Main component // Main component
const JobAnalysisPage: React.FC<BackstoryPageProps> = (props: BackstoryPageProps) => { const JobAnalysisPage: React.FC<BackstoryPageProps> = (props: BackstoryPageProps) => {
@ -257,82 +258,78 @@ const JobAnalysisPage: React.FC<BackstoryPageProps> = (props: BackstoryPageProps
} }
return ( return (
<Container maxWidth="lg"> <Box sx={{ maxHeight: "100%", position: "relative", display: "flex", flexDirection: "column", overflow: "hidden" }}>
<Paper elevation={1} sx={{ p: 3, mt: 3, borderRadius: 2 }}> <Paper elevation={4} sx={{ m: 0, borderRadius: 0, mb: 1, p: 0 }}>{selectedCandidate && <CandidateInfo variant="small" candidate={selectedCandidate} sx={{ width: "100%" }} />}</Paper>
<Typography variant="h4" component="h1" gutterBottom> <Scrollable sx={{ display: "flex", flexGrow: 1, maxHeight: "calc(100dvh - 234px)", position: "relative" }}>
Candidate Analysis <Box sx={{ display: "flex", justifyContent: "center" }}>
</Typography>
{selectedCandidate && <CandidateInfo variant="small" candidate={selectedCandidate} />}
<Typography variant="subtitle1" color="text.secondary" gutterBottom> <Typography variant="subtitle1" color="text.secondary" gutterBottom>
Match candidates to job requirements with AI-powered analysis Match candidates to job requirements with AI-powered analysis
</Typography> </Typography>
</Paper> </Box>
<Box sx={{ mt: 4, mb: 4 }}>
<Box sx={{ mt: 4, mb: 4 }}> <Stepper activeStep={activeStep} alternativeLabel>
<Stepper activeStep={activeStep} alternativeLabel> {steps.map(step => (
{steps.map(step => ( <Step key={step.index}>
<Step key={step.index}> <StepLabel slots={{
<StepLabel slots={{ stepIcon: () => (
stepIcon: () => ( <Avatar
<Avatar sx={{
sx={{ bgcolor: activeStep >= step.index ? theme.palette.primary.main : theme.palette.grey[300],
bgcolor: activeStep >= step.index ? theme.palette.primary.main : theme.palette.grey[300], color: 'white'
color: 'white' }}
}} >
{step.icon}
</Avatar>
)
}}
> >
{step.icon} {step.label}
</Avatar> </StepLabel>
) </Step>
}} ))}
> </Stepper>
{step.label} </Box>
</StepLabel>
</Step>
))}
</Stepper>
</Box>
{activeStep === 0 && renderCandidateSelection()} {activeStep === 0 && renderCandidateSelection()}
{activeStep === 1 && renderJobDescription()} {activeStep === 1 && renderJobDescription()}
{activeStep === 2 && renderAnalysis()} {activeStep === 2 && renderAnalysis()}
{activeStep === 3 && renderResume()} {activeStep === 3 && renderResume()}
<Box sx={{ display: 'flex', flexDirection: 'row', pt: 2 }}> <Box sx={{ display: 'flex', flexDirection: 'row', pt: 2 }}>
<Button <Button
color="inherit" color="inherit"
disabled={activeStep === steps[0].index} disabled={activeStep === steps[0].index}
onClick={handleBack} onClick={handleBack}
sx={{ mr: 1 }} sx={{ mr: 1 }}
> >
Back Back
</Button>
<Box sx={{ flex: '1 1 auto' }} />
{activeStep === steps[steps.length - 1].index ? (
<Button onClick={handleReset} variant="outlined">
Start New Analysis
</Button> </Button>
) : ( <Box sx={{ flex: '1 1 auto' }} />
<Button onClick={handleNext} variant="contained">
{activeStep === steps[steps.length - 1].index ? (
<Button onClick={handleReset} variant="outlined">
Start New Analysis
</Button>
) : (
<Button onClick={handleNext} variant="contained">
{activeStep === steps[steps.length - 1].index - 1 ? 'Start Analysis' : 'Next'} {activeStep === steps[steps.length - 1].index - 1 ? 'Start Analysis' : 'Next'}
</Button> </Button>
)} )}
</Box> </Box>
{/* Error Snackbar */} {/* Error Snackbar */}
<Snackbar <Snackbar
open={!!error} open={!!error}
autoHideDuration={6000} autoHideDuration={6000}
onClose={() => setError(null)} onClose={() => setError(null)}
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
> >
<Alert onClose={() => setError(null)} severity="error" sx={{ width: '100%' }}> <Alert onClose={() => setError(null)} severity="error" sx={{ width: '100%' }}>
{error} {error}
</Alert> </Alert>
</Snackbar> </Snackbar>
</Scrollable>
</Container> </Box>);
);
}; };
export { JobAnalysisPage }; export { JobAnalysisPage };