@elice/material-assignment 1.231212.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
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useForm, Controller } from 'react-hook-form';
|
|
4
3
|
import { FormattedDate } from 'react-intl';
|
|
5
4
|
import { config, getOrgUserGet, getOrgMaterialAssignmentGet, getOrgMaterialAssignmentSubmissionList, getOrgMaterialAssignmentGradeResultGet, getOrgMaterialAssignmentGradeList, postOrgMaterialAssignmentGradeEdit } from '@elice/api-client';
|
|
6
|
-
import { Flex, Vspace,
|
|
5
|
+
import { Notification, Flex, Vspace, ProfileImage, Hspace, Text, Tooltip, Icon, InfoTable, Button, TableNext, Modal, Label, Input, Textarea } from '@elice/blocks';
|
|
7
6
|
import { base } from '@elice/design-tokens';
|
|
8
7
|
import { eilStatusInfo } from '@elice/icons';
|
|
9
8
|
import { useMaterialConfigApiClientUpdate } from '@elice/material-shared-utils';
|
|
@@ -11,13 +10,14 @@ import dayjs from 'dayjs';
|
|
|
11
10
|
import MaterialAssignmentContainer from '../shared/MaterialAssignmentContainer.js';
|
|
12
11
|
import { StyledMaterialAssignmentAdminHeader, StyledMaterialAssignmentAdminHeaderCell, StyledMaterialAssignmentAdminGradeWrapper } from './MaterialAssignmentAdmin.styled.js';
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const MaterialAssignmentAdminContentTa = ({
|
|
14
|
+
materialAssignmentId,
|
|
15
|
+
userId,
|
|
16
|
+
adminUserId
|
|
17
|
+
}) => {
|
|
18
18
|
var _a;
|
|
19
19
|
// Form
|
|
20
|
-
|
|
20
|
+
const gradeEditFormMethods = useForm({
|
|
21
21
|
defaultValues: {
|
|
22
22
|
score: 0,
|
|
23
23
|
comment: ''
|
|
@@ -25,100 +25,67 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
25
25
|
mode: 'onChange'
|
|
26
26
|
});
|
|
27
27
|
// State related with component
|
|
28
|
-
|
|
29
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
30
|
-
showGradeEditModal = _React$useState2[0],
|
|
31
|
-
setShowGradeEditModal = _React$useState2[1];
|
|
28
|
+
const [showGradeEditModal, setShowGradeEditModal] = React.useState(false);
|
|
32
29
|
// State related with api
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var _React$useState7 = React.useState(null),
|
|
42
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
43
|
-
userSubmission = _React$useState8[0],
|
|
44
|
-
setUserSubmission = _React$useState8[1];
|
|
45
|
-
var _React$useState9 = React.useState(null),
|
|
46
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
47
|
-
gradeResult = _React$useState10[0],
|
|
48
|
-
setGradeResult = _React$useState10[1];
|
|
49
|
-
var _React$useState11 = React.useState(null),
|
|
50
|
-
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
51
|
-
myGrade = _React$useState12[0],
|
|
52
|
-
setMyGrade = _React$useState12[1];
|
|
53
|
-
var isAssignmentClosed = dayjs().isAfter(dayjs(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime));
|
|
54
|
-
var isScoreFinalized = Boolean(materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.scoreFinalizedDatetime);
|
|
55
|
-
var isUserSubmitted = Boolean(userSubmission);
|
|
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);
|
|
56
38
|
// API Status
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
submissionListGetStatus = _React$useState14[0],
|
|
61
|
-
setSubmissionListGetStatus = _React$useState14[1];
|
|
62
|
-
var fetchUserGet = React.useCallback(function () {
|
|
39
|
+
const isReady = useMaterialConfigApiClientUpdate(config.init);
|
|
40
|
+
const [submissionListGetStatus, setSubmissionListGetStatus] = React.useState('idle');
|
|
41
|
+
const fetchUserGet = React.useCallback(() => {
|
|
63
42
|
void getOrgUserGet({
|
|
64
|
-
userId
|
|
65
|
-
}).then(
|
|
66
|
-
return res.user;
|
|
67
|
-
}).then(setUser);
|
|
43
|
+
userId
|
|
44
|
+
}).then(res => res.user).then(setUser);
|
|
68
45
|
}, [userId]);
|
|
69
|
-
|
|
46
|
+
const fetchMaterialAssignmentGet = React.useCallback(() => {
|
|
70
47
|
void getOrgMaterialAssignmentGet({
|
|
71
|
-
materialAssignmentId
|
|
72
|
-
}).then(
|
|
73
|
-
return res.materialAssignment;
|
|
74
|
-
}).then(setMaterialAssignment);
|
|
48
|
+
materialAssignmentId
|
|
49
|
+
}).then(res => res.materialAssignment).then(setMaterialAssignment);
|
|
75
50
|
}, [materialAssignmentId]);
|
|
76
|
-
|
|
51
|
+
const fetchSubmissionList = React.useCallback(() => {
|
|
77
52
|
setSubmissionListGetStatus('pending');
|
|
78
53
|
void getOrgMaterialAssignmentSubmissionList({
|
|
79
|
-
materialAssignmentId
|
|
54
|
+
materialAssignmentId,
|
|
80
55
|
offset: 0,
|
|
81
56
|
count: 1,
|
|
82
57
|
filterConditions: {
|
|
83
58
|
isLast: true,
|
|
84
59
|
userIds: [userId]
|
|
85
60
|
}
|
|
86
|
-
}).then(
|
|
87
|
-
return res.materialAssignmentSubmissions[0];
|
|
88
|
-
}).then(function (submission) {
|
|
61
|
+
}).then(res => res.materialAssignmentSubmissions[0]).then(submission => {
|
|
89
62
|
setUserSubmission(submission !== null && submission !== void 0 ? submission : null);
|
|
90
63
|
setSubmissionListGetStatus('resolved');
|
|
91
|
-
}).catch(
|
|
64
|
+
}).catch(err => {
|
|
92
65
|
console.error(err);
|
|
93
66
|
setSubmissionListGetStatus('rejected');
|
|
94
67
|
});
|
|
95
68
|
}, [materialAssignmentId, userId]);
|
|
96
|
-
|
|
69
|
+
const fetchGradeResult = React.useCallback(() => {
|
|
97
70
|
void getOrgMaterialAssignmentGradeResultGet({
|
|
98
|
-
materialAssignmentId
|
|
99
|
-
userId
|
|
100
|
-
}).then(
|
|
101
|
-
return res.materialAssignmentGradeResult;
|
|
102
|
-
}).then(setGradeResult).catch(function () {
|
|
71
|
+
materialAssignmentId,
|
|
72
|
+
userId
|
|
73
|
+
}).then(res => res.materialAssignmentGradeResult).then(setGradeResult).catch(() => {
|
|
103
74
|
setGradeResult(null);
|
|
104
75
|
});
|
|
105
76
|
}, [materialAssignmentId, userId]);
|
|
106
|
-
|
|
77
|
+
const fetchMyGrade = React.useCallback(() => {
|
|
107
78
|
void getOrgMaterialAssignmentGradeList({
|
|
108
|
-
materialAssignmentId
|
|
79
|
+
materialAssignmentId,
|
|
109
80
|
offset: 0,
|
|
110
81
|
count: 1,
|
|
111
82
|
filterConditions: {
|
|
112
|
-
userId
|
|
83
|
+
userId,
|
|
113
84
|
gradeUserId: adminUserId
|
|
114
85
|
}
|
|
115
|
-
}).then(
|
|
116
|
-
return res.materialAssignmentGrades[0];
|
|
117
|
-
}).then(function (grade) {
|
|
118
|
-
return setMyGrade(grade !== null && grade !== void 0 ? grade : null);
|
|
119
|
-
});
|
|
86
|
+
}).then(res => res.materialAssignmentGrades[0]).then(grade => setMyGrade(grade !== null && grade !== void 0 ? grade : null));
|
|
120
87
|
}, [adminUserId, materialAssignmentId, userId]);
|
|
121
|
-
|
|
88
|
+
const handleGradeEditClick = () => {
|
|
122
89
|
var _a, _b;
|
|
123
90
|
setShowGradeEditModal(true);
|
|
124
91
|
gradeEditFormMethods.reset({
|
|
@@ -126,47 +93,28 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
126
93
|
comment: (_b = myGrade === null || myGrade === void 0 ? void 0 : myGrade.comment) !== null && _b !== void 0 ? _b : ''
|
|
127
94
|
});
|
|
128
95
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
_context.prev = 8;
|
|
152
|
-
_context.t0 = _context["catch"](1);
|
|
153
|
-
console.error(_context.t0);
|
|
154
|
-
Notification.error('오류가 발생했습니다.');
|
|
155
|
-
case 12:
|
|
156
|
-
_context.prev = 12;
|
|
157
|
-
setShowGradeEditModal(false);
|
|
158
|
-
return _context.finish(12);
|
|
159
|
-
case 15:
|
|
160
|
-
case "end":
|
|
161
|
-
return _context.stop();
|
|
162
|
-
}
|
|
163
|
-
}, _callee, null, [[1, 8, 12, 15]]);
|
|
164
|
-
}));
|
|
165
|
-
return function (_x) {
|
|
166
|
-
return _ref3.apply(this, arguments);
|
|
167
|
-
};
|
|
168
|
-
}());
|
|
169
|
-
React.useEffect(function () {
|
|
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(() => {
|
|
170
118
|
if (!isReady) {
|
|
171
119
|
return;
|
|
172
120
|
}
|
|
@@ -176,7 +124,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
176
124
|
fetchSubmissionList();
|
|
177
125
|
fetchMaterialAssignmentGet();
|
|
178
126
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
179
|
-
|
|
127
|
+
const renderHeader = () => {
|
|
180
128
|
var _a;
|
|
181
129
|
return React.createElement(StyledMaterialAssignmentAdminHeader, {
|
|
182
130
|
align: "center",
|
|
@@ -200,7 +148,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
200
148
|
}, "\uC810\uC218"), React.createElement(Text, {
|
|
201
149
|
size: "small",
|
|
202
150
|
role: "white"
|
|
203
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
151
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? `${gradeResult.score}점(공개됨)` : '--')), React.createElement(StyledMaterialAssignmentAdminHeaderCell, null, React.createElement(Text, {
|
|
204
152
|
size: "tiny",
|
|
205
153
|
role: "gray4"
|
|
206
154
|
}, "\uC81C\uCD9C \uC77C\uC2DC"), React.createElement(Text, {
|
|
@@ -212,7 +160,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
212
160
|
timeStyle: "short"
|
|
213
161
|
}) : '--')));
|
|
214
162
|
};
|
|
215
|
-
|
|
163
|
+
const renderGradeResult = () => {
|
|
216
164
|
return React.createElement(StyledMaterialAssignmentAdminGradeWrapper, {
|
|
217
165
|
wrap: true,
|
|
218
166
|
width: "100%",
|
|
@@ -224,7 +172,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
224
172
|
role: "navy1",
|
|
225
173
|
size: "small",
|
|
226
174
|
lineHeight: "1.375rem"
|
|
227
|
-
}, user ?
|
|
175
|
+
}, user ? `${user.fullname} 님의 점수` : null), React.createElement(Hspace, {
|
|
228
176
|
width: 0.25
|
|
229
177
|
}), React.createElement(Tooltip, {
|
|
230
178
|
useMaxWidth: true,
|
|
@@ -238,10 +186,10 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
238
186
|
}), React.createElement(Text, {
|
|
239
187
|
bold: true,
|
|
240
188
|
role: "white"
|
|
241
|
-
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ?
|
|
189
|
+
}, (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? `${gradeResult.score}점(공개됨)` : '--')));
|
|
242
190
|
};
|
|
243
|
-
|
|
244
|
-
|
|
191
|
+
const renderSubmissionInfo = () => {
|
|
192
|
+
const statusText = (() => {
|
|
245
193
|
if (submissionListGetStatus === 'pending') {
|
|
246
194
|
return null;
|
|
247
195
|
}
|
|
@@ -271,13 +219,13 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
271
219
|
size: "small"
|
|
272
220
|
}, "\uBBF8\uC81C\uCD9C");
|
|
273
221
|
}
|
|
274
|
-
}();
|
|
275
|
-
|
|
222
|
+
})();
|
|
223
|
+
const submissionAttachment = (() => {
|
|
276
224
|
if (!userSubmission) {
|
|
277
225
|
return '--';
|
|
278
226
|
}
|
|
279
227
|
if (userSubmission.assignmentFileUrl) {
|
|
280
|
-
|
|
228
|
+
const assignmentFilename = decodeURIComponent(userSubmission.assignmentFileUrl && new URL(userSubmission.assignmentFileUrl).pathname.split('/').pop() || '');
|
|
281
229
|
return React.createElement("a", {
|
|
282
230
|
href: userSubmission.assignmentFileUrl,
|
|
283
231
|
download: assignmentFilename,
|
|
@@ -302,7 +250,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
302
250
|
size: "small"
|
|
303
251
|
}, userSubmission.assignmentUrl));
|
|
304
252
|
}
|
|
305
|
-
}();
|
|
253
|
+
})();
|
|
306
254
|
return React.createElement(InfoTable, {
|
|
307
255
|
dark: true
|
|
308
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, {
|
|
@@ -315,9 +263,9 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
315
263
|
timeStyle: "short"
|
|
316
264
|
}) : '--')), React.createElement("tr", null, React.createElement("td", null, "\uC5C5\uB85C\uB4DC\uB41C \uACFC\uC81C"), React.createElement("td", null, submissionAttachment))));
|
|
317
265
|
};
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
266
|
+
const renderGrade = () => {
|
|
267
|
+
const isGradeEditDisabled = !isAssignmentClosed || !isUserSubmitted || isScoreFinalized;
|
|
268
|
+
const tooltipTitle = (() => {
|
|
321
269
|
switch (true) {
|
|
322
270
|
case isScoreFinalized:
|
|
323
271
|
return '공개 이후 채점이 불가합니다.';
|
|
@@ -326,7 +274,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
326
274
|
case !isUserSubmitted:
|
|
327
275
|
return '미제출인 경우 채점할 수 없습니다.';
|
|
328
276
|
}
|
|
329
|
-
}();
|
|
277
|
+
})();
|
|
330
278
|
return React.createElement(Flex, {
|
|
331
279
|
column: true,
|
|
332
280
|
align: "center"
|
|
@@ -394,7 +342,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
394
342
|
}] : []
|
|
395
343
|
}));
|
|
396
344
|
};
|
|
397
|
-
|
|
345
|
+
const renderGradeEditModal = () => {
|
|
398
346
|
if (!showGradeEditModal) {
|
|
399
347
|
return null;
|
|
400
348
|
}
|
|
@@ -411,11 +359,11 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
411
359
|
label: '취소',
|
|
412
360
|
size: 'small',
|
|
413
361
|
role: 'gray1',
|
|
414
|
-
onClick:
|
|
362
|
+
onClick: () => {
|
|
415
363
|
setShowGradeEditModal(false);
|
|
416
364
|
}
|
|
417
365
|
}],
|
|
418
|
-
onHide:
|
|
366
|
+
onHide: () => {
|
|
419
367
|
setShowGradeEditModal(false);
|
|
420
368
|
}
|
|
421
369
|
}, React.createElement(Label, {
|
|
@@ -434,16 +382,15 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
434
382
|
min: 0,
|
|
435
383
|
max: 100
|
|
436
384
|
},
|
|
437
|
-
render:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}
|
|
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
|
+
}))
|
|
447
394
|
}), React.createElement(Hspace, {
|
|
448
395
|
width: 0.5
|
|
449
396
|
}), React.createElement(Text, {
|
|
@@ -466,15 +413,14 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
466
413
|
rules: {
|
|
467
414
|
maxLength: 1000
|
|
468
415
|
},
|
|
469
|
-
render:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}
|
|
416
|
+
render: ({
|
|
417
|
+
field
|
|
418
|
+
}) => React.createElement(Textarea, {
|
|
419
|
+
value: field.value,
|
|
420
|
+
wordLimit: 1000,
|
|
421
|
+
rows: 8,
|
|
422
|
+
onChange: field.onChange
|
|
423
|
+
})
|
|
478
424
|
}));
|
|
479
425
|
};
|
|
480
426
|
return React.createElement(React.Fragment, null, renderHeader(), React.createElement(Flex, {
|
|
@@ -3,18 +3,19 @@ import { Text } from '@elice/blocks';
|
|
|
3
3
|
import { base } from '@elice/design-tokens';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const StyledMaterialAssignmentContainer = styled.div.withConfig({
|
|
7
7
|
componentId: "sc-sdhlog-0"
|
|
8
8
|
})(["height:100%;width:100%;max-width:55rem;border-radius:0.5rem;overflow:hidden;"]);
|
|
9
|
-
|
|
9
|
+
const StyledMaterialAssignmentContainerHeader = styled.div.withConfig({
|
|
10
10
|
componentId: "sc-sdhlog-1"
|
|
11
11
|
})(["padding:1rem 1.5rem;height:3.5rem;display:flex;align-items:center;background-color:", ";"], base.color.navy7);
|
|
12
|
-
|
|
12
|
+
const StyledMaterialAssignmentContainerContent = styled.div.withConfig({
|
|
13
13
|
componentId: "sc-sdhlog-2"
|
|
14
14
|
})(["padding:1.5rem;overflow-y:auto;height:calc(100% - 3.5rem);background-color:", ";"], base.color.navy8);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const MaterialAssignmentContainer = ({
|
|
16
|
+
title,
|
|
17
|
+
children
|
|
18
|
+
}) => {
|
|
18
19
|
return React.createElement(StyledMaterialAssignmentContainer, null, React.createElement(StyledMaterialAssignmentContainerHeader, null, React.createElement(Text, {
|
|
19
20
|
bold: true,
|
|
20
21
|
role: "navy0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-assignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.231228.0",
|
|
4
4
|
"description": "User view and editing components of Elice material assignment",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
20
|
"build": "run-p build:es build:cjs",
|
|
21
|
-
"build:es": "rollup -c ../../rollup.config.ts -f es",
|
|
22
|
-
"build:cjs": "rollup -c ../../rollup.config.ts -f cjs",
|
|
23
|
-
"watch": "rollup -c ../../rollup.config.ts -f es -w",
|
|
21
|
+
"build:es": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es",
|
|
22
|
+
"build:cjs": "rollup -c ../../rollup.config.ts --configPlugin typescript -f cjs",
|
|
23
|
+
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -w",
|
|
24
24
|
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
25
25
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
26
26
|
},
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@elice/icons": "^1.230814.0",
|
|
52
52
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
53
53
|
"@elice/markdown": "^1.220815.0",
|
|
54
|
-
"@elice/material-shared-types": "1.
|
|
55
|
-
"@elice/material-shared-utils": "1.
|
|
54
|
+
"@elice/material-shared-types": "1.231228.0",
|
|
55
|
+
"@elice/material-shared-utils": "1.231228.0",
|
|
56
56
|
"@elice/types": "^1.230815.0",
|
|
57
57
|
"@types/classnames": "^2.3.1",
|
|
58
58
|
"@types/react": "~17.0.9",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"react-use": "^17.2.4",
|
|
63
63
|
"styled-components": "^5.3.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "98c3e4d64847cdbe7985f8fd95835bb01f1d53ca"
|
|
66
66
|
}
|