This commit is contained in:
jonaswinkler
2020-12-07 12:44:23 +01:00
parent a76452028f
commit dd60100796
6 changed files with 25 additions and 24 deletions

View File

@@ -1,10 +1,12 @@
<app-widget-frame title="Document consumer status">
<div class="mb-2 border-bottom" *ngFor="let s of getStatus()">
<div class="mb-1"><strong>{{s.filename}}:</strong> {{s.message}}</div>
<ngb-progressbar [type]="getType(s.status)" [value]="s.current_progress" [max]="s.max_progress" class="mb-2"></ngb-progressbar>
<div *ngIf="isFinished(s)" class="mb-2">
<button *ngIf="s.document_id" class="btn btn-sm btn-outline-primary mr-2" routerLink="/documents/{{s.document_id}}" (click)="dismiss(s)">Open document</button>
<button class="btn btn-sm btn-outline-secondary" (click)="dismiss(s)">Dismiss</button>
<ng-container content>
<div class="mb-2 border-bottom" *ngFor="let s of getStatus()">
<div class="mb-1"><strong>{{s.filename}}:</strong> {{s.message}}</div>
<ngb-progressbar [type]="getType(s.status)" [value]="s.current_progress" [max]="s.max_progress" class="mb-2"></ngb-progressbar>
<div *ngIf="isFinished(s)" class="mb-2">
<button *ngIf="s.document_id" class="btn btn-sm btn-outline-primary mr-2" routerLink="/documents/{{s.document_id}}" (click)="dismiss(s)">Open document</button>
<button class="btn btn-sm btn-outline-secondary" (click)="dismiss(s)">Dismiss</button>
</div>
</div>
</div>
</ng-container>
</app-widget-frame>

View File

@@ -29,7 +29,7 @@ export class UploadFileWidgetComponent implements OnInit {
const formData = new FormData()
formData.append('document', file, file.name)
this.documentService.uploadDocument(formData).subscribe(result => {
this.toastService.showInfo(The document has been uploaded and will be processed by the consumer shortly.")
this.toastService.showInfo("The document has been uploaded and will be processed by the consumer shortly.")
}, error => {
switch (error.status) {
case 400: {