diff --git a/claims/claim-utils/claimContextSearchForm.component.ts b/claims/claim-utils/claimContextSearchForm.component.ts index bed48c8f..71977c69 100644 --- a/claims/claim-utils/claimContextSearchForm.component.ts +++ b/claims/claim-utils/claimContextSearchForm.component.ts @@ -129,7 +129,7 @@ export class ClaimContextSearchFormComponent { } select(communityId, communityLabel) { - console.log("SELECT", communityId) + // console.log("SELECT", communityId) this.selectedCommunityId = communityId; this.selectedCommunityLabel = communityLabel; this.getCategories(); diff --git a/claims/claim-utils/claimHelper.class.ts b/claims/claim-utils/claimHelper.class.ts index c9d82250..9e248510 100644 --- a/claims/claim-utils/claimHelper.class.ts +++ b/claims/claim-utils/claimHelper.class.ts @@ -202,6 +202,6 @@ export class ShowOptions { options.push({value: 'context',label: OpenaireEntities.COMMUNITIES}) } this.selectOptions = options; - console.log(options, claimProperties.SELECT_ENTITIES.projects) + // console.log(options, claimProperties.SELECT_ENTITIES.projects) } } diff --git a/claims/claim-utils/claimProjectSearchForm.component.html b/claims/claim-utils/claimProjectSearchForm.component.html index 8bd0fe4a..cf4806ef 100644 --- a/claims/claim-utils/claimProjectSearchForm.component.html +++ b/claims/claim-utils/claimProjectSearchForm.component.html @@ -1,11 +1,11 @@ -
+
+ [options]="showOptions.selectOptions" class="uk-width-medium@xl uk-width-auto">
-
+
@@ -14,7 +14,7 @@
-
Select funder to proceed +
Select funder or search for projects to proceed
@@ -65,7 +65,7 @@
-
{{selectedFunder.name}} has no projects. Proceed to next step.
+
No projects for funder {{selectedFunder.name}}.
{ + let option = {value : null, label: "No funder selected"}; + this.funderOptions.push(option); for(let v of data[2][0].values){ let option = {value : v, label: v.name}; this.funderOptions.push(option); @@ -108,7 +109,7 @@ export class ClaimProjectsSearchFormComponent { this.prevFilters = this.filters; //searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any { - this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, null, [], this.createOpenaireRefineQuery()).subscribe( + this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, this.createOpenaireRefineQuery(), [], null).subscribe( // this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe( data => { if (data != null) { @@ -151,7 +152,7 @@ export class ClaimProjectsSearchFormComponent { const entity: ClaimEntity = new ClaimEntity(); entity.project = new ClaimProject(); entity.project.funderId = item.funderId; - entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId.split("::")[1]); + entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId?entity.project.funderId.split("::")[1]:""); entity.project.funderName = item.funderName; entity.id = item.id; entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null; @@ -187,12 +188,6 @@ export class ClaimProjectsSearchFormComponent { } createOpenaireRefineQuery(): string { - /*if(this.startYear.length > 0 ){ - query+='&fq=projectstartyear exact \"'+this.startYear+'\"' - } - if(this.endYear.length > 0 ){ - query+='&fq=projectendyear exact \"'+this.endYear+'\"' - }*/ let allFqs = ""; for (let filter of this.filters) { if (filter.countSelectedValues > 0) { @@ -210,8 +205,11 @@ export class ClaimProjectsSearchFormComponent { } } } - if(this.isNoProjectFunder){ - allFqs += "&fq=" + StringUtils.URIEncode( "funder exact " + (StringUtils.quote(this.selectedFunder.id))); ; + if(this.selectedFunder){ + allFqs += "&fq=" + StringUtils.URIEncode( "funder exact " + (StringUtils.quote(this.selectedFunder.id))); + } + if(!this.isNoProjectFunder || !this.selectedFunder){ + allFqs += '&fq=(projectcode<>"unidentified")' } for (let i = 0; i < this.rangeFilters.length; i++) { let filter = this.rangeFilters[i]; diff --git a/claims/claim-utils/displayClaims/displayClaims.component.ts b/claims/claim-utils/displayClaims/displayClaims.component.ts index 9e9e4648..f2b50af5 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -329,7 +329,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy { delete() { let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id)); - console.log(claimsToBeDeleted); + // console.log(claimsToBeDeleted); this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe( res => { if (this.index != null) { diff --git a/claims/claim-utils/service/searchOrcid.service.ts b/claims/claim-utils/service/searchOrcid.service.ts index 892dc77d..b71df253 100644 --- a/claims/claim-utils/service/searchOrcid.service.ts +++ b/claims/claim-utils/service/searchOrcid.service.ts @@ -108,7 +108,6 @@ export class SearchOrcidService { static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any { - console.log(data) if (data[2] != null) { if (addId) { authorIds.push(data[2].path); @@ -128,9 +127,7 @@ export class SearchOrcidService { if (data[3] != null) { author['institution'] = data[3]; } - console.log(author['institution']) authors.push(author); - return true; } return false; diff --git a/claims/directLinking/directLinking.component.html b/claims/directLinking/directLinking.component.html index f34e2c57..ea196bf3 100644 --- a/claims/directLinking/directLinking.component.html +++ b/claims/directLinking/directLinking.component.html @@ -1,3 +1,4 @@ + diff --git a/claims/directLinking/directLinking.module.ts b/claims/directLinking/directLinking.module.ts index 9505f79d..5d53bb6b 100644 --- a/claims/directLinking/directLinking.module.ts +++ b/claims/directLinking/directLinking.module.ts @@ -8,12 +8,13 @@ import {SearchResearchResultsServiceModule} from '../../services/searchResearchR import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module'; import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module'; import {LinkingGenericModule} from '../linking/linkingGeneric.module'; +import {LoadingModule} from "../../utils/loading/loading.module"; @NgModule({ imports: [ SharedModule, EntitySearchServiceModule, SearchResearchResultsServiceModule, - Schema2jsonldModule, SEOServiceModule, LinkingGenericModule + Schema2jsonldModule, SEOServiceModule, LinkingGenericModule, LoadingModule ], providers:[], declarations: [ diff --git a/claims/linking/bulkClaim/bulkClaim.component.ts b/claims/linking/bulkClaim/bulkClaim.component.ts index 79654726..0e296e87 100644 --- a/claims/linking/bulkClaim/bulkClaim.component.ts +++ b/claims/linking/bulkClaim/bulkClaim.component.ts @@ -133,11 +133,11 @@ export class BulkClaimComponent { } }); } + upload() { this.enableUpload = false; this.showReport = false; this.errorMessage = ""; - console.log(this.filesToUpload); if (this.filesToUpload.length == 0) { this.errorMessage = "There is no selected file to upload."; return; diff --git a/claims/linking/insertClaim/insertClaim.component.ts b/claims/linking/insertClaim/insertClaim.component.ts index 4aebe5f3..17c920ba 100644 --- a/claims/linking/insertClaim/insertClaim.component.ts +++ b/claims/linking/insertClaim/insertClaim.component.ts @@ -232,7 +232,7 @@ export class ClaimInsertComponent { data => { this.feedRecordsJob = data.data; this.records2Insert = directclaims.length; - console.log(data); + // console.log(data); // this.insertedRecords = data.insertedIds; // // this.errorInRecords = data.errorInClaims; diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index 654f82e6..10b17a94 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -132,42 +132,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {end: true, offset: footer_offset}); } - /** - * @deprecated - * - * Should be smooth - * - * */ - private observeBottom() { - let bottom = document.getElementById('bottom'); - if (bottom) { - let bottomObs = new IntersectionObserver(entries => { - entries.forEach(entry => { - this.shouldSticky = !entry.isIntersecting; - }) - }); - this.subscriptions.push(bottomObs); - bottomObs.observe(bottom); - } - } - - /** - * @deprecated - * */ - private observeHeader() { - if (this.header) { - let headerObs = new IntersectionObserver(entries => { - entries.forEach(entry => { - if (entry.boundingClientRect.height > 0) { - this.layoutService.setReplaceHeader(!entry.isIntersecting); - } - }) - }); - this.subscriptions.push(headerObs); - headerObs.observe(this.header.nativeElement); - } - } - private observeStickyFooter() { if (this.sticky_footer) { let resizeObs = new ResizeObserver(entries => { diff --git a/dashboard/sharedComponents/sidebar/layout.service.ts b/dashboard/sharedComponents/sidebar/layout.service.ts index dc515f81..2cf7a798 100644 --- a/dashboard/sharedComponents/sidebar/layout.service.ts +++ b/dashboard/sharedComponents/sidebar/layout.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from "@angular/core"; +import {AfterViewInit, Injectable} from "@angular/core"; import {BehaviorSubject, Observable, Subscriber} from "rxjs"; import {ActivationStart, Router} from "@angular/router"; import {Icon} from "../../../sharedComponents/menu"; @@ -92,6 +92,7 @@ export class LayoutService { * Display help pop-up on non-admin pages. (default true for the rest of the pages) * */ private hasHelpPopUpSubject: BehaviorSubject = new BehaviorSubject(true); + private isBottomIntersectingSubject: BehaviorSubject = new BehaviorSubject(false); private subscriptions: any[] = []; ngOnDestroy() { @@ -119,6 +120,20 @@ export class LayoutService { this.subscriptions.push(resizeObs); resizeObs.observe(document.documentElement); } + if(typeof document !== "undefined") { + setTimeout(() => { + let bottom = document.getElementById('bottom'); + if (bottom) { + let bottomObs = new IntersectionObserver(entries => { + entries.forEach(entry => { + this.isBottomIntersectingSubject.next(entry.isIntersecting); + }) + }); + this.subscriptions.push(bottomObs); + bottomObs.observe(bottom); + } + }, 500) + } } constructor(private router: Router) { @@ -355,4 +370,8 @@ export class LayoutService { setHasHelpPopUp(value: boolean) { this.hasHelpPopUpSubject.next(value); } + + get isBottomIntersecting(): Observable { + return this.isBottomIntersectingSubject.asObservable(); + } } diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.html b/dashboard/sharedComponents/sidebar/sideBar.component.html index 4d92e286..ad50df30 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.html +++ b/dashboard/sharedComponents/sidebar/sideBar.component.html @@ -40,7 +40,7 @@
- +
{{item.title}} diff --git a/dashboard/users/role-users/role-users.component.html b/dashboard/users/role-users/role-users.component.html index 88befe57..e4a39cc3 100644 --- a/dashboard/users/role-users/role-users.component.html +++ b/dashboard/users/role-users/role-users.component.html @@ -8,16 +8,16 @@
+ [searchControl]="filterForm.get('active')" [expandable]="true" [placeholder]="'Search ' + roleUtils.roles[role] + 's'" searchInputClass="outer">
@@ -27,7 +27,7 @@ [attr.uk-tooltip]="inviteDisableMessage" [class.uk-disabled]="loadPending || loadPending" [disabled]="loadActive || loadPending || !!inviteDisableMessage" (click)="openInviteModal()"> - Invite {{stakeholderUtils.roles[role]}} + Invite {{roleUtils.roles[role]}}