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 <adf-start-process
#activitiStartProcess #activitiStartProcess
[appId]="appId" [appId]="appId"
[title]="'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE'"
[name]="defaultProcessName" [name]="defaultProcessName"
[processDefinitionName]="defaultProcessDefinitionName" [processDefinitionName]="defaultProcessDefinitionName"
(formContentClicked)="onContentClick($event)" (formContentClicked)="onContentClick($event)"

View File

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

View File

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

View File

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

View File

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