Skip to content

Commit

Permalink
CON-1187-remove legal entity id
Browse files Browse the repository at this point in the history
  • Loading branch information
shomavg committed Aug 25, 2020
1 parent 021744e commit 1b923de
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private async Task<IEnumerable<Vacancy>> GetProviderOwnerVacanciesWithoutLegalEn
var remainingLegalEntitiesCount = employer?.LegalEntities.Count(
l => l.AccountLegalEntityPublicHashedId != accountLegalEntityPublicHashedId) ?? 0;

//We should only transfer vacancies without a legalEntityId when the provider cannot choose another legal entity
//We should only transfer vacancies without a accountLegalEntityPublicHashedId when the provider cannot choose another legal entity
if (remainingLegalEntitiesCount == 0)
return await _vacanciesQuery.GetProviderOwnedVacanciesForEmployerWithoutAccountLegalEntityPublicHashedIdAsync(ukprn, employerAccountId);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using AutoFixture;
using Esfa.Recruit.Provider.Web.Configuration;
using Esfa.Recruit.Provider.Web.Mappings;
using Esfa.Recruit.Provider.Web.Orchestrators;
using Esfa.Recruit.Provider.Web.ViewModels.VacancyPreview;
using Esfa.Recruit.Shared.Web.Services;
using Esfa.Recruit.Vacancies.Client.Application.Providers;
using Esfa.Recruit.Vacancies.Client.Application.Rules.VacancyRules;
using Esfa.Recruit.Vacancies.Client.Application.Validation;
using Esfa.Recruit.Vacancies.Client.Domain.Entities;
using Esfa.Recruit.Vacancies.Client.Domain.Messaging;
using Esfa.Recruit.Vacancies.Client.Infrastructure.Client;
using Esfa.Recruit.Vacancies.Client.Infrastructure.Services.PasAccount;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand All @@ -36,7 +31,6 @@ public async Task SubmitVacancyAsync_ShouldNotSubmitWhenMissingAgreements(
var vacancyId = Guid.NewGuid();
const long ukprn = 12345678;
const string employerAccountId = "ABCDEF";
const long legalEntityId = 1234;
const string accountLegalEntityPublicHashedId = "XVYABD";
var fixture = new Fixture();
var vacancy = fixture.Create<Vacancy>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static class VacancySummaryAggQueryBuilder
'title': 1,
'status': 1,
'appStatus': '$candidateApplicationReview.status',
'legalEntityId': 1,
'legalEntityName': 1,
'employerAccountId': 1,
'employerName': 1,
Expand Down Expand Up @@ -57,7 +56,6 @@ public static class VacancySummaryAggQueryBuilder
'title': 1,
'status': 1,
'appStatus': { '$cond' : [ { '$eq': ['$isApplicationWithdrawn', true] }, 'withdrawn', '$appStatus' ]},
'legalEntityId': 1,
'legalEntityName': 1,
'employerAccountId': 1,
'employerName': 1,
Expand All @@ -84,7 +82,6 @@ public static class VacancySummaryAggQueryBuilder
'vacancyReference': 1,
'title': 1,
'status': 1,
'legalEntityId': 1,
'legalEntityName': 1,
'employerAccountId': 1,
'employerName': 1,
Expand Down Expand Up @@ -133,7 +130,6 @@ public static class VacancySummaryAggQueryBuilder
'vacancyReference': '$vacancyReference',
'title': '$title',
'status': '$status',
'legalEntityId': '$legalEntityId',
'legalEntityName': '$legalEntityName',
'employerAccountId': '$employerAccountId',
'employerName': '$employerName',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ internal class VacancySummaryDetails
public Guid VacancyGuid { get; set; }
public long? VacancyReference { get; set; }
public string Title { get; set; }
public long? LegalEntityId { get; set; }
public string LegalEntityName { get; set; }
public string EmployerAccountId { get; set; }
public string EmployerName { get; set; }
Expand Down

0 comments on commit 1b923de

Please sign in to comment.