diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html index 2dfbe4481..a444474ea 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html @@ -13,7 +13,7 @@ {{doc.created | date}} - {{doc.title}} + {{doc.title}} diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 474c1376d..5a5563571 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -53,11 +53,11 @@ - + - + - +     diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 7c396692e..253833792 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -37,10 +37,10 @@ export class DocumentDetailComponent implements OnInit { title: new FormControl(''), content: new FormControl(''), created: new FormControl(), - correspondent_id: new FormControl(), - document_type_id: new FormControl(), + correspondent: new FormControl(), + document_type: new FormControl(), archive_serial_number: new FormControl(), - tags_id: new FormControl([]) + tags: new FormControl([]) }) constructor( @@ -93,7 +93,7 @@ export class DocumentDetailComponent implements OnInit { modal.componentInstance.success.subscribe(newDocumentType => { this.documentTypeService.listAll().subscribe(documentTypes => { this.documentTypes = documentTypes.results - this.documentForm.get('document_type_id').setValue(newDocumentType.id) + this.documentForm.get('document_type').setValue(newDocumentType.id) }) }) } @@ -104,7 +104,7 @@ export class DocumentDetailComponent implements OnInit { modal.componentInstance.success.subscribe(newCorrespondent => { this.correspondentService.listAll().subscribe(correspondents => { this.correspondents = correspondents.results - this.documentForm.get('correspondent_id').setValue(newCorrespondent.id) + this.documentForm.get('correspondent').setValue(newCorrespondent.id) }) }) } diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index 4e86b6ddc..cf821b643 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -8,12 +8,12 @@
- - {{document.correspondent.name}} - {{document.correspondent.name}}: + + {{document.correspondent_object.name}} + {{document.correspondent_object.name}}: {{document.title}} - +
#{{document.archive_serial_number}}
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 4a44909ec..ac2fdba27 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -20,10 +20,10 @@ export class DocumentCardLargeComponent implements OnInit { details: any @Output() - clickTag = new EventEmitter() + clickTag = new EventEmitter() @Output() - clickCorrespondent = new EventEmitter() + clickCorrespondent = new EventEmitter() ngOnInit(): void { } diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html index 4da5cdf9b..4ab48d5e6 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html @@ -1,15 +1,15 @@
-
- +
+

- - {{document.correspondent.name}}: + + {{document.correspondent_object.name}}: {{document.title}}

diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts index 2c0ca8dfb..08202bfc9 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts @@ -16,10 +16,10 @@ export class DocumentCardSmallComponent implements OnInit { document: PaperlessDocument @Output() - clickTag = new EventEmitter() + clickTag = new EventEmitter() @Output() - clickCorrespondent = new EventEmitter() + clickCorrespondent = new EventEmitter() ngOnInit(): void { } diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index 48387b3e3..af7a049c7 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -100,17 +100,17 @@ {{d.archive_serial_number}} - - {{d.correspondent.name}} + + {{d.correspondent_object.name}} {{d.title}} - + - - {{d.document_type.name}} + + {{d.document_type_object.name}} diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts index 153b31d8c..c3550a856 100644 --- a/src-ui/src/app/components/document-list/document-list.component.ts +++ b/src-ui/src/app/components/document-list/document-list.component.ts @@ -95,40 +95,40 @@ export class DocumentListComponent implements OnInit { }) } - filterByTag(t: PaperlessTag) { + filterByTag(tag_id: number) { let filterRules = this.list.filterRules - if (filterRules.find(rule => rule.type.id == FILTER_HAS_TAG && rule.value == t.id)) { + if (filterRules.find(rule => rule.type.id == FILTER_HAS_TAG && rule.value == tag_id)) { return } - filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_HAS_TAG), value: t.id}) + filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_HAS_TAG), value: tag_id}) this.filterRules = filterRules this.applyFilterRules() } - filterByCorrespondent(c: PaperlessCorrespondent) { + filterByCorrespondent(correspondent_id: number) { let filterRules = this.list.filterRules let existing_rule = filterRules.find(rule => rule.type.id == FILTER_CORRESPONDENT) - if (existing_rule && existing_rule.value == c.id) { + if (existing_rule && existing_rule.value == correspondent_id) { return } else if (existing_rule) { - existing_rule.value = c.id + existing_rule.value = correspondent_id } else { - filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_CORRESPONDENT), value: c.id}) + filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_CORRESPONDENT), value: correspondent_id}) } this.filterRules = filterRules this.applyFilterRules() } - filterByDocumentType(dt: PaperlessDocumentType) { + filterByDocumentType(document_type_id: number) { let filterRules = this.list.filterRules let existing_rule = filterRules.find(rule => rule.type.id == FILTER_DOCUMENT_TYPE) - if (existing_rule && existing_rule.value == dt.id) { + if (existing_rule && existing_rule.value == document_type_id) { return } else if (existing_rule) { - existing_rule.value = dt.id + existing_rule.value = document_type_id } else { - filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_DOCUMENT_TYPE), value: dt.id}) + filterRules.push({type: FILTER_RULE_TYPES.find(t => t.id == FILTER_DOCUMENT_TYPE), value: document_type_id}) } this.filterRules = filterRules this.applyFilterRules() diff --git a/src-ui/src/app/data/paperless-document.ts b/src-ui/src/app/data/paperless-document.ts index 31a24bcad..b69a35495 100644 --- a/src-ui/src/app/data/paperless-document.ts +++ b/src-ui/src/app/data/paperless-document.ts @@ -5,13 +5,13 @@ import { PaperlessDocumentType } from './paperless-document-type' export interface PaperlessDocument extends ObjectWithId { - correspondent?: PaperlessCorrespondent + correspondent_object?: PaperlessCorrespondent - correspondent_id?: number + correspondent?: number - document_type?: PaperlessDocumentType + document_type_object?: PaperlessDocumentType - document_type_id?: number + document_type?: number title?: string @@ -19,9 +19,9 @@ export interface PaperlessDocument extends ObjectWithId { file_type?: string - tags?: PaperlessTag[] + tags_objects?: PaperlessTag[] - tags_id?: number[] + tags?: number[] checksum?: string