Skip to content

Commit

Permalink
fix: treat exchange button with wronge course id
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Feb 5, 2025
1 parent 145ea41 commit a910b63
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type Major = {

export type CourseInfo = {
id: number,
course: number,
course_unit_year: number,
course_unit_id: number,
ects: number,
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/requests/cards/PersonExchanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const PersonExchanges = ({
nmec={participant_nmec}
courseUnitId={exchanges.map(exchange => Number(exchange.course_unit_id))[0]}
variant="secondary"
courseId={exchanges[0].course_info.id}
courseId={exchanges[0].course_info.course}
/>
}
<AdminSendEmail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const SingleStudentExchangeCard = ({
requestId={exchange.id}
courseUnitId={exchange.options.map(option => option.course_unit.id)}
setExchange={setExchangeState}
courseId={exchange.options[0].course_unit.id}
courseId={exchange.options[0].course_unit.course}
/>
}
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const StudentEnrollmentCard = ({
requestId={enrollment.id}
courseUnitId={enrollment.options.map(option => option.course_unit.id)}
setExchange={setEnrollmentState}
courseId={enrollment.options[0].course_unit.id}
courseId={enrollment.options[0].course_unit.course}
/>
}
</CardContent>
Expand Down

0 comments on commit a910b63

Please sign in to comment.