[develop]: Fix import/export indicators tab title wasn't imported bug.

This commit is contained in:
Konstantinos Triantafyllou 2024-06-28 11:51:09 +03:00
parent ab3fb51ea3
commit 6b2e1c1025
3 changed files with 8 additions and 3 deletions

View File

@ -1324,7 +1324,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
}
if (chart.type == "chart") {
indicatorPaths = chart.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, chart.type, stakeholder));
indicatorPaths = chart.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, chart.type, stakeholder, path.tab));
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts.forEach((section: Section) => {
section.indicators.forEach(indicator => {
indicator.indicatorPaths.forEach(path => {
@ -1391,6 +1391,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
"indicatorPaths": indicator.indicatorPaths.map(path => {
return {
jsonPath: path.jsonPath,
tab: path.parameters.tab ? path.parameters.tab : path.parameters.title,
url: this.indicatorUtils.getNumberUrl(path.source, this.indicatorUtils.getFullUrl(this.stakeholder, path))
}
}),
@ -1411,6 +1412,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
indicators[indexIndicator] = {
"indicatorPaths": indicator.indicatorPaths.map(path => {
return {
tab: path.parameters.tab ? path.parameters.tab : path.parameters.title,
url: this.getUrlByStakeHolder(path)
}
}),

View File

@ -680,7 +680,7 @@ export class IndicatorUtils {
return indicatorPath;
}
generateIndicatorByChartUrl(source: SourceType, url: string, type: IndicatorPathType = null, stakeholder: Stakeholder): IndicatorPath {
generateIndicatorByChartUrl(source: SourceType, url: string, type: IndicatorPathType = null, stakeholder: Stakeholder, tab: string = null): IndicatorPath {
let indicatorPath = new IndicatorPath(type, source, null, null, []);
try {
if (source === 'stats-tool') {
@ -734,6 +734,9 @@ export class IndicatorUtils {
if (indicatorPath.type == null) {
indicatorPath.type = this.defaultChartType;
}
if(tab) {
indicatorPath.parameters.tab = tab;
}
return indicatorPath;
}

View File

@ -110,7 +110,7 @@ export let commonDev: EnvProperties = {
orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/",
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
orcidClientId: "APP-A5M3KTX6NCN67L91",
utilsService: "http://mpagasas.di.uoa.gr:8000",
utilsService: "http://scoobydoo.di.uoa.gr:8000",
vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/",
loginServiceURL: "http://mpagasas.di.uoa.gr:19080/login-service/",
cookieDomain: ".di.uoa.gr",