@edu-tosel/design 1.0.184 → 1.0.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_test/asset/mock/academies.d.ts +5 -0
- package/_test/asset/mock/academies.js +52 -0
- package/_test/asset/mock/academy.d.ts +28 -0
- package/_test/asset/mock/academy.js +419 -0
- package/_test/asset/mock/chartData.d.ts +6 -0
- package/_test/asset/mock/chartData.js +104 -0
- package/_test/asset/mock/index.d.ts +3 -0
- package/_test/asset/mock/index.js +3 -0
- package/_test/interface/Exam.d.ts +56 -0
- package/_test/interface/Exam.js +55 -0
- package/_test/interface/Property.d.ts +3 -0
- package/_test/interface/Property.js +9 -0
- package/_test/interface/index.d.ts +2 -0
- package/_test/interface/index.js +2 -0
- package/asset/SVG.d.ts +2 -0
- package/asset/SVG.js +2 -0
- package/asset/SVG.tsx +2 -0
- package/asset/svg/HallofFame.d.ts +4 -0
- package/asset/svg/HallofFame.js +4 -0
- package/asset/svg/HallofFame.tsx +179 -0
- package/hook/index.d.ts +1 -0
- package/hook/index.js +1 -0
- package/hook/usePageLoaded.d.ts +4 -0
- package/hook/usePageLoaded.js +21 -0
- package/layout/template/Archive/Header.js +4 -0
- package/layout/template/Regexam/Banner.js +2 -2
- package/layout/template/Ticket/Layout.d.ts +4 -1
- package/layout/template/Ticket/Layout.js +4 -3
- package/layout/template/Ticket/Ticket.js +2 -2
- package/layout/template/Ticket/academy/Academy.d.ts +19 -0
- package/layout/template/Ticket/academy/Academy.js +144 -0
- package/layout/template/Ticket/academy/AcademyTicket.d.ts +21 -0
- package/layout/template/Ticket/academy/AcademyTicket.js +57 -0
- package/layout/template/Ticket/index.d.ts +5 -0
- package/layout/template/Ticket/index.js +4 -0
- package/layout/template/Transcript/design/Organism/BarCardCol.d.ts +4 -0
- package/layout/template/Transcript/design/Organism/BarCardCol.js +30 -0
- package/layout/template/Transcript/design/Organism/BarCardRow.d.ts +4 -0
- package/layout/template/Transcript/design/Organism/BarCardRow.js +30 -0
- package/layout/template/Transcript/design/Transcript.d.ts +6 -0
- package/layout/template/Transcript/design/Transcript.design.d.ts +7 -0
- package/layout/template/Transcript/design/Transcript.design.js +120 -62
- package/layout/template/Transcript/design/atom/CardTitle.d.ts +3 -0
- package/layout/template/Transcript/design/atom/CardTitle.js +11 -0
- package/layout/template/Transcript/design/atom/CardTitleDivided.d.ts +0 -0
- package/layout/template/Transcript/design/atom/CardTitleDivided.js +1 -0
- package/layout/template/Transcript/design/atom/IdCard.d.ts +12 -0
- package/layout/template/Transcript/design/atom/IdCard.js +74 -0
- package/layout/template/Transcript/design/atom/PrintBoxStyles.d.ts +4 -0
- package/layout/template/Transcript/design/atom/PrintBoxStyles.js +4 -0
- package/layout/template/Transcript/design/atom/ScriptStyle.d.ts +0 -0
- package/layout/template/Transcript/design/atom/ScriptStyle.js +1 -0
- package/layout/template/Transcript/design/molecule/BarGraph.d.ts +9 -0
- package/layout/template/Transcript/design/molecule/BarGraph.js +65 -0
- package/package.json +2 -1
- package/style/size.js +1 -1
- package/tailwind.config.ts +10 -1
- package/util/copyToClipboard.d.ts +1 -0
- package/util/copyToClipboard.js +16 -0
- package/util/index.d.ts +1 -0
- package/util/index.js +1 -0
- package/version.txt +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import moment from "moment-timezone";
|
|
3
|
+
import { LevelString } from "../../../../_test/interface";
|
|
4
|
+
import GroupTicket from "./AcademyTicket";
|
|
5
|
+
import React, { useRef, useState } from "react";
|
|
6
|
+
import { Label, Row, TableCard } from "@edu-tosel/design";
|
|
7
|
+
import { cn } from "../../../../util";
|
|
8
|
+
import { HiOutlinePrinter } from "react-icons/hi2";
|
|
9
|
+
import { HiOutlineTableCells } from "react-icons/hi2";
|
|
10
|
+
import { useReactToPrint } from "react-to-print";
|
|
11
|
+
export default function Academy({ applicationsData, examDate, examName, }) {
|
|
12
|
+
const container = {
|
|
13
|
+
displays: "flex items-center justify-center gap-6",
|
|
14
|
+
};
|
|
15
|
+
const btn = {
|
|
16
|
+
displays: "flex items-center justify-center gap-2",
|
|
17
|
+
rounded: "rounded-lg",
|
|
18
|
+
backgrounds: "bg-white/50",
|
|
19
|
+
texts: " text-green-dark font-semibold",
|
|
20
|
+
shadows: "shadow-main",
|
|
21
|
+
sizes: "w-1/3 h-full px-2.5",
|
|
22
|
+
cursors: "cursor-pointer",
|
|
23
|
+
};
|
|
24
|
+
const formattedData = Object.values(applicationsData ?? {})
|
|
25
|
+
.filter((app) => app.applicationId !== null)
|
|
26
|
+
.slice(0, -1);
|
|
27
|
+
const [selectedStudent, setSelectedStudent] = useState(formattedData[0]);
|
|
28
|
+
const handleSelectStudent = (student) => {
|
|
29
|
+
setSelectedStudent(toRender(student));
|
|
30
|
+
};
|
|
31
|
+
const ref = useRef(null);
|
|
32
|
+
const refALot = useRef(null);
|
|
33
|
+
const handlePrint = useReactToPrint({
|
|
34
|
+
content: () => ref.current,
|
|
35
|
+
});
|
|
36
|
+
const ticketRefs = useRef(formattedData.map(() => React.createRef()));
|
|
37
|
+
const printAllTickets = useReactToPrint({
|
|
38
|
+
content: () => refALot.current,
|
|
39
|
+
onBeforeGetContent: () => {
|
|
40
|
+
if (refALot.current) {
|
|
41
|
+
refALot.current.style.display = "block";
|
|
42
|
+
}
|
|
43
|
+
return new Promise((resolve) => {
|
|
44
|
+
setTimeout(resolve, 1);
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
onAfterPrint: () => {
|
|
48
|
+
if (refALot.current) {
|
|
49
|
+
refALot.current.style.display = "none";
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return (_jsx(_Fragment, { children: _jsx("div", { className: "w-full min-h-screen flex items-center justify-center bg-gray-light", children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "w-full h-15 bg-green-dark rounded-lg flex justify-between items-center p-5 text-white text-md shadow-main", children: [_jsx("div", { className: "font-semibold", children: examName }), _jsx("div", { children: "\uACE0\uC0AC\uC7A5 \uC2DC\uD5D8" })] }), _jsx(TableCard, { dataField: dataField, dataSet: {
|
|
54
|
+
items: formattedData ?? [],
|
|
55
|
+
renderItem: (application) => (_jsx(Row.Card, { item: toRender(application), dataField: dataField, onClick: () => handleSelectStudent(application) })),
|
|
56
|
+
} }), _jsxs("div", { className: "flex w-full h-12 gap-3", children: [_jsxs("div", { className: cn(btn), onClick: printAllTickets, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC804\uCCB4 \uC218\uD5D8\uD45C \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), onClick: handlePrint, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uD604\uC7AC \uD559\uC0DD \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), children: [_jsx(HiOutlineTableCells, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC5D1\uC140 \uB2E4\uC6B4\uB85C\uB4DC" })] })] })] }), _jsx("div", { ref: refALot, style: {
|
|
57
|
+
display: "none",
|
|
58
|
+
}, children: formattedData.map((student, index) => (_jsx(GroupTicket, { ref: ticketRefs.current[index], props: {
|
|
59
|
+
exam: {
|
|
60
|
+
title: examName,
|
|
61
|
+
hall: student.examHallName ?? "",
|
|
62
|
+
room: student.examHallRoomName ?? "",
|
|
63
|
+
date: examDate,
|
|
64
|
+
address: "",
|
|
65
|
+
startedAt: moment(new Date()).unix(),
|
|
66
|
+
endedAt: moment(new Date()).unix(),
|
|
67
|
+
},
|
|
68
|
+
name: student.name ?? "",
|
|
69
|
+
birthday: student.birthday ?? "",
|
|
70
|
+
profileImageUrl: "",
|
|
71
|
+
level: LevelString[student.level ?? "PS"],
|
|
72
|
+
code: student.code ?? "",
|
|
73
|
+
isAll: true,
|
|
74
|
+
} }, student.applicationId))) }), _jsx(GroupTicket, { ref: ref, props: {
|
|
75
|
+
exam: {
|
|
76
|
+
title: examName,
|
|
77
|
+
hall: selectedStudent?.examHallName ?? "",
|
|
78
|
+
room: selectedStudent?.examHallRoomName ?? "",
|
|
79
|
+
date: examDate,
|
|
80
|
+
address: "",
|
|
81
|
+
startedAt: moment(new Date()).unix(),
|
|
82
|
+
endedAt: moment(new Date()).unix(),
|
|
83
|
+
},
|
|
84
|
+
name: selectedStudent?.name ?? "",
|
|
85
|
+
birthday: selectedStudent?.birthday ?? "",
|
|
86
|
+
profileImageUrl: "",
|
|
87
|
+
level: LevelString[selectedStudent?.level ?? "PS"],
|
|
88
|
+
code: selectedStudent?.code ?? "",
|
|
89
|
+
} }), _jsxs("div", { className: "relative w-48 flex flex-row md:flex-col md:h-[700px] gap-4 h-full justify-start mt-5 items-center", children: [_jsxs("div", { className: "sm:absolute hidden sm:flex flex-col gap-4 left-0 top-36", children: [_jsxs("div", { className: "flex-col font-pretendard-var flex", children: [_jsxs("div", { className: "flex flex-row font-bold text-base leading-tight", children: [_jsx("div", { className: "text-crimson-burgundy", children: "OMR \uC791\uC131" }), _jsx("div", { className: "text-gray-dark", children: ", \uC5F0\uC2B5\uD558\uC168\uB098\uC694?" })] }), _jsx("div", { className: "text-gray-dark font-medium text-xs break-keep", children: "\uB9C8\uD0B9\uD39C\uC73C\uB85C \uC791\uC131\uBC95\uC744 \uBBF8\uB9AC \uC5F0\uC2B5\uD574\uBCF4\uC138\uC694!" })] }), _jsx(Label.Button, { title: "OMR \uC778\uC1C4", onClick: () => { }, option: {
|
|
90
|
+
width: "sm",
|
|
91
|
+
height: "xs",
|
|
92
|
+
background: "bg-green-dark",
|
|
93
|
+
text: "text-white font-pretendard-var font-medium",
|
|
94
|
+
} })] }), _jsxs("div", { className: "sm:absolute flex flex-col gap-4 left-0 top-80", children: [_jsxs("div", { className: "flex-col font-pretendard-var hidden sm:flex", children: [_jsxs("div", { className: "flex flex-row font-bold text-base leading-tight", children: [_jsx("div", { className: "text-crimson-burgundy", children: "\uACE0\uC0AC\uC7A5 \uC704\uCE58" }), _jsx("div", { className: "text-gray-dark", children: "\uB97C \uD655\uC778\uD574\uC8FC\uC138\uC694" })] }), _jsx("div", { className: "text-gray-dark font-medium text-xs break-keep", children: selectedStudent?.examHallName })] }), _jsx(Label.Button, { title: "\uC9C0\uB3C4\uC5D0\uC11C \uBCF4\uAE30", onClick: () => {
|
|
95
|
+
window.open(`https://map.kakao.com/?map_type=TYPE_MAP&itemId=168362793&q=${selectedStudent?.examHallName}&urlLevel=3&urlX=507920&urlY=1136302`);
|
|
96
|
+
}, option: {
|
|
97
|
+
width: "sm",
|
|
98
|
+
height: "xs",
|
|
99
|
+
background: "bg-green-dark",
|
|
100
|
+
text: "text-white font-pretendard-var font-medium",
|
|
101
|
+
} })] }), _jsxs("div", { className: "sm:absolute flex flex-col gap-4 left-0 top-128", children: [_jsxs("div", { className: "flex-col font-pretendard-var hidden sm:flex", children: [_jsxs("div", { className: "flex flex-row font-bold text-base leading-tight", children: [_jsx("div", { className: "text-crimson-burgundy", children: "\uC900\uBE44\uBB3C" }), _jsx("div", { className: "text-gray-dark", children: "\uB3C4 \uD655\uC778\uD574\uC8FC\uC138\uC694" })] }), _jsx("div", { className: "text-gray-dark font-medium text-xs break-keep", children: "\uB9C8\uD0B9\uD39C\uC73C\uB85C \uC791\uC131\uBC95\uC744 \uBBF8\uB9AC \uC5F0\uC2B5\uD574\uBCF4\uC138\uC694!" })] }), _jsx(Label.Button, { title: "\uC2DC\uD5D8 \uADDC\uC815 \uD655\uC778", onClick: () => { }, option: {
|
|
102
|
+
width: "sm",
|
|
103
|
+
height: "xs",
|
|
104
|
+
background: "bg-green-dark",
|
|
105
|
+
text: "text-white font-pretendard-var font-medium",
|
|
106
|
+
} })] })] })] }) }) }));
|
|
107
|
+
}
|
|
108
|
+
function toRender(obj) {
|
|
109
|
+
return {
|
|
110
|
+
...obj,
|
|
111
|
+
levelString: LevelString[obj.level ?? "PS"],
|
|
112
|
+
formattedBirthday: formatDateToYYMMDD(obj.birthday),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function formatDateToYYMMDD(dateString) {
|
|
116
|
+
if (!dateString) {
|
|
117
|
+
console.error("Invalid date string provided");
|
|
118
|
+
return "";
|
|
119
|
+
}
|
|
120
|
+
const [year, month, day] = dateString.split("-");
|
|
121
|
+
return year.slice(2) + month + day;
|
|
122
|
+
}
|
|
123
|
+
const dataField = {
|
|
124
|
+
name: {
|
|
125
|
+
title: "이름",
|
|
126
|
+
size: 20,
|
|
127
|
+
},
|
|
128
|
+
formattedBirthday: {
|
|
129
|
+
title: "생년월일",
|
|
130
|
+
size: 25,
|
|
131
|
+
},
|
|
132
|
+
levelString: {
|
|
133
|
+
title: "레벨",
|
|
134
|
+
size: 30,
|
|
135
|
+
},
|
|
136
|
+
code: {
|
|
137
|
+
title: "수험번호",
|
|
138
|
+
size: 30,
|
|
139
|
+
},
|
|
140
|
+
examHallRoomName: {
|
|
141
|
+
title: "고사실",
|
|
142
|
+
size: 20,
|
|
143
|
+
},
|
|
144
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface TicketProps {
|
|
2
|
+
exam: {
|
|
3
|
+
title: string;
|
|
4
|
+
hall: string;
|
|
5
|
+
room: string;
|
|
6
|
+
date: string;
|
|
7
|
+
address: string;
|
|
8
|
+
startedAt: number;
|
|
9
|
+
endedAt: number;
|
|
10
|
+
};
|
|
11
|
+
name: string;
|
|
12
|
+
profileImageUrl?: string;
|
|
13
|
+
birthday: string;
|
|
14
|
+
level: string;
|
|
15
|
+
code: string;
|
|
16
|
+
isAll?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
19
|
+
props: TicketProps;
|
|
20
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../../../util";
|
|
4
|
+
import moment from "moment-timezone";
|
|
5
|
+
function AcademyTicket({ props }, ref) {
|
|
6
|
+
const { title, date, hall, room, startedAt, endedAt } = props.exam;
|
|
7
|
+
const { isAll } = props;
|
|
8
|
+
const isAllSize = isAll ? "w-[210mm] h-[297mm] p-10" : "";
|
|
9
|
+
//수험번호 섹션 디자인을 위한 배열
|
|
10
|
+
const numberArray = props.code.split("").map(Number);
|
|
11
|
+
numberArray.splice(3, 0, null);
|
|
12
|
+
numberArray.splice(7, 0, null);
|
|
13
|
+
const container = {
|
|
14
|
+
sizes: "w-full max-w-[340px] xs:w-[340px] h-[700px] flex flex-col justify-start",
|
|
15
|
+
spacings: "p-5 print:m-10",
|
|
16
|
+
boundaries: "border-1 border-gray-medium shadow-main",
|
|
17
|
+
backgrounds: "bg-white",
|
|
18
|
+
};
|
|
19
|
+
const logoWrapper = {
|
|
20
|
+
displays: "flex flex-row justify-between w-full mb-3",
|
|
21
|
+
};
|
|
22
|
+
const svgController = {
|
|
23
|
+
sizes: "h-8",
|
|
24
|
+
};
|
|
25
|
+
const titleDivider = {
|
|
26
|
+
sizes: "w-full h-0.5",
|
|
27
|
+
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
28
|
+
};
|
|
29
|
+
const cellWrapper = {
|
|
30
|
+
displays: "flex flex-row",
|
|
31
|
+
sizes: "w-full",
|
|
32
|
+
boundaries: "border-1 border-gray-medium",
|
|
33
|
+
};
|
|
34
|
+
const cellTitleLarge = {
|
|
35
|
+
displays: "flex justify-center items-center shrink-0",
|
|
36
|
+
sizes: "w-21 h-6",
|
|
37
|
+
textstyles: "text-2xs font-medium",
|
|
38
|
+
backgrounds: "bg-gray-light",
|
|
39
|
+
};
|
|
40
|
+
const cellTitleSmall = {
|
|
41
|
+
displays: "flex justify-center items-center shrink-0",
|
|
42
|
+
sizes: "w-16 h-6",
|
|
43
|
+
textstyles: "text-2xs font-medium",
|
|
44
|
+
backgrounds: "bg-gray-light",
|
|
45
|
+
};
|
|
46
|
+
const cellText = {
|
|
47
|
+
sizes: "w-full",
|
|
48
|
+
displays: "flex justify-center items-center",
|
|
49
|
+
textstyles: "text-2xs font-medium text-black",
|
|
50
|
+
};
|
|
51
|
+
return (_jsx("div", { ref: ref, className: isAllSize, children: _jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(logoWrapper), children: [_jsx("img", { className: cn(svgController), src: "/images/logos/logo-itc-main.svg", alt: "" }), _jsx("img", { className: cn(svgController), src: "/images/logos/logo-tosel-main.svg", alt: "" })] }), _jsxs("div", { className: "flex flex-col w-full gap-2.5", children: [_jsx("div", { className: cn(titleDivider) }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "text-lg font-bold leading-none", children: "\uC218 \uD5D8 \uD45C" }), _jsx("div", { className: "text-sm font-medium leading-none", children: title })] }), _jsx("div", { className: cn(titleDivider) })] }), _jsxs("div", { className: "flex flex-col gap-5 mt-5", children: [_jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge), children: "\uC218\uD5D8\uBC88\uD638" }), _jsx("div", { className: "w-full flex flex-row divide-x-[1px] divide-dashed divide-gray-medium/50", children: numberArray.map((num, index) => (_jsx("div", { className: `flex justify-center items-center text-xs font-medium ${num === null
|
|
52
|
+
? "w-2.5 shrink-0 bg-gray-light"
|
|
53
|
+
: "w-full bg-white"}`, children: num !== null ? num : "" }, index))) })] }), _jsxs("div", { className: "font-medium text-2xs", children: ["*OMR (1)\uBC88 \uD56D\uBAA9\uC5D0 \uD574\uB2F9\uBC88\uD638\uB97C \uB530\uB77C\uC11C \uC368\uC8FC\uC138\uC694.", " "] })] }), _jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge), children: "\uB808\uBCA8" }), _jsx("div", { className: cn(cellText), children: props.level })] }), _jsxs("div", { className: "flex flex-row gap-2", children: [_jsxs("div", { className: "flex flex-col gap-0 h-full w-21 border-1 border-gray-medium shrink-0", children: [_jsx("div", { className: "h-full w-full bg-cover", style: {
|
|
54
|
+
backgroundImage: `url(${props.profileImageUrl ?? ""})`,
|
|
55
|
+
} }), _jsx("div", { className: cn(cellTitleLarge, "w-full"), children: "\uC0AC\uC9C4" })] }), _jsxs("div", { className: "flex flex-col gap-2 w-full", children: [_jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uC774\uB984" }), _jsx("div", { className: cn(cellText), children: props.name })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uC0DD\uB144\uC6D4\uC77C" }), _jsx("div", { className: cn(cellText), children: props.birthday })] })] }), _jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uACE0\uC0AC\uC7A5" }), _jsx("div", { className: cn(cellText), children: hall })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleSmall), children: "\uACE0\uC0AC\uC2E4" }), _jsx("div", { className: cn(cellText), children: room })] })] })] })] }), _jsxs("div", { className: "flex flex-col gap-0", children: [_jsxs("div", { className: cn(cellWrapper), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC2DC\uD5D8\uC77C\uC790" }), _jsx("div", { className: cn(cellText), children: props.exam.date })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC785\uC2E4 \uC644\uB8CC\uC2DC\uAC04" }), _jsx("div", { className: cn(cellText), children: moment.unix(startedAt).format("HH시 mm분") })] }), _jsxs("div", { className: cn(cellWrapper, "border-t-0"), children: [_jsx("div", { className: cn(cellTitleLarge, "bg-green-dark/10"), children: "\uC885\uB8CC\uC2DC\uAC04" }), _jsx("div", { className: cn(cellText), children: moment.unix(endedAt).format("HH시 mm분") })] }), _jsxs("div", { className: "flex flex-col mt-1", children: [_jsx("div", { className: "font-medium text-2xs leading-tight", children: "*\uC785\uC2E4\uC2DC\uAC04 \uC774\uD6C4\uC5D0\uB294 \uC785\uC2E4\uC774 \uC81C\uD55C\uB429\uB2C8\uB2E4." }), _jsx("div", { className: "font-medium text-2xs leading-tight", children: "*\uACE0\uC0AC\uC7A5 \uC5EC\uAC74\uC5D0 \uB530\uB77C \uD1F4\uC2E4\uC2DC\uAC04\uC740 \uC870\uAE08\uC529 \uC0C1\uC774\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4." })] })] }), _jsx("div", { className: "w-full border-b-1 border-dashed border-gray-medium" }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "font-bold text-sm leading-tight", children: "\uC751\uC2DC\uC790 \uC720\uC758\uC0AC\uD56D" }), _jsxs("ul", { className: "list-outside list-decimal ml-4 font-medium text-2xs", children: [_jsxs("li", { className: "mb-1", children: ["\uB2E4\uC74C\uC758 \uBB3C\uD488\uC744 \uAF2D \uC900\uBE44\uD574\uC8FC\uC138\uC694:", _jsx("br", {}), " \uCEF4\uD4E8\uD130\uC6A9 \uC0AC\uC778\uD39C / \uC218\uC815 \uD14C\uC774\uD504 / \uC218\uD5D8\uD45C / \uAC80\uC815 \uBCFC\uD39C"] }), _jsxs("li", { className: "mb-1", children: ["\uACE0\uC0AC\uC7A5 \uC704\uCE58\uB97C \uBBF8\uB9AC \uD655\uC778\uD574\uC8FC\uC138\uC694:", _jsx("br", {}), " \uC218\uD5D8\uD45C\uC5D0 \uAE30\uC7AC\uB41C \uACE0\uC0AC\uC7A5, \uACE0\uC0AC\uC2E4 \uC815\uBCF4\uB97C \uD655\uC778\uD574\uC8FC\uC138\uC694."] }), _jsxs("li", { children: ["\uD559\uBD80\uBAA8 \uCD9C\uC785 \uD1B5\uC81C:", _jsx("br", {}), "\uACE0\uC0AC\uC2E4 \uB0B4\uBD80\uC5D0\uB294 \uD559\uBD80\uBAA8\uC758 \uCD9C\uC785\uC774 \uC5C4\uACA9\uD788 \uD1B5\uC81C\uB429\uB2C8\uB2E4."] })] })] })] })] }) }));
|
|
56
|
+
}
|
|
57
|
+
export default forwardRef(AcademyTicket);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import Layout from "./Layout";
|
|
2
|
+
import Academy from "./academy/Academy";
|
|
2
3
|
declare const Ticket: {
|
|
4
|
+
Academy: typeof Academy;
|
|
5
|
+
Paper: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
props: import("./Ticket").TicketProps;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
8
|
Layout: typeof Layout;
|
|
4
9
|
};
|
|
5
10
|
export default Ticket;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardRow({ data }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const cardTitle = {
|
|
14
|
+
display: "flex flex-row justify-center items-center",
|
|
15
|
+
sizes: "h-7 shrink-0 w-full",
|
|
16
|
+
bg: "bg-green-light",
|
|
17
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
+
};
|
|
19
|
+
const SectionWrapper = {
|
|
20
|
+
display: "flex flex-row sm:flex-col items-center justify-center",
|
|
21
|
+
sizes: "h-full w-full",
|
|
22
|
+
};
|
|
23
|
+
const ScriptStyles = {
|
|
24
|
+
displays: "flex justify-center items-center align-center",
|
|
25
|
+
spacings: "p-5",
|
|
26
|
+
sizes: "w-full h-full",
|
|
27
|
+
textStyles: "text-sm break-keep",
|
|
28
|
+
};
|
|
29
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardRow({ data }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const cardTitle = {
|
|
14
|
+
display: "flex flex-row justify-center items-center",
|
|
15
|
+
sizes: "h-7 shrink-0 w-full",
|
|
16
|
+
bg: "bg-green-light",
|
|
17
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
+
};
|
|
19
|
+
const SectionWrapper = {
|
|
20
|
+
display: "flex sm:flex-row flex-col items-center justify-center",
|
|
21
|
+
sizes: "h-full w-full",
|
|
22
|
+
};
|
|
23
|
+
const ScriptStyles = {
|
|
24
|
+
displays: "flex justify-center items-center align-center",
|
|
25
|
+
spacings: "p-5",
|
|
26
|
+
sizes: "w-full h-full",
|
|
27
|
+
textStyles: "text-sm break-keep",
|
|
28
|
+
};
|
|
29
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
+
}
|
|
@@ -5,6 +5,8 @@ export interface TranscriptProps {
|
|
|
5
5
|
name: string;
|
|
6
6
|
nickname?: string;
|
|
7
7
|
imgSrc?: string;
|
|
8
|
+
qrSrc?: string;
|
|
9
|
+
sharedSrc?: string;
|
|
8
10
|
code: string;
|
|
9
11
|
birthday: string;
|
|
10
12
|
examName: string;
|
|
@@ -36,6 +38,10 @@ export interface TranscriptProps {
|
|
|
36
38
|
section1: number;
|
|
37
39
|
section2: number;
|
|
38
40
|
};
|
|
41
|
+
ageAverage: {
|
|
42
|
+
section1: number;
|
|
43
|
+
section2: number;
|
|
44
|
+
};
|
|
39
45
|
"10percentageAverage": number;
|
|
40
46
|
"30percentageAverage": number;
|
|
41
47
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { TranscriptProps } from "./Transcript";
|
|
2
|
+
import { Level as NarrowLevel } from "../../../../_test/interface";
|
|
3
|
+
type Level = Exclude<NarrowLevel, ""> | "CC";
|
|
2
4
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
3
5
|
props: TranscriptProps;
|
|
4
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
7
|
export default _default;
|
|
8
|
+
export declare const LevelToStyleMap: Record<Level, {
|
|
9
|
+
name: string;
|
|
10
|
+
bgcolor: string;
|
|
11
|
+
textcolor: string;
|
|
12
|
+
}>;
|
|
@@ -1,65 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { paperSize } from "../../../../style/size";
|
|
4
|
+
import { LineBreaks } from "../../../../text";
|
|
4
5
|
import { cn } from "../../../../util";
|
|
6
|
+
import SVG from "../../../../asset/SVG";
|
|
5
7
|
import { useResponsive } from "../../../../hook";
|
|
6
8
|
import { ResponsiveContainer, PieChart, Pie, Cell, } from "recharts";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
CMP: "경시대회",
|
|
11
|
-
};
|
|
12
|
-
function getStringfromType(ExamType) {
|
|
13
|
-
return examTypeMap[ExamType] || "Unknown";
|
|
14
|
-
}
|
|
15
|
-
const LevelToStyleMap = {
|
|
16
|
-
CC: {
|
|
17
|
-
name: "Cocoon",
|
|
18
|
-
bgcolor: "bg-cocoon-green/10",
|
|
19
|
-
textcolor: "text-cocoon-green",
|
|
20
|
-
},
|
|
21
|
-
PS: {
|
|
22
|
-
name: "Pre-Starter",
|
|
23
|
-
bgcolor: "bg-ps-pink-light",
|
|
24
|
-
textcolor: "text-ps-pink",
|
|
25
|
-
},
|
|
26
|
-
ST: {
|
|
27
|
-
name: "Starter",
|
|
28
|
-
bgcolor: "bg-st-orange-light",
|
|
29
|
-
textcolor: "text-st-orange",
|
|
30
|
-
},
|
|
31
|
-
BA: {
|
|
32
|
-
name: "Basic",
|
|
33
|
-
bgcolor: "bg-ba-yellow-light",
|
|
34
|
-
textcolor: "text-ba-yellow",
|
|
35
|
-
},
|
|
36
|
-
JR: {
|
|
37
|
-
name: "Junior",
|
|
38
|
-
bgcolor: "bg-jr-blue-light",
|
|
39
|
-
textcolor: "text-jr-blue",
|
|
40
|
-
},
|
|
41
|
-
HJ: {
|
|
42
|
-
name: "High Junior",
|
|
43
|
-
bgcolor: "bg-hj-blue-light",
|
|
44
|
-
textcolor: "text-hj-blue",
|
|
45
|
-
},
|
|
46
|
-
AD: {
|
|
47
|
-
name: "Advanced",
|
|
48
|
-
bgcolor: "bg-gray-light",
|
|
49
|
-
textcolor: "text-gray-dark",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
function getStylefromLevel(level, field) {
|
|
53
|
-
return LevelToStyleMap[level]?.[field] || "Unknown";
|
|
54
|
-
}
|
|
9
|
+
import IdCard, { getStringfromType } from "./atom/IdCard";
|
|
10
|
+
import { printBoxStyles } from "./atom/PrintBoxStyles";
|
|
11
|
+
import { BarCardRow } from "./Organism/BarCardRow";
|
|
55
12
|
function TranscriptDesign({ props }, ref) {
|
|
56
13
|
const { info, result, data } = props;
|
|
57
14
|
const container = {
|
|
58
15
|
printSize: paperSize.a4,
|
|
59
16
|
backgrounds: "print:bg-white",
|
|
60
|
-
sizes: "w-full
|
|
17
|
+
sizes: "w-full max-w-[210mm]",
|
|
61
18
|
textStyles: "break-keep",
|
|
62
|
-
// test: "border-2 border-red-500",
|
|
63
19
|
};
|
|
64
20
|
const headerBox = {
|
|
65
21
|
display: "flex flex-row flex-wrap justify-between items-center",
|
|
@@ -67,20 +23,23 @@ function TranscriptDesign({ props }, ref) {
|
|
|
67
23
|
spacings: "px-5 py-2",
|
|
68
24
|
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
69
25
|
};
|
|
70
|
-
|
|
71
|
-
display: "flex justify-center items-center",
|
|
72
|
-
textStyles: "text-center, ",
|
|
73
|
-
variableStyle: `text-center text-xs font-bold ${getStylefromLevel(info.level, "textcolor")}`,
|
|
74
|
-
backgrounds: getStylefromLevel(info.level, "bgcolor"),
|
|
75
|
-
sizes: "rounded-md w-fit h-fit",
|
|
76
|
-
spacings: "px-2 py-1",
|
|
77
|
-
};
|
|
78
|
-
const isMD = useResponsive("md");
|
|
79
|
-
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-medium text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(ResultCard, { result: result })] }));
|
|
26
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-bold text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(IdCard, { info: info }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(ResultCard, { result: result }), _jsx(HonorCard, { result: result })] }), _jsx(PerformanceCard, { data: data, info: info }), _jsx(ScoreCard, { data: data }), _jsx(BarCardRow, { data: data })] }));
|
|
80
27
|
}
|
|
81
28
|
export default forwardRef(TranscriptDesign);
|
|
82
29
|
function ResultCard({ result }) {
|
|
83
|
-
|
|
30
|
+
const cardWrapper = {
|
|
31
|
+
displays: "flex flex-col self-auto flex-[2] md:flex-[1] overflow-hidden",
|
|
32
|
+
sizes: "w-full h-fit rounded-lg",
|
|
33
|
+
backgrounds: "bg-white shadow-main",
|
|
34
|
+
// animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
35
|
+
};
|
|
36
|
+
const cardTitle = {
|
|
37
|
+
display: "flex flex-row justify-center items-center",
|
|
38
|
+
sizes: "h-7 w-full",
|
|
39
|
+
bg: "bg-green-dark",
|
|
40
|
+
textStyles: "text-white font-medium text-sm",
|
|
41
|
+
};
|
|
42
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsxs("div", { className: cn(cardTitle), children: [_jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uCDE8\uB4DD \uC810\uC218" }), _jsx("div", { className: "w-0.5 h-7 bg-white" }), _jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uC778\uC99D \uB4F1\uAE09" })] }), _jsxs("div", { className: "flex flex-row gap-10 p-5", children: [_jsx(CircularGauge, { score: result.score, maxScore: 100, isGrade: false }), _jsx(CircularGauge, { score: result.grade, maxScore: 9, isGrade: true })] })] }));
|
|
84
43
|
}
|
|
85
44
|
const CircularGauge = ({ score, maxScore, isGrade }) => {
|
|
86
45
|
const pieStyles = {
|
|
@@ -100,6 +59,7 @@ const CircularGauge = ({ score, maxScore, isGrade }) => {
|
|
|
100
59
|
positions: "top-0 left-0",
|
|
101
60
|
sizes: "w-full h-full",
|
|
102
61
|
textStyles: "font-bold text-gray-medium text-2xl",
|
|
62
|
+
printOptions: "print:text-gray-dark",
|
|
103
63
|
};
|
|
104
64
|
const preparePieChartData = () => {
|
|
105
65
|
const mainScore = score;
|
|
@@ -118,5 +78,103 @@ const CircularGauge = ({ score, maxScore, isGrade }) => {
|
|
|
118
78
|
}
|
|
119
79
|
};
|
|
120
80
|
return (_jsxs("div", { className: "w-full aspect-ratio-1/1 flex items-center justify-center relative", children: [_jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsx(Pie, { data: [{ name: "Background", value: 100 }], cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "90%", fill: "rgba(128, 128, 128, 0.2)" // 회색 배경 색상
|
|
121
|
-
, dataKey: "value", stroke: "rgb(255,255,255,0)", animationDuration: 0 }) }) }) }), _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, children: [_jsx(Cell, { fill: "#105652", ...cellStyles
|
|
81
|
+
, dataKey: "value", stroke: "rgb(255,255,255,0)", animationDuration: 0 }) }) }) }), _jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1 opacity-0 print:opacity-100", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, animationDuration: 0, children: [_jsx(Cell, { fill: "#105652", ...cellStyles, style: {
|
|
82
|
+
filter: "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))",
|
|
83
|
+
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }) }), _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, children: [_jsx(Cell, { fill: "#105652", ...cellStyles, style: {
|
|
84
|
+
filter: "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))",
|
|
85
|
+
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }), _jsx("div", { className: cn(scoreText), children: score })] }));
|
|
86
|
+
};
|
|
87
|
+
function HonorCard({ result }) {
|
|
88
|
+
const cardWrapper = {
|
|
89
|
+
displays: "flex flex-col self-stretch flex-[1] relative",
|
|
90
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
91
|
+
backgrounds: "bg-white shadow-main",
|
|
92
|
+
animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
93
|
+
};
|
|
94
|
+
const cardTitle = {
|
|
95
|
+
display: "flex flex-row justify-center items-center",
|
|
96
|
+
sizes: "h-7 shrink-0 w-full",
|
|
97
|
+
bg: "bg-green-light",
|
|
98
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
99
|
+
};
|
|
100
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), onClick: () => (window.location.href = `https://www.tosel.org/HallofFame/main`), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }) }), _jsxs("div", { className: "w-full h-full flex flex-row px-5 gap-x-5", children: [_jsxs("div", { className: "flex flex-[1] flex-col w-full justify-center items-center xs:hidden md:flex", children: [_jsx("div", { className: "text-gray-dark font-bold text-xl", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }), _jsx("div", { className: "text-gray-medium font-medium text-sm", children: "Hall of Fame" })] }), _jsx("div", { className: "flex w-full flex-[1] py-4 xs:py-0", children: _jsx(SVG.HallofFame, { isHonor: result.isHonor }) })] }), _jsx("div", { className: "pb-3 px-5 text-center text-xs", children: result.isHonor
|
|
101
|
+
? "축하합니다! 명예의 전당에 등재되었습니다"
|
|
102
|
+
: "아쉽게도 명예의 전당에 오르지 못했습니다." })] }));
|
|
103
|
+
}
|
|
104
|
+
function PerformanceCard({ data, info, }) {
|
|
105
|
+
const cardWrapper = {
|
|
106
|
+
displays: "flex flex-col relative",
|
|
107
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
108
|
+
backgrounds: "bg-white shadow-main",
|
|
109
|
+
sapcings: "mt-5",
|
|
110
|
+
};
|
|
111
|
+
const cardTitle = {
|
|
112
|
+
display: "flex flex-row justify-center items-center",
|
|
113
|
+
sizes: "h-7 shrink-0 w-full",
|
|
114
|
+
bg: "bg-green-light",
|
|
115
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
116
|
+
};
|
|
117
|
+
const scriptStyling = {
|
|
118
|
+
display: "justify-start items-start",
|
|
119
|
+
sizes: "w-full h-fit",
|
|
120
|
+
textStyles: "text-xs font-medium text-black break-keep",
|
|
121
|
+
};
|
|
122
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "Performance Evaluation" }) }), _jsxs("div", { className: "w-full h-full flex flex-col gap-5 p-5", children: [_jsxs("div", { className: "flex flex-col flex-[3]", children: [_jsx(LineBreaks, { texts: data.script.performanceEvaluation, className: cn(scriptStyling) }), _jsx("div", { className: cn(scriptStyling, "text-green-dark"), children: "\uB098\uC758 \uC804\uAD6D \uC9C0\uD45C\uAC00 \uAD81\uAE08\uD558\uB2E4\uBA74? QR\uB85C \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uC138\uC694!" })] }), _jsx("div", { className: "w-full flex flex-col flex-[2] justify-center items-center", children: _jsx(LevelRow, { transcriptLevel: info.level }) })] })] }));
|
|
123
|
+
}
|
|
124
|
+
function LevelRow({ transcriptLevel }) {
|
|
125
|
+
const levels = ["CC", "PS", "ST", "BA", "JR", "HJ", "AD"];
|
|
126
|
+
const isSM = useResponsive("sm");
|
|
127
|
+
return (_jsx("div", { className: "flex flex-row w-full h-fit justify-center items-center", children: levels.map((level) => {
|
|
128
|
+
const { name, bgcolor, textcolor } = LevelToStyleMap[level];
|
|
129
|
+
const isHighlighted = level === transcriptLevel;
|
|
130
|
+
return (_jsx("div", { className: `px-2 py-1 text-xs text-center font-medium $ ${isHighlighted
|
|
131
|
+
? "bg-green-dark text-white w-fit shrink-0 rounded-md"
|
|
132
|
+
: "w-full text-green-dark/70"}`, children: isSM ? name : isHighlighted ? name : level }, level));
|
|
133
|
+
}) }));
|
|
134
|
+
}
|
|
135
|
+
function ScoreCard({ data }) {
|
|
136
|
+
const cellAnimation = {
|
|
137
|
+
animations: "hover:bg-green-light/50 hover:text-green-dark duration-300",
|
|
138
|
+
};
|
|
139
|
+
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg mt-5 print:border print:border-gray-medium/70 cursor-default shadow-main print:shadow-none", children: _jsxs("div", { className: "min-w-[172mm] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-medium text-sm", children: [_jsx("div", { className: "text-center print:static sticky left-0 bg-green-dark p-2 flex-[3] font-black", children: "\uC131\uC801\uD45C" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uCD1D\uC810" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uB0B4 \uC810\uC218" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC804\uAD6D\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC9C0\uC5ED\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uB3D9\uC77C\uD559\uB144" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "10% \uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "30% \uD3C9\uADE0" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section1" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section1.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section1.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section1.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section2" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section2.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section2.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section2.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1 font-bold", children: data.analysis["10percentageAverage"].toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center font-bold", children: data.analysis["30percentageAverage"].toFixed(2) })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "total" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: (data.analysis.total.section1 + data.analysis.total.section2).toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: (data.analysis.user.section1 + data.analysis.user.section2).toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.nationalAverage.section1 +
|
|
140
|
+
data.analysis.nationalAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.localAverage.section1 +
|
|
141
|
+
data.analysis.localAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.ageAverage.section1 +
|
|
142
|
+
data.analysis.ageAverage.section2).toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center " })] })] }) }));
|
|
143
|
+
}
|
|
144
|
+
export const LevelToStyleMap = {
|
|
145
|
+
CC: {
|
|
146
|
+
name: "Cocoon",
|
|
147
|
+
bgcolor: "bg-co-green-light",
|
|
148
|
+
textcolor: "text-co-green",
|
|
149
|
+
},
|
|
150
|
+
PS: {
|
|
151
|
+
name: "Pre-Starter",
|
|
152
|
+
bgcolor: "bg-ps-pink-light",
|
|
153
|
+
textcolor: "text-ps-pink",
|
|
154
|
+
},
|
|
155
|
+
ST: {
|
|
156
|
+
name: "Starter",
|
|
157
|
+
bgcolor: "bg-st-orange-light",
|
|
158
|
+
textcolor: "text-st-orange",
|
|
159
|
+
},
|
|
160
|
+
BA: {
|
|
161
|
+
name: "Basic",
|
|
162
|
+
bgcolor: "bg-ba-yellow-light",
|
|
163
|
+
textcolor: "text-ba-yellow",
|
|
164
|
+
},
|
|
165
|
+
JR: {
|
|
166
|
+
name: "Junior",
|
|
167
|
+
bgcolor: "bg-jr-blue-light",
|
|
168
|
+
textcolor: "text-jr-blue",
|
|
169
|
+
},
|
|
170
|
+
HJ: {
|
|
171
|
+
name: "High Junior",
|
|
172
|
+
bgcolor: "bg-hj-blue-light",
|
|
173
|
+
textcolor: "text-hj-blue",
|
|
174
|
+
},
|
|
175
|
+
AD: {
|
|
176
|
+
name: "Advanced",
|
|
177
|
+
bgcolor: "bg-gray-light",
|
|
178
|
+
textcolor: "text-gray-dark",
|
|
179
|
+
},
|
|
122
180
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
export function CardTitle({ title }) {
|
|
4
|
+
const cardTitle = {
|
|
5
|
+
display: "flex flex-row justify-center items-center",
|
|
6
|
+
sizes: "h-7 shrink-0 w-full",
|
|
7
|
+
bg: "bg-green-light",
|
|
8
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
9
|
+
};
|
|
10
|
+
return _jsx("div", { className: cn(cardTitle), children: title });
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TranscriptProps } from "../Transcript";
|
|
2
|
+
export declare const EXAM_TYPE: {
|
|
3
|
+
readonly REG: "REG";
|
|
4
|
+
readonly CMP: "CMP";
|
|
5
|
+
readonly IST: "IST";
|
|
6
|
+
readonly OLY: "OLY";
|
|
7
|
+
};
|
|
8
|
+
export type EXAM_TYPE = (typeof EXAM_TYPE)[keyof typeof EXAM_TYPE];
|
|
9
|
+
export declare function getStringfromType(ExamType: EXAM_TYPE): string;
|
|
10
|
+
export default function IdCard({ info }: {
|
|
11
|
+
info: TranscriptProps["info"];
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|