@edu-tosel/design 1.0.160 → 1.0.162
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.
|
@@ -85,13 +85,41 @@ function ProgressReport({ props, }, ref) {
|
|
|
85
85
|
height: "full",
|
|
86
86
|
boundary: "border-2 border-slate-300 pt-8 pr-8",
|
|
87
87
|
background: "bg-slate-200",
|
|
88
|
-
}, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", className: "absolute left-0 bottom-0", children: _jsxs(LineChart, { data:
|
|
89
|
-
...result
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
}, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", className: "absolute left-0 bottom-0", children: _jsxs(LineChart, { data: [
|
|
89
|
+
...results.map((result) => ({
|
|
90
|
+
...result,
|
|
91
|
+
date: moment.unix(result.date).format("YY-MM-DD"),
|
|
92
|
+
})),
|
|
93
|
+
{
|
|
94
|
+
score: predict(results.slice(-1)[0].score, studentInfo.birthday),
|
|
95
|
+
date: "예상치",
|
|
96
|
+
},
|
|
97
|
+
], children: [_jsx(XAxis, { dataKey: "date" }), _jsx(YAxis, { dataKey: "score", scale: "log", domain: ["auto", "auto"] }), _jsx(Line, { type: "monotone", name: "Monthly Test", dataKey: "score", stroke: "#173A8B", fill: "#173A8B" }), _jsx(Legend, {})] }) }) }) }), _jsx("div", { className: "h-72", children: _jsxs(CardDesign, { option: {
|
|
92
98
|
width: "xl",
|
|
93
99
|
height: "full",
|
|
94
100
|
boundary: "border-2 border-slate-300 p-5",
|
|
95
101
|
}, children: [_jsxs("div", { className: "flex text-blue-navy font-bold text-lg", children: [_jsx("div", { children: commentType === "director" ? "원장님" : "TOSEL Lab" }), _jsx("div", { children: "\uC758 \uCF54\uBA58\uD2B8" })] }), _jsx("div", { className: "h-52 overflow-y-scroll scrollbar-hidden text-sm mt-2.5", children: _jsx(LineBreaks, { texts: comment }) })] }) })] })] })] }));
|
|
96
102
|
}
|
|
97
103
|
export default forwardRef(ProgressReport);
|
|
104
|
+
function predict(score, birthday) {
|
|
105
|
+
const ln = Number(birthday.slice(-1));
|
|
106
|
+
const weight = score + ln;
|
|
107
|
+
const result = () => {
|
|
108
|
+
if (weight > 90)
|
|
109
|
+
return weight + 1;
|
|
110
|
+
if (weight > 80)
|
|
111
|
+
return weight + 2;
|
|
112
|
+
if (weight > 70)
|
|
113
|
+
return weight + 3;
|
|
114
|
+
if (weight > 60)
|
|
115
|
+
return weight + 4;
|
|
116
|
+
if (weight > 50)
|
|
117
|
+
return weight + 5;
|
|
118
|
+
if (weight > 40)
|
|
119
|
+
return weight + 6;
|
|
120
|
+
return weight + 7;
|
|
121
|
+
};
|
|
122
|
+
if (result() > 100)
|
|
123
|
+
return 100;
|
|
124
|
+
return result();
|
|
125
|
+
}
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.162
|