Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-scorecard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Venkaiah Naidu Singamchetty
nisum-scorecard
Commits
3d523779
Commit
3d523779
authored
Mar 17, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
routing issue cleared
parent
ab1933e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
index.jsx
src/components/header/index.jsx
+2
-2
index.jsx
src/pages/reports/index.jsx
+10
-1
No files found.
src/components/header/index.jsx
View file @
3d523779
...
...
@@ -21,8 +21,8 @@ function Header() {
<
button
className=
" -mt-1 text-2xl flex"
onClick=
{
()
=>
setOpen
(
!
open
)
}
>
<
img
src=
"/user.png"
width=
"35px"
height=
"35px"
className=
"mt-2 pr-2"
/>
<
div
className=
"flex flex-col"
>
<
p
className=
"text-lg font-semibold"
>
{
user
.
empName
}
</
p
>
<
p
className=
"text-xs"
>
{
user
.
designation
}
</
p
>
<
p
className=
"text-lg font-semibold"
>
{
user
?
.
empName
}
</
p
>
<
p
className=
"text-xs"
>
{
user
?
.
designation
}
</
p
>
</
div
>
</
button
>
<
button
onClick=
{
handleLogout
}
className=
{
`${!open && "hidden"} absolute top-[40px] bg-white opacity-100 shadow-md px-5 py-1 bg-opacity-100 rounded border border-gray-400 right-0 hover:bg-blue-400 hover:text-white w-[-webkit-fill-available]`
}
style=
{
{
zIndex
:
1
}
}
>
...
...
src/pages/reports/index.jsx
View file @
3d523779
import
React
,
{
useState
,
useEffect
,
useMemo
}
from
"react"
;
import
{
useSelector
,
useDispatch
}
from
"react-redux"
;
import
{
useParams
}
from
"react-router"
;
import
{
useParams
,
useNavigate
}
from
"react-router"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
axios
from
'axios'
;
import
{
fetchReports
}
from
"../../redux/reducers/reportSlice"
;
...
...
@@ -10,6 +10,7 @@ import DateRangePicker from "../../components/dateRangePicker/DateRangePicker";
function
Reports
()
{
const
dispatch
=
useDispatch
();
const
navigate
=
useNavigate
();
const
{
id
}
=
useParams
();
const
empId
=
Number
(
id
)
const
reportees
=
useSelector
((
state
)
=>
state
.
reportees
.
reportees
);
...
...
@@ -96,6 +97,14 @@ function Reports() {
})
},
[
id
,
reportees
]);
useEffect
(()
=>
{
if
(
user
){
navigate
(
"/dashboard"
)
}
else
{
navigate
(
"/"
)
}
},
[
user
]);
return
(
<
div
className=
"p-4"
>
<
div
className=
" bg-white p-3"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment