diff --git a/src/components/admin/requests/AdminPreviewSchedule.tsx b/src/components/admin/requests/AdminPreviewSchedule.tsx index 37266e9e..8797fd03 100644 --- a/src/components/admin/requests/AdminPreviewSchedule.tsx +++ b/src/components/admin/requests/AdminPreviewSchedule.tsx @@ -42,7 +42,7 @@ export const AdminPreviewSchedule = ({ Prever horĂ¡rio classDescriptor.classInfo && classDescriptor.courseInfo), + originalExchangeSchedule: originalSchedule?.filter((classDescriptor) => classDescriptor.classInfo && classDescriptor.courseInfo), exchangeSchedule: schedule, setExchangeSchedule: setSchedule, enrolledCourseUnits: [], diff --git a/src/components/admin/requests/cards/SingleStudentExchangeCard.tsx b/src/components/admin/requests/cards/SingleStudentExchangeCard.tsx index 21524672..5aa20d60 100644 --- a/src/components/admin/requests/cards/SingleStudentExchangeCard.tsx +++ b/src/components/admin/requests/cards/SingleStudentExchangeCard.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { ClassDescriptor, UrgentRequest, UrgentRequestOption } from "../../../../@types" +import { ClassDescriptor, UrgentRequest } from "../../../../@types" import { Card, CardContent, CardHeader, CardTitle } from "../../../ui/card"; import { Button } from "../../../ui/button"; import { ArrowRightIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"; @@ -38,7 +38,7 @@ export const SingleStudentExchangeCard = ({ - @@ -61,7 +61,7 @@ export const SingleStudentExchangeCard = ({ - {open && exchange.options.map((option: UrgentRequestOption) => ( + {open &&
@@ -70,14 +70,17 @@ export const SingleStudentExchangeCard = ({ key={crypto.randomUUID()} className="flex flex-col gap-y-2 items-center border-gray-200 border-2 rounded-md p-2 px-4" > -
-

{option.course_unit.acronym}

-
-

{option.class_user_goes_from.name}

- -

{option.class_user_goes_to.name}

+ <>{exchange.options.map((option) => ( +
+

{option.course_unit.acronym}

+
+

{option.class_user_goes_from.name}

+ +

{option.class_user_goes_to.name}

+
-
+ ))} +
@@ -101,12 +104,12 @@ export const SingleStudentExchangeCard = ({

{exchange.message}

- ))} + }
{open && ({ participant_nmec: exchange.user_nmec, @@ -119,7 +122,7 @@ export const SingleStudentExchangeCard = ({ requestId={exchange.id} setExchange={setExchangeState} courseId={exchange.options.map(option => option.course_unit.course)} - /> + /> }