예제 #1
0
        public async Task <ApplicationsViewModel> GetApplicationsViewModel(string selectedTab, string searchTerm, string sortColumn, string sortOrder)
        {
            var pendingApplications = await _applyApiClient.GetOversightsPending(searchTerm, sortColumn, sortOrder);

            var completedApplications = await _applyApiClient.GetOversightsCompleted(searchTerm, sortColumn, sortOrder);

            var pendingAppealApplications = await _applyApiClient.GetPendingAppealOutcomes(searchTerm, sortColumn, sortOrder);

            var completedAppealApplications = await _applyApiClient.GetCompletedAppealOutcomesCompleted(searchTerm, sortColumn, sortOrder);

            var result = new ApplicationsViewModel
            {
                ApplicationDetails     = pendingApplications,
                ApplicationCount       = pendingApplications.Reviews.Count,
                OverallOutcomeDetails  = completedApplications,
                OverallOutcomeCount    = completedApplications.Reviews.Count,
                PendingAppealsDetails  = pendingAppealApplications,
                AppealsCount           = pendingAppealApplications.Reviews.Count,
                CompleteAppealsDetails = completedAppealApplications,
                AppealsOutcomeCount    = completedAppealApplications.Reviews.Count,
                SelectedTab            = selectedTab,
                SearchTerm             = searchTerm,
                SortColumn             = sortColumn,
                SortOrder = sortOrder
            };

            return(result);
        }
        public async Task <ApplicationsViewModel> GetApplicationsViewModel()
        {
            var result = new ApplicationsViewModel();
            var pendingApplications = await _applyApiClient.GetOversightsPending();

            var completedApplications = await _applyApiClient.GetOversightsCompleted();

            result.ApplicationDetails    = pendingApplications;
            result.ApplicationCount      = pendingApplications.Reviews.Count;
            result.OverallOutcomeDetails = completedApplications;
            result.OverallOutcomeCount   = completedApplications.Reviews.Count;

            return(result);
        }