public async Task <IActionResult> ClarificationApplications(int page = 1) { var statusCounts = await _applyApiClient.GetFinancialApplicationsStatusCounts(); var applications = await _applyApiClient.GetClarificationFinancialApplications(); var paginatedApplications = new PaginatedList <RoatpFinancialSummaryItem>(applications, applications.Count, page, int.MaxValue); var viewmodel = new RoatpFinancialDashboardViewModel { Applications = paginatedApplications, StatusCounts = statusCounts }; return(View("~/Views/Roatp/Apply/Financial/ClarificationApplications.cshtml", viewmodel)); }
public async Task <IActionResult> ClarificationApplications([StringTrim] string searchTerm, string sortColumn, string sortOrder, int page = 1) { ValidateSearchTerm(searchTerm); var applications = await _applyApiClient.GetClarificationFinancialApplications(ModelState.IsValid?searchTerm : null, sortColumn, sortOrder); var statusCounts = await _applyApiClient.GetFinancialApplicationsStatusCounts(ModelState.IsValid?searchTerm : null); var viewmodel = new RoatpFinancialDashboardViewModel { Applications = new PaginatedList <RoatpFinancialSummaryItem>(applications, applications.Count, page, int.MaxValue), StatusCounts = statusCounts, SelectedTab = nameof(ClarificationApplications), SearchTerm = searchTerm, SortColumn = sortColumn, SortOrder = sortOrder }; return(View("~/Views/Roatp/Apply/Financial/ClarificationApplications.cshtml", viewmodel)); }