@studyportals/fawkes 9.0.1-4 → 9.0.1-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ export class OnlyCountriesDisciplineCountryRule {
|
|
|
16
16
|
const allowedCountryIds = this.getAllowedCountryIds();
|
|
17
17
|
//eslint-disable-next-line no-console
|
|
18
18
|
console.log('allowed country ids', Array.from(allowedCountryIds));
|
|
19
|
-
return Promise.resolve(allowedCountryIds.
|
|
19
|
+
return Promise.resolve(allowedCountryIds.includes(selectedCountry));
|
|
20
20
|
}
|
|
21
21
|
forSitemapGenerator(filterKeyValues) {
|
|
22
22
|
const selectedCountries = filterKeyValues.get(FilterKey.COUNTRY);
|
|
@@ -27,13 +27,13 @@ export class OnlyCountriesDisciplineCountryRule {
|
|
|
27
27
|
if (!selectedCountry) {
|
|
28
28
|
return Promise.resolve(false);
|
|
29
29
|
}
|
|
30
|
-
return Promise.resolve(this.getAllowedCountryIds().
|
|
30
|
+
return Promise.resolve(this.getAllowedCountryIds().includes(selectedCountry));
|
|
31
31
|
}
|
|
32
32
|
getAllowedCountryIds() {
|
|
33
|
-
return
|
|
33
|
+
return CountryPresenter.getInstance()
|
|
34
34
|
.getFragments()
|
|
35
35
|
.filter((country) => this.allowedCountryIsos.includes(country.iso))
|
|
36
|
-
.map((country) => country.id)
|
|
36
|
+
.map((country) => country.id);
|
|
37
37
|
}
|
|
38
38
|
getDescription() {
|
|
39
39
|
return 'Country is one of the allowed countries for discipline and country pages';
|