#1259 - checklist task does not appear on tasklist after creation (#1435)

* #1259 - refresh tasklist when checklist is added

* #1259 - updated readme to reflect changes

* #1259 - fixed wrong rebase import
This commit is contained in:
Vito
2017-01-11 06:32:17 -08:00
committed by Maurizio Vitale
parent 6f24ebd6d4
commit 9e0536bca9
11 changed files with 81 additions and 23 deletions

View File

@@ -15,11 +15,11 @@
* limitations under the License.
*/
import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
import { Observer, Observable } from 'rxjs/Rx';
import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges, EventEmitter, Output } from '@angular/core';
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
import { TaskDetailsModel } from '../models/task-details.model';
import { Observer, Observable } from 'rxjs/Rx';
declare let dialogPolyfill: any;
@@ -41,6 +41,9 @@ export class ActivitiChecklist implements OnInit, OnChanges {
@Input()
assignee: string;
@Output()
checklistTaskCreated: EventEmitter<TaskDetailsModel> = new EventEmitter<TaskDetailsModel>();
@ViewChild('dialog')
dialog: any;
@@ -116,6 +119,7 @@ export class ActivitiChecklist implements OnInit, OnChanges {
this.activitiTaskList.addTask(newTask).subscribe(
(res: TaskDetailsModel) => {
this.checklist.push(res);
this.checklistTaskCreated.emit(res);
},
(err) => {
this.logService.error(err);