mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3358] Show user friendly error templates when there are no applications/processDefinitions (#5746)
* * Added empty template on start process component * * Removed errorMessageId * * Added unit tests to recent changes * * Added doc * * fixed comments * * Used showError notification * * After rebase * * Fixed failing e2e * * Fixed comments
This commit is contained in:
@@ -224,7 +224,8 @@
|
||||
[name]="defaultProcessName"
|
||||
(formContentClicked)="onContentClick($event)"
|
||||
(start)="onStartProcessInstance($event)"
|
||||
(cancel)="onCancelProcessInstance()">
|
||||
(cancel)="onCancelProcessInstance()"
|
||||
(error)="onStartProcessError($event)">
|
||||
</adf-start-process>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -36,7 +36,7 @@ import {
|
||||
import {
|
||||
FORM_FIELD_VALIDATORS, FormRenderingService, FormService,
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues,
|
||||
AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent
|
||||
AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent, NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { AnalyticsReportListComponent } from '@alfresco/adf-insights';
|
||||
@@ -174,6 +174,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
formRenderingService: FormRenderingService,
|
||||
formService: FormService,
|
||||
private location: Location,
|
||||
private notificationService: NotificationService,
|
||||
private preferenceService: UserPreferencesService) {
|
||||
|
||||
this.defaultProcessName = this.appConfig.get<string>('adf-start-process.name');
|
||||
@@ -403,6 +404,10 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.reloadProcessFilters();
|
||||
}
|
||||
|
||||
onStartProcessError(event: any) {
|
||||
this.notificationService.showError(event.message);
|
||||
}
|
||||
|
||||
isStartProcessMode(): boolean {
|
||||
return this.currentProcessInstanceId === currentProcessIdNew;
|
||||
}
|
||||
|
Reference in New Issue
Block a user