From c0e4e1818d5db94457de591547ca670fadb649c7 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Thu, 8 Dec 2016 12:27:27 +0000 Subject: [PATCH] Fixing some issues for ngfactory compilation git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44881 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../claim-utils/claimContext.component.ts | 9 +- .../claim-utils/claimDataset.component.ts | 4 +- .../claim-utils/claimPublication.component.ts | 7 +- .../claim-utils/claimResult.component.ts | 1 - portal-2/src/app/claimPages/claim.module.ts | 2 +- .../inlineClaimContext.component.ts | 4 - .../selected/selectedProjects.component.ts | 6 +- .../selected/selectedResults.component.ts | 2 +- portal-2/src/app/deposit/deposit.component.ts | 60 +---- .../app/deposit/depositResult.component.ts | 4 +- .../dataProvider/dataProvider.component.ts | 2 +- .../landingPages/dataset/dataset.component.ts | 2 +- .../src/app/landingPages/landing.module.ts | 2 +- .../landingPages/project/project.component.ts | 2 +- .../publication/publication.component.ts | 2 +- .../app/searchPages/find/search.component.ts | 2 +- .../advancedSearchForm.component.ts | 14 -- .../simple/searchDatasets.component.ts | 6 +- .../app/services/ISVocabularies.service.ts | 218 ++++++------------ .../services/searchOrganizations.service.ts | 40 ---- portal-2/src/app/test/test.component.ts | 14 +- .../utils/entitiesAutoComplete.component.ts | 7 +- .../src/app/utils/modal/open.component.ts | 4 +- .../utils/projectTitleFormatter.component.ts | 2 +- 24 files changed, 106 insertions(+), 310 deletions(-) diff --git a/portal-2/src/app/claimPages/claim-utils/claimContext.component.ts b/portal-2/src/app/claimPages/claim-utils/claimContext.component.ts index 76ea6f35..651ea68e 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimContext.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimContext.component.ts @@ -1,10 +1,11 @@ -import {Component, Input,Output, ElementRef, EventEmitter, ViewChild} from '@angular/core'; +import {Component, Input,Output, EventEmitter, ViewChild} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {ContextsService} from '../../services/contexts.service'; import {ClaimContext} from '../../utils/entities/claimEntities.class'; import { StaticAutoCompleteComponent } from '../../utils/staticAutoComplete.component'; @Component({ + // moduleId: module.id, selector: 'claim-contexts', template: `
@@ -81,8 +82,6 @@ export class ClaimContextComponent { public query = ''; public filteredList = []; -public elementRef; - public communities:string[]; public selectedCommunityLabel:string = "Community:"; @@ -95,8 +94,8 @@ public infoMessage = ""; ngOnInit() { this.getCommunities(); } -constructor(private _contextService: ContextsService,myElement: ElementRef) { - this.elementRef = myElement; +constructor(private _contextService: ContextsService) { + } select($event){ diff --git a/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts b/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts index ebadfa2f..eb19aefb 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimDataset.component.ts @@ -1,5 +1,4 @@ import { Component, Input, Output, EventEmitter} from '@angular/core'; -import { Observable } from 'rxjs/Observable'; import { SearchDataciteService } from '../../services/searchDatacite.service'; import {SearchDatasetsService} from '../../services/searchDatasets.service'; import {ClaimResult} from '../../utils/entities/claimEntities.class'; @@ -98,7 +97,8 @@ export class ClaimDatasetComponent { public errorCodes:ErrorCodes = new ErrorCodes(); dataciteResults=[]; - dataciteResultsNum : Observable = null; + dataciteResultsNum:number = null; + // dataciteResultsNum : Observable = null; dataciteStatus = this.errorCodes.NONE; datacitePage : number = 1; diff --git a/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts b/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts index 53911f72..e922e74d 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimPublication.component.ts @@ -1,5 +1,4 @@ import {Component, Input, Output, EventEmitter} from '@angular/core'; -import {Observable} from 'rxjs/Observable'; import { ActivatedRoute } from '@angular/router'; import {SearchCrossrefService} from '../../services/searchCrossref.service'; import {SearchOrcidService} from '../../services/searchOrcid.service'; @@ -23,10 +22,6 @@ export class ClaimPublicationComponent { } ngOnInit() { this.sub = this.route.params.subscribe(params => { - // let page = +params['page']; - // let size = +params['size']; - // this.page = ( page <= 0 ) ? 1 : page; - // this.size = ( size <= 0 ) ? 10 : size; if(this.keyword !=null && this.keyword.length > 0){ this.search(this.keyword); } @@ -47,7 +42,7 @@ ngOnDestroy() { errorCodes:ErrorCodes = new ErrorCodes(); crossrefResults=[]; - crossrefResultsNum : Observable ; + crossrefResultsNum : number = null; crossrefPage : number = 1; crossrefStatus:number = this.errorCodes.NONE; diff --git a/portal-2/src/app/claimPages/claim-utils/claimResult.component.ts b/portal-2/src/app/claimPages/claim-utils/claimResult.component.ts index 22601f1c..ae93b9d4 100644 --- a/portal-2/src/app/claimPages/claim-utils/claimResult.component.ts +++ b/portal-2/src/app/claimPages/claim-utils/claimResult.component.ts @@ -1,5 +1,4 @@ import {Component, Input, Output, EventEmitter, ViewChild} from '@angular/core'; -import {Observable} from 'rxjs/Observable'; import {ClaimPublicationComponent} from './claimPublication.component'; import {ClaimDatasetComponent} from './claimDataset.component'; import {SearchDataciteService} from '../../services/searchDatacite.service'; diff --git a/portal-2/src/app/claimPages/claim.module.ts b/portal-2/src/app/claimPages/claim.module.ts index da44e7bc..42d9b836 100644 --- a/portal-2/src/app/claimPages/claim.module.ts +++ b/portal-2/src/app/claimPages/claim.module.ts @@ -55,7 +55,7 @@ import { ClaimRoutingModule } from './claim-routing.module'; ClaimsAdminComponent, MyClaimsComponent, ClaimComponent, ClaimsComponent, BulkLinkingComponent, LinkingComponent, LinkingHomeComponent, LinkingGenericComponent, InlineClaimContextComponent, InlineClaimProjectComponent, InlineClaimResultComponent, ClaimSelectedComponent, - ClaimContextComponent, ClaimContextComponent, ClaimSelectedContextsComponent, ClaimInsertComponent, ClaimProjectsComponent, ClaimSelectedProjectsComponent, + ClaimContextComponent, ClaimSelectedContextsComponent, ClaimInsertComponent, ClaimProjectsComponent, ClaimSelectedProjectsComponent, ClaimResultComponent, ClaimSelectedPublicationsComponent, ClaimSelectedDatasetsComponent, ClaimSelectedResultsComponent, ClaimPublicationComponent, ClaimDatasetComponent, BulkClaimComponent, ClaimEntityFormatter diff --git a/portal-2/src/app/claimPages/inlineClaims/inlineClaimContext.component.ts b/portal-2/src/app/claimPages/inlineClaims/inlineClaimContext.component.ts index a03d9a18..f0f5cf93 100644 --- a/portal-2/src/app/claimPages/inlineClaims/inlineClaimContext.component.ts +++ b/portal-2/src/app/claimPages/inlineClaims/inlineClaimContext.component.ts @@ -1,8 +1,4 @@ import {Component, Input, ViewChild, Output, EventEmitter} from '@angular/core'; - import {Observable} from 'rxjs/Observable'; - -// import {ClaimContextComponent} from '../linking/claimContext/claimContext.component'; -// import {ClaimSelectedContextsComponent} from '../linking/selected/selectedContexts.component'; import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component'; @Component({ diff --git a/portal-2/src/app/claimPages/linking/selected/selectedProjects.component.ts b/portal-2/src/app/claimPages/linking/selected/selectedProjects.component.ts index 57f761ae..beca6da7 100644 --- a/portal-2/src/app/claimPages/linking/selected/selectedProjects.component.ts +++ b/portal-2/src/app/claimPages/linking/selected/selectedProjects.component.ts @@ -4,9 +4,9 @@ import {ClaimProject} from '../../../utils/entities/claimEntities.class'; @Component({ selector: 'claim-selected-projects', template: ` -
- -
+
+
  • Selected Projects ({{(projects.length)}}) diff --git a/portal-2/src/app/claimPages/linking/selected/selectedResults.component.ts b/portal-2/src/app/claimPages/linking/selected/selectedResults.component.ts index 2d5af1bc..944700a8 100644 --- a/portal-2/src/app/claimPages/linking/selected/selectedResults.component.ts +++ b/portal-2/src/app/claimPages/linking/selected/selectedResults.component.ts @@ -8,7 +8,7 @@ import {ClaimResult} from '../../../utils/entities/claimEntities.class'; -
    +
    @@ -97,9 +65,7 @@ export class DepositComponent { public errorCodes:ErrorCodes = new ErrorCodes(); public selectedId = ""; - constructor (private _router: Router, - private _searchOrganizationsService: SearchOrganizationsService) { - console.info("constructor deposit"); + constructor (private _router: Router, private _searchOrganizationsService: SearchOrganizationsService) { this.openAccess = OpenaireProperties.getOpenAccess(); this.openAccessRepo = OpenaireProperties.getOpenAccessRepo(); @@ -109,33 +75,11 @@ export class DepositComponent { this.helpdesk = OpenaireProperties.getHelpdesk(); } - keywordChanged() { - console.info("keywordChanged: "+this.keyword); - this.status = this.errorCodes.LOADING; - this.organizations = []; - this._searchOrganizationsService.searchOrganizationsForDeposit(this.keyword, this.compatibility, 1, 10).subscribe( - data => { - this.organizations = data; - this.status = this.errorCodes.DONE; - - if(this.organizations.length == 0) { - this.status = this.errorCodes.NONE; - } - }, - err => { - console.error(err); - - this.status = this.errorCodes.ERROR; - console.info("error"); - } - ); - } organizationSelected(id: string) { if(id && id.length > 0){ - if(this.requestFor == "Publications") { this._router.navigate( ['deposit-publications-result'], { queryParams: { "organizationId": id } } ); } else if(this.requestFor == "Datasets") { diff --git a/portal-2/src/app/deposit/depositResult.component.ts b/portal-2/src/app/deposit/depositResult.component.ts index 66979822..7fb72e64 100644 --- a/portal-2/src/app/deposit/depositResult.component.ts +++ b/portal-2/src/app/deposit/depositResult.component.ts @@ -17,7 +17,7 @@ import {OrganizationService} from '../services/organization.service';

    Deposit {{requestFor}}

- @@ -37,7 +37,7 @@ import {OrganizationService} from '../services/organization.service';

Please use the information/contacts shown below to deposit your publications.

- +
{{selectedField.name}} -
@@ -44,7 +36,6 @@ import {SearchFields} from '../../utils/properties/searchFields';
-
- @@ -100,7 +87,6 @@ export class AdvancedSearchFormComponent { @Input() entityType; @Input() fieldIds: string[]; @Input() fieldIdsMap; - //:{ [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }} ; @Input() selectedFields:AdvancedField[]; @Output() queryChange = new EventEmitter(); newFieldId:string; diff --git a/portal-2/src/app/searchPages/simple/searchDatasets.component.ts b/portal-2/src/app/searchPages/simple/searchDatasets.component.ts index 99c6cc9b..00a390ee 100644 --- a/portal-2/src/app/searchPages/simple/searchDatasets.component.ts +++ b/portal-2/src/app/searchPages/simple/searchDatasets.component.ts @@ -25,16 +25,16 @@ import {DOI} from '../../utils/string-utils.class'; }) export class SearchDatasetsComponent { public results =[]; - private filters: Filter[] =[]; + public filters: Filter[] =[]; // public totalResults:number = 0 ; - private baseUrl:string; + public baseUrl:string; public searchUtils:SearchUtilsClass = new SearchUtilsClass(); private sub: any; private subResults: any; private searchFields:SearchFields = new SearchFields(); public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS; - public fieldIdsMap=this.searchFields.RESULT_FIELDS; + public fieldIdsMap=this.searchFields.RESULT_FIELDS; private urlParams : Map; private _location:Location; diff --git a/portal-2/src/app/services/ISVocabularies.service.ts b/portal-2/src/app/services/ISVocabularies.service.ts index a3a7ddcc..ebd7ef78 100644 --- a/portal-2/src/app/services/ISVocabularies.service.ts +++ b/portal-2/src/app/services/ISVocabularies.service.ts @@ -9,153 +9,90 @@ import { CacheService } from '../shared/cache.service'; @Injectable() export class ISVocabulariesService { - private api ="https://beta.services.openaire.eu/provision/mvc/vocabularies/"; + // private api ="https://beta.services.openaire.eu/provision/mvc/vocabularies/"; + private api = "http://api.openaire.eu/vocabularies/" constructor(private http: Http, public _cache: CacheService) {} getVocabularyByType(field:string,entity:string):AutoCompleteValue[]{ console.log("getVocabulary field: "+ field + " for entity: "+ entity); + var file = ""; + var vocabulary = ""; if( field == "lang"){ - return this.getLanguagesJsonFile(); + file="languages.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:languages.json"; + // return this.getVocabularyFromService(vocabulary); }else if ( field == "type" && (entity == "publication")){ - return this.getPublicationTypesJsonFile(); + file = "publicationTypes.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:publication_resource.json"; + // return this.getVocabularyFromService(vocabulary); + }else if ( field == "type" && (entity == "dataset")){ - return this.getDatasetTypesJsonFile(); + file = "dnet:dataCite_resource.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:dataCite_resource.json"; + // return this.getVocabularyFromService(vocabulary); + }else if( field == "access" && (entity == "publication" || entity == "dataset")){ - return this.getAccessModeJsonFile(); + file= "accessMode.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:access_modes.json"; + // return this.getVocabularyFromService(vocabulary); + } else if( (field == "datasourcetype") && (entity == "dataprovider")){ - return this.getDataProviderTypesJsonFile(); + file = "dataProviderType.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:datasource_typologies.json"; + // return this.getVocabularyFromService(vocabulary); + } else if( field == "compatibility" && (entity == "dataprovider")){ - return this.getDataProviderCompatibilityJsonFile(); + file = "dataProviderCompatibility.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:datasourceCompatibilityLevel.json"; + // return this.getVocabularyFromService(vocabulary); + } else if( field == "country" ){ - return this.getCountryJsonFile(); + file = "countries.json"; + return this.getVocabularyFromFile(file); + // vocabulary = "dnet:countries.json"; + // return this.getVocabularyFromService(vocabulary); + } return null; } - getLanguages ():any { - let url = this.api+"dnet:languages.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getLanguagesJsonFile ():AutoCompleteValue[] { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/languages.json'))); + getVocabularyFromFile (file:string):AutoCompleteValue[] { + var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/'+file))); return this.parse(lang["terms"]); } + getVocabularyFromService (vocabularyName:string):any { + let url = this.api + vocabularyName; + console.log(url); + // let key = url; + // if (this._cache.has(key)) { + // return Observable.of(this._cache.get(key)); + // } + return this.http.get(url).toPromise() + .then(request => + { + request = request.json()['terms']; + var results:AutoCompleteValue[] = this.parse(request); + console.log("Get vocabulary : "+ vocabularyName+ " - get " +results.length+ "results"); + return results; + }); + // return this.http.get(url) + // .do(res => console.log(res)) + // .map(res => res.json()) + // .map(res => res['terms']) + // .do(res => console.log(res)) + // .map(res => this.parse(res)) + // .do(res => console.log(res)) + // .catch(this.handleError); + // // .do(res => { + // // this._cache.set(key, res); + // // }); - - getPublicationTypes ():any { - let url = this.api+"dnet:publication_resource.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getPublicationTypesJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/publicationTypes.json'))); - return this.parse(lang["terms"]); - } - - getDatasetTypes ():any { - let url = this.api+"dnet:dataCite_resource.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getDatasetTypesJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/dnet:dataCite_resource.json'))); - return this.parse(lang["terms"]); - } - - getAccessMode ():any { - console.info("Get AccessMode from IS"); - let url = this.api+"dnet:access_modes.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getAccessModeJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/accessMode.json'))); - return this.parse(lang["terms"]); - } - getDataProviderTypes ():any { - let url = this.api+"dnet:datasource_typologies.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getDataProviderTypesJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/dataProviderType.json'))); - return this.parse(lang["terms"]); - } - getDataProviderCompatibility ():any { - let url = this.api+"dnet:datasourceCompatibilityLevel.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - - } - - getDataProviderCompatibilityJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/dataProviderCompatibility.json'))); - return this.parse(lang["terms"]); } parse (data: any):AutoCompleteValue[] { @@ -170,31 +107,10 @@ export class ISVocabulariesService { return array; } - -getCountryCompatibility ():any { - let url = this.api+"dnet:countries.json"; - let key = url; - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - return this.http.get(url) - .map(res => res.json()) - .map(res => res['terms']) - .map(res => this.parse(res)) - .do(res => { - this._cache.set(key, res); - }); - -} - -getCountryJsonFile ():any { - var lang = JSON.parse(JSON.stringify(require('../utils/vocabularies/countries.json'))); - return this.parse(lang["terms"]); -} private handleError (error: Response) { // in a real world app, we may send the error to some remote logging infrastructure // instead of just logging it to the console - console.error(error); + console.log(error); return Observable.throw(error || 'Server error'); } } diff --git a/portal-2/src/app/services/searchOrganizations.service.ts b/portal-2/src/app/services/searchOrganizations.service.ts index a89ac5ef..eee219c7 100644 --- a/portal-2/src/app/services/searchOrganizations.service.ts +++ b/portal-2/src/app/services/searchOrganizations.service.ts @@ -14,46 +14,6 @@ export class SearchOrganizationsService { constructor(private http: Http, public _cache: CacheService) {} - searchOrganizationsForDeposit (params: string, collectedFrom: string, page: number, size: number):any { - - console.info("In searchOrganizationsforDeposit"); - - let link = OpenaireProperties.getSearchResourcesAPIURL(); - - let url = link+"?query="; - if(params!= null && params != '' ) { - url += "((oaftype exact organization and deletedbyinference=false and "+ - "(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=*))"+ - " and ((organizationlegalname all "+this.quote(params)+") or (organizationlegalshortname all "+this.quote(params)+")) " + - // "and " + this.quote(params) + " " + - "and (collectedfromdatasourcename exact "+collectedFrom+")) " - - } - - url += "&page="+(page-1)+"&size="+size; - url += "&format=json"; - - let key = url; - - if (this._cache.has(key)) { - return Observable.of(this._cache.get(key)); - } - - return this.http.get(url) - .map(res => res.json()) - .do(res => console.info(res)) - .map(res => this.parseResultsForDeposit(res['results'])) - .do(res => { - this._cache.set(key, res); - }); - //.map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "organization")]); - } - - quote(params: string):string { - return encodeURIComponent('"'+params+'"'); - //return '"'+params+'"'; - } - parseResultsForDeposit(data: any): {"name": string, "id": string}[] { let results: {"name": string, "id": string}[] = []; diff --git a/portal-2/src/app/test/test.component.ts b/portal-2/src/app/test/test.component.ts index 32165955..34595762 100644 --- a/portal-2/src/app/test/test.component.ts +++ b/portal-2/src/app/test/test.component.ts @@ -69,10 +69,14 @@ export class TestComponent { } ngOnInit() { // this.lan = this._vocabulariesService.getLanguages(); - this.lan = this._vocabulariesService.getLanguagesJsonFile(); - this.types = this._vocabulariesService.getPublicationTypesJsonFile(); - this.user.email = localStorage.getItem("email"); - this.user.password = localStorage.getItem("password"); + this.lan = this._vocabulariesService.getVocabularyFromService("dnet:languages.json"); + this.countries = this._vocabulariesService.getVocabularyFromService("dnet:countries.json"); + + if( typeof localStorage !== 'undefined') { + + this.user.email = localStorage.getItem("email"); + this.user.password = localStorage.getItem("password"); + } //&collectedFrom=openaire____::4a39de251a65e801bb88d3e75b47623f&cl=and this._searchDataService.searchDatasets('&fq=collectedfromdatasourceid exact "openaire____::fdb035c8b3e0540a8d9a561a6c44f4de"' ,"&refine=true&fields=resulthostingdatasourceid", 1, 0, ["resulthostingdatasourceid"]).subscribe( data => { @@ -143,7 +147,7 @@ export class TestComponent { } } - + login(){ localStorage.setItem("email",this.user.email); localStorage.setItem("password",this.user.password); diff --git a/portal-2/src/app/utils/entitiesAutoComplete.component.ts b/portal-2/src/app/utils/entitiesAutoComplete.component.ts index 831dc46b..489d0fd7 100644 --- a/portal-2/src/app/utils/entitiesAutoComplete.component.ts +++ b/portal-2/src/app/utils/entitiesAutoComplete.component.ts @@ -91,15 +91,12 @@ export class EntitiesAutocompleteComponent { return results; }); }else if(this.entityType == "organization" && this.depositType ){ - console.info("init deposit org") - this.filtered = this.searchTermStream + this.filtered = this.searchTermStream .debounceTime(300).distinctUntilChanged() .switchMap((term: string) => { var results = this._search.searchByDepositType(term, this.depositType); this.showLoading = false; this.numFilteredResults = results.length; - console.info("deposit org::: Resuults"+results.length) - return results; }); @@ -233,7 +230,7 @@ export class EntitiesAutocompleteComponent { this.selected.push( data[0]); this.showInput = false; }, - err => console.error("An error occured")); + err => console.log("An error occured")); } } diff --git a/portal-2/src/app/utils/modal/open.component.ts b/portal-2/src/app/utils/modal/open.component.ts index ca3f535d..7327d805 100644 --- a/portal-2/src/app/utils/modal/open.component.ts +++ b/portal-2/src/app/utils/modal/open.component.ts @@ -11,12 +11,12 @@ export class Open { public isExpanded:boolean = true; @Input() - private set open(value:boolean) { + public set open(value:boolean) { this.isExpanded = value; this.toggle(); } - private get open():boolean { + public get open():boolean { return this.isExpanded; } diff --git a/portal-2/src/app/utils/projectTitleFormatter.component.ts b/portal-2/src/app/utils/projectTitleFormatter.component.ts index 42ed5529..54ffcb1d 100644 --- a/portal-2/src/app/utils/projectTitleFormatter.component.ts +++ b/portal-2/src/app/utils/projectTitleFormatter.component.ts @@ -7,7 +7,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties'; selector: 'project-title', template: ` ` })