@edu-tosel/design 1.0.195 → 1.0.197

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.
Files changed (28) hide show
  1. package/layout/index.d.ts +1 -1
  2. package/layout/index.js +1 -1
  3. package/layout/template/Ticket/Extension.d.ts +12 -0
  4. package/layout/template/Ticket/Extension.js +28 -0
  5. package/layout/template/Ticket/TableExtension.d.ts +13 -0
  6. package/layout/template/Ticket/TableExtension.js +21 -0
  7. package/layout/template/Ticket/Ticket.d.ts +2 -5
  8. package/layout/template/Ticket/Ticket.design.d.ts +5 -0
  9. package/layout/template/Ticket/Ticket.design.js +78 -0
  10. package/layout/template/Ticket/Ticket.js +1 -63
  11. package/layout/template/Ticket/index.d.ts +9 -9
  12. package/layout/template/Ticket/index.js +9 -8
  13. package/layout/template/Ticket/molecule/HallNotification.molecule.d.ts +4 -0
  14. package/layout/template/Ticket/molecule/HallNotification.molecule.js +12 -0
  15. package/layout/template/Ticket/molecule/OmrNotification.molecule.d.ts +3 -0
  16. package/layout/template/Ticket/molecule/OmrNotification.molecule.js +10 -0
  17. package/layout/template/Ticket/molecule/RuleNotification.molecule.d.ts +3 -0
  18. package/layout/template/Ticket/molecule/RuleNotification.molecule.js +10 -0
  19. package/layout/template/Ticket/molecule/TableButtons.molecule.d.ts +6 -0
  20. package/layout/template/Ticket/molecule/TableButtons.molecule.js +16 -0
  21. package/package.json +1 -1
  22. package/version.txt +1 -1
  23. package/layout/template/Ticket/Layout.d.ts +0 -8
  24. package/layout/template/Ticket/Layout.js +0 -54
  25. package/layout/template/Ticket/academy/Academy.d.ts +0 -20
  26. package/layout/template/Ticket/academy/Academy.js +0 -154
  27. package/layout/template/Ticket/academy/AcademyTicket.d.ts +0 -21
  28. package/layout/template/Ticket/academy/AcademyTicket.js +0 -56
package/layout/index.d.ts CHANGED
@@ -22,5 +22,5 @@ export { default as RegexamLayout } from "./template/Regexam/Regexam.layout";
22
22
  export { default as BooksLayout } from "./template/Books/Books.layout";
23
23
  export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
24
24
  export { default as MonthlyProgressReport } from "./template/MonthlyProgressReport";
25
- export { default as Ticket } from "./template/Ticket";
26
25
  export { default as Transcript } from "./template/Transcript";
26
+ export { default as Ticket } from "./template/Ticket";
package/layout/index.js CHANGED
@@ -22,5 +22,5 @@ export { default as RegexamLayout } from "./template/Regexam/Regexam.layout";
22
22
  export { default as BooksLayout } from "./template/Books/Books.layout";
23
23
  export { default as LegacyLayout } from "./template/Legacy/Legacy.layout";
24
24
  export { default as MonthlyProgressReport } from "./template/MonthlyProgressReport";
25
- export { default as Ticket } from "./template/Ticket";
26
25
  export { default as Transcript } from "./template/Transcript";
