[ADF-3274] people widget instead of the people list (#3582)

* people list added

* tests added

* style fix

* Update start-task.component.ts

Use correct import

* Update people.widget.spec.ts

add the async

* peopleSelected test fixed
This commit is contained in:
Maurizio Vitale
2018-07-23 09:23:33 +01:00
committed by Eugenio Romano
parent 855fdd8f48
commit 0274088114
7 changed files with 63 additions and 9 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { LogService, UserPreferencesService, UserProcessModel } from '@alfresco/adf-core';
import { LogService, UserPreferencesService, UserProcessModel, FormFieldModel, FormModel } from '@alfresco/adf-core';
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '@alfresco/adf-core';
@@ -68,6 +68,8 @@ export class StartTaskComponent implements OnInit {
dateError: boolean;
field: FormFieldModel;
/**
* Constructor
* @param auth
@@ -81,6 +83,7 @@ export class StartTaskComponent implements OnInit {
}
ngOnInit() {
this.field = new FormFieldModel(new FormModel(), {id: this.assigneeId, value: this.assigneeId, placeholder: 'Assignee'});
this.preferences.locale$.subscribe((locale) => {
this.dateAdapter.setLocale(locale);
});
@@ -110,6 +113,10 @@ export class StartTaskComponent implements OnInit {
}
}
getAssigneeId(userId) {
this.assigneeId = userId;
}
private attachForm(taskId: string, formKey: number): Observable<any> {
let response = Observable.of();
if (taskId && formKey) {