Ejemplo n.º 1
0
        private IEnumerable <OrganisationViewModel> BuildLegalEntityViewModels(EditVacancyInfo info, string employerAccountId)
        {
            if (info == null || !info.LegalEntities.Any())
            {
                _logger.LogError("No legal entities found for {employerAccountId}", employerAccountId);
                return(new List <OrganisationViewModel>());
            }

            return(info.LegalEntities.Select(ConvertToOrganisationViewModel).ToList());
        }
Ejemplo n.º 2
0
        public Task UpdateEmployerVacancyDataAsync(string employerAccountId, IEnumerable <LegalEntity> legalEntities)
        {
            var employerVacancyDataItem = new EditVacancyInfo
            {
                Id            = QueryViewType.EditVacancyInfo.GetIdValue(employerAccountId),
                LegalEntities = legalEntities,
                LastUpdated   = _timeProvider.Now
            };

            return(_queryStore.UpsertAsync(employerVacancyDataItem));
        }
Ejemplo n.º 3
0
        private IEnumerable <LocationOrganisationViewModel> BuildLegalEntityViewModels(EditVacancyInfo info, string employerAccountId)
        {
            if (info == null || !info.LegalEntities.Any())
            {
                Logger.LogError("No legal entities found for {employerAccountId}", employerAccountId);
                return(null); // TODO: Can we carry on without a list of legal entities.
            }

            return(info.LegalEntities.Select(MapLegalEntitiesToOrgs).ToList());
        }