mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1532] Assignee typeahead in start task form (#2839)
* people module directory restructuring * Extract PeopleSearchFieldComponent to reuse most part of it * Transform PeopleSearchFieldComponent to the form we want to reuse * People selector component, first try * Remove material grid from start-task.component, first part * Styling and i18n * clear button for deleting the selected assignee * Remove people preloading, remove combobox and update assigneeId * Fix existing tests * Add new tests * Final css fixes
This commit is contained in:
committed by
Eugenio Romano
parent
74cd0fab33
commit
9bd18c9770
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LogService, PeopleProcessService, UserPreferencesService, UserProcessModel } from '@alfresco/adf-core';
|
||||
import { LogService, UserPreferencesService, UserProcessModel } 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';
|
||||
@@ -52,8 +52,6 @@ export class StartTaskComponent implements OnInit {
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
people: UserProcessModel[] = [];
|
||||
|
||||
startTaskmodel: StartTaskModel = new StartTaskModel();
|
||||
|
||||
forms: Form[];
|
||||
@@ -73,7 +71,6 @@ export class StartTaskComponent implements OnInit {
|
||||
* @param taskService
|
||||
*/
|
||||
constructor(private taskService: TaskListService,
|
||||
private peopleService: PeopleProcessService,
|
||||
private dateAdapter: DateAdapter<Moment>,
|
||||
private preferences: UserPreferencesService,
|
||||
private logService: LogService) {
|
||||
@@ -84,7 +81,6 @@ export class StartTaskComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
this.loadFormsTask();
|
||||
this.getUsers();
|
||||
}
|
||||
|
||||
public start(): void {
|
||||
@@ -140,15 +136,6 @@ export class StartTaskComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
private getUsers(): void {
|
||||
this.peopleService.getWorkflowUsers().subscribe((users) => {
|
||||
this.people = users;
|
||||
}, (err) => {
|
||||
this.error.emit(err);
|
||||
this.logService.error('Could not load users');
|
||||
});
|
||||
}
|
||||
|
||||
public isUserNameEmpty(user: UserProcessModel): boolean {
|
||||
return !user || (this.isEmpty(user.firstName) && this.isEmpty(user.lastName));
|
||||
}
|
||||
|
Reference in New Issue
Block a user