From 25b79af45a50ef4f41a8de1127cdaff04f06d00c Mon Sep 17 00:00:00 2001 From: Stefanos Hadjipetrou Date: Thu, 19 Sep 2024 16:18:23 +0300 Subject: [PATCH] feat: change grant ip label to code --- src/config/mapping/grants/grant.json | 1 + src/controllers/grants.controller.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/mapping/grants/grant.json b/src/config/mapping/grants/grant.json index a0f93ba..9837d4a 100644 --- a/src/config/mapping/grants/grant.json +++ b/src/config/mapping/grants/grant.json @@ -10,6 +10,7 @@ "implementationPeriodFrom": "periodFrom", "implementationPeriodTo": "periodTo", "implementationPeriodTitle": "title", + "implementationPeriodCode": "code", "countryCode": "geography.code", "countryName": "geography.name", "principalRecipientId": "principalRecipient.id", diff --git a/src/controllers/grants.controller.ts b/src/controllers/grants.controller.ts index 51eb0df..4c782e1 100644 --- a/src/controllers/grants.controller.ts +++ b/src/controllers/grants.controller.ts @@ -95,7 +95,11 @@ export class GrantsController { ['asc'], ).map((p, index: number) => ({ code: index + 1, - name: `Implementation Period ${_.get( + name: `${_.get( + p, + GrantMapping.implementationPeriodCode, + '', + )} ${_.get( p, GrantMapping.implementationPeriodFrom, '',