@elice/material-assignment 1.240912.1 → 1.241004.0-aidt.2
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/locales/th.json.js +1 -1
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.d.ts +2 -0
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +12 -4
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +56 -1
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +58 -1
- package/es/components/material-assignment/locales/th.json.js +1 -1
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.d.ts +2 -0
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +11 -5
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +58 -3
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +60 -3
- package/package.json +4 -4
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var th = {"materialAssignment.button.upload":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.error":"
|
|
5
|
+
var th = {"materialAssignment.button.upload":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.error":"ไม่สามารถเรียกรายการการมอบหมายได้","materialAssignment.status.noSubmitted":"ไม่มีการส่ง","materialAssignment.status.submitted":"เสนอ","materialAssignment.status.graded":"จัดเกรด","materialAssignment.status.deadlineExpired":"วันกำหนดสิ้นสุดหมดอายุลง","materialAssignment.table.column.status":"สถานะ","materialAssignment.table.column.deadlineDatetime":"วันเวลาส่งงาน","materialAssignment.table.column.lastSubmitDatetime":"เวลาส่งครั้งล่าสุด","materialAssignment.table.column.uploadedFile":"ไฟล์ที่อัพโหลดแล้ว","materialAssignment.table.column.assignmentScore":"คะแนนการบ้าน","materialAssignment.table.column.score":"{score}","materialAssignment.table.column.totalPoint":"/ {point} จุด","materialAssignment.table.header.index":"ดัชนี","materialAssignment.table.header.feedback":"ข้อเสนอแนะ","materialAssignment.table.empty.noAssignment":"การให้คะแนนยังไม่เสร็จสิ้นเรียบร้อยแล้ว","materialAssignment.table.empty.noFeedback":"ไม่ได้มีข้อเสนอแนะถูกสร้างขึ้น","materialAssignment.label.general":"ทั่วไป","materialAssignment.label.feedback":"ข้อเสนอแนะ","materialAssignment.description.general":"คุณสามารถดูข้อมูลพื้นฐานที่เกี่ยวข้องกับงานได้","materialAssignment.description.feedback":"ตรวจสอบคำติชมของคุณ","materialAssignment.notification.submit.success":"การมอบหมายงานได้ถูกส่งแล้ว","materialAssignment.notification.submit.failure":"เกิดข้อผิดพลาดขึ้นในขณะที่ส่งงาน","materialAssignment.notification.submit.cancel":"การส่งงานมอบหมายถูกยกเลิกแล้ว","materialAssignment.modal.title":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.modal.button.submit":"ส่งใบสมัคร","materialAssignment.modal.button.cancel":"ยกเลิก","materialAssignment.alert.onceSubmit":"จำนวนการส่งงานถูกจำกัดเพียงหนึ่งครั้งเท่านั้น โปรดทราบว่าไม่สามารถแก้ไขงานหลังจากการส่ง","materialAssignment.alert.oftenSubmit":"คุณสามารถแก้ไขและส่งใหม่ได้ก่อนกำหนดส่งหลังจากการส่งแล้ว","materialAssignment.radio.option.attachment":"เอกสารแนบ","materialAssignment.radio.option.url":"URL","materialAssignment.attachment.dropMessage":"เพิ่มไฟล์ด้วยการลากและวาง","materialAssignment.attachment.maxSizeMessage":"สามารถอัปโหลดได้สูงสุด 300MB","materialAssignment.attachment.button":"เลือกไฟล์","materialAssignment.attachment.checkbox.onceSubmit":"ฉันได้ตรวจสอบทุกสถานการณ์และยินยอมที่จะส่งงาน","materialAssignment.input.invalid":"URL ไม่มีรูปแบบที่ถูกต้อง"};
|
|
6
6
|
|
|
7
7
|
exports.default = th;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Text } from '@elice/blocks';
|
|
3
3
|
export declare const StyledMaterialAssignmentAdminContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledMaterialAssignmentAdminHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elice/blocks").FlexProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
+
export declare const StyledMaterialAssignmentAdminHeaderCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
6
|
export declare const StyledMaterialAssignmentAdminGradeWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elice/blocks").FlexProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
7
|
export declare const StyledMaterialAssignmentAdminTextareaWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
8
|
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -11,27 +11,35 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
|
11
11
|
var StyledMaterialAssignmentAdminContainer = styled__default.default.div.withConfig({
|
|
12
12
|
componentId: "sc-1czd3o6-0"
|
|
13
13
|
})(["display:flex;flex-direction:column;align-items:center;width:100%;height:100%;background-color:", ";"], designTokens.base.color.navy9);
|
|
14
|
-
var
|
|
14
|
+
var StyledMaterialAssignmentAdminHeader = styled__default.default(blocks.Flex).withConfig({
|
|
15
15
|
componentId: "sc-1czd3o6-1"
|
|
16
|
+
})(["background-color:", ";"], designTokens.base.color.navy8);
|
|
17
|
+
var StyledMaterialAssignmentAdminHeaderCell = styled__default.default.div.withConfig({
|
|
18
|
+
componentId: "sc-1czd3o6-2"
|
|
19
|
+
})(["display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;padding:0 1.5rem;height:100%;border-right:1px solid ", ";&:last-of-type{border-right:none;}"], designTokens.base.color.gray6);
|
|
20
|
+
var StyledMaterialAssignmentAdminGradeWrapper = styled__default.default(blocks.Flex).withConfig({
|
|
21
|
+
componentId: "sc-1czd3o6-3"
|
|
16
22
|
})(["background-color:", ";width:100%;padding:0 1.5rem;height:4.5rem;border:1px solid ", ";border-radius:0.5rem;"], designTokens.base.color.navy7, designTokens.base.color.navy6);
|
|
17
23
|
var StyledMaterialAssignmentAdminTextareaWrapper = styled__default.default.div.withConfig({
|
|
18
|
-
componentId: "sc-1czd3o6-
|
|
24
|
+
componentId: "sc-1czd3o6-4"
|
|
19
25
|
})(["background-color:", ";"], designTokens.base.color.gray2);
|
|
20
26
|
var StyledMaterialAssignmentAdminManualScoreEditButtonWrapper = styled__default.default.div.withConfig({
|
|
21
|
-
componentId: "sc-1czd3o6-
|
|
27
|
+
componentId: "sc-1czd3o6-5"
|
|
22
28
|
})(["cursor:", ";opacity:", ";"], function (props) {
|
|
23
29
|
return props.disabled ? 'not-allowed' : 'pointer';
|
|
24
30
|
}, function (props) {
|
|
25
31
|
return props.disabled ? 0.5 : 1;
|
|
26
32
|
});
|
|
27
33
|
var StyledMaterialAssignmentAdminManualScoreEditButton = styled__default.default(blocks.Text).withConfig({
|
|
28
|
-
componentId: "sc-1czd3o6-
|
|
34
|
+
componentId: "sc-1czd3o6-6"
|
|
29
35
|
})(["pointer-events:", ";"], function (props) {
|
|
30
36
|
return props.disabled ? 'none' : 'auto';
|
|
31
37
|
});
|
|
32
38
|
|
|
33
39
|
exports.StyledMaterialAssignmentAdminContainer = StyledMaterialAssignmentAdminContainer;
|
|
34
40
|
exports.StyledMaterialAssignmentAdminGradeWrapper = StyledMaterialAssignmentAdminGradeWrapper;
|
|
41
|
+
exports.StyledMaterialAssignmentAdminHeader = StyledMaterialAssignmentAdminHeader;
|
|
42
|
+
exports.StyledMaterialAssignmentAdminHeaderCell = StyledMaterialAssignmentAdminHeaderCell;
|
|
35
43
|
exports.StyledMaterialAssignmentAdminManualScoreEditButton = StyledMaterialAssignmentAdminManualScoreEditButton;
|
|
36
44
|
exports.StyledMaterialAssignmentAdminManualScoreEditButtonWrapper = StyledMaterialAssignmentAdminManualScoreEditButtonWrapper;
|
|
37
45
|
exports.StyledMaterialAssignmentAdminTextareaWrapper = StyledMaterialAssignmentAdminTextareaWrapper;
|
|
@@ -363,6 +363,61 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
}, [fetchMaterialAssignmentGet]);
|
|
366
|
+
var renderHeader = function renderHeader() {
|
|
367
|
+
var _a, _b, _c;
|
|
368
|
+
return jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeader, {
|
|
369
|
+
align: "center",
|
|
370
|
+
padding: "1rem",
|
|
371
|
+
width: "100%",
|
|
372
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
373
|
+
auto: true,
|
|
374
|
+
align: "center",
|
|
375
|
+
children: [jsxRuntime.jsx(blocks.ProfileImage, {
|
|
376
|
+
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
377
|
+
width: "2.5rem",
|
|
378
|
+
height: "2.5rem"
|
|
379
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
380
|
+
width: 1
|
|
381
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
382
|
+
size: "small",
|
|
383
|
+
role: "warmwhite",
|
|
384
|
+
children: user === null || user === void 0 ? void 0 : user.fullname
|
|
385
|
+
})]
|
|
386
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
387
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
388
|
+
size: "tiny",
|
|
389
|
+
role: "gray4",
|
|
390
|
+
children: intl$1.formatMessage({
|
|
391
|
+
id: 'materialAssignment.score'
|
|
392
|
+
})
|
|
393
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
394
|
+
size: "small",
|
|
395
|
+
role: "white",
|
|
396
|
+
children: gradeResult ? "".concat((_c = (_b = gradeResult.manualScore) !== null && _b !== void 0 ? _b : gradeResult.avgCalcScore) !== null && _c !== void 0 ? _c : 0).concat(isScoreFinalized ? intl$1.formatMessage({
|
|
397
|
+
id: 'materialAssignment.reveal'
|
|
398
|
+
}) : intl$1.formatMessage({
|
|
399
|
+
id: 'materialAssignment.private'
|
|
400
|
+
})) : '--'
|
|
401
|
+
})]
|
|
402
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
403
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
404
|
+
size: "tiny",
|
|
405
|
+
role: "gray4",
|
|
406
|
+
children: intl$1.formatMessage({
|
|
407
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
408
|
+
})
|
|
409
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
410
|
+
size: "small",
|
|
411
|
+
role: "white",
|
|
412
|
+
children: userSubmission ? jsxRuntime.jsx(intl.FormattedDate, {
|
|
413
|
+
value: userSubmission.createdDatetime,
|
|
414
|
+
dateStyle: "medium",
|
|
415
|
+
timeStyle: "short"
|
|
416
|
+
}) : '--'
|
|
417
|
+
})]
|
|
418
|
+
})]
|
|
419
|
+
});
|
|
420
|
+
};
|
|
366
421
|
var renderManualScoreEditButton = function renderManualScoreEditButton() {
|
|
367
422
|
return jsxRuntime.jsx(blocks.Tooltip, {
|
|
368
423
|
placement: "top",
|
|
@@ -1041,7 +1096,7 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
1041
1096
|
});
|
|
1042
1097
|
};
|
|
1043
1098
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1044
|
-
children: [jsxRuntime.jsx(blocks.Flex, {
|
|
1099
|
+
children: [renderHeader(), jsxRuntime.jsx(blocks.Flex, {
|
|
1045
1100
|
column: true,
|
|
1046
1101
|
auto: true,
|
|
1047
1102
|
padding: "3.625rem",
|
|
@@ -191,6 +191,63 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
191
191
|
fetchSubmissionList();
|
|
192
192
|
fetchMaterialAssignmentGet();
|
|
193
193
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
194
|
+
var renderHeader = function renderHeader() {
|
|
195
|
+
var _a;
|
|
196
|
+
return jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeader, {
|
|
197
|
+
align: "center",
|
|
198
|
+
padding: "1rem",
|
|
199
|
+
width: "100%",
|
|
200
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
201
|
+
auto: true,
|
|
202
|
+
align: "center",
|
|
203
|
+
children: [jsxRuntime.jsx(blocks.ProfileImage, {
|
|
204
|
+
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
205
|
+
width: "2.5rem",
|
|
206
|
+
height: "2.5rem"
|
|
207
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
208
|
+
width: 1
|
|
209
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
210
|
+
size: "small",
|
|
211
|
+
role: "warmwhite",
|
|
212
|
+
children: user === null || user === void 0 ? void 0 : user.fullname
|
|
213
|
+
})]
|
|
214
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
215
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
216
|
+
size: "tiny",
|
|
217
|
+
role: "gray4",
|
|
218
|
+
children: intl$1.formatMessage({
|
|
219
|
+
id: 'materialAssignment.score'
|
|
220
|
+
})
|
|
221
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
222
|
+
size: "small",
|
|
223
|
+
role: "white",
|
|
224
|
+
children: (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? "".concat(intl$1.formatMessage({
|
|
225
|
+
id: 'materialAssignment.table.column.score'
|
|
226
|
+
}, {
|
|
227
|
+
score: gradeResult.score
|
|
228
|
+
})).concat(intl$1.formatMessage({
|
|
229
|
+
id: 'materialAssignment.reveal'
|
|
230
|
+
})) : '--'
|
|
231
|
+
})]
|
|
232
|
+
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
233
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
234
|
+
size: "tiny",
|
|
235
|
+
role: "gray4",
|
|
236
|
+
children: intl$1.formatMessage({
|
|
237
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
238
|
+
})
|
|
239
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
240
|
+
size: "small",
|
|
241
|
+
role: "white",
|
|
242
|
+
children: userSubmission ? jsxRuntime.jsx(intl.FormattedDate, {
|
|
243
|
+
value: userSubmission.createdDatetime,
|
|
244
|
+
dateStyle: "medium",
|
|
245
|
+
timeStyle: "short"
|
|
246
|
+
}) : '--'
|
|
247
|
+
})]
|
|
248
|
+
})]
|
|
249
|
+
});
|
|
250
|
+
};
|
|
194
251
|
var renderGradeResult = function renderGradeResult() {
|
|
195
252
|
return jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminGradeWrapper, {
|
|
196
253
|
wrap: true,
|
|
@@ -577,7 +634,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
577
634
|
});
|
|
578
635
|
};
|
|
579
636
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
580
|
-
children: [jsxRuntime.jsx(blocks.Flex, {
|
|
637
|
+
children: [renderHeader(), jsxRuntime.jsx(blocks.Flex, {
|
|
581
638
|
column: true,
|
|
582
639
|
auto: true,
|
|
583
640
|
padding: "3.625rem",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var th = {"materialAssignment.button.upload":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.error":"
|
|
1
|
+
var th = {"materialAssignment.button.upload":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.error":"ไม่สามารถเรียกรายการการมอบหมายได้","materialAssignment.status.noSubmitted":"ไม่มีการส่ง","materialAssignment.status.submitted":"เสนอ","materialAssignment.status.graded":"จัดเกรด","materialAssignment.status.deadlineExpired":"วันกำหนดสิ้นสุดหมดอายุลง","materialAssignment.table.column.status":"สถานะ","materialAssignment.table.column.deadlineDatetime":"วันเวลาส่งงาน","materialAssignment.table.column.lastSubmitDatetime":"เวลาส่งครั้งล่าสุด","materialAssignment.table.column.uploadedFile":"ไฟล์ที่อัพโหลดแล้ว","materialAssignment.table.column.assignmentScore":"คะแนนการบ้าน","materialAssignment.table.column.score":"{score}","materialAssignment.table.column.totalPoint":"/ {point} จุด","materialAssignment.table.header.index":"ดัชนี","materialAssignment.table.header.feedback":"ข้อเสนอแนะ","materialAssignment.table.empty.noAssignment":"การให้คะแนนยังไม่เสร็จสิ้นเรียบร้อยแล้ว","materialAssignment.table.empty.noFeedback":"ไม่ได้มีข้อเสนอแนะถูกสร้างขึ้น","materialAssignment.label.general":"ทั่วไป","materialAssignment.label.feedback":"ข้อเสนอแนะ","materialAssignment.description.general":"คุณสามารถดูข้อมูลพื้นฐานที่เกี่ยวข้องกับงานได้","materialAssignment.description.feedback":"ตรวจสอบคำติชมของคุณ","materialAssignment.notification.submit.success":"การมอบหมายงานได้ถูกส่งแล้ว","materialAssignment.notification.submit.failure":"เกิดข้อผิดพลาดขึ้นในขณะที่ส่งงาน","materialAssignment.notification.submit.cancel":"การส่งงานมอบหมายถูกยกเลิกแล้ว","materialAssignment.modal.title":"อัพโหลดงานที่ได้รับมอบหมาย","materialAssignment.modal.button.submit":"ส่งใบสมัคร","materialAssignment.modal.button.cancel":"ยกเลิก","materialAssignment.alert.onceSubmit":"จำนวนการส่งงานถูกจำกัดเพียงหนึ่งครั้งเท่านั้น โปรดทราบว่าไม่สามารถแก้ไขงานหลังจากการส่ง","materialAssignment.alert.oftenSubmit":"คุณสามารถแก้ไขและส่งใหม่ได้ก่อนกำหนดส่งหลังจากการส่งแล้ว","materialAssignment.radio.option.attachment":"เอกสารแนบ","materialAssignment.radio.option.url":"URL","materialAssignment.attachment.dropMessage":"เพิ่มไฟล์ด้วยการลากและวาง","materialAssignment.attachment.maxSizeMessage":"สามารถอัปโหลดได้สูงสุด 300MB","materialAssignment.attachment.button":"เลือกไฟล์","materialAssignment.attachment.checkbox.onceSubmit":"ฉันได้ตรวจสอบทุกสถานการณ์และยินยอมที่จะส่งงาน","materialAssignment.input.invalid":"URL ไม่มีรูปแบบที่ถูกต้อง"};
|
|
2
2
|
|
|
3
3
|
export { th as default };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Text } from '@elice/blocks';
|
|
3
3
|
export declare const StyledMaterialAssignmentAdminContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledMaterialAssignmentAdminHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elice/blocks").FlexProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
+
export declare const StyledMaterialAssignmentAdminHeaderCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
6
|
export declare const StyledMaterialAssignmentAdminGradeWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elice/blocks").FlexProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
7
|
export declare const StyledMaterialAssignmentAdminTextareaWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
8
|
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -5,23 +5,29 @@ import styled from 'styled-components';
|
|
|
5
5
|
var StyledMaterialAssignmentAdminContainer = styled.div.withConfig({
|
|
6
6
|
componentId: "sc-1czd3o6-0"
|
|
7
7
|
})(["display:flex;flex-direction:column;align-items:center;width:100%;height:100%;background-color:", ";"], base.color.navy9);
|
|
8
|
-
var
|
|
8
|
+
var StyledMaterialAssignmentAdminHeader = styled(Flex).withConfig({
|
|
9
9
|
componentId: "sc-1czd3o6-1"
|
|
10
|
+
})(["background-color:", ";"], base.color.navy8);
|
|
11
|
+
var StyledMaterialAssignmentAdminHeaderCell = styled.div.withConfig({
|
|
12
|
+
componentId: "sc-1czd3o6-2"
|
|
13
|
+
})(["display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;padding:0 1.5rem;height:100%;border-right:1px solid ", ";&:last-of-type{border-right:none;}"], base.color.gray6);
|
|
14
|
+
var StyledMaterialAssignmentAdminGradeWrapper = styled(Flex).withConfig({
|
|
15
|
+
componentId: "sc-1czd3o6-3"
|
|
10
16
|
})(["background-color:", ";width:100%;padding:0 1.5rem;height:4.5rem;border:1px solid ", ";border-radius:0.5rem;"], base.color.navy7, base.color.navy6);
|
|
11
17
|
var StyledMaterialAssignmentAdminTextareaWrapper = styled.div.withConfig({
|
|
12
|
-
componentId: "sc-1czd3o6-
|
|
18
|
+
componentId: "sc-1czd3o6-4"
|
|
13
19
|
})(["background-color:", ";"], base.color.gray2);
|
|
14
20
|
var StyledMaterialAssignmentAdminManualScoreEditButtonWrapper = styled.div.withConfig({
|
|
15
|
-
componentId: "sc-1czd3o6-
|
|
21
|
+
componentId: "sc-1czd3o6-5"
|
|
16
22
|
})(["cursor:", ";opacity:", ";"], function (props) {
|
|
17
23
|
return props.disabled ? 'not-allowed' : 'pointer';
|
|
18
24
|
}, function (props) {
|
|
19
25
|
return props.disabled ? 0.5 : 1;
|
|
20
26
|
});
|
|
21
27
|
var StyledMaterialAssignmentAdminManualScoreEditButton = styled(Text).withConfig({
|
|
22
|
-
componentId: "sc-1czd3o6-
|
|
28
|
+
componentId: "sc-1czd3o6-6"
|
|
23
29
|
})(["pointer-events:", ";"], function (props) {
|
|
24
30
|
return props.disabled ? 'none' : 'auto';
|
|
25
31
|
});
|
|
26
32
|
|
|
27
|
-
export { StyledMaterialAssignmentAdminContainer, StyledMaterialAssignmentAdminGradeWrapper, StyledMaterialAssignmentAdminManualScoreEditButton, StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, StyledMaterialAssignmentAdminTextareaWrapper };
|
|
33
|
+
export { StyledMaterialAssignmentAdminContainer, StyledMaterialAssignmentAdminGradeWrapper, StyledMaterialAssignmentAdminHeader, StyledMaterialAssignmentAdminHeaderCell, StyledMaterialAssignmentAdminManualScoreEditButton, StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, StyledMaterialAssignmentAdminTextareaWrapper };
|
|
@@ -3,14 +3,14 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { useForm, Controller } from 'react-hook-form';
|
|
5
5
|
import { config, getOrgUserGet, getOrgMaterialAssignmentGet, getOrgMaterialAssignmentSubmissionList, getOrgMaterialAssignmentGradeResultGet, getOrgMaterialAssignmentGradeList, postOrgMaterialAssignmentGradeEdit, postOrgMaterialAssignmentGradeResultManualScoreEdit, postOrgMaterialAssignmentGradeDelete } from '@elice/api-client';
|
|
6
|
-
import { Flex, Vspace,
|
|
6
|
+
import { Flex, Vspace, ProfileImage, Hspace, Text, Tooltip, Icon, InfoTable, Button, TableNext, IconButton, Pagination, Modal, Label, Input, Textarea, Alert, Notification } from '@elice/blocks';
|
|
7
7
|
import { base } from '@elice/design-tokens';
|
|
8
8
|
import { eilStatusInfo, eilChat, eilDelete, eilArrowRightwardsBasic } from '@elice/icons';
|
|
9
9
|
import { useRawEliceIntl, FormattedDate } from '@elice/intl';
|
|
10
10
|
import { useMaterialConfigApiClientUpdate } from '@elice/material-shared-utils';
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
12
|
import MaterialAssignmentContainer from '../shared/MaterialAssignmentContainer.js';
|
|
13
|
-
import { StyledMaterialAssignmentAdminGradeWrapper, StyledMaterialAssignmentAdminTextareaWrapper, StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, StyledMaterialAssignmentAdminManualScoreEditButton } from './MaterialAssignmentAdmin.styled.js';
|
|
13
|
+
import { StyledMaterialAssignmentAdminHeader, StyledMaterialAssignmentAdminHeaderCell, StyledMaterialAssignmentAdminGradeWrapper, StyledMaterialAssignmentAdminTextareaWrapper, StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, StyledMaterialAssignmentAdminManualScoreEditButton } from './MaterialAssignmentAdmin.styled.js';
|
|
14
14
|
|
|
15
15
|
var FETCH_GRADE_LIST_COUNT = 5;
|
|
16
16
|
var MaterialAssignmentAdminContent = forwardRef(function (_ref, ref) {
|
|
@@ -354,6 +354,61 @@ var MaterialAssignmentAdminContent = forwardRef(function (_ref, ref) {
|
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
}, [fetchMaterialAssignmentGet]);
|
|
357
|
+
var renderHeader = function renderHeader() {
|
|
358
|
+
var _a, _b, _c;
|
|
359
|
+
return jsxs(StyledMaterialAssignmentAdminHeader, {
|
|
360
|
+
align: "center",
|
|
361
|
+
padding: "1rem",
|
|
362
|
+
width: "100%",
|
|
363
|
+
children: [jsxs(Flex, {
|
|
364
|
+
auto: true,
|
|
365
|
+
align: "center",
|
|
366
|
+
children: [jsx(ProfileImage, {
|
|
367
|
+
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
368
|
+
width: "2.5rem",
|
|
369
|
+
height: "2.5rem"
|
|
370
|
+
}), jsx(Hspace, {
|
|
371
|
+
width: 1
|
|
372
|
+
}), jsx(Text, {
|
|
373
|
+
size: "small",
|
|
374
|
+
role: "warmwhite",
|
|
375
|
+
children: user === null || user === void 0 ? void 0 : user.fullname
|
|
376
|
+
})]
|
|
377
|
+
}), jsxs(StyledMaterialAssignmentAdminHeaderCell, {
|
|
378
|
+
children: [jsx(Text, {
|
|
379
|
+
size: "tiny",
|
|
380
|
+
role: "gray4",
|
|
381
|
+
children: intl.formatMessage({
|
|
382
|
+
id: 'materialAssignment.score'
|
|
383
|
+
})
|
|
384
|
+
}), jsx(Text, {
|
|
385
|
+
size: "small",
|
|
386
|
+
role: "white",
|
|
387
|
+
children: gradeResult ? "".concat((_c = (_b = gradeResult.manualScore) !== null && _b !== void 0 ? _b : gradeResult.avgCalcScore) !== null && _c !== void 0 ? _c : 0).concat(isScoreFinalized ? intl.formatMessage({
|
|
388
|
+
id: 'materialAssignment.reveal'
|
|
389
|
+
}) : intl.formatMessage({
|
|
390
|
+
id: 'materialAssignment.private'
|
|
391
|
+
})) : '--'
|
|
392
|
+
})]
|
|
393
|
+
}), jsxs(StyledMaterialAssignmentAdminHeaderCell, {
|
|
394
|
+
children: [jsx(Text, {
|
|
395
|
+
size: "tiny",
|
|
396
|
+
role: "gray4",
|
|
397
|
+
children: intl.formatMessage({
|
|
398
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
399
|
+
})
|
|
400
|
+
}), jsx(Text, {
|
|
401
|
+
size: "small",
|
|
402
|
+
role: "white",
|
|
403
|
+
children: userSubmission ? jsx(FormattedDate, {
|
|
404
|
+
value: userSubmission.createdDatetime,
|
|
405
|
+
dateStyle: "medium",
|
|
406
|
+
timeStyle: "short"
|
|
407
|
+
}) : '--'
|
|
408
|
+
})]
|
|
409
|
+
})]
|
|
410
|
+
});
|
|
411
|
+
};
|
|
357
412
|
var renderManualScoreEditButton = function renderManualScoreEditButton() {
|
|
358
413
|
return jsx(Tooltip, {
|
|
359
414
|
placement: "top",
|
|
@@ -1032,7 +1087,7 @@ var MaterialAssignmentAdminContent = forwardRef(function (_ref, ref) {
|
|
|
1032
1087
|
});
|
|
1033
1088
|
};
|
|
1034
1089
|
return jsxs(Fragment, {
|
|
1035
|
-
children: [jsx(Flex, {
|
|
1090
|
+
children: [renderHeader(), jsx(Flex, {
|
|
1036
1091
|
column: true,
|
|
1037
1092
|
auto: true,
|
|
1038
1093
|
padding: "3.625rem",
|
|
@@ -3,14 +3,14 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useForm, Controller } from 'react-hook-form';
|
|
5
5
|
import { config, getOrgUserGet, getOrgMaterialAssignmentGet, getOrgMaterialAssignmentSubmissionList, getOrgMaterialAssignmentGradeResultGet, getOrgMaterialAssignmentGradeList, postOrgMaterialAssignmentGradeEdit } from '@elice/api-client';
|
|
6
|
-
import { Flex, Vspace, Notification,
|
|
6
|
+
import { Flex, Vspace, Notification, ProfileImage, Hspace, Text, Tooltip, Icon, InfoTable, Button, TableNext, Modal, Label, Input, Textarea } from '@elice/blocks';
|
|
7
7
|
import { base } from '@elice/design-tokens';
|
|
8
8
|
import { eilStatusInfo } from '@elice/icons';
|
|
9
9
|
import { useRawEliceIntl, FormattedDate } from '@elice/intl';
|
|
10
10
|
import { useMaterialConfigApiClientUpdate } from '@elice/material-shared-utils';
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
12
|
import MaterialAssignmentContainer from '../shared/MaterialAssignmentContainer.js';
|
|
13
|
-
import { StyledMaterialAssignmentAdminGradeWrapper } from './MaterialAssignmentAdmin.styled.js';
|
|
13
|
+
import { StyledMaterialAssignmentAdminHeader, StyledMaterialAssignmentAdminHeaderCell, StyledMaterialAssignmentAdminGradeWrapper } from './MaterialAssignmentAdmin.styled.js';
|
|
14
14
|
|
|
15
15
|
var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa(_ref) {
|
|
16
16
|
var materialAssignmentId = _ref.materialAssignmentId,
|
|
@@ -182,6 +182,63 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
182
182
|
fetchSubmissionList();
|
|
183
183
|
fetchMaterialAssignmentGet();
|
|
184
184
|
}, [isReady, fetchUserGet, fetchMyGrade, fetchGradeResult, fetchSubmissionList, fetchMaterialAssignmentGet]);
|
|
185
|
+
var renderHeader = function renderHeader() {
|
|
186
|
+
var _a;
|
|
187
|
+
return jsxs(StyledMaterialAssignmentAdminHeader, {
|
|
188
|
+
align: "center",
|
|
189
|
+
padding: "1rem",
|
|
190
|
+
width: "100%",
|
|
191
|
+
children: [jsxs(Flex, {
|
|
192
|
+
auto: true,
|
|
193
|
+
align: "center",
|
|
194
|
+
children: [jsx(ProfileImage, {
|
|
195
|
+
src: (_a = user === null || user === void 0 ? void 0 : user.profileUrl) !== null && _a !== void 0 ? _a : '',
|
|
196
|
+
width: "2.5rem",
|
|
197
|
+
height: "2.5rem"
|
|
198
|
+
}), jsx(Hspace, {
|
|
199
|
+
width: 1
|
|
200
|
+
}), jsx(Text, {
|
|
201
|
+
size: "small",
|
|
202
|
+
role: "warmwhite",
|
|
203
|
+
children: user === null || user === void 0 ? void 0 : user.fullname
|
|
204
|
+
})]
|
|
205
|
+
}), jsxs(StyledMaterialAssignmentAdminHeaderCell, {
|
|
206
|
+
children: [jsx(Text, {
|
|
207
|
+
size: "tiny",
|
|
208
|
+
role: "gray4",
|
|
209
|
+
children: intl.formatMessage({
|
|
210
|
+
id: 'materialAssignment.score'
|
|
211
|
+
})
|
|
212
|
+
}), jsx(Text, {
|
|
213
|
+
size: "small",
|
|
214
|
+
role: "white",
|
|
215
|
+
children: (gradeResult === null || gradeResult === void 0 ? void 0 : gradeResult.score) && isScoreFinalized ? "".concat(intl.formatMessage({
|
|
216
|
+
id: 'materialAssignment.table.column.score'
|
|
217
|
+
}, {
|
|
218
|
+
score: gradeResult.score
|
|
219
|
+
})).concat(intl.formatMessage({
|
|
220
|
+
id: 'materialAssignment.reveal'
|
|
221
|
+
})) : '--'
|
|
222
|
+
})]
|
|
223
|
+
}), jsxs(StyledMaterialAssignmentAdminHeaderCell, {
|
|
224
|
+
children: [jsx(Text, {
|
|
225
|
+
size: "tiny",
|
|
226
|
+
role: "gray4",
|
|
227
|
+
children: intl.formatMessage({
|
|
228
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
229
|
+
})
|
|
230
|
+
}), jsx(Text, {
|
|
231
|
+
size: "small",
|
|
232
|
+
role: "white",
|
|
233
|
+
children: userSubmission ? jsx(FormattedDate, {
|
|
234
|
+
value: userSubmission.createdDatetime,
|
|
235
|
+
dateStyle: "medium",
|
|
236
|
+
timeStyle: "short"
|
|
237
|
+
}) : '--'
|
|
238
|
+
})]
|
|
239
|
+
})]
|
|
240
|
+
});
|
|
241
|
+
};
|
|
185
242
|
var renderGradeResult = function renderGradeResult() {
|
|
186
243
|
return jsx(StyledMaterialAssignmentAdminGradeWrapper, {
|
|
187
244
|
wrap: true,
|
|
@@ -568,7 +625,7 @@ var MaterialAssignmentAdminContentTa = function MaterialAssignmentAdminContentTa
|
|
|
568
625
|
});
|
|
569
626
|
};
|
|
570
627
|
return jsxs(Fragment, {
|
|
571
|
-
children: [jsx(Flex, {
|
|
628
|
+
children: [renderHeader(), jsx(Flex, {
|
|
572
629
|
column: true,
|
|
573
630
|
auto: true,
|
|
574
631
|
padding: "3.625rem",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-assignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.241004.0-aidt.2",
|
|
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",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@elice/icons": "^1.230814.0",
|
|
50
50
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
51
51
|
"@elice/intl": "0.240425.0-rc.2",
|
|
52
|
-
"@elice/markdown": "
|
|
53
|
-
"@elice/material-shared-types": "1.
|
|
54
|
-
"@elice/material-shared-utils": "1.
|
|
52
|
+
"@elice/markdown": "1.241007.0-aidt.0",
|
|
53
|
+
"@elice/material-shared-types": "1.241004.0-aidt.2",
|
|
54
|
+
"@elice/material-shared-utils": "1.241004.0-aidt.2",
|
|
55
55
|
"@elice/types": "1.240709.0",
|
|
56
56
|
"@types/classnames": "^2.3.1",
|
|
57
57
|
"@types/react": "~17.0.9",
|