Skip to content

Commit d45c0c3

Browse files
committed
updated api docs, trainee/db schema(s) cli/ser, tested using postman, added new mentors section to education tab, also tested for editing
1 parent 2167e5a commit d45c0c3

File tree

10 files changed

+763
-474
lines changed

10 files changed

+763
-474
lines changed

client/package-lock.json

Lines changed: 604 additions & 350 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/education/EducationInfo.tsx

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, FormControl, InputLabel, MenuItem, Select, TextField } from '@mui/material';
1+
import { Box, FormControl, InputLabel, MenuItem, Select, TextField, Typography } from '@mui/material';
22
import { LearningStatus, QuitReason, Trainee } from '../../models';
33
import { createSelectChangeHandler, createTextChangeHandler } from '../../helpers/formHelper';
44

@@ -184,6 +184,56 @@ export const EducationInfo = () => {
184184
/>
185185
</FormControl>
186186
</div>
187+
<div style={{ width: '100%' }}>
188+
<Typography variant="h6" color="black" padding="16px">
189+
Mentors
190+
</Typography>
191+
192+
{/* Technical mentor */}
193+
<FormControl sx={{ mx: 2, my: 1, width: '20ch', gap: '2rem' }}>
194+
<TextField
195+
id="techMentor"
196+
name="techMentor"
197+
label="Technical Mentor"
198+
type="text"
199+
value={editedFields?.techMentor ?? ''}
200+
InputProps={{ readOnly: isEditing ? false : true }}
201+
InputLabelProps={{ shrink: true }}
202+
variant={isEditing ? 'outlined' : 'standard'}
203+
onChange={handleTextChange}
204+
/>
205+
</FormControl>
206+
207+
{/* HR Mentor */}
208+
<FormControl sx={{ mx: 2, my: 1, width: '11ch', gap: '2rem' }}>
209+
<TextField
210+
id="hrMentor"
211+
name="hrMentor"
212+
label="HR Mentor"
213+
type="text"
214+
value={editedFields?.hrMentor ?? ''}
215+
InputProps={{ readOnly: isEditing ? false : true }}
216+
InputLabelProps={{ shrink: true }}
217+
variant={isEditing ? 'outlined' : 'standard'}
218+
onChange={handleTextChange}
219+
/>
220+
</FormControl>
221+
222+
{/* English mentor */}
223+
<FormControl sx={{ mx: 2, my: 1, width: '20ch', gap: '2rem' }}>
224+
<TextField
225+
id="engMentor"
226+
name="engMentor"
227+
label="English Mentor"
228+
type="text"
229+
value={editedFields?.engMentor ?? ''}
230+
InputProps={{ readOnly: isEditing ? false : true }}
231+
InputLabelProps={{ shrink: true }}
232+
variant={isEditing ? 'outlined' : 'standard'}
233+
onChange={handleTextChange}
234+
/>
235+
</FormControl>
236+
</div>
187237
<Box display="flex" gap={2} style={{ width: '100%' }}>
188238
<StrikesComponent />
189239
<TestsComponent />

client/src/models/Trainee.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ export interface TraineeEducationInfo {
153153
startCohort: number;
154154
currentCohort?: number;
155155
learningStatus: LearningStatus;
156+
techMentor?: string;
157+
hrMentor?: string;
158+
engMentor?: string;
156159
startDate?: Date;
157160
graduationDate?: Date;
158161
quitReason?: QuitReason;

server/api.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,15 +1424,12 @@ components:
14241424
maximum: 999
14251425
learningStatus:
14261426
$ref: '#/components/schemas/LearningStatus'
1427-
mentors:
1428-
type: object
1429-
properties:
1430-
technical:
1431-
type: string
1432-
hr:
1433-
type: string
1434-
english:
1435-
type: string
1427+
techMentor:
1428+
type: string
1429+
hrMentor:
1430+
type: string
1431+
engMentor:
1432+
type: string
14361433
startDate:
14371434
type: string
14381435
format: date-time

0 commit comments

Comments
 (0)