Merge Angular 16 Irish Monitor to develop #33

Merged
k.triantafyllou merged 151 commits from angular-16-irish-monitor into develop 2024-02-13 09:32:41 +01:00
9 changed files with 12 additions and 11 deletions
Showing only changes of commit c202b7671b - Show all commits

View File

@ -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" &&

View File

@ -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},
]; ];
} }

View File

@ -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) => {

View File

@ -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>

View File

@ -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) {

View File

@ -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,

View File

@ -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'});

View File

@ -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;

View File

@ -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;
} }