[angular-16-irish-monitor | WIP | CHANGED]: Changed checks for irish portal (use properties.dashboard - properties.adminToolsPortalType will be "country")
1. env-properties.ts: Added in Dashboard "irish" type and changed "irish" to "country" in PortalType. 2. connectHelper.ts & resultLanding.service.ts & manageStakeholders.component.html & indicators.component.ts & orcid-work.component.ts & entitiesSelection.component.ts & result-preview.component.ts: Updated check to properties.dashboard != "irish". 3. portalHelper.ts: Added "country" option in portalTypes.
This commit is contained in:
parent
070ae45480
commit
c202b7671b
|
@ -6,7 +6,7 @@ import {CommunityInfo} from "./community/communityInfo";
|
||||||
export class ConnectHelper {
|
export class ConnectHelper {
|
||||||
|
|
||||||
public static getCommunityFromDomain(domain: string): string{
|
public static getCommunityFromDomain(domain: string): string{
|
||||||
if(properties.adminToolsPortalType === 'irish') {
|
if(properties.dashboard === 'irish') {
|
||||||
return properties.adminToolsCommunity;
|
return properties.adminToolsCommunity;
|
||||||
}
|
}
|
||||||
if(properties.environment == "development" &&
|
if(properties.environment == "development" &&
|
||||||
|
|
|
@ -12,6 +12,7 @@ export class PortalUtils {
|
||||||
{value: 'ri', label: StakeholderConfiguration.ENTITIES.ri + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
{value: 'ri', label: StakeholderConfiguration.ENTITIES.ri + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||||
{value: 'organization', label: StakeholderConfiguration.ENTITIES.organization + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
{value: 'organization', label: StakeholderConfiguration.ENTITIES.organization + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||||
{value: 'project', label: StakeholderConfiguration.ENTITIES.project + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
{value: 'project', label: StakeholderConfiguration.ENTITIES.project + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||||
|
{value: 'country', label: StakeholderConfiguration.ENTITIES.country + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ export class ResultLandingService {
|
||||||
if (this.resultLandingInfo.fos) {
|
if (this.resultLandingInfo.fos) {
|
||||||
this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id));
|
this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id));
|
||||||
}
|
}
|
||||||
if(properties.adminToolsPortalType != "irish") {
|
if(properties.dashboard != "irish") {
|
||||||
this.resultLandingInfo.sdg = subjectResults[4];
|
this.resultLandingInfo.sdg = subjectResults[4];
|
||||||
if (this.resultLandingInfo.sdg) {
|
if (this.resultLandingInfo.sdg) {
|
||||||
this.resultLandingInfo.sdg.sort((a, b) => {
|
this.resultLandingInfo.sdg.sort((a, b) => {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div actions>
|
<div actions>
|
||||||
<div class="uk-section-xsmall">
|
<div class="uk-section-xsmall">
|
||||||
<div class="uk-flex uk-flex-center uk-flex-wrap uk-flex-middle" [ngClass]="properties.adminToolsPortalType == 'irish' ? 'uk-flex-between@m' : 'uk-flex-right@m'">
|
<div class="uk-flex uk-flex-center uk-flex-wrap uk-flex-middle" [ngClass]="properties.dashboard == 'irish' ? 'uk-flex-between@m' : 'uk-flex-right@m'">
|
||||||
<div *ngIf="properties.adminToolsPortalType == 'irish'" class="uk-width-medium uk-margin-small-bottom">
|
<div *ngIf="properties.dashboard == 'irish'" class="uk-width-medium uk-margin-small-bottom">
|
||||||
<div input type="select" placeholder="Type"
|
<div input type="select" placeholder="Type"
|
||||||
[options]="typeOptions" [formInput]="filters.get('type')">
|
[options]="typeOptions" [formInput]="filters.get('type')">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
}
|
}
|
||||||
|
|
||||||
private checkForSchemaEnhancements(url: string) {
|
private checkForSchemaEnhancements(url: string) {
|
||||||
this.showCheckForSchemaEnhancements = this.isAdministrator && url && !this.properties.useOldStatisticsSchema && this.indicatorUtils.checkForSchemaEnhancements(url) && this.properties.adminToolsPortalType != 'irish';
|
this.showCheckForSchemaEnhancements = this.isAdministrator && url && !this.properties.useOldStatisticsSchema && this.indicatorUtils.checkForSchemaEnhancements(url) && this.properties.dashboard != 'irish';
|
||||||
}
|
}
|
||||||
|
|
||||||
migrateFromOldImportJsonFile(charts) {
|
migrateFromOldImportJsonFile(charts) {
|
||||||
|
|
|
@ -403,7 +403,7 @@ export class OrcidWorkComponent {
|
||||||
}, error => {
|
}, error => {
|
||||||
this.isLoggedIn = false;
|
this.isLoggedIn = false;
|
||||||
}));
|
}));
|
||||||
if(properties.adminToolsPortalType == 'irish'){
|
if(properties.dashboard == 'irish'){
|
||||||
this.subscriptions.push(this._userProfileService.getUserProfile().subscribe(userProfile => {
|
this.subscriptions.push(this._userProfileService.getUserProfile().subscribe(userProfile => {
|
||||||
this.hasConsent = userProfile.consent;
|
this.hasConsent = userProfile.consent;
|
||||||
}, error =>{
|
}, error =>{
|
||||||
|
@ -531,7 +531,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(properties.adminToolsPortalType == 'irish' && !this.hasConsent){
|
if(properties.dashboard == 'irish' && !this.hasConsent){
|
||||||
this._router.navigate(['/consent'], {
|
this._router.navigate(['/consent'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
|
|
@ -107,7 +107,7 @@ export class EntitiesSelectionComponent {
|
||||||
} else if ((this.customFilter && this.customFilter.queryFieldName == "community") ||
|
} else if ((this.customFilter && this.customFilter.queryFieldName == "community") ||
|
||||||
(this.customFilter && (this.customFilter.queryFieldName == "relfunder" || this.customFilter.queryFieldName == "funder")) ||
|
(this.customFilter && (this.customFilter.queryFieldName == "relfunder" || this.customFilter.queryFieldName == "funder")) ||
|
||||||
(this.customFilter && this.customFilter.queryFieldName == "relorganizationid")
|
(this.customFilter && this.customFilter.queryFieldName == "relorganizationid")
|
||||||
|| this.properties.adminToolsPortalType == "irish") {
|
|| this.properties.dashboard == "irish") {
|
||||||
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result'});
|
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result'});
|
||||||
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});
|
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});
|
||||||
this.entities.push({label: OpenaireEntities.ORGANIZATIONS, value: 'organization'});
|
this.entities.push({label: OpenaireEntities.ORGANIZATIONS, value: 'organization'});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export type Environment = "development" | "test" | "beta" | "production";
|
export type Environment = "development" | "test" | "beta" | "production";
|
||||||
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "developers" | "faircore4eosc";
|
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "developers" | "faircore4eosc" | "irish";
|
||||||
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc" | "faircore4eosc" | "irish";
|
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc" | "faircore4eosc" | "country";
|
||||||
|
|
||||||
export interface EnvProperties {
|
export interface EnvProperties {
|
||||||
environment?: Environment;
|
environment?: Environment;
|
||||||
|
|
|
@ -126,7 +126,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
this.linking = true;
|
this.linking = true;
|
||||||
this.share = true;
|
this.share = true;
|
||||||
this.cite = true;
|
this.cite = true;
|
||||||
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator' || this.properties.adminToolsPortalType == 'irish') &&
|
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator' || this.properties.dashboard == 'irish') &&
|
||||||
this.showOrcid && this.result.identifiers && this.result.identifiers.size > 0;
|
this.showOrcid && this.result.identifiers && this.result.identifiers.size > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue