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

마이스터 역량 인증제 페이지 퍼블리싱 #47

Merged
merged 29 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
69b3d4e
test(nextConfig): images domain 등록
Ubinquitous Aug 17, 2023
06b329d
chore(dependency): d3 라이브러리 추가
Ubinquitous Aug 17, 2023
828d10c
chore(typescript env): react d3 radar 정의
Ubinquitous Aug 17, 2023
d4ed40f
chore(dependency): d3 라이브러리 추가
Ubinquitous Aug 17, 2023
2afd2ff
feat(Meister): 마이스터 역량 인증제 페이지 퍼블리싱
Ubinquitous Aug 17, 2023
7e89216
chore(icon): 곡선 아이콘 추가
Ubinquitous Aug 17, 2023
8a18292
chore(icon): 레이더 차트 아이콘 추가
Ubinquitous Aug 17, 2023
0b6b90b
chore(icon): 바 차트 아이콘 추가
Ubinquitous Aug 17, 2023
47a2c3c
chore(icons): 기록 내역 구분자 아이콘 추가
Ubinquitous Aug 17, 2023
40b0dfa
chore(icons): 기록 내역 구분자 아이콘 추가
Ubinquitous Aug 17, 2023
461eb1b
chore(icon): 프로그레스바 아이콘 추가
Ubinquitous Aug 17, 2023
ac7fc1d
fix(components): console warn에 맞게 네이밍 수정
Ubinquitous Aug 17, 2023
20e1bce
chore(getStatusColor): 상태별 색깔 추출 helper 함수 추가
Ubinquitous Aug 17, 2023
78bf9c2
chore(getStatusColor): 상태별 색깔 추출 helper 함수 추가
Ubinquitous Aug 17, 2023
7501167
chore(hooks): useDate에서 user에 맞게 재학연도 구하는 로직 추가
Ubinquitous Aug 17, 2023
0447ca9
feat(LineChart): 라인 차트 구현
Ubinquitous Aug 17, 2023
0fbdec3
feat(LineChart): 스파이더 차트 구현
Ubinquitous Aug 17, 2023
b845f7f
feat(LineChart): 레이더 차트 구현
Ubinquitous Aug 17, 2023
9b74db0
feat(ProgressBar): 프로그레스바 구현
Ubinquitous Aug 17, 2023
cebeaa1
chore(CreditDemeritCard): 상벌점 내역 컴포넌트
Ubinquitous Aug 17, 2023
2ff3d3d
chore(Distribution): 레이더 차트 리턴하는 컴포넌트 추가
Ubinquitous Aug 17, 2023
2abf3a3
chore(HistoryCard): 마역량 기록 내역 컴포넌트 추가
Ubinquitous Aug 17, 2023
1501a94
chore(MeisterProfiileBox): 마역량 프로필 컴포넌트 추가
Ubinquitous Aug 17, 2023
621f00e
chore(StatusCard): 프로그레스바 카드 구현
Ubinquitous Aug 17, 2023
da2c1f4
chore(YearlyMeisterScore): 연도별 그래프 추가
Ubinquitous Aug 17, 2023
61b59a3
chore(color): green 추가
Ubinquitous Aug 17, 2023
eebe416
chore(flex): column 추가
Ubinquitous Aug 17, 2023
b2742a5
fix(lint): lint env 에러 픽스
Ubinquitous Aug 17, 2023
61ef3b6
fix(layouts): 반응형 수정
Ubinquitous Aug 19, 2023
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
14 changes: 7 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// images: {
// domains: [
// process.env.NEXT_PUBLIC_DOMAIN,
// process.env.NEXT_PUBLIC_TEST_DOMAIN,
// process.env.NEXT_PUBLIC_AUTH_DOMAIN,
// ],
// },
images: {
domains: [
process.env.NEXT_PUBLIC_DOMAIN,
process.env.NEXT_PUBLIC_TEST_DOMAIN,
process.env.NEXT_PUBLIC_AUTH_DOMAIN,
],
},
};

module.exports = nextConfig;
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@playwright/test": "^1.29.1",
"@tinymce/tinymce-react": "^4.3.0",
"@types/d3": "^7.4.0",
"@types/node": "18.16.19",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
Expand All @@ -20,6 +21,7 @@
"@typescript-eslint/eslint-plugin": "^5.43.0",
"axios": "^1.4.0",
"babel-plugin-styled-components": "^2.1.4",
"d3": "^7.8.5",
"dayjs": "^1.11.9",
"dotenv": "^16.3.1",
"eslint": "^8.26.0",
Expand All @@ -30,10 +32,14 @@
"next": "13.4.4",
"prettier": "^2.8.8",
"react": "18.2.0",
"react-circular-progressbar": "^2.1.0",
"react-cookie": "^4.1.1",
"react-d3-radar": "^1.0.0-rc6",
"react-dom": "18.2.0",
"react-query": "^3.39.3",
"react-slick": "^0.29.0",
"react-spinner": "^0.2.7",
"react-spinner-overlay": "^0.1.33",
"react-toastify": "^9.1.3",
"recoil": "^0.7.7",
"slick-carousel": "^1.8.1",
Expand Down
1 change: 1 addition & 0 deletions radar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "react-d3-radar";
9 changes: 9 additions & 0 deletions src/app/bamboo/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use client";

import BambooPage from "@/page/bamboo";

const Bamboo = () => {
return <BambooPage />;
};

export default Bamboo;
9 changes: 9 additions & 0 deletions src/app/meister/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use client";

import MeisterPage from "@/page/meister";

const Meister = () => {
return <MeisterPage />;
};

export default Meister;
53 changes: 53 additions & 0 deletions src/assets/icons/Curve.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from "react";

const Curve = () => {
return (
<svg
width="16"
height="16"
viewBox="0 0 45 45"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect
x="4.03516"
y="2.76147"
width="36.459"
height="37.7018"
fill="white"
/>
<mask
id="mask0_1173_192"
style={{ maskType: "luminance" }}
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="45"
height="45"
>
<path
d="M42.0527 2.76147H2.05273V42.7615H42.0527V2.76147Z"
fill="white"
stroke="white"
strokeWidth="4"
strokeLinejoin="round"
/>
<path
d="M36.0527 8.76147C30.0527 8.76147 25.0527 12.7615 22.0527 22.7615C19.0527 32.7615 14.0527 36.7615 8.05273 36.7615"
stroke="black"
strokeWidth="4"
strokeLinecap="round"
strokeLinejoin="round"
/>
</mask>
<g mask="url(#mask0_1173_192)">
<path
d="M-1.94727 -1.23853H46.0527V46.7615H-1.94727V-1.23853Z"
fill="#73AEE3"
/>
</g>
</svg>
);
};

export default Curve;
41 changes: 41 additions & 0 deletions src/assets/icons/DistributionIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";

const DistributionIcon = () => {
return (
<svg
width="27"
height="27"
viewBox="0 0 27 27"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.67309 15.2707L7.24222 7.09598L15.6228 7.09598L22.6184 13.0803L17.8311 19.1659L10.5349 22.0678L5.67309 15.2707Z"
fill="#F8EEE6"
fillOpacity="0.5"
stroke="#F3DAEC"
strokeWidth="2"
/>
<path
d="M4.94863 12.9523L10.1108 5.49777L20.522 9.26081L20.7492 12.7586L18.2199 20.6836L8.78822 20.2192L4.94863 12.9523Z"
fill="#C8D3F8"
fillOpacity="0.5"
stroke="#C0CCED"
strokeWidth="2"
/>
<path
d="M9.50133 9.24329L16.8744 5.45424L21.79 16.1046L17.8985 19.7912L12.5736 23.3755L5.40478 18.3576L9.50133 9.24329Z"
fill="#FEBC56"
fillOpacity="0.3"
/>
<path
d="M6.6561 18.0128L10.2699 9.97265L16.4036 6.8205L20.5813 15.8721L17.2711 19.0081L12.5846 22.1626L6.6561 18.0128Z"
stroke="#FEBC56"
strokeOpacity="0.4"
strokeWidth="2"
/>
</svg>
);
};

export default DistributionIcon;
39 changes: 39 additions & 0 deletions src/assets/icons/GraphIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";

const GraphIcon = () => {
return (
<svg
width="16"
height="17"
viewBox="0 0 16 17"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect
y="3.60583"
width="4.49887"
height="11.6513"
rx="2.24943"
fill="#FEBC56"
/>
<rect
x="5.76953"
y="8.15967"
width="4.49887"
height="7.09744"
rx="2.24943"
fill="#73AEE3"
/>
<rect
x="11.502"
y="0.241699"
width="4.49887"
height="15.0154"
rx="2.24943"
fill="#E54F5A"
/>
</svg>
);
};

export default GraphIcon;
26 changes: 26 additions & 0 deletions src/assets/icons/HistorySeparator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { color } from "@/styles";
import React from "react";

const HistorySeparator = () => {
return (
<svg
width="20"
height="14"
viewBox="0 0 15 8"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0 4C0 3.58579 0.335786 3.25 0.75 3.25H4.03125V4.75H0.75C0.335787 4.75 0 4.41421 0 4V4Z"
fill={color.content}
/>
<path
d="M10.002 3.25H13.2832C13.6974 3.25 14.0332 3.58579 14.0332 4V4C14.0332 4.41421 13.6974 4.75 13.2832 4.75H10.002V3.25Z"
fill={color.content}
/>
<circle cx="7" cy="4" r="3" stroke={color.content} strokeWidth={1.5} />
</svg>
);
};

