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,39 +1,30 @@
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 _material = require("@mui/material");
9
- var _reactRouterDom = require("react-router-dom");
10
- var _Header = _interopRequireDefault(require("../components/Header"));
11
- var _sidebar = _interopRequireDefault(require("../components/sidebar"));
12
- var _TenantProvider = require("../context/TenantProvider");
13
- require("../App.css");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- 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); }
16
- 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; }
17
- 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); } // ADD THIS
1
+ import React, { useState, useEffect } from 'react';
2
+ import { Autocomplete, FormControl, Button, Grid, Box, Typography, Paper, Snackbar, Alert, CircularProgress, TextField, Checkbox, FormControlLabel } from '@mui/material';
3
+ import { useNavigate } from 'react-router-dom';
4
+ import Header from '../components/Header';
5
+ import Sidebar from '../components/sidebar';
6
+ import { useTenant } from '../context/TenantProvider'; // ADD THIS
7
+ import '../App.css';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
9
  function Report() {
19
10
  const {
20
11
  apiClient
21
- } = (0, _TenantProvider.useTenant)(); // ADD THIS - gets API client with token
22
- const navigate = (0, _reactRouterDom.useNavigate)();
23
- const [subjects, setSubjects] = (0, _react.useState)([]);
24
- const [examPacks, setExamPacks] = (0, _react.useState)([]);
25
- const [exams, setExams] = (0, _react.useState)([]);
26
- const [users, setUsers] = (0, _react.useState)([]);
27
- const [selectedSubject, setSelectedSubject] = (0, _react.useState)(null);
28
- const [selectedExamPack, setSelectedExamPack] = (0, _react.useState)(null);
29
- const [selectedExam, setSelectedExam] = (0, _react.useState)(null);
30
- const [selectedUser, setSelectedUser] = (0, _react.useState)(null);
31
- const [alertMessage, setAlertMessage] = (0, _react.useState)('');
32
- const [openAlert, setOpenAlert] = (0, _react.useState)(false);
33
- const [loading, setLoading] = (0, _react.useState)(false);
34
- const [onlyWrongAnswers, setOnlyWrongAnswers] = (0, _react.useState)(false);
12
+ } = useTenant(); // ADD THIS - gets API client with token
13
+ const navigate = useNavigate();
14
+ const [subjects, setSubjects] = useState([]);
15
+ const [examPacks, setExamPacks] = useState([]);
16
+ const [exams, setExams] = useState([]);
17
+ const [users, setUsers] = useState([]);
18
+ const [selectedSubject, setSelectedSubject] = useState(null);
19
+ const [selectedExamPack, setSelectedExamPack] = useState(null);
20
+ const [selectedExam, setSelectedExam] = useState(null);
21
+ const [selectedUser, setSelectedUser] = useState(null);
22
+ const [alertMessage, setAlertMessage] = useState('');
23
+ const [openAlert, setOpenAlert] = useState(false);
24
+ const [loading, setLoading] = useState(false);
25
+ const [onlyWrongAnswers, setOnlyWrongAnswers] = useState(false);
35
26
  const baseURL = process.env.REACT_APP_BASE_URL;
