@zeniai/client-epic-state 4.10.26 → 4.10.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -189,8 +189,8 @@ const getCategoryValueForTaskList = (key, task) => {
189
189
  return (_a = task.tag) === null || _a === void 0 ? void 0 : _a.code;
190
190
  case 'status':
191
191
  return task.status.code;
192
- case 'createdBy':
193
- return task.createdBy;
192
+ case 'creationDate':
193
+ return task.createTime;
194
194
  case 'assignee':
195
195
  return task.assignees;
196
196
  default:
@@ -18,12 +18,12 @@ export interface TaskFilterCategory {
18
18
  values: (string | ZeniDate)[];
19
19
  valuesCombinationOperator: 'ANY';
20
20
  }
21
- export declare type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | 'createdBy' | 'priority' | 'tag';
21
+ export declare type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | 'creationDate' | 'priority' | 'tag';
22
22
  export interface TaskListUIState extends SpendManagementUIState {
23
23
  sortKey: TaskListViewSortKey;
24
24
  }
25
- export declare const ALL_TASK_LIST_SORT_KEYS: readonly ["name", "dueDate", "assignee", "tag", "status", "priority", "createdBy"];
26
- export declare const toTaskListSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "createdBy" | "assignee" | "tag";
25
+ export declare const ALL_TASK_LIST_SORT_KEYS: readonly ["name", "dueDate", "assignee", "creationDate", "tag", "status", "priority"];
26
+ export declare const toTaskListSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "creationDate" | "assignee" | "tag";
27
27
  export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
28
28
  export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
29
29
  export interface TaskListFilterCategoryOption {
@@ -6,10 +6,10 @@ exports.ALL_TASK_LIST_SORT_KEYS = [
6
6
  'name',
7
7
  'dueDate',
8
8
  'assignee',
9
+ 'creationDate',
9
10
  'tag',
10
11
  'status',
11
12
  'priority',
12
- 'createdBy',
13
13
  ];
14
14
  const toTaskListSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_TASK_LIST_SORT_KEYS);
15
15
  exports.toTaskListSortKeyType = toTaskListSortKeyType;
@@ -18,10 +18,10 @@ exports.TASK_LIST_FILTER_CATEGORIES = [
18
18
  { value: 'priority', type: 'dropdown', multiple: true },
19
19
  { value: 'tag', type: 'dropdown', multiple: true },
20
20
  { value: 'dueDate', type: 'dateRange', multiple: false },
21
- { value: 'createdBy', type: 'user', multiple: true },
22
21
  {
23
22
  value: 'assignee',
24
23
  type: 'user',
25
24
  multiple: true,
26
25
  },
26
+ { value: 'creationDate', type: 'dateRange', multiple: true },
27
27
  ];
@@ -6,7 +6,6 @@ import { TaskListFilters, TaskListUIState } from './taskList';
6
6
  import { UserListSelectorView } from '../../userListView/userListViewSelector';
7
7
  export interface TaskWithUserDetails extends Task {
8
8
  assigneeUsers: UserAndRole[];
9
- createdByUser?: UserAndRole;
10
9
  }
11
10
  export interface TaskListSelectorView extends SelectorView {
12
11
  taskList: TaskWithUserDetails[];
@@ -21,8 +21,7 @@ const getAllTasks = (state) => {
21
21
  const assigneeUsers = task.assignees
22
22
  .map((userId) => (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, userId))
23
23
  .filter((value) => value != null);
24
- const createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, task.createdBy);
25
- return Object.assign(Object.assign({}, task), { assigneeUsers, createdByUser });
24
+ return Object.assign(Object.assign({}, task), { assigneeUsers });
26
25
  }
27
26
  return undefined;
28
27
  })
@@ -32,18 +31,18 @@ const getAllTasks = (state) => {
32
31
  const sortOrder = (0, sortOrderPayload_1.getSortOrder)(taskListState.uiState.sortOrder);
33
32
  const filteredTaskList = (0, spendManagementFilterHelpers_1.applyAdvancedFiltersOnList)('task_management', searchedTaskList, taskListState.filters);
34
33
  const cardsInOrder = (0, orderBy_1.default)(filteredTaskList, (task) => {
35
- var _a, _b, _c;
34
+ var _a, _b;
36
35
  switch (sortKey) {
37
36
  case 'dueDate':
38
37
  return task.dueDate;
38
+ case 'creationDate':
39
+ return task.createTime;
39
40
  case 'tag':
40
41
  return (_b = (_a = task.tag) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '';
41
42
  case 'status':
42
43
  return task.status.name;
43
44
  case 'priority':
44
45
  return taskState_1.ALL_PRORITY_CODE.indexOf(task.priority.code);
45
- case 'createdBy':
46
- return (_c = task.createdByUser) === null || _c === void 0 ? void 0 : _c.user.firstName;
47
46
  case 'name':
48
47
  default:
49
48
  return task.name.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.26",
3
+ "version": "4.10.28",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",