diff --git a/products/ASC.People/Client/src/store/people/actions.js b/products/ASC.People/Client/src/store/people/actions.js index 744a8553ff..36a42c7da8 100644 --- a/products/ASC.People/Client/src/store/people/actions.js +++ b/products/ASC.People/Client/src/store/people/actions.js @@ -11,7 +11,8 @@ import { SORT_BY, SORT_ORDER, PAGE, - PAGE_COUNT + PAGE_COUNT, + EmployeeStatus } from "../../helpers/constants"; export const SET_GROUPS = "SET_GROUPS"; @@ -167,7 +168,12 @@ export function fetchPeopleByFilter(dispatch, filter) { } export async function fetchPeopleAsync(dispatch, filter = null) { - let filterData = (filter && filter.clone()) || Filter.getDefault(); + let filterData = (filter && filter.clone()); + + if(!filterData) { + filterData = Filter.getDefault(); + filterData.employeeStatus = EmployeeStatus.Active; + } const usersResp = await api.getUserList(filterData); diff --git a/products/ASC.People/Client/src/store/people/filter.js b/products/ASC.People/Client/src/store/people/filter.js index d050995cb1..feb178b8e0 100644 --- a/products/ASC.People/Client/src/store/people/filter.js +++ b/products/ASC.People/Client/src/store/people/filter.js @@ -1,12 +1,11 @@ import { toUrlParams } from "../services/converter"; -import { EmployeeStatus } from "../../helpers/constants"; const DEFAULT_PAGE = 0; const DEFAULT_PAGE_COUNT = 25; const DEFAULT_TOTAL = 0; const DEFAULT_SORT_BY = "firstname"; const DEFAULT_SORT_ORDER = "ascending"; -const DEFAULT_EMPLOYEE_STATUS = EmployeeStatus.Active; +const DEFAULT_EMPLOYEE_STATUS = null; const DEFAULT_ACTIVATION_STATUS = null; const DEFAULT_ROLE = null; const DEFAULT_SEARCH = null;