icleafreportui 0.2.8 → 0.2.9
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.
|
@@ -1,42 +1,62 @@
|
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import Header from '../../components/Header';
|
|
3
|
+
// import Sidebar from '../../components/sidebar';
|
|
4
|
+
// import ExamReportContent from './ExamReportContent';
|
|
5
|
+
// import CourseReportContent from './CourseReportContent';
|
|
6
|
+
// import ExamPackReportContent from './ExamPackReportContent';
|
|
7
|
+
|
|
8
|
+
// function ReportViewer({ type = 'exam', embedded = false }) {
|
|
9
|
+
// const renderContent = () => {
|
|
10
|
+
// switch (type) {
|
|
11
|
+
// case 'exam':
|
|
12
|
+
// return <ExamReportContent />;
|
|
13
|
+
// case 'course':
|
|
14
|
+
// return <CourseReportContent />;
|
|
15
|
+
// case 'exampack':
|
|
16
|
+
// return <ExamPackReportContent />;
|
|
17
|
+
// default:
|
|
18
|
+
// return <ExamReportContent />;
|
|
19
|
+
// }
|
|
20
|
+
// };
|
|
21
|
+
|
|
22
|
+
// // If embedded mode, just return the content (no Header/Sidebar)
|
|
23
|
+
// if (embedded) {
|
|
24
|
+
// return renderContent();
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
// // Full layout with Header and Sidebar
|
|
28
|
+
// return (
|
|
29
|
+
// <div>
|
|
30
|
+
// <Header />
|
|
31
|
+
// <Sidebar />
|
|
32
|
+
// <div style={{ padding: "100px 0px 0px 100px", marginLeft: "140px" }}>
|
|
33
|
+
// {renderContent()}
|
|
34
|
+
// </div>
|
|
35
|
+
// </div>
|
|
36
|
+
// );
|
|
37
|
+
// }
|
|
38
|
+
|
|
39
|
+
// export default ReportViewer;
|
|
40
|
+
|
|
41
|
+
// ReportViewer.js - Simplified
|
|
1
42
|
import React from 'react';
|
|
2
|
-
import Header from '../../components/Header';
|
|
3
|
-
import Sidebar from '../../components/sidebar';
|
|
4
43
|
import ExamReportContent from './ExamReportContent';
|
|
5
44
|
import CourseReportContent from './CourseReportContent';
|
|
6
45
|
import ExamPackReportContent from './ExamPackReportContent';
|
|
7
|
-
import { jsx as _jsx
|
|
46
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
47
|
function ReportViewer(_ref) {
|
|
9
48
|
let {
|
|
10
|
-
type = 'exam'
|
|
11
|
-
embedded = false
|
|
49
|
+
type = 'exam'
|
|
12
50
|
} = _ref;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return /*#__PURE__*/_jsx(ExamReportContent, {});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// If embedded mode, just return the content (no Header/Sidebar)
|
|
27
|
-
if (embedded) {
|
|
28
|
-
return renderContent();
|
|
51
|
+
switch (type) {
|
|
52
|
+
case 'exam':
|
|
53
|
+
return /*#__PURE__*/_jsx(ExamReportContent, {});
|
|
54
|
+
case 'course':
|
|
55
|
+
return /*#__PURE__*/_jsx(CourseReportContent, {});
|
|
56
|
+
case 'exampack':
|
|
57
|
+
return /*#__PURE__*/_jsx(ExamPackReportContent, {});
|
|
58
|
+
default:
|
|
59
|
+
return /*#__PURE__*/_jsx(ExamReportContent, {});
|
|
29
60
|
}
|
|
30
|
-
|
|
31
|
-
// Full layout with Header and Sidebar
|
|
32
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
33
|
-
children: [/*#__PURE__*/_jsx(Header, {}), /*#__PURE__*/_jsx(Sidebar, {}), /*#__PURE__*/_jsx("div", {
|
|
34
|
-
style: {
|
|
35
|
-
padding: "100px 0px 0px 100px",
|
|
36
|
-
marginLeft: "140px"
|
|
37
|
-
},
|
|
38
|
-
children: renderContent()
|
|
39
|
-
})]
|
|
40
|
-
});
|
|
41
61
|
}
|
|
42
62
|
export default ReportViewer;
|