From 1b7179207d447fb343ec8bc1649d2dd417ec5386 Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 13 Jun 2024 10:57:19 +0300 Subject: [PATCH] [develop | DONE | FIXED ] fix checks for deposit pages in explore --- deposit/depositFirstPage.component.ts | 57 ++++++++++++------- .../isPageEnabled/isPageEnabled.component.ts | 8 +-- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/deposit/depositFirstPage.component.ts b/deposit/depositFirstPage.component.ts index 278bc4df..43172cce 100644 --- a/deposit/depositFirstPage.component.ts +++ b/deposit/depositFirstPage.component.ts @@ -105,7 +105,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc Find the appropriate repository.
-
+
OpenAIRE logo @@ -120,27 +120,40 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
-
-
-
- Zenodo logo -
- Deposit your research in Zenodo repository -
-
- - -
-
+ +
+
+
+ Zenodo logo +
+ Deposit your research in Zenodo repository +
+
+ + +
+
+
+
+
+
+ Zenodo logo +
+ Deposit your research in Zenodo repository +
+
+ +
+
diff --git a/utils/isPageEnabled/isPageEnabled.component.ts b/utils/isPageEnabled/isPageEnabled.component.ts index 6c9c083a..34fd2593 100644 --- a/utils/isPageEnabled/isPageEnabled.component.ts +++ b/utils/isPageEnabled/isPageEnabled.component.ts @@ -18,6 +18,7 @@ import {Subscription} from "rxjs"; }) export class IsPageEnabledComponent implements OnInit, OnDestroy { @Input() pageRoute:string; + @Input() communityId:string; public properties: EnvProperties = properties; pageEnabled = false; @@ -33,10 +34,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy { ngOnInit() { - this.subs.push(this.communityService.getCommunityAsObservable().subscribe( community => { - this.community = community; - this.getPageStatus(); - })); + this.getPageStatus(); } ngOnDestroy() { @@ -51,7 +49,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy { private getPageStatus() { - this.configurationService.isPageEnabled(this.properties, this.community.communityId, '/' + this.pageRoute).subscribe((page) => { + this.configurationService.isPageEnabled(this.properties, this.communityId, '/' + this.pageRoute).subscribe((page) => { this.pageEnabled = page; }) }