Commit 301bc560 authored by Rajkumar-D's avatar Rajkumar-D
Browse files

ENA-4404, ENA-4396 Bug fixing

parent df9f72eb
Pipeline #278390 passed with stages
in 5 minutes and 1 second
...@@ -23,3 +23,21 @@ ...@@ -23,3 +23,21 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
} }
::ng-deep .mat-select-panel::-webkit-scrollbar {
-webkit-appearance: none;
}
::ng-deep .mat-select-panel::-webkit-scrollbar:vertical {
width: 11px;
}
::ng-deep .mat-select-panel::-webkit-scrollbar:horizontal {
height: 11px;
}
::ng-deep .mat-select-panel::-webkit-scrollbar-thumb {
border-radius: 8px;
border: 2px solid white; /* should match background, can't be transparent */
background-color: rgba(0, 0, 0, .5);
}
\ No newline at end of file
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<mat-select class="checklist-restriction" <mat-select class="checklist-restriction"
placeholder="Permitted values"> placeholder="Permitted values">
<mat-option *ngFor="let PermitedValues of field.value_choice" <mat-option *ngFor="let PermitedValues of field.value_choice"
[value]="field.value_choice"> [value]="PermitedValues" [disabled]="true">
{{ PermitedValues }} {{ PermitedValues }}
</mat-option> </mat-option>
</mat-select> </mat-select>
......
...@@ -238,7 +238,8 @@ ...@@ -238,7 +238,8 @@
<div> <div>
{{getElementValue(element, col)}} {{getElementValue(element, col)}}
<span class=edit-icon-span *ngIf="!isEga() && !embeded"> <span class=edit-icon-span *ngIf="!isEga() && !embeded">
<mat-icon class="edit-icon" *ngIf="element.report.releaseStatus=='PRIVATE'" <mat-icon class="edit-icon"
*ngIf="element.report.releaseStatus==='PRIVATE' || element.report.releaseStatus==='TEMPORARY_SUPPRESSED'"
(click)="updateReleaseDate(element)">edit</mat-icon> (click)="updateReleaseDate(element)">edit</mat-icon>
</span> </span>
</div> </div>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<mat-form-field class="app-field-padding" *ngIf="action==='Edit'"> <mat-form-field class="app-field-padding" *ngIf="action==='Edit'">
<input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly> <input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly>
</mat-form-field> </mat-form-field>
<mat-form-field appearance="fill" *ngIf="!isEga()"> <mat-form-field appearance="fill" *ngIf="displayReleaseDate()">
<mat-label>Release date [ This is when your study will be made public. ] </mat-label> <mat-label>Release date [ This is when your study will be made public. ] </mat-label>
<input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate" <input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate"
[min]="today" [max]="maxDate" name="releaseDate"> [min]="today" [max]="maxDate" name="releaseDate">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<mat-checkbox matInput name="provideGenomeAnnotation" (click)="setGenomeAnotation($event)" <mat-checkbox matInput name="provideGenomeAnnotation" (click)="setGenomeAnotation($event)"
[(ngModel)]="provideGenomeAnnotation">Will you provide functional genome annotation ? </mat-checkbox> [(ngModel)]="provideGenomeAnnotation">Will you provide functional genome annotation ? </mat-checkbox>
</div> </div>
<div class="column" *ngIf="!editMode"> <div class="column">
<mat-form-field class="app-field-padding"> <mat-form-field class="app-field-padding">
<input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle" <input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle"
name="studyTitle"> name="studyTitle">
......
...@@ -213,7 +213,9 @@ export class StudyManagementComponent implements OnInit { ...@@ -213,7 +213,9 @@ export class StudyManagementComponent implements OnInit {
} }
setPageValuesfromReport(data) { setPageValuesfromReport(data) {
if (data["holdDate"]) {
this.releaseDate = new Date(data["holdDate"]); this.releaseDate = new Date(data["holdDate"]);
}
this.releaseStatus = data["releaseStatus"]; this.releaseStatus = data["releaseStatus"];
} }
...@@ -348,6 +350,21 @@ export class StudyManagementComponent implements OnInit { ...@@ -348,6 +350,21 @@ export class StudyManagementComponent implements OnInit {
} }
} }
displayReleaseDate() {
// Show release_date if the action is not edit
if (!this.isEga() && this.action != 'Edit') {
return true;
}
// While study edit show release_ate field only if the study status is PRIVATE or TEMPORARY_SUPPRESSED
if (!this.isEga() && this.action === 'Edit' &&
(this.releaseStatus === 'PRIVATE' || this.releaseStatus === 'TEMPORARY_SUPPRESSED')) {
return true;
}
return false;
}
isEga(): boolean { isEga(): boolean {
return this._webinAuthenticationService.ega; return this._webinAuthenticationService.ega;
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<mat-form-field class="app-field-padding" *ngIf="action==='Edit'"> <mat-form-field class="app-field-padding" *ngIf="action==='Edit'">
<input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly> <input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly>
</mat-form-field> </mat-form-field>
<mat-form-field appearance="fill" *ngIf="!isEga()"> <mat-form-field appearance="fill" *ngIf="displayReleaseDate()">
<mat-label>Release date [ This is when your study will be made public. ] </mat-label> <mat-label>Release date [ This is when your study will be made public. ] </mat-label>
<input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate" <input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate"
[min]="today" [max]="maxDate" name="releaseDate"> [min]="today" [max]="maxDate" name="releaseDate">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<input matInput placeholder="Study Name" [(ngModel)]="studyName" name="studyName"> <input matInput placeholder="Study Name" [(ngModel)]="studyName" name="studyName">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="column" *ngIf="!editMode"> <div class="column">
<mat-form-field class="app-field-padding"> <mat-form-field class="app-field-padding">
<input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle" <input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle"
name="studyTitle"> name="studyTitle">
......
...@@ -305,7 +305,9 @@ export class UmbrellaManagementComponent implements OnInit { ...@@ -305,7 +305,9 @@ export class UmbrellaManagementComponent implements OnInit {
} }
setPageValuesfromReport(data) { setPageValuesfromReport(data) {
if (data["holdDate"]) {
this.releaseDate = new Date(data["holdDate"]); this.releaseDate = new Date(data["holdDate"]);
}
this.releaseStatus = data["releaseStatus"]; this.releaseStatus = data["releaseStatus"];
} }
...@@ -556,6 +558,19 @@ export class UmbrellaManagementComponent implements OnInit { ...@@ -556,6 +558,19 @@ export class UmbrellaManagementComponent implements OnInit {
this.childProjectDatasource = new MatTableDataSource<any>(this.childProjectDatasource.data); this.childProjectDatasource = new MatTableDataSource<any>(this.childProjectDatasource.data);
} }
displayReleaseDate() {
// Show release_date if the action is not edit
if (!this.isEga() && this.action != 'Edit') {
return true;
}
// While umbrella edit show release_ate field only if the study status is PRIVATE or TEMPORARY_SUPPRESSED
if (!this.isEga() && this.action === 'Edit' &&
(this.releaseStatus === 'PRIVATE' || this.releaseStatus === 'TEMPORARY_SUPPRESSED')) {
return true;
}
return false;
}
isEga(): boolean { isEga(): boolean {
return this._webinAuthenticationService.ega; return this._webinAuthenticationService.ega;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment