diff --git a/frontend/src/pages/JobAnalysisPage.tsx b/frontend/src/pages/JobAnalysisPage.tsx index 5291721..d8e5c6d 100644 --- a/frontend/src/pages/JobAnalysisPage.tsx +++ b/frontend/src/pages/JobAnalysisPage.tsx @@ -39,6 +39,8 @@ import { useNavigate } from 'react-router-dom'; import { BackstoryPageProps } from 'components/BackstoryTab'; import { useAuth } from 'hooks/AuthContext'; import { useSelectedCandidate } from 'hooks/GlobalContext'; +import { CandidateInfo } from 'components/CandidateInfo'; +import { ComingSoon } from 'components/ui/ComingSoon'; // Main component const JobAnalysisPage: React.FC = (props: BackstoryPageProps) => { @@ -93,32 +95,14 @@ const JobAnalysisPage: React.FC = (props: BackstoryPageProps }, [selectedCandidate, activeStep]); // Steps in our process - const steps = selectedCandidate === null ? [ - { index: 0, label: 'Select Candidate', icon: }, + const steps = [ { index: 1, label: 'Job Description', icon: }, - { index: 2, label: 'View Analysis', icon: } - ] : [ - { index: 1, label: 'Job Description', icon: }, - { index: 2, label: 'View Analysis', icon: } + { index: 2, label: 'AI Analysis', icon: }, + { index: 3, label: 'Generated Resume', icon: } ]; - - // Mock handlers for our analysis APIs - const fetchRequirements = async (): Promise => { - // Simulates extracting requirements from the job description - await new Promise(resolve => setTimeout(resolve, 2000)); - - // This would normally parse the job description to extract requirements - const mockRequirements = [ - "5+ years of React development experience", - "Strong TypeScript skills", - "Experience with RESTful APIs", - "Knowledge of state management solutions (Redux, Context API)", - "Experience with CI/CD pipelines", - "Cloud platform experience (AWS, Azure, GCP)" - ]; - - return mockRequirements; - }; + if (!selectedCandidate) { + steps.unshift({ index: 0, label: 'Select Candidate', icon: }) + } const fetchMatchForRequirement = async (requirement: string): Promise => { // Create different mock responses based on the requirement @@ -245,9 +229,11 @@ const JobAnalysisPage: React.FC = (props: BackstoryPageProps return; } - if (activeStep === 1 && (/*(extraInfo && !jobTitle) || */!jobDescription)) { - setError('Please provide both job title and description before continuing.'); - return; + if (activeStep === 1) { + if ((/*(extraInfo && !jobTitle) || */!jobDescription)) { + setError('Please provide job description before continuing.'); + return; + } } if (activeStep === 2) { @@ -433,15 +419,19 @@ const JobAnalysisPage: React.FC = (props: BackstoryPageProps {selectedCandidate && ( )} ); + const renderResume = () => ( + + {selectedCandidate && Resume Builder} + + ); + // If no user is logged in, show message if (!user) { return ( @@ -464,6 +454,7 @@ const JobAnalysisPage: React.FC = (props: BackstoryPageProps Candidate Analysis + {selectedCandidate && } Match candidates to job requirements with AI-powered analysis @@ -496,6 +487,7 @@ const JobAnalysisPage: React.FC = (props: BackstoryPageProps {activeStep === 0 && renderCandidateSelection()} {activeStep === 1 && renderJobDescription()} {activeStep === 2 && renderAnalysis()} + {activeStep === 3 && renderResume()}