export default HistorySeparator;
20 changes: 20 additions & 0 deletions src/assets/icons/ProgressIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";

const ProgressIcon = () => {
return (
<svg
width="18"
height="18"
viewBox="0 0 23 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22.4944 7.20692V19.2039C22.4866 19.3492 22.4446 19.4906 22.3718 19.6166C22.299 19.7426 22.1974 19.8496 22.0754 19.9289L21.6824 20.1639C19.7214 21.2989 17.9954 22.2979 16.2514 23.3039V10.3299L5.01844 3.83592C6.96244 2.71992 8.89944 1.59292 10.8454 0.481924C10.9752 0.416283 11.1185 0.38208 11.2639 0.38208C11.4093 0.38208 11.5527 0.416283 11.6824 0.481924L22.4924 6.72492V7.20692H22.4944ZM13.7534 11.7689C11.1895 10.2864 8.62479 8.80507 6.05944 7.32492C5.9294 7.26027 5.78616 7.22662 5.64094 7.22662C5.49572 7.22662 5.35247 7.26027 5.22244 7.32492C3.48944 8.32592 1.75544 9.32492 0.0234375 10.3289L8.13644 15.0129V24.3819C9.86844 23.3829 11.5964 22.3759 13.3334 21.3869C13.4551 21.3075 13.5565 21.2006 13.6292 21.0749C13.702 20.9491 13.7442 20.808 13.7524 20.6629L13.7534 11.7689ZM0.0244375 19.6989L5.63744 22.9399V16.4519L0.0244375 19.6989Z"
fill="#E54F5A"
/>
</svg>
);
};

export default ProgressIcon;
2 changes: 2 additions & 0 deletions src/assets/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ export { default as HoldingBackTears } from "./emojis/HoldingBackTears";
export { default as Kissing } from "./emojis/Kissing";
export { default as Laughing } from "./emojis/Laughing";
export { default as Relaxed } from "./emojis/Relaxed";
export { default as Curve } from "./Curve";
export { default as HistorySeparator } from "./HistorySeparator";
16 changes: 8 additions & 8 deletions src/components/atoms/ImageWithFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ const ImageWithFallback = ({
{...props}
src={imgSrc}
alt={alt}
isShouldHide={isShouldHide}
isshouldhide={isShouldHide}
onError={() => setImgSrc(fallbackSrc)}
sizes={size}
rounded={rounded}
isrounded={rounded}
/>
);
};

const StyledImage = styled(Image)<{
isShouldHide?: boolean;
rounded?: boolean;
isshouldhide?: boolean;
isrounded?: boolean;
}>`
height: auto;
${({ isShouldHide }) =>
isShouldHide &&
${({ isshouldhide }) =>
isshouldhide &&
css`
display: none;
`}
${({ rounded }) =>
rounded &&
${({ isrounded }) =>
isrounded &&
css`
border-radius: 999px;
`}
Expand Down
9 changes: 9 additions & 0 deletions src/helpers/getStatusColor.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { color } from "@/styles";

const getStatusColor = (index: number) => {
if (!index) return color.primary_yellow;
if (index === 1) return color.primary_blue;
return color.primary_red;
};

export default getStatusColor;
1 change: 1 addition & 0 deletions src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as getProfileUrl } from "./getProfileUrl.helper";
export { default as getUserRole } from "./getUserRole.helper";
export { default as getStatusColor } from "./getStatusColor.helper";
10 changes: 10 additions & 0 deletions src/hooks/useDate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
import "dayjs/locale/ko";
import useUser from "./useUser";

dayjs.extend(customParseFormat);

Expand All @@ -25,6 +26,14 @@ const weekdaysENG = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const weekdaysKOR = ["일", "월", "화", "수", "목", "금", "토"];

const useDate = () => {
const { user } = useUser();

const openingYear = user.student.enrolledAt;

const currentYearsWithSchool = Array.from({ length: 3 }).map(
(_, i) => openingYear + i,
);

const getHMSDate = () => {
const date = dayjs();
const HMSDate = dayjs(date).locale("ko").format("A h:mm:ss");
Expand Down Expand Up @@ -81,6 +90,7 @@ const useDate = () => {
return {
weekdaysENG,
weekdaysKOR,
currentYearsWithSchool,
getHMSDate,
getDate,
getNowWeekDay,
Expand Down
7 changes: 7 additions & 0 deletions src/page/bamboo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const BambooPage = () => {
return <div />;
};

export default BambooPage;
Loading
Loading