Skip to content

Commit d6aec4c

Browse files
authored
Merge branch 'main' into wfprev-946/dropdown-warning-text
2 parents 3f3f332 + 16e615c commit d6aec4c

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

client/wfprev-war/src/main/angular/src/app/components/edit-project/activities/activities.component.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,6 @@
279279
:host ::ng-deep .mat-mdc-checkbox-disabled .mdc-label {
280280
margin-left: 12px !important;
281281
}
282-
:host ::ng-deep .add-activity .shared-icon-button {
283-
height: 40px !important;
284-
}
285282

286283
::ng-deep .mat-form-field-disabled .mdc-text-field {
287284
margin-top: 6px;

client/wfprev-war/src/main/angular/src/app/components/edit-project/wfprev-performance-update/wfprev-performance-updates.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<wfprev-expansion-indicator
66
[isExpanded]="performanceUpdatesPanels.expanded"></wfprev-expansion-indicator>
77
<span class="project-title">Performance Updates</span>
8-
<wfprev-icon-button [text]="'New Update'" [icon]="'/assets/add-button.svg'" [alt]="'add-update'"
8+
<wfprev-icon-button
9+
class="new-update"
10+
[text]="'New Update'"
11+
[icon]="'/assets/add-button.svg'"
12+
[alt]="'new-update'"
913
[iconSize]="19" (clicked)="openDialog()">
1014
</wfprev-icon-button>
1115
</div>

client/wfprev-war/src/main/angular/src/app/components/shared/icon-button/icon-button.component.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
background: #013366;
1010
border: none;
1111
font-family: "BCSans", "Noto Sans", Verdana, Arial, sans-serif;
12+
1213
.icon {
1314
vertical-align: text-bottom;
1415
padding-right: 5px;
@@ -24,8 +25,15 @@
2425
align-items: center;
2526
gap: 6px;
2627
}
28+
2729
&:disabled {
2830
background-color: #c0c0c0;
2931
cursor: not-allowed;
3032
}
33+
}
34+
35+
:host-context(.new-update) .shared-icon-button,
36+
:host-context(.add-activity) .shared-icon-button {
37+
width: 153px;
38+
height: 40px;
3139
}

client/wfprev-war/src/main/angular/src/app/components/wfprev-performance-update-modal-window/wfprev-performance-update-modal-window.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class PerformanceUpdateModalWindowComponent {
4141
]
4242
}),
4343

44-
forecastRationale: new FormControl("", { validators: [Validators.required] }),
44+
forecastRationale: new FormControl({value: '', disabled: true}, { validators: [Validators.required] }),
4545

4646
highRisk: new FormControl<number | null>(null, {
4747
validators: [
@@ -107,6 +107,16 @@ export class PerformanceUpdateModalWindowComponent {
107107
}
108108

109109
private bindAmountValidation() {
110+
this.revisedForecastControl.valueChanges.subscribe(value => {
111+
if (value && value > 0) {
112+
this.forecastRationaleControl.enable();
113+
} else {
114+
this.forecastRationaleControl.reset();
115+
this.forecastRationaleControl.disable();
116+
}
117+
this.calculateTotalAmount();
118+
});
119+
110120
this.highRiskControl.valueChanges.subscribe(value => {
111121
if (value > 0) {
112122
this.highRiskDescriptionControl.enable();

0 commit comments

Comments
 (0)