diff --git a/src/components/exchange/requests/issue/cards/CreateRequestCard.tsx b/src/components/exchange/requests/issue/cards/CreateRequestCard.tsx index 6ce9c1ac..e50bf27f 100644 --- a/src/components/exchange/requests/issue/cards/CreateRequestCard.tsx +++ b/src/components/exchange/requests/issue/cards/CreateRequestCard.tsx @@ -148,7 +148,7 @@ export const CreateRequestCard = ({

Estudante

diff --git a/src/components/exchange/requests/view/cards/CommonCardHeader.tsx b/src/components/exchange/requests/view/cards/CommonCardHeader.tsx index 49a3a73c..981a5334 100644 --- a/src/components/exchange/requests/view/cards/CommonCardHeader.tsx +++ b/src/components/exchange/requests/view/cards/CommonCardHeader.tsx @@ -1,7 +1,7 @@ import { ArchiveBoxIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/outline" import { Hourglass } from "lucide-react" import { useState } from "react" -import { MarketplaceRequest } from "../../../../../@types" +import { DirectExchangeRequest, MarketplaceRequest } from "../../../../../@types" import { Button } from "../../../../ui/button" import { CardDescription, CardHeader, CardTitle } from "../../../../ui/card" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../../ui/tooltip" @@ -11,7 +11,7 @@ type Props = { name: string username: string hovered: boolean - request: MarketplaceRequest + request: MarketplaceRequest | DirectExchangeRequest openHook: [boolean, React.Dispatch>] showRequestStatus?: boolean hideAbility?: boolean diff --git a/src/components/exchange/requests/view/cards/ListRequestChanges.tsx b/src/components/exchange/requests/view/cards/ListRequestChanges.tsx index ce0ea3d9..6ab52c04 100644 --- a/src/components/exchange/requests/view/cards/ListRequestChanges.tsx +++ b/src/components/exchange/requests/view/cards/ListRequestChanges.tsx @@ -51,9 +51,9 @@ export const ListRequestChanges = ({ {option.course_info.acronym} - {option.course_info.name}

-

{type === "directexchange" ? option.class_participant_goes_from.name : option.class_issuer_goes_from.name}

+

{type === "directexchange" ? (option as DirectExchangeParticipant).class_participant_goes_from.name : (option as ExchangeOption).class_issuer_goes_from.name}

-

{type === "directexchange" ? option.class_participant_goes_to.name : option.class_issuer_goes_to.name}

+

{type === "directexchange" ? (option as DirectExchangeParticipant).class_participant_goes_to.name : (option as ExchangeOption).class_issuer_goes_to.name}

diff --git a/src/components/exchange/requests/view/cards/RequestCard.tsx b/src/components/exchange/requests/view/cards/RequestCard.tsx index 7cc86bdb..42638116 100644 --- a/src/components/exchange/requests/view/cards/RequestCard.tsx +++ b/src/components/exchange/requests/view/cards/RequestCard.tsx @@ -8,6 +8,7 @@ import { ListRequestChanges } from "./ListRequestChanges"; import ExchangeRequestCommonContext from "../../../../../contexts/ExchangeRequestCommonContext"; import { CommonCardHeader } from "./CommonCardHeader"; import ConflictsContext from "../../../../../contexts/ConflictsContext"; +import { ExchangeOption } from "../../../../../@types"; export const RequestCard = ({ }) => { const { @@ -48,8 +49,8 @@ export const RequestCard = ({ }) => { { courseUnitId: option.course_info.id, courseUnitName: option.course_info.name, - classNameRequesterGoesFrom: option.class_issuer_goes_from.name, - classNameRequesterGoesTo: option.class_issuer_goes_to.name, + classNameRequesterGoesFrom: (option as ExchangeOption).class_issuer_goes_from.name, + classNameRequesterGoesTo: (option as ExchangeOption).class_issuer_goes_to.name, other_student: { name: request.issuer_name, mecNumber: request.issuer_nmec