Skip to content

Commit

Permalink
CON-1654-Users to see version history of accepted agreements
Browse files Browse the repository at this point in the history
  • Loading branch information
VasanthaKasirajan3008 committed Apr 24, 2020
1 parent 682e109 commit 64b38f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/SFA.DAS.EmployerAccounts/Dtos/EmployerAgreementDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class EmployerAgreementDto
public string HashedAgreementId { get; set; }
public string HashedAccountId { get; set; }
public string HashedLegalEntityId { get; set; }
public bool OrganisationLookupPossible { get; set; }
public bool OrganisationLookupPossible { get; set; }
public int TemplateId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public async Task<GetOrganisationAgreementsResponse> Handle(GetOrganisationAgree

var accountLegalEntityId = _accountLegalEntityPublicHashingService.DecodeValue(message.AccountLegalEntityHashedId);

var accountLegalEntity = await _employerAgreementRepository.GetOrganisationsAgreements(accountLegalEntityId);
var accountLegalEntity = await _employerAgreementRepository.GetOrganisationsAgreements(accountLegalEntityId);

if (accountLegalEntity == null) return new GetOrganisationAgreementsResponse();

var organisationLookupByIdPossible = await _referenceDataService.IsIdentifiableOrganisationType(accountLegalEntity.LegalEntity.Source);
Expand All @@ -69,7 +70,7 @@ public async Task<GetOrganisationAgreementsResponse> Handle(GetOrganisationAgree
});
});

return new GetOrganisationAgreementsResponse { Agreements = agreements };
return new GetOrganisationAgreementsResponse { Agreements = agreements.OrderByDescending(a => a.TemplateId).ToList() };
}
}
}

0 comments on commit 64b38f0

Please sign in to comment.