icleafreportui 0.2.9 → 0.2.10
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.
|
@@ -38,25 +38,45 @@
|
|
|
38
38
|
|
|
39
39
|
// export default ReportViewer;
|
|
40
40
|
|
|
41
|
-
// ReportViewer.js
|
|
41
|
+
// ReportViewer.js
|
|
42
42
|
import React from 'react';
|
|
43
|
+
import Header from '../../components/Header';
|
|
44
|
+
import Sidebar from '../../components/sidebar';
|
|
43
45
|
import ExamReportContent from './ExamReportContent';
|
|
46
|
+
import ExamQuestionsReportContent from './ExamQuestionsReportContent';
|
|
44
47
|
import CourseReportContent from './CourseReportContent';
|
|
45
48
|
import ExamPackReportContent from './ExamPackReportContent';
|
|
46
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
49
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
47
50
|
function ReportViewer(_ref) {
|
|
48
51
|
let {
|
|
49
|
-
type = 'exam'
|
|
52
|
+
type = 'exam',
|
|
53
|
+
embedded = true
|
|
50
54
|
} = _ref;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const renderContent = () => {
|
|
56
|
+
switch (type) {
|
|
57
|
+
case 'exam':
|
|
58
|
+
return /*#__PURE__*/_jsx(ExamReportContent, {});
|
|
59
|
+
case 'examQuestions':
|
|
60
|
+
return /*#__PURE__*/_jsx(ExamQuestionsReportContent, {});
|
|
61
|
+
case 'course':
|
|
62
|
+
return /*#__PURE__*/_jsx(CourseReportContent, {});
|
|
63
|
+
case 'exampack':
|
|
64
|
+
return /*#__PURE__*/_jsx(ExamPackReportContent, {});
|
|
65
|
+
default:
|
|
66
|
+
return /*#__PURE__*/_jsx(ExamReportContent, {});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
if (embedded) {
|
|
70
|
+
return renderContent();
|
|
60
71
|
}
|
|
72
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
73
|
+
children: [/*#__PURE__*/_jsx(Header, {}), /*#__PURE__*/_jsx(Sidebar, {}), /*#__PURE__*/_jsx("div", {
|
|
74
|
+
style: {
|
|
75
|
+
padding: "100px 0px 0px 100px",
|
|
76
|
+
marginLeft: "140px"
|
|
77
|
+
},
|
|
78
|
+
children: renderContent()
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
61
81
|
}
|
|
62
82
|
export default ReportViewer;
|