Example #1
0
        private async Task SetSectorReviewOutcome(GetSectorDetailsRequest request, AssessorSectorDetailsViewModel viewModel)
        {
            // TODO: To think about... could we move this into Apply Service? It's really part of getting the assessor page back from the service
            var pageReviewOutcome = await _assessorApiClient.GetAssessorPageReviewOutcome(request.ApplicationId, SequenceIds.DeliveringApprenticeshipTraining,
                                                                                          SectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees, viewModel.PageId, request.UserId);

            if (pageReviewOutcome != null)
            {
                viewModel.Status = pageReviewOutcome.Status;
                switch (pageReviewOutcome.Status)
                {
                case AssessorPageReviewStatus.Pass:
                    viewModel.OptionPassText = pageReviewOutcome.Comment;
                    break;

                case AssessorPageReviewStatus.Fail:
                    viewModel.OptionFailText = pageReviewOutcome.Comment;
                    break;

                case AssessorPageReviewStatus.InProgress:
                    viewModel.OptionInProgressText = pageReviewOutcome.Comment;
                    break;

                default:
                    break;
                }
            }
        }