Start process: Make the title optional (#5580)

* Make the title optional

* Add the title on demoshell

* Remove the mat card and css

* Fix scss
This commit is contained in:
Maurizio Vitale 2020-03-31 09:38:55 +01:00 committed by GitHub
parent 01d0f777c0
commit f4f46d0c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 19 deletions

View File

@ -213,6 +213,7 @@
<adf-start-process
#activitiStartProcess
[appId]="appId"
[title]="'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE'"
[name]="defaultProcessName"
[processDefinitionName]="defaultProcessDefinitionName"
(formContentClicked)="onContentClick($event)"

View File

@ -39,6 +39,7 @@ Starts a process.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | (optional) Limit the list of processes that can be started to those contained in the specified app. |
| title | `string` | "" | (optional) Define the header of the component. |
| name | `string` | "" | (optional) Name to assign to the current process. |
| processDefinitionName | `string` | | (optional) Definition name of the process to start. |
| processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. |
@ -61,6 +62,7 @@ Starts a process.
```html
<adf-start-process
[appId]="YOUR_APP_ID"
[title]="'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE'"
[name]="PROCESS_NAME"
[processDefinitionName]="PROCESS_DEFINITION_NAME">
</adf-start-process>

View File

@ -1,10 +1,9 @@
<mat-card class="adf-start-process">
<mat-card-title>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE' | translate}}
</mat-card-title>
<mat-card-content *ngIf="isProcessDefinitionEmpty()">
<mat-card-subtitle id="error-message" *ngIf="errorMessageId">
<div class="adf-start-process">
<div class="title" *ngIf="title">{{ title | translate}}</div>
<div class="content" *ngIf="isProcessDefinitionEmpty()">
<div class="subtitle" id="error-message" *ngIf="errorMessageId">
{{errorMessageId|translate}}
</mat-card-subtitle>
</div>
<mat-form-field class="adf-process-input-container">
<input
matInput
@ -60,13 +59,13 @@
{{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate | uppercase}}
</button>
</adf-start-form>
</mat-card-content>
<mat-card-content *ngIf="hasErrorMessage()">
<mat-card-subtitle class="error-message" id="no-process-message">
</div>
<div class="content" *ngIf="hasErrorMessage()">
<div class="subtitle" class="error-message" id="no-process-message">
{{'ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS' | translate | uppercase}}
</mat-card-subtitle>
</mat-card-content>
<mat-card-actions *ngIf="!hasStartForm()">
</div>
</div>
<div class="mat-content-actions" *ngIf="!hasStartForm()">
<button
mat-button
*ngIf="!hasStartForm()"
@ -85,5 +84,5 @@
class="btn-start">
{{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.START' | translate | uppercase}}
</button>
</mat-card-actions>
</mat-card>
</div>
</div>

View File

@ -1,6 +1,6 @@
.adf {
&-start-process {
width: 66%;
width: 96%;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
@ -14,11 +14,11 @@
width: 100%;
padding: 16px 0 0;
}
mat-card-actions {
.mat-content-actions {
text-align: right;
.mat-button {
text-transform: uppercase !important;
}
}
.mat-button {
text-transform: uppercase !important;
}
}
&-process-input-container {

View File

@ -50,6 +50,9 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr
@Input()
appId: number;
@Input()
title: string;
/** (optional) Definition name of the process to start. */
@Input()
processDefinitionName: string;