icleafreportui 0.1.6 → 0.1.7

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,34 +1,25 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _axios = _interopRequireDefault(require("axios"));
9
- var _material = require("@mui/material");
10
- var _reactRouterDom = require("react-router-dom");
11
- var _Header = _interopRequireDefault(require("../components/Header"));
12
- var _sidebar = _interopRequireDefault(require("../components/sidebar"));
13
- require("../App.css");
14
- var _Backdrop = _interopRequireDefault(require("@mui/material/Backdrop"));
15
- var _xDataGrid = require("@mui/x-data-grid");
16
- var _FileDownloadOutlined = _interopRequireDefault(require("@mui/icons-material/FileDownloadOutlined"));
17
- var _SearchOutlined = _interopRequireDefault(require("@mui/icons-material/SearchOutlined"));
18
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ import React, { useState, useEffect, useRef } from 'react';
2
+ import axios from 'axios';
3
+ import { Autocomplete, FormControl, Button, Grid, Box, Typography, Paper, Snackbar, Alert, CircularProgress, TextField, Checkbox, InputAdornment } from '@mui/material';
4
+ import { useNavigate } from 'react-router-dom';
5
+ import Header from '../components/Header';
6
+ import Sidebar from '../components/sidebar';
7
+ import '../App.css';
8
+ import Backdrop from '@mui/material/Backdrop';
9
+ import { DataGrid } from '@mui/x-data-grid';
10
+ import FileDownloadOutlinedIcon from '@mui/icons-material/FileDownloadOutlined';
11
+ import SearchOutlinedIcon from '@mui/icons-material/SearchOutlined';
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
13
  function ExamPackReport() {
23
- const [token] = (0, _react.useState)(localStorage.getItem("token"));
24
- const navigate = (0, _reactRouterDom.useNavigate)();
25
- const [subjects, setSubjects] = (0, _react.useState)([]);
26
- const [courses, setCourses] = (0, _react.useState)([]);
27
- const [selectedSubject, setSelectedSubject] = (0, _react.useState)(null);
28
- const [selectedCourse, setSelectedCourse] = (0, _react.useState)(null);
29
- const [alertMessage, setAlertMessage] = (0, _react.useState)('');
30
- const [loading, setLoading] = (0, _react.useState)(false);
31
- const [alertOpen, setAlertOpen] = (0, _react.useState)(false);
14
+ const [token] = useState(localStorage.getItem("token"));
15
+ const navigate = useNavigate();
16
+ const [subjects, setSubjects] = useState([]);
17
+ const [courses, setCourses] = useState([]);
18
+ const [selectedSubject, setSelectedSubject] = useState(null);
19
+ const [selectedCourse, setSelectedCourse] = useState(null);
20
+ const [alertMessage, setAlertMessage] = useState('');
21
+ const [loading, setLoading] = useState(false);
22
+ const [alertOpen, setAlertOpen] = useState(false);
32
23
  const reportType = [{
33
24
  value: "Batch Wise",
34
25
  label: "Batch Wise"
@@ -36,16 +27,16 @@ function ExamPackReport() {
36
27
  value: "User Wise",
37
28
  label: "User Wise"
38
29
  }];
39
- const [selectedReportType, setSelectedReportType] = (0, _react.useState)(null);
40
- const [columns, setColumns] = (0, _react.useState)(null);
41
- const [rows, setRows] = (0, _react.useState)([]);
42
- const [tableShow, setTableShow] = (0, _react.useState)(false);
43
- const [multiLoading, setMultiLoading] = (0, _react.useState)(false);
44
- const [userSelect, setUserSelect] = (0, _react.useState)(false);
45
- const [selectedUserList, setSelectedUserList] = (0, _react.useState)([]);
30
+ const [selectedReportType, setSelectedReportType] = useState(null);
31
+ const [columns, setColumns] = useState(null);
32
+ const [rows, setRows] = useState([]);
33
+ const [tableShow, setTableShow] = useState(false);
34
+ const [multiLoading, setMultiLoading] = useState(false);
35
+ const [userSelect, setUserSelect] = useState(false);
36
+ const [selectedUserList, setSelectedUserList] = useState([]);
46
37
  const baseURL = process.env.REACT_APP_BASE_URL;
47
- const [tableKey, setTableKey] = (0, _react.useState)(0);
48
- const [searchQuery, setSearchQuery] = (0, _react.useState)("");
38
+ const [tableKey, setTableKey] = useState(0);
39
+ const [searchQuery, setSearchQuery] = useState("");
49
40
  const filteredRows = userSelect ? rows.filter(row => {
50
41
  const searchTerms = searchQuery.split(',').map(term => term.trim().toLowerCase()).filter(term => term.length > 0);
51
42
  if (searchTerms.length === 0) return true;
@@ -77,12 +68,13 @@ function ExamPackReport() {
77
68
  width: 170,
78
69
  renderCell: params => {
79
70
  const isActive = params.value; // Assuming it's a boolean (true/false)
80
- return /*#__PURE__*/_react.default.createElement("span", {
71
+ return /*#__PURE__*/_jsx("span", {
81
72
  style: {
82
73
  color: isActive ? 'green' : 'red',
83
74
  fontWeight: 'bold'
84
- }
85
- }, isActive ? 'Active' : 'Inactive');
75
+ },
76
+ children: isActive ? 'Active' : 'Inactive'
77
+ });
86
78
  }
87
79
  }, {
88
80
  field: 'dailyProgressMail',
@@ -90,19 +82,20 @@ function ExamPackReport() {
90
82
  width: 130,
91
83
  renderCell: params => {
92
84
  const isActive = params.value;
93
- return /*#__PURE__*/_react.default.createElement("span", {
85
+ return /*#__PURE__*/_jsx("span", {
94
86
  style: {
95
87
  color: isActive ? 'green' : 'red',
96
88
  fontWeight: 'bold'
97
- }
98
- }, isActive ? 'Active' : 'Inactive');
89
+ },
90
+ children: isActive ? 'Active' : 'Inactive'
91
+ });
99
92
  }
100
93
  }, {
101
94
  field: "report",
102
95
  headerName: "Report",
103
96
  sortable: false,
104
97
  width: 70,
105
- renderCell: params => /*#__PURE__*/_react.default.createElement(_FileDownloadOutlined.default, {
98
+ renderCell: params => /*#__PURE__*/_jsx(FileDownloadOutlinedIcon, {
106
99
  onClick: () => handleDownloadBatchReport(params.row),
107
100
  fontSize: "small",
108
101
  style: {
@@ -126,19 +119,20 @@ function ExamPackReport() {
126
119
  width: 200,
127
120
  renderCell: params => {
128
121
  const isActive = params.value;
129
- return /*#__PURE__*/_react.default.createElement("span", {
122
+ return /*#__PURE__*/_jsx("span", {
130
123
  style: {
131
124
  color: isActive ? 'green' : 'red',
132
125
  fontWeight: 'bold'
133
- }
134
- }, isActive ? 'User' : '');
126
+ },
127
+ children: isActive ? 'User' : ''
128
+ });
135
129
  }
136
130
  }, {
137
131
  field: "report",
138
132
  headerName: "Report",
139
133
  sortable: false,
140
134
  width: 70,
141
- renderCell: params => /*#__PURE__*/_react.default.createElement(_FileDownloadOutlined.default, {
135
+ renderCell: params => /*#__PURE__*/_jsx(FileDownloadOutlinedIcon, {
142
136
  onClick: () => handleDownloadSingleUserReport(params.row),
143
137
  fontSize: "small",
144
138
  style: {
@@ -146,7 +140,7 @@ function ExamPackReport() {
146
140
  }
147
141
  })
148
142
  }];
149
- (0, _react.useEffect)(() => {
143
+ useEffect(() => {
150
144
  if (token == null) {
151
145
  navigate("/login");
152
146
  } else {
@@ -155,7 +149,7 @@ function ExamPackReport() {
155
149
  }, []);
156
150
  const fetchAllSubjects = async () => {
157
151
  try {
158
- const response = await (0, _axios.default)({
152
+ const response = await axios({
159
153
  method: "get",
160
154
  url: `${baseURL}api/showAllSubjects`,
161
155
  headers: {
@@ -169,7 +163,7 @@ function ExamPackReport() {
169
163
  };
170
164
  const fetchCourses = async subjectId => {
171
165
  try {
172
- const response = await (0, _axios.default)({
166
+ const response = await axios({
173
167
  method: "get",
174
168
  params: {
175
169
  subjectId
@@ -217,7 +211,7 @@ function ExamPackReport() {
217
211
  const getBatchWiseList = async () => {
218
212
  setLoading(true);
219
213
  try {
220
- const response = await _axios.default.get(`${baseURL}api/getCorpCourseBatches?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}`, {
214
+ const response = await axios.get(`${baseURL}api/getCorpCourseBatches?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}`, {
221
215
  headers: {
222
216
  Authorization: `Bearer ${token}`
223
217
  }
@@ -243,7 +237,7 @@ function ExamPackReport() {
243
237
  const getUserWiseList = async () => {
244
238
  setLoading(true);
245
239
  try {
246
- const response = await _axios.default.get(`${baseURL}api/getCorpCourseUsers?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}`, {
240
+ const response = await axios.get(`${baseURL}api/getCorpCourseUsers?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}`, {
247
241
  headers: {
248
242
  Authorization: `Bearer ${token}`
249
243
  }
@@ -274,7 +268,7 @@ function ExamPackReport() {
274
268
  try {
275
269
  let url;
276
270
  url = `${baseURL}api/downloadCourseAndBatchWiseReport?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}&batchId=${item.id}`;
277
- const response = await _axios.default.post(url, {}, {
271
+ const response = await axios.post(url, {}, {
278
272
  responseType: 'blob',
279
273
  headers: {
280
274
  Authorization: `Bearer ${token}`
@@ -311,7 +305,7 @@ function ExamPackReport() {
311
305
  try {
312
306
  let url;
313
307
  url = `${baseURL}api/downloadExamPackReportByCourse?userId=${item.id}&corpCourseId=${selectedCourse.id}&subjectId=${selectedSubject.subjectId}`;
314
- const response = await _axios.default.get(url, {
308
+ const response = await axios.get(url, {
315
309
  responseType: 'blob',
316
310
  headers: {
317
311
  Authorization: `Bearer ${token}`
@@ -349,7 +343,7 @@ function ExamPackReport() {
349
343
  try {
350
344
  let url;
351
345
  url = `${baseURL}api/downloadExamPacksAndUserIdsReport?subjectId=${selectedSubject.subjectId}&corpCourseId=${selectedCourse.id}`;
352
- const response = await _axios.default.post(url, {
346
+ const response = await axios.post(url, {
353
347
  userIds: selectedRowIds
354
348
  }, {
355
349
  responseType: 'blob',
@@ -387,173 +381,198 @@ function ExamPackReport() {
387
381
  page: 0,
388
382
  pageSize: 5
389
383
  };
390
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Header.default, null), /*#__PURE__*/_react.default.createElement(_sidebar.default, null), /*#__PURE__*/_react.default.createElement("div", {
391
- style: {
392
- padding: "100px 0px 0px 100px",
393
- marginLeft: "140px"
394
- }
395
- }, /*#__PURE__*/_react.default.createElement(_material.Box, {
396
- sx: {
397
- maxWidth: 800,
398
- mx: 'auto',
399
- my: 4,
400
- p: 3,
401
- backgroundColor: '#f5f5f5',
402
- borderRadius: 2
403
- }
404
- }, /*#__PURE__*/_react.default.createElement(_material.Paper, {
405
- elevation: 6,
406
- sx: {
407
- p: 5,
408
- textAlign: 'center',
409
- backgroundColor: '#fff'
410
- }
411
- }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
412
- variant: "h4",
413
- component: "h1",
414
- gutterBottom: true,
415
- sx: {
416
- color: '#3f51b5',
417
- marginBottom: "20px"
418
- }
419
- }, "Exam Pack Report"), /*#__PURE__*/_react.default.createElement(_material.Grid, {
420
- container: true,
421
- spacing: 2,
422
- justifyContent: "center"
423
- }, /*#__PURE__*/_react.default.createElement(_material.Grid, {
424
- item: true,
425
- xs: 12,
426
- sm: 4
427
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
428
- fullWidth: true
429
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
430
- id: "ddlSubject",
431
- options: subjects,
432
- getOptionLabel: option => option.subjectName,
433
- value: selectedSubject,
434
- onChange: handleSubjectChange,
435
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
436
- label: "Subject"
437
- }))
438
- }))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
439
- item: true,
440
- xs: 12,
441
- sm: 4
442
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
443
- fullWidth: true
444
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
445
- id: "ddlCourse",
446
- options: courses,
447
- getOptionLabel: option => option.courseName,
448
- value: selectedCourse,
449
- onChange: handleCourseChange,
450
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
451
- label: "Course"
452
- }))
453
- }))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
454
- item: true,
455
- xs: 12,
456
- sm: 4
457
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
458
- fullWidth: true
459
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
460
- id: "checkboxes-tags-demo",
461
- options: reportType,
462
- getOptionLabel: option => option.label,
463
- value: selectedReportType,
464
- onChange: handleReportTypeChange,
465
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
466
- label: "Report Type"
467
- }))
468
- })))), tableShow && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
469
- sx: {
470
- display: "flex",
471
- justifyContent: "flex-end",
472
- width: "100%",
473
- margin: "20px 0px"
474
- }
475
- }, userSelect && /*#__PURE__*/_react.default.createElement(_material.Button, {
476
- variant: "contained",
477
- color: "primary",
478
- onClick: handleSummeryDownload,
479
- disabled: selectedUserList.length <= 1,
480
- sx: {
481
- width: 'auto',
482
- backgroundColor: '#3f51b5',
483
- '&:hover': {
484
- backgroundColor: '#303f9f'
485
- }
486
- }
487
- }, multiLoading ? 'Downloading...' : 'Download Report')), /*#__PURE__*/_react.default.createElement(_material.Paper, {
488
- sx: {
489
- width: '100%'
490
- }
491
- }, /*#__PURE__*/_react.default.createElement("div", {
492
- style: {
493
- display: "flex",
494
- justifyContent: "end",
495
- alignItems: "center",
496
- height: "100%",
497
- padding: "10px 5px"
498
- }
499
- }, userSelect && /*#__PURE__*/_react.default.createElement(_material.TextField, {
500
- label: "Search",
501
- variant: "outlined",
502
- size: "small",
503
- sx: {
504
- mb: 2
505
- },
506
- value: searchQuery,
507
- onChange: e => setSearchQuery(e.target.value),
508
- InputProps: {
509
- endAdornment: /*#__PURE__*/_react.default.createElement(_material.InputAdornment, {
510
- position: "start"
511
- }, /*#__PURE__*/_react.default.createElement(_SearchOutlined.default, null))
512
- }
513
- })), /*#__PURE__*/_react.default.createElement(_xDataGrid.DataGrid, {
514
- key: tableKey,
515
- rows: userSelect ? filteredRows : rows,
516
- columns: columns,
517
- initialState: {
518
- pagination: {
519
- paginationModel
520
- }
521
- },
522
- pageSizeOptions: [5, 10, 50, 100],
523
- checkboxSelection: userSelect,
524
- disableRowSelectionOnClick: true,
525
- onRowSelectionModelChange: handleRowSelection,
526
- sx: {
527
- border: 0,
528
- "& .MuiTablePagination-selectLabel": {
529
- margin: "unset"
384
+ return /*#__PURE__*/_jsxs("div", {
385
+ children: [/*#__PURE__*/_jsx(Header, {}), /*#__PURE__*/_jsx(Sidebar, {}), /*#__PURE__*/_jsxs("div", {
386
+ style: {
387
+ padding: "100px 0px 0px 100px",
388
+ marginLeft: "140px"
530
389
  },
531
- "& .MuiTablePagination-displayedRows": {
532
- margin: "unset"
533
- }
534
- }
535
- }))))), /*#__PURE__*/_react.default.createElement(_material.Snackbar, {
536
- open: alertOpen,
537
- autoHideDuration: 6000,
538
- onClose: () => setAlertOpen(false),
539
- anchorOrigin: {
540
- vertical: 'top',
541
- horizontal: 'center'
542
- }
543
- }, /*#__PURE__*/_react.default.createElement(_material.Alert, {
544
- onClose: () => setAlertOpen(false),
545
- severity: "info",
546
- sx: {
547
- width: '100%'
548
- }
549
- }, alertMessage)), /*#__PURE__*/_react.default.createElement(_Backdrop.default, {
550
- sx: theme => ({
551
- color: '#fff',
552
- zIndex: theme.zIndex.drawer + 1
553
- }),
554
- open: loading || multiLoading
555
- }, /*#__PURE__*/_react.default.createElement(_material.CircularProgress, {
556
- color: "inherit"
557
- }))));
390
+ children: [/*#__PURE__*/_jsx(Box, {
391
+ sx: {
392
+ maxWidth: 800,
393
+ mx: 'auto',
394
+ my: 4,
395
+ p: 3,
396
+ backgroundColor: '#f5f5f5',
397
+ borderRadius: 2
398
+ },
399
+ children: /*#__PURE__*/_jsxs(Paper, {
400
+ elevation: 6,
401
+ sx: {
402
+ p: 5,
403
+ textAlign: 'center',
404
+ backgroundColor: '#fff'
405
+ },
406
+ children: [/*#__PURE__*/_jsx(Typography, {
407
+ variant: "h4",
408
+ component: "h1",
409
+ gutterBottom: true,
410
+ sx: {
411
+ color: '#3f51b5',
412
+ marginBottom: "20px"
413
+ },
414
+ children: "Exam Pack Report"
415
+ }), /*#__PURE__*/_jsxs(Grid, {
416
+ container: true,
417
+ spacing: 2,
418
+ justifyContent: "center",
419
+ children: [/*#__PURE__*/_jsx(Grid, {
420
+ item: true,
421
+ xs: 12,
422
+ sm: 4,
423
+ children: /*#__PURE__*/_jsx(FormControl, {
424
+ fullWidth: true,
425
+ children: /*#__PURE__*/_jsx(Autocomplete, {
426
+ id: "ddlSubject",
427
+ options: subjects,
428
+ getOptionLabel: option => option.subjectName,
429
+ value: selectedSubject,
430
+ onChange: handleSubjectChange,
431
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
432
+ ...params,
433
+ label: "Subject"
434
+ })
435
+ })
436
+ })
437
+ }), /*#__PURE__*/_jsx(Grid, {
438
+ item: true,
439
+ xs: 12,
440
+ sm: 4,
441
+ children: /*#__PURE__*/_jsx(FormControl, {
442
+ fullWidth: true,
443
+ children: /*#__PURE__*/_jsx(Autocomplete, {
444
+ id: "ddlCourse",
445
+ options: courses,
446
+ getOptionLabel: option => option.courseName,
447
+ value: selectedCourse,
448
+ onChange: handleCourseChange,
449
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
450
+ ...params,
451
+ label: "Course"
452
+ })
453
+ })
454
+ })
455
+ }), /*#__PURE__*/_jsx(Grid, {
456
+ item: true,
457
+ xs: 12,
458
+ sm: 4,
459
+ children: /*#__PURE__*/_jsx(FormControl, {
460
+ fullWidth: true,
461
+ children: /*#__PURE__*/_jsx(Autocomplete, {
462
+ id: "checkboxes-tags-demo",
463
+ options: reportType,
464
+ getOptionLabel: option => option.label,
465
+ value: selectedReportType,
466
+ onChange: handleReportTypeChange,
467
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
468
+ ...params,
469
+ label: "Report Type"
470
+ })
471
+ })
472
+ })
473
+ })]
474
+ }), tableShow && /*#__PURE__*/_jsxs(_Fragment, {
475
+ children: [/*#__PURE__*/_jsx(Box, {
476
+ sx: {
477
+ display: "flex",
478
+ justifyContent: "flex-end",
479
+ width: "100%",
480
+ margin: "20px 0px"
481
+ },
482
+ children: userSelect && /*#__PURE__*/_jsx(Button, {
483
+ variant: "contained",
484
+ color: "primary",
485
+ onClick: handleSummeryDownload,
486
+ disabled: selectedUserList.length <= 1,
487
+ sx: {
488
+ width: 'auto',
489
+ backgroundColor: '#3f51b5',
490
+ '&:hover': {
491
+ backgroundColor: '#303f9f'
492
+ }
493
+ },
494
+ children: multiLoading ? 'Downloading...' : 'Download Report'
495
+ })
496
+ }), /*#__PURE__*/_jsxs(Paper, {
497
+ sx: {
498
+ width: '100%'
499
+ },
500
+ children: [/*#__PURE__*/_jsx("div", {
501
+ style: {
502
+ display: "flex",
503
+ justifyContent: "end",
504
+ alignItems: "center",
505
+ height: "100%",
506
+ padding: "10px 5px"
507
+ },
508
+ children: userSelect && /*#__PURE__*/_jsx(TextField, {
509
+ label: "Search",
510
+ variant: "outlined",
511
+ size: "small",
512
+ sx: {
513
+ mb: 2
514
+ },
515
+ value: searchQuery,
516
+ onChange: e => setSearchQuery(e.target.value),
517
+ InputProps: {
518
+ endAdornment: /*#__PURE__*/_jsx(InputAdornment, {
519
+ position: "start",
520
+ children: /*#__PURE__*/_jsx(SearchOutlinedIcon, {})
521
+ })
522
+ }
523
+ })
524
+ }), /*#__PURE__*/_jsx(DataGrid, {
525
+ rows: userSelect ? filteredRows : rows,
526
+ columns: columns,
527
+ initialState: {
528
+ pagination: {
529
+ paginationModel
530
+ }
531
+ },
532
+ pageSizeOptions: [5, 10, 50, 100],
533
+ checkboxSelection: userSelect,
534
+ disableRowSelectionOnClick: true,
535
+ onRowSelectionModelChange: handleRowSelection,
536
+ sx: {
537
+ border: 0,
538
+ "& .MuiTablePagination-selectLabel": {
539
+ margin: "unset"
540
+ },
541
+ "& .MuiTablePagination-displayedRows": {
542
+ margin: "unset"
543
+ }
544
+ }
545
+ }, tableKey)]
546
+ })]
547
+ })]
548
+ })
549
+ }), /*#__PURE__*/_jsx(Snackbar, {
550
+ open: alertOpen,
551
+ autoHideDuration: 6000,
552
+ onClose: () => setAlertOpen(false),
553
+ anchorOrigin: {
554
+ vertical: 'top',
555
+ horizontal: 'center'
556
+ },
557
+ children: /*#__PURE__*/_jsx(Alert, {
558
+ onClose: () => setAlertOpen(false),
559
+ severity: "info",
560
+ sx: {
561
+ width: '100%'
562
+ },
563
+ children: alertMessage
564
+ })
565
+ }), /*#__PURE__*/_jsx(Backdrop, {
566
+ sx: theme => ({
567
+ color: '#fff',
568
+ zIndex: theme.zIndex.drawer + 1
569
+ }),
570
+ open: loading || multiLoading,
571
+ children: /*#__PURE__*/_jsx(CircularProgress, {
572
+ color: "inherit"
573
+ })
574
+ })]
575
+ })]
576
+ });
558
577
  }
559
- var _default = exports.default = ExamPackReport;
578
+ export default ExamPackReport;