This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
@if(isLoading) {
|
||||
<div class="loading-overlay">
|
||||
<mat-spinner></mat-spinner>
|
||||
</div>
|
||||
}
|
||||
<h2 mat-dialog-title>Übergabeprotokoll</h2>
|
||||
<mat-dialog-content>
|
||||
<div class="text" style="margin: 0 0 24px 0;">
|
||||
|
||||
@@ -8,10 +8,11 @@ import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { IKeyHandoverPDF } from '../../../../model/interface/handover-pdf.interface';
|
||||
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-handover-pdf-dialog',
|
||||
imports: [MatDialogModule, FormsModule, ReactiveFormsModule, CommonModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule],
|
||||
imports: [MatDialogModule, FormsModule, ReactiveFormsModule, CommonModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule, MatProgressSpinnerModule],
|
||||
templateUrl: './create-handover-pdf-dialog.component.html',
|
||||
styleUrl: './create-handover-pdf-dialog.component.scss',
|
||||
})
|
||||
|
||||
@@ -83,11 +83,11 @@ export class HandoverDialogComponent extends AgGridContainerComponent {
|
||||
{
|
||||
colId: 'download',
|
||||
headerName: 'PDF',
|
||||
field: 'pdfFormKey',
|
||||
field: 'pdfs',
|
||||
width: 60,
|
||||
tooltipValueGetter: () => 'Übergabeprotokoll herunterladen',
|
||||
cellRenderer: () => '',
|
||||
cellClass: (data: any) => data.value ? 'download-pdf' : '',
|
||||
cellClass: (data: any) => data.value.length ? 'download-pdf' : '',
|
||||
onCellClicked: (event) => {
|
||||
this.downloadHandoverPDF(event.value)
|
||||
},
|
||||
@@ -232,9 +232,10 @@ export class HandoverDialogComponent extends AgGridContainerComponent {
|
||||
//this.downloadHandoverPDF('5b1f92d9-c66c-49ad-b654-b9a9a6a59752')
|
||||
}
|
||||
|
||||
downloadHandoverPDF(key: string) {
|
||||
if (!key) { return; }
|
||||
this.api.getHandoverPdf(key)
|
||||
downloadHandoverPDF(pdfs: any[]) {
|
||||
if (!pdfs || pdfs.length < 1) { return; }
|
||||
|
||||
this.api.getHandoverPdf(pdfs[0]['fileName'])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -246,4 +246,19 @@ div.ag-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.loading-overlay {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
Reference in New Issue
Block a user