[ADF-3812] Add multi selection and roles filtering to adf-cloud-people component (#4068)

* [ADF-3812] Added multiple user selection and user pre-selection

* [ADF-3812] Added tests

* [ADF-3812] Added jsdoc

* [ADF-3812] Improved variable naming

* [ADF-3812] Improved mode selection

* [ADF-3812] Changed input name and emit logic

* [ADF-3812] Used modified emitter name in start task

* [ADF-3812] Improved default role selection

* Use the new strategy to fetch the authorized users

* * Fixed pre-selection in single mode

* * Added invalid selection validation

* * Added start task assignee validation

* * Improved preset loading

* * Improved tests

* * Added test to validate default assignee

* * Added methods to check user has access to an app

* * Added app access to people cloud and start task

* * Refactored methods and removed unused input - showCurrentUser

* * Added tests

* * Changed service names and removed unwated services

* * Used formControl error instead of manual error flag

* * Used new hasError method of people component inside start task

* * Improved tests

* * Updated callCustomApi call signature

* * Added documentation

* * Disabled search until clientId is retrieved

* * Changed realm name

* * Added jsdoc for service methods

* Remove the useless doc
This commit is contained in:
Deepak Paul
2019-01-14 19:20:19 +05:30
committed by Eugenio Romano
parent 46150a65f2
commit f08ad08d0f
10 changed files with 630 additions and 151 deletions

View File

@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, OnDestroy } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, OnDestroy, ViewChild } from '@angular/core';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '@alfresco/adf-core';
import moment from 'moment-es6';
@@ -29,6 +29,7 @@ import {
IdentityUserService,
IdentityUserModel
} from '@alfresco/adf-core';
import { PeopleCloudComponent } from './people-cloud/people-cloud.component';
@Component({
selector: 'adf-cloud-start-task',
@@ -70,6 +71,9 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
@ViewChild('peopleInput')
assignee: PeopleCloudComponent;
users$: Observable<any[]>;
taskId: string;