mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
* #1259 - refresh tasklist when checklist is added * #1259 - updated readme to reflect changes * #1259 - fixed wrong rebase import
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user