mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[AAE-1152] Add People and Group component in the AAE Forms (#5314)
* firt version groupo component widget * fix group * fix compilation issue * fix compilation issue * fix compilation issue * fix compilation issue * fix problem update script * multiple browser ps cloud * add field assignment * add field in form model * no need subobject we need an issue to refactor the field model * no need subobject we need an issue to refactor the field model * fix unit test * remove title modify * revert * fix lint * exclude AAE-1179 * exclude tooltip e2e
This commit is contained in:
parent
a63e487637
commit
703b96c9b0
@ -168,7 +168,6 @@ export const appRoutes: Routes = [
|
||||
path: 'cloud',
|
||||
canActivate: [AuthGuardSsoRoleService],
|
||||
data: { roles: ['ACTIVITI_USER'], redirectUrl: '/error/403' },
|
||||
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormFieldModel, NotificationService, FormRenderingService, CoreAutomationService, FormModel } from '@alfresco/adf-core';
|
||||
import { FormCloudService, UploadCloudWidgetComponent } from '@alfresco/adf-process-services-cloud';
|
||||
import { FormFieldModel, NotificationService, CoreAutomationService, FormModel } from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '@alfresco/adf-process-services-cloud';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
@ -43,10 +43,8 @@ export class FormCloudDemoComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor(
|
||||
private notificationService: NotificationService,
|
||||
private formRenderingService: FormRenderingService,
|
||||
private formService: FormCloudService,
|
||||
private automationService: CoreAutomationService) {
|
||||
this.formRenderingService.setComponentTypeResolver('upload', () => UploadCloudWidgetComponent, true);
|
||||
}
|
||||
|
||||
logErrors(errorFields: FormFieldModel[]) {
|
||||
|
@ -39,7 +39,6 @@
|
||||
[validate]="peoplePreselectValidation"
|
||||
[appName]="peopleAppName"
|
||||
[roles]="peopleRoles"
|
||||
[appName]="peopleAppName"
|
||||
[title]="'ADF_TASK_LIST.START_TASK.FORM.LABEL.ASSIGNEE'"
|
||||
[mode]="peopleMode"></adf-cloud-people>
|
||||
</div>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 0 B |
@ -145,6 +145,7 @@ async function checkIfAppIsReleased(args: ConfigArgs, apiService: any, absentApp
|
||||
const projectList = await getAppProjects(args, apiService);
|
||||
let TIME = 5000;
|
||||
let noError = true;
|
||||
|
||||
for (let i = 0; i < absentApps.length; i++) {
|
||||
noError = true;
|
||||
const currentAbsentApp = absentApps[i];
|
||||
@ -152,8 +153,11 @@ async function checkIfAppIsReleased(args: ConfigArgs, apiService: any, absentApp
|
||||
return currentAbsentApp.name === currentApp.entry.name;
|
||||
});
|
||||
let projectRelease: any;
|
||||
|
||||
if (app === undefined) {
|
||||
|
||||
logger.warn('Missing project: Create the project for ' + currentAbsentApp.name);
|
||||
|
||||
try {
|
||||
const uploadedApp = await importProjectApp(args, apiService, currentAbsentApp);
|
||||
logger.warn('Project imported ' + currentAbsentApp.name);
|
||||
@ -161,16 +165,21 @@ async function checkIfAppIsReleased(args: ConfigArgs, apiService: any, absentApp
|
||||
projectRelease = await releaseProject(args, apiService, uploadedApp);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.info(`error status ${error.status}`);
|
||||
|
||||
if (error.status !== 409) {
|
||||
logger.info(`Not possible to upload the project ${app.name} status : ${JSON.stringify(error.status)} ${JSON.stringify(error.response.text)}`);
|
||||
process.exit(1);
|
||||
} else {
|
||||
logger.error(`Not possible to upload the project because inconsistency CS - Modelling try to delete manually the node`);
|
||||
noError = false;
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
TIME += 5000;
|
||||
|
||||
logger.info('Project ' + app.entry.name + ' found');
|
||||
|
||||
const projectReleaseList = await getReleaseAppProjectId(args, apiService, app.entry.id);
|
||||
@ -192,6 +201,7 @@ async function checkIfAppIsReleased(args: ConfigArgs, apiService: any, absentApp
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (noError) {
|
||||
await checkDescriptorExist(args, apiService, currentAbsentApp.name);
|
||||
await sleep(TIME);
|
||||
|
@ -79,6 +79,11 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
emptyOption: FormFieldOption;
|
||||
validationSummary: ErrorMessageModel;
|
||||
|
||||
// People and Group Options
|
||||
appName: string;
|
||||
roles: string[];
|
||||
mode: string;
|
||||
|
||||
get value(): any {
|
||||
return this._value;
|
||||
}
|
||||
@ -168,6 +173,11 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
this._value = this.parseValue(json);
|
||||
this.validationSummary = new ErrorMessageModel();
|
||||
|
||||
// People and Group Options
|
||||
this.appName = json.appName;
|
||||
this.roles = json.roles;
|
||||
this.mode = json.mode;
|
||||
|
||||
if (json.placeholder && json.placeholder !== '' && json.placeholder !== 'null') {
|
||||
this.placeholder = json.placeholder;
|
||||
}
|
||||
@ -344,9 +354,9 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
This is needed due to Activiti issue related to reading radio button values as value string
|
||||
but saving back as object: { id: <id>, name: <name> }
|
||||
*/
|
||||
const rbEntry: FormFieldOption[] = this.options.filter((opt) => opt.id === this.value);
|
||||
if (rbEntry.length > 0) {
|
||||
this.form.values[this.id] = rbEntry[0];
|
||||
const radioButton: FormFieldOption[] = this.options.filter((opt) => opt.id === this.value);
|
||||
if (radioButton.length > 0) {
|
||||
this.form.values[this.id] = radioButton[0];
|
||||
}
|
||||
break;
|
||||
case FormFieldTypes.UPLOAD:
|
||||
@ -358,9 +368,9 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
}
|
||||
break;
|
||||
case FormFieldTypes.TYPEAHEAD:
|
||||
const taEntry: FormFieldOption[] = this.options.filter((opt) => opt.id === this.value || opt.name === this.value);
|
||||
if (taEntry.length > 0) {
|
||||
this.form.values[this.id] = taEntry[0];
|
||||
const typeAheadEntry: FormFieldOption[] = this.options.filter((opt) => opt.id === this.value || opt.name === this.value);
|
||||
if (typeAheadEntry.length > 0) {
|
||||
this.form.values[this.id] = typeAheadEntry[0];
|
||||
} else if (this.options.length > 0) {
|
||||
this.form.values[this.id] = null;
|
||||
}
|
||||
|
@ -44,4 +44,5 @@ import { TemplateModule, CoreModule } from '@alfresco/adf-core';
|
||||
AppDetailsCloudComponent
|
||||
]
|
||||
})
|
||||
export class AppListCloudModule { }
|
||||
export class AppListCloudModule {
|
||||
}
|
||||
|
@ -38,9 +38,11 @@ import {
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
import { DropdownCloudWidgetComponent } from './dropdown-cloud/dropdown-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from './attach-file-cloud-widget/attach-file-cloud-widget.component';
|
||||
import { DateCloudWidgetComponent } from './date-cloud/date-cloud.widget';
|
||||
import { DropdownCloudWidgetComponent } from './widgets/dropdown/dropdown-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from './widgets/attach-file/attach-file-cloud-widget.component';
|
||||
import { DateCloudWidgetComponent } from './widgets/date/date-cloud.widget';
|
||||
import { PeopleCloudWidgetComponent } from './widgets/people/people-cloud.widget';
|
||||
import { GroupCloudWidgetComponent } from './widgets/group/group-cloud.widget';
|
||||
import { TaskDetailsCloudModel } from '../../task/start-task/models/task-details-cloud.model';
|
||||
|
||||
@Component({
|
||||
@ -123,6 +125,8 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.formRenderingService.setComponentTypeResolver('upload', () => AttachFileCloudWidgetComponent, true);
|
||||
this.formRenderingService.setComponentTypeResolver('dropdown', () => DropdownCloudWidgetComponent, true);
|
||||
this.formRenderingService.setComponentTypeResolver('date', () => DateCloudWidgetComponent, true);
|
||||
this.formRenderingService.setComponentTypeResolver('people', () => PeopleCloudWidgetComponent, true);
|
||||
this.formRenderingService.setComponentTypeResolver('functional-group', () => GroupCloudWidgetComponent, true);
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ContentCloudNodeSelectorService } from '../../services/content-cloud-node-selector.service';
|
||||
import { ProcessCloudContentService } from '../../services/process-cloud-content.service';
|
||||
import { ContentCloudNodeSelectorService } from '../../../services/content-cloud-node-selector.service';
|
||||
import { ProcessCloudContentService } from '../../../services/process-cloud-content.service';
|
||||
import { AttachFileCloudWidgetComponent } from './attach-file-cloud-widget.component';
|
||||
import {
|
||||
setupTestBed,
|
||||
@ -29,13 +29,13 @@ import {
|
||||
FormService,
|
||||
DownloadService
|
||||
} from '@alfresco/adf-core';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ContentModule } from '@alfresco/adf-content-services';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { FormCloudModule } from '../../form-cloud.module';
|
||||
import { FormCloudModule } from '../../../form-cloud.module';
|
||||
|
||||
describe('AttachFileCloudWidgetComponent', () => {
|
||||
let widget: AttachFileCloudWidgetComponent;
|
@ -27,9 +27,9 @@ import {
|
||||
baseHost
|
||||
} from '@alfresco/adf-core';
|
||||
import { Node, RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
import { ContentCloudNodeSelectorService } from '../../services/content-cloud-node-selector.service';
|
||||
import { ProcessCloudContentService } from '../../services/process-cloud-content.service';
|
||||
import { UploadCloudWidgetComponent } from '../upload-cloud.widget';
|
||||
import { ContentCloudNodeSelectorService } from '../../../services/content-cloud-node-selector.service';
|
||||
import { ProcessCloudContentService } from '../../../services/process-cloud-content.service';
|
||||
import { UploadCloudWidgetComponent } from './upload-cloud.widget';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-attach-file-cloud-widget',
|
@ -22,7 +22,7 @@ import { Node } from '@alfresco/js-api';
|
||||
import { Observable, from } from 'rxjs';
|
||||
import { mergeMap } from 'rxjs/operators';
|
||||
import { WidgetComponent, baseHost, LogService, FormService, ThumbnailService, ContentLinkModel, NotificationService } from '@alfresco/adf-core';
|
||||
import { ProcessCloudContentService } from '../services/process-cloud-content.service';
|
||||
import { ProcessCloudContentService } from '../../../services/process-cloud-content.service';
|
||||
|
||||
@Component({
|
||||
selector: 'upload-cloud-widget',
|
@ -19,7 +19,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { DateCloudWidgetComponent } from './date-cloud.widget';
|
||||
import { setupTestBed, FormFieldModel, FormModel, CoreModule } from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../../services/form-cloud.service';
|
||||
import { FormCloudService } from '../../../services/form-cloud.service';
|
||||
import moment from 'moment-es6';
|
||||
|
||||
describe('DateWidgetComponent', () => {
|
@ -21,7 +21,7 @@ import { of } from 'rxjs';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { DropdownCloudWidgetComponent } from './dropdown-cloud.widget';
|
||||
import { FormService, WidgetVisibilityService, FormFieldOption, setupTestBed, FormFieldModel, FormModel, CoreModule } from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../../services/form-cloud.service';
|
||||
import { FormCloudService } from '../../../services/form-cloud.service';
|
||||
|
||||
describe('DropdownCloudWidgetComponent', () => {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { baseHost, WidgetComponent, FormService, LogService, FormFieldOption } from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../../services/form-cloud.service';
|
||||
import { FormCloudService } from '../../../services/form-cloud.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
@ -0,0 +1,14 @@
|
||||
<div class="adf-dropdown-widget {{field.className}}"
|
||||
[class.adf-invalid]="!field.isValid" [class.adf-readonly]="field.readOnly">
|
||||
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span
|
||||
*ngIf="isRequired()">*</span></label>
|
||||
<adf-cloud-group [mode]="mode"
|
||||
[roles]="roles"
|
||||
[appName]="appName"
|
||||
[preSelectGroups]="preSelectGroup">
|
||||
</adf-cloud-group>
|
||||
<error-widget [error]="field.validationSummary"></error-widget>
|
||||
<error-widget class="adf-dropdown-required-message" *ngIf="isInvalidFieldRequired()"
|
||||
required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>
|
||||
</div>
|
||||
|
@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { baseHost, WidgetComponent, IdentityGroupCountModel } from '@alfresco/adf-core';
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
@Component({
|
||||
selector: 'group-cloud-widget',
|
||||
templateUrl: './group-cloud.widget.html',
|
||||
host: baseHost,
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit {
|
||||
|
||||
appName: string;
|
||||
roles: string[];
|
||||
mode: string;
|
||||
preSelectGroup: IdentityGroupCountModel[];
|
||||
|
||||
ngOnInit() {
|
||||
if (this.field) {
|
||||
this.appName = this.field.appName;
|
||||
this.roles = this.field.roles;
|
||||
this.mode = this.field.mode;
|
||||
this.preSelectGroup = this.field.value;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<div class="adf-dropdown-widget {{field.className}}"
|
||||
[class.adf-invalid]="!field.isValid" [class.adf-readonly]="field.readOnly">
|
||||
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span *ngIf="isRequired()">*</span></label>
|
||||
<adf-cloud-people
|
||||
[preSelectUsers]="preSelectUsers"
|
||||
[validate]="true"
|
||||
[appName]="appName"
|
||||
[roles]="roles"
|
||||
[mode]="mode">
|
||||
</adf-cloud-people>
|
||||
<error-widget [error]="field.validationSummary"></error-widget>
|
||||
<error-widget class="adf-dropdown-required-message" *ngIf="isInvalidFieldRequired()"
|
||||
required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>
|
||||
</div>
|
||||
|
@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { baseHost, WidgetComponent, IdentityUserModel } from '@alfresco/adf-core';
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
@Component({
|
||||
selector: 'people-cloud-widget',
|
||||
templateUrl: './people-cloud.widget.html',
|
||||
host: baseHost,
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit {
|
||||
|
||||
appName: string;
|
||||
roles: string[];
|
||||
mode: string;
|
||||
preSelectUsers: IdentityUserModel[];
|
||||
|
||||
ngOnInit() {
|
||||
if (this.field) {
|
||||
this.appName = this.field.appName;
|
||||
this.roles = this.field.roles;
|
||||
this.mode = this.field.mode;
|
||||
this.preSelectUsers = this.field.value;
|
||||
}
|
||||
}
|
||||
}
|
@ -20,16 +20,22 @@ import { CommonModule } from '@angular/common';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { TemplateModule, FormBaseModule, PipeModule, CoreModule, FormRenderingService } from '@alfresco/adf-core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { UploadCloudWidgetComponent } from './components/upload-cloud.widget';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { FormCloudComponent } from './components/form-cloud.component';
|
||||
import { FormDefinitionSelectorCloudComponent } from './components/form-definition-selector-cloud.component';
|
||||
import { FormDefinitionSelectorCloudService } from './services/form-definition-selector-cloud.service';
|
||||
import { FormCustomOutcomesComponent } from './components/form-cloud-custom-outcomes.component';
|
||||
import { DropdownCloudWidgetComponent } from './components/dropdown-cloud/dropdown-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from './components/attach-file-cloud-widget/attach-file-cloud-widget.component';
|
||||
import { ContentNodeSelectorModule } from '@alfresco/adf-content-services';
|
||||
import { DateCloudWidgetComponent } from './components/date-cloud/date-cloud.widget';
|
||||
|
||||
import { DateCloudWidgetComponent } from './components/widgets/date/date-cloud.widget';
|
||||
import { DropdownCloudWidgetComponent } from './components/widgets/dropdown/dropdown-cloud.widget';
|
||||
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
||||
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
||||
|
||||
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
||||
import { PeopleCloudModule } from '../people/people-cloud.module';
|
||||
import { GroupCloudModule } from '../group/group-cloud.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -42,7 +48,9 @@ import { DateCloudWidgetComponent } from './components/date-cloud/date-cloud.wid
|
||||
ReactiveFormsModule,
|
||||
FormBaseModule,
|
||||
CoreModule,
|
||||
ContentNodeSelectorModule
|
||||
ContentNodeSelectorModule,
|
||||
PeopleCloudModule,
|
||||
GroupCloudModule
|
||||
],
|
||||
declarations: [
|
||||
FormCloudComponent,
|
||||
@ -51,7 +59,9 @@ import { DateCloudWidgetComponent } from './components/date-cloud/date-cloud.wid
|
||||
FormCustomOutcomesComponent,
|
||||
DropdownCloudWidgetComponent,
|
||||
AttachFileCloudWidgetComponent,
|
||||
DateCloudWidgetComponent
|
||||
DateCloudWidgetComponent,
|
||||
PeopleCloudWidgetComponent,
|
||||
GroupCloudWidgetComponent
|
||||
],
|
||||
providers: [
|
||||
FormDefinitionSelectorCloudService,
|
||||
@ -61,7 +71,9 @@ import { DateCloudWidgetComponent } from './components/date-cloud/date-cloud.wid
|
||||
UploadCloudWidgetComponent,
|
||||
DropdownCloudWidgetComponent,
|
||||
AttachFileCloudWidgetComponent,
|
||||
DateCloudWidgetComponent
|
||||
DateCloudWidgetComponent,
|
||||
PeopleCloudWidgetComponent,
|
||||
GroupCloudWidgetComponent
|
||||
],
|
||||
exports: [
|
||||
FormCloudComponent,
|
||||
|
@ -19,9 +19,7 @@ export * from './models/task-variable-cloud.model';
|
||||
export * from './models/form-definition-selector-cloud.model';
|
||||
|
||||
export * from './components/form-cloud.component';
|
||||
export * from './components/upload-cloud.widget';
|
||||
export * from './components/form-definition-selector-cloud.component';
|
||||
export * from './components/attach-file-cloud-widget/attach-file-cloud-widget.component';
|
||||
|
||||
export * from './services/form-cloud.service';
|
||||
export * from './services/form-definition-selector-cloud.service';
|
||||
|
@ -18,10 +18,10 @@
|
||||
import { PeopleCloudComponent } from './people-cloud.component';
|
||||
import { ComponentFixture, TestBed, async, tick, fakeAsync } from '@angular/core/testing';
|
||||
import { IdentityUserService, AlfrescoApiService, CoreModule, setupTestBed } from '@alfresco/adf-core';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { mockUsers } from '../../mock/user-cloud.mock';
|
||||
import { StartTaskCloudModule } from '../../start-task-cloud.module';
|
||||
import { mockUsers } from '../mock/user-cloud.mock';
|
||||
import { PeopleCloudModule } from '../people-cloud.module';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
@ -49,7 +49,7 @@ describe('PeopleCloudComponent', () => {
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
StartTaskCloudModule
|
||||
PeopleCloudModule
|
||||
],
|
||||
providers: [
|
||||
IdentityUserService
|
@ -0,0 +1,34 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const mockUsers = [
|
||||
{ id: 'fake-id-1', username: 'first-name-1 last-name-1', firstName: 'first-name-1', lastName: 'last-name-1', email: 'abc@xyz.com' },
|
||||
{ id: 'fake-id-2', username: 'first-name-2 last-name-2', firstName: 'first-name-2', lastName: 'last-name-2', email: 'abcd@xyz.com'},
|
||||
{ id: 'fake-id-3', username: 'first-name-3 last-name-3', firstName: 'first-name-3', lastName: 'last-name-3', email: 'abcde@xyz.com' }
|
||||
];
|
||||
|
||||
export const cloudMockUser = {
|
||||
id: 'fake-id-1', username: 'AssignedTaskUser', firstName: 'first-name-1', lastName: 'last-name-1', email: 'abc@xyz.com'
|
||||
};
|
||||
|
||||
export const mockRoles = [
|
||||
{ id: 'id-1', name: 'MOCK-ADMIN-ROLE'},
|
||||
{ id: 'id-2', name: 'MOCK-USER-ROLE'},
|
||||
{ id: 'id-3', name: 'MOCK_MODELER-ROLE' },
|
||||
{ id: 'id-4', name: 'MOCK-ROLE-1' },
|
||||
{ id: 'id-5', name: 'MOCK-ROLE-2'}
|
||||
];
|
@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PeopleCloudComponent } from './components/people-cloud.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { TemplateModule, CoreModule, PipeModule } from '@alfresco/adf-core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
PipeModule,
|
||||
TemplateModule,
|
||||
FlexLayoutModule,
|
||||
MaterialModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [PeopleCloudComponent],
|
||||
exports: [
|
||||
PeopleCloudComponent
|
||||
]
|
||||
})
|
||||
export class PeopleCloudModule {
|
||||
}
|
20
lib/process-services-cloud/src/lib/people/public-api.ts
Normal file
20
lib/process-services-cloud/src/lib/people/public-api.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './components/people-cloud.component';
|
||||
|
||||
export * from './people-cloud.module';
|
@ -29,6 +29,7 @@ import {
|
||||
PROCESS_FILTERS_SERVICE_TOKEN,
|
||||
TASK_FILTERS_SERVICE_TOKEN
|
||||
} from './services/public-api';
|
||||
import { PeopleCloudModule } from './people/people-cloud.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -37,6 +38,7 @@ import {
|
||||
ProcessCloudModule,
|
||||
TaskCloudModule,
|
||||
GroupCloudModule,
|
||||
PeopleCloudModule,
|
||||
FormCloudModule,
|
||||
TaskFormModule
|
||||
],
|
||||
@ -60,7 +62,8 @@ import {
|
||||
TaskCloudModule,
|
||||
GroupCloudModule,
|
||||
FormCloudModule,
|
||||
TaskFormModule
|
||||
TaskFormModule,
|
||||
PeopleCloudModule
|
||||
]
|
||||
})
|
||||
export class ProcessServicesCloudModule { }
|
||||
|
@ -1,10 +1,10 @@
|
||||
@import './../app/components/app-details-cloud.component';
|
||||
@import './../app/components/app-list-cloud.component';
|
||||
@import './../group/components/group-cloud.component';
|
||||
@import './../people/components/people-cloud.component.scss';
|
||||
@import './../process/process-list/components/process-list-cloud.component.scss';
|
||||
@import './../process/process-filters/components/edit-process-filter-cloud.component.scss';
|
||||
@import './../task/task-form/components/task-form-cloud.component';
|
||||
@import './../task/start-task/components/people-cloud/people-cloud.component.scss';
|
||||
@import './../task/start-task/components/start-task-cloud.component.scss';
|
||||
@import './../task/task-filters/components/edit-task-filter-cloud.component.scss';
|
||||
@import './../task/task-filters/components/task-filters-cloud.component.scss';
|
||||
|
@ -28,8 +28,8 @@ import {
|
||||
IdentityUserModel,
|
||||
UserPreferenceValues
|
||||
} from '@alfresco/adf-core';
|
||||
import { PeopleCloudComponent } from './people-cloud/people-cloud.component';
|
||||
import { GroupCloudComponent } from '../../../../lib/group/components/group-cloud.component';
|
||||
import { PeopleCloudComponent } from '../../../people/components/people-cloud.component';
|
||||
import { GroupCloudComponent } from '../../../group/components/group-cloud.component';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import { StartTaskCloudRequestModel } from '../models/start-task-cloud-request.model';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
@ -15,20 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const mockUsers = [
|
||||
{ id: 'fake-id-1', username: 'first-name-1 last-name-1', firstName: 'first-name-1', lastName: 'last-name-1', email: 'abc@xyz.com' },
|
||||
{ id: 'fake-id-2', username: 'first-name-2 last-name-2', firstName: 'first-name-2', lastName: 'last-name-2', email: 'abcd@xyz.com'},
|
||||
{ id: 'fake-id-3', username: 'first-name-3 last-name-3', firstName: 'first-name-3', lastName: 'last-name-3', email: 'abcde@xyz.com' }
|
||||
];
|
||||
|
||||
export const cloudMockUser = {
|
||||
id: 'fake-id-1', username: 'AssignedTaskUser', firstName: 'first-name-1', lastName: 'last-name-1', email: 'abc@xyz.com'
|
||||
};
|
||||
|
||||
export const mockRoles = [
|
||||
{ id: 'id-1', name: 'MOCK-ADMIN-ROLE'},
|
||||
{ id: 'id-2', name: 'MOCK-USER-ROLE'},
|
||||
{ id: 'id-3', name: 'MOCK_MODELER-ROLE' },
|
||||
{ id: 'id-4', name: 'MOCK-ROLE-1' },
|
||||
{ id: 'id-5', name: 'MOCK-ROLE-2'}
|
||||
];
|
||||
|
@ -17,5 +17,4 @@
|
||||
|
||||
export * from './models/task-details-cloud.model';
|
||||
export * from './components/start-task-cloud.component';
|
||||
export * from './components/people-cloud/people-cloud.component';
|
||||
export * from './start-task-cloud.module';
|
||||
|
@ -19,18 +19,17 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MaterialModule } from '../../material.module';
|
||||
import { TemplateModule, PipeModule, CoreModule } from '@alfresco/adf-core';
|
||||
import { TemplateModule, CoreModule } from '@alfresco/adf-core';
|
||||
import { StartTaskCloudComponent } from './components/start-task-cloud.component';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { PeopleCloudComponent } from './components/people-cloud/people-cloud.component';
|
||||
import { GroupCloudModule } from '../../group/group-cloud.module';
|
||||
import { TaskCloudService } from '../services/task-cloud.service';
|
||||
import { FormCloudModule } from '../../form/form-cloud.module';
|
||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
PipeModule,
|
||||
TemplateModule,
|
||||
FlexLayoutModule,
|
||||
MaterialModule,
|
||||
@ -38,15 +37,15 @@ import { FormCloudModule } from '../../form/form-cloud.module';
|
||||
ReactiveFormsModule,
|
||||
GroupCloudModule,
|
||||
CoreModule,
|
||||
FormCloudModule
|
||||
FormCloudModule,
|
||||
PeopleCloudModule
|
||||
],
|
||||
declarations: [StartTaskCloudComponent, PeopleCloudComponent],
|
||||
declarations: [StartTaskCloudComponent],
|
||||
providers: [
|
||||
TaskCloudService
|
||||
],
|
||||
exports: [
|
||||
StartTaskCloudComponent,
|
||||
PeopleCloudComponent
|
||||
StartTaskCloudComponent
|
||||
]
|
||||
})
|
||||
export class StartTaskCloudModule {
|
||||
|
@ -22,9 +22,9 @@ import {
|
||||
import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import { FormRenderingService, FormModel, ContentLinkModel } from '@alfresco/adf-core';
|
||||
import { AttachFileCloudWidgetComponent } from '../../../form/components/attach-file-cloud-widget/attach-file-cloud-widget.component';
|
||||
import { DropdownCloudWidgetComponent } from '../../../form/components/dropdown-cloud/dropdown-cloud.widget';
|
||||
import { DateCloudWidgetComponent } from '../../../form/components/date-cloud/date-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from '../../../form/components/widgets/attach-file/attach-file-cloud-widget.component';
|
||||
import { DropdownCloudWidgetComponent } from '../../../form/components/widgets/dropdown/dropdown-cloud.widget';
|
||||
import { DateCloudWidgetComponent } from '../../../form/components/widgets/date/date-cloud.widget';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-task-form',
|
||||
|
@ -20,5 +20,6 @@ export * from './lib/app/public-api';
|
||||
export * from './lib/process/public-api';
|
||||
export * from './lib/task/public-api';
|
||||
export * from './lib/group/public-api';
|
||||
export * from './lib/people/public-api';
|
||||
export * from './lib/form/public-api';
|
||||
export * from './lib/services/public-api';
|
||||
|
@ -22,7 +22,7 @@ import { MaterialModule } from '../material.module';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
|
||||
import { AppsListComponent } from './apps-list.component';
|
||||
import { SelectAppsDialogComponent } from './select-apps-dialog-component';
|
||||
import { SelectAppsDialogComponent } from './select-apps-dialog.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -16,6 +16,6 @@
|
||||
*/
|
||||
|
||||
export * from './apps-list.component';
|
||||
export * from './select-apps-dialog-component';
|
||||
export * from './select-apps-dialog.component';
|
||||
|
||||
export * from './apps-list.module';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<header mat-dialog-title id="adf-selet-app-dialog-title">{{'APP.DIALOG.TITLE' | translate}}</header>
|
||||
<header mat-dialog-title id="adf-select-app-dialog-title">{{'APP.DIALOG.TITLE' | translate}}</header>
|
||||
<section mat-dialog-content>
|
||||
|
||||
<mat-select id="adf-selet-app-dialog-dropdown" placeholder="{{'APP.DIALOG.LIST' | translate}}" [(value)]="selectedProcess" >
|
||||
<mat-select id="adf-select-app-dialog-dropdown" placeholder="{{'APP.DIALOG.LIST' | translate}}" [(value)]="selectedProcess" >
|
||||
<mat-option *ngFor="let currentProcessApp of processApps" [value]="currentProcessApp">
|
||||
{{ currentProcessApp.name }}
|
||||
</mat-option>
|
@ -23,7 +23,7 @@ import { AppsProcessService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { deployedApps } from '../mock/apps-list.mock';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
import { SelectAppsDialogComponent } from './select-apps-dialog-component';
|
||||
import { SelectAppsDialogComponent } from './select-apps-dialog.component';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
|
||||
@Component({
|
||||
@ -102,12 +102,12 @@ describe('Select app dialog', () => {
|
||||
|
||||
expect(
|
||||
overlayContainerElement.querySelector(
|
||||
'.adf-selet-app-dialog-title'
|
||||
'.adf-select-app-dialog-title'
|
||||
)
|
||||
).toBeDefined();
|
||||
expect(
|
||||
overlayContainerElement.querySelector(
|
||||
'.adf-selet-app-dialog-dropdown'
|
||||
'.adf-select-app-dialog-dropdown'
|
||||
)
|
||||
).toBeDefined();
|
||||
});
|
@ -21,7 +21,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-select-apps-dialog',
|
||||
templateUrl: 'select-apps-dialog-component.html'
|
||||
templateUrl: 'select-apps-dialog.component.html'
|
||||
})
|
||||
export class SelectAppsDialogComponent {
|
||||
|
@ -1,3 +1,7 @@
|
||||
{
|
||||
"C260249" : "REPO-4772 ACS 6.2"
|
||||
"C260249" : "REPO-4772 ACS 6.2",
|
||||
"C291954" : "AAE-1179 Group Task",
|
||||
"C291955" : "AAE-1179 Group Task",
|
||||
"C307046" : "AAE-1180 Tooltip fail",
|
||||
"C307075" : "AAE-1180 Tooltip fail"
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ export AUTH_TYPE="OAUTH"
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER -b --use-dist )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER -b --use-dist -m 3 )
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --clientId 'activiti' || exit 1
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user