From fa6d554d1fbbc4ac57159f4acd8d27ffc1244f8b Mon Sep 17 00:00:00 2001 From: isaacsando Date: Tue, 16 Mar 2021 11:16:48 -0500 Subject: [PATCH 1/8] update advanced_usage.rst to remove wording regarding filename parsing --- docs/advanced_usage.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/advanced_usage.rst b/docs/advanced_usage.rst index c64df4317..b7d46e063 100644 --- a/docs/advanced_usage.rst +++ b/docs/advanced_usage.rst @@ -10,14 +10,13 @@ easier. Matching tags, correspondents and document types ################################################ -After the consumer has tried to figure out what it could from the file name, -it starts looking at the content of the document itself. It will compare the -matching algorithms defined by every tag and correspondent already set in your -database to see if they apply to the text in that document. In other words, -if you defined a tag called ``Home Utility`` that had a ``match`` property of -``bc hydro`` and a ``matching_algorithm`` of ``literal``, Paperless will -automatically tag your newly-consumed document with your ``Home Utility`` tag -so long as the text ``bc hydro`` appears in the body of the document somewhere. +Paperless will compare the matching algorithms defined by every tag and +correspondent already set in your database to see if they apply to the text in +a document. In other words, if you defined a tag called ``Home Utility`` +that had a ``match`` property of ``bc hydro`` and a ``matching_algorithm`` of +``literal``, Paperless will automatically tag your newly-consumed document with +your ``Home Utility`` tag so long as the text ``bc hydro`` appears in the body +of the document somewhere. The matching logic is quite powerful, and supports searching the text of your document with different algorithms, and as such, some experimentation may be From 126a4ec21fc8e92a3f6106674dc14cb6ede9c380 Mon Sep 17 00:00:00 2001 From: HolzHannes Date: Sat, 20 Mar 2021 11:10:05 +0100 Subject: [PATCH 2/8] Update scanners.rst Some new scanners and a new Support column SMTP for Scanner which can directly send mails via SMTP. Also one iOS App to scan documents --- docs/scanners.rst | 54 +++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/docs/scanners.rst b/docs/scanners.rst index ad7566c71..04856bbfc 100644 --- a/docs/scanners.rst +++ b/docs/scanners.rst @@ -13,26 +13,35 @@ that works right for you based on recommendations from other Paperless users. Physical scanners ================= -+---------+----------------+-----+-----+-----+----------------+ -| Brand | Model | Supports | Recommended By | -+---------+----------------+-----+-----+-----+----------------+ -| | | FTP | NFS | SMB | | -+=========+================+=====+=====+=====+================+ -| Brother | `ADS-1500W`_ | yes | no | yes | `danielquinn`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Brother | `MFC-J6930DW`_ | yes | | | `ayounggun`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Brother | `MFC-J5910DW`_ | yes | | | `bmsleight`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Brother | `MFC-9142CDN`_ | yes | | yes | `REOLDEV`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Fujitsu | `ix500`_ | yes | | yes | `eonist`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Epson | `WF-7710DWF`_ | yes | | yes | `Skylinar`_ | -+---------+----------------+-----+-----+-----+----------------+ -| Fujitsu | `S1300i`_ | yes | | yes | `jonaswinkler`_| -+---------+----------------+-----+-----+-----+----------------+ ++---------+----------------+-----+-----+-----+------+----------------+ +| Brand | Model | Supports | Recommended By | ++---------+----------------+-----+-----+-----+------+----------------+ +| | | FTP | NFS | SMB | SMTP | | ++=========+================+=====+=====+=====+======+================+ +| Brother | `ADS-1700W`_ | yes | no | yes | yes |`holzhannes`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `ADS-1600W`_ | yes | no | yes | yes |`holzhannes`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `ADS-1500W`_ | yes | no | yes | yes |`danielquinn`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `MFC-J6930DW`_ | yes | | | |`ayounggun`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `MFC-L5850DW`_ | yes | | | yes |`holzhannes`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `MFC-J5910DW`_ | yes | | | |`bmsleight`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Brother | `MFC-9142CDN`_ | yes | | yes | |`REOLDEV`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Fujitsu | `ix500`_ | yes | | yes | |`eonist`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Epson | `WF-7710DWF`_ | yes | | yes | |`Skylinar`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +| Fujitsu | `S1300i`_ | yes | | yes | |`jonaswinkler`_ | ++---------+----------------+-----+-----+-----+------+----------------+ +.. _MFC-L5850DW: https://www.brother-usa.com/products/mfcl5850dw +.. _ADS-1700W: https://www.brother-usa.com/products/ads1700w +.. _ADS-1600W: https://www.brother-usa.com/products/ads1600w .. _ADS-1500W: https://www.brother.ca/en/p/ads1500w .. _MFC-J6930DW: https://www.brother.ca/en/p/MFCJ6930DW .. _MFC-J5910DW: https://www.brother.co.uk/printers/inkjet-printers/mfcj5910dw @@ -41,6 +50,7 @@ Physical scanners .. _WF-7710DWF: https://www.epson.de/en/products/printers/inkjet-printers/for-home/workforce-wf-7710dwf .. _S1300i: https://www.fujitsu.com/global/products/computing/peripheral/scanners/soho/s1300i/ + .. _danielquinn: https://github.com/danielquinn .. _ayounggun: https://github.com/ayounggun .. _bmsleight: https://github.com/bmsleight @@ -48,6 +58,7 @@ Physical scanners .. _REOLDEV: https://github.com/REOLDEV .. _Skylinar: https://github.com/Skylinar .. _jonaswinkler: https://github.com/jonaswinkler +.. _holzhannes: https://github.com/holzhannes Mobile phone software ===================== @@ -63,10 +74,13 @@ You can use your phone to "scan" documents. The regular camera app will work, bu +-------------------+----------------+-----+-----+-----+-------+--------+----------------+ | `Genius Scan`_ | Android | yes | no | yes | yes | yes | `hannahswain`_ | +-------------------+----------------+-----+-----+-----+-------+--------+----------------+ +| `Quick Scan`_ | iOS | no | no | no | no | no | `holzhannes`_ | ++-------------------+----------------+-----+-----+-----+-------+--------+----------------+ -On Android, you can use these applications in combination with one of the :ref:`Paperless-ng compatible apps ` to "Share" the documents produced by these scanner apps with paperless. +On Android, you can use these applications in combination with one of the :ref:`Paperless-ng compatible apps ` to "Share" the documents produced by these scanner apps with paperless. On iOS, you can share the scanned documents via iOS-Sharing to other mail, WebDav or FTP apps. .. _Office Lens: https://play.google.com/store/apps/details?id=com.microsoft.office.officelens .. _Genius Scan: https://play.google.com/store/apps/details?id=com.thegrizzlylabs.geniusscan.free +.. _Quick Scan: https://apps.apple.com/us/app/quickscan-scanner-text-ocr/id1513790291 .. _hannahswain: https://github.com/hannahswain From 21fafd3255fe170e9682ebec39191b1383a4f999 Mon Sep 17 00:00:00 2001 From: Jonas Winkler <17569239+jonaswinkler@users.noreply.github.com> Date: Mon, 22 Mar 2021 23:03:01 +0100 Subject: [PATCH 3/8] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 45c71ab67..238955342 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,7 @@ The documentation for Paperless-ng is available on [ReadTheDocs](https://paperle # Translation -Paperless is currently available in English, German, Dutch, French, Portuguese, Italian, and Romanian. - -There's an active translation project at crowdin! If you want to help out by translating paperless into your language, please head over to https://github.com/jonaswinkler/paperless-ng/issues/212 for details. +Paperless is available in many different languages. Translation is coordinated at crowdin. If you want to help out by translating paperless into your language, please head over to https://github.com/jonaswinkler/paperless-ng/issues/212 for details! # Feature Requests From ccaee4ce6205227a5c9b042bc6d9b2f35feba063 Mon Sep 17 00:00:00 2001 From: Jonas Winkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 24 Mar 2021 10:31:05 +0100 Subject: [PATCH 4/8] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 238955342..5cac22e55 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ Paperless-ng is a fork of the original project, adding a new interface and many other changes under the hood. These key points should help you decide whether Paperless-ng is something you would prefer over Paperless: -* Interface: The new front end is the main interface for paperless-ng, the old interface still exists but most customizations (such as thumbnails for the document list) have been removed. +* Interface: The new front end is the main interface for Paperless-ng, the old interface still exists but most customizations (such as thumbnails for the document list) have been removed.0 * Encryption: Paperless-ng does not support GnuPG anymore, since storing your data on encrypted file systems (that you optionally mount on demand) achieves about the same result. -* Resource usage: Paperless-ng does use a bit more resources than Paperless. Running the web server requires about 300MB of RAM or more, depending on the configuration. While adding documents, it requires about 300MB additional RAM, depending on the document. It still runs on Pi (many users do that), but it has been generally geared to better use the resources of more powerful systems. +* Resource usage: Paperless-ng does use a bit more resources than Paperless. Running the web server requires about 300MB of RAM or more, depending on the configuration. While adding documents, it requires about 300MB additional RAM, depending on the document. It still runs on Raspberry Pi (many users do that), but it has been generally geared to better use the resources of more powerful systems. * API changes: If you rely on the REST API of paperless, some of its functionality has been changed. -For a detailed list of changes, have a look at the [change log](https://paperless-ng.readthedocs.io/en/latest/changelog.html) in the documentation. +For a detailed list of changes, have a look at the [change log](https://paperless-ng.readthedocs.io/en/latest/changelog.html) in the documentation, especially the section about the [0.9.0 release](https://paperless-ng.readthedocs.io/en/latest/changelog.html#paperless-ng-0-9-0). # How it Works @@ -25,7 +25,7 @@ Paperless does not control your scanner, it only helps you deal with what your s 1. Buy a document scanner that can write to a place on your network. If you need some inspiration, have a look at the [scanner recommendations](https://paperless-ng.readthedocs.io/en/latest/scanners.html) page. Set it up to "scan to FTP" or something similar. It should be able to push scanned images to a server without you having to do anything. Of course if your scanner doesn't know how to automatically upload the file somewhere, you can always do that manually. Paperless doesn't care how the documents get into its local consumption directory. - - Alternatively, you can use any of the mobile scanning apps out there. We have an app that allows you to share documents with paperless, if you're on Android. See the section on affiliated projects. + - Alternatively, you can use any of the mobile scanning apps out there. We have an app that allows you to share documents with paperless, if you're on Android. See the section on affiliated projects below. 2. Wait for paperless to process your files. OCR is expensive, and depending on the power of your machine, this might take a bit of time. 3. Use the web frontend to sift through the database and find what you want. @@ -35,6 +35,8 @@ Here's what you get: ![Dashboard](https://github.com/jonaswinkler/paperless-ng/raw/master/docs/_static/screenshots/dashboard.png) +If you want to see paperless-ng in action, [more screenshots are available in the documentation](https://paperless-ng.readthedocs.io/en/latest/screenshots.html). + # Features * Performs OCR on your documents, adds selectable text to image only documents and adds tags, correspondents and document types to your documents. @@ -58,19 +60,17 @@ Here's what you get: * Optimized for multi core systems: Paperless-ng consumes multiple documents in parallel. * The integrated sanity checker makes sure that your document archive is in good health. -If you want to see some screenshots of paperless-ng in action, [some are available in the documentation](https://paperless-ng.readthedocs.io/en/latest/screenshots.html). - # Getting started The recommended way to deploy paperless is docker-compose. The files in the /docker/hub directory are configured to pull the image from Docker Hub. Read the [documentation](https://paperless-ng.readthedocs.io/en/latest/setup.html#installation) on how to get started. -Alternatively, you can install the dependencies and setup apache and a database server yourself. The documenation has a step by step guide on how to do it. +Alternatively, you can install the dependencies and setup apache and a database server yourself. The documenation has a step by step guide on how to do it. Consider giving the Ansible role a shot, this essentially automates the entire bare metal installation process. -# Migrating to paperless-ng +# Migrating from Paperless to Paperless-ng -Read the section about [migration](https://paperless-ng.readthedocs.io/en/latest/setup.html#migration-to-paperless-ng) in the documentation. Its also entirely possible to go back to paperless by reverting the database migrations. +Read the section about [migration](https://paperless-ng.readthedocs.io/en/latest/setup.html#migration-to-paperless-ng) in the documentation. Its also entirely possible to go back to Paperless by reverting the database migrations. # Documentation @@ -92,7 +92,7 @@ For bugs please [open an issue](https://github.com/jonaswinkler/paperless-ng/iss There's still lots of things to be done, just have a look at open issues & discussions. If you feel like contributing to the project, please do! Bug fixes and improvements to the front end (I just can't seem to get some of these CSS things right) are always welcome. The documentation has some basic information on how to get started. -If you want to implement something big: Please start a discussion about that in the issues! Maybe I've already had something similar in mind and we can make it happen together. However, keep in mind that the general roadmap is to make the existing features stable and get them tested. See the roadmap above. +If you want to implement something big: Please start a discussion about that! Maybe I've already had something similar in mind and we can make it happen together. However, keep in mind that the general roadmap is to make the existing features stable and get them tested. # Affiliated Projects From 7eb4253c001fecbf299906ad311e699091ac14f3 Mon Sep 17 00:00:00 2001 From: benjaminfrank Date: Sat, 27 Mar 2021 14:40:13 +0100 Subject: [PATCH 5/8] Update scanners.rst --- docs/scanners.rst | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/scanners.rst b/docs/scanners.rst index 04856bbfc..752063bb4 100644 --- a/docs/scanners.rst +++ b/docs/scanners.rst @@ -65,22 +65,26 @@ Mobile phone software You can use your phone to "scan" documents. The regular camera app will work, but may have too low contrast for OCR to work well. Apps specifically for scanning are recommended. -+-------------------+----------------+-----+-----+-----+-------+--------+----------------+ -| Name | OS | Supports | Recommended By | -+-------------------+----------------+-----+-----+-----+-------+--------+----------------+ -| | | FTP | NFS | SMB | Email | WebDav | | -+===================+================+=====+=====+=====+=======+========+================+ -| `Office Lens`_ | Android | ? | ? | ? | ? | ? | `jonaswinkler`_| -+-------------------+----------------+-----+-----+-----+-------+--------+----------------+ -| `Genius Scan`_ | Android | yes | no | yes | yes | yes | `hannahswain`_ | -+-------------------+----------------+-----+-----+-----+-------+--------+----------------+ -| `Quick Scan`_ | iOS | no | no | no | no | no | `holzhannes`_ | -+-------------------+----------------+-----+-----+-----+-------+--------+----------------+ ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ +| Name | OS | Supports | Recommended By | ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ +| | | FTP | NFS | SMB | Email | WebDav | | ++===================+================+=====+=====+=====+=======+========+==================+ +| `Office Lens`_ | Android | ? | ? | ? | ? | ? | `jonaswinkler`_ | ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ +| `Genius Scan`_ | Android | yes | no | yes | yes | yes | `hannahswain`_ | ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ +| `OpenScan`_ | Android | no | no | no | no | no | `benjaminfrank`_ | ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ +| `Quick Scan`_ | iOS | no | no | no | no | no | `holzhannes`_ | ++-------------------+----------------+-----+-----+-----+-------+--------+------------------+ On Android, you can use these applications in combination with one of the :ref:`Paperless-ng compatible apps ` to "Share" the documents produced by these scanner apps with paperless. On iOS, you can share the scanned documents via iOS-Sharing to other mail, WebDav or FTP apps. .. _Office Lens: https://play.google.com/store/apps/details?id=com.microsoft.office.officelens .. _Genius Scan: https://play.google.com/store/apps/details?id=com.thegrizzlylabs.geniusscan.free .. _Quick Scan: https://apps.apple.com/us/app/quickscan-scanner-text-ocr/id1513790291 +.. _OpenScan: https://github.com/Ethereal-Developers-Inc/OpenScan .. _hannahswain: https://github.com/hannahswain +.. _benjaminfrank: https://github.com/benjaminfrank From f62e64357bef1c4a074f0975243d9cc6dda99165 Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 30 Mar 2021 19:07:29 +0200 Subject: [PATCH 6/8] implements #807 --- src-ui/src/app/app-routing.module.ts | 6 ++- src-ui/src/app/app.module.ts | 4 +- .../document-asncomponent.component.html | 1 + .../document-asncomponent.component.scss | 0 .../document-asncomponent.component.spec.ts | 25 ++++++++++++ .../document-asncomponent.component.ts | 38 +++++++++++++++++++ 6 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html create mode 100644 src-ui/src/app/components/document-asncomponent/document-asncomponent.component.scss create mode 100644 src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts create mode 100644 src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index 27f0629b4..8f9af68ca 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -11,6 +11,7 @@ import { SettingsComponent } from './components/manage/settings/settings.compone import { TagListComponent } from './components/manage/tag-list/tag-list.component'; import { NotFoundComponent } from './components/not-found/not-found.component'; import { SearchComponent } from './components/search/search.component'; +import {DocumentASNComponentComponent} from "./components/document-asncomponent/document-asncomponent.component"; const routes: Routes = [ {path: '', redirectTo: 'dashboard', pathMatch: 'full'}, @@ -20,13 +21,14 @@ const routes: Routes = [ {path: 'view/:id', component: DocumentListComponent }, {path: 'search', component: SearchComponent }, {path: 'documents/:id', component: DocumentDetailComponent }, - + {path: 'asn/:id', component: DocumentASNComponentComponent }, + {path: 'tags', component: TagListComponent }, {path: 'documenttypes', component: DocumentTypeListComponent }, {path: 'correspondents', component: CorrespondentListComponent }, {path: 'logs', component: LogsComponent }, {path: 'settings', component: SettingsComponent }, - ]}, + ]}, {path: '404', component: NotFoundComponent}, {path: '**', redirectTo: '/404', pathMatch: 'full'} diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index ca87d1a07..4645caf4b 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -75,6 +75,7 @@ import localeEnGb from '@angular/common/locales/en-GB'; import localeRo from '@angular/common/locales/ro'; import localeRu from '@angular/common/locales/ru'; import localeEs from '@angular/common/locales/es'; +import { DocumentASNComponentComponent } from './components/document-asncomponent/document-asncomponent.component'; registerLocaleData(localeFr) @@ -138,7 +139,8 @@ registerLocaleData(localeEs) SafePipe, CustomDatePipe, DateComponent, - ColorComponent + ColorComponent, + DocumentASNComponentComponent ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html new file mode 100644 index 000000000..aa0cdc641 --- /dev/null +++ b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html @@ -0,0 +1 @@ +

