Skip to content

Commit 9945e25

Browse files
mohas22mohas22
authored andcommitted
updated todo component with if condition on go action button
1 parent a40d573 commit 9945e25

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ <h2>{{ containerName$ }}</h2>
1717
headerText$: todo_headerText$,
1818
type$: 'TODO',
1919
context$: todo_context$,
20-
itemKey$: itemKey$
20+
itemKey$: itemKey$,
21+
isConfirm: true
2122
}"
2223
></component-mapper>
2324
</div>

packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</div>
2727
</div>
2828
</div>
29-
<div class="psdk-todo-assignment-action">
29+
<div class="psdk-todo-assignment-action" *ngIf="!isConfirm || canPerform">
3030
<button mat-flat-button color="primary" (click)="clickGo(assignment)">{{ localizedVal('Go', localeCategory) }}</button>
3131
</div>
3232
</div>

packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
4848
localeCategory = 'Todo';
4949
showlessLocalizedValue = this.localizedVal('show_less', 'CosmosFields');
5050
showMoreLocalizedValue = this.localizedVal('show_more', 'CosmosFields');
51+
canPerform: boolean;
5152

5253
constructor(
5354
private psService: ProgressSpinnerService,
@@ -149,6 +150,8 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
149150
}
150151
}
151152

153+
this.canPerform = this.arAssignments$?.[0]?.canPerform === 'true' || this.arAssignments$?.[0]?.canPerform === true;
154+
152155
this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
153156
this.currentUserInitials$ = this.utils.getInitials(this.currentUser$);
154157
}

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { devices } = require('@playwright/test');
1414
const config = {
1515
testDir: 'projects/angular-test-app/tests',
1616
/* Maximum time one test can run for. */
17-
timeout: 120 * 1000,
17+
timeout: 120 * 1000 * 2,
1818
expect: {
1919
/**
2020
* Maximum time expect() should wait for the condition to be met.

0 commit comments

Comments
 (0)