Skip to content

Commit

Permalink
Merge pull request #1011 from AI4Bharat/Rahul-539
Browse files Browse the repository at this point in the history
Added search feature based on active status in user details tab in admin
  • Loading branch information
ishvindersethi22 authored Jul 3, 2024
2 parents f224de1 + 7b23c67 commit d33763b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/ui/pages/container/Admin/EditProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const EditProfile = (props) => {
</Select>
</FormControl>
</Grid>
<Grid item xs={12} sm={12} md={6} lg={6} xl={6} sx={{ mb: 2 }}>
{/* <Grid item xs={12} sm={12} md={6} lg={6} xl={6} sx={{ mb: 2 }}>
<FormControl sx={{ m: 1, minWidth: 210 }}>
<InputLabel id="demo-simple-select-helper-label">Active_status</InputLabel>
<Select
Expand All @@ -248,7 +248,7 @@ const EditProfile = (props) => {
<MenuItem value={false}>Not Active</MenuItem>
</Select>
</FormControl>
</Grid>
</Grid> */}
</Grid>

<Grid sx={{ textAlignLast: "end" }}>
Expand Down
18 changes: 11 additions & 7 deletions src/ui/pages/container/Admin/UserDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,16 @@ const UserDetail = (props) => {
el.first_name?.toLowerCase().includes(SearchUserDetail?.toLowerCase())
) {
return el;
}else if(
el.is_active?.toString()
?.toLowerCase()
.includes(SearchUserDetail?.toLowerCase())
){
// }else if(
// el.is_active?.toString()
// ?.toLowerCase()
// .includes(SearchUserDetail?.toLowerCase())
// ){
// return el;
}else if (
SearchUserDetail.toLowerCase() === "active" && el.is_active ||
SearchUserDetail.toLowerCase() === "inactive" && !el.is_active
) {
return el;
} else if (
el.last_name?.toLowerCase().includes(SearchUserDetail?.toLowerCase())
Expand Down Expand Up @@ -434,5 +439,4 @@ const UserDetail = (props) => {
</div>
);
};

export default UserDetail;
export default UserDetail;

0 comments on commit d33763b

Please sign in to comment.