From 1c8e46df21726cb3d2acfe8df3d96fcf02c3f1cc Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 26 Oct 2023 09:49:04 +0300 Subject: [PATCH] [angular-16-community-projects-availableSince | DONE | UPDATE] : show project link only when it is available before the db update date --- src/app/pages/projects/remove-projects.component.html | 4 ++-- src/app/pages/projects/remove-projects.component.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app/pages/projects/remove-projects.component.html b/src/app/pages/projects/remove-projects.component.html index 59af0c5..ce7d1ab 100644 --- a/src/app/pages/projects/remove-projects.component.html +++ b/src/app/pages/projects/remove-projects.component.html @@ -82,14 +82,14 @@
- {{item.name}} ({{item.acronym}}) [no title available] - + {{item.name}} ({{item.acronym}}) [no title available] diff --git a/src/app/pages/projects/remove-projects.component.ts b/src/app/pages/projects/remove-projects.component.ts index d5bc5fb..c930aef 100644 --- a/src/app/pages/projects/remove-projects.component.ts +++ b/src/app/pages/projects/remove-projects.component.ts @@ -20,6 +20,7 @@ import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler"; import {ClearCacheService} from "../../openaireLibrary/services/clear-cache.service"; import {debounceTime, distinctUntilChanged} from "rxjs/operators"; +import {IndexInfoService} from "../../openaireLibrary/utils/indexInfo.service"; @Component({ selector: 'remove-projects', @@ -63,18 +64,21 @@ export class RemoveProjectsComponent implements OnInit { ]; public openaireEntiites = OpenaireEntities; - + lastDBLoadDate = null; constructor(private route: ActivatedRoute, private _router: Router, private _fb: UntypedFormBuilder, private communityService: CommunityService, private _manageCommunityProjectsService: ManageCommunityProjectsService, private _searchCommunityProjectsService: SearchCommunityProjectsService, - private _clearCacheService: ClearCacheService) { + private _clearCacheService: ClearCacheService, private indexInfoService: IndexInfoService) { this.errorCodes = new ErrorCodes(); this.communitySearchUtils.status = this.errorCodes.LOADING; } ngOnInit() { + this.subscriptions.push(this.indexInfoService.getDBLoadLastDate(this.properties).subscribe(res => { + this.lastDBLoadDate = res; + })); this.communitySearchUtils.keyword = ""; this.filterForm = this._fb.group({ @@ -254,4 +258,6 @@ export class RemoveProjectsComponent implements OnInit { isSelected(value: string) { return this.filterForm && this.filterForm.get('funder').value && this.filterForm.get('funder').value.id === value; } + + }