Skip to content

Commit a307f10

Browse files
committed
ALCS-2657 Added disable behavior on incorrect status
1 parent 02205c3 commit a307f10

File tree

2 files changed

+48
-7
lines changed

2 files changed

+48
-7
lines changed

portal-frontend/src/app/features/applications/view-submission/view-application-submission.component.html

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,31 @@ <h4 *ngIf="application">Application ID: {{ application.fileNumber }} | {{ applic
1616
<div class="header top-bar">
1717
<button (click)="onNavigateHome()" mat-button color="accent"><mat-icon>chevron_left</mat-icon>Return to Inbox</button>
1818
<div class="btns-wrapper">
19-
<button mat-flat-button color="accent" (click)="onReturnApplication()" *ngIf="
20-
application &&
21-
(application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
22-
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG)
23-
">
24-
Return Application
25-
</button>
19+
<div
20+
matTooltip="Start application review in order to return"
21+
[matTooltipDisabled]="application && application.status.code !== SUBMISSION_STATUS.SUBMITTED_TO_LG"
22+
class="return-tooltip"
23+
>
24+
<button
25+
(click)="onReturnApplication()"
26+
[disabled]="isLoading || (application && application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG)"
27+
mat-flat-button
28+
color="accent"
29+
class="return-button"
30+
*ngIf="
31+
application &&
32+
(application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
33+
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG ||
34+
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG)
35+
"
36+
>
37+
38+
<div>
39+
<span>Return Application</span>
40+
<mat-icon class="icon" *ngIf="application && application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG">info_outline</mat-icon>
41+
</div>
42+
</button>
43+
</div>
2644
<button
2745
mat-flat-button
2846
color="primary"

portal-frontend/src/app/features/applications/view-submission/view-application-submission.component.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@
3030
margin-top: rem(16) !important;
3131
}
3232

33+
.return-tooltip {
34+
float: left;
35+
display: flex;
36+
37+
button {
38+
display: block;
39+
float: right;
40+
width: 100%;
41+
}
42+
}
43+
3344
@media screen and (min-width: $tabletBreakpoint) {
3445
display: inline-block;
3546
width: unset;
@@ -39,6 +50,10 @@
3950
margin-top: rem(8) !important;
4051
}
4152

53+
.return-tooltip {
54+
margin-right: rem(16);
55+
}
56+
4257
button:last-child {
4358
margin-right: 0 !important;
4459
}
@@ -214,3 +229,11 @@ section {
214229
display: flex;
215230
align-items: center;
216231
}
232+
233+
.icon {
234+
height: rem(16);
235+
width: rem(18);
236+
font-size: rem(18);
237+
margin-top: rem(2);
238+
margin-left: rem(4);
239+
}

0 commit comments

Comments
 (0)