diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/TaskController.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/TaskController.java index 16a86007f..30e7da2cc 100644 --- a/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/TaskController.java +++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/TaskController.java @@ -63,7 +63,9 @@ public class TaskController extends AbstractPagingController { private static final String STATE_VALUE_READY = "READY"; private static final String PRIORITY = "priority"; private static final String NAME = "name"; + private static final String NAME_LIKE = "name-like"; private static final String OWNER = "owner"; + private static final String OWNER_LIKE = "owner-like"; private static final String DOMAIN = "domain"; private static final String WORKBASKET_ID = "workbasket-id"; private static final String WORKBASKET_KEY = "workbasket-key"; @@ -219,6 +221,10 @@ public class TaskController extends AbstractPagingController { taskQuery.nameIn(names); params.remove(NAME); } + if (params.containsKey(NAME_LIKE)) { + taskQuery.nameLike(LIKE + params.get(NAME_LIKE).get(0) + LIKE); + params.remove(NAME_LIKE); + } if (params.containsKey(PRIORITY)) { String[] prioritiesInString = extractCommaSeparatedFields(params.get(PRIORITY)); int[] priorities = extractPriorities(prioritiesInString); @@ -262,6 +268,10 @@ public class TaskController extends AbstractPagingController { taskQuery.ownerIn(owners); params.remove(OWNER); } + if (params.containsKey(OWNER_LIKE)) { + taskQuery.ownerLike(LIKE + params.get(OWNER_LIKE).get(0) + LIKE); + params.remove(OWNER_LIKE); + } if (params.containsKey(POR_COMPANY)) { String[] companies = extractCommaSeparatedFields(params.get(POR_COMPANY)); taskQuery.primaryObjectReferenceCompanyIn(companies); diff --git a/web/src/app/shared/filter/filter.component.html b/web/src/app/shared/filter/filter.component.html index e74fea98d..8062b5390 100644 --- a/web/src/app/shared/filter/filter.component.html +++ b/web/src/app/shared/filter/filter.component.html @@ -65,14 +65,24 @@
-
- +
-
\ No newline at end of file + diff --git a/web/src/app/shared/filter/filter.component.scss b/web/src/app/shared/filter/filter.component.scss index 261ce9b40..5f2f4692f 100644 --- a/web/src/app/shared/filter/filter.component.scss +++ b/web/src/app/shared/filter/filter.component.scss @@ -23,3 +23,11 @@ row.padding { .filter-list > li { padding-top: 5px; } + +.blue { + color: #2e9eca; +} + +button.btn.btn-default.pull-right.margin-right { + margin-top: 1px; +} diff --git a/web/src/app/shared/filter/filter.component.ts b/web/src/app/shared/filter/filter.component.ts index 16ceddfa0..69ea5eebc 100644 --- a/web/src/app/shared/filter/filter.component.ts +++ b/web/src/app/shared/filter/filter.component.ts @@ -13,6 +13,9 @@ export class FilterComponent implements OnInit { @Input() allTypes: Map = new Map([['ALL', 'All'], ['PERSONAL', 'Personal'], ['GROUP', 'Group'], ['CLEARANCE', 'Clearance'], ['TOPIC', 'Topic']]); + @Input() allStates: Map = new Map([['ALL', 'All'], ['READY', 'Ready'], ['CLAIMED', 'Claimed'], + ['COMPLETED', 'Completed']]); + @Input() filterParams = { name: '', key: '', type: '', description: '', owner: '' }; @Input() filterType = TaskanaType.WORKBASKETS; @@ -24,9 +27,6 @@ export class FilterComponent implements OnInit { lastFilterKey: string; toggleDropDown = false; - constructor() { - } - ngOnInit(): void { this.initializeFilterModel(); if (this.filterParams) { @@ -39,6 +39,10 @@ export class FilterComponent implements OnInit { this.filter.filterParams.type = (type === ICONTYPES.ALL) ? '' : type; } + selectState(state: ICONTYPES) { + this.filter.filterParams.state = (state === 'ALL') ? '' : state; + } + clear() { for (const key of Object.keys(this.filterParams)) { this.filterParams[key] = ''; diff --git a/web/src/app/shared/util/query-parameters.ts b/web/src/app/shared/util/query-parameters.ts index 168028920..3c90283d6 100644 --- a/web/src/app/shared/util/query-parameters.ts +++ b/web/src/app/shared/util/query-parameters.ts @@ -14,7 +14,7 @@ export class TaskanaQueryParameters { static WORKBASKET_KEY = 'workbasket-key'; static KEYLIKE = 'key-like'; static PRIORITY = 'priority'; - static STATELIKE = 'state-like'; + static STATE = 'state'; static WORKBASKET_ID = 'workbasket-id'; static TASK_PRIMARY_OBJ_REF_TYPE_LIKE = 'por.type'; static TASK_PRIMARY_OBJ_REF_VALUE_LIKE = 'por.value'; @@ -54,9 +54,9 @@ export class TaskanaQueryParameters { workbasketKeyLike: string = undefined, basketId: string = undefined, priority: string = undefined, - stateLike: string = undefined, + state: string = undefined, objRefTypeLike: string = undefined, - objRefValueLike: string = undefined, + objRefValueLike: string = undefined ): string { let query = '?'; query += sortBy ? `${this.SORTBY}=${sortBy}&` : ''; @@ -68,7 +68,7 @@ export class TaskanaQueryParameters { query += ownerLike ? `${this.OWNERLIKE}=${ownerLike}&` : ''; query += basketId ? `${this.WORKBASKET_ID}=${basketId}&` : ''; query += priority ? `${this.PRIORITY}=${priority}&` : ''; - query += stateLike ? `${this.STATELIKE}=${stateLike}&` : ''; + query += state ? `${this.STATE}=${state}&` : ''; query += type ? `${this.TYPE}=${type}&` : ''; query += key ? `${this.KEY}=${key}&` : ''; query += keyLike ? `${this.KEYLIKE}=${keyLike}&` : ''; diff --git a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html index 3f840a38b..fa5857740 100644 --- a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html +++ b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html @@ -9,10 +9,10 @@ -
+
- @@ -37,13 +37,13 @@
Search by
-
    +
    • diff --git a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.scss b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.scss index d96d3fc31..d232f6b76 100644 --- a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.scss +++ b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.scss @@ -44,3 +44,19 @@ svg-icon.blue { padding-right: 5px; } } + +small.margin-right.blue-font { + margin-left: 4px; +} + +div.dropdown-menu ul { + padding: 15px; +} + +div.input-group { + margin-bottom: 1px; +} + +button.btn.btn-primary { + height: 34px; +}