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

ENA-4404, ENA-4396 Bug fixing

parent df9f72eb
Pipeline #163874 passed with stages
in 5 minutes and 53 seconds
......@@ -22,4 +22,22 @@
position: fixed; /* or absolute */
top: 50%;
left: 50%;
}
\ No newline at end of file
}
::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 @@
<mat-select class="checklist-restriction"
placeholder="Permitted values">
<mat-option *ngFor="let PermitedValues of field.value_choice"
[value]="field.value_choice">
[value]="PermitedValues" [disabled]="true">
{{ PermitedValues }}
</mat-option>
</mat-select>
......
......@@ -238,7 +238,8 @@
<div>
{{getElementValue(element, col)}}
<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>
</span>
</div>
......
......@@ -12,7 +12,7 @@
<mat-form-field class="app-field-padding" *ngIf="action==='Edit'">
<input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly>
</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>
<input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate"
[min]="today" [max]="maxDate" name="releaseDate">
......@@ -25,7 +25,7 @@
<mat-checkbox matInput name="provideGenomeAnnotation" (click)="setGenomeAnotation($event)"
[(ngModel)]="provideGenomeAnnotation">Will you provide functional genome annotation ? </mat-checkbox>
</div>
<div class="column" *ngIf="!editMode">
<div class="column">
<mat-form-field class="app-field-padding">
<input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle"
name="studyTitle">
......
......@@ -213,7 +213,9 @@ export class StudyManagementComponent implements OnInit {
}
setPageValuesfromReport(data) {
this.releaseDate = new Date(data["holdDate"]);
if (data["holdDate"]) {
this.releaseDate = new Date(data["holdDate"]);
}
this.releaseStatus = data["releaseStatus"];
}
......@@ -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 {
return this._webinAuthenticationService.ega;
}
......
......@@ -12,7 +12,7 @@
<mat-form-field class="app-field-padding" *ngIf="action==='Edit'">
<input matInput placeholder="Project Id" required [(ngModel)]="id" name="id" readonly>
</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>
<input matInput [matDatepicker]="picker" [readonly]="true" required [(ngModel)]="releaseDate"
[min]="today" [max]="maxDate" name="releaseDate">
......@@ -23,7 +23,7 @@
<input matInput placeholder="Study Name" [(ngModel)]="studyName" name="studyName">
</mat-form-field>
</div>
<div class="column" *ngIf="!editMode">
<div class="column">
<mat-form-field class="app-field-padding">
<input matInput placeholder="Short descriptive study title" required [(ngModel)]="studyTitle"
name="studyTitle">
......
......@@ -305,7 +305,9 @@ export class UmbrellaManagementComponent implements OnInit {
}
setPageValuesfromReport(data) {
this.releaseDate = new Date(data["holdDate"]);
if (data["holdDate"]) {
this.releaseDate = new Date(data["holdDate"]);
}
this.releaseStatus = data["releaseStatus"];
}
......@@ -556,6 +558,19 @@ export class UmbrellaManagementComponent implements OnInit {
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 {
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