Skip to content

Commit

Permalink
AAE-25190 Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pmartinezga committed Sep 6, 2024
1 parent c721288 commit a46a25f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@
<ng-template #taskFormCloudButtons>
<div class="adf-start-process-cloud-actions">
<button
*ngIf="showCancelButton && displayCancelButton"
*ngIf="showCancelButton"
mat-button
(click)="cancelStartProcess()"
id="cancel_process"
>
{{ cancelButtonLabel }}
</button>
<button
*ngIf="displayStartProcessButton"
*ngIf="showStartProcessButton"
color="primary"
mat-raised-button
[disabled]="disableStartButton || !isProcessFormValid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
isFormCloudLoading = false;
processDefinitionLoaded = false;

displayStartProcessButton = true;
displayCancelButton = true;
showStartProcessButton = true;
startProcessButtonLabel: string;
cancelButtonLabel: string;

Expand Down Expand Up @@ -268,14 +267,14 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
const cancelLabel = constants?.find((constant) => constant.name === 'cancelLabel');

if (displayStart) {
this.displayStartProcessButton = displayStart?.value === 'true';
this.showStartProcessButton = displayStart?.value === 'true';
}
if (startLabel) {
this.startProcessButtonLabel = startLabel?.value?.trim()?.length > 0 ? startLabel.value.trim() : this.defaultStartProcessButtonLabel;
}

if (displayCancel) {
this.displayCancelButton = displayCancel?.value === 'true';
this.showCancelButton = displayCancel?.value === 'true' && this.showCancelButton;
}
if (cancelLabel) {
this.cancelButtonLabel = cancelLabel?.value?.trim()?.length > 0 ? cancelLabel.value.trim() : this.defaultCancelProcessButtonLabel;
Expand Down

0 comments on commit a46a25f

Please sign in to comment.