Commit 9158d2b1 authored by Venkaiah Naidu Singamchetty's avatar Venkaiah Naidu Singamchetty

Merge branch 'apiserver' into 'master'

error msg modified

See merge request !90
parents f0945721 87ee9f68
......@@ -15,13 +15,13 @@ function LeftSidebar() {
useEffect(() => {
if(inputValue!==null){
if (inputValue !== null) {
const debounceTimeout = setTimeout(() => {
const data = {
reportees: userDetails.user.reportees,
page: (inputValue==="")?currPage:1,
page: (inputValue === "") ? currPage : 1,
perPage: 10,
searchText:inputValue
searchText: inputValue
};
dispatch(fetchReportees(data));
}, 1000);
......@@ -66,7 +66,7 @@ function LeftSidebar() {
{
(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"
......@@ -80,12 +80,15 @@ function LeftSidebar() {
</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 && (
reportees.length > 0 && pagesCount > 1 && (
<PaginationComponent
currentPage={currPage}
totalPages={pagesCount}
......
......@@ -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;
......@@ -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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment