Project Img Fix To SelectOn IsNew Or On Edit Mode

This commit is contained in:
Diamantis Tziotzios 2019-03-06 16:59:22 +02:00
parent 9a14a73b86
commit d1e71d065a
2 changed files with 8 additions and 1 deletions

View File

@ -8,7 +8,7 @@
<table class="logo-table col-auto">
<tr>
<td>
<img mat-card-avatar (click)='editmode && imgFileInput.click()' *ngIf="!formGroup.get('files') || !formGroup.get('files').value" [src]="host+'files/any?type=jpg'">
<img mat-card-avatar (click)='imgEnable() && imgFileInput.click()' *ngIf="!formGroup.get('files') || !formGroup.get('files').value" [src]="host+'files/any?type=jpg'">
<img mat-card-avatar (click)='editMode && imgFileInput.click()' *ngIf="formGroup.get('files') && formGroup.get('files').value" [src]="host+'files/'+formGroup.get('files').value[0].id+'?location='+formGroup.get('files').value[0].location+'&type='+formGroup.get('files').value[0].type">
</td>
<td>

View File

@ -178,6 +178,13 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr
this.formGroup.disable();
}
public imgEnable():boolean{
if(this.isNew || this.editMode){
return true;
}
return false;
}
public goToProjectDmps() {
this.router.navigate(['plans/project/' + this.project.id], { queryParams: { projectLabel: this.project.label } });
}