-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes around TM-133 refactoring for the tech review
- Loading branch information
Showing
14 changed files
with
123 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/SFA.DAS.EmployerFinance.Web/Extensions/ListExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
using SFA.DAS.CommitmentsV2.Types; | ||
using SFA.DAS.EmployerFinance.Models.Apprenticeships; | ||
|
||
namespace SFA.DAS.EmployerFinance.Web.Extensions | ||
{ | ||
public static class ListExtensions | ||
{ | ||
public static long GetActivelyFundedApprenticeCount(this IEnumerable<ApprenticeshipDetail> apprenticesDetails) | ||
{ | ||
return apprenticesDetails.Count(o => | ||
o.ApprenticeshipStatus == ApprenticeshipStatus.WaitingToStart || | ||
o.ApprenticeshipStatus == ApprenticeshipStatus.Live || | ||
o.ApprenticeshipStatus == ApprenticeshipStatus.Paused); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/SFA.DAS.EmployerFinance/Infrastructure/OuterApiResponses/GetApplicationsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Collections.Generic; | ||
using SFA.DAS.EmployerFinance.Models.Apprenticeships; | ||
|
||
namespace SFA.DAS.EmployerFinance.Infrastructure.OuterApiResponses | ||
{ | ||
public class GetApplicationsResponse | ||
{ | ||
public IEnumerable<ApprenticeshipDetail> Apprenticeships { get; set; } | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
src/SFA.DAS.EmployerFinance/Infrastructure/OuterApiResponses/GetCohortsResponse.cs
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
src/SFA.DAS.EmployerFinance/Models/Apprenticeships/ApprenticeshipDetail.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SFA.DAS.CommitmentsV2.Types; | ||
|
||
namespace SFA.DAS.EmployerFinance.Models.Apprenticeships | ||
{ | ||
public class ApprenticeshipDetail | ||
{ | ||
public long Id { get; set; } | ||
|
||
public string FirstName { get; set; } | ||
|
||
public string LastName { get; set; } | ||
|
||
public string Uln { get; set; } | ||
|
||
public string EmployerName { get; set; } | ||
|
||
public string ProviderName { get; set; } | ||
|
||
public string CourseName { get; set; } | ||
|
||
public DateTime StartDate { get; set; } | ||
|
||
public DateTime EndDate { get; set; } | ||
|
||
public PaymentStatus PaymentStatus { get; set; } | ||
|
||
public ApprenticeshipStatus ApprenticeshipStatus { get; set; } | ||
|
||
public IEnumerable<Alerts> Alerts { get; set; } | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
src/SFA.DAS.EmployerFinance/Models/Cohort/CurrentCohorts.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/SFA.DAS.EmployerFinance/Services/IApprenticeshipService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using SFA.DAS.EmployerFinance.Models.Apprenticeships; | ||
|
||
namespace SFA.DAS.EmployerFinance.Services | ||
{ | ||
public interface IApprenticeshipService | ||
{ | ||
Task<IEnumerable<ApprenticeshipDetail>> GetApprenticeshipsFor(long accountId); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.