public async Task <PaginatedList <ApplicationSummaryItem> > Handle(WithdrawalApplicationsRequest request, CancellationToken cancellationToken) { _logger.LogInformation("Retrieving withdrawal applications"); var organisationApplicationsResult = await _repository.GetWithdrawalApplications(request.OrganisationId, request.ReviewStatus, request.SortColumn, request.SortAscending, request.PageSize, request.PageIndex); return(new PaginatedList <ApplicationSummaryItem>(organisationApplicationsResult.PageOfResults.ToList(), organisationApplicationsResult.TotalCount, request.PageIndex, request.PageSize, request.PageSetSize)); }
private async Task <PaginatedList <ApplicationSummaryItem> > GetPageApplications(string reviewStatus, IPagingState pagingState) { var withdrawalApplicationsRequest = new WithdrawalApplicationsRequest ( null, reviewStatus, pagingState.SortColumn.ToString(), pagingState.SortDirection == SortOrder.Asc ? 1 : 0, pagingState.ItemsPerPage, pagingState.PageIndex, DefaultPageSetSize ); var response = await _applyApiClient.GetWithdrawalApplications(withdrawalApplicationsRequest); return(response); }
public async Task <PaginatedList <ApplicationSummaryItem> > Handle(WithdrawalApplicationsRequest request, CancellationToken cancellationToken) { _logger.LogInformation("Retrieving withdrawal applications"); var organisationApplicationsResult = await _repository.GetWithdrawalApplications(request.OrganisationId, request.ReviewStatus, request.SortColumn, request.SortAscending, request.PageSize, request.PageIndex); var items = Mapper.Map <IEnumerable <ApplicationListItem>, IEnumerable <ApplicationSummaryItem> >(organisationApplicationsResult.PageOfResults); if (items.Any()) { var allEnrolledVersions = await _standardRepository.GetEpaoRegisteredStandardVersions(items.First().EndPointAssessorOrganisationId); foreach (var item in items) { var enrolledVersionsForStandard = allEnrolledVersions.Where(v => v.IFateReferenceNumber == item.StandardReference).ToList(); item.WithdrawalType = GetWithdrawalApplicationType(item, enrolledVersionsForStandard); } } return(new PaginatedList <ApplicationSummaryItem>(items.ToList(), organisationApplicationsResult.TotalCount, request.PageIndex, request.PageSize, request.PageSetSize)); }
public async Task <ActionResult> WithdrawalApplications([FromBody] WithdrawalApplicationsRequest withdrawalApplicationsRequest) { var applications = await _mediator.Send(withdrawalApplicationsRequest); return(Ok(applications)); }
public async Task <PaginatedList <ApplicationSummaryItem> > GetWithdrawalApplications(WithdrawalApplicationsRequest withdrawalApplicationsRequest) { return(await Post <WithdrawalApplicationsRequest, PaginatedList <ApplicationSummaryItem> >( $"/Review/WithdrawalApplications", withdrawalApplicationsRequest)); }