[Admin|Trunk]: Replace with properties utilsService all calls of utilities Service.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56257 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
bfe739e453
commit
6e188b81af
|
@ -168,10 +168,10 @@ export class AffiliationsComponent implements OnInit {
|
|||
|
||||
addAffiliation() {
|
||||
if (!this.isEmptyAffiliation()) {
|
||||
this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.logo_url).subscribe((logo_url)=> {
|
||||
this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url=' + this.affiliation.logo_url).subscribe((logo_url)=> {
|
||||
this.affiliation.logo_url = logo_url;
|
||||
|
||||
this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.website_url).subscribe((website_url) => {
|
||||
this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url='+ this.affiliation.website_url).subscribe((website_url) => {
|
||||
this.affiliation.website_url = website_url;
|
||||
|
||||
if (!this.curatorAffiliations) {
|
||||
|
|
|
@ -59,7 +59,7 @@ export class CuratorComponent implements OnInit {
|
|||
this.curator = curator;
|
||||
this.curator.email = Session.getUserEmail();
|
||||
if (this.curator.photo && this.curator.photo !== '') {
|
||||
this.photo = this.properties.downloadUrl + '/' + this.curator.photo;
|
||||
this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
|
||||
} else {
|
||||
this.photo = '../../../assets/common-assets/curator-default.png';
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ export class CuratorComponent implements OnInit {
|
|||
this.curator = curator;
|
||||
this.curator.email = Session.getUserEmail();
|
||||
if (this.curator.photo && this.curator.photo !== '') {
|
||||
this.photo = this.properties.downloadUrl + '/' + this.curator.photo;
|
||||
this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
|
||||
} else {
|
||||
this.photo = '../../../assets/common-assets/curator-default.png';
|
||||
}
|
||||
|
@ -193,9 +193,9 @@ export class CuratorComponent implements OnInit {
|
|||
if ((this.hasChanged || this.affiliationsChanged) && this.curator && this.curator.name && this.curator.name !== '') {
|
||||
this.showLoading = true;
|
||||
if (this.file) {
|
||||
this.utilitiesService.uploadPhoto(this.properties.uploadService + '/' + this.curator._id, this.file).subscribe((res) => {
|
||||
this.utilitiesService.uploadPhoto(this.properties.utilsService + '/upload/' + this.curator._id, this.file).subscribe((res) => {
|
||||
if (this.curator.photo && this.curator.photo !== '') {
|
||||
this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe();
|
||||
this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
|
||||
}
|
||||
this.curator.photo = res.filename;
|
||||
this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator',
|
||||
|
@ -215,7 +215,7 @@ export class CuratorComponent implements OnInit {
|
|||
);
|
||||
} else {
|
||||
if(this.deletePhoto) {
|
||||
this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe();
|
||||
this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
|
||||
this.curator.photo = '';
|
||||
}
|
||||
this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator',
|
||||
|
|
|
@ -32,9 +32,7 @@
|
|||
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
|
||||
"uploadService" : "http://mpagasas.di.uoa.gr:8001/upload",
|
||||
"downloadUrl" : "http://mpagasas.di.uoa.gr:8001/download",
|
||||
"deleteUrl" : "http://mpagasas.di.uoa.gr:8001/delete",
|
||||
"tinyUrl": "http://mpagasas.di.uoa.gr:8001/tiny?url=",
|
||||
"utilsService" : "http://mpagasas.di.uoa.gr:8000",
|
||||
|
||||
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
|
|
Loading…
Reference in New Issue