[ADF-1768] Process list - The columns must be localisable (#2515)

* Rename processlist.component.ts to process-list.component.ts
Rename processlist.component.md to process-list.component.md

* Add a root scope ADF_PROCESS_LIST into the json file
Remove the hardcoded string from the component and use keys
Refactoring json structure

* Fix unit test
This commit is contained in:
Maurizio Vitale
2017-10-20 17:36:57 +02:00
committed by Eugenio Romano
parent 9ce0cd45e8
commit c2cafaa648
27 changed files with 1166 additions and 1183 deletions

View File

@@ -141,12 +141,12 @@
(row-dblclick)="onProcessRowDblClick($event)" (row-dblclick)="onProcessRowDblClick($event)"
(onSuccess)="onSuccessProcessList($event)"> (onSuccess)="onSuccessProcessList($event)">
<!-- Custom column definition demo --> <!-- Custom column definition demo -->
<!--
<data-columns> <data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column> <data-column key="name" title="ADF_PROCESS_LIST.PROPERTIES.NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column> <data-column key="created" title="ADF_PROCESS_LIST.PROPERTIES.CREATED" class="hidden"></data-column>
</data-columns> </data-columns>
-->
</adf-process-instance-list> </adf-process-instance-list>
</div> </div>
<div class="activiti-demo-grid-item activiti-demo-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto"> <div class="activiti-demo-grid-item activiti-demo-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto">

View File

@@ -139,15 +139,6 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
this.dataTasks = new ObjectDataTableAdapter(); this.dataTasks = new ObjectDataTableAdapter();
this.dataTasks.setSorting(new DataSorting('created', 'desc')); this.dataTasks.setSorting(new DataSorting('created', 'desc'));
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true }
]
);
this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
// Uncomment this line to replace all 'text' field editors with custom component // Uncomment this line to replace all 'text' field editors with custom component
// formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true); // formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);

View File

@@ -2,10 +2,10 @@
(executeRowAction)="onExecuteRowAction($event)"> (executeRowAction)="onExecuteRowAction($event)">
<adf-empty-list *ngIf="isEmpty()"> <adf-empty-list *ngIf="isEmpty()">
<div adf-empty-list-header class="adf-empty-list-header"> {{'PROCESS-ATTACHMENT.EMPTY.HEADER' | translate}} </div> <div adf-empty-list-header class="adf-empty-list-header"> {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER' | translate}} </div>
<div adf-empty-list-body *ngIf="!isDisabled()"> <div adf-empty-list-body *ngIf="!isDisabled()">
<div class="adf-empty-list-drag_drop">{{'PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}</div> <div class="adf-empty-list-drag_drop">{{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}</div>
<div class="adf-empty-list__any-files-here-to-add"> {{'PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}} </div> <div class="adf-empty-list__any-files-here-to-add"> {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}} </div>
</div> </div>
<div adf-empty-list-footer *ngIf="!isDisabled()"> <div adf-empty-list-footer *ngIf="!isDisabled()">
<img class="adf-empty-list__empty_doc_lib" [src]="emptyListImageUrl"> <img class="adf-empty-list__empty_doc_lib" [src]="emptyListImageUrl">

View File

@@ -207,7 +207,7 @@ describe('ProcessAttachmentListComponent', () => {
component.ngOnChanges({'processInstanceId': change}); component.ngOnChanges({'processInstanceId': change});
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('PROCESS-ATTACHMENT.EMPTY.HEADER'); expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER');
}); });
})); }));
@@ -222,7 +222,8 @@ describe('ProcessAttachmentListComponent', () => {
component.ngOnChanges({'processInstanceId': change}); component.ngOnChanges({'processInstanceId': change});
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.querySelector('adf-empty-list .adf-empty-list-drag_drop').innerText.trim()).toEqual('PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE'); expect(fixture.nativeElement.querySelector('adf-empty-list .adf-empty-list-drag_drop').innerText.trim())
.toEqual('ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE');
}); });
})); }));
@@ -240,7 +241,7 @@ describe('ProcessAttachmentListComponent', () => {
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.querySelector('adf-empty-list .adf-empty-list-drag_drop')).toBeNull(); expect(fixture.nativeElement.querySelector('adf-empty-list .adf-empty-list-drag_drop')).toBeNull();
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('PROCESS-ATTACHMENT.EMPTY.HEADER'); expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER');
}); });
})); }));
@@ -257,7 +258,8 @@ describe('ProcessAttachmentListComponent', () => {
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('PROCESS-ATTACHMENT.EMPTY.HEADER'); expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim())
.toEqual('ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER');
}); });
})); }));

