diff --git a/frontend/src/components/ResumeGenerator.tsx b/frontend/src/components/ResumeGenerator.tsx index 08b53d3..4d87d22 100644 --- a/frontend/src/components/ResumeGenerator.tsx +++ b/frontend/src/components/ResumeGenerator.tsx @@ -61,16 +61,18 @@ const ResumeGenerator: React.FC = (props: ResumeGeneratorP if (!job || !candidate || !skills || resume || generating) { return; } - const generateResume = async () => { - setGenerating(true); + + const generateResume = async () => { const request : any = await apiClient.generateResume(candidate.id || '', skills, generateResumeHandlers); const result = await request.promise; setSystemPrompt(result.systemPrompt) setPrompt(result.prompt) setResume(result.resume) - setGenerating(false); }; - generateResume() + setGenerating(true); + generateResume().then(() =>{ + setGenerating(false); + }); }, [job, candidate, apiClient, resume, skills, generating]); return ( @@ -82,9 +84,9 @@ const ResumeGenerator: React.FC = (props: ResumeGeneratorP }}> - } label="System" /> - } label="Prompt" /> - } label="Resume" /> + } label="System" /> + } label="Prompt" /> + } label="Resume" /> { statusMessage && } diff --git a/frontend/src/components/ui/JobInfo.tsx b/frontend/src/components/ui/JobInfo.tsx index c526395..78da396 100644 --- a/frontend/src/components/ui/JobInfo.tsx +++ b/frontend/src/components/ui/JobInfo.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import { Box, Link, Typography, Avatar, Grid, SxProps, CardActions } from '@mui/material'; +import React, { JSX } from 'react'; +import { Box, Link, Typography, Avatar, Grid, SxProps, CardActions, Chip, Stack, CardHeader } from '@mui/material'; import { Card, CardContent, @@ -14,6 +14,7 @@ import { rest } from 'lodash'; import { AIBanner } from 'components/ui/AIBanner'; import { useAuth } from 'hooks/AuthContext'; import { DeleteConfirmation } from '../DeleteConfirmation'; +import { Build, CheckCircle, Description, Psychology, Star, Work } from '@mui/icons-material'; interface JobInfoProps { job: JobFull; @@ -45,7 +46,97 @@ const JobInfo: React.FC = (props: JobInfoProps) => { if (!job) { return No user loaded.; } - console.log(job); + + const renderRequirementSection = (title: string, items: string[] | undefined, icon: JSX.Element, required = false) => { + if (!items || items.length === 0) return null; + + return ( + + + {icon} + + {title} + + {required && } + + + {items.map((item, index) => ( + + ))} + + + ); + }; + + const renderJobRequirements = () => { + if (!job.requirements) return null; + + return ( + + } + sx={{ p: 0, pb: 1 }} + /> + + {renderRequirementSection( + "Technical Skills (Required)", + job.requirements.technicalSkills.required, + , + true + )} + {renderRequirementSection( + "Technical Skills (Preferred)", + job.requirements.technicalSkills.preferred, + + )} + {renderRequirementSection( + "Experience Requirements (Required)", + job.requirements.experienceRequirements.required, + , + true + )} + {renderRequirementSection( + "Experience Requirements (Preferred)", + job.requirements.experienceRequirements.preferred, + + )} + {renderRequirementSection( + "Soft Skills", + job.requirements.softSkills, + + )} + {renderRequirementSection( + "Experience", + job.requirements.experience, + + )} + {renderRequirementSection( + "Education", + job.requirements.education, + + )} + {renderRequirementSection( + "Certifications", + job.requirements.certifications, + + )} + {renderRequirementSection( + "Preferred Attributes", + job.requirements.preferredAttributes, + + )} + + + ); + }; + return ( = (props: JobInfoProps) => { } } + + + {renderJobRequirements()} + {isAdmin && diff --git a/src/backend/agents/generate_resume.py b/src/backend/agents/generate_resume.py index 565c0d4..2a02eac 100644 --- a/src/backend/agents/generate_resume.py +++ b/src/backend/agents/generate_resume.py @@ -136,13 +136,14 @@ Phone: {self.user.phone or 'N/A'} - Professional Summary (highlight strongest skills and experience level) - Skills (organized by strength) - Professional Experience (focus on achievements and evidence of the skill) - - If present in material, provide an Education section - - If present in material, provide a Certifications section +4. Optional sections, to include only if evidence is present: + - Education section + Certifications section - Additional sections as appropriate -4. Use action verbs and quantifiable achievements where possible. -5. Maintain a professional tone throughout. -6. Be concise and impactful - the resume should be 1-2 pages MAXIMUM. -7. Ensure all information is accurate to the original resume - do not embellish or fabricate experiences. +5. Use action verbs and quantifiable achievements where possible. +6. Maintain a professional tone throughout. +7. Be concise and impactful - the resume should be 1-2 pages MAXIMUM. +8. Ensure all information is accurate to the original resume - do not embellish or fabricate experiences. ## OUTPUT FORMAT: Provide the resume in clean markdown format, ready for the candidate to use.