prettier fixes
This commit is contained in:
parent
9c9578cc46
commit
b8f7cbcf30
2
frontend/.prettierignore
Normal file
2
frontend/.prettierignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/types/*
|
||||||
|
|
@ -309,7 +309,19 @@ const JobMatchAnalysis: React.FC<JobAnalysisProps> = (props: JobAnalysisProps) =
|
|||||||
gap: 1,
|
gap: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{overallScore !== 0 && <Paper sx={{ width: '10rem', ml: 1, p: 1, gap: 1, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexDirection: 'column' }}>
|
{overallScore !== 0 && (
|
||||||
|
<Paper
|
||||||
|
sx={{
|
||||||
|
width: '10rem',
|
||||||
|
ml: 1,
|
||||||
|
p: 1,
|
||||||
|
gap: 1,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'column',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Chip
|
<Chip
|
||||||
label={
|
label={
|
||||||
overallScore >= 80
|
overallScore >= 80
|
||||||
@ -359,8 +371,20 @@ const JobMatchAnalysis: React.FC<JobAnalysisProps> = (props: JobAnalysisProps) =
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Paper>
|
</Paper>
|
||||||
}
|
)}
|
||||||
{analyzing && <Paper sx={{ width: "10rem", ml: 1, p: 1, gap: 1, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexDirection: 'column' }}>
|
{analyzing && (
|
||||||
|
<Paper
|
||||||
|
sx={{
|
||||||
|
width: '10rem',
|
||||||
|
ml: 1,
|
||||||
|
p: 1,
|
||||||
|
gap: 1,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'column',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Typography variant="h5" component="h2" sx={{ m: 0, fontSize: '1rem' }}>
|
<Typography variant="h5" component="h2" sx={{ m: 0, fontSize: '1rem' }}>
|
||||||
Analyzing
|
Analyzing
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -376,7 +400,7 @@ const JobMatchAnalysis: React.FC<JobAnalysisProps> = (props: JobAnalysisProps) =
|
|||||||
size={60}
|
size={60}
|
||||||
thickness={5}
|
thickness={5}
|
||||||
sx={{
|
sx={{
|
||||||
color: "orange",
|
color: 'orange',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
@ -396,8 +420,8 @@ const JobMatchAnalysis: React.FC<JobAnalysisProps> = (props: JobAnalysisProps) =
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Paper>}
|
</Paper>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Button
|
<Button
|
||||||
sx={{ marginLeft: 'auto' }}
|
sx={{ marginLeft: 'auto' }}
|
||||||
|
@ -125,7 +125,7 @@ const BackstoryLayout: React.FC<BackstoryLayoutProps> = (props: BackstoryLayoutP
|
|||||||
{
|
{
|
||||||
path: route.path,
|
path: route.path,
|
||||||
exact: true,
|
exact: true,
|
||||||
caseSensitive: false
|
caseSensitive: false,
|
||||||
},
|
},
|
||||||
currentPath
|
currentPath
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,8 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
const [selectedJobs, setSelectedJobs] = React.useState<Set<string>>(new Set());
|
const [selectedJobs, setSelectedJobs] = React.useState<Set<string>>(new Set());
|
||||||
|
|
||||||
// Fetch jobs from API
|
// Fetch jobs from API
|
||||||
const fetchJobs = React.useCallback(async (pageNum: number = 0, searchTerm: string = '') => {
|
const fetchJobs = React.useCallback(
|
||||||
|
async (pageNum: number = 0, searchTerm: string = '') => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
@ -86,7 +87,9 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, [limit]);
|
},
|
||||||
|
[limit]
|
||||||
|
);
|
||||||
|
|
||||||
// Initial load
|
// Initial load
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@ -202,7 +205,7 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
|
|
||||||
<TableContainer>
|
<TableContainer>
|
||||||
<Table size="small" aria-label="jobs table">
|
<Table size="small" aria-label="jobs table">
|
||||||
<TableHead sx={{"& th": { whiteSpace: "nowrap" }}}>
|
<TableHead sx={{ '& th': { whiteSpace: 'nowrap' } }}>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
{selectable && (
|
{selectable && (
|
||||||
<TableCell padding="checkbox">
|
<TableCell padding="checkbox">
|
||||||
@ -227,23 +230,29 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
{showActions && <TableCell align="center">Actions</TableCell>}
|
{showActions && <TableCell align="center">Actions</TableCell>}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody sx={{ "& p, & td" : { m: 0, p: 0.5, fontSize: '0.75rem !important'}}}>
|
<TableBody sx={{ '& p, & td': { m: 0, p: 0.5, fontSize: '0.75rem !important' } }}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={selectable ? (showActions ? 9 : 8) : (showActions ? 8 : 7)} align="center">
|
<TableCell
|
||||||
|
colSpan={selectable ? (showActions ? 9 : 8) : showActions ? 8 : 7}
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<CircularProgress size={24} />
|
<CircularProgress size={24} />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
) : jobs.length === 0 ? (
|
) : jobs.length === 0 ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={selectable ? (showActions ? 9 : 8) : (showActions ? 8 : 7)} align="center">
|
<TableCell
|
||||||
|
colSpan={selectable ? (showActions ? 9 : 8) : showActions ? 8 : 7}
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<Typography variant="body2" color="textSecondary">
|
<Typography variant="body2" color="textSecondary">
|
||||||
No jobs found
|
No jobs found
|
||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
) : (
|
) : (
|
||||||
jobs.map((job) => {
|
jobs.map(job => {
|
||||||
const isItemSelected = isSelected(job.id || '');
|
const isItemSelected = isSelected(job.id || '');
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
@ -287,9 +296,7 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
</Box>
|
</Box>
|
||||||
</TableCell> */}
|
</TableCell> */}
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">{getOwnerName(job.owner)}</Typography>
|
||||||
{getOwnerName(job.owner)}
|
|
||||||
</Typography>
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{/* <TableCell align="right">
|
{/* <TableCell align="right">
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
@ -303,10 +310,8 @@ const JobsTable: React.FC<JobsTableProps> = ({
|
|||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell sx={{whiteSpace: "nowrap" }}>
|
<TableCell sx={{ whiteSpace: 'nowrap' }}>
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">{job.createdAt?.toLocaleDateString()}</Typography>
|
||||||
{job.createdAt?.toLocaleDateString()}
|
|
||||||
</Typography>
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{showActions && (
|
{showActions && (
|
||||||
<TableCell align="center">
|
<TableCell align="center">
|
||||||
|
@ -132,7 +132,7 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
console.log('Resume updated:', result);
|
console.log('Resume updated:', result);
|
||||||
const updatedResume = {
|
const updatedResume = {
|
||||||
...activeResume,
|
...activeResume,
|
||||||
...result
|
...result,
|
||||||
};
|
};
|
||||||
setActiveResume(updatedResume);
|
setActiveResume(updatedResume);
|
||||||
setSnack('Resume updated successfully.');
|
setSnack('Resume updated successfully.');
|
||||||
@ -491,12 +491,38 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
height: '100%',
|
height: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box sx={{ display: 'flex', flexDirection: 'row', height: '100%', gap: 1, pt: 1, width: '100%', position: 'relative', overflow: 'hidden' }}>
|
<Box
|
||||||
<Paper sx={{ p: 1, flex: 1, display: 'flex', flexDirection: 'column', position: 'relative', maxWidth: "100%", height: '100%', overflow: 'hidden' }}>
|
sx={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
height: '100%',
|
||||||
|
gap: 1,
|
||||||
|
pt: 1,
|
||||||
|
width: '100%',
|
||||||
|
position: 'relative',
|
||||||
|
overflow: 'hidden',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Paper
|
||||||
|
sx={{
|
||||||
|
p: 1,
|
||||||
|
flex: 1,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
position: 'relative',
|
||||||
|
maxWidth: '100%',
|
||||||
|
height: '100%',
|
||||||
|
overflow: 'hidden',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Tabs value={tabValue} onChange={handleTabChange} centered>
|
<Tabs value={tabValue} onChange={handleTabChange} centered>
|
||||||
<Tab value="markdown" icon={<EditDocumentIcon />} label="Markdown" />
|
<Tab value="markdown" icon={<EditDocumentIcon />} label="Markdown" />
|
||||||
{activeResume.systemPrompt && <Tab value="systemPrompt" icon={<TuneIcon />} label="System Prompt" />}
|
{activeResume.systemPrompt && (
|
||||||
{activeResume.systemPrompt && <Tab value="prompt" icon={<InputIcon />} label="Prompt" />}
|
<Tab value="systemPrompt" icon={<TuneIcon />} label="System Prompt" />
|
||||||
|
)}
|
||||||
|
{activeResume.systemPrompt && (
|
||||||
|
<Tab value="prompt" icon={<InputIcon />} label="Prompt" />
|
||||||
|
)}
|
||||||
<Tab value="preview" icon={<PreviewIcon />} label="Preview" />
|
<Tab value="preview" icon={<PreviewIcon />} label="Preview" />
|
||||||
<Tab value="print" icon={<PrintIcon />} label="Print" />
|
<Tab value="print" icon={<PrintIcon />} label="Print" />
|
||||||
<Tab value="regenerate" icon={<ModelTraining />} label="Regenerate" />
|
<Tab value="regenerate" icon={<ModelTraining />} label="Regenerate" />
|
||||||
@ -532,7 +558,7 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
onChange={value => setEditContent(value)}
|
onChange={value => setEditContent(value)}
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
maxHeight: "100%",
|
maxHeight: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -551,7 +577,7 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
onChange={value => setEditSystemPrompt(value)}
|
onChange={value => setEditSystemPrompt(value)}
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
maxHeight: "100%",
|
maxHeight: '100%',
|
||||||
// height: '100%',
|
// height: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -569,7 +595,7 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
onChange={value => setEditPrompt(value)}
|
onChange={value => setEditPrompt(value)}
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
maxHeight: "100%",
|
maxHeight: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -602,11 +628,35 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
|
|||||||
)}
|
)}
|
||||||
</Scrollable>
|
</Scrollable>
|
||||||
</Paper>
|
</Paper>
|
||||||
<Scrollable sx={{ flex: 1, display: 'flex', height: '100%', overflowY: 'auto', position: 'relative' }}>
|
<Scrollable
|
||||||
<Paper sx={{ p: 1, flex: 1, display: 'flex', flexDirection: 'column', position: 'relative', backgroundColor: "#f8f0e0" }}>
|
sx={{
|
||||||
{activeResume.job !== undefined && <JobInfo variant={"all"} job={activeResume.job} sx={{
|
flex: 1,
|
||||||
mt: 2, backgroundColor: "#f8f0e0", //theme.palette.background.paper,
|
display: 'flex',
|
||||||
}} />}
|
height: '100%',
|
||||||
|
overflowY: 'auto',
|
||||||
|
position: 'relative',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Paper
|
||||||
|
sx={{
|
||||||
|
p: 1,
|
||||||
|
flex: 1,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
position: 'relative',
|
||||||
|
backgroundColor: '#f8f0e0',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{activeResume.job !== undefined && (
|
||||||
|
<JobInfo
|
||||||
|
variant={'all'}
|
||||||
|
job={activeResume.job}
|
||||||
|
sx={{
|
||||||
|
mt: 2,
|
||||||
|
backgroundColor: '#f8f0e0', //theme.palette.background.paper,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Paper>
|
</Paper>
|
||||||
</Scrollable>
|
</Scrollable>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -203,14 +203,16 @@ export const navigationConfig: NavigationConfig = {
|
|||||||
label: 'Jobs Table',
|
label: 'Jobs Table',
|
||||||
path: '/candidate/jobs-table/:jobId?',
|
path: '/candidate/jobs-table/:jobId?',
|
||||||
icon: <WorkIcon />,
|
icon: <WorkIcon />,
|
||||||
component: <JobsTable
|
component: (
|
||||||
|
<JobsTable
|
||||||
onJobSelect={(selectedJobs: Types.Job[]) => console.log('Selected:', selectedJobs)}
|
onJobSelect={(selectedJobs: Types.Job[]) => console.log('Selected:', selectedJobs)}
|
||||||
onJobView={(job: Types.Job) => console.log('View job:', job)}
|
onJobView={(job: Types.Job) => console.log('View job:', job)}
|
||||||
onJobEdit={(job: Types.Job) => console.log('Edit job:', job)}
|
onJobEdit={(job: Types.Job) => console.log('Edit job:', job)}
|
||||||
onJobDelete={(job: Types.Job) => console.log('Delete job:', job)}
|
onJobDelete={(job: Types.Job) => console.log('Delete job:', job)}
|
||||||
selectable={true}
|
selectable={true}
|
||||||
showActions={true}
|
showActions={true}
|
||||||
/>,
|
/>
|
||||||
|
),
|
||||||
userTypes: ['candidate', 'guest', 'employer'],
|
userTypes: ['candidate', 'guest', 'employer'],
|
||||||
showInNavigation: false,
|
showInNavigation: false,
|
||||||
showInUserMenu: true,
|
showInUserMenu: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user