Skip to content

Commit

Permalink
Merge pull request #65 from DSM-Repo/refactor
Browse files Browse the repository at this point in the history
fix: 버그 픽스
  • Loading branch information
six-standard authored Sep 9, 2024
2 parents f3de239 + eca7ff7 commit 4ce00ac
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 54 deletions.
11 changes: 0 additions & 11 deletions packages/main/src/Pages/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { SlideSection } from "./SlideSection";
import { Modal } from "./Modal";
import { LogoFull } from "@/assets";
import { Button } from "./Button";
import { useAuth } from "@configs/util";

export const Landing = () => {
const [open, setOpen] = useState(false);
Expand All @@ -22,16 +21,6 @@ export const Landing = () => {
};
}, [setOpen]);

// const { getRole } = useAuth();
// useEffect(() => {
// const role = getRole();
// if (role === "student") {
// window.location.replace(process.env.VITE_APP_URL_STUDENT as string);
// } else if (role === "teacher") {
// window.location.replace(process.env.VITE_APP_URL_TEACHER as string);
// }
// }, []);

return (
<div className="relative col-flex items-center">
<div className="absolute w-full h-[421px] -z-10 bg-gradient-to-b from-[#000000] to-[#00000000] " />
Expand Down
3 changes: 3 additions & 0 deletions packages/student/src/pages/Write/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Preview } from "./Preview";
import {
completion,
confirm,
currentInfo,
feedback,
resumeData,
submit,
Expand Down Expand Up @@ -39,6 +40,7 @@ export const Write = () => {
const { refetch: refetchResume } = resumeData();
const { data: complete, refetch: refetchCompl } = completion();
const { mutate } = confirm();
const { refetch: refetchStudent } = currentInfo();
const { mutate: submitResume } = submit();
const { mutate: saveResume } = update();
const idNum = Number(id);
Expand Down Expand Up @@ -73,6 +75,7 @@ export const Write = () => {
onSuccess: () => {
toast.success("성공적으로 저장되었습니다");
refetchCompl();
refetchStudent();
}
}),
disabled: resume.status !== "ONGOING",
Expand Down
93 changes: 50 additions & 43 deletions packages/teacher/src/page/Resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,51 +107,58 @@ export const Resume = () => {
content: (
<div className="col-flex gap-2">
{feedbacks?.data.length !== 0 ? (
feedbacks?.data.map((i) => (
<div className="col-flex gap-1">
<TextArea
onChange={() => {}}
placeholder=""
size="full"
value={i.comment}
disabled
/>
<div className="w-full flex items-center justify-between">
<span className="text-[16px] text-light text-green-400">
{i.status === "CONFIRMED" ? "반영된 피드백" : ""}
</span>
<div className="flex gap-2 items-center">
{i.status === "CONFIRMED" ? (
<>
<span
className="text-[15px] cursor-pointer"
onClick={() =>
confirm(`?id=${i.id}`, { onSuccess })
}
>
수락
</span>
<span
className="text-[15px] cursor-pointer"
onClick={() =>
reject(`?id=${i.id}`, { onSuccess })
}
>
거절
</span>
</>
) : (
<span
className="text-[15px] cursor-pointer"
onClick={() => del(`/${i.id}`, { onSuccess })}
>
삭제
feedbacks?.data.map(
(i) =>
!i.rejected && (
<div className="col-flex gap-1">
<TextArea
onChange={() => {}}
placeholder=""
size="full"
value={i.comment}
disabled
/>
<div className="w-full flex items-center justify-between">
<span className="text-[16px] text-light text-green-400">
{i.status === "CONFIRMED"
? "반영된 피드백"
: ""}
</span>
)}
<div className="flex gap-2 items-center">
{i.status === "CONFIRMED" ? (
<>
<span
className="text-[15px] cursor-pointer"
onClick={() =>
confirm(`?id=${i.id}`, { onSuccess })
}
>
수락
</span>
<span
className="text-[15px] cursor-pointer"
onClick={() =>
reject(`?id=${i.id}`, { onSuccess })
}
>
거절
</span>
</>
) : (
<span
className="text-[15px] cursor-pointer"
onClick={() =>
del(`/${i.id}`, { onSuccess })
}
>
삭제
</span>
)}
</div>
</div>
</div>
</div>
</div>
))
)
)
) : (
<span className="text-[14px]">
아직 피드백이 없습니다
Expand Down

0 comments on commit 4ce00ac

Please sign in to comment.