Skip to content

Commit 99e27bd

Browse files
committed
fix: Fixed build errors
1 parent 50aedc2 commit 99e27bd

File tree

7 files changed

+5
-19
lines changed

7 files changed

+5
-19
lines changed

tasky/src/response/solution.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ pub struct ListSolutionResponse {
3636
pub submitter: User,
3737
pub approval_status: Option<String>,
3838
pub assignment: MinifiedAssignmentResponse,
39-
pub job: Option<Job>,
4039
}
4140

4241
/// Vec of solutions
@@ -62,21 +61,11 @@ impl Enrich<Solution> for ListSolutionResponse {
6261
let assignment_response =
6362
MinifiedAssignmentResponse::enrich(&assignment, client, db_conn).await?;
6463

65-
let mut job = None;
66-
67-
if assignment.language != AssignmentLanguage::QuestionBased {
68-
job = match from.job_id.as_ref() {
69-
Some(id) => Some(get_job(id).await?),
70-
None => None,
71-
};
72-
}
73-
7464
Ok(ListSolutionResponse {
7565
id: from.id,
7666
submitter: submitter.into_inner().into(),
7767
approval_status: from.approval_status.clone(),
7868
assignment: assignment_response,
79-
job,
8069
})
8170
}
8271
}

web/app/report-bug/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import useApiServiceClient from "@/hooks/useApiServiceClient";
33
import {Container, Stack, Textarea, TextInput, Title, Button} from "@mantine/core";
44
import {useForm} from "@mantine/form";
5-
import {GenericMessage} from "@/service/ApiService";
65
import {showNotification} from "@mantine/notifications";
76

87

web/app/solutions/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const PersonalSolutionsPage = () => {
3131
{
3232
field: "approval_status",
3333
label: "Approval Status",
34-
render: (value, row) => (
35-
<SolutionBadge status={value as string} job={row.job} />
34+
render: (value) => (
35+
<SolutionBadge status={value as string} />
3636
),
3737
},
3838
];

web/components/assignments/AssignmentSolutionsTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const AssignmentSolutionsTab = ({
3636
{
3737
field: "approval_status",
3838
label: "Approval Status",
39-
render: (value, row) => (
40-
<SolutionBadge status={value as string} job={row.job} />
39+
render: (value) => (
40+
<SolutionBadge status={value as string} />
4141
),
4242
},
4343
];

web/components/solution/CommentTab.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import useApiServiceClient from "@/hooks/useApiServiceClient";
22
import useClientQuery from "@/hooks/useClientQuery";
33
import { Solution } from "@/service/types/tasky";
44
import {Badge, Button, Card, Group, Stack, Title} from "@mantine/core";
5-
import AssignmentDateDisplay from "@/components/assignments/AssignmentDateDisplay";
65
import RichTextDisplay from "@/components/display/RichTextDisplay";
76
import useCurrentUser from "@/hooks/useCurrentUser";
87
import {IconPlus} from "@tabler/icons-react";

web/components/solution/SolutionBadge.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Badge } from "@mantine/core";
2-
import { Job } from "@/service/types/tasky";
32

43
interface SolutionBadgeProps {
54
status: string | null;

web/service/types/tasky.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export interface Solution {
104104
}
105105

106106
export interface SolutionsResponse {
107-
solutions: Solution[];
107+
solutions: Omit<Solution, 'job'>[];
108108
}
109109

110110
export interface SolutionFilesResponse {

0 commit comments

Comments
 (0)