View File

@@ -1,10 +1,10 @@
<div class="adf-comments-container"> <div class="adf-comments-container">
<div id="comment-header" class="adf-comments-header"> <div id="comment-header" class="adf-comments-header">
{{'DETAILS.COMMENTS.HEADER' | translate: { count: comments?.length} }} {{'ADF_PROCESS_LIST.DETAILS.COMMENTS.HEADER' | translate: { count: comments?.length} }}
</div> </div>
<div class="adf-comments-input-container" *ngIf="!isReadOnly()"> <div class="adf-comments-input-container" *ngIf="!isReadOnly()">
<mat-form-field class="adf-full-width"> <mat-form-field class="adf-full-width">
<input matInput id="comment-input" placeholder="{{'DETAILS.COMMENTS.ADD' | translate}}" [(ngModel)]="message" (keyup.enter)="add()" (keyup.esc)="clear()"> <input matInput id="comment-input" placeholder="{{'ADF_PROCESS_LIST.DETAILS.COMMENTS.ADD' | translate}}" [(ngModel)]="message" (keyup.enter)="add()" (keyup.esc)="clear()">
</mat-form-field> </mat-form-field>
</div> </div>

View File

@@ -118,7 +118,7 @@ describe('ActivitiProcessInstanceComments', () => {
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
let element = fixture.nativeElement.querySelector('#comment-header'); let element = fixture.nativeElement.querySelector('#comment-header');
expect(element.innerText).toBe('DETAILS.COMMENTS.HEADER'); expect(element.innerText).toBe('ADF_PROCESS_LIST.DETAILS.COMMENTS.HEADER');
}); });
}); });

View File

@@ -1,4 +1,4 @@
<div *ngIf="!processInstanceDetails">{{ 'DETAILS.MESSAGES.NONE'|translate }}</div> <div *ngIf="!processInstanceDetails">{{ 'ADF_PROCESS_LIST.DETAILS.MESSAGES.NONE'|translate }}</div>
<mat-card *ngIf="processInstanceDetails"> <mat-card *ngIf="processInstanceDetails">
<mat-card-header> <mat-card-header>
<mat-card-title>{{ getProcessNameOrDescription('medium') }}</mat-card-title> <mat-card-title>{{ getProcessNameOrDescription('medium') }}</mat-card-title>
@@ -9,7 +9,7 @@
(showProcessDiagram)="onShowProcessDiagram($event)"> (showProcessDiagram)="onShowProcessDiagram($event)">
</adf-process-instance-header> </adf-process-instance-header>
<button class="adf-in-medias-res-button" mat-button id="show-diagram-button" type="button" mat-button mat-raised-button [disabled]="isDiagramDisabled()" (click)="onShowProcessDiagram(processInstanceId)">{{ 'DETAILS.BUTTON.SHOW_DIAGRAM' | translate }}</button> <button class="adf-in-medias-res-button" mat-button id="show-diagram-button" type="button" mat-button mat-raised-button [disabled]="isDiagramDisabled()" (click)="onShowProcessDiagram(processInstanceId)">{{ 'ADF_PROCESS_LIST.DETAILS.BUTTON.SHOW_DIAGRAM' | translate }}</button>
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
@@ -21,7 +21,7 @@
</mat-card> </mat-card>
<div data-automation-id="header-status" *ngIf="isRunning()" class="adf-in-medias-res-button"> <div data-automation-id="header-status" *ngIf="isRunning()" class="adf-in-medias-res-button">
<button mat-button type="button" (click)="cancelProcess()">{{ 'DETAILS.BUTTON.CANCEL' | translate }}</button> <button mat-button type="button" (click)="cancelProcess()">{{ 'ADF_PROCESS_LIST.DETAILS.BUTTON.CANCEL' | translate }}</button>
</div> </div>
<mat-card> <mat-card>

