Skip to content

Commit

Permalink
Merge pull request #6119 from deNBI/fix/manager_comments
Browse files Browse the repository at this point in the history
fix(Application):fixed manager comments in mail and in modifications
  • Loading branch information
dweinholz authored Jul 24, 2024
2 parents c7edd1f + 98c27b0 commit 2e1ae71
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tr>
<td>Comment by reviewer:</td>
<td>
{{ application?.project_application_manager_comment }}
{{ comment }}
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, Input, OnInit } from '@angular/core';
import { Application } from '../../application.model/application.model';
import { is_vo, elixir_id } from '../../../shared/globalvar';

/**
Expand All @@ -10,11 +9,9 @@ import { is_vo, elixir_id } from '../../../shared/globalvar';
templateUrl: './adjustment-detail.component.html',
})
export class AdjustmentDetailComponent implements OnInit {
@Input() application: Application;
is_vo: boolean = is_vo;
@Input() comment: string;
elixir_id: string = elixir_id;

ngOnInit() {

}
ngOnInit() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@
>Application Adjustment</a
>
</li>
<li class="nav-item">
<a
class="nav-link"
id="modification_comment_tab"
*ngIf="application?.project_modification_request?.manager_comment"
[ngClass]="{ active: MODIFICATION_COMMENT_TAB_ACTIVE }"
(click)="setTab(MODIFICATION_COMMENT_TAB)"
>Modification Adjustment</a
>
</li>
<li class="nav-item">
<a
class="nav-link"
id="lifetime_comment_tab"
*ngIf="application?.project_lifetime_request?.manager_comment"
[ngClass]="{ active: LIFETIME_COMMENT_TAB_ACTIVE }"
(click)="setTab(LIFETIME_COMMENT_TAB)"
>Lifetime Adjustment</a
>
</li>
</ul>

<div class="tab-content">
Expand Down Expand Up @@ -99,8 +119,22 @@
<app-lifetime-extension-detail [application]="application"></app-lifetime-extension-detail>
</div>

<div *ngIf="COMMENT_TAB_ACTIVE" class="table-responsive">
<app-adjustment-detail [application]="application"></app-adjustment-detail>
</div>
@if (COMMENT_TAB_ACTIVE) {
<div class="table-responsive">
<app-adjustment-detail [comment]="application.project_application_manager_comment"></app-adjustment-detail>
</div>
} @else if (MODIFICATION_COMMENT_TAB_ACTIVE) {
<div class="table-responsive">
<app-adjustment-detail
[comment]="application?.project_modification_request?.manager_comment"
></app-adjustment-detail>
</div>
} @else if (LIFETIME_COMMENT_TAB_ACTIVE) {
<div class="table-responsive">
<app-adjustment-detail
[comment]="application?.project_lifetime_request?.manager_comment"
></app-adjustment-detail>
</div>
}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ export class ApplicationDetailComponent extends ApplicationBaseClassComponent im
MODIFICATION_TAB: number = 4;
EXTENSION_TAB: number = 5;
COMMENT_TAB: number = 6;
MODIFICATION_COMMENT_TAB: number = 7;
LIFETIME_COMMENT_TAB: number = 8;
PI_USER_TAB_ACTIVE: boolean = true;
INFORMATION_TAB_ACTIVE: boolean = false;
RESOURCE_TAB_ACTIVE: boolean = false;
CREDITS_TAB_ACTIVE: boolean = false;
MODIFICATION_TAB_ACTIVE: boolean = false;
EXTENSION_TAB_ACTIVE: boolean = false;
COMMENT_TAB_ACTIVE: boolean = false;

MODIFICATION_COMMENT_TAB_ACTIVE: boolean = false;
LIFETIME_COMMENT_TAB_ACTIVE: boolean = false;
@Input() application: Application;
@Input() default_tab: number = this.PI_USER_TAB;

Expand All @@ -52,10 +55,13 @@ export class ApplicationDetailComponent extends ApplicationBaseClassComponent im
this.MODIFICATION_TAB_ACTIVE = false;
this.EXTENSION_TAB_ACTIVE = false;
this.COMMENT_TAB_ACTIVE = false;
this.MODIFICATION_COMMENT_TAB_ACTIVE = false;
this.LIFETIME_COMMENT_TAB_ACTIVE = false;
}

setTab(tab_num: number): void {
this.setAllTabsFalse();
console.log(tab_num);
switch (tab_num) {
case this.PI_USER_TAB:
this.PI_USER_TAB_ACTIVE = true;
Expand All @@ -78,6 +84,12 @@ export class ApplicationDetailComponent extends ApplicationBaseClassComponent im
case this.COMMENT_TAB:
this.COMMENT_TAB_ACTIVE = true;
break;
case this.LIFETIME_COMMENT_TAB:
this.LIFETIME_COMMENT_TAB_ACTIVE = true;
break;
case this.MODIFICATION_COMMENT_TAB:
this.MODIFICATION_COMMENT_TAB_ACTIVE = true;
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ export class ApplicationVoActionsComponent extends AbstractBaseClass implements
}
}
if (action === 'adjustedModificationRequest') {
this.triggerReloadApplication();

// this.isLoaded = false;
// this.changeTabState(ApplicationTabStates.MODIFICATION_EXTENSION);
}
Expand Down

0 comments on commit 2e1ae71

Please sign in to comment.