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
9158d2b1
Commit
9158d2b1
authored
Mar 23, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'apiserver' into 'master'
error msg modified See merge request
!90
parents
f0945721
87ee9f68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
42 deletions
+41
-42
index.jsx
src/components/leftSidebar/index.jsx
+39
-36
index.jsx
src/components/table/index.jsx
+1
-5
index.jsx
src/pages/viewReportee/index.jsx
+1
-1
No files found.
src/components/leftSidebar/index.jsx
View file @
9158d2b1
...
...
@@ -15,19 +15,19 @@ function LeftSidebar() {
useEffect
(()
=>
{
if
(
inputValue
!==
null
)
{
const
debounceTimeout
=
setTimeout
(()
=>
{
const
data
=
{
reportees
:
userDetails
.
user
.
reportees
,
page
:
(
inputValue
===
""
)?
currPage
:
1
,
perPage
:
10
,
searchText
:
inputValue
};
dispatch
(
fetchReportees
(
data
));
},
1000
);
return
()
=>
clearTimeout
(
debounceTimeout
);
}
if
(
inputValue
!==
null
)
{
const
debounceTimeout
=
setTimeout
(()
=>
{
const
data
=
{
reportees
:
userDetails
.
user
.
reportees
,
page
:
(
inputValue
===
""
)
?
currPage
:
1
,
perPage
:
10
,
searchText
:
inputValue
};
dispatch
(
fetchReportees
(
data
));
},
1000
);
return
()
=>
clearTimeout
(
debounceTimeout
);
}
},
[
inputValue
]);
const
handleChange
=
(
event
)
=>
{
...
...
@@ -53,46 +53,49 @@ function LeftSidebar() {
<
div
className=
" w-[33%] flex flex-col px-[5px]"
>
<
div
className=
" flex mt-3 items-center justify-between"
>
<
p
className=
"text-xl text-blue-400 font-semibold pl-4"
>
Reportees
Reportees
</
p
>
<
input
<
input
placeholder=
"Search"
type=
"text"
type=
"text"
className=
"p-2 border rounded w-[160px] placeholder:text-[14px]"
value=
{
inputValue
}
onChange=
{
handleChange
}
value=
{
inputValue
}
onChange=
{
handleChange
}
/>
</
div
>
{
(
loading
)
?
<
Loading
/>
:
<
div
className=
"p-2 bg-[#E9EDEE] mt-4 max-h-[70vh] overflow-auto"
>
{
reportees
?.
map
(({
empName
,
score
,
empId
})
=>
(
{
(
reportees
.
length
)
?
reportees
?.
map
(({
empName
,
score
,
empId
})
=>
(
<
button
onClick=
{
()
=>
dispatch
(
setViewReportee
(
empId
))
}
// to=
{`/
viewreportee
`}
className=
{
`flex items-center hover:bg-blue-400 hover:text-white bg-${viewReportee?.empId == empId ? "blue-400 text-white" : "white"
} p-2 justify-between mb-1 w-full`
}
key=
{
empId
}
>
<
p
className=
"w-[80%] text-left"
>
{
empName
}
</
p
>
<
p
className=
{
`w-[30px] h-[30px] rounded-full flex items-center text-white justify-center ${scoreColor(score)}`
}
>
{
score
}
</
p
>
</
button
>
))
}
<
p
className=
"w-[80%] text-left"
>
{
empName
}
</
p
>
<
p
className=
{
`w-[30px] h-[30px] rounded-full flex items-center text-white justify-center ${scoreColor(score)}`
}
>
{
score
}
</
p
>
</
button
>
))
:
<
div
className=
"w-full h-full"
>
<
p
className=
"text-center align-middle text-blue-500 font-bold"
>
No Records Found
</
p
>
</
div
>
}
</
div
>
}
<
div
>
{
reportees
.
length
>
0
&&
pagesCount
>
1
&&
(
<
PaginationComponent
currentPage=
{
currPage
}
totalPages=
{
pagesCount
}
onPageChange=
{
handlePageChange
}
/>
)
}
{
reportees
.
length
>
0
&&
pagesCount
>
1
&&
(
<
PaginationComponent
currentPage=
{
currPage
}
totalPages=
{
pagesCount
}
onPageChange=
{
handlePageChange
}
/>
)
}
</
div
>
</
div
>
);
...
...
src/components/table/index.jsx
View file @
9158d2b1
...
...
@@ -75,15 +75,11 @@ function Table({headers, data,loading, maxHeight}) {
</
table
>
{
(
!
data
?.
length
)?<
div
className=
"w-full h-full"
>
<
p
className=
"text-center align-middle pt-14 pb-14 text-blue-500 font-bold"
>
No
records to display
</
p
>
<
p
className=
"text-center align-middle pt-14 pb-14 text-blue-500 font-bold"
>
No
Records Found
</
p
>
</
div
>:
null
}
</
div
>
);
// else
// return <div className="w-full h-full">
// <p className="text-center align-middle pt-14 pb-14 text-blue-500 font-bold">No records to display</p>
// </div>
}
export
default
Table
;
src/pages/viewReportee/index.jsx
View file @
9158d2b1
...
...
@@ -88,7 +88,7 @@ function Viewreportee() {
}
},
[]);
if
(
reportees
.
length
&&
viewReportee
!==
null
)
if
(
viewReportee
!==
null
)
return
(
<
div
className=
"p-4"
>
<
div
className=
"bg-white p-3 rounded-md"
>
...
...
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