@elice/material-assignment 1.240722.0-dev2.0 → 1.240723.0-assignmenttranslation.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.
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.d.ts +4 -2
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.js +7 -6
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +185 -58
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +110 -33
- package/cjs/components/material-assignment-admin/locales/en.json.js +7 -0
- package/cjs/components/material-assignment-admin/locales/index.d.ts +4 -0
- package/cjs/components/material-assignment-admin/locales/index.js +13 -0
- package/cjs/components/material-assignment-admin/locales/ja.json.js +7 -0
- package/cjs/components/material-assignment-admin/locales/ko.json.js +7 -0
- package/cjs/components/material-assignment-admin/locales/th.json.js +7 -0
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.d.ts +4 -2
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.js +8 -7
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +186 -59
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +111 -34
- package/es/components/material-assignment-admin/locales/en.json.js +3 -0
- package/es/components/material-assignment-admin/locales/index.d.ts +4 -0
- package/es/components/material-assignment-admin/locales/index.js +4 -0
- package/es/components/material-assignment-admin/locales/ja.json.js +3 -0
- package/es/components/material-assignment-admin/locales/ko.json.js +3 -0
- package/es/components/material-assignment-admin/locales/th.json.js +3 -0
- package/package.json +3 -3
|
@@ -10,5 +10,7 @@ export interface MaterialAssignmentAdminProps {
|
|
|
10
10
|
courseRole: enums.CourseRole;
|
|
11
11
|
updateMaterialUserBrowserResponse?: (userId: number) => void;
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
14
|
-
|
|
13
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<import("@elice/intl").IntlComponentExtraProps & Omit<MaterialAssignmentAdminProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & {
|
|
14
|
+
__intl: import("@elice/intl").EliceIntlShape;
|
|
15
|
+
} & React.RefAttributes<MaterialAssignmentAdminApis>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<MaterialAssignmentAdminApis>>;
|
|
16
|
+
export default _default;
|
|
@@ -10,6 +10,8 @@ var intl = require('@elice/intl');
|
|
|
10
10
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
11
11
|
var types = require('@elice/types');
|
|
12
12
|
var classnames = require('classnames');
|
|
13
|
+
var en = require('./locales/en.json.js');
|
|
14
|
+
var ko = require('./locales/ko.json.js');
|
|
13
15
|
var MaterialAssignmentAdminContent = require('./MaterialAssignmentAdminContent.js');
|
|
14
16
|
var MaterialAssignmentAdminContentTa = require('./MaterialAssignmentAdminContentTa.js');
|
|
15
17
|
var MaterialAssignmentAdmin_styled = require('./MaterialAssignmentAdmin.styled.js');
|
|
@@ -19,8 +21,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
21
|
var classnames__default = /*#__PURE__*/_interopDefaultCompat(classnames);
|
|
20
22
|
|
|
21
23
|
var MaterialAssignmentAdmin = React.forwardRef(function (_ref, ref) {
|
|
22
|
-
var
|
|
23
|
-
locale = _ref$locale === void 0 ? 'en' : _ref$locale,
|
|
24
|
+
var __intl = _ref.__intl,
|
|
24
25
|
className = _ref.className,
|
|
25
26
|
materialAssignmentId = _ref.materialAssignmentId,
|
|
26
27
|
userId = _ref.userId,
|
|
@@ -55,12 +56,12 @@ var MaterialAssignmentAdmin = React.forwardRef(function (_ref, ref) {
|
|
|
55
56
|
};
|
|
56
57
|
return jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminContainer, {
|
|
57
58
|
className: classnames__default.default(prefixCls, className),
|
|
58
|
-
children: jsxRuntime.jsx(intl.
|
|
59
|
-
|
|
60
|
-
defaultLocale: "en",
|
|
59
|
+
children: jsxRuntime.jsx(intl.RawEliceIntlProvider, {
|
|
60
|
+
value: __intl,
|
|
61
61
|
children: renderContent()
|
|
62
62
|
})
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
+
var MaterialAssignmentAdmin$1 = new intl.IntlComponentBuilder(MaterialAssignmentAdmin).add('en', en.default).add('ko', ko.default).addAsync('th', Promise.resolve().then(function () { return require('./locales/th.json.js'); })).addAsync('ja', Promise.resolve().then(function () { return require('./locales/ja.json.js'); })).build();
|
|
65
66
|
|
|
66
|
-
exports.default = MaterialAssignmentAdmin;
|
|
67
|
+
exports.default = MaterialAssignmentAdmin$1;
|
|
@@ -28,6 +28,7 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
28
28
|
adminUserId = _ref.adminUserId,
|
|
29
29
|
updateMaterialUserBrowserResponse = _ref.updateMaterialUserBrowserResponse;
|
|
30
30
|
var _a;
|
|
31
|
+
var intl$1 = intl.useRawEliceIntl();
|
|
31
32
|
// Form
|
|
32
33
|
var gradeEditFormMethods = reactHookForm.useForm({
|
|
33
34
|
defaultValues: {
|
|
@@ -218,14 +219,18 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
218
219
|
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
219
220
|
updateMaterialUserBrowserResponse(userId);
|
|
220
221
|
}
|
|
221
|
-
blocks.Notification.success(
|
|
222
|
+
blocks.Notification.success(intl$1.formatMessage({
|
|
223
|
+
id: 'materialAssignment.notify.success'
|
|
224
|
+
}));
|
|
222
225
|
_context.next = 15;
|
|
223
226
|
break;
|
|
224
227
|
case 11:
|
|
225
228
|
_context.prev = 11;
|
|
226
229
|
_context.t0 = _context["catch"](1);
|
|
227
230
|
console.error(_context.t0);
|
|
228
|
-
blocks.Notification.error(
|
|
231
|
+
blocks.Notification.error(intl$1.formatMessage({
|
|
232
|
+
id: 'materialAssignment.notify.error'
|
|
233
|
+
}));
|
|
229
234
|
case 15:
|
|
230
235
|
_context.prev = 15;
|
|
231
236
|
setShowGradeEditModal(false);
|
|
@@ -268,7 +273,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
268
273
|
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
269
274
|
updateMaterialUserBrowserResponse(userId);
|
|
270
275
|
}
|
|
271
|
-
blocks.Notification.success(
|
|
276
|
+
blocks.Notification.success(intl$1.formatMessage({
|
|
277
|
+
id: 'materialAssignment.notify.success'
|
|
278
|
+
}));
|
|
272
279
|
_context2.next = 19;
|
|
273
280
|
break;
|
|
274
281
|
case 14:
|
|
@@ -276,7 +283,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
276
283
|
_context2.t0 = _context2["catch"](2);
|
|
277
284
|
console.error(_context2.t0);
|
|
278
285
|
setGradeDeleteStatus('rejected');
|
|
279
|
-
blocks.Notification.error(
|
|
286
|
+
blocks.Notification.error(intl$1.formatMessage({
|
|
287
|
+
id: 'materialAssignment.notify.error'
|
|
288
|
+
}));
|
|
280
289
|
case 19:
|
|
281
290
|
_context2.prev = 19;
|
|
282
291
|
setSelectedGradeForDelete(null);
|
|
@@ -310,14 +319,18 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
310
319
|
if (typeof updateMaterialUserBrowserResponse === 'function') {
|
|
311
320
|
updateMaterialUserBrowserResponse(userId);
|
|
312
321
|
}
|
|
313
|
-
blocks.Notification.success(
|
|
322
|
+
blocks.Notification.success(intl$1.formatMessage({
|
|
323
|
+
id: 'materialAssignment.notify.success'
|
|
324
|
+
}));
|
|
314
325
|
_context3.next = 13;
|
|
315
326
|
break;
|
|
316
327
|
case 9:
|
|
317
328
|
_context3.prev = 9;
|
|
318
329
|
_context3.t0 = _context3["catch"](1);
|
|
319
330
|
console.error(_context3.t0);
|
|
320
|
-
blocks.Notification.error(
|
|
331
|
+
blocks.Notification.error(intl$1.formatMessage({
|
|
332
|
+
id: 'materialAssignment.notify.error'
|
|
333
|
+
}));
|
|
321
334
|
case 13:
|
|
322
335
|
_context3.prev = 13;
|
|
323
336
|
setShowManualScoreEditModal(false);
|
|
@@ -374,17 +387,25 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
374
387
|
children: [jsxRuntime.jsx(blocks.Text, {
|
|
375
388
|
size: "tiny",
|
|
376
389
|
role: "gray4",
|
|
377
|
-
children:
|
|
390
|
+
children: intl$1.formatMessage({
|
|
391
|
+
id: 'materialAssignment.score'
|
|
392
|
+
})
|
|
378
393
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
379
394
|
size: "small",
|
|
380
395
|
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 ?
|
|
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
|
+
})) : '--'
|
|
382
401
|
})]
|
|
383
402
|
}), jsxRuntime.jsxs(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminHeaderCell, {
|
|
384
403
|
children: [jsxRuntime.jsx(blocks.Text, {
|
|
385
404
|
size: "tiny",
|
|
386
405
|
role: "gray4",
|
|
387
|
-
children:
|
|
406
|
+
children: intl$1.formatMessage({
|
|
407
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
408
|
+
})
|
|
388
409
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
389
410
|
size: "small",
|
|
390
411
|
role: "white",
|
|
@@ -400,7 +421,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
400
421
|
var renderManualScoreEditButton = function renderManualScoreEditButton() {
|
|
401
422
|
return jsxRuntime.jsx(blocks.Tooltip, {
|
|
402
423
|
placement: "top",
|
|
403
|
-
title:
|
|
424
|
+
title: intl$1.formatMessage({
|
|
425
|
+
id: isUserSubmitted ? 'materialAssignment.tooltip.manual-score-edit.submit' : 'materialAssignment.tooltip.manual-score-edit.not-submit'
|
|
426
|
+
}),
|
|
404
427
|
visible: !isAssignmentClosed || !isUserSubmitted ? undefined : false,
|
|
405
428
|
children: jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminManualScoreEditButtonWrapper, {
|
|
406
429
|
disabled: !isAssignmentClosed || !isUserSubmitted,
|
|
@@ -410,7 +433,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
410
433
|
role: "navy3",
|
|
411
434
|
size: "tiny",
|
|
412
435
|
onClick: handleManualScoreEditClick,
|
|
413
|
-
children:
|
|
436
|
+
children: intl$1.formatMessage({
|
|
437
|
+
id: 'materialAssignment.button.manual-score-edit'
|
|
438
|
+
})
|
|
414
439
|
})
|
|
415
440
|
})
|
|
416
441
|
});
|
|
@@ -428,13 +453,17 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
428
453
|
role: "navy1",
|
|
429
454
|
size: "small",
|
|
430
455
|
lineHeight: "1.375rem",
|
|
431
|
-
children: user ? "".concat(user.fullname, "
|
|
456
|
+
children: user ? "".concat(user.fullname, " ").concat(intl$1.formatMessage({
|
|
457
|
+
id: 'materialAssignment.username.subfix'
|
|
458
|
+
})) : null
|
|
432
459
|
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
433
460
|
width: 0.25
|
|
434
461
|
}), jsxRuntime.jsx(blocks.Tooltip, {
|
|
435
462
|
useMaxWidth: true,
|
|
436
463
|
placement: "top",
|
|
437
|
-
title:
|
|
464
|
+
title: intl$1.formatMessage({
|
|
465
|
+
id: 'materialAssignment.tooltip.grade-result-button'
|
|
466
|
+
}),
|
|
438
467
|
children: jsxRuntime.jsx(blocks.Icon, {
|
|
439
468
|
icon: icons.eilStatusInfo,
|
|
440
469
|
color: designTokens.base.color.navy1
|
|
@@ -444,7 +473,11 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
444
473
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
445
474
|
bold: true,
|
|
446
475
|
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 ?
|
|
476
|
+
children: gradeResult ? "".concat((_b = (_a = gradeResult.manualScore) !== null && _a !== void 0 ? _a : gradeResult.avgCalcScore) !== null && _b !== void 0 ? _b : 0).concat(isScoreFinalized ? intl$1.formatMessage({
|
|
477
|
+
id: 'materialAssignment.reveal'
|
|
478
|
+
}) : intl$1.formatMessage({
|
|
479
|
+
id: 'materialAssignment.private'
|
|
480
|
+
})) : '--'
|
|
448
481
|
})]
|
|
449
482
|
}), renderManualScoreEditButton()]
|
|
450
483
|
});
|
|
@@ -460,28 +493,36 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
460
493
|
bold: true,
|
|
461
494
|
role: "danger",
|
|
462
495
|
size: "small",
|
|
463
|
-
children:
|
|
496
|
+
children: intl$1.formatMessage({
|
|
497
|
+
id: 'materialAssignment.status.deadlineExpired'
|
|
498
|
+
})
|
|
464
499
|
});
|
|
465
500
|
case isScoreFinalized:
|
|
466
501
|
return jsxRuntime.jsx(blocks.Text, {
|
|
467
502
|
bold: true,
|
|
468
503
|
role: "lightpurple",
|
|
469
504
|
size: "small",
|
|
470
|
-
children:
|
|
505
|
+
children: intl$1.formatMessage({
|
|
506
|
+
id: 'materialAssignment.status.graded'
|
|
507
|
+
})
|
|
471
508
|
});
|
|
472
509
|
case isUserSubmitted:
|
|
473
510
|
return jsxRuntime.jsx(blocks.Text, {
|
|
474
511
|
bold: true,
|
|
475
512
|
role: "success",
|
|
476
513
|
size: "small",
|
|
477
|
-
children:
|
|
514
|
+
children: intl$1.formatMessage({
|
|
515
|
+
id: 'materialAssignment.status.submitted'
|
|
516
|
+
})
|
|
478
517
|
});
|
|
479
518
|
case !isUserSubmitted:
|
|
480
519
|
return jsxRuntime.jsx(blocks.Text, {
|
|
481
520
|
bold: true,
|
|
482
521
|
role: "warning",
|
|
483
522
|
size: "small",
|
|
484
|
-
children:
|
|
523
|
+
children: intl$1.formatMessage({
|
|
524
|
+
id: 'materialAssignment.status.noSubmitted'
|
|
525
|
+
})
|
|
485
526
|
});
|
|
486
527
|
}
|
|
487
528
|
}();
|
|
@@ -525,13 +566,17 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
525
566
|
children: jsxRuntime.jsxs("tbody", {
|
|
526
567
|
children: [jsxRuntime.jsxs("tr", {
|
|
527
568
|
children: [jsxRuntime.jsx("td", {
|
|
528
|
-
children:
|
|
569
|
+
children: intl$1.formatMessage({
|
|
570
|
+
id: 'materialAssignment.table.column.status'
|
|
571
|
+
})
|
|
529
572
|
}), jsxRuntime.jsx("td", {
|
|
530
573
|
children: statusText
|
|
531
574
|
})]
|
|
532
575
|
}), jsxRuntime.jsxs("tr", {
|
|
533
576
|
children: [jsxRuntime.jsx("td", {
|
|
534
|
-
children:
|
|
577
|
+
children: intl$1.formatMessage({
|
|
578
|
+
id: 'materialAssignment.table.column.deadlineDatetime'
|
|
579
|
+
})
|
|
535
580
|
}), jsxRuntime.jsx("td", {
|
|
536
581
|
children: jsxRuntime.jsx(intl.FormattedDate, {
|
|
537
582
|
value: materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.closeDatetime,
|
|
@@ -541,7 +586,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
541
586
|
})]
|
|
542
587
|
}), jsxRuntime.jsxs("tr", {
|
|
543
588
|
children: [jsxRuntime.jsx("td", {
|
|
544
|
-
children:
|
|
589
|
+
children: intl$1.formatMessage({
|
|
590
|
+
id: 'materialAssignment.table.column.lastSubmitDatetime'
|
|
591
|
+
})
|
|
545
592
|
}), jsxRuntime.jsx("td", {
|
|
546
593
|
children: userSubmission ? jsxRuntime.jsx(intl.FormattedDate, {
|
|
547
594
|
value: userSubmission.createdDatetime,
|
|
@@ -551,7 +598,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
551
598
|
})]
|
|
552
599
|
}), jsxRuntime.jsxs("tr", {
|
|
553
600
|
children: [jsxRuntime.jsx("td", {
|
|
554
|
-
children:
|
|
601
|
+
children: intl$1.formatMessage({
|
|
602
|
+
id: 'materialAssignment.table.column.uploadedAssignments'
|
|
603
|
+
})
|
|
555
604
|
}), jsxRuntime.jsx("td", {
|
|
556
605
|
children: submissionAttachment
|
|
557
606
|
})]
|
|
@@ -574,17 +623,23 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
574
623
|
bold: true,
|
|
575
624
|
role: "white",
|
|
576
625
|
lineHeight: 1.375,
|
|
577
|
-
children:
|
|
626
|
+
children: intl$1.formatMessage({
|
|
627
|
+
id: 'materialAssignment.grade-list'
|
|
628
|
+
})
|
|
578
629
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
579
630
|
block: true,
|
|
580
631
|
size: "tiny",
|
|
581
632
|
role: "navy3",
|
|
582
633
|
lineHeight: 1.6,
|
|
583
|
-
children:
|
|
634
|
+
children: intl$1.formatMessage({
|
|
635
|
+
id: 'materialAssignment.grade-list.description'
|
|
636
|
+
})
|
|
584
637
|
})]
|
|
585
638
|
}), jsxRuntime.jsx(blocks.Tooltip, {
|
|
586
639
|
placement: "top",
|
|
587
|
-
title:
|
|
640
|
+
title: intl$1.formatMessage({
|
|
641
|
+
id: isUserSubmitted ? 'materialAssignment.grade-list.tooltip.submitted' : 'materialAssignment.grade-list.tooltip.not-submitted'
|
|
642
|
+
}),
|
|
588
643
|
visible: !isAssignmentClosed || !isUserSubmitted ? undefined : false,
|
|
589
644
|
children: jsxRuntime.jsx("span", {
|
|
590
645
|
children: jsxRuntime.jsx(blocks.Button, {
|
|
@@ -592,7 +647,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
592
647
|
role: "lightpurple",
|
|
593
648
|
disabled: !isAssignmentClosed || !isUserSubmitted,
|
|
594
649
|
onClick: handleGradeEditClick,
|
|
595
|
-
children:
|
|
650
|
+
children: intl$1.formatMessage({
|
|
651
|
+
id: Boolean(myGrade) ? 'materialAssignment.edit-grading' : 'materialAssignment.start-grading'
|
|
652
|
+
})
|
|
596
653
|
})
|
|
597
654
|
})
|
|
598
655
|
})]
|
|
@@ -600,15 +657,23 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
600
657
|
height: 0.75
|
|
601
658
|
}), jsxRuntime.jsx(blocks.TableNext, {
|
|
602
659
|
dark: true,
|
|
603
|
-
emptyMessage:
|
|
660
|
+
emptyMessage: intl$1.formatMessage({
|
|
661
|
+
id: 'materialAssignment.table.empty-smg'
|
|
662
|
+
}),
|
|
604
663
|
columns: [{
|
|
605
|
-
Header:
|
|
664
|
+
Header: intl$1.formatMessage({
|
|
665
|
+
id: 'materialAssignment.table-col.fullname'
|
|
666
|
+
}),
|
|
606
667
|
accessor: 'fullname'
|
|
607
668
|
}, {
|
|
608
|
-
Header:
|
|
669
|
+
Header: intl$1.formatMessage({
|
|
670
|
+
id: 'materialAssignment.table.column.assignmentScore'
|
|
671
|
+
}),
|
|
609
672
|
accessor: 'grade'
|
|
610
673
|
}, {
|
|
611
|
-
Header:
|
|
674
|
+
Header: intl$1.formatMessage({
|
|
675
|
+
id: 'materialAssignment.table-col.grade-datetime'
|
|
676
|
+
}),
|
|
612
677
|
accessor: 'created',
|
|
613
678
|
textAlign: 'left'
|
|
614
679
|
}],
|
|
@@ -619,7 +684,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
619
684
|
noWrap: true,
|
|
620
685
|
role: "navy0",
|
|
621
686
|
size: "small",
|
|
622
|
-
children: "".concat(grade.gradeUser.fullname).concat(grade.gradeUser.id === adminUserId ?
|
|
687
|
+
children: "".concat(grade.gradeUser.fullname).concat(grade.gradeUser.id === adminUserId ? intl$1.formatMessage({
|
|
688
|
+
id: 'materialAssignment.me'
|
|
689
|
+
}) : '')
|
|
623
690
|
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
624
691
|
width: 0.25
|
|
625
692
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
@@ -683,16 +750,22 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
683
750
|
return null;
|
|
684
751
|
}
|
|
685
752
|
return jsxRuntime.jsxs(blocks.Modal, {
|
|
686
|
-
title:
|
|
753
|
+
title: intl$1.formatMessage({
|
|
754
|
+
id: Boolean(myGrade) ? 'materialAssignment.edit-grading' : 'materialAssignment.grading-assignments'
|
|
755
|
+
}),
|
|
687
756
|
footerButtons: [{
|
|
688
|
-
label:
|
|
757
|
+
label: intl$1.formatMessage({
|
|
758
|
+
id: 'materialAssignment.modal.button.confirm'
|
|
759
|
+
}),
|
|
689
760
|
size: 'small',
|
|
690
761
|
role: 'primary',
|
|
691
762
|
loading: gradeEditFormMethods.formState.isSubmitting,
|
|
692
763
|
disabled: gradeEditFormMethods.formState.isSubmitting || !gradeEditFormMethods.formState.isValid,
|
|
693
764
|
onClick: handleGradeEditSubmit
|
|
694
765
|
}, {
|
|
695
|
-
label:
|
|
766
|
+
label: intl$1.formatMessage({
|
|
767
|
+
id: 'materialAssignment.modal.button.cancel'
|
|
768
|
+
}),
|
|
696
769
|
size: 'small',
|
|
697
770
|
role: 'gray1',
|
|
698
771
|
onClick: function onClick() {
|
|
@@ -706,7 +779,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
706
779
|
bold: true,
|
|
707
780
|
block: true,
|
|
708
781
|
required: true,
|
|
709
|
-
children:
|
|
782
|
+
children: intl$1.formatMessage({
|
|
783
|
+
id: 'materialAssignment.score'
|
|
784
|
+
})
|
|
710
785
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
711
786
|
height: 0.5
|
|
712
787
|
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
@@ -735,18 +810,26 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
735
810
|
bold: true,
|
|
736
811
|
role: "gray9",
|
|
737
812
|
size: "small",
|
|
738
|
-
children:
|
|
813
|
+
children: intl$1.formatMessage({
|
|
814
|
+
id: 'materialAssignment.dot'
|
|
815
|
+
})
|
|
739
816
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
740
817
|
role: "gray6",
|
|
741
818
|
size: "small",
|
|
742
|
-
children:
|
|
819
|
+
children: intl$1.formatMessage({
|
|
820
|
+
id: 'materialAssignment.table.column.totalPoint'
|
|
821
|
+
}, {
|
|
822
|
+
point: 100
|
|
823
|
+
})
|
|
743
824
|
})]
|
|
744
825
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
745
826
|
height: 1.25
|
|
746
827
|
}), jsxRuntime.jsx(blocks.Label, {
|
|
747
828
|
bold: true,
|
|
748
829
|
block: true,
|
|
749
|
-
children:
|
|
830
|
+
children: intl$1.formatMessage({
|
|
831
|
+
id: 'materialAssignment.table.header.feedback'
|
|
832
|
+
})
|
|
750
833
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
751
834
|
height: 0.5
|
|
752
835
|
}), jsxRuntime.jsx(reactHookForm.Controller, {
|
|
@@ -772,9 +855,13 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
772
855
|
return null;
|
|
773
856
|
}
|
|
774
857
|
return jsxRuntime.jsxs(blocks.Modal, {
|
|
775
|
-
title:
|
|
858
|
+
title: intl$1.formatMessage({
|
|
859
|
+
id: 'materialAssignment.modal.grade-result.title'
|
|
860
|
+
}),
|
|
776
861
|
footerButtons: [{
|
|
777
|
-
label:
|
|
862
|
+
label: intl$1.formatMessage({
|
|
863
|
+
id: 'materialAssignment.modal.button.confirm'
|
|
864
|
+
}),
|
|
778
865
|
size: 'small',
|
|
779
866
|
role: 'primary',
|
|
780
867
|
onClick: function onClick() {
|
|
@@ -788,7 +875,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
788
875
|
bold: true,
|
|
789
876
|
block: true,
|
|
790
877
|
required: true,
|
|
791
|
-
children:
|
|
878
|
+
children: intl$1.formatMessage({
|
|
879
|
+
id: 'materialAssignment.score'
|
|
880
|
+
})
|
|
792
881
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
793
882
|
height: 0.5
|
|
794
883
|
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
@@ -805,18 +894,26 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
805
894
|
bold: true,
|
|
806
895
|
role: "gray9",
|
|
807
896
|
size: "small",
|
|
808
|
-
children:
|
|
897
|
+
children: intl$1.formatMessage({
|
|
898
|
+
id: 'materialAssignment.dot'
|
|
899
|
+
})
|
|
809
900
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
810
901
|
role: "gray6",
|
|
811
902
|
size: "small",
|
|
812
|
-
children:
|
|
903
|
+
children: intl$1.formatMessage({
|
|
904
|
+
id: 'materialAssignment.table.column.totalPoint'
|
|
905
|
+
}, {
|
|
906
|
+
point: 100
|
|
907
|
+
})
|
|
813
908
|
})]
|
|
814
909
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
815
910
|
height: 1.25
|
|
816
911
|
}), jsxRuntime.jsx(blocks.Label, {
|
|
817
912
|
bold: true,
|
|
818
913
|
block: true,
|
|
819
|
-
children:
|
|
914
|
+
children: intl$1.formatMessage({
|
|
915
|
+
id: 'materialAssignment.table.header.feedback'
|
|
916
|
+
})
|
|
820
917
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
821
918
|
height: 0.5
|
|
822
919
|
}), jsxRuntime.jsx(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminTextareaWrapper, {
|
|
@@ -834,17 +931,23 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
834
931
|
return null;
|
|
835
932
|
}
|
|
836
933
|
return jsxRuntime.jsxs(blocks.Modal, {
|
|
837
|
-
title:
|
|
934
|
+
title: intl$1.formatMessage({
|
|
935
|
+
id: 'materialAssignment.modal.delete-grading'
|
|
936
|
+
}),
|
|
838
937
|
width: "narrow",
|
|
839
938
|
footerButtons: [{
|
|
840
|
-
label:
|
|
939
|
+
label: intl$1.formatMessage({
|
|
940
|
+
id: 'materialAssignment.modal.button.confirm'
|
|
941
|
+
}),
|
|
841
942
|
size: 'small',
|
|
842
943
|
role: 'primary',
|
|
843
944
|
loading: gradeDeleteStatus === 'pending',
|
|
844
945
|
disabled: gradeDeleteStatus === 'pending',
|
|
845
946
|
onClick: handleGradeDeleteSubmit
|
|
846
947
|
}, {
|
|
847
|
-
label:
|
|
948
|
+
label: intl$1.formatMessage({
|
|
949
|
+
id: 'materialAssignment.modal.button.cancel'
|
|
950
|
+
}),
|
|
848
951
|
size: 'small',
|
|
849
952
|
role: 'gray1',
|
|
850
953
|
onClick: function onClick() {
|
|
@@ -856,15 +959,21 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
856
959
|
},
|
|
857
960
|
children: [jsxRuntime.jsx(blocks.Text, {
|
|
858
961
|
role: "gray9",
|
|
859
|
-
children:
|
|
962
|
+
children: intl$1.formatMessage({
|
|
963
|
+
id: 'materialAssignment.modal.delete-grading.description'
|
|
964
|
+
})
|
|
860
965
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
861
966
|
height: 0.75
|
|
862
967
|
}), jsxRuntime.jsx(blocks.TableNext, {
|
|
863
968
|
columns: [{
|
|
864
|
-
Header:
|
|
969
|
+
Header: intl$1.formatMessage({
|
|
970
|
+
id: 'materialAssignment.table-col.fullname'
|
|
971
|
+
}),
|
|
865
972
|
accessor: 'fullname'
|
|
866
973
|
}, {
|
|
867
|
-
Header:
|
|
974
|
+
Header: intl$1.formatMessage({
|
|
975
|
+
id: 'materialAssignment.final-score'
|
|
976
|
+
}),
|
|
868
977
|
accessor: 'score'
|
|
869
978
|
}],
|
|
870
979
|
data: [{
|
|
@@ -894,17 +1003,23 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
894
1003
|
return null;
|
|
895
1004
|
}
|
|
896
1005
|
return jsxRuntime.jsxs(blocks.Modal, {
|
|
897
|
-
title:
|
|
1006
|
+
title: intl$1.formatMessage({
|
|
1007
|
+
id: 'materialAssignment.modal.edit-grading'
|
|
1008
|
+
}),
|
|
898
1009
|
width: "narrow",
|
|
899
1010
|
footerButtons: [{
|
|
900
|
-
label:
|
|
1011
|
+
label: intl$1.formatMessage({
|
|
1012
|
+
id: 'materialAssignment.modal.button.confirm'
|
|
1013
|
+
}),
|
|
901
1014
|
size: 'small',
|
|
902
1015
|
role: 'primary',
|
|
903
1016
|
loading: manualScoreEditFormMethods.formState.isSubmitting,
|
|
904
1017
|
disabled: manualScoreEditFormMethods.formState.isSubmitting || !manualScoreEditFormMethods.formState.isValid,
|
|
905
1018
|
onClick: handleManualScoreEditSubmit
|
|
906
1019
|
}, {
|
|
907
|
-
label:
|
|
1020
|
+
label: intl$1.formatMessage({
|
|
1021
|
+
id: 'materialAssignment.modal.button.cancel'
|
|
1022
|
+
}),
|
|
908
1023
|
size: 'small',
|
|
909
1024
|
role: 'gray1',
|
|
910
1025
|
onClick: function onClick() {
|
|
@@ -916,7 +1031,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
916
1031
|
},
|
|
917
1032
|
children: [jsxRuntime.jsx(blocks.Alert, {
|
|
918
1033
|
role: "warning",
|
|
919
|
-
children:
|
|
1034
|
+
children: intl$1.formatMessage({
|
|
1035
|
+
id: 'materialAssignment.modal.edit-grading.alert'
|
|
1036
|
+
})
|
|
920
1037
|
}), jsxRuntime.jsx(blocks.Vspace, {
|
|
921
1038
|
height: 1
|
|
922
1039
|
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
@@ -926,7 +1043,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
926
1043
|
size: "small",
|
|
927
1044
|
width: "xsmall",
|
|
928
1045
|
type: "number",
|
|
929
|
-
label:
|
|
1046
|
+
label: intl$1.formatMessage({
|
|
1047
|
+
id: 'materialAssignment.previous-score'
|
|
1048
|
+
}),
|
|
930
1049
|
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
1050
|
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
932
1051
|
width: 1
|
|
@@ -950,7 +1069,9 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
950
1069
|
size: "small",
|
|
951
1070
|
width: "xsmall",
|
|
952
1071
|
type: "number",
|
|
953
|
-
label:
|
|
1072
|
+
label: intl$1.formatMessage({
|
|
1073
|
+
id: 'materialAssignment.adjusted-score'
|
|
1074
|
+
})
|
|
954
1075
|
}));
|
|
955
1076
|
}
|
|
956
1077
|
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
@@ -959,11 +1080,17 @@ var MaterialAssignmentAdminContent = React.forwardRef(function (_ref, ref) {
|
|
|
959
1080
|
bold: true,
|
|
960
1081
|
role: "gray9",
|
|
961
1082
|
size: "small",
|
|
962
|
-
children:
|
|
1083
|
+
children: intl$1.formatMessage({
|
|
1084
|
+
id: 'materialAssignment.dot'
|
|
1085
|
+
})
|
|
963
1086
|
}), jsxRuntime.jsx(blocks.Text, {
|
|
964
1087
|
role: "gray6",
|
|
965
1088
|
size: "small",
|
|
966
|
-
children:
|
|
1089
|
+
children: intl$1.formatMessage({
|
|
1090
|
+
id: 'materialAssignment.table.column.totalPoint'
|
|
1091
|
+
}, {
|
|
1092
|
+
point: 100
|
|
1093
|
+
})
|
|
967
1094
|
})]
|
|
968
1095
|
})]
|
|
969
1096
|
});
|