public async Task <IActionResult> Page(Guid applicationId, int sequenceNo, int sectionNo, string pageId, BackViewModel backViewModel) { var application = await _applyApiClient.GetApplication(applicationId); var applySequence = application.ApplyData.Sequences.Single(x => x.SequenceNo == sequenceNo); var applySection = applySequence.Sections.Single(x => x.SectionNo == sectionNo); var section = await _qnaApiClient.GetSection(application.ApplicationId, applySection.SectionId); var page = await _qnaApiClient.GetPage(application.ApplicationId, section.Id, pageId); if (page?.Active is false) { // DO NOT show any information page = null; } var pageVm = new PageViewModel(applicationId, sequenceNo, sectionNo, pageId, section, page, backViewModel.BackAction, backViewModel.BackController, backViewModel.BackOrganisationId); var activeApplicationStatuses = new List <string> { ApplicationStatus.Submitted, ApplicationStatus.Resubmitted }; var activeSequenceStatuses = new List <string> { ApplicationSequenceStatus.Submitted, ApplicationSequenceStatus.Resubmitted }; if (activeApplicationStatuses.Contains(application.ApplicationStatus) && activeSequenceStatuses.Contains(applySequence?.Status)) { return(View(nameof(Page), pageVm)); } else { return(View($"{nameof(Page)}_ReadOnly", pageVm)); } }