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