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

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

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

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

                default:
                    break;
                }
            }
        }
        public async Task <ModeratorSectorDetailsViewModel> GetSectorDetailsViewModel(GetSectorDetailsRequest request)
        {
            var application = await _applicationApiClient.GetApplication(request.ApplicationId);

            var moderatorPage = await _moderationApiClient.GetModeratorPage(
                request.ApplicationId,
                SequenceIds.DeliveringApprenticeshipTraining,
                SectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees,
                RoatpWorkflowPageIds.YourSectorsAndEmployeesStartingPageId);

            if (application is null || moderatorPage is null)
            {
                return(null);
            }

            var sectorDetails = await _moderationApiClient.GetModeratorSectorDetails(request.ApplicationId, request.PageId);

            var blindAssessmentOutcome = await _moderationApiClient.GetBlindAssessmentOutcome(request.ApplicationId, SequenceIds.DeliveringApprenticeshipTraining,
                                                                                              SectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees, request.PageId);

            var viewModel = new ModeratorSectorDetailsViewModel
            {
                ApplicationId          = application.ApplicationId,
                Ukprn                  = application.ApplyData.ApplyDetails.UKPRN,
                PageId                 = request.PageId,
                ApplicantEmailAddress  = null,
                ApplyLegalName         = application.ApplyData.ApplyDetails.OrganisationName,
                ApplicationRoute       = application.ApplyData.ApplyDetails.ProviderRouteName,
                SubmittedDate          = application.ApplyData.ApplyDetails.ApplicationSubmittedOn,
                Caption                = moderatorPage.Caption,
                Heading                = $"Delivering training in '{sectorDetails?.SectorName}' sector",
                SectorDetails          = sectorDetails,
                BlindAssessmentOutcome = blindAssessmentOutcome
            };

            await SetSectorReviewOutcome(request, viewModel);

            return(viewModel);
        }