View File

@@ -73,7 +73,7 @@ describe('ProcessInstanceDetailsComponent', () => {
it('should set a placeholder message when processInstanceId not initialised', () => { it('should set a placeholder message when processInstanceId not initialised', () => {
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.innerText).toBe('DETAILS.MESSAGES.NONE'); expect(fixture.nativeElement.innerText).toBe('ADF_PROCESS_LIST.DETAILS.MESSAGES.NONE');
}); });
it('should display a header when the processInstanceId is provided', async(() => { it('should display a header when the processInstanceId is provided', async(() => {
@@ -131,7 +131,7 @@ describe('ProcessInstanceDetailsComponent', () => {
it('should set a placeholder message when processInstanceId changed to null', () => { it('should set a placeholder message when processInstanceId changed to null', () => {
component.ngOnChanges({ 'processInstanceId': nullChange }); component.ngOnChanges({ 'processInstanceId': nullChange });
fixture.detectChanges(); fixture.detectChanges();
expect(fixture.nativeElement.innerText).toBe('DETAILS.MESSAGES.NONE'); expect(fixture.nativeElement.innerText).toBe('ADF_PROCESS_LIST.DETAILS.MESSAGES.NONE');
}); });
it('should display cancel button if process is running', () => { it('should display cancel button if process is running', () => {

View File

@@ -93,7 +93,7 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges({}); component.ngOnChanges({});
fixture.detectChanges(); fixture.detectChanges();
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-dateitem-dueDate"]'); let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-dateitem-dueDate"]');
expect(valueEl.innerText).toBe('PROCESS_PROPERTIES.DUE_DATE_DEFAULT'); expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.DUE_DATE_DEFAULT');
}); });
it('should display process category', () => { it('should display process category', () => {
@@ -109,7 +109,7 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges({}); component.ngOnChanges({});
fixture.detectChanges(); fixture.detectChanges();
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-category"]'); let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-category"]');
expect(valueEl.innerText).toBe('PROCESS_PROPERTIES.CATEGORY_DEFAULT'); expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT');
}); });
it('should display created date', () => { it('should display created date', () => {
@@ -149,6 +149,6 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges({}); component.ngOnChanges({});
fixture.detectChanges(); fixture.detectChanges();
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-description"]'); let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-description"]');
expect(valueEl.innerText).toBe('PROCESS_PROPERTIES.DESCRIPTION_DEFAULT'); expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT');
}); });
}); });

View File

@@ -40,49 +40,49 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
this.properties = [ this.properties = [
new CardViewTextItemModel( new CardViewTextItemModel(
{ {
label: 'PROCESS_PROPERTIES.STATUS', label: 'ADF_PROCESS_LIST.PROPERTIES.STATUS',
value: this.getProcessStatus(), value: this.getProcessStatus(),
key: 'status' key: 'status'
}), }),
new CardViewDateItemModel( new CardViewDateItemModel(
{ {
label: 'PROCESS_PROPERTIES.DUE_DATE', label: 'ADF_PROCESS_LIST.PROPERTIES.DUE_DATE',
value: this.processInstance.ended, value: this.processInstance.ended,
format: 'MMM DD YYYY', format: 'MMM DD YYYY',
key: 'dueDate', key: 'dueDate',
default: 'PROCESS_PROPERTIES.DUE_DATE_DEFAULT' default: 'ADF_PROCESS_LIST.PROPERTIES.DUE_DATE_DEFAULT'
}), }),
new CardViewTextItemModel( new CardViewTextItemModel(
{ {
label: 'PROCESS_PROPERTIES.CATEGORY', label: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY',
value: this.processInstance.processDefinitionCategory, value: this.processInstance.processDefinitionCategory,
key: 'category', key: 'category',
default: 'PROCESS_PROPERTIES.CATEGORY_DEFAULT' default: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT'
}), }),
new CardViewTextItemModel( new CardViewTextItemModel(
{ {
label: 'PROCESS_PROPERTIES.CREATED_BY', label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY',
value: this.getStartedByFullName(), value: this.getStartedByFullName(),
key: 'assignee', key: 'assignee',
default: 'PROCESS_PROPERTIES.CREATED_BY_DEFAULT' default: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY_DEFAULT'
}), }),
new CardViewDateItemModel( new CardViewDateItemModel(
{ {
label: 'PROCESS_PROPERTIES.CREATED', label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED',
value: this.processInstance.started, value: this.processInstance.started,
format: 'MMM DD YYYY', format: 'MMM DD YYYY',
key: 'created' key: 'created'
}), }),
new CardViewTextItemModel( new CardViewTextItemModel(
{label: 'PROCESS_PROPERTIES.ID', {label: 'ADF_PROCESS_LIST.PROPERTIES.ID',
value: this.processInstance.id, value: this.processInstance.id,
key: 'id' key: 'id'
}), }),
new CardViewTextItemModel( new CardViewTextItemModel(
{label: 'PROCESS_PROPERTIES.DESCRIPTION', {label: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION',
value: this.processInstance.processDefinitionDescription, value: this.processInstance.processDefinitionDescription,
key: 'description', key: 'description',
default: 'PROCESS_PROPERTIES.DESCRIPTION_DEFAULT' default: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT'
}) })
]; ];
} }

