Session 1: CV Upload Button Component
Context
Working on InterimPlaza Recruitment Platform (Spring Boot 3.3.5 + Angular 18). This is Session 1 of 17 sessions. The project is 85% complete. We need to add a CV upload button visible on the homepage.
Project Structure
- Backend:
backend/ (Spring Boot, already has API endpoints)
- Frontend:
frontend/recruitment-portal/ (Angular 18 standalone components)
- Current working dir:
/Users/sarkout/projects/prive/mahmoud-consultancy
Task
Create a CV upload button component and add it to the job-list page.
Requirements
Create Component: frontend/recruitment-portal/src/app/components/cv-upload-button/
- Standalone Angular component
- Use Angular signals for state management
- Detect auth state from AuthService
Functionality:
- If authenticated: Show "Upload Your CV" button
- If not authenticated: Show "Register to Upload CV" button
- Emit click event to parent
- Style with Bootstrap 5
Integration:
- Add to job-list component
- Place prominently (after header, before listings)
- Handle click (for now just console.log, modal comes in Session 2)
Steps
- Generate component:
cd frontend/recruitment-portal && ng generate component components/cv-upload-button --standalone
- Implement component with auth detection
- Create template and styles
- Add to job-list component
- Write unit tests
- Test manually (logged in/out, mobile)
- Run tests:
npm test
- Commit
Success Criteria
- ✅ Button visible on job-list page
- ✅ Shows different text based on auth
- ✅ Responsive on mobile (320px+)
- ✅ Click handler emits event
- ✅ All tests passing
- ✅ No console errors
When done, confirm success criteria and commit changes. Mark session state as 2 for next session.
Reacties