From 8ba0ce77300164a0a48e82f492d0b7f5f8be6d4c Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 12 Aug 2022 16:21:54 +0300 Subject: [PATCH] Linking: don't show modal when there are no additional paths hide filter when there are no values available --- .../claim-utils/claimContextSearchForm.component.html | 3 +-- claims/claim-utils/claimContextSearchForm.component.ts | 10 +++++++--- .../claim-utils/claimResultSearchForm.component.html | 2 +- claims/linking/linkingGeneric.component.html | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/claims/claim-utils/claimContextSearchForm.component.html b/claims/claim-utils/claimContextSearchForm.component.html index 203badf9..5df46667 100644 --- a/claims/claim-utils/claimContextSearchForm.component.html +++ b/claims/claim-utils/claimContextSearchForm.component.html @@ -16,8 +16,7 @@ - diff --git a/claims/claim-utils/claimContextSearchForm.component.ts b/claims/claim-utils/claimContextSearchForm.component.ts index f6088264..bd73e074 100644 --- a/claims/claim-utils/claimContextSearchForm.component.ts +++ b/claims/claim-utils/claimContextSearchForm.component.ts @@ -118,11 +118,10 @@ export class ClaimContextSearchFormComponent { this.selectedCommunityLabel = communityLabel; this.getCategories(); if (this.isSelected(communityId)) { - + this.removeById(communityId); } else { this.addNewContext(communityLabel, null, {'id': communityId, 'label': communityLabel}); } - this.openModal() } public openModal() { @@ -217,11 +216,16 @@ export class ClaimContextSearchFormComponent { } else { if (this.categories[this.selectedCommunityId]) { this.loading = false; + if(this.categories[this.selectedCommunityId].length > 0){ + this.openModal() + } return; } this.subscriptions.push(this._contextService.getCategories(this.selectedCommunityId, this.properties.contextsAPI).subscribe( data => { - + if(data.length > 0){ + this.openModal() + } this.categories[this.selectedCommunityId] = data; this.concepts = []; if (this.query !== "") { diff --git a/claims/claim-utils/claimResultSearchForm.component.html b/claims/claim-utils/claimResultSearchForm.component.html index de74164e..2def4d8b 100644 --- a/claims/claim-utils/claimResultSearchForm.component.html +++ b/claims/claim-utils/claimResultSearchForm.component.html @@ -84,7 +84,7 @@ -
+
diff --git a/claims/linking/linkingGeneric.component.html b/claims/linking/linkingGeneric.component.html index 045c2d16..9a62d971 100644 --- a/claims/linking/linkingGeneric.component.html +++ b/claims/linking/linkingGeneric.component.html @@ -36,7 +36,7 @@
-
+
-