diff --git a/client/src/components/Onboarding/OnboardingAdmin.jsx b/client/src/components/Onboarding/OnboardingAdmin.jsx index 73f8508e7..de693217c 100644 --- a/client/src/components/Onboarding/OnboardingAdmin.jsx +++ b/client/src/components/Onboarding/OnboardingAdmin.jsx @@ -6,6 +6,7 @@ import { SectionMessage, Message, Paginator, + Checkbox, } from '_common'; import { v4 as uuidv4 } from 'uuid'; import PropTypes from 'prop-types'; @@ -233,11 +234,24 @@ OnboardingAdminList.propTypes = { const OnboardingAdmin = () => { const dispatch = useDispatch(); const [eventLogModalParams, setEventLogModalParams] = useState(null); + const [showIncompleteOnly, setShowIncompleteOnly] = useState(false); // Add state to set the incomplete + + const toggleShowIncomplete = () => { + setShowIncompleteOnly((prev) => !prev); + }; const { users, offset, limit, total, query, loading, error } = useSelector( (state) => state.onboarding.admin ); + const filteredUsers = users.filter((user) => { + if (showIncompleteOnly) { + return !user.setupComplete; + } else { + return true; + } + }); + const paginationCallback = useCallback( (page) => { dispatch({ @@ -289,22 +303,39 @@ const OnboardingAdmin = () => {
Administrator Controls
- +
+ + +
- {users.length === 0 && ( + {filteredUsers.length === 0 && (
No users to show.
)}
- {users.length > 0 && ( + {filteredUsers.length > 0 && ( )}
- {users.length > 0 && ( + {filteredUsers.length > 0 && (