web: People: Changed setup filter EmployeeStatus

This commit is contained in:
Alexey Safronov 2019-09-27 17:06:14 +03:00
parent 2d0ca402c8
commit 4f5b3af681
2 changed files with 9 additions and 4 deletions

View File

@ -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);

View File

@ -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;