diff --git a/src-ui/src/app/services/rest/document.service.ts b/src-ui/src/app/services/rest/document.service.ts index 7328b380e..bc1afb419 100644 --- a/src-ui/src/app/services/rest/document.service.ts +++ b/src-ui/src/app/services/rest/document.service.ts @@ -10,6 +10,7 @@ import { FilterRule } from 'src/app/data/filter-rule'; export const DOCUMENT_SORT_FIELDS = [ { field: "correspondent__name", name: "Correspondent" }, + { field: "document_type__name", name: "Document type" }, { field: 'title', name: 'Title' }, { field: 'archive_serial_number', name: 'ASN' }, { field: 'created', name: 'Created' }, diff --git a/src/documents/views.py b/src/documents/views.py index 6818551f0..63f0e0bb9 100755 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -97,7 +97,7 @@ class DocumentViewSet(RetrieveModelMixin, filter_class = DocumentFilterSet search_fields = ("title", "correspondent__name", "content") ordering_fields = ( - "id", "title", "correspondent__name", "created", "modified", "added", "archive_serial_number") + "id", "title", "correspondent__name", "document_type__name", "created", "modified", "added", "archive_serial_number") def file_response(self, pk, disposition): #TODO: this should not be necessary here.