@elice/material-assignment 1.231227.0 → 1.231228.0
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/components/material-assignment/MaterialAssignment.js +13 -19
- package/cjs/components/material-assignment/MaterialAssignmentContent.js +99 -130
- package/cjs/components/material-assignment/MaterialAssignmentUploadModal.js +96 -129
- package/cjs/components/material-assignment/locales.js +2 -4
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.js +21 -26
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +9 -21
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +320 -447
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +152 -211
- package/cjs/components/shared/MaterialAssignmentContainer.js +10 -14
- package/cjs/index.js +2 -4
- package/es/components/material-assignment/MaterialAssignment.js +8 -8
- package/es/components/material-assignment/MaterialAssignmentContent.js +65 -92
- package/es/components/material-assignment/MaterialAssignmentUploadModal.js +83 -111
- package/es/components/material-assignment/locales.js +2 -2
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.js +13 -13
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +9 -15
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +231 -353
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +94 -148
- package/es/components/shared/MaterialAssignmentContainer.js +7 -6
- package/package.json +7 -7
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -388
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -377
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var reactHookForm = require('react-hook-form');
|
|
8
7
|
var reactIntl = require('react-intl');
|
|
@@ -15,18 +14,14 @@ var dayjs = require('dayjs');
|
|
|
15
14
|
var MaterialAssignmentContainer = require('../shared/MaterialAssignmentContainer.js');
|
|
16
15
|
var MaterialAssignmentAdmin_styled = require('./MaterialAssignmentAdmin.styled.js');
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa(_ref) {
|
|
24
|
-
var materialAssignmentId = _ref.materialAssignmentId,
|
|
25
|
-
userId = _ref.userId,
|
|
26
|
-
adminUserId = _ref.adminUserId;
|
|
17
|
+
const MaterialAssignmentAdminContentTa = ({
|
|
18
|
+
materialAssignmentId,
|
|
19
|
+
userId,
|
|
20
|
+
adminUserId
|
|
21
|
+
}) => {
|
|
27
22
|
var _a;
|
|
28
23
|
// Form
|
|
29
|
-
|
|
24
|
+
const gradeEditFormMethods = reactHookForm.useForm({
|
|
30
25
|
defaultValues: {
|
|
31
26
|
score: 0,
|
|
32
27
|
comment: ''
|
|
@@ -34,100 +29,67 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
34
29
|
mode: 'onChange'
|
|
35
30
|
});
|
|
36
31
|
// State related with component
|
|
37
|
-
|
|
38
|
-
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
39
|
-
showGradeEditModal = _React$useState2[0],
|
|
40
|
-
setShowGradeEditModal = _React$useState2[1];
|
|
32
|
+
const [showGradeEditModal, setShowGradeEditModal] = React.useState(false);
|
|
41
33
|
// State related with api
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var _React$useState7 = React__default["default"].useState(null),
|
|
51
|
-
_React$useState8 = _rollupPluginBabelHelpers.slicedToArray(_React$useState7, 2),
|
|
52
|
-
userSubmission = _React$useState8[0],
|
|
53
|
-
setUserSubmission = _React$useState8[1];
|
|
54
|
-
var _React$useState9 = React__default["default"].useState(null),
|
|
55
|
-
_React$useState10 = _rollupPluginBabelHelpers.slicedToArray(_React$useState9, 2),
|
|
56
|
-
gradeResult = _React$useState10[0],
|
|
57
|
-
setGradeResult = _React$useState10[1];
|
|
58
|
-
var _React$useState11 = React__default["default"].useState(null),
|
|
59
|
-
_React$useState12 = _rollupPluginBabelHelpers.slicedToArray(_React$useState11, 2),
|
|
60
|
-
myGrade = _React$useState12[0],
|
|
61
|
-
setMyGrade = _React$useState12[1];
|
|
62
|
-
var isAssignmentClosed = dayjs__default["default"]().isAfter(dayjs__default["default"](materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime));
|
|
63
|
-
var isScoreFinalized = Boolean(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.scoreFinalizedDatetime);
|
|
64
|
-
var isUserSubmitted = Boolean(userSubmission);
|
|
34
|
+
const [user, setUser] = React.useState(null);
|
|
35
|
+
const [materialAssignment, setMaterialAssignment] = React.useState(null);
|
|
36
|
+
const [userSubmission, setUserSubmission] = React.useState(null);
|
|
37
|
+
const [gradeResult, setGradeResult] = React.useState(null);
|
|
38
|
+
const [myGrade, setMyGrade] = React.useState(null);
|
|
39
|
+
const isAssignmentClosed = dayjs().isAfter(dayjs(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime));
|
|
40
|
+
const isScoreFinalized = Boolean(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.scoreFinalizedDatetime);
|
|
41
|
+
const isUserSubmitted = Boolean(userSubmission);
|
|
65
42
|
// API Status
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
submissionListGetStatus = _React$useState14[0],
|
|
70
|
-
setSubmissionListGetStatus = _React$useState14[1];
|
|
71
|
-
var fetchUserGet = React__default["default"].useCallback(function () {
|
|
43
|
+
const isReady = materialSharedUtils.useMaterialConfigApiClientUpdate(apiClient.config.init);
|
|
44
|
+
const [submissionListGetStatus, setSubmissionListGetStatus] = React.useState('idle');
|
|
45
|
+
const fetchUserGet = React.useCallback(() => {
|
|
72
46
|
void apiClient.getOrgUserGet({
|
|
73
|
-
userId
|
|
74
|
-
}).then(
|
|
75
|
-
return res.user;
|
|
76
|
-
}).then(setUser);
|
|
47
|
+
userId
|
|
48
|
+
}).then(res => res.user).then(setUser);
|
|
77
49
|
}, [userId]);
|
|
78
|
-
|
|
50
|
+
const fetchMaterialAssignmentGet = React.useCallback(() => {
|
|
79
51
|
void apiClient.getOrgMaterialAssignmentGet({
|
|
80
|
-
materialAssignmentId
|
|
81
|
-
}).then(
|
|
82
|
-
return res.materialAssignment;
|
|
83
|
-
}).then(setMaterialAssignment);
|
|
52
|
+
materialAssignmentId
|
|
53
|
+
}).then(res => res.materialAssignment).then(setMaterialAssignment);
|
|
84
54
|
}, [materialAssignmentId]);
|
|
85
|
-
|
|
55
|
+
const fetchSubmissionList = React.useCallback(() => {
|
|
86
56
|
setSubmissionListGetStatus('pending');
|
|
87
57
|
void apiClient.getOrgMaterialAssignmentSubmissionList({
|
|
88
|
-
materialAssignmentId
|
|
58
|
+
materialAssignmentId,
|
|
89
59
|
offset: 0,
|
|
90
60
|
count: 1,
|
|
91
61
|
filterConditions: {
|
|
92
62
|
isLast: true,
|
|
93
63
|
userIds: [userId]
|
|
94
64
|
}
|
|
95
|
-
}).then(
|
|
96
|
-
return res.materialAssignmentSubmissions[0];
|
|
97
|
-
}).then(function (submission) {
|
|
65
|
+
}).then(res => res.materialAssignmentSubmissions[0]).then(submission => {
|
|
98
66
|
setUserSubmission(submission !== null && submission !== void 0 ? submission : null);
|
|
99
67
|
setSubmissionListGetStatus('resolved');
|
|
100
|
-
}).catch(
|
|
68
|
+
}).catch(err => {
|
|
101
69
|
console.error(err);
|
|
102
70
|
setSubmissionListGetStatus('rejected');
|
|
103
71
|
});
|
|
104
72
|
}, [materialAssignmentId, userId]);
|
|
105
|
-
|
|
73
|
+
const fetchGradeResult = React.useCallback(() => {
|
|
106
74
|
void apiClient.getOrgMaterialAssignmentGradeResultGet({
|
|
107
|
-
materialAssignmentId
|
|
108
|
-
userId
|
|
109
|
-
}).then(
|
|
110
|
-
return res.materialAssignmentGradeResult;
|
|
111
|
-
}).then(setGradeResult).catch(function () {
|
|
75
|
+
materialAssignmentId,
|
|
76
|
+
userId
|
|
77
|
+
}).then(res => res.materialAssignmentGradeResult).then(setGradeResult).catch(() => {
|
|
112
78
|
setGradeResult(null);
|
|
113
79
|
});
|
|
114
80
|
}, [materialAssignmentId, userId]);
|
|
115
|
-
|
|
81
|
+
const fetchMyGrade = React.useCallback(() => {
|
|
116
82
|
void apiClient.getOrgMaterialAssignmentGradeList({
|
|
117
|
-
materialAssignmentId
|
|
83
|
+
materialAssignmentId,
|
|
118
84
|
offset: 0,
|
|
119
85
|
count: 1,
|
|
120
86
|
filterConditions: {
|
|
121
|
-
userId
|
|
87
|
+
userId,
|
|
122
88
|
gradeUserId: adminUserId
|
|
123
89
|
}
|
|
124
|
-
}).then(
|
|
125
|
-
return res.materialAssignmentGrades[0];
|
|
126
|
-
}).then(function (grade) {
|
|
127
|
-
return setMyGrade(grade !== null && grade !== void 0 ? grade : null);
|
|
128
|
-
});
|
|
90
|
+
}).then(res => res.materialAssignmentGrades[0]).then(grade => setMyGrade(grade !== null && grade !== void 0 ? grade : null));
|
|
129
91
|
}, [adminUserId, materialAssignmentId, userId]);
|
|
130
|
-
|
|
92
|
+
const handleGradeEditClick = () => {
|
|
131
93
|
var _a, _b;
|
|
132
94
|
setShowGradeEditModal(true);
|
|
133
95
|
gradeEditFormMethods.reset({
|
|
@@ -135,47 +97,28 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
135
97
|
comment: (_b = myGrade === null || myGrade === void 0 ? void 0 : myGrade.comment) !== null && _b !== void 0 ? _b : ''
|
|
136
98
|
});
|
|
137
99
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
_context.prev = 8;
|
|
161
|
-
_context.t0 = _context["catch"](1);
|
|
162
|
-
console.error(_context.t0);
|
|
163
|
-
blocks.Notification.error('오류가 발생했습니다.');
|
|
164
|
-
case 12:
|
|
165
|
-
_context.prev = 12;
|
|
166
|
-
setShowGradeEditModal(false);
|
|
167
|
-
return _context.finish(12);
|
|
168
|
-
case 15:
|
|
169
|
-
case "end":
|
|
170
|
-
return _context.stop();
|
|
171
|
-
}
|
|
172
|
-
}, _callee, null, [[1, 8, 12, 15]]);
|
|
173
|
-
}));
|
|
174
|
-
return function (_x) {
|
|
175
|
-
return _ref3.apply(this, arguments);
|
|
176
|
-
};
|
|
177
|
-
}());
|
|
178
|
-
React__default["default"].useEffect(function () {
|
|
100
|
+
const handleGradeEditSubmit = gradeEditFormMethods.handleSubmit(async ({
|
|
101
|
+
score,
|
|
102
|
+
comment
|
|
103
|
+
}) => {
|
|
104
|
+
try {
|
|
105
|
+
await apiClient.postOrgMaterialAssignmentGradeEdit({
|
|
106
|
+
materialAssignmentGradeId: myGrade === null || myGrade === void 0 ? void 0 : myGrade.id,
|
|
107
|
+
materialAssignmentId,
|
|
108
|
+
userId,
|
|
109
|
+
score,
|
|
110
|
+
comment
|
|
111
|
+
});
|
|
112
|
+
fetchMyGrade();
|
|
113
|
+
blocks.Notification.success('저장되었습니다');
|
|
114
|
+
} catch (err) {
|
|
115
|
+
console.error(err);
|
|
116
|
+
blocks.Notification.error('오류가 발생했습니다.');
|
|
117
|
+
} finally {
|
|
118
|
+
setShowGradeEditModal(false);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
React.useEffect(() => {
|
|
179
122
|
if (!isReady) {
|
|
180
123
|
return;
|
|
181
124
|
}
|
|
@@ -185,114 +128,114 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
185
128
|
fetchSubmissionList();
|
|
186
129
|
fetchMaterialAssignmentGet();
|
|
187
130
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
188
|
-
|
|
131
|
+
const renderHeader = () => {
|
|
189
132
|
var _a;
|
|
190
|
-
return
|
|
133
|
+
return React.createElement(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeader, {
|
|
191
134
|
align: "center",
|
|
192
135
|
padding: "1rem",
|
|
193
136
|
width: "100%"
|
|
194
|
-
},
|
|
137
|
+
}, React.createElement(blocks.Flex, {
|
|
195
138
|
auto: true,
|
|
196
139
|
align: "center"
|
|
197
|
-
},
|
|
140
|
+
}, React.createElement(blocks.ProfileImage, {
|
|
198
141
|
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
199
142
|
width: "2.5rem",
|
|
200
143
|
height: "2.5rem"
|
|
201
|
-
}),
|
|
144
|
+
}), React.createElement(blocks.Hspace, {
|
|
202
145
|
width: 1
|
|
203
|
-
}),
|
|
146
|
+
}), React.createElement(blocks.Text, {
|
|
204
147
|
size: "small",
|
|
205
148
|
role: "warmwhite"
|
|
206
|
-
}, user === null || user === void 0 ? void 0 : user.fullname)),
|
|
149
|
+
}, user === null || user === void 0 ? void 0 : user.fullname)), React.createElement(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, null, React.createElement(blocks.Text, {
|
|
207
150
|
size: "tiny",
|
|
208
151
|
role: "gray4"
|
|
209
|
-
}, "\uC810\uC218"),
|
|
152
|
+
}, "\uC810\uC218"), React.createElement(blocks.Text, {
|
|
210
153
|
size: "small",
|
|
211
154
|
role: "white"
|
|
212
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
155
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? `${gradeResult.score}점(공개됨)` : '--')), React.createElement(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, null, React.createElement(blocks.Text, {
|
|
213
156
|
size: "tiny",
|
|
214
157
|
role: "gray4"
|
|
215
|
-
}, "\uC81C\uCD9C \uC77C\uC2DC"),
|
|
158
|
+
}, "\uC81C\uCD9C \uC77C\uC2DC"), React.createElement(blocks.Text, {
|
|
216
159
|
size: "small",
|
|
217
160
|
role: "white"
|
|
218
|
-
}, userSubmission ?
|
|
161
|
+
}, userSubmission ? React.createElement(reactIntl.FormattedDate, {
|
|
219
162
|
value: userSubmission.createdDatetime,
|
|
220
163
|
dateStyle: "medium",
|
|
221
164
|
timeStyle: "short"
|
|
222
165
|
}) : '--')));
|
|
223
166
|
};
|
|
224
|
-
|
|
225
|
-
return
|
|
167
|
+
const renderGradeResult = () => {
|
|
168
|
+
return React.createElement(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminGradeWrapper, {
|
|
226
169
|
wrap: true,
|
|
227
170
|
width: "100%",
|
|
228
171
|
align: "center"
|
|
229
|
-
},
|
|
172
|
+
}, React.createElement(blocks.Flex, {
|
|
230
173
|
auto: true,
|
|
231
174
|
align: "center"
|
|
232
|
-
},
|
|
175
|
+
}, React.createElement(blocks.Text, {
|
|
233
176
|
role: "navy1",
|
|
234
177
|
size: "small",
|
|
235
178
|
lineHeight: "1.375rem"
|
|
236
|
-
}, user ?
|
|
179
|
+
}, user ? `${user.fullname} 님의 점수` : null), React.createElement(blocks.Hspace, {
|
|
237
180
|
width: 0.25
|
|
238
|
-
}),
|
|
181
|
+
}), React.createElement(blocks.Tooltip, {
|
|
239
182
|
useMaxWidth: true,
|
|
240
183
|
placement: "top",
|
|
241
184
|
title: '최종 점수는 관리자가 모든 채점자의 점수를 고려하여 반영한 후 공개됩니다.'
|
|
242
|
-
},
|
|
185
|
+
}, React.createElement(blocks.Icon, {
|
|
243
186
|
icon: icons.eilStatusInfo,
|
|
244
187
|
color: designTokens.base.color.navy1
|
|
245
|
-
})),
|
|
188
|
+
})), React.createElement(blocks.Hspace, {
|
|
246
189
|
width: 0.75
|
|
247
|
-
}),
|
|
190
|
+
}), React.createElement(blocks.Text, {
|
|
248
191
|
bold: true,
|
|
249
192
|
role: "white"
|
|
250
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
193
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? `${gradeResult.score}점(공개됨)` : '--')));
|
|
251
194
|
};
|
|
252
|
-
|
|
253
|
-
|
|
195
|
+
const renderSubmissionInfo = () => {
|
|
196
|
+
const statusText = (() => {
|
|
254
197
|
if (submissionListGetStatus === 'pending') {
|
|
255
198
|
return null;
|
|
256
199
|
}
|
|
257
200
|
switch (true) {
|
|
258
201
|
case !isUserSubmitted && isAssignmentClosed:
|
|
259
|
-
return
|
|
202
|
+
return React.createElement(blocks.Text, {
|
|
260
203
|
bold: true,
|
|
261
204
|
role: "danger",
|
|
262
205
|
size: "small"
|
|
263
206
|
}, "\uC81C\uCD9C \uAE30\uD55C \uB9CC\uB8CC");
|
|
264
207
|
case isScoreFinalized:
|
|
265
|
-
return
|
|
208
|
+
return React.createElement(blocks.Text, {
|
|
266
209
|
bold: true,
|
|
267
210
|
role: "lightpurple",
|
|
268
211
|
size: "small"
|
|
269
212
|
}, "\uCC44\uC810 \uC644\uB8CC");
|
|
270
213
|
case isUserSubmitted:
|
|
271
|
-
return
|
|
214
|
+
return React.createElement(blocks.Text, {
|
|
272
215
|
bold: true,
|
|
273
216
|
role: "success",
|
|
274
217
|
size: "small"
|
|
275
218
|
}, "\uC81C\uCD9C\uB428");
|
|
276
219
|
case !isUserSubmitted:
|
|
277
|
-
return
|
|
220
|
+
return React.createElement(blocks.Text, {
|
|
278
221
|
bold: true,
|
|
279
222
|
role: "warning",
|
|
280
223
|
size: "small"
|
|
281
224
|
}, "\uBBF8\uC81C\uCD9C");
|
|
282
225
|
}
|
|
283
|
-
}();
|
|
284
|
-
|
|
226
|
+
})();
|
|
227
|
+
const submissionAttachment = (() => {
|
|
285
228
|
if (!userSubmission) {
|
|
286
229
|
return '--';
|
|
287
230
|
}
|
|
288
231
|
if (userSubmission.assignmentFileUrl) {
|
|
289
|
-
|
|
290
|
-
return
|
|
232
|
+
const assignmentFilename = decodeURIComponent(userSubmission.assignmentFileUrl && new URL(userSubmission.assignmentFileUrl).pathname.split('/').pop() || '');
|
|
233
|
+
return React.createElement("a", {
|
|
291
234
|
href: userSubmission.assignmentFileUrl,
|
|
292
235
|
download: assignmentFilename,
|
|
293
236
|
target: "_blank",
|
|
294
237
|
rel: "noopener noreferrer"
|
|
295
|
-
},
|
|
238
|
+
}, React.createElement(blocks.Text, {
|
|
296
239
|
hoverable: true,
|
|
297
240
|
underline: true,
|
|
298
241
|
role: "white",
|
|
@@ -300,33 +243,33 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
300
243
|
}, assignmentFilename));
|
|
301
244
|
}
|
|
302
245
|
if (userSubmission === null || userSubmission === void 0 ? void 0 : userSubmission.assignmentUrl) {
|
|
303
|
-
return
|
|
246
|
+
return React.createElement("a", {
|
|
304
247
|
href: userSubmission.assignmentUrl,
|
|
305
248
|
target: "_blank",
|
|
306
249
|
rel: "noopener noreferrer"
|
|
307
|
-
},
|
|
250
|
+
}, React.createElement(blocks.Text, {
|
|
308
251
|
hoverable: true,
|
|
309
252
|
underline: true,
|
|
310
253
|
role: "white",
|
|
311
254
|
size: "small"
|
|
312
255
|
}, userSubmission.assignmentUrl));
|
|
313
256
|
}
|
|
314
|
-
}();
|
|
315
|
-
return
|
|
257
|
+
})();
|
|
258
|
+
return React.createElement(blocks.InfoTable, {
|
|
316
259
|
dark: true
|
|
317
|
-
},
|
|
260
|
+
}, 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(reactIntl.FormattedDate, {
|
|
318
261
|
value: materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime,
|
|
319
262
|
dateStyle: "medium",
|
|
320
263
|
timeStyle: "short"
|
|
321
|
-
}))),
|
|
264
|
+
}))), React.createElement("tr", null, React.createElement("td", null, "\uC81C\uCD9C \uC77C\uC2DC"), React.createElement("td", null, userSubmission ? React.createElement(reactIntl.FormattedDate, {
|
|
322
265
|
value: userSubmission.createdDatetime,
|
|
323
266
|
dateStyle: "medium",
|
|
324
267
|
timeStyle: "short"
|
|
325
|
-
}) : '--')),
|
|
268
|
+
}) : '--')), React.createElement("tr", null, React.createElement("td", null, "\uC5C5\uB85C\uB4DC\uB41C \uACFC\uC81C"), React.createElement("td", null, submissionAttachment))));
|
|
326
269
|
};
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
270
|
+
const renderGrade = () => {
|
|
271
|
+
const isGradeEditDisabled = !isAssignmentClosed || !isUserSubmitted || isScoreFinalized;
|
|
272
|
+
const tooltipTitle = (() => {
|
|
330
273
|
switch (true) {
|
|
331
274
|
case isScoreFinalized:
|
|
332
275
|
return '공개 이후 채점이 불가합니다.';
|
|
@@ -335,38 +278,38 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
335
278
|
case !isUserSubmitted:
|
|
336
279
|
return '미제출인 경우 채점할 수 없습니다.';
|
|
337
280
|
}
|
|
338
|
-
}();
|
|
339
|
-
return
|
|
281
|
+
})();
|
|
282
|
+
return React.createElement(blocks.Flex, {
|
|
340
283
|
column: true,
|
|
341
284
|
align: "center"
|
|
342
|
-
},
|
|
285
|
+
}, React.createElement(blocks.Flex, {
|
|
343
286
|
align: "center",
|
|
344
287
|
width: "100%"
|
|
345
|
-
},
|
|
288
|
+
}, React.createElement(blocks.Flex, {
|
|
346
289
|
column: true,
|
|
347
290
|
auto: true
|
|
348
|
-
},
|
|
291
|
+
}, React.createElement(blocks.Text, {
|
|
349
292
|
block: true,
|
|
350
293
|
bold: true,
|
|
351
294
|
role: "white",
|
|
352
295
|
lineHeight: 1.375
|
|
353
|
-
}, "\uB0B4 \uCC44\uC810"),
|
|
296
|
+
}, "\uB0B4 \uCC44\uC810"), React.createElement(blocks.Text, {
|
|
354
297
|
block: true,
|
|
355
298
|
size: "tiny",
|
|
356
299
|
role: "navy3",
|
|
357
300
|
lineHeight: 1.6
|
|
358
|
-
}, "\uB0B4\uAC00 \uB9E4\uAE34 \uD3C9\uAC00\uC640 \uAD00\uB828\uB41C \uC815\uBCF4\uB97C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4.")),
|
|
301
|
+
}, "\uB0B4\uAC00 \uB9E4\uAE34 \uD3C9\uAC00\uC640 \uAD00\uB828\uB41C \uC815\uBCF4\uB97C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4.")), React.createElement(blocks.Tooltip, {
|
|
359
302
|
placement: "top",
|
|
360
303
|
title: tooltipTitle,
|
|
361
304
|
visible: isGradeEditDisabled ? undefined : false
|
|
362
|
-
},
|
|
305
|
+
}, React.createElement("span", null, React.createElement(blocks.Button, {
|
|
363
306
|
size: "small",
|
|
364
307
|
role: "lightpurple",
|
|
365
308
|
disabled: isGradeEditDisabled,
|
|
366
309
|
onClick: handleGradeEditClick
|
|
367
|
-
}, Boolean(myGrade) ? '내 채점 수정' : '내 채점 시작')))),
|
|
310
|
+
}, Boolean(myGrade) ? '내 채점 수정' : '내 채점 시작')))), React.createElement(blocks.Vspace, {
|
|
368
311
|
height: 0.75
|
|
369
|
-
}),
|
|
312
|
+
}), React.createElement(blocks.TableNext, {
|
|
370
313
|
dark: true,
|
|
371
314
|
emptyMessage: "\uC544\uC9C1 \uCC44\uC810\uC744 \uC2DC\uC791\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.",
|
|
372
315
|
columns: [{
|
|
@@ -381,21 +324,21 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
381
324
|
textAlign: 'left'
|
|
382
325
|
}],
|
|
383
326
|
data: myGrade ? [{
|
|
384
|
-
fullname:
|
|
327
|
+
fullname: React.createElement(blocks.Flex, {
|
|
385
328
|
paddingy: "0.25rem"
|
|
386
|
-
},
|
|
329
|
+
}, React.createElement(blocks.Text, {
|
|
387
330
|
noWrap: true,
|
|
388
331
|
role: "navy0",
|
|
389
332
|
size: "small"
|
|
390
|
-
}, myGrade.gradeUser.fullname),
|
|
333
|
+
}, myGrade.gradeUser.fullname), React.createElement(blocks.Hspace, {
|
|
391
334
|
width: 0.25
|
|
392
|
-
}),
|
|
335
|
+
}), React.createElement(blocks.Text, {
|
|
393
336
|
ellipsis: true,
|
|
394
337
|
role: "navy3",
|
|
395
338
|
size: "small"
|
|
396
339
|
}, myGrade.gradeUser.email)),
|
|
397
340
|
grade: myGrade.score,
|
|
398
|
-
created:
|
|
341
|
+
created: React.createElement(reactIntl.FormattedDate, {
|
|
399
342
|
value: myGrade.createdDatetime,
|
|
400
343
|
dateStyle: "medium",
|
|
401
344
|
timeStyle: "short"
|
|
@@ -403,11 +346,11 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
403
346
|
}] : []
|
|
404
347
|
}));
|
|
405
348
|
};
|
|
406
|
-
|
|
349
|
+
const renderGradeEditModal = () => {
|
|
407
350
|
if (!showGradeEditModal) {
|
|
408
351
|
return null;
|
|
409
352
|
}
|
|
410
|
-
return
|
|
353
|
+
return React.createElement(blocks.Modal, {
|
|
411
354
|
title: Boolean(myGrade) ? '내 채점 수정' : '과제 채점',
|
|
412
355
|
footerButtons: [{
|
|
413
356
|
label: '확인',
|
|
@@ -420,22 +363,22 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
420
363
|
label: '취소',
|
|
421
364
|
size: 'small',
|
|
422
365
|
role: 'gray1',
|
|
423
|
-
onClick:
|
|
366
|
+
onClick: () => {
|
|
424
367
|
setShowGradeEditModal(false);
|
|
425
368
|
}
|
|
426
369
|
}],
|
|
427
|
-
onHide:
|
|
370
|
+
onHide: () => {
|
|
428
371
|
setShowGradeEditModal(false);
|
|
429
372
|
}
|
|
430
|
-
},
|
|
373
|
+
}, React.createElement(blocks.Label, {
|
|
431
374
|
bold: true,
|
|
432
375
|
block: true,
|
|
433
376
|
required: true
|
|
434
|
-
}, "\uC810\uC218"),
|
|
377
|
+
}, "\uC810\uC218"), React.createElement(blocks.Vspace, {
|
|
435
378
|
height: 0.5
|
|
436
|
-
}),
|
|
379
|
+
}), React.createElement(blocks.Flex, {
|
|
437
380
|
align: "center"
|
|
438
|
-
},
|
|
381
|
+
}, React.createElement(reactHookForm.Controller, {
|
|
439
382
|
control: gradeEditFormMethods.control,
|
|
440
383
|
name: "score",
|
|
441
384
|
rules: {
|
|
@@ -443,50 +386,48 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
443
386
|
min: 0,
|
|
444
387
|
max: 100
|
|
445
388
|
},
|
|
446
|
-
render:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}), React__default["default"].createElement(blocks.Hspace, {
|
|
389
|
+
render: ({
|
|
390
|
+
field,
|
|
391
|
+
fieldState
|
|
392
|
+
}) => React.createElement(blocks.Input, Object.assign({}, field, {
|
|
393
|
+
invalid: fieldState.invalid,
|
|
394
|
+
size: "small",
|
|
395
|
+
width: "xsmall",
|
|
396
|
+
type: "number"
|
|
397
|
+
}))
|
|
398
|
+
}), React.createElement(blocks.Hspace, {
|
|
457
399
|
width: 0.5
|
|
458
|
-
}),
|
|
400
|
+
}), React.createElement(blocks.Text, {
|
|
459
401
|
bold: true,
|
|
460
402
|
role: "gray9",
|
|
461
403
|
size: "small"
|
|
462
|
-
}, "\uC810"),
|
|
404
|
+
}, "\uC810"), React.createElement(blocks.Text, {
|
|
463
405
|
role: "gray6",
|
|
464
406
|
size: "small"
|
|
465
|
-
}, ' / 100점 만점')),
|
|
407
|
+
}, ' / 100점 만점')), React.createElement(blocks.Vspace, {
|
|
466
408
|
height: 1.25
|
|
467
|
-
}),
|
|
409
|
+
}), React.createElement(blocks.Label, {
|
|
468
410
|
bold: true,
|
|
469
411
|
block: true
|
|
470
|
-
}, "\uD53C\uB4DC\uBC31"),
|
|
412
|
+
}, "\uD53C\uB4DC\uBC31"), React.createElement(blocks.Vspace, {
|
|
471
413
|
height: 0.5
|
|
472
|
-
}),
|
|
414
|
+
}), React.createElement(reactHookForm.Controller, {
|
|
473
415
|
control: gradeEditFormMethods.control,
|
|
474
416
|
name: "comment",
|
|
475
417
|
rules: {
|
|
476
418
|
maxLength: 1000
|
|
477
419
|
},
|
|
478
|
-
render:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
420
|
+
render: ({
|
|
421
|
+
field
|
|
422
|
+
}) => React.createElement(blocks.Textarea, {
|
|
423
|
+
value: field.value,
|
|
424
|
+
wordLimit: 1000,
|
|
425
|
+
rows: 8,
|
|
426
|
+
onChange: field.onChange
|
|
427
|
+
})
|
|
487
428
|
}));
|
|
488
429
|
};
|
|
489
|
-
return
|
|
430
|
+
return React.createElement(React.Fragment, null, renderHeader(), React.createElement(blocks.Flex, {
|
|
490
431
|
column: true,
|
|
491
432
|
auto: true,
|
|
492
433
|
padding: "3.625rem",
|
|
@@ -494,13 +435,13 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
494
435
|
height: "100%",
|
|
495
436
|
overflow: "hidden",
|
|
496
437
|
align: "center"
|
|
497
|
-
},
|
|
438
|
+
}, React.createElement(MaterialAssignmentContainer.default, {
|
|
498
439
|
title: (_a = materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.title) !== null && _a !== void 0 ? _a : ''
|
|
499
|
-
}, renderGradeResult(),
|
|
440
|
+
}, renderGradeResult(), React.createElement(blocks.Vspace, {
|
|
500
441
|
height: 1.25
|
|
501
|
-
}), renderSubmissionInfo(),
|
|
442
|
+
}), renderSubmissionInfo(), React.createElement(blocks.Vspace, {
|
|
502
443
|
height: 1.5
|
|
503
444
|
}), renderGrade())), renderGradeEditModal());
|
|
504
445
|
};
|
|
505
446
|
|
|
506
|
-
exports
|
|
447
|
+
exports.default = MaterialAssignmentAdminContentTa;
|