mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2188] Start Process - Change processDefinition property and fix bug (#2884)
* Change processDefinition property and fix bug * Fix unit test * Fix async * Fix id
This commit is contained in:
committed by
Eugenio Romano
parent
abca6e481d
commit
657c28491a
@@ -341,6 +341,10 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"adf-start-process": {
|
||||
"name": "My Default Name",
|
||||
"processDefinitionName": "My default process def name"
|
||||
},
|
||||
"adf-process-list": {
|
||||
"presets": {
|
||||
"default": [
|
||||
|
@@ -182,6 +182,8 @@
|
||||
*ngIf="isStartProcessMode()">
|
||||
<adf-start-process
|
||||
[appId]="appId"
|
||||
[name]="defaultProcessName"
|
||||
[processDefinitionName]="defaultProcessDefinitionName"
|
||||
(start)="onStartProcessInstance($event)"
|
||||
(cancel)="onCancelProcessInstance()">
|
||||
</adf-start-process>
|
||||
|
@@ -30,7 +30,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Pagination, ProcessInstanceFilterRepresentation } from 'alfresco-js-api';
|
||||
import {
|
||||
FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService,
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { AnalyticsReportListComponent } from '@alfresco/adf-insights';
|
||||
@@ -123,6 +123,9 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
|
||||
supportedPages: number[];
|
||||
|
||||
defaultProcessDefinitionName: string;
|
||||
defaultProcessName: string;
|
||||
|
||||
activeTab: number = this.tabs.tasks; // tasks|processes|reports
|
||||
|
||||
taskFilter: FilterRepresentationModel;
|
||||
@@ -148,6 +151,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
private taskListService: TaskListService,
|
||||
private apiService: AlfrescoApiService,
|
||||
private logService: LogService,
|
||||
private appConfig: AppConfigService,
|
||||
formRenderingService: FormRenderingService,
|
||||
formService: FormService,
|
||||
private preferenceService: UserPreferencesService) {
|
||||
@@ -156,6 +160,9 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.supportedPages = this.preferenceService.getDifferentPageSizes();
|
||||
this.taskPagination.maxItems = this.preferenceService.paginationSize;
|
||||
|
||||
this.defaultProcessName = this.appConfig.get<string>('adf-start-process.name');
|
||||
this.defaultProcessDefinitionName = this.appConfig.get<string>('adf-start-process.processDefinitionName');
|
||||
|
||||
// Uncomment this line to replace all 'text' field editors with custom component
|
||||
// formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);
|
||||
|
||||
|
Reference in New Issue
Block a user