public void ClearVMData()
 {
     _leadKiosk           = new PotentialStudent();
     _leadEvent           = new PotentialStudentEvent();
     EmailVm              = new EmailPromptViewModel();
     NameVm               = new NamePromptViewModel();
     TelephoneVm          = new TelephonePromptViewModel();
     ObjectiveVm          = new ObjectivePromptViewModel();
     CampusVm             = new CampusPromptViewModel();
     CitizenshipCountryVm = new CitizenShipCountryPromptViewModel();
     ProgramsVm           = new ProgramsPromptViewModel();
     AcknowledgementVm    = new AcknowledgementViewModel();
     LanguageVm           = new LanguagePromptViewModel();
     SubViewModels        = new List <SubViewModel>
     {
         SettingsVm,
         LanguageVm,
         EmailVm,
         NameVm,
         TelephoneVm,
         ObjectiveVm,
         CampusVm,
         CitizenshipCountryVm,
         ProgramsVm,
         AcknowledgementVm
     };
 }
        public async Task <IActionResult> Acknowledgement()
        {
            var vacancyReference = GetVacancyReference();

            AcknowledgementViewModel vm = null;

            if (vacancyReference.HasValue)
            {
                vm = await _orchestrator.GetAcknowledgementViewModelAsync(vacancyReference.Value);
            }

            if (vm == null)
            {
                return(RedirectToRoute(RouteNames.WithdrawVacancy_FindVacancy_Get));
            }

            TempData.Remove(TempDataKeys.WithdrawVacancyReference);

            return(View(vm));
        }
예제 #3
0
        public async Task <AcknowledgementViewModel> GetAcknowledgementViewModel(long providerId, string hashedCommitmentId, SaveStatus saveStatus)
        {
            var commitment = await GetCommitment(providerId, hashedCommitmentId);

            var result = new AcknowledgementViewModel
            {
                CommitmentReference = commitment.Reference,
                EmployerName        = commitment.LegalEntityName,
                ProviderName        = commitment.ProviderName,
                Message             = GetLatestMessage(commitment.Messages, false)?.Message,
                RedirectUrl         = string.Empty,
                RedirectLinkText    = string.Empty,
                PageTitle           = saveStatus == SaveStatus.ApproveAndSend
                    ? "Cohort approved and sent to employer"
                    : "Cohort sent for review",
                WhatHappensNext = new List <string>()
            };

            switch (saveStatus)
            {
            case SaveStatus.ApproveAndSend when(commitment.IsTransfer() && commitment.ChangeOfPartyRequestId == null):
                result.WhatHappensNext.AddRange(new[]
                {
                    "The employer will receive your cohort and will either confirm the information is correct or contact you to suggest changes.",
                    "Once the employer approves the cohort, a transfer request will be sent to the funding employer to review.",
                    "You will receive a notification once the funding employer approves or rejects the transfer request. You can view the progress of a request from the 'With transfer sending employers' status screen."
                });

                break;

            case SaveStatus.ApproveAndSend:
                result.WhatHappensNext.Add("The employer will review the cohort and either approve it or contact you with an update.");
                break;

            default:
                result.WhatHappensNext.Add("The updated cohort will appear in the employer’s account for them to review.");
                break;
            }
            return(result);
        }
        public AcknowledgeView()
        {
            InitializeComponent();

            BindingContext = new AcknowledgementViewModel();
        }