Skip to content

Commit

Permalink
feat: add default order by to goals n objectives
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 11, 2023
1 parent df7ee72 commit 06c7c68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config/mapping/grants/grantDetail.utils.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"periodInfoRatingGrantNumber": "grantAgreementImplementationPeriod/grantAgreement/grantAgreementNumber",
"periodInfoRatingPeriodNumber": "grantAgreementImplementationPeriod/implementationPeriodNumber",
"periodInfoRatingExtraFilter": " and performanceRating ne null",
"goalsObjectivesSort": "$orderby=goalObjectiveIndex asc,goalObjectiveName asc&",
"grantNumber": "grantAgreementNumber"
}
2 changes: 1 addition & 1 deletion src/controllers/grants.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export class GrantsController {
};
}
const mapper = mapTransform(grantPeriodGoalsObjectivesMap);
const url = `${urls.grantIPGoalsObjectives}/?$filter=${grantDetailUtils.periodInfoRatingGrantNumber} eq '${grantNumber}' AND ${grantDetailUtils.periodInfoRatingPeriodNumber} eq ${IPnumber}`;
const url = `${urls.grantIPGoalsObjectives}/?$filter=${grantDetailUtils.periodInfoRatingGrantNumber} eq '${grantNumber}' AND ${grantDetailUtils.periodInfoRatingPeriodNumber} eq ${IPnumber}&${grantDetailUtils.goalsObjectivesSort}`;

return axios
.get(url)
Expand Down

0 comments on commit 06c7c68

Please sign in to comment.