-
+
+
-
-
Assign view permissions
-
-
-
- Users:
-
-
+
+
Assign view permissions
+
+
+
+ Users:
-
-
Assign edit permissions
-
-
-
- Users:
-
-
+
+
+ Groups:
-
-
- Groups:
-
-
+
-
Edit permissions also grant viewing permissions
+
Assign edit permissions
+
+
+
+
Edit permissions also grant viewing permissions
+
+
-
-
-
+
+
+
diff --git a/src-ui/src/app/components/common/edit-dialog/consumption-template-edit-dialog/consumption-template-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/consumption-template-edit-dialog/consumption-template-edit-dialog.component.ts
index dedbd3523..079af9cc5 100644
--- a/src-ui/src/app/components/common/edit-dialog/consumption-template-edit-dialog/consumption-template-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/consumption-template-edit-dialog/consumption-template-edit-dialog.component.ts
@@ -4,11 +4,11 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { first } from 'rxjs'
import {
DocumentSource,
- PaperlessConsumptionTemplate,
-} from 'src/app/data/paperless-consumption-template'
-import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'
-import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'
-import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'
+ ConsumptionTemplate,
+} from 'src/app/data/consumption-template'
+import { Correspondent } from 'src/app/data/correspondent'
+import { DocumentType } from 'src/app/data/document-type'
+import { StoragePath } from 'src/app/data/storage-path'
import { ConsumptionTemplateService } from 'src/app/services/rest/consumption-template.service'
import { CorrespondentService } from 'src/app/services/rest/correspondent.service'
import { DocumentTypeService } from 'src/app/services/rest/document-type.service'
@@ -17,9 +17,9 @@ import { UserService } from 'src/app/services/rest/user.service'
import { SettingsService } from 'src/app/services/settings.service'
import { EditDialogComponent } from '../edit-dialog.component'
import { MailRuleService } from 'src/app/services/rest/mail-rule.service'
-import { PaperlessMailRule } from 'src/app/data/paperless-mail-rule'
+import { MailRule } from 'src/app/data/mail-rule'
import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service'
-import { PaperlessCustomField } from 'src/app/data/paperless-custom-field'
+import { CustomField } from 'src/app/data/custom-field'
export const DOCUMENT_SOURCE_OPTIONS = [
{
@@ -41,13 +41,13 @@ export const DOCUMENT_SOURCE_OPTIONS = [
templateUrl: './consumption-template-edit-dialog.component.html',
styleUrls: ['./consumption-template-edit-dialog.component.scss'],
})
-export class ConsumptionTemplateEditDialogComponent extends EditDialogComponent
{
- templates: PaperlessConsumptionTemplate[]
- correspondents: PaperlessCorrespondent[]
- documentTypes: PaperlessDocumentType[]
- storagePaths: PaperlessStoragePath[]
- mailRules: PaperlessMailRule[]
- customFields: PaperlessCustomField[]
+export class ConsumptionTemplateEditDialogComponent extends EditDialogComponent {
+ templates: ConsumptionTemplate[]
+ correspondents: Correspondent[]
+ documentTypes: DocumentType[]
+ storagePaths: StoragePath[]
+ mailRules: MailRule[]
+ customFields: CustomField[]
constructor(
service: ConsumptionTemplateService,
diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
index 7bb192a90..72541e7c0 100644
--- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
@@ -8,8 +8,12 @@
-
-
+ @if (patternRequired) {
+
+ }
+ @if (patternRequired) {
+
+ }
diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts
index 6c290af1b..fcac0424a 100644
--- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'
import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model'
-import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'
+import { Correspondent } from 'src/app/data/correspondent'
import { CorrespondentService } from 'src/app/services/rest/correspondent.service'
import { UserService } from 'src/app/services/rest/user.service'
import { SettingsService } from 'src/app/services/settings.service'
@@ -13,7 +13,7 @@ import { SettingsService } from 'src/app/services/settings.service'
templateUrl: './correspondent-edit-dialog.component.html',
styleUrls: ['./correspondent-edit-dialog.component.scss'],
})
-export class CorrespondentEditDialogComponent extends EditDialogComponent
{
+export class CorrespondentEditDialogComponent extends EditDialogComponent {
constructor(
service: CorrespondentService,
activeModal: NgbActiveModal,
diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html
index 63f235b43..25bddad76 100644
--- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html
@@ -7,7 +7,9 @@
-
Data type cannot be changed after a field is created
+ @if (typeFieldDisabled) {
+
Data type cannot be changed after a field is created
+ }
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
index 6e48d95f0..8b2c398c9 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts
@@ -7,7 +7,7 @@ import { of } from 'rxjs'
import {
MailMetadataCorrespondentOption,
MailAction,
-} from 'src/app/data/paperless-mail-rule'
+} from 'src/app/data/mail-rule'
import { IfOwnerDirective } from 'src/app/directives/if-owner.directive'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe'
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
index 2d9469f9e..51793e78a 100644
--- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
@@ -3,17 +3,17 @@ import { FormControl, FormGroup } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { first } from 'rxjs'
import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'
-import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'
-import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'
-import { PaperlessMailAccount } from 'src/app/data/paperless-mail-account'
+import { Correspondent } from 'src/app/data/correspondent'
+import { DocumentType } from 'src/app/data/document-type'
+import { MailAccount } from 'src/app/data/mail-account'
import {
MailAction,
MailFilterAttachmentType,
MailMetadataCorrespondentOption,
MailMetadataTitleOption,
- PaperlessMailRule,
+ MailRule,
MailRuleConsumptionScope,
-} from 'src/app/data/paperless-mail-rule'
+} from 'src/app/data/mail-rule'
import { CorrespondentService } from 'src/app/services/rest/correspondent.service'
import { DocumentTypeService } from 'src/app/services/rest/document-type.service'
import { MailAccountService } from 'src/app/services/rest/mail-account.service'
@@ -109,10 +109,10 @@ const METADATA_CORRESPONDENT_OPTIONS = [
templateUrl: './mail-rule-edit-dialog.component.html',
styleUrls: ['./mail-rule-edit-dialog.component.scss'],
})
-export class MailRuleEditDialogComponent extends EditDialogComponent {
- accounts: PaperlessMailAccount[]
- correspondents: PaperlessCorrespondent[]
- documentTypes: PaperlessDocumentType[]
+export class MailRuleEditDialogComponent extends EditDialogComponent {
+ accounts: MailAccount[]
+ correspondents: Correspondent[]
+ documentTypes: DocumentType[]
constructor(
service: MailRuleService,
diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html
index 12e70f3cd..c88961ecc 100644
--- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html
@@ -9,8 +9,12 @@
-
-
+ @if (patternRequired) {
+
+ }
+ @if (patternRequired) {
+
+ }
diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
index 0e600b8ab..4a18605e7 100644
--- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'
import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model'
-import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'
+import { StoragePath } from 'src/app/data/storage-path'
import { StoragePathService } from 'src/app/services/rest/storage-path.service'
import { UserService } from 'src/app/services/rest/user.service'
import { SettingsService } from 'src/app/services/settings.service'
@@ -13,7 +13,7 @@ import { SettingsService } from 'src/app/services/settings.service'
templateUrl: './storage-path-edit-dialog.component.html',
styleUrls: ['./storage-path-edit-dialog.component.scss'],
})
-export class StoragePathEditDialogComponent extends EditDialogComponent
{
+export class StoragePathEditDialogComponent extends EditDialogComponent {
constructor(
service: StoragePathService,
activeModal: NgbActiveModal,
diff --git a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.html
index 1a9ee58da..1067951b3 100644
--- a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.html
@@ -1,26 +1,30 @@
-
-
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
index 30bee4d92..1332eaa5b 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts
@@ -47,12 +47,13 @@ import {
FILTER_OWNER_DOES_NOT_INCLUDE,
FILTER_OWNER_ISNULL,
FILTER_CUSTOM_FIELDS,
+ FILTER_SHARED_BY_USER,
} from 'src/app/data/filter-rule-type'
-import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'
-import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'
-import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'
-import { PaperlessTag } from 'src/app/data/paperless-tag'
-import { PaperlessUser } from 'src/app/data/paperless-user'
+import { Correspondent } from 'src/app/data/correspondent'
+import { DocumentType } from 'src/app/data/document-type'
+import { StoragePath } from 'src/app/data/storage-path'
+import { Tag } from 'src/app/data/tag'
+import { User } from 'src/app/data/user'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
import { FilterPipe } from 'src/app/pipes/filter.pipe'
@@ -77,7 +78,7 @@ import {
} from '../../common/permissions-filter-dropdown/permissions-filter-dropdown.component'
import { FilterEditorComponent } from './filter-editor.component'
-const tags: PaperlessTag[] = [
+const tags: Tag[] = [
{
id: 2,
name: 'Tag2',
@@ -88,7 +89,7 @@ const tags: PaperlessTag[] = [
},
]
-const correspondents: PaperlessCorrespondent[] = [
+const correspondents: Correspondent[] = [
{
id: 12,
name: 'Corresp12',
@@ -99,7 +100,7 @@ const correspondents: PaperlessCorrespondent[] = [
},
]
-const document_types: PaperlessDocumentType[] = [
+const document_types: DocumentType[] = [
{
id: 22,
name: 'DocType22',
@@ -110,7 +111,7 @@ const document_types: PaperlessDocumentType[] = [
},
]
-const storage_paths: PaperlessStoragePath[] = [
+const storage_paths: StoragePath[] = [
{
id: 32,
name: 'StoragePath32',
@@ -121,7 +122,7 @@ const storage_paths: PaperlessStoragePath[] = [
},
]
-const users: PaperlessUser[] = [
+const users: User[] = [
{
id: 1,
username: 'user1',
@@ -826,6 +827,16 @@ describe('FilterEditorComponent', () => {
expect(component.permissionsSelectionModel.hideUnowned).toBeTruthy()
}))
+ it('should ingest filter rules for shared by me', fakeAsync(() => {
+ component.filterRules = [
+ {
+ rule_type: FILTER_SHARED_BY_USER,
+ value: '2',
+ },
+ ]
+ expect(component.permissionsSelectionModel.userID).toEqual(2)
+ }))
+
// GET filterRules
it('should convert user input to correct filter rules on text field search title + content', fakeAsync(() => {
@@ -1453,13 +1464,28 @@ describe('FilterEditorComponent', () => {
])
}))
- it('should convert user input to correct filter on permissions select unowned', fakeAsync(() => {
+ it('should convert user input to correct filter on permissions select shared by me', fakeAsync(() => {
const permissionsDropdown = fixture.debugElement.query(
By.directive(PermissionsFilterDropdownComponent)
)
const unownedButton = permissionsDropdown.queryAll(By.css('button'))[4]
unownedButton.triggerEventHandler('click')
fixture.detectChanges()
+ expect(component.filterRules).toEqual([
+ {
+ rule_type: FILTER_SHARED_BY_USER,
+ value: '1',
+ },
+ ])
+ }))
+
+ it('should convert user input to correct filter on permissions select unowned', fakeAsync(() => {
+ const permissionsDropdown = fixture.debugElement.query(
+ By.directive(PermissionsFilterDropdownComponent)
+ )
+ const unownedButton = permissionsDropdown.queryAll(By.css('button'))[5]
+ unownedButton.triggerEventHandler('click')
+ fixture.detectChanges()
expect(component.filterRules).toEqual([
{
rule_type: FILTER_OWNER_ISNULL,
@@ -1700,4 +1726,13 @@ describe('FilterEditorComponent', () => {
)
expect(component.textFilter).toEqual('')
})
+
+ it('should adjust text filter targets if more like search', () => {
+ const TEXT_FILTER_TARGET_FULLTEXT_MORELIKE = 'fulltext-morelike' // private const
+ component.textFilterTarget = TEXT_FILTER_TARGET_FULLTEXT_MORELIKE
+ expect(component.textFilterTargets).toContainEqual({
+ id: TEXT_FILTER_TARGET_FULLTEXT_MORELIKE,
+ name: $localize`More like`,
+ })
+ })
})
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
index 030f4ec07..03e1db539 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
@@ -8,9 +8,9 @@ import {
ViewChild,
ElementRef,
} from '@angular/core'
-import { PaperlessTag } from 'src/app/data/paperless-tag'
-import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'
-import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'
+import { Tag } from 'src/app/data/tag'
+import { Correspondent } from 'src/app/data/correspondent'
+import { DocumentType } from 'src/app/data/document-type'
import { Subject, Subscription } from 'rxjs'
import { debounceTime, distinctUntilChanged, filter } from 'rxjs/operators'
import { DocumentTypeService } from 'src/app/services/rest/document-type.service'
@@ -49,6 +49,7 @@ import {
FILTER_OWNER_ISNULL,
FILTER_OWNER_ANY,
FILTER_CUSTOM_FIELDS,
+ FILTER_SHARED_BY_USER,
} from 'src/app/data/filter-rule-type'
import {
FilterableDropdownSelectionModel,
@@ -61,8 +62,8 @@ import {
SelectionData,
SelectionDataItem,
} from 'src/app/services/rest/document.service'
-import { PaperlessDocument } from 'src/app/data/paperless-document'
-import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'
+import { Document } from 'src/app/data/document'
+import { StoragePath } from 'src/app/data/storage-path'
import { StoragePathService } from 'src/app/services/rest/storage-path.service'
import { RelativeDate } from '../../common/date-dropdown/date-dropdown.component'
import {
@@ -104,6 +105,51 @@ const RELATIVE_DATE_QUERYSTRINGS = [
},
]
+const DEFAULT_TEXT_FILTER_TARGET_OPTIONS = [
+ { id: TEXT_FILTER_TARGET_TITLE, name: $localize`Title` },
+ {
+ id: TEXT_FILTER_TARGET_TITLE_CONTENT,
+ name: $localize`Title & content`,
+ },
+ { id: TEXT_FILTER_TARGET_ASN, name: $localize`ASN` },
+ {
+ id: TEXT_FILTER_TARGET_CUSTOM_FIELDS,
+ name: $localize`Custom fields`,
+ },
+ {
+ id: TEXT_FILTER_TARGET_FULLTEXT_QUERY,
+ name: $localize`Advanced search`,
+ },
+]
+
+const TEXT_FILTER_TARGET_MORELIKE_OPTION = {
+ id: TEXT_FILTER_TARGET_FULLTEXT_MORELIKE,
+ name: $localize`More like`,
+}
+
+const DEFAULT_TEXT_FILTER_MODIFIER_OPTIONS = [
+ {
+ id: TEXT_FILTER_MODIFIER_EQUALS,
+ label: $localize`equals`,
+ },
+ {
+ id: TEXT_FILTER_MODIFIER_NULL,
+ label: $localize`is empty`,
+ },
+ {
+ id: TEXT_FILTER_MODIFIER_NOTNULL,
+ label: $localize`is not empty`,
+ },
+ {
+ id: TEXT_FILTER_MODIFIER_GT,
+ label: $localize`greater than`,
+ },
+ {
+ id: TEXT_FILTER_MODIFIER_LT,
+ label: $localize`less than`,
+ },
+]
+
@Component({
selector: 'pngx-filter-editor',
templateUrl: './filter-editor.component.html',
@@ -184,10 +230,10 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
@ViewChild('textFilterInput')
textFilterInput: ElementRef
- tags: PaperlessTag[] = []
- correspondents: PaperlessCorrespondent[] = []
- documentTypes: PaperlessDocumentType[] = []
- storagePaths: PaperlessStoragePath[] = []
+ tags: Tag[] = []
+ correspondents: Correspondent[] = []
+ documentTypes: DocumentType[] = []
+ storagePaths: StoragePath[] = []
tagDocumentCounts: SelectionDataItem[]
correspondentDocumentCounts: SelectionDataItem[]
@@ -196,32 +242,15 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
_textFilter = ''
_moreLikeId: number
- _moreLikeDoc: PaperlessDocument
+ _moreLikeDoc: Document
get textFilterTargets() {
- let targets = [
- { id: TEXT_FILTER_TARGET_TITLE, name: $localize`Title` },
- {
- id: TEXT_FILTER_TARGET_TITLE_CONTENT,
- name: $localize`Title & content`,
- },
- { id: TEXT_FILTER_TARGET_ASN, name: $localize`ASN` },
- {
- id: TEXT_FILTER_TARGET_CUSTOM_FIELDS,
- name: $localize`Custom fields`,
- },
- {
- id: TEXT_FILTER_TARGET_FULLTEXT_QUERY,
- name: $localize`Advanced search`,
- },
- ]
if (this.textFilterTarget == TEXT_FILTER_TARGET_FULLTEXT_MORELIKE) {
- targets.push({
- id: TEXT_FILTER_TARGET_FULLTEXT_MORELIKE,
- name: $localize`More like`,
- })
+ return DEFAULT_TEXT_FILTER_TARGET_OPTIONS.concat([
+ TEXT_FILTER_TARGET_MORELIKE_OPTION,
+ ])
}
- return targets
+ return DEFAULT_TEXT_FILTER_TARGET_OPTIONS
}
textFilterTarget = TEXT_FILTER_TARGET_TITLE_CONTENT
@@ -234,28 +263,7 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
public textFilterModifier: string
get textFilterModifiers() {
- return [
- {
- id: TEXT_FILTER_MODIFIER_EQUALS,
- label: $localize`equals`,
- },
- {
- id: TEXT_FILTER_MODIFIER_NULL,
- label: $localize`is empty`,
- },
- {
- id: TEXT_FILTER_MODIFIER_NOTNULL,
- label: $localize`is not empty`,
- },
- {
- id: TEXT_FILTER_MODIFIER_GT,
- label: $localize`greater than`,
- },
- {
- id: TEXT_FILTER_MODIFIER_LT,
- label: $localize`less than`,
- },
- ]
+ return DEFAULT_TEXT_FILTER_MODIFIER_OPTIONS
}
get textFilterModifierIsNull(): boolean {
@@ -503,6 +511,12 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
parseInt(rule.value, 10)
)
break
+ case FILTER_SHARED_BY_USER:
+ this.permissionsSelectionModel.ownerFilter =
+ OwnerFilterType.SHARED_BY_ME
+ if (rule.value)
+ this.permissionsSelectionModel.userID = parseInt(rule.value, 10)
+ break
case FILTER_OWNER_ISNULL:
if (rule.value === 'true' || rule.value === '1') {
this.permissionsSelectionModel.hideUnowned = false
@@ -801,6 +815,13 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
rule_type: FILTER_OWNER_ANY,
value: this.permissionsSelectionModel.includeUsers?.join(','),
})
+ } else if (
+ this.permissionsSelectionModel.ownerFilter == OwnerFilterType.SHARED_BY_ME
+ ) {
+ filterRules.push({
+ rule_type: FILTER_SHARED_BY_USER,
+ value: this.permissionsSelectionModel.userID.toString(),
+ })
} else if (
this.permissionsSelectionModel.ownerFilter == OwnerFilterType.UNOWNED
) {
diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
index 4563e9624..0d0a84eb8 100644
--- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
+++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
@@ -8,11 +8,13 @@
-
-
Filter rules error occurred while saving this view
- The error returned was :
- {{ error.filter_rules }}
-
+ @if (error?.filter_rules) {
+
+
Filter rules error occurred while saving this view
+ The error returned was :
+ {{ error.filter_rules }}
+
+ }