Skip to content

Commit

Permalink
Merge pull request #90 from Kusitms-29th-ASAP/docs/#89
Browse files Browse the repository at this point in the history
[Docs] 더미데이터 추가
  • Loading branch information
yyypearl authored May 23, 2024
2 parents fb1ba73 + 240f368 commit 9ef1b4a
Show file tree
Hide file tree
Showing 13 changed files with 332 additions and 99 deletions.
3 changes: 2 additions & 1 deletion src/app/mypage/document/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ const Document = () => {
{docsData.map((data) => (
<ListBox
key={data.id}
time={"제출 완료"}
time={"승인 요청"}
listboxType={"content"}
content1={data.content1}
content2={data.content2}
date={data.date}
color={"mint"}
onClick={() => handleListBoxClick(data)}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/app/news/eduOffice/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Axios from "@/apis/axios";
import Tabbar from "@/components/common/Tabbar";
import HomeGuide from "@/components/news/HomeGuide";
import Summary from "@/components/news/Summary";
import HomeGuideRemind from "@/components/school/home/HomeGuideRemind";
import { theme } from "@/styles/theme";
import Image from "next/image";
import { usePathname, useRouter } from "next/navigation";
Expand Down Expand Up @@ -69,7 +70,7 @@ const EduOffice = () => {
height={102}
alt="bell"
/>
<HomeGuide />
<HomeGuideRemind />
</Background>
{summaryData && <Summary dummyData={summaryData} />}
</Layout>
Expand Down
3 changes: 2 additions & 1 deletion src/app/news/school/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Axios from "@/apis/axios";
import Tabbar from "@/components/common/Tabbar";
import HomeGuide from "@/components/news/HomeGuide";
import Summary from "@/components/news/Summary";
import HomeGuideRemind from "@/components/school/home/HomeGuideRemind";
import { theme } from "@/styles/theme";
import Image from "next/image";
import { usePathname, useRouter } from "next/navigation";
Expand Down Expand Up @@ -70,7 +71,7 @@ const School = () => {
height={102}
alt="bell"
/>
<HomeGuide />
<HomeGuideRemind />
</Background>
{summaryData && <Summary dummyData={summaryData} />}
</Layout>
Expand Down
35 changes: 30 additions & 5 deletions src/components/common/ListBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface ListBoxProps {
style?: React.CSSProperties & { fontSize?: string };
content1?: string;
content2?: string;
date?: string;
value?: string;
checked?: boolean;
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
Expand All @@ -36,6 +37,7 @@ const ListBox = (props: ListBoxProps) => {
style,
content1,
content2,
date,
value,
checked,
onClick,
Expand Down Expand Up @@ -87,15 +89,26 @@ const ListBox = (props: ListBoxProps) => {
<Type className={listboxClassName}>
{listboxType === "none" && (
<>
<span style={{ fontSize: "14px", fontWeight: "700" }}>
D-{dday}
</span>
{dday > 0 ? (
<span style={{ fontSize: "14px", fontWeight: "700" }}>
D-{dday}
</span>
) : (
<span style={{ fontSize: "14px", fontWeight: "700" }}>
D+{-dday}
</span>
)}
<span style={{ fontSize: "12px", fontWeight: "500" }}>
{month} {day} ({futureWeekday}) 까지
</span>
</>
)}
{listboxType === "content" && <Content1>{content1}</Content1>}
{listboxType === "content" && (
<Row>
<Content1>{content1}</Content1>
<D>date</D>
</Row>
)}
{type}
{listboxType === "direct" && <DirectSpan>{time}</DirectSpan>}
</Type>
Expand Down Expand Up @@ -143,6 +156,7 @@ const StyledListBox = styled.div<ListBoxProps>`
&.content {
border: none;
cursor: pointer;
background: white;
&.mint {
border: none;
}
Expand All @@ -157,9 +171,20 @@ const Content = styled.div`
gap: 0px;
`;

const Row = styled.div`
display: flex;
gap: 8px;
align-items: center;
`;

const Content1 = styled.div`
${(props) => props.theme.fonts.body3_m};
color: ${theme.colors.b400};
color: ${theme.colors.b700};
`;

const D = styled.div`
${(props) => props.theme.fonts.caption1_m};
color: ${theme.colors.b600};
`;

const Content2 = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/school/SchoolHomeTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface SchoolHomeTopProps {

const SchoolHomeTop = (props: SchoolHomeTopProps) => {
const { title } = props;
const [schoolName, grade, classNum] = ["양원숲", 3, 1];
const [schoolName, grade, classNum] = ["양원숲", 3, 7];

return (
<Container>
Expand Down
6 changes: 3 additions & 3 deletions src/components/school/home/HomeGuideRemind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ const HomeGuideRemind = () => {
</TitleBox>
<ListBox
color="orange"
text="방과후학교 가정통신문 회신"
text="현장체험학습 실시 찬반의견 조사"
time="회신 필요"
dday={2}
/>
<ListBox
color="mint"
text="방과후학교 프로그램 신청서"
text="양원숲 토닥토닥 상담실 운영 안내 및 보호자 동의 안내"
time="제출 완료"
dday={5}
dday={-2}
/>
</WhiteBox>
);
Expand Down
10 changes: 5 additions & 5 deletions src/components/school/home/TimeTable/TimeTableBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import SubjectBox from "./SubjectBox";
import styled, { css } from "styled-components";

const subjectsData = [
{ id: 1, subject: ["국어", "과학", "미술", "미술", "수학"] },
{ id: 2, subject: ["수학", "국어", "도덕", "영어", "사회"] },
{ id: 3, subject: ["체육", "국어", "국어", "영어"] },
{ id: 4, subject: ["과학", "과학", "국어", "수학", "체육"] },
{ id: 5, subject: ["음악", "사회", "도덕", "계발"] },
{ id: 1, subject: ["영어", "수학", "체육", "사회", "국어"] },
{ id: 2, subject: ["사회", "사회", "영어", "체육", "과학", "국어"] },
{ id: 3, subject: ["도덕", "수학", "자율", "자율", "국어"] },
{ id: 4, subject: ["음악", "미술", "미술", "수학", "과학"] },
{ id: 5, subject: ["수학", "음악", "국어", "과학", "국어"] },
];

const TimeTableBox = () => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/school/weeklyStudy/WeeklyNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import WhiteBox from "../WhiteBox";
import { useState } from "react";

const WeeklyNotificationData = [
"목요일 체육시간에는 줄넘기 수행평가가 진행됩니다. 다양한 줄넘기를 잘 하는지 평가하기 때문에 가정에서 주말동안 연습시키는 것을 추천드립니다. \n\n금요일 음악시간에는 준비물로 리코더가 있습니다. 아이들이 리코더를 챙겨올 수 있도록 꼭 확인부탁드립니다. \n\n주말에 독후감 1편 쓰기가 숙제로 있습니다. 주말 독서를 할 수 있도록 지도해주시고, 책에 대한 내용을 정리해보고 글로 표현하는 연습을 할 수 있도록 챙겨주세요",
"1. 5/21 (화) 에는 ‘우리 고장 알기' 수업으로 해설사 초빙 수업이 있습니다.\n\n2. 안전한 등하교를 위해 자전거, 인라인 등을 타지 않으며, 수업 종료 후 곧바로 귀가해요.\n\n3. 하지 말아요 학교 폭력, 실천해요 친구사랑!\n\n4. 등하교길 어린이 교통사고 예방을 위한 보행안전 3원칙 기억하기\n: 서다 - 보다 - 걷다",
];

const WeeklyNotification = () => {
const [month, setMonth] = useState(4);
const [week, setWeek] = useState(2);
const [month, setMonth] = useState(5);
const [week, setWeek] = useState(4);

return (
<WhiteBox>
Expand Down
4 changes: 2 additions & 2 deletions src/components/study/review/ReviewTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useState } from "react";
import styled from "styled-components";

const ReviewTitle = () => {
const [month, setMonth] = useState(4);
const [week, setWeek] = useState(2);
const [month, setMonth] = useState(5);
const [week, setWeek] = useState(4);

return (
<ReviewText>
Expand Down
20 changes: 4 additions & 16 deletions src/data/mypageData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,27 @@ export const docsData: Docs[] = [
{
id: 1,
content1: "병결",
content2: "배가아프고 위와같은 이유로 저렇고 그렇고",
content2: "질병(독감)",
grade: "3학년",
class: "7반",
number: "2번",
name: "김동우",
reason: "감기몸살로 인해 질병결석을 했습니다.",
date: "2024.05.12",
date: "5월 17일 (금)",
guardian: "김규리",
},
{
id: 2,
content1: "경조사",
content2: "배가아프고 위와같은 이유로 저렇고 그렇고",
content2: "사촌 결혼",
grade: "4학년",
class: "2반",
number: "7번",
name: "오민지",
reason: "감기몸살",
date: "2024.05.12",
date: "4월 22일 (금)",
guardian: "유진주",
},
{
id: 2,
content1: "경조사",
content2: "배가아프고 위와같은 이유로 저렇고 그렇고",
grade: "6학년",
class: "2반",
number: "3번",
name: "심규민",
reason: "감기몸살",
date: "2024.05.12",
guardian: "윤소민",
},
];

export interface ChildrenList {
Expand Down
15 changes: 5 additions & 10 deletions src/data/newsData.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
export const todoHomeData = [
{
type: "4월 19일 (금) 까지",
text: "방과후 가정통신문 회신",
time: " 회신 필요",
type: "5월 27일 (월)까지",
text: "현장체험학습 실시 찬반의견 조사",
time: "회신 필요",
},
{
type: "4월 22일 (월)까지",
text: "방과후학교 프로그램 신청서",
time: "제출 완료",
},
{
type: "4월 22일 (월)까지",
text: "방과후학교 프로그램 신청서",
type: "5월 23일 (목)까지",
text: "양원숲 토닥토닥 상담실 운영 안내 및 보호자 동의 안내",
time: "제출 완료",
},
];
Expand Down
18 changes: 3 additions & 15 deletions src/data/notifyData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,13 @@ export const notiCardData = [
{
category: "가정통신문",
id: "notification",
date: "2024년 05월 17일",
text: "4월 21일, 오늘의 가정통신문 3건을 확인해보세요!",
date: "2024년 05월 24일",
text: "5월 24일, 오늘의 가정통신문 1건을 확인해보세요!",
},
{
category: "학습정보",
id: "study",
date: "2024년 05월 17일",
text: "이번주 업로드 된 학습정보를 살펴보세요!",
},
{
category: "학습정보",
id: "study",
date: "2024년 05월 07일",
text: "이번주 업로드 된 학습정보를 살펴보세요!",
},
{
category: "학습정보",
id: "study",
date: "2024년 05월 05일",
date: "2024년 05월 24일",
text: "이번주 업로드 된 학습정보를 살펴보세요!",
},
]
Loading

0 comments on commit 9ef1b4a

Please sign in to comment.