26
+ export { default as Ticket } from "./template/Ticket";
@@ -0,0 +1,12 @@
1
+ import { TicketProps } from "./Ticket";
2
+ interface TicketLayoutProps {
3
+ props: TicketProps;
4
+ option?: {
5
+ omrUrl?: string;
6
+ locationUrl?: string;
7
+ ruleUrl?: string;
8
+ noPrint?: boolean;
9
+ };
10
+ }
11
+ export default function TicketExtension({ props, option }: TicketLayoutProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useReactToPrint } from "react-to-print";
3
+ import { cn } from "../../../util";
4
+ import { Label } from "../../../widget";
5
+ import Ticket from "./Ticket.design";
6
+ import { useRef } from "react";
7
+ import OmrNotificationMolecule from "./molecule/OmrNotification.molecule";
8
+ import HallNotificationMolecule from "./molecule/HallNotification.molecule";
9
+ import RuleNotificationMolecule from "./molecule/RuleNotification.molecule";
10
+ export default function TicketExtension({ props, option }) {
11
+ const { noPrint, omrUrl, locationUrl, ruleUrl } = option ?? {};
12
+ const body = {
13
+ positions: "relative justify-center items-center sm:items-start",
14
+ displays: "flex sm:flex-row flex-col",
15
+ sizes: "w-full h-fit",
16
+ spacings: "gap-x-10",
17
+ };
18
+ const ref = useRef(null);
19
+ const handlePrint = useReactToPrint({
20
+ content: () => ref.current,
21
+ });
22
+ return (_jsxs("div", { className: cn(body), children: [_jsx(Ticket, { ref: ref, props: props }), _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: [!noPrint && (_jsx("div", { className: "md:flex hidden", children: _jsx(Label.Button, { title: "\uC218\uD5D8\uD45C \uCD9C\uB825\uD558\uAE30", onClick: handlePrint, option: {
23
+ width: "md",
24
+ height: "sm",
25
+ background: "bg-white shadow-main",
26
+ text: "text-green-dark font-pretendard-var font-medium",
27
+ } }) })), omrUrl && _jsx(OmrNotificationMolecule, { omrUrl: omrUrl }), locationUrl && (_jsx(HallNotificationMolecule, { examAddress: props.exam.address, locationUrl: locationUrl })), ruleUrl && _jsx(RuleNotificationMolecule, { ruleUrl: ruleUrl })] })] }));
28
+ }
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from "react";
2
+ import { OnClick } from "../../../interface";
3
+ type ExamHallType = "hall" | "academy" | "home";
4
+ interface TableExtensionProps {
5
+ children: ReactNode;
6
+ examName: string;
7
+ examHallType: ExamHallType;
8
+ printAll: OnClick;
9
+ printOne: OnClick;
10
+ downloadExcel: OnClick;
11
+ }
12
+ export default function TableExtension({ children, examName, examHallType, printAll, printOne, downloadExcel, }: TableExtensionProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../../util";
3
+ import TableButtonsMolecule from "./molecule/TableButtons.molecule";
4
+ const examHallTypeString = {
5
+ hall: "고사장",
6
+ academy: "학원",
7
+ home: "가정",
8
+ };
9
+ export default function TableExtension({ children, examName, examHallType, printAll, printOne, downloadExcel, }) {
10
+ const container = {
11
+ displays: "flex flex-col gap-y-3",
12
+ };
13
+ const header = {
14
+ displays: "flex justify-between items-center",
15
+ sizes: "w-[510px] h-15",
16
+ boundaries: "rounded-[15px] px-5",
17
+ backgrounds: "bg-green-dark",
18
+ texts: "text-white ",
19
+ };
20
+ return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(header), children: [_jsxs("div", { className: "font-bold", children: [examName, " \uC218\uD5D8\uD45C"] }), _jsxs("div", { children: [examHallTypeString[examHallType], " \uC751\uC2DC"] })] }), children, _jsx(TableButtonsMolecule, { printAll: printAll, printOne: printOne, downloadExcel: downloadExcel })] }));
21
+ }
@@ -1,3 +1,4 @@
1
+ import { OnClick } from "../../../interface";
1
2
  export interface TicketProps {
2
3
  exam: {
3
4
  title: string;
@@ -8,12 +9,8 @@ export interface TicketProps {
8
9
  startedAt: string;
9
10
  };
10
11
  name: string;
11
- profileImageUrl?: string;
12
+ profile?: string | OnClick;
12
13
  birthday: string;
13
14
  level: string;
14
15
  code: string;
15
16
  }
16
- declare const _default: import("react").ForwardRefExoticComponent<{
17
- props: TicketProps;
18
- } & import("react").RefAttributes<HTMLDivElement>>;
19
- export default _default;
@@ -0,0 +1,5 @@
1
+ import { TicketProps } from "./Ticket";
2
+ declare const _default: import("react").ForwardRefExoticComponent<{
3
+ props: TicketProps;
4
+ } & import("react").RefAttributes<HTMLDivElement>>;
5
+ export default _default;
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState } from "react";
3
+ import { cn } from "../../../util";
4
+ import moment from "moment-timezone";
5
+ import { animated, useTransition } from "react-spring";
6
+ import SVG from "../../../asset/SVG";
7
+ function TicketDesign({ props }, ref) {
8
+ const [hover, setHover] = useState(false);
9
+ const hoverBox = {
10
+ positions: "absolute top-0 left-0",
11
+ displays: "flex flex-col gap-y-2.75 justify-center items-center",
12
+ sizes: "w-full h-full",
13
+ styles: "bg-black/50",
14
+ };
15
+ const transitions = useTransition(hover, {
16
+ from: { opacity: 0 },
17
+ enter: { opacity: 1 },
18
+ leave: { opacity: 0 },
19
+ config: { duration: 150 },
20
+ });
21
+ const { title, date, hall, room, startedAt } = props.exam;
22
+ //수험번호 섹션 디자인을 위한 배열
23
+ const numberArray = props.code.split("").map(Number);
24
+ numberArray.splice(3, 0, null);
25
+ numberArray.splice(7, 0, null);
26
+ const container = {
27
+ sizes: "w-full max-w-[340px] xs:w-[340px] h-[700px] flex flex-col justify-start",
28
+ spacings: "p-5 print:m-10",
29
+ boundaries: "border-1 border-gray-medium shadow-main",
30
+ backgrounds: "bg-white",
31
+ };
32
+ const logoWrapper = {
33
+ displays: "flex flex-row justify-between w-full mb-3",
34
+ };
35
+ const svgController = {
36
+ sizes: "h-8",
37
+ };
38
+ const titleDivider = {
39
+ sizes: "w-full h-0.5",
40
+ backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
41
+ };
42
+ const cellWrapper = {
43
+ displays: "flex flex-row",
44
+ sizes: "w-full",
45
+ boundaries: "border-1 border-gray-medium",
46
+ };
47
+ const cellTitleLarge = {
48
+ displays: "flex justify-center items-center shrink-0",
49
+ sizes: "w-21 h-6",
50
+ textstyles: "text-2xs font-medium",
51
+ backgrounds: "bg-gray-light",
52
+ };
53
+ const cellTitleSmall = {
54
+ displays: "flex justify-center items-center shrink-0",
55
+ sizes: "w-16 h-6",
56
+ textstyles: "text-2xs font-medium",
57
+ backgrounds: "bg-gray-light",
58
+ };
59
+ const cellText = {
60
+ sizes: "w-full",
61
+ displays: "flex justify-center items-center",
62
+ textstyles: "text-2xs font-medium text-black",
63
+ };
64
+ const formmatedStartedAt = moment(startedAt, "HH:mm:ss").format("HH:mm");
65
+ const formmatedEndedAt = (startTime, level) => {
66
+ const formattedStartTime = moment(startTime, "HH:mm:ss");
67
+ const endTime = level === "High Junior"
68
+ ? formattedStartTime.add(1, "hours").add(20, "minutes").format("HH:mm")
69
+ : formattedStartTime.add(1, "hours").add(10, "minutes").format("HH:mm");
70
+ return endTime;
71
+ };
72
+ return (_jsxs("div", { ref: ref, 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
73
+ ? "w-2.5 shrink-0 bg-gray-light"
74
+ : "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: [typeof props.profile !== "function" ? (_jsx("div", { className: "h-full w-full bg-cover", style: {
75
+ backgroundImage: `url(${props.profile ?? ""})`,
76
+ } })) : (typeof props.profile === "function" && (_jsxs("button", { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), onClick: props.profile, className: "w-full h-full overflow-hidden relative bg-gray-light", children: [_jsx("img", { className: "bg-cover", src: "https://tosel.cdn.ntruss.com/images/picture.png" }), transitions((styles, item) => item && (_jsxs(animated.div, { style: styles, className: cn(hoverBox), children: [_jsx(SVG.Image, {}), _jsx("div", { className: "text-white text-xs leading-none", children: "\uC0AC\uC9C4 \uBC14\uAFB8\uAE30" })] })))] }))), _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: formmatedStartedAt })] }), _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: formmatedEndedAt(startedAt, props.level) })] }), _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."] })] })] })] })] }));
77
+ }
78
+ export default forwardRef(TicketDesign);
@@ -1,63 +1 @@
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 Ticket({ props }, ref) {
6
- const { title, date, hall, room, startedAt } = props.exam;
7
- //수험번호 섹션 디자인을 위한 배열
8
- const numberArray = props.code.split("").map(Number);
9
- numberArray.splice(3, 0, null);
10
- numberArray.splice(7, 0, null);
11
- const container = {
12
- sizes: "w-full max-w-[340px] xs:w-[340px] h-[700px] flex flex-col justify-start",
13
- spacings: "p-5 print:m-10",
14
- boundaries: "border-1 border-gray-medium shadow-main",
15
- backgrounds: "bg-white",
16
- };
17
- const logoWrapper = {
18
- displays: "flex flex-row justify-between w-full mb-3",
19
- };
20
- const svgController = {
21
- sizes: "h-8",
22
- };
23
- const titleDivider = {
24
- sizes: "w-full h-0.5",
25
- backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
26
- };
27
- const cellWrapper = {
28
- displays: "flex flex-row",
29
- sizes: "w-full",
30
- boundaries: "border-1 border-gray-medium",
31
- };
32
- const cellTitleLarge = {
33
- displays: "flex justify-center items-center shrink-0",
34
- sizes: "w-21 h-6",
35
- textstyles: "text-2xs font-medium",
36
- backgrounds: "bg-gray-light",
37
- };
38
- const cellTitleSmall = {
39
- displays: "flex justify-center items-center shrink-0",
40
- sizes: "w-16 h-6",
41
- textstyles: "text-2xs font-medium",
42
- backgrounds: "bg-gray-light",
43
- };
44
- const cellText = {
45
- sizes: "w-full",
46
- displays: "flex justify-center items-center",
47
- textstyles: "text-2xs font-medium text-black",
48
- };
49
- const formmatedStartedAt = moment(startedAt, "HH:mm:ss").format("HH:mm");
50
- const formmatedEndedAt = (startTime, level) => {
51
- const formattedStartTime = moment(startTime, "HH:mm:ss");
52
- const endTime = level === "High Junior"
53
- ? formattedStartTime.add(1, "hours").add(20, "minutes").format("HH:mm")
54
- : formattedStartTime.add(1, "hours").add(10, "minutes").format("HH:mm");
55
- return endTime;
56
- };
57
- return (_jsxs("div", { ref: ref, 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
58
- ? "w-2.5 shrink-0 bg-gray-light"
59
- : "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: {
60
- backgroundImage: `url(${props.profileImageUrl ?? ""})`,
61
- } }), _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: formmatedStartedAt })] }), _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: formmatedEndedAt(startedAt, props.level) })] }), _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."] })] })] })] })] }));
62
- }
63
- export default forwardRef(Ticket);
1
+ export {};
@@ -1,10 +1,10 @@
1
- import Layout from "./Layout";
2
- import Academy from "./academy/Academy";
3
- declare const Ticket: {
4
- Academy: typeof Academy;
5
- Paper: import("react").ForwardRefExoticComponent<{
6
- props: import("./Ticket").TicketProps;
7
- } & import("react").RefAttributes<HTMLDivElement>>;
8
- Layout: typeof Layout;
9
- };
1
+ import { TicketProps } from "./Ticket";
2
+ import TicketExtension from "./Extension";
3
+ declare function Ticket(props: {
4
+ props: TicketProps;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace Ticket {
7
+ var Extension: typeof TicketExtension;
8
+ var TableExtension: typeof import("./TableExtension").default;
9
+ }
10
10
  export default Ticket;
@@ -1,9 +1,10 @@
1
- import Layout from "./Layout";
2
- import _Ticket from "./Ticket";
3
- import Academy from "./academy/Academy";
4
- const Ticket = {
5
- Academy: Academy,
6
- Paper: _Ticket,
7
- Layout,
8
- };
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import TicketDesign from "./Ticket.design";
3
+ import TicketExtension from "./Extension";
4
+ import TableExtension from "./TableExtension";
5
+ function Ticket(props) {
6
+ return _jsx(TicketDesign, { ...props });
7
+ }
8
+ Ticket.Extension = TicketExtension;
9
+ Ticket.TableExtension = TableExtension;
9
10
  export default Ticket;
@@ -0,0 +1,4 @@
1
+ export default function HallNotificationMolecule({ examAddress, locationUrl, }: {
2
+ examAddress: string;
3
+ locationUrl: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from "../../../../widget";
3
+ export default function HallNotificationMolecule({ examAddress, locationUrl, }) {
4
+ return (_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: examAddress })] }), _jsx(Label.Button, { title: "\uC9C0\uB3C4\uC5D0\uC11C \uBCF4\uAE30", onClick: () => {
5
+ window.open(locationUrl);
6
+ }, option: {
7
+ width: "sm",
8
+ height: "xs",
9
+ background: "bg-green-dark",
10
+ text: "text-white font-pretendard-var font-medium",
11
+ } })] }));
12
+ }
@@ -0,0 +1,3 @@
1
+ export default function OmrNotificationMolecule({ omrUrl, }: {
2
+ omrUrl: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from "../../../../widget";
3
+ export default function OmrNotificationMolecule({ omrUrl, }) {
4
+ return (_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: () => window.open(omrUrl), option: {
5
+ width: "sm",
6
+ height: "xs",
7
+ background: "bg-green-dark",
8
+ text: "text-white font-pretendard-var font-medium",
9
+ } })] }));
10
+ }
@@ -0,0 +1,3 @@
1
+ export default function RuleNotificationMolecule({ ruleUrl, }: {
2
+ ruleUrl: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from "../../../../widget";
3
+ export default function RuleNotificationMolecule({ ruleUrl, }) {
4
+ return (_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: () => window.open(ruleUrl), option: {
5
+ width: "sm",
6
+ height: "xs",
7
+ background: "bg-green-dark",
8
+ text: "text-white font-pretendard-var font-medium",
9
+ } })] }));
10
+ }
@@ -0,0 +1,6 @@
1
+ import { OnClick } from "@edu-tosel/design/interface";
2
+ export default function TableButtonsMolecule({ printAll, printOne, downloadExcel, }: {
3
+ printAll: OnClick;
4
+ printOne: OnClick;
5
+ downloadExcel: OnClick;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { HiOutlinePrinter } from "react-icons/hi2";
3
+ import { HiOutlineTableCells } from "react-icons/hi2";
4
+ import { cn } from "../../../../util";
5
+ export default function TableButtonsMolecule({ printAll, printOne, downloadExcel, }) {
6
+ const btn = {
7
+ displays: "flex items-center justify-center gap-2",
8
+ rounded: "rounded-lg",
9
+ backgrounds: "bg-white/50",
10
+ texts: " text-green-dark font-semibold",
11
+ shadows: "shadow-main",
12
+ sizes: "w-1/3 h-full px-2.5",
13
+ cursors: "cursor-pointer",
14
+ };
15
+ return (_jsxs("div", { className: "flex w-full h-12 gap-3", children: [_jsxs("div", { className: cn(btn), onClick: printAll, 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: printOne, children: [_jsx(HiOutlinePrinter, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uD604\uC7AC \uD559\uC0DD \uCD9C\uB825" })] }), _jsxs("div", { className: cn(btn), onClick: downloadExcel, children: [_jsx(HiOutlineTableCells, { className: "text-2xl" }), _jsx("div", { className: "text-center", children: "\uC5D1\uC140 \uB2E4\uC6B4\uB85C\uB4DC" })] })] }));
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.195",
3
+ "version": "1.0.197",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.195
1
+ 1.0.197
@@ -1,8 +0,0 @@
1
- import { TicketProps } from "./Ticket";
2
- interface TicketLayoutProps extends TicketProps {
3
- option?: {
4
- noPrint?: boolean;
5
- };
6
- }
7
- export default function Layout({ exam, name, birthday, level, code, profileImageUrl, option, }: TicketLayoutProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useReactToPrint } from "react-to-print";
3
- import { cn } from "../../../util";
4
- import { Label } from "../../../widget";
5
- import Ticket from "./Ticket";
6
- import { useRef } from "react";
7
- export default function Layout({ exam, name, birthday, level, code, profileImageUrl, option, }) {
8
- const { noPrint } = option ?? {};
9
- const container = {
10
- displays: "flex justify-center items-center",
11
- sizes: "w-full min-h-screen overflow-y-scroll",
12
- backgrounds: "bg-gray-light",
13
- };
14
- const body = {
15
- positions: "relative justify-center items-center sm:items-start",
16
- displays: "flex sm:flex-row flex-col",
17
- sizes: "w-full h-fit",
18
- spacings: "gap-x-10 m-5",
19
- };
20
- const ref = useRef(null);
21
- const handlePrint = useReactToPrint({
22
- content: () => ref.current,
23
- });
24
- return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsx(Ticket, { ref: ref, props: {
25
- exam,
26
- name,
27
- birthday,
28
- level,
29
- code,
30
- profileImageUrl,
31
- } }), _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: [!noPrint && (_jsx("div", { className: "md:flex hidden", children: _jsx(Label.Button, { title: "\uC218\uD5D8\uD45C \uCD9C\uB825\uD558\uAE30", onClick: handlePrint, option: {
32
- width: "md",
33
- height: "sm",
34
- background: "bg-white shadow-main",
35
- text: "text-green-dark font-pretendard-var font-medium",
36
- } }) })), _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: {
37
- width: "sm",
38
- height: "xs",
39
- background: "bg-green-dark",
40
- text: "text-white font-pretendard-var font-medium",
41
- } })] }), _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: exam.address })] }), _jsx(Label.Button, { title: "\uC9C0\uB3C4\uC5D0\uC11C \uBCF4\uAE30", onClick: () => {
42
- window.open(`https://map.kakao.com/?map_type=TYPE_MAP&itemId=168362793&q=${exam.address}&urlLevel=3&urlX=507920&urlY=1136302`);
43
- }, option: {
44
- width: "sm",
45
- height: "xs",
46
- background: "bg-green-dark",
47
- text: "text-white font-pretendard-var font-medium",
48
- } })] }), _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: {
49
- width: "sm",
50
- height: "xs",
51
- background: "bg-green-dark",
52
- text: "text-white font-pretendard-var font-medium",
53
- } })] })] })] }) }));
54
- }
@@ -1,20 +0,0 @@
1
- import { Level } from "../../../../_test/interface";
2
- export interface ApplicationStatus {
3
- applicationId: number | null;
4
- level: Level | null;
5
- name: string;
6
- birthday: string;
7
- code: string | null;
8
- examHallName: string | null;
9
- examHallRoomName: string | null;
10
- startTime: string;
11
- }
12
- export interface ApplicationsProps {
13
- [userId: number]: ApplicationStatus;
14
- examHallId: number;
15
- }
16
- export default function Academy({ applicationsData, examDate, examName, }: {
17
- applicationsData: ApplicationsProps;
18
- examName: string;
19
- examDate: string;
20
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,154 +0,0 @@
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
- const formatTimeToHHMM = (time) => {
54
- return moment(time, ["HH:mm:ss", "HH:mm"]).format("HH:mm");
55
- };
56
- const calculateEndTime = (startTime, level) => {
57
- const formattedStartTime = moment(startTime, "HH:mm:ss");
58
- const endTime = level === "HJ"
59
- ? formattedStartTime.add(1, "hours").add(20, "minutes").format("HH:mm")
60
- : formattedStartTime.add(1, "hours").add(10, "minutes").format("HH:mm");
61
- return endTime;
62
- };
63
- 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: {
64
- items: formattedData ?? [],
65
- renderItem: (application) => (_jsx(Row.Card, { item: toRender(application), dataField: dataField, onClick: () => handleSelectStudent(application) })),
66
- } }), _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: {
67
- display: "none",
68
- }, children: formattedData.map((student, index) => (_jsx(GroupTicket, { ref: ticketRefs.current[index], props: {
69
- exam: {
70
- title: examName,
71
- hall: student.examHallName ?? "",
72
- room: student.examHallRoomName ?? "",
73
- date: examDate,
74
- address: "",
75
- startedAt: student.startTime,
76
- endedAt: calculateEndTime(student.startTime, student.level),
77
- },
78
- name: student.name ?? "",
79
- birthday: student.birthday ?? "",
80
- profileImageUrl: "",
81
- level: LevelString[student.level ?? "PS"],
82
- code: student.code ?? "",
83
- isAll: true,
84
- } }, student.applicationId))) }), _jsx(GroupTicket, { ref: ref, props: {
85
- exam: {
86
- title: examName,
87
- hall: selectedStudent?.examHallName ?? "",
88
- room: selectedStudent?.examHallRoomName ?? "",
89
- date: examDate,
90
- address: selectedStudent?.examHallName ?? "",
91
- startedAt: formatTimeToHHMM(selectedStudent?.startTime ?? "13:10") ?? "",
92
- endedAt: calculateEndTime(selectedStudent?.startTime ?? "", selectedStudent?.level),
93
- },
94
- name: selectedStudent?.name ?? "",
95
- birthday: selectedStudent?.birthday ?? "",
96
- profileImageUrl: "",
97
- level: LevelString[selectedStudent?.level ?? "PS"],
98
- code: selectedStudent?.code ?? "",
99
- } }), _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: {
100
- width: "sm",
101
- height: "xs",
102
- background: "bg-green-dark",
103
- text: "text-white font-pretendard-var font-medium",
104
- } })] }), _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: () => {
105
- window.open(`https://map.kakao.com/?map_type=TYPE_MAP&itemId=168362793&q=${selectedStudent?.examHallName}&urlLevel=3&urlX=507920&urlY=1136302`);
106
- }, option: {
107
- width: "sm",
108
- height: "xs",
109
- background: "bg-green-dark",
110
- text: "text-white font-pretendard-var font-medium",
111
- } })] }), _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: {
112
- width: "sm",
113
- height: "xs",
114
- background: "bg-green-dark",
115
- text: "text-white font-pretendard-var font-medium",
116
- } })] })] })] }) }) }));
117
- }
118
- function toRender(obj) {
119
- return {
120
- ...obj,
121
- levelString: LevelString[obj.level ?? "PS"],
122
- formattedBirthday: formatDateToYYMMDD(obj.birthday),
123
- };
124
- }
125
- function formatDateToYYMMDD(dateString) {
126
- if (!dateString) {
127
- console.error("Invalid date string provided");
128
- return "";
129
- }
130
- const [year, month, day] = dateString.split("-");
131
- return year.slice(2) + month + day;
132
- }
133
- const dataField = {
134
- name: {
135
- title: "이름",
136
- size: 20,
137
- },
138
- formattedBirthday: {
139
- title: "생년월일",
140
- size: 25,
141
- },
142
- levelString: {
143
- title: "레벨",
144
- size: 30,
145
- },
146
- code: {
147
- title: "수험번호",
148
- size: 30,
149
- },
150
- examHallRoomName: {
151
- title: "고사실",
152
- size: 20,
153
- },
154
- };
@@ -1,21 +0,0 @@
1
- interface TicketProps {
2
- exam: {
3
- title: string;
4
- hall: string;
5
- room: string;
6
- date: string;
7
- address: string;
8
- startedAt: string;
9
- endedAt: string;
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;
@@ -1,56 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { cn } from "../../../../util";
4
- function AcademyTicket({ props }, ref) {
5
- const { title, date, hall, room, startedAt, endedAt } = props.exam;
6
- const { isAll } = props;
7
- const isAllSize = isAll ? "w-[210mm] h-[297mm] p-10" : "";
8
- //수험번호 섹션 디자인을 위한 배열
9
- const numberArray = props.code.split("").map(Number);
10
- numberArray.splice(3, 0, null);
11
- numberArray.splice(7, 0, null);
12
- const container = {
13
- sizes: "w-full max-w-[340px] xs:w-[340px] h-[700px] flex flex-col justify-start",
14
- spacings: "p-5 print:m-10",
15
- boundaries: "border-1 border-gray-medium shadow-main",
16
- backgrounds: "bg-white",
17
- };
18
- const logoWrapper = {
19
- displays: "flex flex-row justify-between w-full mb-3",
20
- };
21
- const svgController = {
22
- sizes: "h-8",
23
- };
24
- const titleDivider = {
25
- sizes: "w-full h-0.5",
26
- backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
27
- };
28
- const cellWrapper = {
29
- displays: "flex flex-row",
30
- sizes: "w-full",
31
- boundaries: "border-1 border-gray-medium",
32
- };
33
- const cellTitleLarge = {
34
- displays: "flex justify-center items-center shrink-0",
35
- sizes: "w-21 h-6",
36
- textstyles: "text-2xs font-medium",
37
- backgrounds: "bg-gray-light",
38
- };
39
- const cellTitleSmall = {
40
- displays: "flex justify-center items-center shrink-0",
41
- sizes: "w-16 h-6",
42
- textstyles: "text-2xs font-medium",
43
- backgrounds: "bg-gray-light",
44
- };
45
- const cellText = {
46
- sizes: "w-full",
47
- displays: "flex justify-center items-center",
48
- textstyles: "text-2xs font-medium text-black",
49
- };
50
- 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
51
- ? "w-2.5 shrink-0 bg-gray-light"
52
- : "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: {
53
- backgroundImage: `url(${props.profileImageUrl ?? ""})`,
54
- } }), _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: props.exam.startedAt })] }), _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: props.exam.endedAt })] }), _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."] })] })] })] })] }) }));
55
- }
56
- export default forwardRef(AcademyTicket);