From b3c60b383b084ed53e08d131b36560770fe03c7e Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 8 Sep 2024 17:46:24 -0700 Subject: [PATCH] Slightly better embedded doc link element --- ...ustom-fields-query-dropdown.component.html | 3 +- ...ustom-fields-query-dropdown.component.scss | 15 +++ .../document-link.component.html | 102 ++++++++++-------- .../document-link/document-link.component.ts | 3 + 4 files changed, 74 insertions(+), 49 deletions(-) diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html index fc0fae824..578955d96 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html @@ -79,8 +79,7 @@ } @case (CustomFieldQueryOperator.Contains) { - - + } @default { diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss index 14056474b..3995ffc5e 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss @@ -15,3 +15,18 @@ min-width: 35%; font-size: 14px; } + +::ng-deep .doc-link-select { + padding-top: 0 !important; + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; + + .ng-select-container { + border: none !important; + min-height: auto !important; + } + .ng-select { + max-width: 200px; + min-width: 140px; + } +} diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.html b/src-ui/src/app/components/common/input/document-link/document-link.component.html index a8ecce4e6..94b6033b4 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.html +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.html @@ -1,50 +1,58 @@ -
-
-
- @if (title) { - - } - @if (removable) { - - } -
-
-
- - - - - -
-
Loading...
-
- -
{{document.title}} ({{document.created | customDate:'shortDate'}})
-
-
+@if (minimal) { + +} @else { +
+
+
+ @if (title) { + + } + @if (removable) { + + } +
+
+ + @if (hint) { + {{hint}} + }
- @if (hint) { - {{hint}} - }
-
+} + + + + diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.ts b/src-ui/src/app/components/common/input/document-link/document-link.component.ts index 83a6a742e..0e06da34b 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.ts +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.ts @@ -46,6 +46,9 @@ export class DocumentLinkComponent @Input() parentDocumentID: number + @Input() + minimal: boolean = false + constructor(private documentsService: DocumentService) { super() }