36
- (0, _react.useEffect)(() => {
27
+ useEffect(() => {
37
28
  // REMOVE token check - no more JWT
38
29
  fetchAllSubjects();
39
30
  }, []);
@@ -150,150 +141,174 @@ function Report() {
150
141
  setLoading(false);
151
142
  }
152
143
  };
153
- 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", {
154
- style: {
155
- padding: "100px 0px 0px 100px",
156
- marginLeft: "140px"
157
- }
158
- }, /*#__PURE__*/_react.default.createElement(_material.Box, {
159
- sx: {
160
- maxWidth: 800,
161
- mx: 'auto',
162
- my: 4,
163
- p: 3,
164
- backgroundColor: '#f5f5f5',
165
- borderRadius: 2
166
- }
167
- }, /*#__PURE__*/_react.default.createElement(_material.Paper, {
168
- elevation: 6,
169
- sx: {
170
- p: 5,
171
- textAlign: 'center',
172
- backgroundColor: '#fff'
173
- }
174
- }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
175
- variant: "h4",
176
- component: "h1",
177
- gutterBottom: true,
178
- sx: {
179
- color: '#3f51b5',
180
- marginBottom: "20px"
181
- }
182
- }, "Exam Report"), /*#__PURE__*/_react.default.createElement(_material.Grid, {
183
- container: true,
184
- spacing: 2,
185
- justifyContent: "center"
186
- }, /*#__PURE__*/_react.default.createElement(_material.Grid, {
187
- item: true,
188
- xs: 12,
189
- sm: 6
190
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
191
- fullWidth: true
192
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
193
- id: "ddlSubject",
194
- options: subjects,
195
- getOptionLabel: option => option.subjectName,
196
- value: selectedSubject,
197
- onChange: handleSubjectChange,
198
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
199
- label: "Subject"
200
- }))
201
- }))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
202
- item: true,
203
- xs: 12,
204
- sm: 6
205
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
206
- fullWidth: true
207
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
208
- id: "ddlExamPack",
209
- options: examPacks,
210
- getOptionLabel: option => option.name,
211
- value: selectedExamPack,
212
- onChange: handleExamPackChange,
213
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
214
- label: "Exam Pack"
215
- }))
216
- }))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
217
- item: true,
218
- xs: 12,
219
- sm: 6
220
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
221
- fullWidth: true
222
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
223
- id: "ddlExam",
224
- options: exams,
225
- getOptionLabel: option => option.examName,
226
- value: selectedExam,
227
- onChange: handleExamChange,
228
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
229
- label: "Exam"
230
- }))
231
- }))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
232
- item: true,
233
- xs: 12,
234
- sm: 6
235
- }, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
236
- fullWidth: true
237
- }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
238
- id: "ddlUser",
239
- options: users,
240
- getOptionLabel: option => option.userName,
241
- value: selectedUser,
242
- onChange: handleUserChange,
243
- renderInput: params => /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
244
- label: "User"
245
- }))
246
- })))), /*#__PURE__*/_react.default.createElement(_material.Box, {
247
- sx: {
248
- mt: 3,
249
- position: 'relative'
250
- }
251
- }, /*#__PURE__*/_react.default.createElement(_material.FormControlLabel, {
252
- control: /*#__PURE__*/_react.default.createElement(_material.Checkbox, {
253
- checked: onlyWrongAnswers,
254
- onChange: e => setOnlyWrongAnswers(e.target.checked)
255
- }),
256
- label: "Only Wrong Answers"
257
- }), /*#__PURE__*/_react.default.createElement(_material.Box, {
258
- sx: {
259
- mt: 2,
260
- position: 'relative'
261
- }
262
- }, /*#__PURE__*/_react.default.createElement(_material.Button, {
263
- variant: "contained",
264
- color: "primary",
265
- onClick: handleDownload,
266
- disabled: !selectedSubject || !selectedExamPack || !selectedExam || !selectedUser || loading,
267
- sx: {
268
- width: 'auto',
269
- backgroundColor: '#3f51b5',
270
- '&:hover': {
271
- backgroundColor: '#303f9f'
272
- }
273
- }
274
- }, loading ? 'Downloading...' : 'Download Report'), loading && /*#__PURE__*/_react.default.createElement(_material.CircularProgress, {
275
- size: 24,
276
- sx: {
277
- position: 'absolute',
278
- top: '50%',
279
- left: '50%',
280
- marginTop: '-12px',
281
- marginLeft: '-12px'
282
- }
283
- }))))), /*#__PURE__*/_react.default.createElement(_material.Snackbar, {
284
- open: openAlert,
285
- autoHideDuration: 6000,
286
- onClose: () => setOpenAlert(false),
287
- anchorOrigin: {
288
- vertical: 'top',
289
- horizontal: 'center'
290
- }
291
- }, /*#__PURE__*/_react.default.createElement(_material.Alert, {
292
- onClose: () => setOpenAlert(false),
293
- severity: "info",
294
- sx: {
295
- width: '100%'
296
- }
297
- }, alertMessage))));
144
+ return /*#__PURE__*/_jsxs("div", {
145
+ children: [/*#__PURE__*/_jsx(Header, {}), /*#__PURE__*/_jsx(Sidebar, {}), /*#__PURE__*/_jsxs("div", {
146
+ style: {
147
+ padding: "100px 0px 0px 100px",
148
+ marginLeft: "140px"
149
+ },
150
+ children: [/*#__PURE__*/_jsx(Box, {
151
+ sx: {
152
+ maxWidth: 800,
153
+ mx: 'auto',
154
+ my: 4,
155
+ p: 3,
156
+ backgroundColor: '#f5f5f5',
157
+ borderRadius: 2
158
+ },
159
+ children: /*#__PURE__*/_jsxs(Paper, {
160
+ elevation: 6,
161
+ sx: {
162
+ p: 5,
163
+ textAlign: 'center',
164
+ backgroundColor: '#fff'
165
+ },
166
+ children: [/*#__PURE__*/_jsx(Typography, {
167
+ variant: "h4",
168
+ component: "h1",
169
+ gutterBottom: true,
170
+ sx: {
171
+ color: '#3f51b5',
172
+ marginBottom: "20px"
173
+ },
174
+ children: "Exam Report"
175
+ }), /*#__PURE__*/_jsxs(Grid, {
176
+ container: true,
177
+ spacing: 2,
178
+ justifyContent: "center",
179
+ children: [/*#__PURE__*/_jsx(Grid, {
180
+ item: true,
181
+ xs: 12,
182
+ sm: 6,
183
+ children: /*#__PURE__*/_jsx(FormControl, {
184
+ fullWidth: true,
185
+ children: /*#__PURE__*/_jsx(Autocomplete, {
186
+ id: "ddlSubject",
187
+ options: subjects,
188
+ getOptionLabel: option => option.subjectName,
189
+ value: selectedSubject,
190
+ onChange: handleSubjectChange,
191
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
192
+ ...params,
193
+ label: "Subject"
194
+ })
195
+ })
196
+ })
197
+ }), /*#__PURE__*/_jsx(Grid, {
198
+ item: true,
199
+ xs: 12,
200
+ sm: 6,
201
+ children: /*#__PURE__*/_jsx(FormControl, {
202
+ fullWidth: true,
203
+ children: /*#__PURE__*/_jsx(Autocomplete, {
204
+ id: "ddlExamPack",
205
+ options: examPacks,
206
+ getOptionLabel: option => option.name,
207
+ value: selectedExamPack,
208
+ onChange: handleExamPackChange,
209
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
210
+ ...params,
211
+ label: "Exam Pack"
212
+ })
213
+ })
214
+ })
215
+ }), /*#__PURE__*/_jsx(Grid, {
216
+ item: true,
217
+ xs: 12,
218
+ sm: 6,
219
+ children: /*#__PURE__*/_jsx(FormControl, {
220
+ fullWidth: true,
221
+ children: /*#__PURE__*/_jsx(Autocomplete, {
222
+ id: "ddlExam",
223
+ options: exams,
224
+ getOptionLabel: option => option.examName,
225
+ value: selectedExam,
226
+ onChange: handleExamChange,
227
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
228
+ ...params,
229
+ label: "Exam"
230
+ })
231
+ })
232
+ })
233
+ }), /*#__PURE__*/_jsx(Grid, {
234
+ item: true,
235
+ xs: 12,
236
+ sm: 6,
237
+ children: /*#__PURE__*/_jsx(FormControl, {
238
+ fullWidth: true,
239
+ children: /*#__PURE__*/_jsx(Autocomplete, {
240
+ id: "ddlUser",
241
+ options: users,
242
+ getOptionLabel: option => option.userName,
243
+ value: selectedUser,
244
+ onChange: handleUserChange,
245
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
246
+ ...params,
247
+ label: "User"
248
+ })
249
+ })
250
+ })
251
+ })]
252
+ }), /*#__PURE__*/_jsxs(Box, {
253
+ sx: {
254
+ mt: 3,
255
+ position: 'relative'
256
+ },
257
+ children: [/*#__PURE__*/_jsx(FormControlLabel, {
258
+ control: /*#__PURE__*/_jsx(Checkbox, {
259
+ checked: onlyWrongAnswers,
260
+ onChange: e => setOnlyWrongAnswers(e.target.checked)
261
+ }),
262
+ label: "Only Wrong Answers"
263
+ }), /*#__PURE__*/_jsxs(Box, {
264
+ sx: {
265
+ mt: 2,
266
+ position: 'relative'
267
+ },
268
+ children: [/*#__PURE__*/_jsx(Button, {
269
+ variant: "contained",
270
+ color: "primary",
271
+ onClick: handleDownload,
272
+ disabled: !selectedSubject || !selectedExamPack || !selectedExam || !selectedUser || loading,
273
+ sx: {
274
+ width: 'auto',
275
+ backgroundColor: '#3f51b5',
276
+ '&:hover': {
277
+ backgroundColor: '#303f9f'
278
+ }
279
+ },
280
+ children: loading ? 'Downloading...' : 'Download Report'
281
+ }), loading && /*#__PURE__*/_jsx(CircularProgress, {
282
+ size: 24,
283
+ sx: {
284
+ position: 'absolute',
285
+ top: '50%',
286
+ left: '50%',
287
+ marginTop: '-12px',
288
+ marginLeft: '-12px'
289
+ }
290
+ })]
291
+ })]
292
+ })]
293
+ })
294
+ }), /*#__PURE__*/_jsx(Snackbar, {
295
+ open: openAlert,
296
+ autoHideDuration: 6000,
297
+ onClose: () => setOpenAlert(false),
298
+ anchorOrigin: {
299
+ vertical: 'top',
300
+ horizontal: 'center'
301
+ },
302
+ children: /*#__PURE__*/_jsx(Alert, {
303
+ onClose: () => setOpenAlert(false),
304
+ severity: "info",
305
+ sx: {
306
+ width: '100%'
307
+ },
308
+ children: alertMessage
309
+ })
310
+ })]
311
+ })]
312
+ });
298
313
  }
