@elice/material-assignment 1.230328.0 → 1.230418.1
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/cjs/_virtual/_rollupPluginBabelHelpers.js +393 -0
- package/cjs/components/material-assignment/MaterialAssignment.js +12 -11
- package/cjs/components/material-assignment/MaterialAssignmentContent.js +100 -105
- package/cjs/components/material-assignment/MaterialAssignmentUploadModal.js +113 -93
- package/cjs/components/material-assignment/locales.js +2 -2
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.js +19 -20
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +15 -9
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +363 -281
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +157 -126
- package/cjs/components/shared/MaterialAssignmentContainer.js +9 -9
- package/cjs/index.js +2 -2
- package/es/_virtual/_rollupPluginBabelHelpers.js +382 -0
- package/es/components/material-assignment/MaterialAssignment.js +8 -9
- package/es/components/material-assignment/MaterialAssignmentContent.js +95 -102
- package/es/components/material-assignment/MaterialAssignmentUploadModal.js +111 -93
- package/es/components/material-assignment/locales.js +2 -2
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.js +14 -17
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +15 -9
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +361 -281
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +154 -125
- package/es/components/shared/MaterialAssignmentContainer.js +6 -8
- package/package.json +8 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { useForm, Controller } from 'react-hook-form';
|
|
3
4
|
import { FormattedDate } from 'react-intl';
|
|
4
5
|
import { config, getOrgUserGet, getOrgMaterialAssignmentGet, getOrgMaterialAssignmentSubmissionList, getOrgMaterialAssignmentGradeResultGet, getOrgMaterialAssignmentGradeList, postOrgMaterialAssignmentGradeEdit } from '@elice/api-client';
|
|
5
|
-
import {
|
|
6
|
+
import { Flex, ProfileImage, Hspace, Text, Tooltip, Icon, Vspace, InfoTable, Button, TableNext, Notification, Modal, Label, Input, Textarea } from '@elice/blocks';
|
|
6
7
|
import { base } from '@elice/design-tokens';
|
|
7
8
|
import { eilStatusInfo } from '@elice/icons';
|
|
8
9
|
import { useMaterialConfigApiClientUpdate } from '@elice/material-shared-utils';
|
|
@@ -10,129 +11,173 @@ import dayjs from 'dayjs';
|
|
|
10
11
|
import MaterialAssignmentContainer from '../shared/MaterialAssignmentContainer.js';
|
|
11
12
|
import { StyledMaterialAssignmentAdminHeader, StyledMaterialAssignmentAdminHeaderCell, StyledMaterialAssignmentAdminGradeWrapper } from './MaterialAssignmentAdmin.styled.js';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
materialAssignmentId,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const gradeEditFormMethods = useForm({
|
|
14
|
+
var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa(_ref) {
|
|
15
|
+
var materialAssignmentId = _ref.materialAssignmentId,
|
|
16
|
+
userId = _ref.userId,
|
|
17
|
+
adminUserId = _ref.adminUserId;
|
|
18
|
+
var _a;
|
|
19
|
+
// Form
|
|
20
|
+
var gradeEditFormMethods = useForm({
|
|
22
21
|
defaultValues: {
|
|
23
22
|
score: 0,
|
|
24
23
|
comment: ''
|
|
25
24
|
},
|
|
26
25
|
mode: 'onChange'
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
});
|
|
27
|
+
// State related with component
|
|
28
|
+
var _React$useState = React.useState(false),
|
|
29
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
30
|
+
showGradeEditModal = _React$useState2[0],
|
|
31
|
+
setShowGradeEditModal = _React$useState2[1];
|
|
32
|
+
// State related with api
|
|
33
|
+
var _React$useState3 = React.useState(null),
|
|
34
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
35
|
+
user = _React$useState4[0],
|
|
36
|
+
setUser = _React$useState4[1];
|
|
37
|
+
var _React$useState5 = React.useState(null),
|
|
38
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
39
|
+
materialAssignment = _React$useState6[0],
|
|
40
|
+
setMaterialAssignment = _React$useState6[1];
|
|
41
|
+
var _React$useState7 = React.useState(null),
|
|
42
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
43
|
+
userSubmission = _React$useState8[0],
|
|
44
|
+
setUserSubmission = _React$useState8[1];
|
|
45
|
+
var _React$useState9 = React.useState(null),
|
|
46
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
47
|
+
gradeResult = _React$useState10[0],
|
|
48
|
+
setGradeResult = _React$useState10[1];
|
|
49
|
+
var _React$useState11 = React.useState(null),
|
|
50
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
51
|
+
myGrade = _React$useState12[0],
|
|
52
|
+
setMyGrade = _React$useState12[1];
|
|
53
|
+
var isAssignmentClosed = dayjs().isAfter(dayjs(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime));
|
|
54
|
+
var isScoreFinalized = Boolean(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.scoreFinalizedDatetime);
|
|
55
|
+
var isUserSubmitted = Boolean(userSubmission);
|
|
56
|
+
// API Status
|
|
57
|
+
var isReady = useMaterialConfigApiClientUpdate(config.init);
|
|
58
|
+
var _React$useState13 = React.useState('idle'),
|
|
59
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
60
|
+
submissionListGetStatus = _React$useState14[0],
|
|
61
|
+
setSubmissionListGetStatus = _React$useState14[1];
|
|
62
|
+
var fetchUserGet = React.useCallback(function () {
|
|
43
63
|
void getOrgUserGet({
|
|
44
|
-
userId
|
|
45
|
-
}).then(
|
|
64
|
+
userId: userId
|
|
65
|
+
}).then(function (res) {
|
|
66
|
+
return res.user;
|
|
67
|
+
}).then(setUser);
|
|
46
68
|
}, [userId]);
|
|
47
|
-
|
|
69
|
+
var fetchMaterialAssignmentGet = React.useCallback(function () {
|
|
48
70
|
void getOrgMaterialAssignmentGet({
|
|
49
|
-
materialAssignmentId
|
|
50
|
-
}).then(
|
|
71
|
+
materialAssignmentId: materialAssignmentId
|
|
72
|
+
}).then(function (res) {
|
|
73
|
+
return res.materialAssignment;
|
|
74
|
+
}).then(setMaterialAssignment);
|
|
51
75
|
}, [materialAssignmentId]);
|
|
52
|
-
|
|
76
|
+
var fetchSubmissionList = React.useCallback(function () {
|
|
53
77
|
setSubmissionListGetStatus('pending');
|
|
54
78
|
void getOrgMaterialAssignmentSubmissionList({
|
|
55
|
-
materialAssignmentId,
|
|
79
|
+
materialAssignmentId: materialAssignmentId,
|
|
56
80
|
offset: 0,
|
|
57
81
|
count: 1,
|
|
58
82
|
filterConditions: {
|
|
59
83
|
isLast: true,
|
|
60
84
|
userIds: [userId]
|
|
61
85
|
}
|
|
62
|
-
}).then(
|
|
86
|
+
}).then(function (res) {
|
|
87
|
+
return res.materialAssignmentSubmissions[0];
|
|
88
|
+
}).then(function (submission) {
|
|
63
89
|
setUserSubmission(submission !== null && submission !== void 0 ? submission : null);
|
|
64
90
|
setSubmissionListGetStatus('resolved');
|
|
65
|
-
}).catch(err
|
|
91
|
+
}).catch(function (err) {
|
|
66
92
|
console.error(err);
|
|
67
93
|
setSubmissionListGetStatus('rejected');
|
|
68
94
|
});
|
|
69
95
|
}, [materialAssignmentId, userId]);
|
|
70
|
-
|
|
96
|
+
var fetchGradeResult = React.useCallback(function () {
|
|
71
97
|
void getOrgMaterialAssignmentGradeResultGet({
|
|
72
|
-
materialAssignmentId,
|
|
73
|
-
userId
|
|
74
|
-
}).then(
|
|
98
|
+
materialAssignmentId: materialAssignmentId,
|
|
99
|
+
userId: userId
|
|
100
|
+
}).then(function (res) {
|
|
101
|
+
return res.materialAssignmentGradeResult;
|
|
102
|
+
}).then(setGradeResult).catch(function () {
|
|
75
103
|
setGradeResult(null);
|
|
76
104
|
});
|
|
77
105
|
}, [materialAssignmentId, userId]);
|
|
78
|
-
|
|
106
|
+
var fetchMyGrade = React.useCallback(function () {
|
|
79
107
|
void getOrgMaterialAssignmentGradeList({
|
|
80
|
-
materialAssignmentId,
|
|
108
|
+
materialAssignmentId: materialAssignmentId,
|
|
81
109
|
offset: 0,
|
|
82
110
|
count: 1,
|
|
83
111
|
filterConditions: {
|
|
84
|
-
userId,
|
|
112
|
+
userId: userId,
|
|
85
113
|
gradeUserId: adminUserId
|
|
86
114
|
}
|
|
87
|
-
}).then(
|
|
115
|
+
}).then(function (res) {
|
|
116
|
+
return res.materialAssignmentGrades[0];
|
|
117
|
+
}).then(function (grade) {
|
|
118
|
+
return setMyGrade(grade !== null && grade !== void 0 ? grade : null);
|
|
119
|
+
});
|
|
88
120
|
}, [adminUserId, materialAssignmentId, userId]);
|
|
89
|
-
|
|
90
|
-
const handleGradeEditClick = () => {
|
|
121
|
+
var handleGradeEditClick = function handleGradeEditClick() {
|
|
91
122
|
var _a, _b;
|
|
92
|
-
|
|
93
123
|
setShowGradeEditModal(true);
|
|
94
124
|
gradeEditFormMethods.reset({
|
|
95
125
|
score: (_a = myGrade === null || myGrade === void 0 ? void 0 : myGrade.score) !== null && _a !== void 0 ? _a : 0,
|
|
96
126
|
comment: (_b = myGrade === null || myGrade === void 0 ? void 0 : myGrade.comment) !== null && _b !== void 0 ? _b : ''
|
|
97
127
|
});
|
|
98
128
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
var handleGradeEditSubmit = gradeEditFormMethods.handleSubmit( /*#__PURE__*/function () {
|
|
130
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
131
|
+
var score, comment;
|
|
132
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
133
|
+
while (1) switch (_context.prev = _context.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
score = _ref2.score, comment = _ref2.comment;
|
|
136
|
+
_context.prev = 1;
|
|
137
|
+
_context.next = 4;
|
|
138
|
+
return postOrgMaterialAssignmentGradeEdit({
|
|
139
|
+
materialAssignmentGradeId: myGrade === null || myGrade === void 0 ? void 0 : myGrade.id,
|
|
140
|
+
materialAssignmentId: materialAssignmentId,
|
|
141
|
+
userId: userId,
|
|
142
|
+
score: score,
|
|
143
|
+
comment: comment
|
|
144
|
+
});
|
|
145
|
+
case 4:
|
|
146
|
+
fetchMyGrade();
|
|
147
|
+
Notification.success('저장되었습니다');
|
|
148
|
+
_context.next = 12;
|
|
149
|
+
break;
|
|
150
|
+
case 8:
|
|
151
|
+
_context.prev = 8;
|
|
152
|
+
_context.t0 = _context["catch"](1);
|
|
153
|
+
console.error(_context.t0);
|
|
154
|
+
Notification.error('오류가 발생했습니다.');
|
|
155
|
+
case 12:
|
|
156
|
+
_context.prev = 12;
|
|
157
|
+
setShowGradeEditModal(false);
|
|
158
|
+
return _context.finish(12);
|
|
159
|
+
case 15:
|
|
160
|
+
case "end":
|
|
161
|
+
return _context.stop();
|
|
162
|
+
}
|
|
163
|
+
}, _callee, null, [[1, 8, 12, 15]]);
|
|
164
|
+
}));
|
|
165
|
+
return function (_x) {
|
|
166
|
+
return _ref3.apply(this, arguments);
|
|
167
|
+
};
|
|
168
|
+
}());
|
|
169
|
+
React.useEffect(function () {
|
|
122
170
|
if (!isReady) {
|
|
123
171
|
return;
|
|
124
172
|
}
|
|
125
|
-
|
|
126
173
|
fetchUserGet();
|
|
127
174
|
fetchMyGrade();
|
|
128
175
|
fetchGradeResult();
|
|
129
176
|
fetchSubmissionList();
|
|
130
177
|
fetchMaterialAssignmentGet();
|
|
131
178
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
132
|
-
|
|
133
|
-
const renderHeader = () => {
|
|
179
|
+
var renderHeader = function renderHeader() {
|
|
134
180
|
var _a;
|
|
135
|
-
|
|
136
181
|
return React.createElement(StyledMaterialAssignmentAdminHeader, {
|
|
137
182
|
align: "center",
|
|
138
183
|
padding: "1rem",
|
|
@@ -155,7 +200,7 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
155
200
|
}, "\uC810\uC218"), React.createElement(Text, {
|
|
156
201
|
size: "small",
|
|
157
202
|
role: "white"
|
|
158
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
203
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? "".concat(gradeResult.score, "\uC810(\uACF5\uAC1C\uB428)") : '--')), React.createElement(StyledMaterialAssignmentAdminHeaderCell, null, React.createElement(Text, {
|
|
159
204
|
size: "tiny",
|
|
160
205
|
role: "gray4"
|
|
161
206
|
}, "\uC81C\uCD9C \uC77C\uC2DC"), React.createElement(Text, {
|
|
@@ -168,8 +213,7 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
168
213
|
hour12: false
|
|
169
214
|
}) : '--')));
|
|
170
215
|
};
|
|
171
|
-
|
|
172
|
-
const renderGradeResult = () => {
|
|
216
|
+
var renderGradeResult = function renderGradeResult() {
|
|
173
217
|
return React.createElement(StyledMaterialAssignmentAdminGradeWrapper, {
|
|
174
218
|
wrap: true,
|
|
175
219
|
width: "100%",
|
|
@@ -181,7 +225,7 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
181
225
|
role: "navy1",
|
|
182
226
|
size: "small",
|
|
183
227
|
lineHeight: "1.375rem"
|
|
184
|
-
}, user ?
|
|
228
|
+
}, user ? "".concat(user.fullname, " \uB2D8\uC758 \uC810\uC218") : null), React.createElement(Hspace, {
|
|
185
229
|
width: 0.25
|
|
186
230
|
}), React.createElement(Tooltip, {
|
|
187
231
|
useMaxWidth: true,
|
|
@@ -195,15 +239,13 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
195
239
|
}), React.createElement(Text, {
|
|
196
240
|
bold: true,
|
|
197
241
|
role: "white"
|
|
198
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
242
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? "".concat(gradeResult.score, "\uC810(\uACF5\uAC1C\uB428)") : '--')));
|
|
199
243
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const statusText = (() => {
|
|
244
|
+
var renderSubmissionInfo = function renderSubmissionInfo() {
|
|
245
|
+
var statusText = function () {
|
|
203
246
|
if (submissionListGetStatus === 'pending') {
|
|
204
247
|
return null;
|
|
205
248
|
}
|
|
206
|
-
|
|
207
249
|
switch (true) {
|
|
208
250
|
case !isUserSubmitted && isAssignmentClosed:
|
|
209
251
|
return React.createElement(Text, {
|
|
@@ -211,21 +253,18 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
211
253
|
role: "danger",
|
|
212
254
|
size: "small"
|
|
213
255
|
}, "\uC81C\uCD9C \uAE30\uD55C \uB9CC\uB8CC");
|
|
214
|
-
|
|
215
256
|
case isScoreFinalized:
|
|
216
257
|
return React.createElement(Text, {
|
|
217
258
|
bold: true,
|
|
218
259
|
role: "lightpurple",
|
|
219
260
|
size: "small"
|
|
220
261
|
}, "\uCC44\uC810 \uC644\uB8CC");
|
|
221
|
-
|
|
222
262
|
case isUserSubmitted:
|
|
223
263
|
return React.createElement(Text, {
|
|
224
264
|
bold: true,
|
|
225
265
|
role: "success",
|
|
226
266
|
size: "small"
|
|
227
267
|
}, "\uC81C\uCD9C\uB428");
|
|
228
|
-
|
|
229
268
|
case !isUserSubmitted:
|
|
230
269
|
return React.createElement(Text, {
|
|
231
270
|
bold: true,
|
|
@@ -233,15 +272,13 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
233
272
|
size: "small"
|
|
234
273
|
}, "\uBBF8\uC81C\uCD9C");
|
|
235
274
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
const submissionAttachment = (() => {
|
|
275
|
+
}();
|
|
276
|
+
var submissionAttachment = function () {
|
|
239
277
|
if (!userSubmission) {
|
|
240
278
|
return '--';
|
|
241
279
|
}
|
|
242
|
-
|
|
243
280
|
if (userSubmission.assignmentFileUrl) {
|
|
244
|
-
|
|
281
|
+
var assignmentFilename = decodeURIComponent(userSubmission.assignmentFileUrl && new URL(userSubmission.assignmentFileUrl).pathname.split('/').pop() || '');
|
|
245
282
|
return React.createElement("a", {
|
|
246
283
|
href: userSubmission.assignmentFileUrl,
|
|
247
284
|
download: assignmentFilename,
|
|
@@ -254,7 +291,6 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
254
291
|
size: "small"
|
|
255
292
|
}, assignmentFilename));
|
|
256
293
|
}
|
|
257
|
-
|
|
258
294
|
if (userSubmission === null || userSubmission === void 0 ? void 0 : userSubmission.assignmentUrl) {
|
|
259
295
|
return React.createElement("a", {
|
|
260
296
|
href: userSubmission.assignmentUrl,
|
|
@@ -267,8 +303,7 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
267
303
|
size: "small"
|
|
268
304
|
}, userSubmission.assignmentUrl));
|
|
269
305
|
}
|
|
270
|
-
}
|
|
271
|
-
|
|
306
|
+
}();
|
|
272
307
|
return React.createElement(InfoTable, {
|
|
273
308
|
dark: true
|
|
274
309
|
}, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", null, "\uC0C1\uD0DC"), React.createElement("td", null, statusText)), React.createElement("tr", null, React.createElement("td", null, "\uACFC\uC81C \uC81C\uCD9C \uAE30\uD55C"), React.createElement("td", null, React.createElement(FormattedDate, {
|
|
@@ -283,23 +318,18 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
283
318
|
hour12: false
|
|
284
319
|
}) : '--')), React.createElement("tr", null, React.createElement("td", null, "\uC5C5\uB85C\uB4DC\uB41C \uACFC\uC81C"), React.createElement("td", null, submissionAttachment))));
|
|
285
320
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
const tooltipTitle = (() => {
|
|
321
|
+
var renderGrade = function renderGrade() {
|
|
322
|
+
var isGradeEditDisabled = !isAssignmentClosed || !isUserSubmitted || isScoreFinalized;
|
|
323
|
+
var tooltipTitle = function () {
|
|
291
324
|
switch (true) {
|
|
292
325
|
case isScoreFinalized:
|
|
293
326
|
return '공개 이후 채점이 불가합니다.';
|
|
294
|
-
|
|
295
327
|
case !isAssignmentClosed:
|
|
296
328
|
return '제출 기한이 지난 이후 채점할 수 있습니다.';
|
|
297
|
-
|
|
298
329
|
case !isUserSubmitted:
|
|
299
330
|
return '미제출인 경우 채점할 수 없습니다.';
|
|
300
331
|
}
|
|
301
|
-
}
|
|
302
|
-
|
|
332
|
+
}();
|
|
303
333
|
return React.createElement(Flex, {
|
|
304
334
|
column: true,
|
|
305
335
|
align: "center"
|
|
@@ -368,12 +398,10 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
368
398
|
}] : []
|
|
369
399
|
}));
|
|
370
400
|
};
|
|
371
|
-
|
|
372
|
-
const renderGradeEditModal = () => {
|
|
401
|
+
var renderGradeEditModal = function renderGradeEditModal() {
|
|
373
402
|
if (!showGradeEditModal) {
|
|
374
403
|
return null;
|
|
375
404
|
}
|
|
376
|
-
|
|
377
405
|
return React.createElement(Modal, {
|
|
378
406
|
title: Boolean(myGrade) ? '내 채점 수정' : '과제 채점',
|
|
379
407
|
footerButtons: [{
|
|
@@ -387,11 +415,11 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
387
415
|
label: '취소',
|
|
388
416
|
size: 'small',
|
|
389
417
|
role: 'gray1',
|
|
390
|
-
onClick: ()
|
|
418
|
+
onClick: function onClick() {
|
|
391
419
|
setShowGradeEditModal(false);
|
|
392
420
|
}
|
|
393
421
|
}],
|
|
394
|
-
onHide: ()
|
|
422
|
+
onHide: function onHide() {
|
|
395
423
|
setShowGradeEditModal(false);
|
|
396
424
|
}
|
|
397
425
|
}, React.createElement(Label, {
|
|
@@ -410,15 +438,16 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
410
438
|
min: 0,
|
|
411
439
|
max: 100
|
|
412
440
|
},
|
|
413
|
-
render: ({
|
|
414
|
-
field,
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
441
|
+
render: function render(_ref4) {
|
|
442
|
+
var field = _ref4.field,
|
|
443
|
+
fieldState = _ref4.fieldState;
|
|
444
|
+
return React.createElement(Input, Object.assign({}, field, {
|
|
445
|
+
invalid: fieldState.invalid,
|
|
446
|
+
size: "small",
|
|
447
|
+
width: "xsmall",
|
|
448
|
+
type: "number"
|
|
449
|
+
}));
|
|
450
|
+
}
|
|
422
451
|
}), React.createElement(Hspace, {
|
|
423
452
|
width: 0.5
|
|
424
453
|
}), React.createElement(Text, {
|
|
@@ -441,17 +470,17 @@ const MaterialAssignmentAdminContentTa = ({
|
|
|
441
470
|
rules: {
|
|
442
471
|
maxLength: 1000
|
|
443
472
|
},
|
|
444
|
-
render: ({
|
|
445
|
-
field
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
473
|
+
render: function render(_ref5) {
|
|
474
|
+
var field = _ref5.field;
|
|
475
|
+
return React.createElement(Textarea, {
|
|
476
|
+
value: field.value,
|
|
477
|
+
wordLimit: 1000,
|
|
478
|
+
rows: 8,
|
|
479
|
+
onChange: field.onChange
|
|
480
|
+
});
|
|
481
|
+
}
|
|
452
482
|
}));
|
|
453
483
|
};
|
|
454
|
-
|
|
455
484
|
return React.createElement(React.Fragment, null, renderHeader(), React.createElement(Flex, {
|
|
456
485
|
column: true,
|
|
457
486
|
auto: true,
|
|
@@ -3,20 +3,18 @@ import { Text } from '@elice/blocks';
|
|
|
3
3
|
import { base } from '@elice/design-tokens';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var StyledMaterialAssignmentContainer = styled.div.withConfig({
|
|
7
7
|
componentId: "sc-sdhlog-0"
|
|
8
8
|
})(["height:100%;width:100%;max-width:55rem;border-radius:0.5rem;overflow:hidden;"]);
|
|
9
|
-
|
|
9
|
+
var StyledMaterialAssignmentContainerHeader = styled.div.withConfig({
|
|
10
10
|
componentId: "sc-sdhlog-1"
|
|
11
11
|
})(["padding:1rem 1.5rem;height:3.5rem;display:flex;align-items:center;background-color:", ";"], base.color.navy7);
|
|
12
|
-
|
|
12
|
+
var StyledMaterialAssignmentContainerContent = styled.div.withConfig({
|
|
13
13
|
componentId: "sc-sdhlog-2"
|
|
14
14
|
})(["padding:1.5rem;overflow-y:auto;height:calc(100% - 3.5rem);background-color:", ";"], base.color.navy8);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
children
|
|
19
|
-
}) => {
|
|
15
|
+
var MaterialAssignmentContainer = function MaterialAssignmentContainer(_ref) {
|
|
16
|
+
var title = _ref.title,
|
|
17
|
+
children = _ref.children;
|
|
20
18
|
return React.createElement(StyledMaterialAssignmentContainer, null, React.createElement(StyledMaterialAssignmentContainerHeader, null, React.createElement(Text, {
|
|
21
19
|
bold: true,
|
|
22
20
|
role: "navy0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-assignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230418.1",
|
|
4
4
|
"description": "User view and editing components of Elice material assignment",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@elice/api-client": "1.
|
|
32
|
+
"@elice/api-client": "^1.230413.0",
|
|
33
33
|
"@elice/blocks": "^1.220803.0",
|
|
34
34
|
"@elice/design-tokens": "^1.220803.0",
|
|
35
35
|
"@elice/icons": "^1.220803.0",
|
|
36
36
|
"@elice/markdown": "^1.220803.0",
|
|
37
37
|
"@elice/material-shared-types": "*",
|
|
38
38
|
"@elice/material-shared-utils": "*",
|
|
39
|
-
"@elice/types": "^1.
|
|
39
|
+
"@elice/types": "^1.230417.0",
|
|
40
40
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
41
41
|
"react-intl": "^5.0.0",
|
|
42
42
|
"react-use": "^17.0.0",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"tslib": "^2.3.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@elice/api-client": "1.
|
|
52
|
+
"@elice/api-client": "^1.230413.0",
|
|
53
53
|
"@elice/blocks": "^1.220803.0",
|
|
54
54
|
"@elice/design-tokens": "^1.220803.0",
|
|
55
55
|
"@elice/icons": "^1.220803.0",
|
|
56
56
|
"@elice/icons-legacy": "npm:@elice/icons@0.220803.1",
|
|
57
57
|
"@elice/markdown": "^1.220803.0",
|
|
58
|
-
"@elice/material-shared-types": "1.
|
|
59
|
-
"@elice/material-shared-utils": "1.
|
|
60
|
-
"@elice/types": "^1.
|
|
58
|
+
"@elice/material-shared-types": "1.230418.1",
|
|
59
|
+
"@elice/material-shared-utils": "1.230418.1",
|
|
60
|
+
"@elice/types": "^1.230417.0",
|
|
61
61
|
"@types/classnames": "^2.3.1",
|
|
62
62
|
"@types/react": "~17.0.9",
|
|
63
63
|
"@types/styled-components": "^5.1.21",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-use": "^17.2.4",
|
|
67
67
|
"styled-components": "^5.3.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9c1ccec857ef44c667da271e9782ca20ff713390"
|
|
70
70
|
}
|