diff --git a/Pipfile b/Pipfile index 1b8d3a94a..876ff481c 100644 --- a/Pipfile +++ b/Pipfile @@ -16,6 +16,7 @@ django-extensions = "*" django-filter = "~=23.3" djangorestframework = "~=3.14" djangorestframework-guardian = "*" +drf-writable-nested = "*" filelock = "*" gunicorn = "*" imap-tools = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 920c3b0f0..93cd8fa24 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "7b4272de2042a346f3252ae20e7bbeee60c375381f59526caa35511a706d4977" + "sha256": "3c380d590439f008ec85f1d5821ed96b4ebd56fcee3f287e6e0a6f5923262229" }, "pipfile-spec": 6, "requires": {}, @@ -522,6 +522,14 @@ "index": "pypi", "version": "==0.3.0" }, + "drf-writable-nested": { + "hashes": [ + "sha256:154c0381e8a3a477e0fd539d5e1caf8ff4c1097a9c0c0fe741d4858b11b0455b" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==0.7.0" + }, "exceptiongroup": { "hashes": [ "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9", diff --git a/docker/docker-prepare.sh b/docker/docker-prepare.sh index 6e5f6889a..2e66a1a3e 100755 --- a/docker/docker-prepare.sh +++ b/docker/docker-prepare.sh @@ -80,7 +80,7 @@ django_checks() { search_index() { - local -r index_version=6 + local -r index_version=7 local -r index_version_file=${DATA_DIR}/.index_version if [[ (! -f "${index_version_file}") || $(<"${index_version_file}") != "$index_version" ]]; then diff --git a/docs/api.md b/docs/api.md index 749c9e062..27fcc7f4f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -20,6 +20,7 @@ The API provides the following main endpoints: - `/api/users/`: Full CRUD support. - `/api/groups/`: Full CRUD support. - `/api/share_links/`: Full CRUD support. +- `/api/custom_fields/`: Full CRUD support. All of these endpoints except for the logging endpoint allow you to fetch (and edit and delete where appropriate) individual objects by @@ -51,6 +52,8 @@ fields: - `notes`: Array of notes associated with the document. - `set_permissions`: Allows setting document permissions. Optional, write-only. See [below](#permissions). +- `custom_fields`: Array of custom fields & values, specified as + { field: CUSTOM_FIELD_ID, value: VALUE } ## Downloading documents diff --git a/docs/usage.md b/docs/usage.md index aad4976f8..6cceeed22 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -322,6 +322,38 @@ applied. You can use the following placeholders: - `{added_month_name_short}`: added month short name - `{added_day}`: added day +## Custom Fields {#custom-fields} + +Paperless-ngx supports the use of custom fields for documents as of v2.0, allowing a user +to optionally attach data to documents which does not fit in the existing set of fields +Paperless-ngx provides. + +1. First, create a custom field (under "Manage"), with a given name and data type. This could be something like "Invoice Number" or "Date Paid", with a data type of "Number", "Date", "String", etc. +2. Once created, a field can be used with documents and data stored. To do so, use the "Custom Fields" menu on the document detail page, choose your existing field and click "Add". Once the field is visible in the form you can enter the appropriate + data which will be validated according to the custom field "data type". +3. Fields can be removed by hovering over the field name revealing a "Remove" button. + +!!! important + + Added / removed fields, as well as any data is not saved to the document until you + actually hit the "Save" button, similar to other changes on the document details page. + +!!! note + + Once the data type for a field is set, it cannot be changed. + +Multiple fields may be attached to a document but the same field name cannot be assigned multiple times to the a single document. + +The following custom field types are supported: + +- `Text`: any text +- `Boolean`: true / false (check / unchecked) field +- `Date`: date +- `URL`: a valid url +- `Integer`: integer number e.g. 12 +- `Number`: float number e.g. 12.3456 +- `Monetary`: float number with exactly two decimals, e.g. 12.30 + ## Best practices {#basic-searching} Paperless offers a couple tools that help you organize your document diff --git a/src-ui/e2e/document-detail/requests/api-document-detail.har b/src-ui/e2e/document-detail/requests/api-document-detail.har index 2383b2f70..c3892a121 100644 --- a/src-ui/e2e/document-detail/requests/api-document-detail.har +++ b/src-ui/e2e/document-detail/requests/api-document-detail.har @@ -133,6 +133,72 @@ "cache": {}, "timings": { "send": -1, "wait": -1, "receive": 0.951 } }, + { + "startedDateTime": "2023-05-14T07:03:41.086Z", + "time": 0.951, + "request": { + "method": "GET", + "url": "http://localhost:8000/api/custom_fields/?page=1&page_size=100000", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + { "name": "Accept", "value": "application/json; version=3" }, + { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, + { "name": "Accept-Language", "value": "en-US" }, + { "name": "Connection", "value": "keep-alive" }, + { "name": "Host", "value": "localhost:8000" }, + { "name": "Origin", "value": "http://localhost:4200" }, + { "name": "Referer", "value": "http://localhost:4200/" }, + { "name": "Sec-Fetch-Dest", "value": "empty" }, + { "name": "Sec-Fetch-Mode", "value": "cors" }, + { "name": "Sec-Fetch-Site", "value": "same-site" }, + { "name": "User-Agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.53 Safari/537.36" } + ], + "queryString": [ + { + "name": "page", + "value": "1" + }, + { + "name": "page_size", + "value": "100000" + } + ], + "headersSize": -1, + "bodySize": -1 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + { "name": "Access-Control-Allow-Origin", "value": "http://localhost:4200" }, + { "name": "Allow", "value": "GET, POST, HEAD, OPTIONS" }, + { "name": "Content-Encoding", "value": "br" }, + { "name": "Content-Language", "value": "en-us" }, + { "name": "Content-Length", "value": "851" }, + { "name": "Content-Type", "value": "application/json" }, + { "name": "Cross-Origin-Opener-Policy", "value": "same-origin" }, + { "name": "Referrer-Policy", "value": "same-origin" }, + { "name": "Vary", "value": "Accept, Accept-Language, Origin, Cookie, Accept-Encoding" }, + { "name": "X-Api-Version", "value": "3" }, + { "name": "X-Content-Type-Options", "value": "nosniff" }, + { "name": "X-Frame-Options", "value": "ANY" }, + { "name": "X-Version", "value": "1.14.4" } + ], + "content": { + "size": -1, + "mimeType": "application/json", + "text": "{\"count\":0,\"next\":null,\"previous\":null,\"all\":[],\"results\":[]}" + }, + "headersSize": -1, + "bodySize": -1, + "redirectURL": "" + }, + "cache": {}, + "timings": { "send": -1, "wait": -1, "receive": 0.951 } + }, { "startedDateTime": "2023-05-14T07:03:41.087Z", "time": 0.54, @@ -505,7 +571,7 @@ "content": { "size": -1, "mimeType": "application/json", - "text": "{\"id\":175,\"correspondent\":null,\"document_type\":null,\"storage_path\":8,\"title\":\"file-sample_150kBs\",\"content\":\"Lorem ipsum\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit. Nunc ac faucibus odio.\\n\\nVestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut\\nvarius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum\\ncondimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum cursus\\nconvallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.\\n\\n• Maecenas non lorem quis tellus placerat varius.\\n\\n• Nulla facilisi.\\n\\n• Aenean congue fringilla justo ut aliquam.\\n\\n• Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum ante\\nsagittis.\\n\\n• Morbi viverra semper lorem nec molestie.\\n\\n• Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.\\n\\n\\n12\\n\\n10\\n\\n8\\nColumn 1\\n6\\nColumn 2\\n4 Column 3\\n\\n2\\n\\n0\\nRow 1 Row 2 Row 3 Row 4\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\nIn eleifend velit vitae libero sollicitudin euismod. Fusce vitae vestibulum velit. Pellentesque\\nvulputate lectus quis pellentesque commodo. Aliquam erat volutpat. Vestibulum in egestas\\nvelit. Pellentesque fermentum nisl vitae fringilla venenatis. Etiam id mauris vitae orci\\nmaximus ultricies.\\n\\n\\n\\n\\nCras fringilla ipsum magna, in fringilla dui commodo\\na.\\n\\nLorem ipsum Lorem ipsum Lorem ipsum\\n\\n1 In eleifend velit vitae libero sollicitudin euismod. Lorem\\n\\n2 Cras fringilla ipsum magna, in fringilla dui commodo Ipsum\\na.\\n\\n3 Aliquam erat volutpat. Lorem\\n\\n4 Fusce vitae vestibulum velit. Lorem\\n\\n5 Etiam vehicula luctus fermentum. Ipsum\\n\\n\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit.\\n\\nNunc ac faucibus odio. Vestibulum neque massa, scelerisque sit amet ligula eu, congue\\nmolestie mi. Praesent ut varius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor\\nvitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum\\ncursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit\\ndictum tellus.\\nMaecenas non lorem quis tellus placerat varius. Nulla facilisi. Aenean congue fringilla justo\\nut aliquam. Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum\\nante sagittis. Morbi viverra semper lorem nec molestie. Maecenas tincidunt est efficitur\\nligula euismod, sit amet ornare est vulputate.\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\n\\nIn eleifend velit vitae libero sollicitudin euismod.\\nFusce vitae vestibulum velit. Pellentesque vulputate lectus quis pellentesque commodo.\\nAliquam erat volutpat. Vestibulum in egestas velit. Pellentesque fermentum nisl vitae\\nfringilla venenatis. Etiam id mauris vitae orci maximus ultricies. Cras fringilla ipsum\\nmagna, in fringilla dui commodo a.\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nSOOORGsARO Or\\n008soee\\naS\",\"tags\":[4],\"created\":\"2021-02-15T00:00:00Z\",\"created_date\":\"2021-02-15\",\"modified\":\"2023-02-17T22:25:47.449036Z\",\"added\":\"2021-01-26T22:46:32.447764Z\",\"archive_serial_number\":null,\"original_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"archived_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"owner\":null,\"permissions\":{\"view\":{\"users\":[],\"groups\":[]},\"change\":{\"users\":[],\"groups\":[]}},\"notes\":[{\"id\":70,\"note\":\"This is a second note\",\"created\":\"2023-05-12T17:04:50.873017Z\",\"document\":175,\"user\":2},{\"id\":71,\"note\":\"And a third\",\"created\":\"2023-05-12T17:04:54.027561Z\",\"document\":175,\"user\":2},{\"id\":72,\"note\":\"One more\",\"created\":\"2023-05-12T17:04:57.581521Z\",\"document\":175,\"user\":2},{\"id\":73,\"note\":\"This is a new note\",\"created\":\"2023-05-14T06:05:17.715744Z\",\"document\":175,\"user\":2}]}" + "text": "{\"id\":175,\"correspondent\":null,\"document_type\":null,\"storage_path\":8,\"title\":\"file-sample_150kBs\",\"content\":\"Lorem ipsum\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit. Nunc ac faucibus odio.\\n\\nVestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut\\nvarius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum\\ncondimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum cursus\\nconvallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.\\n\\n• Maecenas non lorem quis tellus placerat varius.\\n\\n• Nulla facilisi.\\n\\n• Aenean congue fringilla justo ut aliquam.\\n\\n• Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum ante\\nsagittis.\\n\\n• Morbi viverra semper lorem nec molestie.\\n\\n• Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.\\n\\n\\n12\\n\\n10\\n\\n8\\nColumn 1\\n6\\nColumn 2\\n4 Column 3\\n\\n2\\n\\n0\\nRow 1 Row 2 Row 3 Row 4\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\nIn eleifend velit vitae libero sollicitudin euismod. Fusce vitae vestibulum velit. Pellentesque\\nvulputate lectus quis pellentesque commodo. Aliquam erat volutpat. Vestibulum in egestas\\nvelit. Pellentesque fermentum nisl vitae fringilla venenatis. Etiam id mauris vitae orci\\nmaximus ultricies.\\n\\n\\n\\n\\nCras fringilla ipsum magna, in fringilla dui commodo\\na.\\n\\nLorem ipsum Lorem ipsum Lorem ipsum\\n\\n1 In eleifend velit vitae libero sollicitudin euismod. Lorem\\n\\n2 Cras fringilla ipsum magna, in fringilla dui commodo Ipsum\\na.\\n\\n3 Aliquam erat volutpat. Lorem\\n\\n4 Fusce vitae vestibulum velit. Lorem\\n\\n5 Etiam vehicula luctus fermentum. Ipsum\\n\\n\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit.\\n\\nNunc ac faucibus odio. Vestibulum neque massa, scelerisque sit amet ligula eu, congue\\nmolestie mi. Praesent ut varius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor\\nvitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum\\ncursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit\\ndictum tellus.\\nMaecenas non lorem quis tellus placerat varius. Nulla facilisi. Aenean congue fringilla justo\\nut aliquam. Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum\\nante sagittis. Morbi viverra semper lorem nec molestie. Maecenas tincidunt est efficitur\\nligula euismod, sit amet ornare est vulputate.\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\n\\nIn eleifend velit vitae libero sollicitudin euismod.\\nFusce vitae vestibulum velit. Pellentesque vulputate lectus quis pellentesque commodo.\\nAliquam erat volutpat. Vestibulum in egestas velit. Pellentesque fermentum nisl vitae\\nfringilla venenatis. Etiam id mauris vitae orci maximus ultricies. Cras fringilla ipsum\\nmagna, in fringilla dui commodo a.\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nSOOORGsARO Or\\n008soee\\naS\",\"tags\":[4],\"created\":\"2021-02-15T00:00:00Z\",\"created_date\":\"2021-02-15\",\"modified\":\"2023-02-17T22:25:47.449036Z\",\"added\":\"2021-01-26T22:46:32.447764Z\",\"archive_serial_number\":null,\"original_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"archived_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"owner\":null,\"permissions\":{\"view\":{\"users\":[],\"groups\":[]},\"change\":{\"users\":[],\"groups\":[]}},\"notes\":[{\"id\":70,\"note\":\"This is a second note\",\"created\":\"2023-05-12T17:04:50.873017Z\",\"document\":175,\"user\":2},{\"id\":71,\"note\":\"And a third\",\"created\":\"2023-05-12T17:04:54.027561Z\",\"document\":175,\"user\":2},{\"id\":72,\"note\":\"One more\",\"created\":\"2023-05-12T17:04:57.581521Z\",\"document\":175,\"user\":2},{\"id\":73,\"note\":\"This is a new note\",\"created\":\"2023-05-14T06:05:17.715744Z\",\"document\":175,\"user\":2}],\"custom_fields\":[]}" }, "headersSize": -1, "bodySize": -1, diff --git a/src-ui/e2e/document-detail/requests/api-document-detail2.har b/src-ui/e2e/document-detail/requests/api-document-detail2.har index 2325e03a2..ee3166211 100644 --- a/src-ui/e2e/document-detail/requests/api-document-detail2.har +++ b/src-ui/e2e/document-detail/requests/api-document-detail2.har @@ -133,6 +133,72 @@ "cache": {}, "timings": { "send": -1, "wait": -1, "receive": 1.02 } }, + { + "startedDateTime": "2023-05-14T07:03:41.086Z", + "time": 0.951, + "request": { + "method": "GET", + "url": "http://localhost:8000/api/custom_fields/?page=1&page_size=100000", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + { "name": "Accept", "value": "application/json; version=3" }, + { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, + { "name": "Accept-Language", "value": "en-US" }, + { "name": "Connection", "value": "keep-alive" }, + { "name": "Host", "value": "localhost:8000" }, + { "name": "Origin", "value": "http://localhost:4200" }, + { "name": "Referer", "value": "http://localhost:4200/" }, + { "name": "Sec-Fetch-Dest", "value": "empty" }, + { "name": "Sec-Fetch-Mode", "value": "cors" }, + { "name": "Sec-Fetch-Site", "value": "same-site" }, + { "name": "User-Agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.53 Safari/537.36" } + ], + "queryString": [ + { + "name": "page", + "value": "1" + }, + { + "name": "page_size", + "value": "100000" + } + ], + "headersSize": -1, + "bodySize": -1 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + { "name": "Access-Control-Allow-Origin", "value": "http://localhost:4200" }, + { "name": "Allow", "value": "GET, POST, HEAD, OPTIONS" }, + { "name": "Content-Encoding", "value": "br" }, + { "name": "Content-Language", "value": "en-us" }, + { "name": "Content-Length", "value": "851" }, + { "name": "Content-Type", "value": "application/json" }, + { "name": "Cross-Origin-Opener-Policy", "value": "same-origin" }, + { "name": "Referrer-Policy", "value": "same-origin" }, + { "name": "Vary", "value": "Accept, Accept-Language, Origin, Cookie, Accept-Encoding" }, + { "name": "X-Api-Version", "value": "3" }, + { "name": "X-Content-Type-Options", "value": "nosniff" }, + { "name": "X-Frame-Options", "value": "ANY" }, + { "name": "X-Version", "value": "1.14.4" } + ], + "content": { + "size": -1, + "mimeType": "application/json", + "text": "{\"count\":0,\"next\":null,\"previous\":null,\"all\":[],\"results\":[]}" + }, + "headersSize": -1, + "bodySize": -1, + "redirectURL": "" + }, + "cache": {}, + "timings": { "send": -1, "wait": -1, "receive": 0.951 } + }, { "startedDateTime": "2023-05-28T06:08:41.662Z", "time": 1.012, @@ -506,7 +572,7 @@ "content": { "size": -1, "mimeType": "application/json", - "text": "{\"id\":175,\"correspondent\":null,\"document_type\":null,\"storage_path\":8,\"title\":\"file-sample_150kBs\",\"content\":\"Lorem ipsum\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit. Nunc ac faucibus odio.\\n\\nVestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut\\nvarius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum\\ncondimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum cursus\\nconvallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.\\n\\n• Maecenas non lorem quis tellus placerat varius.\\n\\n• Nulla facilisi.\\n\\n• Aenean congue fringilla justo ut aliquam.\\n\\n• Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum ante\\nsagittis.\\n\\n• Morbi viverra semper lorem nec molestie.\\n\\n• Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.\\n\\n\\n12\\n\\n10\\n\\n8\\nColumn 1\\n6\\nColumn 2\\n4 Column 3\\n\\n2\\n\\n0\\nRow 1 Row 2 Row 3 Row 4\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\nIn eleifend velit vitae libero sollicitudin euismod. Fusce vitae vestibulum velit. Pellentesque\\nvulputate lectus quis pellentesque commodo. Aliquam erat volutpat. Vestibulum in egestas\\nvelit. Pellentesque fermentum nisl vitae fringilla venenatis. Etiam id mauris vitae orci\\nmaximus ultricies.\\n\\n\\n\\n\\nCras fringilla ipsum magna, in fringilla dui commodo\\na.\\n\\nLorem ipsum Lorem ipsum Lorem ipsum\\n\\n1 In eleifend velit vitae libero sollicitudin euismod. Lorem\\n\\n2 Cras fringilla ipsum magna, in fringilla dui commodo Ipsum\\na.\\n\\n3 Aliquam erat volutpat. Lorem\\n\\n4 Fusce vitae vestibulum velit. Lorem\\n\\n5 Etiam vehicula luctus fermentum. Ipsum\\n\\n\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit.\\n\\nNunc ac faucibus odio. Vestibulum neque massa, scelerisque sit amet ligula eu, congue\\nmolestie mi. Praesent ut varius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor\\nvitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum\\ncursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit\\ndictum tellus.\\nMaecenas non lorem quis tellus placerat varius. Nulla facilisi. Aenean congue fringilla justo\\nut aliquam. Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum\\nante sagittis. Morbi viverra semper lorem nec molestie. Maecenas tincidunt est efficitur\\nligula euismod, sit amet ornare est vulputate.\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\n\\nIn eleifend velit vitae libero sollicitudin euismod.\\nFusce vitae vestibulum velit. Pellentesque vulputate lectus quis pellentesque commodo.\\nAliquam erat volutpat. Vestibulum in egestas velit. Pellentesque fermentum nisl vitae\\nfringilla venenatis. Etiam id mauris vitae orci maximus ultricies. Cras fringilla ipsum\\nmagna, in fringilla dui commodo a.\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nSOOORGsARO Or\\n008soee\\naS\",\"tags\":[4],\"created\":\"2021-02-15T00:00:00Z\",\"created_date\":\"2021-02-15\",\"modified\":\"2023-02-17T22:25:47.449036Z\",\"added\":\"2021-01-26T22:46:32.447764Z\",\"archive_serial_number\":null,\"original_file_name\":null,\"archived_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"owner\":null,\"permissions\":{\"view\":{\"users\":[],\"groups\":[]},\"change\":{\"users\":[],\"groups\":[]}},\"notes\":[{\"id\":70,\"note\":\"This is a second note\",\"created\":\"2023-05-12T17:04:50.873017Z\",\"document\":175,\"user\":2},{\"id\":71,\"note\":\"And a third\",\"created\":\"2023-05-12T17:04:54.027561Z\",\"document\":175,\"user\":2},{\"id\":72,\"note\":\"One more\",\"created\":\"2023-05-12T17:04:57.581521Z\",\"document\":175,\"user\":2},{\"id\":73,\"note\":\"This is a new note\",\"created\":\"2023-05-14T06:05:17.715744Z\",\"document\":175,\"user\":2},{\"id\":74,\"note\":\"This is a new note\",\"created\":\"2023-05-28T05:49:25.763951Z\",\"document\":175,\"user\":2}]}" + "text": "{\"id\":175,\"correspondent\":null,\"document_type\":null,\"storage_path\":8,\"title\":\"file-sample_150kBs\",\"content\":\"Lorem ipsum\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit. Nunc ac faucibus odio.\\n\\nVestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut\\nvarius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum\\ncondimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum cursus\\nconvallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.\\n\\n• Maecenas non lorem quis tellus placerat varius.\\n\\n• Nulla facilisi.\\n\\n• Aenean congue fringilla justo ut aliquam.\\n\\n• Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum ante\\nsagittis.\\n\\n• Morbi viverra semper lorem nec molestie.\\n\\n• Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.\\n\\n\\n12\\n\\n10\\n\\n8\\nColumn 1\\n6\\nColumn 2\\n4 Column 3\\n\\n2\\n\\n0\\nRow 1 Row 2 Row 3 Row 4\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\nIn eleifend velit vitae libero sollicitudin euismod. Fusce vitae vestibulum velit. Pellentesque\\nvulputate lectus quis pellentesque commodo. Aliquam erat volutpat. Vestibulum in egestas\\nvelit. Pellentesque fermentum nisl vitae fringilla venenatis. Etiam id mauris vitae orci\\nmaximus ultricies.\\n\\n\\n\\n\\nCras fringilla ipsum magna, in fringilla dui commodo\\na.\\n\\nLorem ipsum Lorem ipsum Lorem ipsum\\n\\n1 In eleifend velit vitae libero sollicitudin euismod. Lorem\\n\\n2 Cras fringilla ipsum magna, in fringilla dui commodo Ipsum\\na.\\n\\n3 Aliquam erat volutpat. Lorem\\n\\n4 Fusce vitae vestibulum velit. Lorem\\n\\n5 Etiam vehicula luctus fermentum. Ipsum\\n\\n\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing\\nelit.\\n\\nNunc ac faucibus odio. Vestibulum neque massa, scelerisque sit amet ligula eu, congue\\nmolestie mi. Praesent ut varius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor\\nvitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum\\ncursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis,\\nvulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus\\nnisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum,\\nac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet\\ntortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet\\nmauris tempus fringilla.\\n\\n\\nMaecenas mauris lectus, lobortis et purus mattis, blandit\\ndictum tellus.\\nMaecenas non lorem quis tellus placerat varius. Nulla facilisi. Aenean congue fringilla justo\\nut aliquam. Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum\\nante sagittis. Morbi viverra semper lorem nec molestie. Maecenas tincidunt est efficitur\\nligula euismod, sit amet ornare est vulputate.\\n\\nIn non mauris justo. Duis vehicula mi vel mi pretium, a viverra erat efficitur. Cras aliquam\\nest ac eros varius, id iaculis dui auctor. Duis pretium neque ligula, et pulvinar mi placerat\\net. Nulla nec nunc sit amet nunc posuere vestibulum. Ut id neque eget tortor mattis\\ntristique. Donec ante est, blandit sit amet tristique vel, lacinia pulvinar arcu. Pellentesque\\nscelerisque fermentum erat, id posuere justo pulvinar ut. Cras id eros sed enim aliquam\\nlobortis. Sed lobortis nisl ut eros efficitur tincidunt. Cras justo mi, porttitor quis mattis vel,\\nultricies ut purus. Ut facilisis et lacus eu cursus.\\n\\n\\nIn eleifend velit vitae libero sollicitudin euismod.\\nFusce vitae vestibulum velit. Pellentesque vulputate lectus quis pellentesque commodo.\\nAliquam erat volutpat. Vestibulum in egestas velit. Pellentesque fermentum nisl vitae\\nfringilla venenatis. Etiam id mauris vitae orci maximus ultricies. Cras fringilla ipsum\\nmagna, in fringilla dui commodo a.\\n\\nEtiam vehicula luctus fermentum. In vel metus congue, pulvinar lectus vel, fermentum dui.\\nMaecenas ante orci, egestas ut aliquet sit amet, sagittis a magna. Aliquam ante quam,\\npellentesque ut dignissim quis, laoreet eget est. Aliquam erat volutpat. Class aptent taciti\\nsociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ullamcorper\\njusto sapien, in cursus libero viverra eget. Vivamus auctor imperdiet urna, at pulvinar leo\\nposuere laoreet. Suspendisse neque nisl, fringilla at iaculis scelerisque, ornare vel dolor. Ut\\net pulvinar nunc. Pellentesque fringilla mollis efficitur. Nullam venenatis commodo\\nimperdiet. Morbi velit neque, semper quis lorem quis, efficitur dignissim ipsum. Ut ac lorem\\nsed turpis imperdiet eleifend sit amet id sapien.\\n\\nSOOORGsARO Or\\n008soee\\naS\",\"tags\":[4],\"created\":\"2021-02-15T00:00:00Z\",\"created_date\":\"2021-02-15\",\"modified\":\"2023-02-17T22:25:47.449036Z\",\"added\":\"2021-01-26T22:46:32.447764Z\",\"archive_serial_number\":null,\"original_file_name\":null,\"archived_file_name\":\"2021-02-15 file-sample_150kBs.pdf\",\"owner\":null,\"permissions\":{\"view\":{\"users\":[],\"groups\":[]},\"change\":{\"users\":[],\"groups\":[]}},\"notes\":[{\"id\":70,\"note\":\"This is a second note\",\"created\":\"2023-05-12T17:04:50.873017Z\",\"document\":175,\"user\":2},{\"id\":71,\"note\":\"And a third\",\"created\":\"2023-05-12T17:04:54.027561Z\",\"document\":175,\"user\":2},{\"id\":72,\"note\":\"One more\",\"created\":\"2023-05-12T17:04:57.581521Z\",\"document\":175,\"user\":2},{\"id\":73,\"note\":\"This is a new note\",\"created\":\"2023-05-14T06:05:17.715744Z\",\"document\":175,\"user\":2},{\"id\":74,\"note\":\"This is a new note\",\"created\":\"2023-05-28T05:49:25.763951Z\",\"document\":175,\"user\":2}],\"custom_fields\":[]}" }, "headersSize": -1, "bodySize": -1, diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 1a637fbb1..a132bb7ec 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -312,7 +312,7 @@ src/app/components/document-detail/document-detail.component.html - 65 + 81 @@ -421,11 +421,11 @@ src/app/components/app-frame/app-frame.component.html - 218 + 225 src/app/components/app-frame/app-frame.component.html - 221 + 228 @@ -511,11 +511,11 @@ src/app/components/app-frame/app-frame.component.html - 196 + 203 src/app/components/app-frame/app-frame.component.html - 199 + 206 @@ -777,7 +777,7 @@ src/app/components/document-detail/document-detail.component.html - 192 + 221 src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -1031,6 +1031,10 @@ src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html 9 + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html + 8 + src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.html 10 @@ -1063,6 +1067,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.html 14 + + src/app/components/manage/custom-fields/custom-fields.component.html + 14 + src/app/components/manage/mail/mail.component.html 17 @@ -1163,6 +1171,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.html 17 + + src/app/components/manage/custom-fields/custom-fields.component.html + 16 + src/app/components/manage/mail/mail.component.html 19 @@ -1226,6 +1238,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.html 36 + + src/app/components/manage/custom-fields/custom-fields.component.html + 34 + src/app/components/manage/mail/mail.component.html 42 @@ -1292,6 +1308,10 @@ src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html 21 + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html + 14 + src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.html 23 @@ -1322,7 +1342,7 @@ src/app/components/document-detail/document-detail.component.html - 208 + 93 src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html @@ -1426,7 +1446,7 @@ src/app/components/app-frame/app-frame.component.html - 210 + 217 @@ -1460,7 +1480,7 @@ src/app/components/common/input/tags/tags.component.html - 2 + 4 src/app/components/common/permissions-select/permissions-select.component.html @@ -1635,11 +1655,11 @@ src/app/components/app-frame/app-frame.component.html - 203 + 210 src/app/components/app-frame/app-frame.component.html - 206 + 213 @@ -1720,6 +1740,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.html 31 + + src/app/components/manage/custom-fields/custom-fields.component.html + 29 + src/app/components/manage/mail/mail.component.html 32 @@ -1822,7 +1846,7 @@ src/app/components/document-detail/document-detail.component.ts - 656 + 677 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -1836,6 +1860,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.ts 91 + + src/app/components/manage/custom-fields/custom-fields.component.ts + 76 + src/app/components/manage/mail/mail.component.ts 114 @@ -1857,7 +1885,7 @@ src/app/components/document-detail/document-detail.component.ts - 658 + 679 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -1867,6 +1895,10 @@ src/app/components/manage/consumption-templates/consumption-templates.component.ts 93 + + src/app/components/manage/custom-fields/custom-fields.component.ts + 78 + src/app/components/manage/mail/mail.component.ts 116 @@ -1969,11 +2001,11 @@ src/app/components/app-frame/app-frame.component.html - 225 + 232 src/app/components/app-frame/app-frame.component.html - 228 + 235 @@ -2093,8 +2125,8 @@ 26 - - Document types + + Document Types src/app/components/app-frame/app-frame.component.html 162 @@ -2103,9 +2135,13 @@ src/app/components/app-frame/app-frame.component.html 165 + + src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html + 61 + - - Storage paths + + Storage Paths src/app/components/app-frame/app-frame.component.html 169 @@ -2114,86 +2150,105 @@ src/app/components/app-frame/app-frame.component.html 172 + + src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html + 67 + + + + Custom Fields + + src/app/components/app-frame/app-frame.component.html + 176 + + + src/app/components/app-frame/app-frame.component.html + 179 + + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html + 6 + Consumption templates src/app/components/app-frame/app-frame.component.html - 176 + 183 Templates src/app/components/app-frame/app-frame.component.html - 179 + 186 Mail src/app/components/app-frame/app-frame.component.html - 183 + 190 src/app/components/app-frame/app-frame.component.html - 186 + 193 Administration src/app/components/app-frame/app-frame.component.html - 192 + 199 File Tasks src/app/components/app-frame/app-frame.component.html - 214 + 221 GitHub src/app/components/app-frame/app-frame.component.html - 234 + 241 is available. src/app/components/app-frame/app-frame.component.html - 240 + 247 Click to view. src/app/components/app-frame/app-frame.component.html - 240 + 247 Paperless-ngx can automatically check for updates src/app/components/app-frame/app-frame.component.html - 244 + 251 How does this work? src/app/components/app-frame/app-frame.component.html - 251,253 + 258,260 Update available src/app/components/app-frame/app-frame.component.html - 262 + 269 @@ -2273,6 +2328,60 @@ 439 + + Create New Field + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html + 25 + + + + Add + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html + 30 + + + src/app/components/common/permissions-select/permissions-select.component.html + 7 + + + + Choose field + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts + 52 + + + + No unused fields found + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts + 56 + + + + Saved field "". + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts + 120 + + + src/app/components/manage/custom-fields/custom-fields.component.ts + 59 + + + + Error saving field. + + src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts + 128 + + + src/app/components/manage/custom-fields/custom-fields.component.ts + 66 + + now @@ -2503,6 +2612,10 @@ src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html 20 + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html + 13 + src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.html 22 @@ -2654,6 +2767,34 @@ 31 + + Data type + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html + 9 + + + + Data type cannot be changed after a field is created + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html + 10 + + + + Create new custom field + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts + 39 + + + + Edit custom field + + src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts + 43 + + Create new document type @@ -3293,26 +3434,53 @@ Filter drop down element to filter for documents with no correspondent/type/tag assigned + + Remove + + src/app/components/common/input/check/check.component.html + 8 + + + src/app/components/common/input/date/date.component.html + 8 + + + src/app/components/common/input/number/number.component.html + 8 + + + src/app/components/common/input/select/select.component.html + 8 + + + src/app/components/common/input/text/text.component.html + 8 + + + src/app/components/common/input/url/url.component.html + 8 + + Invalid date. src/app/components/common/input/date/date.component.html - 18 + 27 Suggestions: src/app/components/common/input/date/date.component.html - 21 + 30 src/app/components/common/input/select/select.component.html - 37 + 47 src/app/components/common/input/tags/tags.component.html - 43 + 46 @@ -3323,7 +3491,7 @@ src/app/components/common/input/select/select.component.ts - 149 + 155 @@ -3359,7 +3527,7 @@ Add item src/app/components/common/input/select/select.component.html - 12 + 21 Used for both types, correspondents, storage paths @@ -3382,18 +3550,32 @@ 80 + + No items found + + src/app/components/common/input/select/select.component.ts + 92 + + Add tag src/app/components/common/input/tags/tags.component.html - 12 + 15 Filter documents with these Tags src/app/components/common/input/tags/tags.component.html - 35 + 38 + + + + Open link + + src/app/components/common/input/url/url.component.html + 14 @@ -3452,13 +3634,6 @@ 5 - - Add - - src/app/components/common/permissions-select/permissions-select.component.html - 7 - - Change @@ -3669,7 +3844,7 @@ src/app/components/document-detail/document-detail.component.html - 85 + 103 src/app/components/document-list/document-list.component.html @@ -3677,7 +3852,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 201 + 203 src/app/services/rest/document.service.ts @@ -3692,7 +3867,7 @@ src/app/components/document-detail/document-detail.component.html - 89 + 107 src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -3790,20 +3965,6 @@ 13 - - Document Types - - src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html - 61 - - - - Storage Paths - - src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html - 67 - - Other @@ -3974,7 +4135,7 @@ Close src/app/components/document-detail/document-detail.component.html - 53 + 71 src/app/guards/dirty-saved-view.guard.ts @@ -3985,35 +4146,56 @@ Previous src/app/components/document-detail/document-detail.component.html - 60 + 76 + + + + Discard + + src/app/components/document-detail/document-detail.component.html + 89 + + + + Save & next + + src/app/components/document-detail/document-detail.component.html + 91 + + + + Save & close + + src/app/components/document-detail/document-detail.component.html + 92 Details src/app/components/document-detail/document-detail.component.html - 82 + 100 Archive serial number src/app/components/document-detail/document-detail.component.html - 86 + 104 Date created src/app/components/document-detail/document-detail.component.html - 87 + 105 Document type src/app/components/document-detail/document-detail.component.html - 91 + 109 src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -4036,7 +4218,7 @@ Storage path src/app/components/document-detail/document-detail.component.html - 93 + 111 src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -4055,21 +4237,21 @@ Default src/app/components/document-detail/document-detail.component.html - 94 + 112 Content src/app/components/document-detail/document-detail.component.html - 101 + 130 Metadata src/app/components/document-detail/document-detail.component.html - 110 + 139 src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts @@ -4080,173 +4262,152 @@ Date modified src/app/components/document-detail/document-detail.component.html - 116 + 145 Date added src/app/components/document-detail/document-detail.component.html - 120 + 149 Media filename src/app/components/document-detail/document-detail.component.html - 124 + 153 Original filename src/app/components/document-detail/document-detail.component.html - 128 + 157 Original MD5 checksum src/app/components/document-detail/document-detail.component.html - 132 + 161 Original file size src/app/components/document-detail/document-detail.component.html - 136 + 165 Original mime type src/app/components/document-detail/document-detail.component.html - 140 + 169 Archive MD5 checksum src/app/components/document-detail/document-detail.component.html - 144 + 173 Archive file size src/app/components/document-detail/document-detail.component.html - 148 + 177 Original document metadata src/app/components/document-detail/document-detail.component.html - 154 + 183 Archived document metadata src/app/components/document-detail/document-detail.component.html - 155 + 184 Preview src/app/components/document-detail/document-detail.component.html - 161 + 190 Enter Password src/app/components/document-detail/document-detail.component.html - 177 + 206 src/app/components/document-detail/document-detail.component.html - 228 + 249 Notes src/app/components/document-detail/document-detail.component.html - 185,186 - - - - Discard - - src/app/components/document-detail/document-detail.component.html - 204 - - - - Save & next - - src/app/components/document-detail/document-detail.component.html - 206 - - - - Save & close - - src/app/components/document-detail/document-detail.component.html - 207 + 214,215 An error occurred loading content: src/app/components/document-detail/document-detail.component.ts - 253,255 + 265,267 Error retrieving metadata src/app/components/document-detail/document-detail.component.ts - 398 + 413 Error retrieving suggestions. src/app/components/document-detail/document-detail.component.ts - 419 + 434 Document saved successfully. src/app/components/document-detail/document-detail.component.ts - 532 + 552 src/app/components/document-detail/document-detail.component.ts - 540 + 561 Error saving document src/app/components/document-detail/document-detail.component.ts - 544 + 565 src/app/components/document-detail/document-detail.component.ts - 585 + 606 Confirm delete src/app/components/document-detail/document-detail.component.ts - 611 + 632 src/app/components/manage/management-list/management-list.component.ts @@ -4257,35 +4418,35 @@ Do you really want to delete document ""? src/app/components/document-detail/document-detail.component.ts - 612 + 633 The files for this document will be deleted permanently. This operation cannot be undone. src/app/components/document-detail/document-detail.component.ts - 613 + 634 Delete document src/app/components/document-detail/document-detail.component.ts - 615 + 636 Error deleting document src/app/components/document-detail/document-detail.component.ts - 634 + 655 Redo OCR confirm src/app/components/document-detail/document-detail.component.ts - 654 + 675 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -4296,21 +4457,21 @@ This operation will permanently redo OCR for this document. src/app/components/document-detail/document-detail.component.ts - 655 + 676 Redo OCR operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content. src/app/components/document-detail/document-detail.component.ts - 666 + 687 Error executing operation src/app/components/document-detail/document-detail.component.ts - 677 + 698 @@ -4796,7 +4957,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 206 + 208 src/app/services/rest/document.service.ts @@ -4912,14 +5073,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 118,120 + 120,122 Without correspondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 122 + 124 @@ -4928,14 +5089,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 128,130 + 130,132 Without document type src/app/components/document-list/filter-editor/filter-editor.component.ts - 132 + 134 @@ -4944,14 +5105,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 138,140 + 140,142 Without storage path src/app/components/document-list/filter-editor/filter-editor.component.ts - 142 + 144 @@ -4959,105 +5120,112 @@ ?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 146,147 + 148,149 Without any tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 151 + 153 Title: src/app/components/document-list/filter-editor/filter-editor.component.ts - 155 + 157 ASN: src/app/components/document-list/filter-editor/filter-editor.component.ts - 158 + 160 Owner: src/app/components/document-list/filter-editor/filter-editor.component.ts - 161 + 163 Owner not in: src/app/components/document-list/filter-editor/filter-editor.component.ts - 164 + 166 Without an owner src/app/components/document-list/filter-editor/filter-editor.component.ts - 167 + 169 Title & content src/app/components/document-list/filter-editor/filter-editor.component.ts - 204 + 206 + + + + Custom fields + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 211 Advanced search src/app/components/document-list/filter-editor/filter-editor.component.ts - 209 + 215 More like src/app/components/document-list/filter-editor/filter-editor.component.ts - 215 + 221 equals src/app/components/document-list/filter-editor/filter-editor.component.ts - 234 + 240 is empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 238 + 244 is not empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 242 + 248 greater than src/app/components/document-list/filter-editor/filter-editor.component.ts - 246 + 252 less than src/app/components/document-list/filter-editor/filter-editor.component.ts - 250 + 256 @@ -5232,6 +5400,55 @@ 67 + + Add Field + + src/app/components/manage/custom-fields/custom-fields.component.html + 6 + + + + Data Type + + src/app/components/manage/custom-fields/custom-fields.component.html + 15 + + + + No fields defined. + + src/app/components/manage/custom-fields/custom-fields.component.html + 40 + + + + Confirm delete field + + src/app/components/manage/custom-fields/custom-fields.component.ts + 74 + + + + This operation will permanently delete this field. + + src/app/components/manage/custom-fields/custom-fields.component.ts + 75 + + + + Deleted field + + src/app/components/manage/custom-fields/custom-fields.component.ts + 84 + + + + Error deleting field. + + src/app/components/manage/custom-fields/custom-fields.component.ts + 89 + + document type @@ -5750,6 +5967,55 @@ 46 + + Boolean + + src/app/data/paperless-custom-field.ts + 16 + + + + Date + + src/app/data/paperless-custom-field.ts + 20 + + + + Integer + + src/app/data/paperless-custom-field.ts + 24 + + + + Number + + src/app/data/paperless-custom-field.ts + 28 + + + + Monetary + + src/app/data/paperless-custom-field.ts + 32 + + + + Text + + src/app/data/paperless-custom-field.ts + 36 + + + + Url + + src/app/data/paperless-custom-field.ts + 40 + + Warning: You have unsaved changes to your document(s). diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index f2888b596..b3952634c 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -24,6 +24,7 @@ import { import { ConsumptionTemplatesComponent } from './components/manage/consumption-templates/consumption-templates.component' import { MailComponent } from './components/manage/mail/mail.component' import { UsersAndGroupsComponent } from './components/admin/users-groups/users-groups.component' +import { CustomFieldsComponent } from './components/manage/custom-fields/custom-fields.component' export const routes: Routes = [ { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, @@ -189,6 +190,17 @@ export const routes: Routes = [ }, }, }, + { + path: 'customfields', + component: CustomFieldsComponent, + canActivate: [PermissionsGuard], + data: { + requiredPermission: { + action: PermissionAction.View, + type: PermissionType.CustomField, + }, + }, + }, { path: 'templates', component: ConsumptionTemplatesComponent, diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 0634ffd34..1967a3f78 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -39,6 +39,7 @@ import { NgxFileDropModule } from 'ngx-file-drop' import { TextComponent } from './components/common/input/text/text.component' import { SelectComponent } from './components/common/input/select/select.component' import { CheckComponent } from './components/common/input/check/check.component' +import { UrlComponent } from './components/common/input/url/url.component' import { PasswordComponent } from './components/common/input/password/password.component' import { SaveViewConfigDialogComponent } from './components/document-list/save-view-config-dialog/save-view-config-dialog.component' import { TagsComponent } from './components/common/input/tags/tags.component' @@ -101,6 +102,9 @@ import { MailComponent } from './components/manage/mail/mail.component' import { UsersAndGroupsComponent } from './components/admin/users-groups/users-groups.component' import { DragDropModule } from '@angular/cdk/drag-drop' import { FileDropComponent } from './components/file-drop/file-drop.component' +import { CustomFieldsComponent } from './components/manage/custom-fields/custom-fields.component' +import { CustomFieldEditDialogComponent } from './components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component' +import { CustomFieldsDropdownComponent } from './components/common/custom-fields-dropdown/custom-fields-dropdown.component' import localeAf from '@angular/common/locales/af' import localeAr from '@angular/common/locales/ar' @@ -200,6 +204,7 @@ function initializeApp(settings: SettingsService) { TextComponent, SelectComponent, CheckComponent, + UrlComponent, PasswordComponent, SaveViewConfigDialogComponent, TagsComponent, @@ -246,6 +251,9 @@ function initializeApp(settings: SettingsService) { MailComponent, UsersAndGroupsComponent, FileDropComponent, + CustomFieldsComponent, + CustomFieldEditDialogComponent, + CustomFieldsDropdownComponent, ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html index c496ee4e7..49220d0ab 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.html +++ b/src-ui/src/app/components/app-frame/app-frame.component.html @@ -159,17 +159,24 @@ +