@edu-tosel/design 1.0.357 → 1.0.359
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/interface/Card.d.ts +1 -1
- package/interface/Interview.d.ts +3 -0
- package/interface/Interview.js +6 -0
- package/interface/Property.d.ts +2 -0
- package/interface/Property.js +10 -1
- package/layout/template/home/Interviews.js +1 -1
- package/layout/template/home/News.js +1 -1
- package/layout/template/home/layout/Header.d.ts +1 -0
- package/layout/template/home/layout/Header.js +6 -12
- package/package.json +1 -1
- package/version.txt +1 -1
- package/_test/interface/Exam.d.ts +0 -56
- package/_test/interface/Exam.js +0 -55
- package/_test/interface/Property.d.ts +0 -3
- package/_test/interface/Property.js +0 -10
- package/_test/interface/index.d.ts +0 -2
- package/_test/interface/index.js +0 -2
package/interface/Card.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ButtonWidgetOption, SelectSwitchWidgetOption, SelectToggleWidgetOption
|
|
|
6
6
|
import { ReactNode } from "react";
|
|
7
7
|
import { ActionProps } from "./Action";
|
|
8
8
|
import { LabelWidget } from "./widget";
|
|
9
|
-
import { Level } from "
|
|
9
|
+
import { Level } from "./Property";
|
|
10
10
|
interface CardOption {
|
|
11
11
|
className?: string;
|
|
12
12
|
boundary?: string;
|
package/interface/Interview.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const interviewKeys: readonly ["id", "index", "category", "title", "subTitle", "content", "profile", "isValid", "createdAt", "updatedAt"];
|
|
2
2
|
export declare const interviewCategories: readonly ["LAB", "REG", "SPO", "VCO"];
|
|
3
3
|
export type InterviewCategoryType = (typeof interviewCategories)[number];
|
|
4
|
+
export declare const interviewRoles: readonly ["STUDENT", "PARENT", "TEACHER", "DIRECTOR"];
|
|
5
|
+
export type InterviewRoleType = (typeof interviewRoles)[number];
|
|
4
6
|
export interface InterviewText {
|
|
5
7
|
title: string;
|
|
6
8
|
label: string;
|
|
@@ -31,6 +33,7 @@ export interface Interview {
|
|
|
31
33
|
subTitle: string;
|
|
32
34
|
content?: InterviewContent[] | null;
|
|
33
35
|
profile?: InterviewProfile | null;
|
|
36
|
+
role: InterviewRoleType;
|
|
34
37
|
isValid: boolean;
|
|
35
38
|
createdAt: Date;
|
|
36
39
|
updatedAt: Date;
|
package/interface/Interview.js
CHANGED
package/interface/Property.d.ts
CHANGED
package/interface/Property.js
CHANGED
|
@@ -14,7 +14,7 @@ export default function Interviews({ interviews, onClick }) {
|
|
|
14
14
|
})
|
|
15
15
|
.slice(0, 3); // 최대 3개만 선택
|
|
16
16
|
}, [interviews]);
|
|
17
|
-
return (_jsx("div", { className: "w-full bg-[#0a0e27] py-16 px-5 md:px-8", children: _jsxs("div", { className: "max-w-7xl mx-auto", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-start md:items-center mb-12", children: [_jsxs("div", { className: "flex flex-col gap-2 mb-4 md:mb-0", children: [_jsx("div", { className: "text-[#5b9bd5] text-sm md:text-base font-semibold", children: "SUCCESS STORIES" }), _jsx("h2", { className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white", children: "TOSEL\uACFC \uD568\uAED8 \uC131\uC7A5\uD55C \uD559\uC0DD\uB4E4" })] }), _jsx("button", { onClick: (e) => onClick(e), className: "text-white underline text-sm md:text-base hover:text-[#5b9bd5] transition-colors", children: "\uB354 \uB9CE\uC740 \uC0AC\uB840 \uBCF4\uAE30" })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8", children: sortedInterviews.map((interview, index) => {
|
|
17
|
+
return (_jsx("div", { className: "w-full bg-[#0a0e27] py-16 px-5 md:px-8 font-pretendard-var", children: _jsxs("div", { className: "max-w-7xl mx-auto", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-start md:items-center mb-12", children: [_jsxs("div", { className: "flex flex-col gap-2 mb-4 md:mb-0", children: [_jsx("div", { className: "text-[#5b9bd5] text-sm md:text-base font-semibold", children: "SUCCESS STORIES" }), _jsx("h2", { className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white", children: "TOSEL\uACFC \uD568\uAED8 \uC131\uC7A5\uD55C \uD559\uC0DD\uB4E4" })] }), _jsx("button", { onClick: (e) => onClick(e), className: "text-white underline text-sm md:text-base hover:text-[#5b9bd5] transition-colors", children: "\uB354 \uB9CE\uC740 \uC0AC\uB840 \uBCF4\uAE30" })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8", children: sortedInterviews.map((interview, index) => {
|
|
18
18
|
if (!interview.profile)
|
|
19
19
|
return null;
|
|
20
20
|
const { profile } = interview;
|
|
@@ -99,7 +99,7 @@ export default function News({ newsList }) {
|
|
|
99
99
|
const rightDateText = {
|
|
100
100
|
textStyles: "text-xs md:text-sm text-gray-600 whitespace-nowrap",
|
|
101
101
|
};
|
|
102
|
-
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(leftCont), children: _jsx("article", { className: cn(mainArticle), children: _jsx("a", { href: "#", className: "block", children: _jsxs("div", { className: cn(imgArea), children: [_jsx("div", { className: cn(imgElm), style: { backgroundImage: `url(${selectedNews.main.imgUrl})` } }), _jsxs("div", { className: cn(textElm), children: [_jsx("h3", { className: cn(newsTitle), children: selectedNews.main.title }), selectedNews.main.subTitle && (_jsx("div", { className: cn(newsDesc), children: selectedNews.main.subTitle }))] })] }) }) }) }), _jsx("div", { className: cn(rightCont), children: selectedNews.sub.map((news) => {
|
|
102
|
+
return (_jsxs("div", { className: cn(container, "font-pretendard-var"), children: [_jsx("div", { className: cn(leftCont), children: _jsx("article", { className: cn(mainArticle), children: _jsx("a", { href: "#", className: "block", children: _jsxs("div", { className: cn(imgArea), children: [_jsx("div", { className: cn(imgElm), style: { backgroundImage: `url(${selectedNews.main.imgUrl})` } }), _jsxs("div", { className: cn(textElm), children: [_jsx("h3", { className: cn(newsTitle), children: selectedNews.main.title }), selectedNews.main.subTitle && (_jsx("div", { className: cn(newsDesc), children: selectedNews.main.subTitle }))] })] }) }) }) }), _jsx("div", { className: cn(rightCont), children: selectedNews.sub.map((news) => {
|
|
103
103
|
const newsDate = new Date(news.createdAt);
|
|
104
104
|
return (_jsx("div", { className: cn(rightItem), children: _jsxs("a", { href: "#", className: cn(rightItemLink), children: [_jsxs("div", { className: cn(textArea), children: [_jsx("h5", { className: cn(rightTitle), children: news.title }), news.subTitle && (_jsx("p", { className: cn(rightDesc), children: news.subTitle }))] }), _jsx("div", { className: cn(rightDateArea), children: _jsx("span", { className: cn(rightDateText), children: formatDate(newsDate) }) })] }) }, news.id));
|
|
105
105
|
}) })] }));
|
|
@@ -226,18 +226,12 @@ export default function Header({ logo, rightButton, contents, }) {
|
|
|
226
226
|
};
|
|
227
227
|
}, []);
|
|
228
228
|
const activeMenu = hoveredIndex !== null ? contents[hoveredIndex]?.menu : null;
|
|
229
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { ref: headerRef, className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(leftWrapper), children: [_jsx("div", { onClick: logo.onClick, children: logo.node }), _jsxs("div", { className: cn(essenstialsWrapper), id: "buttonArea", children: [rightButton && rightButton, _jsx("button", { onClick: toggleHeight, className: cn(menuButton), children: _jsx("div", { className: "w-6 h-6", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [!isExpanded && (_jsx("path", { id: "menu", fill: "#B0B8C1", d: "M4.118 6.2h16a1.2 1.2 0 100-2.4h-16a1.2 1.2 0 100 2.4m16 4.6h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4m0 7h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4", "fill-rule": "evenodd" })), isExpanded && (_jsx("path", { id: "close", fill: "#B0B8C1", "fill-rule": "evenodd", d: "M13.815 12l5.651-5.651a1.2 1.2 0 00-1.697-1.698l-5.651 5.652-5.652-5.652a1.201 1.201 0 00-1.697 1.698L10.421 12l-5.652 5.651a1.202 1.202 0 00.849 2.049c.307 0 .614-.117.848-.351l5.652-5.652 5.651 5.652a1.198 1.198 0 001.697 0 1.2 1.2 0 000-1.698L13.815 12z" }))] }) }) })] })] }), _jsxs("div", { ref: menuContentRef, className: cn(rightWrapper), children: [_jsx("div", { className: cn(buttonBoxWrapper), children: contents.map((button, index) => (_jsx("div", { className: "relative", onMouseEnter: () => handleMouseEnter(index), onMouseLeave: handleMouseLeave, children: _jsx("button", { onClick: button.onClick, className: cn(buttonBox), children: button.title }) }, index))) }), _jsx("div", { className: "hidden md:block", children: rightButton && rightButton })] })] }) }), activeMenu && hoveredIndex !== null && isMD && (_jsx("div", { ref: dropdownRef, className: "fixed top-[60px] left-0 w-full bg-white shadow-lg z-50 border-t border-gray-200 hidden md:block", onMouseEnter: handleDropdownMouseEnter, onMouseLeave: handleDropdownMouseLeave, style: { maxWidth: "100vw" }, children: _jsx("div", { className: "max-w-[1200px] mx-auto px-6 md:px-12 py-4", children: _jsxs("div", { className: "flex flex-col md:flex-row gap-4 md:gap-4 lg:gap-6", children: [_jsx("div", { className: "flex-shrink-0 w-full md:w-64 lg:w-80", children: _jsxs("div", { className: "flex flex-col gap-1.5", children: [activeMenu.title.image && (_jsx("div", { className: "mb-0.5", children: _jsx("img", { src: activeMenu.title.image, alt: activeMenu.title.title, className: "w-full object-contain" }) })), _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("h3", { className: "text-xl md:text-2xl font-bold text-blue-600", children: activeMenu.title.title }), activeMenu.title.description && (_jsx("p", { className: "text-gray-600 text-xs leading-relaxed", children: activeMenu.title.description }))] }), activeMenu.title.button && (_jsx("div", { className:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
? "justify-start"
|
|
236
|
-
: ""), children: _jsx("button", { onClick: () => {
|
|
237
|
-
button.menu?.title.button?.onClick?.();
|
|
238
|
-
closeMobileMenu();
|
|
239
|
-
}, className: cn(button.menu.title.button.style ||
|
|
240
|
-
"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"), children: button.menu.title.button.title }) }))] })), button.menu.content && button.menu.content.length > 0 && (_jsx("div", { className: "px-4 py-2", children: button.menu.content.map((item, itemIndex) => (_jsxs("button", { onClick: () => {
|
|
229
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { ref: headerRef, className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(leftWrapper), children: [_jsx("div", { onClick: logo.onClick, children: logo.node }), _jsxs("div", { className: cn(essenstialsWrapper), id: "buttonArea", children: [rightButton && rightButton, _jsx("button", { onClick: toggleHeight, className: cn(menuButton), children: _jsx("div", { className: "w-6 h-6", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [!isExpanded && (_jsx("path", { id: "menu", fill: "#B0B8C1", d: "M4.118 6.2h16a1.2 1.2 0 100-2.4h-16a1.2 1.2 0 100 2.4m16 4.6h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4m0 7h-16a1.2 1.2 0 100 2.4h16a1.2 1.2 0 100-2.4", "fill-rule": "evenodd" })), isExpanded && (_jsx("path", { id: "close", fill: "#B0B8C1", "fill-rule": "evenodd", d: "M13.815 12l5.651-5.651a1.2 1.2 0 00-1.697-1.698l-5.651 5.652-5.652-5.652a1.201 1.201 0 00-1.697 1.698L10.421 12l-5.652 5.651a1.202 1.202 0 00.849 2.049c.307 0 .614-.117.848-.351l5.652-5.652 5.651 5.652a1.198 1.198 0 001.697 0 1.2 1.2 0 000-1.698L13.815 12z" }))] }) }) })] })] }), _jsxs("div", { ref: menuContentRef, className: cn(rightWrapper), children: [_jsx("div", { className: cn(buttonBoxWrapper), children: contents.map((button, index) => (_jsx("div", { className: "relative", onMouseEnter: () => handleMouseEnter(index), onMouseLeave: handleMouseLeave, children: _jsx("button", { onClick: button.onClick, className: cn(buttonBox), children: button.title }) }, index))) }), _jsx("div", { className: "hidden md:block", children: rightButton && rightButton })] })] }) }), activeMenu && hoveredIndex !== null && isMD && (_jsx("div", { ref: dropdownRef, className: "fixed top-[60px] left-0 w-full bg-white shadow-lg z-50 border-t border-gray-200 hidden md:block", onMouseEnter: handleDropdownMouseEnter, onMouseLeave: handleDropdownMouseLeave, style: { maxWidth: "100vw" }, children: _jsx("div", { className: "max-w-[1200px] mx-auto px-6 md:px-12 py-4", children: _jsxs("div", { className: "flex flex-col md:flex-row gap-4 md:gap-4 lg:gap-6", children: [_jsx("div", { className: "flex-shrink-0 w-full md:w-64 lg:w-80", children: _jsxs("div", { className: "flex flex-col gap-1.5", children: [activeMenu.title.image && (_jsx("div", { className: "mb-0.5", children: _jsx("img", { src: activeMenu.title.image, alt: activeMenu.title.title, className: "w-full object-contain" }) })), _jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-col gap-0.5 flex-1", children: [_jsx("h3", { className: cn(activeMenu.title.titleColor || "text-xl md:text-2xl font-bold text-blue-600"), children: activeMenu.title.title }), activeMenu.title.description && (_jsx("p", { className: "text-gray-600 text-xs leading-relaxed", children: activeMenu.title.description }))] }), activeMenu.title.button && (_jsx("div", { className: "flex-shrink-0", children: _jsx("button", { onClick: () => activeMenu.title.button?.onClick?.(), className: cn(activeMenu.title.button.style ||
|
|
230
|
+
"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium whitespace-nowrap"), children: activeMenu.title.button.title }) }))] })] }) }), _jsx("div", { className: "flex-1 md:border-l md:border-gray-200", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-4 md:gap-x-6 gap-y-3 h-full pt-0 md:pt-4 pl-0 md:pl-4 lg:pl-8", children: activeMenu.content.map((item, itemIndex) => (_jsxs("div", { className: "cursor-pointer group", onClick: () => item.onClick?.(), children: [_jsxs("div", { className: "flex items-center gap-2 mb-1", children: [_jsx("h4", { className: "text-base md:text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors", children: item.title }), item.tag && (_jsx("span", { className: cn("px-2 py-0.5 text-xs font-medium text-white rounded-full whitespace-nowrap", item.tag.background || "bg-blue-600"), children: item.tag.title }))] }), item.description && (_jsx("p", { className: "text-xs text-gray-600 leading-relaxed", children: item.description }))] }, itemIndex))) }) })] }) }) })), isExpanded && !isMD && (_jsxs("div", { ref: mobileMenuRef, className: "fixed inset-0 bg-white z-50 overflow-hidden flex flex-col", onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "bg-white px-4 py-3 flex items-center justify-between", children: [_jsx("div", { className: "flex items-center gap-4", children: _jsx("img", { src: "/images/logos/tosel.png", alt: "Tosel", className: "h-7" }) }), _jsx("button", { onClick: closeMobileMenu, className: "text-black w-6 h-6 flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-6 h-6", children: _jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) })] }), _jsx("div", { className: "flex-1 overflow-y-scroll", children: _jsx("div", { className: "border-b border-gray-200", children: contents.map((button, index) => (_jsxs("div", { children: [_jsxs("button", { onClick: (e) => handleMobileMenuClick(index, e), className: "w-full px-4 py-4 flex items-center justify-between border-b border-gray-100 hover:bg-gray-50 transition-colors", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "w-2 h-2 rounded-full bg-green-500" }), _jsx("span", { className: "text-gray-900 font-medium", children: button.title })] }), button.menu && (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-5 h-5 text-gray-400", children: _jsx("path", { d: "M12 4v16m8-8H4" }) }))] }), button.menu && mobileMenuIndex === index && (_jsxs("div", { className: "bg-gray-50 border-b border-gray-200 animate-in slide-in-from-top-2 duration-200", children: [button.menu.title && (_jsxs("div", { className: "px-4 py-4 border-b border-gray-200", children: [button.menu.title.image && (_jsx("div", { className: "mb-3", children: _jsx("img", { src: button.menu.title.image, alt: button.menu.title.title, className: "w-full max-w-xs h-auto object-contain" }) })), _jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-col gap-0.5 flex-1", children: [_jsx("h3", { className: "text-xl font-bold text-blue-600", children: button.menu.title.title }), button.menu.title.description && (_jsx("p", { className: "text-gray-600 text-xs leading-relaxed", children: button.menu.title.description }))] }), button.menu.title.button && (_jsx("div", { className: "flex-shrink-0", children: _jsx("button", { onClick: () => {
|
|
231
|
+
button.menu?.title.button?.onClick?.();
|
|
232
|
+
closeMobileMenu();
|
|
233
|
+
}, className: cn(button.menu.title.button.style ||
|
|
234
|
+
"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium whitespace-nowrap"), children: button.menu.title.button.title }) }))] })] })), button.menu.content && button.menu.content.length > 0 && (_jsx("div", { className: "px-4 py-2", children: button.menu.content.map((item, itemIndex) => (_jsxs("button", { onClick: () => {
|
|
241
235
|
item.onClick?.();
|
|
242
236
|
closeMobileMenu();
|
|
243
237
|
}, className: "w-full px-4 py-3 flex items-center justify-between border-b border-gray-100 hover:bg-gray-100 transition-colors text-left", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "text-gray-900 font-medium", children: item.title }), item.tag && (_jsx("span", { className: cn("px-2 py-0.5 text-xs font-medium text-white rounded-full", item.tag.background || "bg-green-500"), children: item.tag.title }))] }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-5 h-5 text-gray-400", children: _jsx("path", { d: "M12 4v16m8-8H4" }) })] }, itemIndex))) }))] }))] }, index))) }) })] }))] }));
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.359
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Level } from "./Property";
|
|
2
|
-
export interface ExamProps {
|
|
3
|
-
createdAt: number;
|
|
4
|
-
updatedAt: number;
|
|
5
|
-
id: number;
|
|
6
|
-
title: string;
|
|
7
|
-
isPublic: boolean;
|
|
8
|
-
type: EXAM_TYPE;
|
|
9
|
-
status: EXAM_STATUS;
|
|
10
|
-
date: string;
|
|
11
|
-
managerUserId: number;
|
|
12
|
-
userIds: number[];
|
|
13
|
-
}
|
|
14
|
-
export declare function formatExams(props: ExamProps[]): {
|
|
15
|
-
id: number;
|
|
16
|
-
title: string;
|
|
17
|
-
isPublic: string;
|
|
18
|
-
type: EXAM_TYPE;
|
|
19
|
-
status: string;
|
|
20
|
-
date: string;
|
|
21
|
-
managerUserId: number;
|
|
22
|
-
}[];
|
|
23
|
-
export declare const EXAM_TYPE: {
|
|
24
|
-
readonly REG: "REG";
|
|
25
|
-
readonly CMP: "CMP";
|
|
26
|
-
readonly IST: "IST";
|
|
27
|
-
readonly OLY: "OLY";
|
|
28
|
-
};
|
|
29
|
-
export type EXAM_TYPE = (typeof EXAM_TYPE)[keyof typeof EXAM_TYPE];
|
|
30
|
-
export declare const ExamTypeString: Record<EXAM_TYPE, string>;
|
|
31
|
-
export declare function returnEndDate(exam: ExamProps): string;
|
|
32
|
-
export declare const EXAM_STATUS: {
|
|
33
|
-
readonly PENDING: "pending";
|
|
34
|
-
readonly APPLYING: "applying";
|
|
35
|
-
readonly WAITING: "waiting";
|
|
36
|
-
readonly ONGOING: "ongoing";
|
|
37
|
-
readonly GRADING: "grading";
|
|
38
|
-
readonly COMPLETE: "complete";
|
|
39
|
-
};
|
|
40
|
-
export type EXAM_STATUS = (typeof EXAM_STATUS)[keyof typeof EXAM_STATUS];
|
|
41
|
-
export declare const ExamStatusString: Record<EXAM_STATUS, string>;
|
|
42
|
-
export interface Hall {
|
|
43
|
-
id: number;
|
|
44
|
-
examId: number;
|
|
45
|
-
managerUserId: number;
|
|
46
|
-
name: string;
|
|
47
|
-
addr1: string;
|
|
48
|
-
addr2: string;
|
|
49
|
-
}
|
|
50
|
-
export interface Room {
|
|
51
|
-
id: number;
|
|
52
|
-
examHallId: number;
|
|
53
|
-
name: string;
|
|
54
|
-
level: Level;
|
|
55
|
-
startTime: string;
|
|
56
|
-
}
|
package/_test/interface/Exam.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export function formatExams(props) {
|
|
2
|
-
const objs = props.map((prop) => {
|
|
3
|
-
return {
|
|
4
|
-
id: prop.id,
|
|
5
|
-
title: prop.title,
|
|
6
|
-
isPublic: prop.isPublic ? "공개" : "비공개",
|
|
7
|
-
type: prop.type,
|
|
8
|
-
status: ExamStatusString[prop.status],
|
|
9
|
-
date: prop.date,
|
|
10
|
-
managerUserId: prop.managerUserId,
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
return objs;
|
|
14
|
-
}
|
|
15
|
-
export const EXAM_TYPE = {
|
|
16
|
-
REG: "REG",
|
|
17
|
-
CMP: "CMP",
|
|
18
|
-
IST: "IST",
|
|
19
|
-
OLY: "OLY",
|
|
20
|
-
};
|
|
21
|
-
export const ExamTypeString = {
|
|
22
|
-
REG: "정기시험",
|
|
23
|
-
IST: "기관시험",
|
|
24
|
-
CMP: "경시대회",
|
|
25
|
-
OLY: "올림피아드",
|
|
26
|
-
};
|
|
27
|
-
const ExamTypeEndDate = {
|
|
28
|
-
REG: 7,
|
|
29
|
-
IST: 6,
|
|
30
|
-
CMP: 4,
|
|
31
|
-
OLY: 11,
|
|
32
|
-
};
|
|
33
|
-
export function returnEndDate(exam) {
|
|
34
|
-
const dateObj = new Date(exam.date);
|
|
35
|
-
const endDate = (day) => new Date(dateObj.getTime() - day * 24 * 60 * 60 * 1000)
|
|
36
|
-
.toISOString()
|
|
37
|
-
.split("T")[0];
|
|
38
|
-
return endDate(ExamTypeEndDate[exam.type]);
|
|
39
|
-
}
|
|
40
|
-
export const EXAM_STATUS = {
|
|
41
|
-
PENDING: "pending",
|
|
42
|
-
APPLYING: "applying",
|
|
43
|
-
WAITING: "waiting",
|
|
44
|
-
ONGOING: "ongoing",
|
|
45
|
-
GRADING: "grading",
|
|
46
|
-
COMPLETE: "complete",
|
|
47
|
-
};
|
|
48
|
-
export const ExamStatusString = {
|
|
49
|
-
pending: "승인 대기",
|
|
50
|
-
applying: "접수중",
|
|
51
|
-
waiting: "시험 대기",
|
|
52
|
-
ongoing: "시험 진행중",
|
|
53
|
-
grading: "시험 채점중",
|
|
54
|
-
complete: "결과 발표",
|
|
55
|
-
};
|
package/_test/interface/index.js
DELETED