Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 과제를 제출한 이후에도 레포지토리 수정 가능하도록 반영 #168

Merged
merged 4 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const SecondaryButton = ({
const { year, month, day, hours, minutes } = parseISODate(
committedAt as string
);
const commitText = `최종 수정일자 ${year}년 ${month}월 ${day}일 ${padWithZero(hours)}:${padWithZero(minutes)}`;
const commitText = `최종 수정 일시 : ${year}년 ${month}월 ${day}일 ${padWithZero(hours)}:${padWithZero(minutes)}`;

return (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const AssignmentOverviewBox = async ({
target="_blank"
text="과제 명세 확인"
/>
<Space height={8} />
<AssignmentBoxInfo
assignment={assignment}
repositoryLink={repositoryLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ interface RepositorySubmissionBoxProps {
repositoryLink: string;
}

const repositoryInfoMessage = "과제 제출 후에도 레포지토리 수정이 가능해요.";

export const RepositorySubmissionBox = ({
repositoryLink: initialRepositoryUrl,
}: RepositorySubmissionBoxProps) => {
Expand Down Expand Up @@ -124,9 +126,7 @@ export const RepositorySubmissionBox = ({
<>
{repositorySubmissionStatus === "SUBMITTED" && (
<>
<Text color="sub">
최초 과제 제출 전 까지만 수정이 가능해요.
</Text>
<Text color="sub">{repositoryInfoMessage}</Text>
<Space height={26} />
<Flex className={urlBoxStyle}>
<div className={overflowTextStyle}>{repositoryUrl}</div>
Expand Down Expand Up @@ -184,7 +184,7 @@ export const RepositorySubmissionBox = ({
<Flex alignItems="center" direction="column" width="21rem">
<Text typo="h1">레포지토리를 입력하시겠어요?</Text>
<Space height={12} />
<Text color="sub">최초 과제 제출 전까지 수정이 가능해요.</Text>
<Text color="sub">{repositoryInfoMessage}</Text>
<Space height={8} />
<div className={modalUrlBoxStyle}>{repositoryUrl}</div>
<Space height={28} />
Expand Down Expand Up @@ -219,9 +219,6 @@ const modalUrlBoxStyle = css({
paddingX: "lg",
paddingY: "sm",
textStyle: "h2",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
width: "375px",
});
const boxStyle = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,24 @@ export const AssignmentContent = async () => {
);
}

const isAnyFirstWeekAssignment = studyDashboard.submittableAssignments.some(
({ week }) => week === 1
);
return (
<section>
<Flex className={boxContainerStyle} gap="lg">
{studyDashboard.isLinkEditable && (
<RepositorySubmissionBox
<Flex
className={boxContainerStyle}
flexDirection={isAnyFirstWeekAssignment ? "row-reverse" : "row"}
gap="lg"
>
<Flex flexDirection="row" gap="lg">
<AssignmentOverviewBox
assignments={studyDashboard.submittableAssignments}
buttonsDisabled={!studyDashboard.repositoryLink}
repositoryLink={studyDashboard.repositoryLink}
/>
)}
<AssignmentOverviewBox
assignments={studyDashboard.submittableAssignments}
buttonsDisabled={!studyDashboard.repositoryLink}
</Flex>
<RepositorySubmissionBox
repositoryLink={studyDashboard.repositoryLink}
/>
</Flex>
Expand Down
Loading