Formatting and some UI issue in reports section
This commit is contained in:
parent
6387df7050
commit
5dc54bfdb1
5 changed files with 56 additions and 19 deletions
|
|
@ -14,7 +14,7 @@
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Image</th>
|
||||
<th>Image </th>
|
||||
<th>Doc Number</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<a target="_blank" [href]="'https://www.oneqlik.in'+item.image.substring(6)">
|
||||
<i class="fas fa-file-pdf fa-3x pl-4"></i>
|
||||
</a>
|
||||
<td>
|
||||
</td>
|
||||
<ng-template #pdfSection>
|
||||
|
||||
<td>
|
||||
|
|
@ -128,10 +128,22 @@
|
|||
</thead>
|
||||
<tr>
|
||||
<td>State RTO Certificate</td>
|
||||
<td>
|
||||
<img style="width: 100px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)"
|
||||
(click)="openModal1(template,statePic.substring(6))">
|
||||
</td>
|
||||
|
||||
|
||||
<td *ngIf="hasPdfFile(statePic); else pdfSection">
|
||||
<a target="_blank" [href]="'https://www.oneqlik.in'+statePic.substring(6)">
|
||||
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
||||
</a>
|
||||
</td>
|
||||
<ng-template #pdfSection>
|
||||
|
||||
<td>
|
||||
<img *ngIf="statePic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+statePic.substring(6)" (click)="openModal1(template,statePic.substring(6))">
|
||||
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||
|
||||
</td>
|
||||
</ng-template>
|
||||
|
||||
<td>
|
||||
{{state_certifcate_date |date:"medium"}}
|
||||
</td>
|
||||
|
|
@ -142,10 +154,22 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Vahan Certificate</td>
|
||||
<td>
|
||||
<img style="width: 100px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)"
|
||||
(click)="openModal1(template,vahanPic.substring(6))">
|
||||
</td>
|
||||
|
||||
|
||||
<td *ngIf="hasPdfFile(vahanPic); else pdfSection">
|
||||
<a target="_blank" [href]="'https://www.oneqlik.in'+vahanPic.substring(6)">
|
||||
<i class="fas fa-file-pdf fa-2x pl-4"></i>
|
||||
</a>
|
||||
</td>
|
||||
<ng-template #pdfSection>
|
||||
|
||||
<td>
|
||||
<img *ngIf="vahanPic ; else notAvaillableImg" style="width: 100px;" [src]="'https://www.oneqlik.in'+vahanPic.substring(6)" (click)="openModal1(template,vahanPic.substring(6))">
|
||||
<ng-template #notAvaillableImg>Not Available</ng-template>
|
||||
|
||||
</td>
|
||||
</ng-template>
|
||||
|
||||
<td>
|
||||
{{vaahan_certifcate_date |date:"medium"}}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -415,7 +415,9 @@ submit1(status){
|
|||
|
||||
base64Image
|
||||
downloadImage(imageUrl,name) {
|
||||
|
||||
if(!this.hasPdfFile(imageUrl)) {
|
||||
|
||||
|
||||
this.getBase64ImageFromURL(imageUrl).subscribe(base64data => {
|
||||
this.base64Image = "data:image/jpg;base64," + base64data;
|
||||
// save image to disk
|
||||
|
|
@ -427,6 +429,17 @@ downloadImage(imageUrl,name) {
|
|||
link.setAttribute("download", name);
|
||||
link.click();
|
||||
});
|
||||
}else {
|
||||
var link = document.createElement("a");
|
||||
|
||||
document.body.appendChild(link); // for Firefox
|
||||
|
||||
link.setAttribute("href", imageUrl);
|
||||
link.setAttribute("download", name);
|
||||
|
||||
link.setAttribute("target", '_blank');
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
|
||||
getBase64ImageFromURL(url: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue