@elice/material-assignment 1.240718.3 → 1.240719.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/_virtual/_rollupPluginBabelHelpers.js +383 -0
- package/cjs/components/index.js +9 -0
- package/cjs/components/material-assignment/MaterialAssignment.js +23 -17
- package/cjs/components/material-assignment/MaterialAssignmentContent.js +281 -194
- package/cjs/components/material-assignment/MaterialAssignmentUploadModal.js +181 -138
- package/cjs/components/material-assignment/constants/color.js +1 -1
- package/cjs/components/material-assignment/index.js +7 -0
- package/cjs/components/material-assignment/locales/index.js +13 -0
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.js +32 -24
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +19 -9
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +774 -548
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +436 -303
- package/cjs/components/material-assignment-admin/index.js +7 -0
- package/cjs/components/shared/MaterialAssignmentContainer.js +23 -13
- package/es/_virtual/_rollupPluginBabelHelpers.js +374 -0
- package/es/components/index.js +2 -0
- package/es/components/material-assignment/MaterialAssignment.js +18 -17
- package/es/components/material-assignment/MaterialAssignmentContent.js +276 -194
- package/es/components/material-assignment/MaterialAssignmentUploadModal.js +177 -139
- package/es/components/material-assignment/constants/color.js +1 -1
- package/es/components/material-assignment/index.js +1 -0
- package/es/components/material-assignment/locales/index.js +4 -0
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.js +29 -25
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +15 -9
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +770 -549
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +432 -304
- package/es/components/material-assignment-admin/index.js +1 -0
- package/es/components/shared/MaterialAssignmentContainer.js +19 -13
- package/package.json +9 -12
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
7
|
var React = require('react');
|
|
6
8
|
var reactHookForm = require('react-hook-form');
|
|
7
9
|
var apiClient = require('@elice/api-client');
|
|
@@ -14,121 +16,178 @@ var dayjs = require('dayjs');
|
|
|
14
16
|
var MaterialAssignmentContainer = require('../shared/MaterialAssignmentContainer.js');
|
|
15
17
|
var MaterialAssignmentAdmin_styled = require('./MaterialAssignmentAdmin.styled.js');
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
|
+
|
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
22
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultCompat(dayjs);
|
|
23
|
+
|
|
24
|
+
var FETCH_GRADE_LIST_COUNT = 5;
|
|
25
|
+
var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
26
|
+
var materialAssignmentId = _ref.materialAssignmentId,
|
|
27
|
+
userId = _ref.userId,
|
|
28
|
+
adminUserId = _ref.adminUserId,
|
|
29
|
+
updateMaterialUserBrowserResponse = _ref.updateMaterialUserBrowserResponse;
|
|
24
30
|
var _a;
|
|
25
31
|
// Form
|
|
26
|
-
|
|
32
|
+
var gradeEditFormMethods = reactHookForm.useForm({
|
|
27
33
|
defaultValues: {
|
|
28
34
|
score: 0,
|
|
29
35
|
comment: ''
|
|
30
36
|
},
|
|
31
37
|
mode: 'onChange'
|
|
32
38
|
});
|
|
33
|
-
|
|
39
|
+
var manualScoreEditFormMethods = reactHookForm.useForm({
|
|
34
40
|
defaultValues: {
|
|
35
41
|
manualScore: 0
|
|
36
42
|
},
|
|
37
43
|
mode: 'onChange'
|
|
38
44
|
});
|
|
39
45
|
// API Status
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
var isReady = materialSharedUtils.useMaterialConfigApiClientUpdate(apiClient.config.init);
|
|
47
|
+
var _React$useState = React__default.default.useState('idle'),
|
|
48
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
49
|
+
submissionListGetStatus = _React$useState2[0],
|
|
50
|
+
setSubmissionListGetStatus = _React$useState2[1];
|
|
51
|
+
var _React$useState3 = React__default.default.useState('idle'),
|
|
52
|
+
_React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
|
|
53
|
+
gradeDeleteStatus = _React$useState4[0],
|
|
54
|
+
setGradeDeleteStatus = _React$useState4[1];
|
|
43
55
|
// State related with component
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
var _React$useState5 = React__default.default.useState(false),
|
|
57
|
+
_React$useState6 = _rollupPluginBabelHelpers.slicedToArray(_React$useState5, 2),
|
|
58
|
+
showGradeEditModal = _React$useState6[0],
|
|
59
|
+
setShowGradeEditModal = _React$useState6[1];
|
|
60
|
+
var _React$useState7 = React__default.default.useState(false),
|
|
61
|
+
_React$useState8 = _rollupPluginBabelHelpers.slicedToArray(_React$useState7, 2),
|
|
62
|
+
showManualScoreEditModal = _React$useState8[0],
|
|
63
|
+
setShowManualScoreEditModal = _React$useState8[1];
|
|
64
|
+
var _React$useState9 = React__default.default.useState(null),
|
|
65
|
+
_React$useState10 = _rollupPluginBabelHelpers.slicedToArray(_React$useState9, 2),
|
|
66
|
+
selectedGradeForShow = _React$useState10[0],
|
|
67
|
+
setSelectedGradeForShow = _React$useState10[1];
|
|
68
|
+
var _React$useState11 = React__default.default.useState(null),
|
|
69
|
+
_React$useState12 = _rollupPluginBabelHelpers.slicedToArray(_React$useState11, 2),
|
|
70
|
+
selectedGradeForDelete = _React$useState12[0],
|
|
71
|
+
setSelectedGradeForDelete = _React$useState12[1];
|
|
48
72
|
// State related with api
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
var _React$useState13 = React__default.default.useState(null),
|
|
74
|
+
_React$useState14 = _rollupPluginBabelHelpers.slicedToArray(_React$useState13, 2),
|
|
75
|
+
user = _React$useState14[0],
|
|
76
|
+
setUser = _React$useState14[1];
|
|
77
|
+
var _React$useState15 = React__default.default.useState(null),
|
|
78
|
+
_React$useState16 = _rollupPluginBabelHelpers.slicedToArray(_React$useState15, 2),
|
|
79
|
+
materialAssignment = _React$useState16[0],
|
|
80
|
+
setMaterialAssignment = _React$useState16[1];
|
|
81
|
+
var _React$useState17 = React__default.default.useState(null),
|
|
82
|
+
_React$useState18 = _rollupPluginBabelHelpers.slicedToArray(_React$useState17, 2),
|
|
83
|
+
userSubmission = _React$useState18[0],
|
|
84
|
+
setUserSubmission = _React$useState18[1];
|
|
85
|
+
var _React$useState19 = React__default.default.useState(null),
|
|
86
|
+
_React$useState20 = _rollupPluginBabelHelpers.slicedToArray(_React$useState19, 2),
|
|
87
|
+
myGrade = _React$useState20[0],
|
|
88
|
+
setMyGrade = _React$useState20[1];
|
|
89
|
+
var _React$useState21 = React__default.default.useState(null),
|
|
90
|
+
_React$useState22 = _rollupPluginBabelHelpers.slicedToArray(_React$useState21, 2),
|
|
91
|
+
gradeResult = _React$useState22[0],
|
|
92
|
+
setGradeResult = _React$useState22[1];
|
|
93
|
+
var _React$useState23 = React__default.default.useState([]),
|
|
94
|
+
_React$useState24 = _rollupPluginBabelHelpers.slicedToArray(_React$useState23, 2),
|
|
95
|
+
gradeList = _React$useState24[0],
|
|
96
|
+
setGradeList = _React$useState24[1];
|
|
97
|
+
var _React$useState25 = React__default.default.useState(0),
|
|
98
|
+
_React$useState26 = _rollupPluginBabelHelpers.slicedToArray(_React$useState25, 2),
|
|
99
|
+
gradeListCount = _React$useState26[0],
|
|
100
|
+
setGradeListCount = _React$useState26[1];
|
|
101
|
+
var _React$useState27 = React__default.default.useState(1),
|
|
102
|
+
_React$useState28 = _rollupPluginBabelHelpers.slicedToArray(_React$useState27, 2),
|
|
103
|
+
gradeListPage = _React$useState28[0],
|
|
104
|
+
setGradeListPage = _React$useState28[1];
|
|
105
|
+
var gradeListOffset = (gradeListPage - 1) * FETCH_GRADE_LIST_COUNT;
|
|
106
|
+
var isAssignmentClosed = dayjs__default.default().isAfter(dayjs__default.default(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime));
|
|
107
|
+
var isScoreFinalized = Boolean(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.scoreFinalizedDatetime);
|
|
108
|
+
var isUserSubmitted = Boolean(userSubmission);
|
|
109
|
+
var fetchUserGet = React__default.default.useCallback(function () {
|
|
62
110
|
void apiClient.getOrgUserGet({
|
|
63
|
-
userId
|
|
64
|
-
}).then(
|
|
111
|
+
userId: userId
|
|
112
|
+
}).then(function (res) {
|
|
113
|
+
return res.user;
|
|
114
|
+
}).then(setUser);
|
|
65
115
|
}, [userId]);
|
|
66
|
-
|
|
116
|
+
var fetchMaterialAssignmentGet = React__default.default.useCallback(function () {
|
|
67
117
|
void apiClient.getOrgMaterialAssignmentGet({
|
|
68
|
-
materialAssignmentId
|
|
69
|
-
}).then(
|
|
118
|
+
materialAssignmentId: materialAssignmentId
|
|
119
|
+
}).then(function (res) {
|
|
120
|
+
return res.materialAssignment;
|
|
121
|
+
}).then(setMaterialAssignment);
|
|
70
122
|
}, [materialAssignmentId]);
|
|
71
|
-
|
|
123
|
+
var fetchSubmissionList = React__default.default.useCallback(function () {
|
|
72
124
|
setSubmissionListGetStatus('pending');
|
|
73
125
|
void apiClient.getOrgMaterialAssignmentSubmissionList({
|
|
74
|
-
materialAssignmentId,
|
|
126
|
+
materialAssignmentId: materialAssignmentId,
|
|
75
127
|
offset: 0,
|
|
76
128
|
count: 1,
|
|
77
129
|
filterConditions: {
|
|
78
130
|
isLast: true,
|
|
79
131
|
userIds: [userId]
|
|
80
132
|
}
|
|
81
|
-
}).then(
|
|
133
|
+
}).then(function (res) {
|
|
134
|
+
return res.materialAssignmentSubmissions[0];
|
|
135
|
+
}).then(function (submission) {
|
|
82
136
|
setUserSubmission(submission !== null && submission !== void 0 ? submission : null);
|
|
83
137
|
setSubmissionListGetStatus('resolved');
|
|
84
|
-
}).catch(err
|
|
138
|
+
}).catch(function (err) {
|
|
85
139
|
console.error(err);
|
|
86
140
|
setSubmissionListGetStatus('rejected');
|
|
87
141
|
});
|
|
88
142
|
}, [materialAssignmentId, userId]);
|
|
89
|
-
|
|
143
|
+
var fetchGradeResult = React__default.default.useCallback(function () {
|
|
90
144
|
void apiClient.getOrgMaterialAssignmentGradeResultGet({
|
|
91
|
-
materialAssignmentId,
|
|
92
|
-
userId
|
|
93
|
-
}).then(
|
|
145
|
+
materialAssignmentId: materialAssignmentId,
|
|
146
|
+
userId: userId
|
|
147
|
+
}).then(function (res) {
|
|
148
|
+
return res.materialAssignmentGradeResult;
|
|
149
|
+
}).then(setGradeResult).catch(function () {
|
|
94
150
|
setGradeResult(null);
|
|
95
151
|
});
|
|
96
152
|
}, [materialAssignmentId, userId]);
|
|
97
|
-
|
|
153
|
+
var fetchGradeList = React__default.default.useCallback(function () {
|
|
98
154
|
void apiClient.getOrgMaterialAssignmentGradeList({
|
|
99
|
-
materialAssignmentId,
|
|
155
|
+
materialAssignmentId: materialAssignmentId,
|
|
100
156
|
offset: gradeListOffset,
|
|
101
157
|
count: FETCH_GRADE_LIST_COUNT,
|
|
102
158
|
filterConditions: {
|
|
103
|
-
userId
|
|
159
|
+
userId: userId
|
|
104
160
|
}
|
|
105
|
-
}).then(({
|
|
106
|
-
materialAssignmentGrades,
|
|
107
|
-
|
|
108
|
-
}) => {
|
|
161
|
+
}).then(function (_ref2) {
|
|
162
|
+
var materialAssignmentGrades = _ref2.materialAssignmentGrades,
|
|
163
|
+
materialAssignmentGradeCount = _ref2.materialAssignmentGradeCount;
|
|
109
164
|
setGradeList(materialAssignmentGrades);
|
|
110
165
|
setGradeListCount(materialAssignmentGradeCount);
|
|
111
166
|
});
|
|
112
167
|
}, [gradeListOffset, materialAssignmentId, userId]);
|
|
113
|
-
|
|
168
|
+
var fetchMyGrade = React__default.default.useCallback(function () {
|
|
114
169
|
void apiClient.getOrgMaterialAssignmentGradeList({
|
|
115
|
-
materialAssignmentId,
|
|
170
|
+
materialAssignmentId: materialAssignmentId,
|
|
116
171
|
offset: 0,
|
|
117
172
|
count: 1,
|
|
118
173
|
filterConditions: {
|
|
119
|
-
userId,
|
|
174
|
+
userId: userId,
|
|
120
175
|
gradeUserId: adminUserId
|
|
121
176
|
}
|
|
122
|
-
}).then(
|
|
177
|
+
}).then(function (res) {
|
|
178
|
+
return res.materialAssignmentGrades[0];
|
|
179
|
+
}).then(function (grade) {
|
|
180
|
+
return setMyGrade(grade !== null && grade !== void 0 ? grade : null);
|
|
181
|
+
});
|
|
123
182
|
}, [adminUserId, materialAssignmentId, userId]);
|
|
124
|
-
|
|
183
|
+
var handleManualScoreEditClick = function handleManualScoreEditClick() {
|
|
125
184
|
var _a, _b;
|
|
126
185
|
setShowManualScoreEditModal(true);
|
|
127
186
|
manualScoreEditFormMethods.reset({
|
|
128
187
|
manualScore: (_b = (_a = gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.manualScore) !== null && _a !== void 0 ? _a : gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.avgCalcScore) !== null && _b !== void 0 ? _b : 0
|
|
129
188
|
});
|
|
130
189
|
};
|
|
131
|
-
|
|
190
|
+
var handleGradeEditClick = function handleGradeEditClick() {
|
|
132
191
|
var _a, _b;
|
|
133
192
|
setShowGradeEditModal(true);
|
|
134
193
|
gradeEditFormMethods.reset({
|
|
@@ -136,82 +195,144 @@ const MaterialAssignmentAdminContent = React.forwardRef(({
|
|
|
136
195
|
comment: (_b = myGrade === null || myGrade === void 0 ? void 0 : myGrade.comment) !== null && _b !== void 0 ? _b : ''
|
|
137
196
|
});
|
|
138
197
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
198
|
+
var handleGradeEditSubmit = gradeEditFormMethods.handleSubmit( /*#__PURE__*/function () {
|
|
199
|
+
var _ref4 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee(_ref3) {
|
|
200
|
+
var score, comment;
|
|
201
|
+
return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee$(_context) {
|
|
202
|
+
while (1) switch (_context.prev = _context.next) {
|
|
203
|
+
case 0:
|
|
204
|
+
score = _ref3.score, comment = _ref3.comment;
|
|
205
|
+
_context.prev = 1;
|
|
206
|
+
_context.next = 4;
|
|
207
|
+
return apiClient.postOrgMaterialAssignmentGradeEdit({
|
|
208
|
+
materialAssignmentGradeId: myGrade === null || myGrade === void 0 ? void 0 : myGrade.id,
|
|
209
|
+
materialAssignmentId: materialAssignmentId,
|
|
210
|
+
userId: userId,
|
|
211
|
+
score: score,
|
|
212
|
+
comment: comment
|
|
213
|
+
});
|
|
214
|
+
case 4:
|
|
215
|
+
fetchMyGrade();
|
|
216
|
+
fetchGradeResult();
|
|
217
|
+
fetchGradeList();
|
|
218
|
+
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
219
|
+
updateMaterialUserBrowserResponse(userId);
|
|
220
|
+
}
|
|
221
|
+
blocks.Notification.success('저장되었습니다');
|
|
222
|
+
_context.next = 15;
|
|
223
|
+
break;
|
|
224
|
+
case 11:
|
|
225
|
+
_context.prev = 11;
|
|
226
|
+
_context.t0 = _context["catch"](1);
|
|
227
|
+
console.error(_context.t0);
|
|
228
|
+
blocks.Notification.error('오류가 발생했습니다.');
|
|
229
|
+
case 15:
|
|
230
|
+
_context.prev = 15;
|
|
231
|
+
setShowGradeEditModal(false);
|
|
232
|
+
return _context.finish(15);
|
|
233
|
+
case 18:
|
|
234
|
+
case "end":
|
|
235
|
+
return _context.stop();
|
|
236
|
+
}
|
|
237
|
+
}, _callee, null, [[1, 11, 15, 18]]);
|
|
238
|
+
}));
|
|
239
|
+
return function (_x) {
|
|
240
|
+
return _ref4.apply(this, arguments);
|
|
241
|
+
};
|
|
242
|
+
}());
|
|
243
|
+
var handleGradeDeleteSubmit = /*#__PURE__*/function () {
|
|
244
|
+
var _ref5 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee2() {
|
|
245
|
+
return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
246
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
247
|
+
case 0:
|
|
248
|
+
if (selectedGradeForDelete) {
|
|
249
|
+
_context2.next = 2;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
return _context2.abrupt("return");
|
|
253
|
+
case 2:
|
|
254
|
+
_context2.prev = 2;
|
|
255
|
+
setGradeDeleteStatus('pending');
|
|
256
|
+
_context2.next = 6;
|
|
257
|
+
return apiClient.postOrgMaterialAssignmentGradeDelete({
|
|
258
|
+
materialAssignmentGradeId: selectedGradeForDelete.id
|
|
259
|
+
});
|
|
260
|
+
case 6:
|
|
261
|
+
// If delete my grade, re-fetch my grade data.
|
|
262
|
+
if (adminUserId === selectedGradeForDelete.gradeUser.id) {
|
|
263
|
+
fetchMyGrade();
|
|
264
|
+
}
|
|
265
|
+
fetchGradeList();
|
|
266
|
+
fetchGradeResult();
|
|
267
|
+
setGradeDeleteStatus('resolved');
|
|
268
|
+
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
269
|
+
updateMaterialUserBrowserResponse(userId);
|
|
270
|
+
}
|
|
271
|
+
blocks.Notification.success('저장되었습니다');
|
|
272
|
+
_context2.next = 19;
|
|
273
|
+
break;
|
|
274
|
+
case 14:
|
|
275
|
+
_context2.prev = 14;
|
|
276
|
+
_context2.t0 = _context2["catch"](2);
|
|
277
|
+
console.error(_context2.t0);
|
|
278
|
+
setGradeDeleteStatus('rejected');
|
|
279
|
+
blocks.Notification.error('오류가 발생했습니다.');
|
|
280
|
+
case 19:
|
|
281
|
+
_context2.prev = 19;
|
|
282
|
+
setSelectedGradeForDelete(null);
|
|
283
|
+
return _context2.finish(19);
|
|
284
|
+
case 22:
|
|
285
|
+
case "end":
|
|
286
|
+
return _context2.stop();
|
|
287
|
+
}
|
|
288
|
+
}, _callee2, null, [[2, 14, 19, 22]]);
|
|
289
|
+
}));
|
|
290
|
+
return function handleGradeDeleteSubmit() {
|
|
291
|
+
return _ref5.apply(this, arguments);
|
|
292
|
+
};
|
|
293
|
+
}();
|
|
294
|
+
var handleManualScoreEditSubmit = manualScoreEditFormMethods.handleSubmit( /*#__PURE__*/function () {
|
|
295
|
+
var _ref7 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee3(_ref6) {
|
|
296
|
+
var manualScore;
|
|
297
|
+
return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
298
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
299
|
+
case 0:
|
|
300
|
+
manualScore = _ref6.manualScore;
|
|
301
|
+
_context3.prev = 1;
|
|
302
|
+
_context3.next = 4;
|
|
303
|
+
return apiClient.postOrgMaterialAssignmentGradeResultManualScoreEdit({
|
|
304
|
+
userId: userId,
|
|
305
|
+
manualScore: manualScore,
|
|
306
|
+
materialAssignmentId: materialAssignmentId
|
|
307
|
+
});
|
|
308
|
+
case 4:
|
|
309
|
+
fetchGradeResult();
|
|
310
|
+
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
311
|
+
updateMaterialUserBrowserResponse(userId);
|
|
312
|
+
}
|
|
313
|
+
blocks.Notification.success('저장되었습니다');
|
|
314
|
+
_context3.next = 13;
|
|
315
|
+
break;
|
|
316
|
+
case 9:
|
|
317
|
+
_context3.prev = 9;
|
|
318
|
+
_context3.t0 = _context3["catch"](1);
|
|
319
|
+
console.error(_context3.t0);
|
|
320
|
+
blocks.Notification.error('오류가 발생했습니다.');
|
|
321
|
+
case 13:
|
|
322
|
+
_context3.prev = 13;
|
|
323
|
+
setShowManualScoreEditModal(false);
|
|
324
|
+
return _context3.finish(13);
|
|
325
|
+
case 16:
|
|
326
|
+
case "end":
|
|
327
|
+
return _context3.stop();
|
|
328
|
+
}
|
|
329
|
+
}, _callee3, null, [[1, 9, 13, 16]]);
|
|
330
|
+
}));
|
|
331
|
+
return function (_x2) {
|
|
332
|
+
return _ref7.apply(this, arguments);
|
|
333
|
+
};
|
|
334
|
+
}());
|
|
335
|
+
React__default.default.useEffect(function () {
|
|
215
336
|
if (!isReady) {
|
|
216
337
|
return;
|
|
217
338
|
}
|
|
@@ -222,273 +343,346 @@ const MaterialAssignmentAdminContent = React.forwardRef(({
|
|
|
222
343
|
fetchSubmissionList();
|
|
223
344
|
fetchMaterialAssignmentGet();
|
|
224
345
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeList, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
346
|
+
React__default.default.useImperativeHandle(ref, function () {
|
|
347
|
+
return {
|
|
348
|
+
refreshMaterialAssignment: function refreshMaterialAssignment() {
|
|
349
|
+
fetchMaterialAssignmentGet();
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
}, [fetchMaterialAssignmentGet]);
|
|
353
|
+
var renderHeader = function renderHeader() {
|
|
231
354
|
var _a, _b, _c;
|
|
232
|
-
return
|
|
355
|
+
return jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeader, {
|
|
233
356
|
align: "center",
|
|
234
357
|
padding: "1rem",
|
|
235
|
-
width: "100%"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
358
|
+
width: "100%",
|
|
359
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
360
|
+
auto: true,
|
|
361
|
+
align: "center",
|
|
362
|
+
children: [jsxRuntime.jsx(blocks.ProfileImage, {
|
|
363
|
+
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
364
|
+
width: "2.5rem",
|
|
365
|
+
height: "2.5rem"
|
|
366
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
367
|
+
width: 1
|
|
368
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
369
|
+
size: "small",
|
|
370
|
+
role: "warmwhite",
|
|
371
|
+
children: user === null || user === void 0 ? void 0 : user.fullname
|
|
372
|
+
})]
|
|
373
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
374
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
375
|
+
size: "tiny",
|
|
376
|
+
role: "gray4",
|
|
377
|
+
children: "\uC810\uC218"
|
|
378
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
379
|
+
size: "small",
|
|
380
|
+
role: "white",
|
|
381
|
+
children: gradeResult ? "".concat((_c = (_b = gradeResult.manualScore) !== null && _b !== void 0 ? _b : gradeResult.avgCalcScore) !== null && _c !== void 0 ? _c : 0).concat(isScoreFinalized ? '(공개됨)' : '(비공개)') : '--'
|
|
382
|
+
})]
|
|
383
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
384
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
385
|
+
size: "tiny",
|
|
386
|
+
role: "gray4",
|
|
387
|
+
children: "\uC81C\uCD9C \uC77C\uC2DC"
|
|
388
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
389
|
+
size: "small",
|
|
390
|
+
role: "white",
|
|
391
|
+
children: userSubmission ? jsxRuntime.jsx(intl.FormattedDate, {
|
|
392
|
+
value: userSubmission.createdDatetime,
|
|
393
|
+
dateStyle: "medium",
|
|
394
|
+
timeStyle: "short"
|
|
395
|
+
}) : '--'
|
|
396
|
+
})]
|
|
397
|
+
})]
|
|
398
|
+
});
|
|
265
399
|
};
|
|
266
|
-
|
|
267
|
-
return
|
|
400
|
+
var renderManualScoreEditButton = function renderManualScoreEditButton() {
|
|
401
|
+
return jsxRuntime.jsx(blocks.Tooltip, {
|
|
268
402
|
placement: "top",
|
|
269
403
|
title: isUserSubmitted ? '제출 기한이 지난 이후 조정할 수 있습니다.' : '미제출인 경우 조정할 수 없습니다.',
|
|
270
|
-
visible: !isAssignmentClosed || !isUserSubmitted ? undefined : false
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
404
|
+
visible: !isAssignmentClosed || !isUserSubmitted ? undefined : false,
|
|
405
|
+
children: jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, {
|
|
406
|
+
disabled: !isAssignmentClosed || !isUserSubmitted,
|
|
407
|
+
children: jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminManualScoreEditButton, {
|
|
408
|
+
disabled: !isAssignmentClosed || !isUserSubmitted,
|
|
409
|
+
underline: true,
|
|
410
|
+
role: "navy3",
|
|
411
|
+
size: "tiny",
|
|
412
|
+
onClick: handleManualScoreEditClick,
|
|
413
|
+
children: "\uC810\uC218 \uC870\uC815\uD558\uAE30"
|
|
414
|
+
})
|
|
415
|
+
})
|
|
416
|
+
});
|
|
280
417
|
};
|
|
281
|
-
|
|
418
|
+
var renderGradeResult = function renderGradeResult() {
|
|
282
419
|
var _a, _b;
|
|
283
|
-
return
|
|
420
|
+
return jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminGradeWrapper, {
|
|
284
421
|
wrap: true,
|
|
285
422
|
width: "100%",
|
|
286
|
-
align: "center"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
423
|
+
align: "center",
|
|
424
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
425
|
+
auto: true,
|
|
426
|
+
align: "center",
|
|
427
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
428
|
+
role: "navy1",
|
|
429
|
+
size: "small",
|
|
430
|
+
lineHeight: "1.375rem",
|
|
431
|
+
children: user ? "".concat(user.fullname, " \uB2D8\uC758 \uC810\uC218") : null
|
|
432
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
433
|
+
width: 0.25
|
|
434
|
+
}), jsxRuntime.jsx(blocks.Tooltip, {
|
|
435
|
+
useMaxWidth: true,
|
|
436
|
+
placement: "top",
|
|
437
|
+
title: "모든 채점 점수의 평균값이 반영된 종합 점수입니다. 평균값을 사용하지 않으려면 ‘조정하기'를 클릭해 직접 점수를 입력하세요.",
|
|
438
|
+
children: jsxRuntime.jsx(blocks.Icon, {
|
|
439
|
+
icon: icons.eilStatusInfo,
|
|
440
|
+
color: designTokens.base.color.navy1
|
|
441
|
+
})
|
|
442
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
443
|
+
width: 0.75
|
|
444
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
445
|
+
bold: true,
|
|
446
|
+
role: "white",
|
|
447
|
+
children: gradeResult ? "".concat((_b = (_a = gradeResult.manualScore) !== null && _a !== void 0 ? _a : gradeResult.avgCalcScore) !== null && _b !== void 0 ? _b : 0).concat(isScoreFinalized ? '(공개됨)' : '(비공개)') : '--'
|
|
448
|
+
})]
|
|
449
|
+
}), renderManualScoreEditButton()]
|
|
450
|
+
});
|
|
309
451
|
};
|
|
310
|
-
|
|
311
|
-
|
|
452
|
+
var renderSubmissionInfo = function renderSubmissionInfo() {
|
|
453
|
+
var statusText = function () {
|
|
312
454
|
if (submissionListGetStatus === 'pending') {
|
|
313
455
|
return null;
|
|
314
456
|
}
|
|
315
457
|
switch (true) {
|
|
316
458
|
case !isUserSubmitted && isAssignmentClosed:
|
|
317
|
-
return
|
|
459
|
+
return jsxRuntime.jsx(blocks.Text, {
|
|
318
460
|
bold: true,
|
|
319
461
|
role: "danger",
|
|
320
|
-
size: "small"
|
|
321
|
-
|
|
462
|
+
size: "small",
|
|
463
|
+
children: "\uC81C\uCD9C \uAE30\uD55C \uB9CC\uB8CC"
|
|
464
|
+
});
|
|
322
465
|
case isScoreFinalized:
|
|
323
|
-
return
|
|
466
|
+
return jsxRuntime.jsx(blocks.Text, {
|
|
324
467
|
bold: true,
|
|
325
468
|
role: "lightpurple",
|
|
326
|
-
size: "small"
|
|
327
|
-
|
|
469
|
+
size: "small",
|
|
470
|
+
children: "\uCC44\uC810 \uC644\uB8CC"
|
|
471
|
+
});
|
|
328
472
|
case isUserSubmitted:
|
|
329
|
-
return
|
|
473
|
+
return jsxRuntime.jsx(blocks.Text, {
|
|
330
474
|
bold: true,
|
|
331
475
|
role: "success",
|
|
332
|
-
size: "small"
|
|
333
|
-
|
|
476
|
+
size: "small",
|
|
477
|
+
children: "\uC81C\uCD9C\uB428"
|
|
478
|
+
});
|
|
334
479
|
case !isUserSubmitted:
|
|
335
|
-
return
|
|
480
|
+
return jsxRuntime.jsx(blocks.Text, {
|
|
336
481
|
bold: true,
|
|
337
482
|
role: "warning",
|
|
338
|
-
size: "small"
|
|
339
|
-
|
|
483
|
+
size: "small",
|
|
484
|
+
children: "\uBBF8\uC81C\uCD9C"
|
|
485
|
+
});
|
|
340
486
|
}
|
|
341
|
-
}
|
|
342
|
-
|
|
487
|
+
}();
|
|
488
|
+
var submissionAttachment = function () {
|
|
343
489
|
if (!userSubmission) {
|
|
344
490
|
return '--';
|
|
345
491
|
}
|
|
346
492
|
if (userSubmission.assignmentFileUrl) {
|
|
347
|
-
|
|
348
|
-
return
|
|
493
|
+
var assignmentFilename = decodeURIComponent(userSubmission.assignmentFileUrl && new URL(userSubmission.assignmentFileUrl).pathname.split('/').pop() || '');
|
|
494
|
+
return jsxRuntime.jsx("a", {
|
|
349
495
|
href: userSubmission.assignmentFileUrl,
|
|
350
496
|
download: assignmentFilename,
|
|
351
497
|
target: "_blank",
|
|
352
|
-
rel: "noopener noreferrer"
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
498
|
+
rel: "noopener noreferrer",
|
|
499
|
+
children: jsxRuntime.jsx(blocks.Text, {
|
|
500
|
+
hoverable: true,
|
|
501
|
+
underline: true,
|
|
502
|
+
role: "white",
|
|
503
|
+
size: "small",
|
|
504
|
+
children: assignmentFilename
|
|
505
|
+
})
|
|
506
|
+
});
|
|
359
507
|
}
|
|
360
508
|
if (userSubmission === null || userSubmission === void 0 ? void 0 : userSubmission.assignmentUrl) {
|
|
361
|
-
return
|
|
509
|
+
return jsxRuntime.jsx("a", {
|
|
362
510
|
href: userSubmission.assignmentUrl,
|
|
363
511
|
target: "_blank",
|
|
364
|
-
rel: "noopener noreferrer"
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
512
|
+
rel: "noopener noreferrer",
|
|
513
|
+
children: jsxRuntime.jsx(blocks.Text, {
|
|
514
|
+
hoverable: true,
|
|
515
|
+
underline: true,
|
|
516
|
+
role: "white",
|
|
517
|
+
size: "small",
|
|
518
|
+
children: userSubmission.assignmentUrl
|
|
519
|
+
})
|
|
520
|
+
});
|
|
371
521
|
}
|
|
372
|
-
}
|
|
373
|
-
return
|
|
374
|
-
dark: true
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
522
|
+
}();
|
|
523
|
+
return jsxRuntime.jsx(blocks.InfoTable, {
|
|
524
|
+
dark: true,
|
|
525
|
+
children: jsxRuntime.jsxs("tbody", {
|
|
526
|
+
children: [jsxRuntime.jsxs("tr", {
|
|
527
|
+
children: [jsxRuntime.jsx("td", {
|
|
528
|
+
children: "\uC0C1\uD0DC"
|
|
529
|
+
}), jsxRuntime.jsx("td", {
|
|
530
|
+
children: statusText
|
|
531
|
+
})]
|
|
532
|
+
}), jsxRuntime.jsxs("tr", {
|
|
533
|
+
children: [jsxRuntime.jsx("td", {
|
|
534
|
+
children: "\uACFC\uC81C \uC81C\uCD9C \uAE30\uD55C"
|
|
535
|
+
}), jsxRuntime.jsx("td", {
|
|
536
|
+
children: jsxRuntime.jsx(intl.FormattedDate, {
|
|
537
|
+
value: materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime,
|
|
538
|
+
dateStyle: "medium",
|
|
539
|
+
timeStyle: "short"
|
|
540
|
+
})
|
|
541
|
+
})]
|
|
542
|
+
}), jsxRuntime.jsxs("tr", {
|
|
543
|
+
children: [jsxRuntime.jsx("td", {
|
|
544
|
+
children: "\uC81C\uCD9C \uC77C\uC2DC"
|
|
545
|
+
}), jsxRuntime.jsx("td", {
|
|
546
|
+
children: userSubmission ? jsxRuntime.jsx(intl.FormattedDate, {
|
|
547
|
+
value: userSubmission.createdDatetime,
|
|
548
|
+
dateStyle: "medium",
|
|
549
|
+
timeStyle: "short"
|
|
550
|
+
}) : '--'
|
|
551
|
+
})]
|
|
552
|
+
}), jsxRuntime.jsxs("tr", {
|
|
553
|
+
children: [jsxRuntime.jsx("td", {
|
|
554
|
+
children: "\uC5C5\uB85C\uB4DC\uB41C \uACFC\uC81C"
|
|
555
|
+
}), jsxRuntime.jsx("td", {
|
|
556
|
+
children: submissionAttachment
|
|
557
|
+
})]
|
|
558
|
+
})]
|
|
559
|
+
})
|
|
560
|
+
});
|
|
384
561
|
};
|
|
385
|
-
|
|
386
|
-
return
|
|
562
|
+
var renderGradeList = function renderGradeList() {
|
|
563
|
+
return jsxRuntime.jsxs(blocks.Flex, {
|
|
387
564
|
column: true,
|
|
388
|
-
align: "center"
|
|
389
|
-
}, React.createElement(blocks.Flex, {
|
|
390
565
|
align: "center",
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
566
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
567
|
+
align: "center",
|
|
568
|
+
width: "100%",
|
|
569
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
570
|
+
column: true,
|
|
571
|
+
auto: true,
|
|
572
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
573
|
+
block: true,
|
|
574
|
+
bold: true,
|
|
575
|
+
role: "white",
|
|
576
|
+
lineHeight: 1.375,
|
|
577
|
+
children: "\uCC44\uC810 \uD604\uD669"
|
|
578
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
579
|
+
block: true,
|
|
580
|
+
size: "tiny",
|
|
581
|
+
role: "navy3",
|
|
582
|
+
lineHeight: 1.6,
|
|
583
|
+
children: "\uCC44\uC810\uC644\uB8CC\uD55C \uCC44\uC810\uC790\uC758 \uC810\uC218\uC640 \uD53C\uB4DC\uBC31\uC744 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."
|
|
584
|
+
})]
|
|
585
|
+
}), jsxRuntime.jsx(blocks.Tooltip, {
|
|
586
|
+
placement: "top",
|
|
587
|
+
title: isUserSubmitted ? '제출 기한이 지난 이후 채점할 수 있습니다.' : '미제출인 경우 채점할 수 없습니다.',
|
|
588
|
+
visible: !isAssignmentClosed || !isUserSubmitted ? undefined : false,
|
|
589
|
+
children: jsxRuntime.jsx("span", {
|
|
590
|
+
children: jsxRuntime.jsx(blocks.Button, {
|
|
591
|
+
size: "small",
|
|
592
|
+
role: "lightpurple",
|
|
593
|
+
disabled: !isAssignmentClosed || !isUserSubmitted,
|
|
594
|
+
onClick: handleGradeEditClick,
|
|
595
|
+
children: Boolean(myGrade) ? '내 채점 수정' : '내 채점 시작'
|
|
596
|
+
})
|
|
597
|
+
})
|
|
598
|
+
})]
|
|
599
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
600
|
+
height: 0.75
|
|
601
|
+
}), jsxRuntime.jsx(blocks.TableNext, {
|
|
602
|
+
dark: true,
|
|
603
|
+
emptyMessage: "\uCC44\uC810 \uC644\uB8CC\uD55C \uCC44\uC810\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
604
|
+
columns: [{
|
|
605
|
+
Header: '채점자명',
|
|
606
|
+
accessor: 'fullname'
|
|
607
|
+
}, {
|
|
608
|
+
Header: '과제 점수',
|
|
609
|
+
accessor: 'grade'
|
|
610
|
+
}, {
|
|
611
|
+
Header: '채점 일시',
|
|
612
|
+
accessor: 'created',
|
|
613
|
+
textAlign: 'left'
|
|
614
|
+
}],
|
|
615
|
+
data: gradeList.map(function (grade) {
|
|
616
|
+
return {
|
|
617
|
+
fullname: jsxRuntime.jsxs(blocks.Flex, {
|
|
618
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
619
|
+
noWrap: true,
|
|
620
|
+
role: "navy0",
|
|
621
|
+
size: "small",
|
|
622
|
+
children: "".concat(grade.gradeUser.fullname).concat(grade.gradeUser.id === adminUserId ? '(나)' : '')
|
|
623
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
624
|
+
width: 0.25
|
|
625
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
626
|
+
ellipsis: true,
|
|
627
|
+
role: "navy3",
|
|
628
|
+
size: "small",
|
|
629
|
+
children: grade.gradeUser.email
|
|
630
|
+
})]
|
|
631
|
+
}),
|
|
632
|
+
grade: grade.score,
|
|
633
|
+
created: jsxRuntime.jsxs(blocks.Flex, {
|
|
634
|
+
align: "center",
|
|
635
|
+
justify: "space-between",
|
|
636
|
+
children: [jsxRuntime.jsx(intl.FormattedDate, {
|
|
637
|
+
value: grade.createdDatetime,
|
|
638
|
+
dateStyle: "medium",
|
|
639
|
+
timeStyle: "short"
|
|
640
|
+
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
641
|
+
align: "center",
|
|
642
|
+
children: [jsxRuntime.jsx(blocks.IconButton, {
|
|
643
|
+
icon: icons.eilChat,
|
|
644
|
+
size: "tiny",
|
|
645
|
+
role: "navy3",
|
|
646
|
+
onClick: function onClick() {
|
|
647
|
+
setSelectedGradeForShow(grade);
|
|
648
|
+
}
|
|
649
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
650
|
+
width: 0.5
|
|
651
|
+
}), jsxRuntime.jsx(blocks.IconButton, {
|
|
652
|
+
icon: icons.eilDelete,
|
|
653
|
+
size: "tiny",
|
|
654
|
+
role: "navy3",
|
|
655
|
+
onClick: function onClick() {
|
|
656
|
+
setSelectedGradeForDelete(grade);
|
|
657
|
+
}
|
|
658
|
+
})]
|
|
659
|
+
})]
|
|
660
|
+
})
|
|
661
|
+
};
|
|
662
|
+
})
|
|
663
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
664
|
+
height: 0.5
|
|
665
|
+
}), jsxRuntime.jsx(blocks.Pagination, {
|
|
666
|
+
dark: true,
|
|
667
|
+
offset: gradeListOffset,
|
|
668
|
+
count: FETCH_GRADE_LIST_COUNT,
|
|
669
|
+
total: gradeListCount,
|
|
670
|
+
isNext: gradeListOffset + FETCH_GRADE_LIST_COUNT < gradeListCount,
|
|
671
|
+
isPrev: gradeListOffset > 0,
|
|
672
|
+
onClickNext: function onClickNext() {
|
|
673
|
+
setGradeListPage(gradeListPage + 1);
|
|
674
|
+
},
|
|
675
|
+
onClickPrev: function onClickPrev() {
|
|
676
|
+
setGradeListPage(gradeListPage - 1);
|
|
677
|
+
}
|
|
678
|
+
})]
|
|
679
|
+
});
|
|
486
680
|
};
|
|
487
|
-
|
|
681
|
+
var renderGradeEditModal = function renderGradeEditModal() {
|
|
488
682
|
if (!showGradeEditModal) {
|
|
489
683
|
return null;
|
|
490
684
|
}
|
|
491
|
-
return
|
|
685
|
+
return jsxRuntime.jsxs(blocks.Modal, {
|
|
492
686
|
title: Boolean(myGrade) ? '내 채점 수정' : '과제 채점',
|
|
493
687
|
footerButtons: [{
|
|
494
688
|
label: '확인',
|
|
@@ -501,129 +695,145 @@ const MaterialAssignmentAdminContent = React.forwardRef(({
|
|
|
501
695
|
label: '취소',
|
|
502
696
|
size: 'small',
|
|
503
697
|
role: 'gray1',
|
|
504
|
-
onClick: ()
|
|
698
|
+
onClick: function onClick() {
|
|
505
699
|
setShowGradeEditModal(false);
|
|
506
700
|
}
|
|
507
701
|
}],
|
|
508
|
-
onHide: ()
|
|
702
|
+
onHide: function onHide() {
|
|
509
703
|
setShowGradeEditModal(false);
|
|
510
|
-
}
|
|
511
|
-
}, React.createElement(blocks.Label, {
|
|
512
|
-
bold: true,
|
|
513
|
-
block: true,
|
|
514
|
-
required: true
|
|
515
|
-
}, "\uC810\uC218"), React.createElement(blocks.Vspace, {
|
|
516
|
-
height: 0.5
|
|
517
|
-
}), React.createElement(blocks.Flex, {
|
|
518
|
-
align: "center"
|
|
519
|
-
}, React.createElement(reactHookForm.Controller, {
|
|
520
|
-
control: gradeEditFormMethods.control,
|
|
521
|
-
name: "score",
|
|
522
|
-
rules: {
|
|
523
|
-
required: true,
|
|
524
|
-
min: 0,
|
|
525
|
-
max: 100
|
|
526
|
-
},
|
|
527
|
-
render: ({
|
|
528
|
-
field,
|
|
529
|
-
fieldState
|
|
530
|
-
}) => React.createElement(blocks.Input, Object.assign({}, field, {
|
|
531
|
-
invalid: fieldState.invalid,
|
|
532
|
-
size: "small",
|
|
533
|
-
width: "xsmall",
|
|
534
|
-
type: "number"
|
|
535
|
-
}))
|
|
536
|
-
}), React.createElement(blocks.Hspace, {
|
|
537
|
-
width: 0.5
|
|
538
|
-
}), React.createElement(blocks.Text, {
|
|
539
|
-
bold: true,
|
|
540
|
-
role: "gray9",
|
|
541
|
-
size: "small"
|
|
542
|
-
}, "\uC810"), React.createElement(blocks.Text, {
|
|
543
|
-
role: "gray6",
|
|
544
|
-
size: "small"
|
|
545
|
-
}, ' / 100점 만점')), React.createElement(blocks.Vspace, {
|
|
546
|
-
height: 1.25
|
|
547
|
-
}), React.createElement(blocks.Label, {
|
|
548
|
-
bold: true,
|
|
549
|
-
block: true
|
|
550
|
-
}, "\uD53C\uB4DC\uBC31"), React.createElement(blocks.Vspace, {
|
|
551
|
-
height: 0.5
|
|
552
|
-
}), React.createElement(reactHookForm.Controller, {
|
|
553
|
-
control: gradeEditFormMethods.control,
|
|
554
|
-
name: "comment",
|
|
555
|
-
rules: {
|
|
556
|
-
maxLength: 1000
|
|
557
704
|
},
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
})
|
|
566
|
-
|
|
705
|
+
children: [jsxRuntime.jsx(blocks.Label, {
|
|
706
|
+
bold: true,
|
|
707
|
+
block: true,
|
|
708
|
+
required: true,
|
|
709
|
+
children: "\uC810\uC218"
|
|
710
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
711
|
+
height: 0.5
|
|
712
|
+
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
713
|
+
align: "center",
|
|
714
|
+
children: [jsxRuntime.jsx(reactHookForm.Controller, {
|
|
715
|
+
control: gradeEditFormMethods.control,
|
|
716
|
+
name: "score",
|
|
717
|
+
rules: {
|
|
718
|
+
required: true,
|
|
719
|
+
min: 0,
|
|
720
|
+
max: 100
|
|
721
|
+
},
|
|
722
|
+
render: function render(_ref8) {
|
|
723
|
+
var field = _ref8.field,
|
|
724
|
+
fieldState = _ref8.fieldState;
|
|
725
|
+
return jsxRuntime.jsx(blocks.Input, Object.assign({}, field, {
|
|
726
|
+
invalid: fieldState.invalid,
|
|
727
|
+
size: "small",
|
|
728
|
+
width: "xsmall",
|
|
729
|
+
type: "number"
|
|
730
|
+
}));
|
|
731
|
+
}
|
|
732
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
733
|
+
width: 0.5
|
|
734
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
735
|
+
bold: true,
|
|
736
|
+
role: "gray9",
|
|
737
|
+
size: "small",
|
|
738
|
+
children: "\uC810"
|
|
739
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
740
|
+
role: "gray6",
|
|
741
|
+
size: "small",
|
|
742
|
+
children: ' / 100점 만점'
|
|
743
|
+
})]
|
|
744
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
745
|
+
height: 1.25
|
|
746
|
+
}), jsxRuntime.jsx(blocks.Label, {
|
|
747
|
+
bold: true,
|
|
748
|
+
block: true,
|
|
749
|
+
children: "\uD53C\uB4DC\uBC31"
|
|
750
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
751
|
+
height: 0.5
|
|
752
|
+
}), jsxRuntime.jsx(reactHookForm.Controller, {
|
|
753
|
+
control: gradeEditFormMethods.control,
|
|
754
|
+
name: "comment",
|
|
755
|
+
rules: {
|
|
756
|
+
maxLength: 1000
|
|
757
|
+
},
|
|
758
|
+
render: function render(_ref9) {
|
|
759
|
+
var field = _ref9.field;
|
|
760
|
+
return jsxRuntime.jsx(blocks.Textarea, {
|
|
761
|
+
value: field.value,
|
|
762
|
+
wordLimit: 1000,
|
|
763
|
+
rows: 8,
|
|
764
|
+
onChange: field.onChange
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
})]
|
|
768
|
+
});
|
|
567
769
|
};
|
|
568
|
-
|
|
770
|
+
var renderGradeShowModal = function renderGradeShowModal() {
|
|
569
771
|
if (!selectedGradeForShow) {
|
|
570
772
|
return null;
|
|
571
773
|
}
|
|
572
|
-
return
|
|
774
|
+
return jsxRuntime.jsxs(blocks.Modal, {
|
|
573
775
|
title: "\uCC44\uC810 \uACB0\uACFC \uD655\uC778",
|
|
574
776
|
footerButtons: [{
|
|
575
777
|
label: '확인',
|
|
576
778
|
size: 'small',
|
|
577
779
|
role: 'primary',
|
|
578
|
-
onClick: ()
|
|
780
|
+
onClick: function onClick() {
|
|
579
781
|
setSelectedGradeForShow(null);
|
|
580
782
|
}
|
|
581
783
|
}],
|
|
582
|
-
onHide: ()
|
|
784
|
+
onHide: function onHide() {
|
|
583
785
|
setSelectedGradeForShow(null);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
786
|
+
},
|
|
787
|
+
children: [jsxRuntime.jsx(blocks.Label, {
|
|
788
|
+
bold: true,
|
|
789
|
+
block: true,
|
|
790
|
+
required: true,
|
|
791
|
+
children: "\uC810\uC218"
|
|
792
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
793
|
+
height: 0.5
|
|
794
|
+
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
795
|
+
align: "center",
|
|
796
|
+
children: [jsxRuntime.jsx(blocks.Input, {
|
|
797
|
+
disabled: true,
|
|
798
|
+
value: selectedGradeForShow.score,
|
|
799
|
+
size: "small",
|
|
800
|
+
width: "xsmall",
|
|
801
|
+
type: "number"
|
|
802
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
803
|
+
width: 0.5
|
|
804
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
805
|
+
bold: true,
|
|
806
|
+
role: "gray9",
|
|
807
|
+
size: "small",
|
|
808
|
+
children: "\uC810"
|
|
809
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
810
|
+
role: "gray6",
|
|
811
|
+
size: "small",
|
|
812
|
+
children: ' / 100점 만점'
|
|
813
|
+
})]
|
|
814
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
815
|
+
height: 1.25
|
|
816
|
+
}), jsxRuntime.jsx(blocks.Label, {
|
|
817
|
+
bold: true,
|
|
818
|
+
block: true,
|
|
819
|
+
children: "\uD53C\uB4DC\uBC31"
|
|
820
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
821
|
+
height: 0.5
|
|
822
|
+
}), jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminTextareaWrapper, {
|
|
823
|
+
children: jsxRuntime.jsx(blocks.Textarea, {
|
|
824
|
+
disabled: true,
|
|
825
|
+
value: selectedGradeForShow.comment,
|
|
826
|
+
wordLimit: 1000,
|
|
827
|
+
rows: 8
|
|
828
|
+
})
|
|
829
|
+
})]
|
|
830
|
+
});
|
|
621
831
|
};
|
|
622
|
-
|
|
832
|
+
var renderGradeDeleteModal = function renderGradeDeleteModal() {
|
|
623
833
|
if (!selectedGradeForDelete) {
|
|
624
834
|
return null;
|
|
625
835
|
}
|
|
626
|
-
return
|
|
836
|
+
return jsxRuntime.jsxs(blocks.Modal, {
|
|
627
837
|
title: "\uCC44\uC810 \uC0AD\uC81C",
|
|
628
838
|
width: "narrow",
|
|
629
839
|
footerButtons: [{
|
|
@@ -637,47 +847,53 @@ const MaterialAssignmentAdminContent = React.forwardRef(({
|
|
|
637
847
|
label: '취소',
|
|
638
848
|
size: 'small',
|
|
639
849
|
role: 'gray1',
|
|
640
|
-
onClick: ()
|
|
850
|
+
onClick: function onClick() {
|
|
641
851
|
setSelectedGradeForDelete(null);
|
|
642
852
|
}
|
|
643
853
|
}],
|
|
644
|
-
onHide: ()
|
|
854
|
+
onHide: function onHide() {
|
|
645
855
|
setSelectedGradeForDelete(null);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
856
|
+
},
|
|
857
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
858
|
+
role: "gray9",
|
|
859
|
+
children: "\uC0AD\uC81C\uB41C \uC810\uC218\uC640 \uD53C\uB4DC\uBC31\uC740 \uB2E4\uC2DC \uBCF5\uAD6C\uB420 \uC218 \uC5C6\uC73C\uBA70 \uD559\uC0DD\uC758 \uD3C9\uADE0 \uC810\uC218\uAC00 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."
|
|
860
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
861
|
+
height: 0.75
|
|
862
|
+
}), jsxRuntime.jsx(blocks.TableNext, {
|
|
863
|
+
columns: [{
|
|
864
|
+
Header: '채점자명',
|
|
865
|
+
accessor: 'fullname'
|
|
866
|
+
}, {
|
|
867
|
+
Header: '최종 점수',
|
|
868
|
+
accessor: 'score'
|
|
869
|
+
}],
|
|
870
|
+
data: [{
|
|
871
|
+
fullname: jsxRuntime.jsxs(blocks.Flex, {
|
|
872
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
873
|
+
noWrap: true,
|
|
874
|
+
role: "gray9",
|
|
875
|
+
size: "small",
|
|
876
|
+
children: selectedGradeForDelete.gradeUser.fullname
|
|
877
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
878
|
+
width: 0.25
|
|
879
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
880
|
+
ellipsis: true,
|
|
881
|
+
role: "gray5",
|
|
882
|
+
size: "small",
|
|
883
|
+
children: selectedGradeForDelete.gradeUser.email
|
|
884
|
+
})]
|
|
885
|
+
}),
|
|
886
|
+
score: selectedGradeForDelete.score
|
|
887
|
+
}]
|
|
888
|
+
})]
|
|
889
|
+
});
|
|
674
890
|
};
|
|
675
|
-
|
|
891
|
+
var renderManualScoreEditModal = function renderManualScoreEditModal() {
|
|
676
892
|
var _a, _b;
|
|
677
893
|
if (!showManualScoreEditModal) {
|
|
678
894
|
return null;
|
|
679
895
|
}
|
|
680
|
-
return
|
|
896
|
+
return jsxRuntime.jsxs(blocks.Modal, {
|
|
681
897
|
title: "\uC810\uC218 \uC870\uC815",
|
|
682
898
|
width: "narrow",
|
|
683
899
|
footerButtons: [{
|
|
@@ -691,76 +907,86 @@ const MaterialAssignmentAdminContent = React.forwardRef(({
|
|
|
691
907
|
label: '취소',
|
|
692
908
|
size: 'small',
|
|
693
909
|
role: 'gray1',
|
|
694
|
-
onClick: ()
|
|
910
|
+
onClick: function onClick() {
|
|
695
911
|
setShowManualScoreEditModal(false);
|
|
696
912
|
}
|
|
697
913
|
}],
|
|
698
|
-
onHide: ()
|
|
914
|
+
onHide: function onHide() {
|
|
699
915
|
setShowManualScoreEditModal(false);
|
|
700
|
-
}
|
|
701
|
-
}, React.createElement(blocks.Alert, {
|
|
702
|
-
role: "warning"
|
|
703
|
-
}, "\uC810\uC218 \uC870\uC815 \uC774\uD6C4 \uB2E4\uC2DC \uD3C9\uADE0\uAC12\uC73C\uB85C \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC73C\uB2C8 \uC720\uC758\uD574 \uC8FC\uC138\uC694."), React.createElement(blocks.Vspace, {
|
|
704
|
-
height: 1
|
|
705
|
-
}), React.createElement(blocks.Flex, {
|
|
706
|
-
align: "center"
|
|
707
|
-
}, React.createElement(blocks.Input, {
|
|
708
|
-
disabled: true,
|
|
709
|
-
size: "small",
|
|
710
|
-
width: "xsmall",
|
|
711
|
-
type: "number",
|
|
712
|
-
label: "\uC774\uC804 \uC810\uC218",
|
|
713
|
-
value: (_b = (_a = gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.manualScore) !== null && _a !== void 0 ? _a : gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.avgCalcScore) !== null && _b !== void 0 ? _b : 0
|
|
714
|
-
}), React.createElement(blocks.Hspace, {
|
|
715
|
-
width: 1
|
|
716
|
-
}), React.createElement(blocks.Icon, {
|
|
717
|
-
icon: icons.eilArrowRightwardsBasic
|
|
718
|
-
}), React.createElement(blocks.Hspace, {
|
|
719
|
-
width: 1
|
|
720
|
-
}), React.createElement(reactHookForm.Controller, {
|
|
721
|
-
control: manualScoreEditFormMethods.control,
|
|
722
|
-
name: "manualScore",
|
|
723
|
-
rules: {
|
|
724
|
-
required: true,
|
|
725
|
-
min: 0,
|
|
726
|
-
max: 100
|
|
727
916
|
},
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
})
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
917
|
+
children: [jsxRuntime.jsx(blocks.Alert, {
|
|
918
|
+
role: "warning",
|
|
919
|
+
children: "\uC810\uC218 \uC870\uC815 \uC774\uD6C4 \uB2E4\uC2DC \uD3C9\uADE0\uAC12\uC73C\uB85C \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC73C\uB2C8 \uC720\uC758\uD574 \uC8FC\uC138\uC694."
|
|
920
|
+
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
921
|
+
height: 1
|
|
922
|
+
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
923
|
+
align: "center",
|
|
924
|
+
children: [jsxRuntime.jsx(blocks.Input, {
|
|
925
|
+
disabled: true,
|
|
926
|
+
size: "small",
|
|
927
|
+
width: "xsmall",
|
|
928
|
+
type: "number",
|
|
929
|
+
label: "\uC774\uC804 \uC810\uC218",
|
|
930
|
+
value: (_b = (_a = gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.manualScore) !== null && _a !== void 0 ? _a : gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.avgCalcScore) !== null && _b !== void 0 ? _b : 0
|
|
931
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
932
|
+
width: 1
|
|
933
|
+
}), jsxRuntime.jsx(blocks.Icon, {
|
|
934
|
+
icon: icons.eilArrowRightwardsBasic
|
|
935
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
936
|
+
width: 1
|
|
937
|
+
}), jsxRuntime.jsx(reactHookForm.Controller, {
|
|
938
|
+
control: manualScoreEditFormMethods.control,
|
|
939
|
+
name: "manualScore",
|
|
940
|
+
rules: {
|
|
941
|
+
required: true,
|
|
942
|
+
min: 0,
|
|
943
|
+
max: 100
|
|
944
|
+
},
|
|
945
|
+
render: function render(_ref10) {
|
|
946
|
+
var field = _ref10.field,
|
|
947
|
+
fieldState = _ref10.fieldState;
|
|
948
|
+
return jsxRuntime.jsx(blocks.Input, Object.assign({}, field, {
|
|
949
|
+
invalid: fieldState.invalid,
|
|
950
|
+
size: "small",
|
|
951
|
+
width: "xsmall",
|
|
952
|
+
type: "number",
|
|
953
|
+
label: "\uC870\uC815 \uC810\uC218"
|
|
954
|
+
}));
|
|
955
|
+
}
|
|
956
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
957
|
+
width: 0.75
|
|
958
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
959
|
+
bold: true,
|
|
960
|
+
role: "gray9",
|
|
961
|
+
size: "small",
|
|
962
|
+
children: "\uC810"
|
|
963
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
964
|
+
role: "gray6",
|
|
965
|
+
size: "small",
|
|
966
|
+
children: ' / 100점 만점'
|
|
967
|
+
})]
|
|
968
|
+
})]
|
|
969
|
+
});
|
|
748
970
|
};
|
|
749
|
-
return
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
971
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
972
|
+
children: [renderHeader(), jsxRuntime.jsx(blocks.Flex, {
|
|
973
|
+
column: true,
|
|
974
|
+
auto: true,
|
|
975
|
+
padding: "3.625rem",
|
|
976
|
+
width: "100%",
|
|
977
|
+
height: "100%",
|
|
978
|
+
overflow: "hidden",
|
|
979
|
+
align: "center",
|
|
980
|
+
children: jsxRuntime.jsxs(MaterialAssignmentContainer.default, {
|
|
981
|
+
title: (_a = materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.title) !== null && _a !== void 0 ? _a : '',
|
|
982
|
+
children: [renderGradeResult(), jsxRuntime.jsx(blocks.Vspace, {
|
|
983
|
+
height: 1.25
|
|
984
|
+
}), renderSubmissionInfo(), jsxRuntime.jsx(blocks.Vspace, {
|
|
985
|
+
height: 1.5
|
|
986
|
+
}), renderGradeList()]
|
|
987
|
+
})
|
|
988
|
+
}), renderGradeEditModal(), renderGradeShowModal(), renderGradeDeleteModal(), renderManualScoreEditModal()]
|
|
989
|
+
});
|
|
764
990
|
});
|
|
765
991
|
|
|
766
992
|
exports.default = MaterialAssignmentAdminContent;
|