diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 75b050767..737d1f9cf 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -108,7 +108,7 @@ 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 { CustomFieldsLookupDropdownComponent } from './components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component' +import { CustomFieldsQueryDropdownComponent } from './components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component' import { ProfileEditDialogComponent } from './components/common/profile-edit-dialog/profile-edit-dialog.component' import { PdfViewerModule } from 'ng2-pdf-viewer' import { DocumentLinkComponent } from './components/common/input/document-link/document-link.component' @@ -228,6 +228,7 @@ import { uiRadios, upcScan, x, + xCircle, xLg, } from 'ngx-bootstrap-icons' @@ -329,6 +330,7 @@ const icons = { uiRadios, upcScan, x, + xCircle, xLg, } @@ -486,7 +488,7 @@ function initializeApp(settings: SettingsService) { CustomFieldsComponent, CustomFieldEditDialogComponent, CustomFieldsDropdownComponent, - CustomFieldsLookupDropdownComponent, + CustomFieldsQueryDropdownComponent, ProfileEditDialogComponent, DocumentLinkComponent, PreviewPopupComponent, diff --git a/src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.html b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html similarity index 87% rename from src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.html rename to src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html index 4e591aa32..bf1a1bfd4 100644 --- a/src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.html +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html @@ -2,6 +2,9 @@
} diff --git a/src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.scss b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss similarity index 100% rename from src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.scss rename to src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss diff --git a/src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.ts b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts similarity index 96% rename from src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.ts rename to src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts index 570fe6150..f4b4c9fbe 100644 --- a/src-ui/src/app/components/common/custom-fields-lookup-dropdown/custom-fields-lookup-dropdown.component.ts +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts @@ -196,11 +196,11 @@ export class CustomFieldQueriesModel { } @Component({ - selector: 'pngx-custom-fields-lookup-dropdown', - templateUrl: './custom-fields-lookup-dropdown.component.html', - styleUrls: ['./custom-fields-lookup-dropdown.component.scss'], + selector: 'pngx-custom-fields-query-dropdown', + templateUrl: './custom-fields-query-dropdown.component.html', + styleUrls: ['./custom-fields-query-dropdown.component.scss'], }) -export class CustomFieldsLookupDropdownComponent { +export class CustomFieldsQueryDropdownComponent { public CustomFieldQueryComponentType = CustomFieldQueryComponentType @Input() @@ -281,6 +281,10 @@ export class CustomFieldsLookupDropdownComponent { this.selectionModel.removeComponent(component) } + public reset() { + this.selectionModel.clear() + } + getOperatorsForField(field: CustomField): string[] { return ['exact', 'in', 'icontains', 'isnull', 'exists'] // TODO: implement this diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html index 9308733ec..39e51a123 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html @@ -86,10 +86,10 @@ } @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.CustomField) && customFields.length > 0) { -