View File

@@ -7,7 +7,7 @@
<!-- ACTIVE FORM --> <!-- ACTIVE FORM -->
<mat-chip-list> <mat-chip-list>
<span class="adf-chip-label">{{ 'DETAILS.LABELS.TASKS_ACTIVE'|translate }}</span> <span class="adf-chip-label">{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASKS_ACTIVE'|translate }}</span>
<mat-chip class="adf-process-badge" color="accent" selected="true">{{activeTasks?.length}}</mat-chip> <mat-chip class="adf-process-badge" color="accent" selected="true">{{activeTasks?.length}}</mat-chip>
</mat-chip-list> </mat-chip-list>
@@ -17,7 +17,7 @@
<mat-icon mat-list-icon>assignment</mat-icon> <mat-icon mat-list-icon>assignment</mat-icon>
<h3 matLine>{{task.name || 'Nameless task'}}</h3> <h3 matLine>{{task.name || 'Nameless task'}}</h3>
<span matLine> <span matLine>
{{ 'DETAILS.LABELS.TASK_SUBTITLE' | translate:{user: getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }} {{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user: getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}
</span> </span>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
@@ -26,20 +26,20 @@
<!-- START FORM --> <!-- START FORM -->
<div *ngIf="activeTasks?.length === 0" data-automation-id="active-tasks-none" class="no-results"> <div *ngIf="activeTasks?.length === 0" data-automation-id="active-tasks-none" class="no-results">
{{ 'DETAILS.TASKS.NO_ACTIVE' | translate }} {{ 'ADF_PROCESS_LIST.DETAILS.TASKS.NO_ACTIVE' | translate }}
</div> </div>
<div *ngIf="hasStartFormDefined()"> <div *ngIf="hasStartFormDefined()">
<span class="activiti-label">{{ 'DETAILS.LABELS.START_FORM'|translate }}</span> <span class="activiti-label">{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.START_FORM'|translate }}</span>
<!--IF START TASK COMPLETED --> <!--IF START TASK COMPLETED -->
<div class="menu-container"> <div class="menu-container">
<mat-list> <mat-list>
<mat-list-item class="process-tasks__task-item" (click)="clickStartTask($event)"> <mat-list-item class="process-tasks__task-item" (click)="clickStartTask($event)">
<mat-icon mat-list-icon>assignment</mat-icon> <mat-icon mat-list-icon>assignment</mat-icon>
<h3 matLine>{{ 'DETAILS.LABELS.START_FORM'|translate }}</h3> <h3 matLine>{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.START_FORM'|translate }}</h3>
<span matLine> <span matLine>
{{ 'DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(processInstanceDetails.startedBy), created: getFormatDate(processInstanceDetails.started, 'mediumDate') } }} {{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(processInstanceDetails.startedBy), created: getFormatDate(processInstanceDetails.started, 'mediumDate') } }}
</span> </span>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
@@ -49,7 +49,7 @@
<!-- COMPLETED FORM --> <!-- COMPLETED FORM -->
<mat-chip-list> <mat-chip-list>
<span class="adf-chip-label">{{ 'DETAILS.LABELS.TASKS_COMPLETED'|translate }}</span> <span class="adf-chip-label">{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASKS_COMPLETED'|translate }}</span>
<mat-chip class="adf-process-badge" color="accent" selected="true">{{completedTasks?.length}}</mat-chip> <mat-chip class="adf-process-badge" color="accent" selected="true">{{completedTasks?.length}}</mat-chip>
</mat-chip-list> </mat-chip-list>
@@ -59,19 +59,19 @@
<mat-icon mat-list-icon>assignment</mat-icon> <mat-icon mat-list-icon>assignment</mat-icon>
<h3 matLine>{{task.name || 'Nameless task'}}</h3> <h3 matLine>{{task.name || 'Nameless task'}}</h3>
<span matLine> <span matLine>
{{ 'DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }} {{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}
</span> </span>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
</div> </div>
<div *ngIf="completedTasks?.length === 0" data-automation-id="completed-tasks-none" class="no-results"> <div *ngIf="completedTasks?.length === 0" data-automation-id="completed-tasks-none" class="no-results">
{{ 'DETAILS.TASKS.NO_COMPLETED' | translate }} {{ 'ADF_PROCESS_LIST.DETAILS.TASKS.NO_COMPLETED' | translate }}
</div> </div>
<ng-template *ngIf="hasStartFormDefined()" #startDialog> <ng-template *ngIf="hasStartFormDefined()" #startDialog>
<div id="adf-start-process-dialog" class="adf-start-process-dialog"> <div id="adf-start-process-dialog" class="adf-start-process-dialog">
<h4 matDialogTitle>{{ 'DETAILS.LABELS.START_FORM'|translate }}</h4> <h4 matDialogTitle>{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.START_FORM'|translate }}</h4>
<div mat-dialog-content class="adf-start-process-dialog-content"> <div mat-dialog-content class="adf-start-process-dialog-content">
<adf-start-form [processId]="processId" <adf-start-form [processId]="processId"
[showRefreshButton]="false" [readOnlyForm]="true" [showRefreshButton]="false" [readOnlyForm]="true"
@@ -79,7 +79,7 @@
</adf-start-form> </adf-start-form>
</div> </div>
<div mat-dialog-actions class="adf-start-process-dialog-actions"> <div mat-dialog-actions class="adf-start-process-dialog-actions">
<button mat-button type="button" (click)="closeSartDialog()">{{ 'DETAILS.TASKS.TASK_CLOSE' | translate }}</button> <button mat-button type="button" (click)="closeSartDialog()">{{ 'ADF_PROCESS_LIST.DETAILS.TASKS.TASK_CLOSE' | translate }}</button>
</div> </div>
</div> </div>
</ng-template> </ng-template>

View File

@@ -1,4 +1,4 @@
<div *ngIf="!requestNode">{{ 'FILTERS.MESSAGES.NONE' | translate }}</div> <div *ngIf="!requestNode">{{ 'ADF_PROCESS_LIST.FILTERS.MESSAGES.NONE' | translate }}</div>
<div *ngIf="requestNode"> <div *ngIf="requestNode">
<adf-datatable <adf-datatable
[data]="data" [data]="data"
@@ -19,7 +19,7 @@
<!--Add your custom empty template here--> <!--Add your custom empty template here-->
<ng-template> <ng-template>
<div class="no-content-message"> <div class="no-content-message">
{{ 'PROCESSLIST.NONE' | translate }} {{ 'ADF_PROCESS_LIST.LIST.NONE' | translate }}
</div> </div>
</ng-template> </ng-template>
</no-content-template> </no-content-template>

View File

@@ -65,8 +65,8 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
isLoading: boolean = true; isLoading: boolean = true;
private defaultSchema: DataColumn[] = [ private defaultSchema: DataColumn[] = [
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true }, { type: 'text', key: 'name', title: 'ADF_PROCESS_LIST.PROPERTIES.NAME', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true } { type: 'text', key: 'created', title: 'ADF_PROCESS_LIST.PROPERTIES.CREATED', cssClass: 'hidden', sortable: true }
]; ];
constructor(private processService: ProcessService) { constructor(private processService: ProcessService) {

View File

@@ -1,16 +1,16 @@
<mat-card class="adf-start-process"> <mat-card class="adf-start-process">
<mat-card-title>{{'START_PROCESS.FORM.TITLE' | translate}} <mat-card-title>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE' | translate}}
</mat-card-title> </mat-card-title>
<mat-card-content *ngIf="isProcessDefinitionEmpty()"> <mat-card-content *ngIf="isProcessDefinitionEmpty()">
<mat-card-subtitle id="error-message" *ngIf="errorMessageId"> <mat-card-subtitle id="error-message" *ngIf="errorMessageId">
{{errorMessageId|translate}} {{errorMessageId|translate}}
</mat-card-subtitle> </mat-card-subtitle>
<mat-form-field class="adf-process-input-container"> <mat-form-field class="adf-process-input-container">
<input matInput placeholder="{{'START_PROCESS.FORM.LABEL.NAME'|translate}}" [(ngModel)]="name" id="processName" required /> <input matInput placeholder="{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.NAME'|translate}}" [(ngModel)]="name" id="processName" required />
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select placeholder="{{'START_PROCESS.FORM.LABEL.TYPE'|translate}}" [(ngModel)]="currentProcessDef.id" (ngModelChange)="onProcessDefChange($event)" required> <mat-select placeholder="{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.TYPE'|translate}}" [(ngModel)]="currentProcessDef.id" (ngModelChange)="onProcessDefChange($event)" required>
<mat-option>{{'START_PROCESS.FORM.TYPE_PLACEHOLDER' | translate}}</mat-option> <mat-option>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.TYPE_PLACEHOLDER' | translate}}</mat-option>
<mat-option *ngFor="let processDef of processDefinitions" [value]="processDef.id"> <mat-option *ngFor="let processDef of processDefinitions" [value]="processDef.id">
{{ processDef.name }} {{ processDef.name }}
</mat-option> </mat-option>
@@ -21,16 +21,16 @@
[processDefinitionId]="currentProcessDef.id" [processDefinitionId]="currentProcessDef.id"
(outcomeClick)="onOutcomeClick($event)" (outcomeClick)="onOutcomeClick($event)"
[showRefreshButton]="false"> [showRefreshButton]="false">
<button form-custom-button mat-button (click)="cancelStartProcess()" id="cancle_process" class=""> {{'START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button> <button form-custom-button mat-button (click)="cancelStartProcess()" id="cancle_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
</activiti-start-form> </activiti-start-form>
</mat-card-content> </mat-card-content>
<mat-card-content *ngIf="hasErrorMessage()"> <mat-card-content *ngIf="hasErrorMessage()">
<mat-card-subtitle class="error-message" id="no-process-message"> <mat-card-subtitle class="error-message" id="no-process-message">
{{'START_PROCESS.NO_PROCESS_DEFINITIONS' | translate}} {{'ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS' | translate}}
</mat-card-subtitle> </mat-card-subtitle>
</mat-card-content> </mat-card-content>
<mat-card-actions *ngIf="!hasStartForm()"> <mat-card-actions *ngIf="!hasStartForm()">
<button mat-button *ngIf="!hasStartForm()" (click)="cancelStartProcess()" id="cancle_process" class=""> {{'START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button> <button mat-button *ngIf="!hasStartForm()" (click)="cancelStartProcess()" id="cancle_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
<button mat-button *ngIf="!hasStartForm()" [disabled]="!validateForm()" (click)="startProcess()" data-automation-id="btn-start" id="button-start" class="btn-start"> {{'START_PROCESS.FORM.ACTION.START' | translate}} </button> <button mat-button *ngIf="!hasStartForm()" [disabled]="!validateForm()" (click)="startProcess()" data-automation-id="btn-start" id="button-start" class="btn-start"> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.START' | translate}} </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@@ -156,7 +156,7 @@ describe('StartProcessInstanceComponent', () => {
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
let noprocessElement = fixture.nativeElement.querySelector('#no-process-message'); let noprocessElement = fixture.nativeElement.querySelector('#no-process-message');
expect(noprocessElement).not.toBeNull('Expected no available process message to be present'); expect(noprocessElement).not.toBeNull('Expected no available process message to be present');
expect(noprocessElement.innerText.trim()).toBe('START_PROCESS.NO_PROCESS_DEFINITIONS'); expect(noprocessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS');
}); });
})); }));

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Keine Prozessinstanzen gefunden", "NONE": "Keine Prozessinstanzen gefunden",
"SUMMARY": "{{total}} Prozessinstanzen gefunden", "SUMMARY": "{{total}} Prozessinstanzen gefunden",
"ERROR": "Prozessesinstanzen konnten nicht geladen werden. Versuchen Sie es noch einmal oder geben Sie die folgende Meldung an Ihr IT-Team weiter: {{errorMessage}}", "ERROR": "Prozessesinstanzen konnten nicht geladen werden. Versuchen Sie es noch einmal oder geben Sie die folgende Meldung an Ihr IT-Team weiter: {{errorMessage}}"
"COLUMN": {
"NAME": "Name"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,18 +1,17 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "No process instances found", "NONE": "No process instances found",
"SUMMARY": "{{total}} process instances found", "SUMMARY": "{{total}} process instances found",
"ERROR": "Couldn't load processes instances. Try again or share the following message with your IT Team: {{errorMessage}}", "ERROR": "Couldn't load processes instances. Try again or share the following message with your IT Team: {{errorMessage}}"
"COLUMN": {
"NAME": "Name"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
"NONE": "No process instance filter selected." "NONE": "No process instance filter selected."
} }
}, },
"PROCESS_PROPERTIES": { "PROPERTIES": {
"NAME": "Name",
"STATUS": "Status", "STATUS": "Status",
"DUE_DATE": "Due Date", "DUE_DATE": "Due Date",
"DUE_DATE_DEFAULT": "No date", "DUE_DATE_DEFAULT": "No date",
@@ -119,3 +118,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "No se han encontrado instancias de procesos", "NONE": "No se han encontrado instancias de procesos",
"SUMMARY": "{{total}} instancias de procesos encontradas", "SUMMARY": "{{total}} instancias de procesos encontradas",
"ERROR": "No se han podido cargar las instancias de procesos. Vuelva a intentarlo o envíe el mensaje siguiente al equipo de TI: {{errorMessage}}", "ERROR": "No se han podido cargar las instancias de procesos. Vuelva a intentarlo o envíe el mensaje siguiente al equipo de TI: {{errorMessage}}"
"COLUMN": {
"NAME": "Nombre"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Aucune instance de processus trouvée", "NONE": "Aucune instance de processus trouvée",
"SUMMARY": "{{total}} instances de processus trouvées", "SUMMARY": "{{total}} instances de processus trouvées",
"ERROR": "Impossible de charger les instances de processus. Réessayez ou transférez le message suivant au service informatique : {{errorMessage}}", "ERROR": "Impossible de charger les instances de processus. Réessayez ou transférez le message suivant au service informatique : {{errorMessage}}"
"COLUMN": {
"NAME": "Nom"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Nessuna istanza del processo trovata", "NONE": "Nessuna istanza del processo trovata",
"SUMMARY": "{{total}} istanze del processo trovate", "SUMMARY": "{{total}} istanze del processo trovate",
"ERROR": "Impossibile caricare le istanze del processo. Riprova o condividi il messaggio seguente con il team IT: {{errorMessage}}", "ERROR": "Impossibile caricare le istanze del processo. Riprova o condividi il messaggio seguente con il team IT: {{errorMessage}}"
"COLUMN": {
"NAME": "Nome"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "プロセスインスタンスが見つかりません", "NONE": "プロセスインスタンスが見つかりません",
"SUMMARY": "{{total}} 個のプロセスインスタンスが見つかりました", "SUMMARY": "{{total}} 個のプロセスインスタンスが見つかりました",
"ERROR": "プロセスインスタンスを読み込みませんでした。もう一度操作をやり直すか、次のメッセージを IT 担当者に伝えてください: {{errorMessage}}", "ERROR": "プロセスインスタンスを読み込みませんでした。もう一度操作をやり直すか、次のメッセージを IT 担当者に伝えてください: {{errorMessage}}"
"COLUMN": {
"NAME": "名前"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Ingen prosesstilfeller funnet", "NONE": "Ingen prosesstilfeller funnet",
"SUMMARY": "{{total}} prosesstilfeller funnet", "SUMMARY": "{{total}} prosesstilfeller funnet",
"ERROR": "Kan ikke laste inn prosesstilfeller. Prøv på nytt, eller del følgende melding med IT-teamet {{errorMessage}}", "ERROR": "Kan ikke laste inn prosesstilfeller. Prøv på nytt, eller del følgende melding med IT-teamet {{errorMessage}}"
"COLUMN": {
"NAME": "Navn"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Geen procesinstances gevonden", "NONE": "Geen procesinstances gevonden",
"SUMMARY": "{{total}} procesinstances gevonden", "SUMMARY": "{{total}} procesinstances gevonden",
"ERROR": "Kan procesinstances niet laden. Probeer het opnieuw of deel het volgende bericht met het IT-team: {{errorMessage}}", "ERROR": "Kan procesinstances niet laden. Probeer het opnieuw of deel het volgende bericht met het IT-team: {{errorMessage}}"
"COLUMN": {
"NAME": "Naam"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Nenhuma instância de processo encontrada", "NONE": "Nenhuma instância de processo encontrada",
"SUMMARY": "{{total}} instâncias de processo encontradas", "SUMMARY": "{{total}} instâncias de processo encontradas",
"ERROR": "Não foi possível carregar instâncias de processos. Tente novamente ou compartilhe a mensagem a seguir com a Equipe de TI {{errorMessage}}", "ERROR": "Não foi possível carregar instâncias de processos. Tente novamente ou compartilhe a mensagem a seguir com a Equipe de TI {{errorMessage}}"
"COLUMN": {
"NAME": "Nome"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "Не найдено ни одного экземпляра процесса", "NONE": "Не найдено ни одного экземпляра процесса",
"SUMMARY": "Найдено экземпляров процесса: {{total}}", "SUMMARY": "Найдено экземпляров процесса: {{total}}",
"ERROR": "Не удалось загрузить экземпляры процесса. Повторите попытку или покажите IT-специалистам следующее сообщение: {{errorMessage}}", "ERROR": "Не удалось загрузить экземпляры процесса. Повторите попытку или покажите IT-специалистам следующее сообщение: {{errorMessage}}"
"COLUMN": {
"NAME": "Имя"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}

View File

@@ -1,11 +1,9 @@
{ {
"PROCESSLIST": { "ADF_PROCESS_LIST": {
"LIST": {
"NONE": "未找到流程实例", "NONE": "未找到流程实例",
"SUMMARY": "已找到 {{total}} 个流程实例", "SUMMARY": "已找到 {{total}} 个流程实例",
"ERROR": "无法加载流程实例。请重试或与您的IT团队分享以下消息{{errorMessage}}", "ERROR": "无法加载流程实例。请重试或与您的IT团队分享以下消息{{errorMessage}}"
"COLUMN": {
"NAME": "名称"
}
}, },
"FILTERS": { "FILTERS": {
"MESSAGES": { "MESSAGES": {
@@ -104,3 +102,4 @@
} }
} }
} }
}