299
- var _default = exports.default = Report;
314
+ export default Report;
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
1
  class TenantApiClient {
8
2
  constructor(config) {
9
3
  this.baseURL = config.baseURL;
@@ -41,4 +35,4 @@ class TenantApiClient {
41
35
  });
42
36
  }
43
37
  }
44
- var _default = exports.default = TenantApiClient;
38
+ export default TenantApiClient;
@@ -1,68 +1,64 @@
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 _reactRouterDom = require("react-router-dom");
9
- var _fa = require("react-icons/fa");
10
- var _md = require("react-icons/md");
11
- var _io = require("react-icons/io");
12
- var _gi = require("react-icons/gi");
13
- var _Popover = _interopRequireDefault(require("@mui/material/Popover"));
14
- require("./Header.css");
15
- var _ri = require("react-icons/ri");
16
- var _hi = require("react-icons/hi2");
17
- var _tb = require("react-icons/tb");
18
- var _io2 = require("react-icons/io5");
19
- var _tfi = require("react-icons/tfi");
20
- var _reactLoaderSpinner = require("react-loader-spinner");
21
- var _antd = require("antd");
22
- var _bi = require("react-icons/bi");
23
- var _fa2 = require("react-icons/fa6");
24
- var _pi = require("react-icons/pi");
25
- var _imagePathUrl = _interopRequireWildcard(require("./imagePathUrl"));
26
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
27
- 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); }
28
- 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; }
29
- // Import Drawer from antd
30
-
1
+ import React, { useState, useEffect } from 'react';
2
+ import { useNavigate } from 'react-router-dom';
3
+ import { FaPowerOff } from "react-icons/fa";
4
+ import { MdFiberManualRecord, MdLogout, MdOutlineLockReset } from "react-icons/md";
5
+ import { IoIosList, IoIosSettings } from "react-icons/io";
6
+ import { GiHamburgerMenu } from "react-icons/gi";
7
+ import Popover from '@mui/material/Popover';
8
+ import { Link, useLocation } from 'react-router-dom';
9
+ import "./Header.css";
10
+ import { MdKeyboardArrowDown, MdAssignment } from "react-icons/md";
11
+ import { RiHome5Fill, RiLogoutCircleRLine, RiMenuFoldLine } from "react-icons/ri";
12
+ import { HiBookmarkSquare, HiOutlineUser } from "react-icons/hi2";
13
+ import { TbDeviceMobileFilled } from "react-icons/tb";
14
+ import { IoBookOutline, IoCalendar, IoCalendarOutline, IoCartOutline, IoLanguage, IoLibraryOutline, IoLogOutOutline, IoPencilOutline, IoPersonCircleOutline, IoPersonOutline, IoSettingsOutline, IoShuffle, IoShuffleOutline } from "react-icons/io5";
15
+ import { TfiMenuAlt } from "react-icons/tfi";
16
+ import { RotatingLines } from 'react-loader-spinner';
17
+ import { Drawer } from 'antd'; // Import Drawer from antd
18
+ import './Header.css';
19
+ import { BiSolidBookContent, BiSolidUserPin } from "react-icons/bi";
20
+ import { FaCheck, FaCircleInfo } from "react-icons/fa6";
21
+ import { PiExamFill, PiShuffleAngularBold } from "react-icons/pi";
22
+ import { RiRedPacketLine } from "react-icons/ri";
23
+ import { MdMenuBook, MdKeyboardArrowRight, MdCorporateFare } from "react-icons/md";
24
+ import { IoGameControllerSharp } from "react-icons/io5";
25
+ import commonImagePathUrlPrefix, { logo } from './imagePathUrl';
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
27
  const Header = () => {
32
- const navigate = (0, _reactRouterDom.useNavigate)();
33
- const [show, setShow] = (0, _react.useState)(false);
34
- const location = (0, _reactRouterDom.useLocation)();
35
- const [activeMenuItem, setActiveMenuItem] = (0, _react.useState)(location.pathname);
36
- const [isSideMenu, setSideMenu] = (0, _react.useState)("");
37
- const [userChooseLan, setUserChooseLan] = (0, _react.useState)("en");
38
- const [drawerVisible, setDrawerVisible] = (0, _react.useState)(false);
39
- const [userEmail] = (0, _react.useState)(localStorage.getItem("email"));
40
- const [userName] = (0, _react.useState)(localStorage.getItem("fName") + " " + localStorage.getItem("lName"));
28
+ const navigate = useNavigate();
29
+ const [show, setShow] = useState(false);
30
+ const location = useLocation();
31
+ const [activeMenuItem, setActiveMenuItem] = useState(location.pathname);
32
+ const [isSideMenu, setSideMenu] = useState("");
33
+ const [userChooseLan, setUserChooseLan] = useState("en");
34
+ const [drawerVisible, setDrawerVisible] = useState(false);
35
+ const [userEmail] = useState(localStorage.getItem("email"));
36
+ const [userName] = useState(localStorage.getItem("fName") + " " + localStorage.getItem("lName"));
41
37
  const roleId = localStorage.getItem("roleId");
42
- const [manageContentSubMenuOpen, setManageContentSubMenuOpen] = (0, _react.useState)(false);
43
- const [manageExamSubMenuOpen, setManageExamSubMenuOpen] = (0, _react.useState)(false);
44
- const [managePackSubMenuOpen, setManagePackSubMenuOpen] = (0, _react.useState)(false);
45
- const [manageUserSubMenuOpen, setManageUserSubMenuOpen] = (0, _react.useState)(false);
46
- const [manageCorporateSubMenuOpen, setManageCorporateSubMenuOpen] = (0, _react.useState)(false);
47
- const [manageControlSubMenuOpen, setManageControlSubMenuOpen] = (0, _react.useState)(false);
48
- const [usernames, setUserNames] = (0, _react.useState)("");
49
- const [userimg, setUserImg] = (0, _react.useState)("");
50
- const [availableCredit, setAvailableCredit] = (0, _react.useState)("");
51
- const [buyCredit, setbuyCredit] = (0, _react.useState)("");
52
- const [storageB, setStroageB] = (0, _react.useState)("");
53
- const [storagelimit, setStorageLimit] = (0, _react.useState)("");
54
- const [buy, setbuy] = (0, _react.useState)('');
55
- const [totalbuy, settotalbuy] = (0, _react.useState)('');
38
+ const [manageContentSubMenuOpen, setManageContentSubMenuOpen] = useState(false);
39
+ const [manageExamSubMenuOpen, setManageExamSubMenuOpen] = useState(false);
40
+ const [managePackSubMenuOpen, setManagePackSubMenuOpen] = useState(false);
41
+ const [manageUserSubMenuOpen, setManageUserSubMenuOpen] = useState(false);
42
+ const [manageCorporateSubMenuOpen, setManageCorporateSubMenuOpen] = useState(false);
43
+ const [manageControlSubMenuOpen, setManageControlSubMenuOpen] = useState(false);
44
+ const [usernames, setUserNames] = useState("");
45
+ const [userimg, setUserImg] = useState("");
46
+ const [availableCredit, setAvailableCredit] = useState("");
47
+ const [buyCredit, setbuyCredit] = useState("");
48
+ const [storageB, setStroageB] = useState("");
49
+ const [storagelimit, setStorageLimit] = useState("");
50
+ const [buy, setbuy] = useState('');
51
+ const [totalbuy, settotalbuy] = useState('');
56
52
  const token = localStorage.getItem("token");
57
53
  const headers = {
58
54
  Authorization: `Bearer ${token}`
59
55
  };
60
56
  const name = localStorage.getItem("fName");
61
- const [showAlert, setShowAlert] = (0, _react.useState)(false);
62
- const [alertMessage, setAlertMessage] = (0, _react.useState)('');
57
+ const [showAlert, setShowAlert] = useState(false);
58
+ const [alertMessage, setAlertMessage] = useState('');
63
59
  const userImage = localStorage.getItem("profileImg");
64
- const [userNameEvaluator] = (0, _react.useState)(localStorage.getItem("userName"));
65
- (0, _react.useEffect)(() => {
60
+ const [userNameEvaluator] = useState(localStorage.getItem("userName"));
61
+ useEffect(() => {
66
62
  if (localStorage.getItem("consentChkFlg") === "false") {
67
63
  // navigate("/myProfile")
68
64
  } else {
@@ -92,15 +88,15 @@ const Header = () => {
92
88
  // useEffect(() => {
93
89
 
94
90
  // }, []);
95
- (0, _react.useEffect)(() => {
91
+ useEffect(() => {
96
92
  window.scrollTo(0, 0);
97
93
  document.addEventListener("click", handleOutsideClick);
98
94
  return () => {
99
95
  document.removeEventListener("click", handleOutsideClick);
100
96
  };
101
97
  }, []);
102
- const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
103
- const [anchorLang, setAnchorLang] = (0, _react.useState)(null);
98
+ const [anchorEl, setAnchorEl] = useState(null);
99
+ const [anchorLang, setAnchorLang] = useState(null);
104
100
  const handleClick = event => {
105
101
  setAnchorEl(event.currentTarget);
106
102
  };
@@ -126,22 +122,24 @@ const Header = () => {
126
122
  // navigate('/login'); // Navigate to login page
127
123
  window.location.reload();
128
124
  };
129
- return /*#__PURE__*/_react.default.createElement("div", {
130
- className: "header_whole_container"
131
- }, /*#__PURE__*/_react.default.createElement("div", {
132
- style: {
133
- display: "flex",
134
- alignItems: "center"
135
- }
136
- }), /*#__PURE__*/_react.default.createElement("div", {
137
- className: "acc_conf_main",
138
- onClick: handleLogout
139
- }, /*#__PURE__*/_react.default.createElement(_fa.FaPowerOff, {
140
- tabIndex: 0,
141
- size: 30,
142
- "aria-describedby": id,
143
- variant: "contained",
144
- className: "account-mnu-icon"
145
- })));
125
+ return /*#__PURE__*/_jsxs("div", {
126
+ className: "header_whole_container",
127
+ children: [/*#__PURE__*/_jsx("div", {
128
+ style: {
129
+ display: "flex",
130
+ alignItems: "center"
131
+ }
132
+ }), /*#__PURE__*/_jsx("div", {
133
+ className: "acc_conf_main",
134
+ onClick: handleLogout,
135
+ children: /*#__PURE__*/_jsx(FaPowerOff, {
136
+ tabIndex: 0,
137
+ size: 30,
138
+ "aria-describedby": id,
139
+ variant: "contained",
140
+ className: "account-mnu-icon"
141
+ })
142
+ })]
143
+ });
146
144
  };
147
- var _default = exports.default = Header;
145
+ export default Header;