Skip to content
Snippets Groups Projects
Commit addaabf4 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5010 attachment isLoading

parent 8e0af92d
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[file]="file" [file]="file"
[stateResource]="fileStateResource$ | async" [stateResource]="fileStateResource$ | async"
[deletable]="deletable" [deletable]="deletable"
[isLoading]="isLoading"
[downloadToken]="downloadToken$ | async" [downloadToken]="downloadToken$ | async"
(startDownload)="startDownload($event)" (startDownload)="startDownload($event)"
(startDelete)="startDelete.emit($event)" (startDelete)="startDelete.emit($event)"
......
...@@ -13,6 +13,7 @@ export class BinaryFile2ContainerComponent { ...@@ -13,6 +13,7 @@ export class BinaryFile2ContainerComponent {
@Input() file: BinaryFileResource; @Input() file: BinaryFileResource;
@Input() downloadFileNamePrefix: string; @Input() downloadFileNamePrefix: string;
@Input() deletable: boolean = false; @Input() deletable: boolean = false;
@Input() isLoading: boolean = false;
@Output() startDelete: EventEmitter<BinaryFileResource> = new EventEmitter(); @Output() startDelete: EventEmitter<BinaryFileResource> = new EventEmitter();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(click)="downloadFile()" (click)="downloadFile()"
[attr.aria-label]="'Anhang: Dateiname: ' + file.name" [attr.aria-label]="'Anhang: Dateiname: ' + file.name"
> >
<ods-spinner-icon spinner *ngIf="false" class="mr-3 size-10" /> <ods-spinner-icon spinner *ngIf="isLoading" class="mr-3 size-10" />
<ods-icon icon name="file-pdf" class="mr-3 size-10 fill-primary"></ods-icon> <ods-icon icon name="file-pdf" class="mr-3 size-10 fill-primary"></ods-icon>
<button <button
close close
......
...@@ -16,6 +16,7 @@ export class BinaryFile2Component { ...@@ -16,6 +16,7 @@ export class BinaryFile2Component {
@Input() stateResource: StateResource<Resource>; @Input() stateResource: StateResource<Resource>;
@Input() deletable: boolean = false; @Input() deletable: boolean = false;
@Input() downloadToken: ApiDownloadToken = <ApiDownloadToken>{}; @Input() downloadToken: ApiDownloadToken = <ApiDownloadToken>{};
@Input() isLoading: boolean = false;
readonly fileLinkRel = BinaryFileLinkRel; readonly fileLinkRel = BinaryFileLinkRel;
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
></alfa-vorgang-detail-bescheiden-form-error> ></alfa-vorgang-detail-bescheiden-form-error>
<p *ngIf="attachment.loading">loading...</p> <p *ngIf="attachment.loading">loading...</p>
<alfa-binary-file2-container <alfa-binary-file2-container
*ngIf="!attachment.error && attachment.loaded" *ngIf="!attachment.error"
[file]="attachment.resource" [file]="attachment.resource"
[deletable]="true" [deletable]="true"
(startDelete)="deleteFile($event)" (startDelete)="deleteFile($event)"
[isLoading]="attachment.loading"
> >
</alfa-binary-file2-container> </alfa-binary-file2-container>
</ng-container> </ng-container>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment