paperless-ngx/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts

28 lines
732 B
TypeScript
Raw Normal View History

2020-10-27 01:10:18 +01:00
import { Component, Input, OnInit } from '@angular/core';
import { PaperlessDocument } from 'src/app/data/paperless-document';
import { DocumentService } from 'src/app/services/rest/document.service';
@Component({
selector: 'app-document-card-small',
templateUrl: './document-card-small.component.html',
styleUrls: ['./document-card-small.component.css']
})
export class DocumentCardSmallComponent implements OnInit {
constructor(private documentService: DocumentService) { }
@Input()
document: PaperlessDocument
ngOnInit(): void {
}
getThumbUrl() {
return this.documentService.getThumbUrl(this.document.id)
}
getDownloadUrl() {
return this.documentService.getDownloadUrl(this.document.id)
}
}