mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* #1517 - ADF-163 - Fixed wrong behaviour when task is created on the same selected filter * 1517 - removed consecutives blank lines
This commit is contained in:
@@ -158,6 +158,8 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
||||
if (filteredFilterList.length > 0) {
|
||||
let myTaskFilter = filteredFilterList.find(filter => filter.name === 'My Tasks');
|
||||
this.currentFilter = myTaskFilter ? myTaskFilter : filteredFilterList[0];
|
||||
this.currentFilter.landingTaskId = taskId;
|
||||
this.filterClick.emit(this.currentFilter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -15,9 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, Output, ContentChild, AfterContentInit, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
Output,
|
||||
ContentChild,
|
||||
AfterContentInit,
|
||||
EventEmitter,
|
||||
OnChanges,
|
||||
SimpleChanges
|
||||
} from '@angular/core';
|
||||
import { AlfrescoTranslationService, LogService, DataColumnListComponent } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow, DataColumn } from 'ng2-alfresco-datatable';
|
||||
import {
|
||||
ObjectDataTableAdapter,
|
||||
DataTableAdapter,
|
||||
DataRowEvent,
|
||||
ObjectDataRow,
|
||||
DataColumn
|
||||
} from 'ng2-alfresco-datatable';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
|
||||
@@ -124,7 +139,7 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
let sort = changes['sort'];
|
||||
let name = changes['name'];
|
||||
let assignment = changes['assignment'];
|
||||
|
||||
let landingTaskId = changes['landingTaskId'];
|
||||
if (appId && appId.currentValue) {
|
||||
changed = true;
|
||||
} else if (processDefinitionKey && processDefinitionKey.currentValue) {
|
||||
@@ -137,6 +152,8 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
changed = true;
|
||||
} else if (assignment && assignment.currentValue) {
|
||||
changed = true;
|
||||
} else if (landingTaskId && landingTaskId.currentValue) {
|
||||
changed = true;
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
@@ -196,7 +213,7 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
if (!this.isListEmpty()) {
|
||||
let rows = this.data.getRows();
|
||||
if (rows.length > 0) {
|
||||
let dataRow = rows.find(row => row.getValue('id') === taskIdToSelect) || rows[0];
|
||||
let dataRow = rows.find(row => row.getValue('id') === taskIdToSelect) || rows[0];
|
||||
this.data.selectedRow = dataRow;
|
||||
this.currentInstanceId = dataRow.getValue('id');
|
||||
}
|
||||
|
@@ -61,6 +61,7 @@ export class FilterRepresentationModel {
|
||||
icon: string;
|
||||
filter: FilterParamRepresentationModel;
|
||||
index: number;
|
||||
landingTaskId: string;
|
||||
|
||||
constructor(obj?: any) {
|
||||
this.appId = obj && obj.appId || null;
|
||||
@@ -69,6 +70,7 @@ export class FilterRepresentationModel {
|
||||
this.icon = obj && obj.icon || null;
|
||||
this.filter = new FilterParamRepresentationModel(obj.filter);
|
||||
this.index = obj && obj.index;
|
||||
this.landingTaskId = obj && obj.landingTaskId;
|
||||
}
|
||||
|
||||
hasFilter() {
|
||||
|
Reference in New Issue
Block a user