From a03c275b317413f1339c52355e9e9eb6b63acc26 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 14 Jul 2025 10:27:45 +0200 Subject: [PATCH] Feature/add no results message to assistant (#5166) * Add no results message * Update changelog --- CHANGELOG.md | 1 + libs/ui/src/lib/assistant/assistant.html | 169 ++++++++++++----------- 2 files changed, 92 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb0e90e99..201403c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added a message to the assistant if no results have been found - Added the category title to the settings dialog to customize the rule thresholds of the _X-ray_ page (experimental) ### Changed diff --git a/libs/ui/src/lib/assistant/assistant.html b/libs/ui/src/lib/assistant/assistant.html index ed6781d21..f957d9dcc 100644 --- a/libs/ui/src/lib/assistant/assistant.html +++ b/libs/ui/src/lib/assistant/assistant.html @@ -38,87 +38,100 @@ @if (searchFormControl.value) {
- @if (searchResults?.quickLinks?.length !== 0 || isLoading.quickLinks) { -
-
- Quick Links -
- @for ( - searchResultItem of searchResults.quickLinks; - track searchResultItem - ) { - - } - @if (isLoading.quickLinks) { - - } -
- } - @if (searchResults?.holdings?.length !== 0 || isLoading.holdings) { -
-
- Holdings -
- @for ( - searchResultItem of searchResults.holdings; - track searchResultItem - ) { - - } - @if (isLoading.holdings) { - - } -
- } @if ( - hasPermissionToAccessAdminControl && - (searchResults?.assetProfiles?.length !== 0 || - isLoading.assetProfiles) + !isLoading.assetProfiles && + !isLoading.holdings && + !isLoading.quickLinks && + searchResults.assetProfiles?.length === 0 && + searchResults.holdings?.length === 0 && + searchResults.quickLinks?.length === 0 ) { -
-
- Asset Profiles +
No results found...
+ } @else { + @if ( + isLoading.quickLinks || searchResults?.quickLinks?.length !== 0 + ) { +
+
+ Quick Links +
+ @for ( + searchResultItem of searchResults.quickLinks; + track searchResultItem + ) { + + } + @if (isLoading.quickLinks) { + + }
- @for ( - searchResultItem of searchResults.assetProfiles; - track searchResultItem - ) { - - } - @if (isLoading.assetProfiles) { - - } -
+ } + @if (isLoading.holdings || searchResults?.holdings?.length !== 0) { +
+
+ Holdings +
+ @for ( + searchResultItem of searchResults.holdings; + track searchResultItem + ) { + + } + @if (isLoading.holdings) { + + } +
+ } + @if ( + hasPermissionToAccessAdminControl && + (isLoading.assetProfiles || + searchResults?.assetProfiles?.length !== 0) + ) { +
+
+ Asset Profiles +
+ @for ( + searchResultItem of searchResults.assetProfiles; + track searchResultItem + ) { + + } + @if (isLoading.assetProfiles) { + + } +
+ } }
}