Skip to content

Commit

Permalink
Rename BenchmarkAssignmentModal to BenchmarkAssignment
Browse files Browse the repository at this point in the history
  • Loading branch information
canjalal committed Dec 19, 2024
1 parent 526bc66 commit 18ea301
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/backend/routers/iep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export const iep = router({
const result = await req.ctx.db
.selectFrom("benchmark")
.where("benchmark.benchmark_id", "=", benchmark_id)
.selectAll()
.selectAll() // add second query to get the tasks associated with benchmark
.execute();
return result;
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import $button from "@/components/design_system/button/Button.module.css";
import $benchmark from "./BenchmarkAssignmentModal.module.css";
import { ParaSelectionStep } from "@/components/benchmarks/ParaSelectionStep";

interface BenchmarkAssignmentModalProps {
interface BenchmarkAssignmentProps {
isOpen: boolean;
onClose: () => void;
benchmark_id: string;
Expand All @@ -26,9 +26,7 @@ interface BenchmarkAssignmentModalProps {
const STEPS = ["PARA_SELECTION", "DURATION_SELECTION"];
type Step = (typeof STEPS)[number];

export const BenchmarkAssignmentModal = (
props: BenchmarkAssignmentModalProps
) => {
export const BenchmarkAssignment = (props: BenchmarkAssignmentProps) => {
const [selectedParaIds, setSelectedParaIds] = useState<string[]>([]);
const nextButtonRef = useRef<HTMLButtonElement>(null);
const [assignmentDuration, setAssignmentDuration] =
Expand All @@ -38,7 +36,7 @@ export const BenchmarkAssignmentModal = (
const { data: myParas } = trpc.case_manager.getMyParas.useQuery();
const { data: benchmark } = trpc.iep.getBenchmark.useQuery({
benchmark_id: props.benchmark_id,
});
}); // maybe it should include assignments, or have a flag to include assignments

const [errorMessage, setErrorMessage] = useState<string>("");

Expand Down
4 changes: 2 additions & 2 deletions src/components/benchmarks/BenchmarkListElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Button from "@mui/material/Button";
import Divider from "@mui/material/Divider";
import ContentPasteIcon from "@mui/icons-material/ContentPaste";
import { useState, type ReactNode } from "react";
import { BenchmarkAssignmentModal } from "./BenchmarkAssignmentModal";
import { BenchmarkAssignment } from "./BenchmarkAssignment";
import $button from "@/components/design_system/button/Button.module.css";
import { format } from "date-fns";
import Typography from "@mui/material/Typography";
Expand Down Expand Up @@ -173,7 +173,7 @@ const BenchmarkListElement = ({ benchmark, index }: BenchmarkProps) => {
</Info>
</Box>
</Box>
<BenchmarkAssignmentModal
<BenchmarkAssignment
isOpen={isAssignmentModalOpen}
onClose={() => setIsAssignmentModalOpen(false)}
benchmark_id={benchmark.benchmark_id}
Expand Down

0 comments on commit 18ea301

Please sign in to comment.