From 6b8276730124cea5641213f06a4487a140cdce94 Mon Sep 17 00:00:00 2001 From: Olli Mannevaara Date: Thu, 23 May 2024 15:50:57 +0300 Subject: [PATCH] Add links to funding search from funding calls --- .../single-funding-call.component.html | 32 ++++++++++++++++--- src/app/portal/models/funding-call.model.ts | 2 +- .../portal/services/filters/filter.service.ts | 15 ++++++++- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/app/portal/components/single/single-funding-call/single-funding-call.component.html b/src/app/portal/components/single/single-funding-call/single-funding-call.component.html index 94a164197..52297e80f 100644 --- a/src/app/portal/components/single/single-funding-call/single-funding-call.component.html +++ b/src/app/portal/components/single/single-funding-call/single-funding-call.component.html @@ -390,7 +390,11 @@

Rahoitushaun vaihe

Luonnontieteiden ja tekniikan tutkimuksen toimikunta
-
{{ row.phase }} {{row.approvalDate | date}}
+
+
{{ row.phase }}
+
{{ row.approvalDate | date }}
+ Näytä päätökset +
@@ -401,7 +405,13 @@

Rahoitushaun vaihe

Biotieteiden, terveyden ja ympäristön tutkimuksen toimikunta
-
{{ row.phase }} {{row.approvalDate | date}}
+ + +
+
{{ row.phase }}
+
{{ row.approvalDate | date }}
+ Näytä päätökset +
@@ -412,7 +422,11 @@

Rahoitushaun vaihe

Kulttuurin ja yhteiskunnan tutkimuksen toimikunta
-
{{ row.phase }} {{row.approvalDate | date}}
+
+
{{ row.phase }}
+
{{ row.approvalDate | date }}
+ Näytä päätökset +
@@ -423,7 +437,11 @@

Rahoitushaun vaihe

Tutkimusinfrastruktuurikomitea
-
{{ row.phase }} {{row.approvalDate | date}}
+
+
{{ row.phase }}
+
{{ row.approvalDate | date }}
+ Näytä päätökset +
@@ -434,7 +452,11 @@

Rahoitushaun vaihe

Strategisen tutkimuksen neuvosto
-
{{ row.phase }} {{row.approvalDate | date}}
+
+
{{ row.phase }}
+
{{ row.approvalDate | date }}
+ Näytä päätökset +
diff --git a/src/app/portal/models/funding-call.model.ts b/src/app/portal/models/funding-call.model.ts index 7630b328a..c2082b9e1 100644 --- a/src/app/portal/models/funding-call.model.ts +++ b/src/app/portal/models/funding-call.model.ts @@ -38,7 +38,7 @@ export class FundingCall { }[], public daysLeft: number, public typeOfFundingId: string, - public council: any, + public council: any ) {} } diff --git a/src/app/portal/services/filters/filter.service.ts b/src/app/portal/services/filters/filter.service.ts index e771e74b0..47daf776e 100644 --- a/src/app/portal/services/filters/filter.service.ts +++ b/src/app/portal/services/filters/filter.service.ts @@ -53,6 +53,7 @@ export type Filters = { typeOfFundingId: string[]; approvalYear: string[]; decisionMaker: string[]; + callId: string[]; }; @Injectable({ @@ -96,6 +97,7 @@ export class FilterService { typeOfFundingIdFilter: string[]; approvalYearFilter: string[]; decisionMakerFilter: string[]; + callIdFilter: string[]; private filterSource = new BehaviorSubject({ toYear: [], @@ -196,6 +198,9 @@ export class FilterService { fundingStatus: mapFilter(source.fundingStatus), fundingAmount: mapFilter(source.fundingAmount), topic: mapFilter(source.topic), + + callId: mapFilter(source.callId), + // Datasets dataSource: mapFilter(source.dataSource), accessType: mapFilter(source.accessType), @@ -205,7 +210,6 @@ export class FilterService { date: mapFilter(source.date), status: mapFilter(source.status), typeOfFundingId: mapFilter(source.typeOfFundingId), - approvalYear: mapFilter(source.approvalYear), decisionMaker: mapFilter(source.decisionMaker), }; @@ -213,6 +217,8 @@ export class FilterService { // Filters createFilters(filter: Filters) { + console.log("createFilters, filter.callId", filter.callId); + // Global this.yearFilter = this.filterByYear(filter.year); this.organizationFilter = this.filterByOrganization(filter.organization); @@ -282,6 +288,7 @@ export class FilterService { filter.topic, 'keywords.keyword.keyword' ); + // Datasets this.dataSourceFilter = this.basicFilter( filter.dataSource, @@ -325,6 +332,11 @@ export class FilterService { filter.decisionMaker, 'council.decisionMakerId.keyword' ); + + this.callIdFilter = this.basicFilter( + filter.callId, + 'callProgrammeId' + ); } // Regular terms filter @@ -947,6 +959,7 @@ export class FilterService { ...basicFilter('funding', this.statusFilter), ...basicFilter('funding', this.approvalYearFilter), ...basicFilter('funding', this.decisionMakerFilter), + ...basicFilter('funding', this.callIdFilter), // Datasets ...basicFilter('dataset', this.dataSourceFilter),