Searching document with asn {{asn}}

diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.scss b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts new file mode 100644 index 000000000..9e1b6c059 --- /dev/null +++ b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DocumentASNComponentComponent } from './document-asncomponent.component'; + +describe('DocumentASNComponentComponent', () => { + let component: DocumentASNComponentComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DocumentASNComponentComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(DocumentASNComponentComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts new file mode 100644 index 000000000..549cb8792 --- /dev/null +++ b/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts @@ -0,0 +1,38 @@ +import { Component, OnInit } from '@angular/core'; +import {DocumentService} from "../../services/rest/document.service"; +import {ActivatedRoute, Router} from "@angular/router"; +import {CorrespondentService} from "../../services/rest/correspondent.service"; +import {DocumentTypeService} from "../../services/rest/document-type.service"; +import {FILTER_ASN} from "../../data/filter-rule-type"; + +@Component({ + selector: 'app-document-asncomponent', + templateUrl: './document-asncomponent.component.html', + styleUrls: ['./document-asncomponent.component.scss'] +}) +export class DocumentASNComponentComponent implements OnInit { + + asn: string; + constructor( + private documentsService: DocumentService, + private route: ActivatedRoute, + private correspondentService: CorrespondentService, + private documentTypeService: DocumentTypeService, + private router: Router) { } + + + ngOnInit(): void { + + this.route.paramMap.subscribe(paramMap => { + this.asn = paramMap.get('id'); + this.documentsService.listAllFilteredIds([{rule_type: FILTER_ASN, value: this.asn}]).subscribe(documentId => { + if (documentId.length == 1) { + this.router.navigate(['documents', documentId[0]]) + } else { + this.router.navigate(['404']) + } + }) + }) + + } +} From 1ec4570c8ddf738218b20db93650e73b154b39ed Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 30 Mar 2021 19:26:20 +0200 Subject: [PATCH 7/8] renames document-asn component --- src-ui/src/app/app-routing.module.ts | 4 ++-- src-ui/src/app/app.module.ts | 4 ++-- .../document-asn.component.html} | 0 .../document-asn.component.scss} | 0 .../document-asn.component.spec.ts} | 10 +++++----- .../document-asn.component.ts} | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) rename src-ui/src/app/components/{document-asncomponent/document-asncomponent.component.html => document-asn/document-asn.component.html} (100%) rename src-ui/src/app/components/{document-asncomponent/document-asncomponent.component.scss => document-asn/document-asn.component.scss} (100%) rename src-ui/src/app/components/{document-asncomponent/document-asncomponent.component.spec.ts => document-asn/document-asn.component.spec.ts} (56%) rename src-ui/src/app/components/{document-asncomponent/document-asncomponent.component.ts => document-asn/document-asn.component.ts} (86%) diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index 8f9af68ca..7658fc77d 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -11,7 +11,7 @@ import { SettingsComponent } from './components/manage/settings/settings.compone import { TagListComponent } from './components/manage/tag-list/tag-list.component'; import { NotFoundComponent } from './components/not-found/not-found.component'; import { SearchComponent } from './components/search/search.component'; -import {DocumentASNComponentComponent} from "./components/document-asncomponent/document-asncomponent.component"; +import {DocumentAsnComponent} from "./components/document-asn/document-asn.component"; const routes: Routes = [ {path: '', redirectTo: 'dashboard', pathMatch: 'full'}, @@ -21,7 +21,7 @@ const routes: Routes = [ {path: 'view/:id', component: DocumentListComponent }, {path: 'search', component: SearchComponent }, {path: 'documents/:id', component: DocumentDetailComponent }, - {path: 'asn/:id', component: DocumentASNComponentComponent }, + {path: 'asn/:id', component: DocumentAsnComponent }, {path: 'tags', component: TagListComponent }, {path: 'documenttypes', component: DocumentTypeListComponent }, diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 4645caf4b..346228b2d 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -75,7 +75,7 @@ import localeEnGb from '@angular/common/locales/en-GB'; import localeRo from '@angular/common/locales/ro'; import localeRu from '@angular/common/locales/ru'; import localeEs from '@angular/common/locales/es'; -import { DocumentASNComponentComponent } from './components/document-asncomponent/document-asncomponent.component'; +import { DocumentAsnComponent } from './components/document-asn/document-asn.component'; registerLocaleData(localeFr) @@ -140,7 +140,7 @@ registerLocaleData(localeEs) CustomDatePipe, DateComponent, ColorComponent, - DocumentASNComponentComponent + DocumentAsnComponent ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html b/src-ui/src/app/components/document-asn/document-asn.component.html similarity index 100% rename from src-ui/src/app/components/document-asncomponent/document-asncomponent.component.html rename to src-ui/src/app/components/document-asn/document-asn.component.html diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.scss b/src-ui/src/app/components/document-asn/document-asn.component.scss similarity index 100% rename from src-ui/src/app/components/document-asncomponent/document-asncomponent.component.scss rename to src-ui/src/app/components/document-asn/document-asn.component.scss diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts b/src-ui/src/app/components/document-asn/document-asn.component.spec.ts similarity index 56% rename from src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts rename to src-ui/src/app/components/document-asn/document-asn.component.spec.ts index 9e1b6c059..5a9826f8d 100644 --- a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.spec.ts +++ b/src-ui/src/app/components/document-asn/document-asn.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { DocumentASNComponentComponent } from './document-asncomponent.component'; +import { DocumentAsnComponent } from './document-asn.component'; describe('DocumentASNComponentComponent', () => { - let component: DocumentASNComponentComponent; - let fixture: ComponentFixture; + let component: DocumentAsnComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ DocumentASNComponentComponent ] + declarations: [ DocumentAsnComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(DocumentASNComponentComponent); + fixture = TestBed.createComponent(DocumentAsnComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts b/src-ui/src/app/components/document-asn/document-asn.component.ts similarity index 86% rename from src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts rename to src-ui/src/app/components/document-asn/document-asn.component.ts index 549cb8792..4c80cedd7 100644 --- a/src-ui/src/app/components/document-asncomponent/document-asncomponent.component.ts +++ b/src-ui/src/app/components/document-asn/document-asn.component.ts @@ -7,10 +7,10 @@ import {FILTER_ASN} from "../../data/filter-rule-type"; @Component({ selector: 'app-document-asncomponent', - templateUrl: './document-asncomponent.component.html', - styleUrls: ['./document-asncomponent.component.scss'] + templateUrl: './document-asn.component.html', + styleUrls: ['./document-asn.component.scss'] }) -export class DocumentASNComponentComponent implements OnInit { +export class DocumentAsnComponent implements OnInit { asn: string; constructor( From b783e0e211023d687de83e1b27d40e67d886c76b Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 30 Mar 2021 20:51:49 +0200 Subject: [PATCH 8/8] refactoring --- src-ui/messages.xlf | 161 +++++++++--------- .../document-asn/document-asn.component.html | 2 +- .../document-asn/document-asn.component.ts | 6 +- 3 files changed, 86 insertions(+), 83 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 959d90a1b..4ffab896d 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -2,48 +2,6 @@ - - Document added - - src/app/app.component.ts - 51 - - - - Document was added to paperless. - - src/app/app.component.ts - 51 - - - - Open document - - src/app/app.component.ts - 51 - - - - Could not add : - - src/app/app.component.ts - 59 - - - - New document detected - - src/app/app.component.ts - 65 - - - - Document is being processed by paperless. - - src/app/app.component.ts - 65 - - Documents @@ -394,6 +352,48 @@ 131 + + Document added + + src/app/app.component.ts + 51 + + + + Document was added to paperless. + + src/app/app.component.ts + 51 + + + + Open document + + src/app/app.component.ts + 51 + + + + Could not add : + + src/app/app.component.ts + 59 + + + + New document detected + + src/app/app.component.ts + 65 + + + + Document is being processed by paperless. + + src/app/app.component.ts + 65 + + Hello , welcome to Paperless-ng! @@ -1626,6 +1626,13 @@ 14 + + Searching document with asn + + src/app/components/document-asn/document-asn.component.html + 1 + + Yes @@ -1731,6 +1738,41 @@ 106 + + Correspondent + + src/app/services/rest/document.service.ts + 18 + + + + Document type + + src/app/services/rest/document.service.ts + 20 + + + + Created + + src/app/services/rest/document.service.ts + 21 + + + + Added + + src/app/services/rest/document.service.ts + 22 + + + + Modified + + src/app/services/rest/document.service.ts + 23 + + Document already exists. @@ -1840,41 +1882,6 @@ 39 - - Correspondent - - src/app/services/rest/document.service.ts - 18 - - - - Document type - - src/app/services/rest/document.service.ts - 20 - - - - Created - - src/app/services/rest/document.service.ts - 21 - - - - Added - - src/app/services/rest/document.service.ts - 22 - - - - Modified - - src/app/services/rest/document.service.ts - 23 - - Create new item diff --git a/src-ui/src/app/components/document-asn/document-asn.component.html b/src-ui/src/app/components/document-asn/document-asn.component.html index aa0cdc641..8cb969ea0 100644 --- a/src-ui/src/app/components/document-asn/document-asn.component.html +++ b/src-ui/src/app/components/document-asn/document-asn.component.html @@ -1 +1 @@ -

Searching document with asn {{asn}}

+

Searching document with asn {{asn}}

diff --git a/src-ui/src/app/components/document-asn/document-asn.component.ts b/src-ui/src/app/components/document-asn/document-asn.component.ts index 4c80cedd7..550c331b9 100644 --- a/src-ui/src/app/components/document-asn/document-asn.component.ts +++ b/src-ui/src/app/components/document-asn/document-asn.component.ts @@ -1,8 +1,6 @@ import { Component, OnInit } from '@angular/core'; import {DocumentService} from "../../services/rest/document.service"; import {ActivatedRoute, Router} from "@angular/router"; -import {CorrespondentService} from "../../services/rest/correspondent.service"; -import {DocumentTypeService} from "../../services/rest/document-type.service"; import {FILTER_ASN} from "../../data/filter-rule-type"; @Component({ @@ -12,12 +10,10 @@ import {FILTER_ASN} from "../../data/filter-rule-type"; }) export class DocumentAsnComponent implements OnInit { - asn: string; + asn: string constructor( private documentsService: DocumentService, private route: ActivatedRoute, - private correspondentService: CorrespondentService, - private documentTypeService: DocumentTypeService, private router: Router) { }