Skip to content

Commit

Permalink
feat: funding requests table dates
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 8, 2024
1 parent 6697d37 commit 701409d
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/controllers/fundingrequests.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,28 @@ export class FundingRequestsController {
_children: items.map((item: any) => {
return {
components: item.components,
submissionDate: moment(item.submissionDate).format(
'D MMMM YYYY',
),
submissionDate: item.submissionDate
? moment(item.submissionDate).format('D MMMM YYYY')
: '--',
approach: item.approach,
trpWindow: item.trpWindow,
trpOutcome: item.trpOutcome,
portfolioCategorization: item.portfolioCategorization,
_children: item.items.map((subitem: any) => {
return {
boardApproval: subitem.boardApproval,
gacMeeting: moment(item.gacMeeting).format('MMMM YYYY'),
grant: subitem.grant.code,
startingDate: moment(subitem.startDate).format(
'DD-MM-YYYY',
),
endingDate: moment(subitem.endDate).format('DD-MM-YYYY'),
boardApproval: subitem.boardApproval
? moment(subitem.boardApproval).format('MMMM YYYY')
: '--',
gacMeeting: item.gacMeeting
? moment(item.gacMeeting).format('MMMM YYYY')
: '--',
grant: subitem.grant,
startingDate: subitem.startDate
? moment(subitem.startDate).format('DD-MM-YYYY')
: '--',
endingDate: subitem.endDate
? moment(subitem.endDate).format('DD-MM-YYYY')
: '--',
principalRecipient: subitem.principalRecipient,
};
}),
Expand Down

0 comments on commit 701409d

Please sign in to comment.