diff --git a/frontend/src/pages/candidate/Profile.tsx b/frontend/src/pages/candidate/Profile.tsx
index 31777ff..aee95e6 100644
--- a/frontend/src/pages/candidate/Profile.tsx
+++ b/frontend/src/pages/candidate/Profile.tsx
@@ -44,6 +44,7 @@ import {
Phone,
Email,
AccountCircle,
+ LiveHelp,
} from '@mui/icons-material';
import { useTheme } from '@mui/material/styles';
import { useAuth } from 'hooks/AuthContext';
@@ -67,22 +68,22 @@ const VisuallyHiddenInput = styled('input')({
interface TabPanelProps {
children?: React.ReactNode;
- index: number;
- value: number;
+ value: string;
+ active: string;
}
function TabPanel(props: TabPanelProps): JSX.Element {
- const { children, value, index, ...other } = props;
+ const { children, value, active, ...other } = props;
return (
- {value === index && (
+ {value === active && (
= (_props: BackstoryPagePro
const candidate = user?.userType === 'candidate' ? (user as Types.Candidate) : null;
// State management
- const [tabValue, setTabValue] = useState(0);
+ const [tabValue, setTabValue] = useState('info');
const [editMode, setEditMode] = useState<{ [key: string]: boolean }>({});
const [loading, setLoading] = useState(false);
const [snackbar, setSnackbar] = useState<{
@@ -126,6 +127,7 @@ const CandidateProfile: React.FC = (_props: BackstoryPagePro
// Dialog states
const [skillDialog, setSkillDialog] = useState(false);
+ const [questionDialog, setQuestionDialog] = useState(false);
const [experienceDialog, setExperienceDialog] = useState(false);
// New item states
@@ -166,7 +168,7 @@ const CandidateProfile: React.FC = (_props: BackstoryPagePro
}
// Handle tab change
- const handleTabChange = (event: React.SyntheticEvent, newValue: number): void => {
+ const handleTabChange = (event: React.SyntheticEvent, newValue: string): void => {
setTabValue(newValue);
};
@@ -630,6 +632,78 @@ const CandidateProfile: React.FC = (_props: BackstoryPagePro
);
+ // Questions Tab
+ const renderQuestions = (): JSX.Element => (
+
+
+ Questions for Chat
+ }
+ onClick={(): void => setQuestionDialog(true)}
+ fullWidth={isMobile}
+ size={isMobile ? 'small' : 'medium'}
+ >
+ Add Question
+
+
+
+
+ {(formData.questions || []).map((question, index) => (
+
+
+
+
+
+
+ {question.question}
+
+
+ handleRemoveSkill(index)}
+ color="error"
+ sx={{ ml: 1 }}
+ >
+
+
+
+
+
+
+ ))}
+
+
+ {(!formData.skills || formData.skills.length === 0) && (
+
+ No questions added yet. Click "Add Question" to get started.
+
+ )}
+
+ );
+
// Experience Tab
const renderExperience = (): JSX.Element => (
@@ -833,40 +907,54 @@ const CandidateProfile: React.FC = (_props: BackstoryPagePro
>
}
iconPosition={isMobile ? 'top' : 'start'}
/>
+ }
+ iconPosition={isMobile ? 'top' : 'start'}
+ />
}
iconPosition={isMobile ? 'top' : 'start'}
/>
}
iconPosition={isMobile ? 'top' : 'start'}
/>
}
iconPosition={isMobile ? 'top' : 'start'}
/>
-
+
{renderBasicInfo()}
-
+
+ {renderQuestions()}
+
+
+
{renderSkills()}
-
+
{renderExperience()}
-
+
{renderEducation()}