diff --git a/cache-interceptor.service.ts b/cache-interceptor.service.ts index 12f5c557..a3a67d32 100644 --- a/cache-interceptor.service.ts +++ b/cache-interceptor.service.ts @@ -49,6 +49,11 @@ export class CacheInterceptorService implements HttpInterceptor { } public checkForCachedRequests(url){ + // Do not call cache when it is not enabled at all. + // This property is not correctly used here. A new property should be introduced. For now it is ok. + if (!properties.useLongCache) { + return false; + } if(url.indexOf("refine=true") !== -1 || url.indexOf("/count?format=json") !== -1 || url.indexOf("relresulttype%3Dpublication") !== -1) { return this.cachingRequests.some(partUrl => (url.indexOf(partUrl) !== -1)); } diff --git a/fos/fos-selection/fos-selection.component.html b/fos/fos-selection/fos-selection.component.html index 1af39d33..eb877e23 100644 --- a/fos/fos-selection/fos-selection.component.html +++ b/fos/fos-selection/fos-selection.component.html @@ -4,7 +4,7 @@
-
@@ -30,7 +30,7 @@
-
@@ -77,7 +77,7 @@
@@ -110,10 +110,10 @@ -->
- - + {{project.funderShortname ? project.funderShortname : project.funderName}} @@ -183,25 +183,25 @@ import {Organization, Project} from "../../utils/result-preview/result-preview"; ({{project.code}}) , - ... + ... - + {{organization.name}} - , + , - ... + ... - + {{subject}} - {{(i < (subjects.slice(0, 10).length - 1)) ? "," : ""}} + , - ... + ... diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 22734738..4b3236ec 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -38,7 +38,7 @@ import {StringUtils} from "../../utils/string-utils.class";
Beta
- Fields of Science (FOS) + Fields of Science (FoS)
diff --git a/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.component.ts b/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.component.ts index 3d012cb5..6c0d059a 100644 --- a/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.component.ts +++ b/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.component.ts @@ -15,10 +15,10 @@ import {StringUtils} from "../../../utils/string-utils.class"; template: ` - - +
@@ -29,8 +29,9 @@ import {StringUtils} from "../../../utils/string-utils.class"; (Optional)
- - + +
@@ -120,6 +121,7 @@ export class SdgFosSuggestComponent { this.selectionModal.alertTitle = "Please send your feedback on most relevant Fields of Science for this "+this.getEntityName(this.entityType)+"."; } } else { + this.sending = true; // email functionality this.form.get("subjects").setValue(this.selection.getSelectedSubjects().map(subject => subject.id)); this.subscriptions.push(this.emailService.contact(this.properties, @@ -142,7 +144,7 @@ export class SdgFosSuggestComponent { this.selectionModal.previousButton = false; this.selectionModal.stayOpen = false; } - // this.sending = false; + this.sending = false; }, error => { console.log(error); this.error = true; diff --git a/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.module.ts b/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.module.ts index 4d327c9e..13ddd8fc 100644 --- a/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.module.ts +++ b/landingPages/landing-utils/sdg-fos-suggest/sdg-fos-suggest.module.ts @@ -8,10 +8,11 @@ import {InputModule} from "../../../sharedComponents/input/input.module"; import {SdgFosSuggestComponent} from "./sdg-fos-suggest.component"; import {AlertModalModule} from "../../../utils/modal/alertModal.module"; import {IconsModule} from "../../../utils/icons/icons.module"; +import {LoadingModule} from "../../../utils/loading/loading.module"; @NgModule({ imports: [ - CommonModule, FormsModule, InputModule, SdgSelectionModule, FosSelectionModule, RecaptchaModule, AlertModalModule, IconsModule + CommonModule, FormsModule, InputModule, SdgSelectionModule, FosSelectionModule, RecaptchaModule, AlertModalModule, IconsModule, LoadingModule ], declarations: [ SdgFosSuggestComponent diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index a2492f9e..19f43f81 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -719,7 +719,7 @@
-
@@ -871,7 +871,7 @@ - + diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index d2f24466..2ed5f2f1 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -116,7 +116,7 @@ export class ResultLandingComponent { 'Title', 'Authors', 'Access rights', 'Publisher information', 'Funding Information', 'Persistent identifiers', 'Sustainable Development Goals (SDGs)', - 'Fields of Science and Technology (FOS)', 'Other']; + 'Fields of Science (FoS)', 'Other']; public pidsArrayString: string = ""; public identifier: Identifier; @@ -993,6 +993,7 @@ export class ResultLandingComponent { this.sdgFosSuggest.subjects=this.resultLandingInfo.fos; this.sdgFosSuggest.subjectType="fos"; } + this.cdr.detectChanges(); this.sdgFosSuggest.openSelectionModal(); } diff --git a/sdg/sdg-selection/sdg-selection.component.ts b/sdg/sdg-selection/sdg-selection.component.ts index 2c42ff95..1a9101a2 100644 --- a/sdg/sdg-selection/sdg-selection.component.ts +++ b/sdg/sdg-selection/sdg-selection.component.ts @@ -28,8 +28,8 @@ export class SdgSelectionComponent { this.sdgs.push({code: element.code, id: element.id, label: element.label, html: element.html, checked: this.subjects?.includes(element.id)}); }); this.sdgs.push({code: '18', id: 'No SDGs are relevant for this ' + this.getEntityName(this.entityType), label: 'Not relevant', html: 'Not relevant', checked: false}); - }); - this.loading = false; + this.loading = false; + }); } public get firstColumn() { diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index d20bf6ff..8f7e50aa 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -476,7 +476,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang return (this.showOptionsOnEmpty) ? options : []; } const filterValue = value.toString().toLowerCase(); - options = options.filter(option => option.label.toLowerCase().indexOf(filterValue) != -1); + options = options.filter(option => (option.label && option.label.toLowerCase().indexOf(filterValue) != -1)); this.selectedIndex = options.findIndex(option => option.value === this.formControl.value); if (this.selectedIndex === -1) { this.selectedIndex = 0; diff --git a/utils/email/composer.ts b/utils/email/composer.ts index be93fefa..8e21bd62 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -142,7 +142,7 @@ export class Composer { if(subjectType == "sdg") { typeName = "Sustainable Development Goals (SDGs)"; } else { - typeName = "Fields of Science and Technology (FoS)"; + typeName = "Fields of Science (FoS)"; } let email: Email = new Email();