diff --git a/tasky/src/response/solution.rs b/tasky/src/response/solution.rs index 44b7ad94..3e6f6508 100644 --- a/tasky/src/response/solution.rs +++ b/tasky/src/response/solution.rs @@ -36,7 +36,6 @@ pub struct ListSolutionResponse { pub submitter: User, pub approval_status: Option, pub assignment: MinifiedAssignmentResponse, - pub job: Option, } /// Vec of solutions @@ -62,21 +61,11 @@ impl Enrich for ListSolutionResponse { let assignment_response = MinifiedAssignmentResponse::enrich(&assignment, client, db_conn).await?; - let mut job = None; - - if assignment.language != AssignmentLanguage::QuestionBased { - job = match from.job_id.as_ref() { - Some(id) => Some(get_job(id).await?), - None => None, - }; - } - Ok(ListSolutionResponse { id: from.id, submitter: submitter.into_inner().into(), approval_status: from.approval_status.clone(), assignment: assignment_response, - job, }) } } diff --git a/web/app/report-bug/page.tsx b/web/app/report-bug/page.tsx index 23afe068..97b35b39 100644 --- a/web/app/report-bug/page.tsx +++ b/web/app/report-bug/page.tsx @@ -2,7 +2,6 @@ import useApiServiceClient from "@/hooks/useApiServiceClient"; import {Container, Stack, Textarea, TextInput, Title, Button} from "@mantine/core"; import {useForm} from "@mantine/form"; -import {GenericMessage} from "@/service/ApiService"; import {showNotification} from "@mantine/notifications"; diff --git a/web/app/solutions/page.tsx b/web/app/solutions/page.tsx index 22e82742..2ff756d3 100644 --- a/web/app/solutions/page.tsx +++ b/web/app/solutions/page.tsx @@ -31,8 +31,8 @@ const PersonalSolutionsPage = () => { { field: "approval_status", label: "Approval Status", - render: (value, row) => ( - + render: (value) => ( + ), }, ]; diff --git a/web/components/assignments/AssignmentSolutionsTab.tsx b/web/components/assignments/AssignmentSolutionsTab.tsx index bf3ff853..70dff37b 100644 --- a/web/components/assignments/AssignmentSolutionsTab.tsx +++ b/web/components/assignments/AssignmentSolutionsTab.tsx @@ -36,8 +36,8 @@ const AssignmentSolutionsTab = ({ { field: "approval_status", label: "Approval Status", - render: (value, row) => ( - + render: (value) => ( + ), }, ]; diff --git a/web/components/solution/CommentTab.tsx b/web/components/solution/CommentTab.tsx index 8f4b6ad2..cd995a51 100644 --- a/web/components/solution/CommentTab.tsx +++ b/web/components/solution/CommentTab.tsx @@ -2,7 +2,6 @@ import useApiServiceClient from "@/hooks/useApiServiceClient"; import useClientQuery from "@/hooks/useClientQuery"; import { Solution } from "@/service/types/tasky"; import {Badge, Button, Card, Group, Stack, Title} from "@mantine/core"; -import AssignmentDateDisplay from "@/components/assignments/AssignmentDateDisplay"; import RichTextDisplay from "@/components/display/RichTextDisplay"; import useCurrentUser from "@/hooks/useCurrentUser"; import {IconPlus} from "@tabler/icons-react"; diff --git a/web/components/solution/SolutionBadge.tsx b/web/components/solution/SolutionBadge.tsx index fb438269..0948f670 100644 --- a/web/components/solution/SolutionBadge.tsx +++ b/web/components/solution/SolutionBadge.tsx @@ -1,5 +1,4 @@ import { Badge } from "@mantine/core"; -import { Job } from "@/service/types/tasky"; interface SolutionBadgeProps { status: string | null; diff --git a/web/service/types/tasky.ts b/web/service/types/tasky.ts index ab4ae999..6338cd91 100644 --- a/web/service/types/tasky.ts +++ b/web/service/types/tasky.ts @@ -104,7 +104,7 @@ export interface Solution { } export interface SolutionsResponse { - solutions: Solution[]; + solutions: Omit[]; } export interface SolutionFilesResponse {