Skip to content

Commit

Permalink
Merge pull request #168 from GDSC-Hongik/feat/assignment-repo-submit
Browse files Browse the repository at this point in the history
[Feature] 과제를 제출한 이후에도 레포지토리 수정 가능하도록 반영
  • Loading branch information
SeieunYoo authored Jan 5, 2025
2 parents 45c13e9 + 2281b03 commit a60e5c3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
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

0 comments on commit a60e5c3

Please sign in to comment.