Skip to content

Commit 63dfd28

Browse files
CCFRI 7287 : updated the view FA page to include licence with record … (#1002)
* CCFRI 7287 : updated the view FA page to include licence with record end date * updated the licence display logic * updated end date check to exclude licences ending on FA start date --------- Co-authored-by: Bhat <poornima.bhat@cgi.com>
1 parent a28af4f commit 63dfd28

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/src/components/fundingAgreements/ViewFundingAgreement.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ export default {
212212
return hasPerm || status !== FUNDING_AGREEMENTS_STATUS.DRAFTED_PROVIDER_ACTION_REQUIRED;
213213
},
214214
licenceToDisplay() {
215-
return this.licences.filter((l) => !l.recordEndDate);
215+
const faStart = new Date(this.fundingAgreement.fundingAgreementStartDate);
216+
return this.licences.filter((l) => {
217+
const start = new Date(l.recordStartDate);
218+
const end = l.recordEndDate ? new Date(l.recordEndDate) : null;
219+
return start <= faStart && (!end || end > faStart);
220+
});
216221
},
217222
},
218223
async created() {

0 commit comments

Comments
 (0)