From b9b81f7acac65f52de8bcdcdba3b5ab8c4ee1461 Mon Sep 17 00:00:00 2001 From: Peggy Date: Tue, 16 Jan 2024 08:57:20 -0800 Subject: [PATCH] establish training env (#683) # Description This PR includes the following proposed change(s): - Reorg Manager - add training pipeline --- src/Spd.Engine.Search/Contract.cs | 2 +- .../Spd.Engine.Search.csproj | 2 +- src/Spd.Manager.Common/ServiceExtensions.cs | 2 - .../PersonalLicenceAppContract.cs | 12 +- src/Spd.Manager.Licence/SharedContract.cs | 10 ++ .../Spd.Manager.Licence.csproj | 3 +- .../UserProfileContract.cs | 94 +++++++++++++ src/Spd.Manager.Licence/UserProfileManager.cs | 126 ++++++++++++++++++ .../UserProfileMappings.cs | 61 +++++++++ .../ServiceExtensions.cs | 20 --- .../Spd.Manager.Membership.csproj | 18 --- .../Contract.cs | 4 +- .../Mappings.cs | 2 +- .../PaymentManager.cs | 4 +- .../ServiceExtensions.cs | 5 +- .../Spd.Manager.Payment.csproj | 22 +++ .../ApplicationContract.cs} | 6 +- .../ApplicationManager.Delegate.cs | 2 +- .../ApplicationManager.Invite.cs | 2 +- .../ApplicationManager.cs | 4 +- .../ApplicationMappings.cs} | 8 +- .../FluentValidationEntry.cs | 2 +- .../OrgContract.cs} | 4 +- .../OrgManager.cs | 2 +- .../OrgMappings.cs} | 8 +- .../OrgRegistrationContract.cs} | 4 +- .../OrgRegistrationManager.cs | 4 +- .../OrgRegistrationMappings.cs} | 6 +- .../OrgReportContract.cs} | 4 +- .../OrgReportManager.cs | 4 +- .../OrgReportMappings.cs} | 6 +- .../OrgUserContract.cs} | 2 +- .../OrgUserManager.cs | 2 +- .../OrgUserMappings.cs} | 6 +- .../ServiceExtensions.cs | 16 +++ .../Spd.Manager.Screening.csproj} | 4 +- .../UserProfileContract.cs} | 6 +- .../UserProfileManager.cs | 5 +- .../UserProfileMappings.cs} | 8 +- .../Contract.cs | 2 +- .../Spd.Manager.Shared.csproj | 9 ++ .../Controllers/PaymentController.cs | 2 +- .../Spd.Presentation.Dynamics.csproj | 2 +- .../Controllers/Mapping.cs | 2 +- .../Controllers/PaymentController.cs | 4 +- .../Controllers/UserProfileController.cs | 4 +- .../Controllers/WorkerLicensingController.cs | 1 - src/Spd.Presentation.Licensing/Program.cs | 2 - .../Spd.Presentation.Licensing.csproj | 3 +- .../UsersMiddleware.cs | 2 +- .../Controllers/ApplicantController.cs | 4 +- .../Controllers/ApplicationController.cs | 4 +- .../Controllers/DelegateController.cs | 2 +- .../Controllers/Mapping.cs | 8 +- .../Controllers/OrgController.cs | 7 +- .../Controllers/OrgRegistrationController.cs | 4 +- .../Controllers/OrgReportController.cs | 4 +- .../Controllers/OrgUserController.cs | 2 +- .../Controllers/PaymentController.cs | 4 +- .../Controllers/UserProfileController.cs | 2 +- .../Spd.Presentation.Screening.csproj | 7 +- src/Spd.Presentation.Screening/Startup.cs | 10 +- .../UsersMiddleware.cs | 2 +- .../Managers/PaymentManagerTests.cs | 2 +- .../Controllers/ApplicationScenarios.cs | 4 +- .../Controllers/OrgRegistrationScenarios.cs | 4 +- .../Integration/Controllers/OrgScenarios.cs | 4 +- .../Controllers/OrgUserScenarios.cs | 2 +- .../Managers/ApplicationManagerTests.cs | 2 +- .../Managers/PaymentManagerTests.cs | 7 +- .../Managers/UserProfileManagerTests.cs | 4 +- .../Integration/Search/SearchEngineTests.cs | 2 +- .../IPrincipalExtensions.cs | 2 + src/Spd.sln | 39 +++--- .../templates/training-release-pipeline.yaml | 57 ++++++++ 75 files changed, 534 insertions(+), 190 deletions(-) create mode 100644 src/Spd.Manager.Licence/UserProfileContract.cs create mode 100644 src/Spd.Manager.Licence/UserProfileManager.cs create mode 100644 src/Spd.Manager.Licence/UserProfileMappings.cs delete mode 100644 src/Spd.Manager.Membership/ServiceExtensions.cs delete mode 100644 src/Spd.Manager.Membership/Spd.Manager.Membership.csproj rename src/{Spd.Manager.Common/Payment => Spd.Manager.Payment}/Contract.cs (98%) rename src/{Spd.Manager.Common/Payment => Spd.Manager.Payment}/Mappings.cs (98%) rename src/{Spd.Manager.Common/Payment => Spd.Manager.Payment}/PaymentManager.cs (99%) rename src/{Spd.Manager.Cases => Spd.Manager.Payment}/ServiceExtensions.cs (61%) create mode 100644 src/Spd.Manager.Payment/Spd.Manager.Payment.csproj rename src/{Spd.Manager.Cases/Screening/Contract.cs => Spd.Manager.Screening/ApplicationContract.cs} (99%) rename src/{Spd.Manager.Cases/Screening => Spd.Manager.Screening}/ApplicationManager.Delegate.cs (99%) rename src/{Spd.Manager.Cases/Screening => Spd.Manager.Screening}/ApplicationManager.Invite.cs (99%) rename src/{Spd.Manager.Cases/Screening => Spd.Manager.Screening}/ApplicationManager.cs (99%) rename src/{Spd.Manager.Cases/Screening/Mappings.cs => Spd.Manager.Screening/ApplicationMappings.cs} (97%) rename src/{Spd.Manager.Membership => Spd.Manager.Screening}/FluentValidationEntry.cs (60%) rename src/{Spd.Manager.Membership/Org/Contract.cs => Spd.Manager.Screening/OrgContract.cs} (97%) rename src/{Spd.Manager.Membership/Org => Spd.Manager.Screening}/OrgManager.cs (98%) rename src/{Spd.Manager.Membership/Org/Mappings.cs => Spd.Manager.Screening/OrgMappings.cs} (86%) rename src/{Spd.Manager.Membership/OrgRegistration/Contract.cs => Spd.Manager.Screening/OrgRegistrationContract.cs} (98%) rename src/{Spd.Manager.Membership/OrgRegistration => Spd.Manager.Screening}/OrgRegistrationManager.cs (98%) rename src/{Spd.Manager.Membership/OrgRegistration/Mappings.cs => Spd.Manager.Screening/OrgRegistrationMappings.cs} (76%) rename src/{Spd.Manager.Membership/OrgReport/Contract.cs => Spd.Manager.Screening/OrgReportContract.cs} (89%) rename src/{Spd.Manager.Membership/OrgReport => Spd.Manager.Screening}/OrgReportManager.cs (96%) rename src/{Spd.Manager.Membership/OrgReport/Mappings.cs => Spd.Manager.Screening/OrgReportMappings.cs} (57%) rename src/{Spd.Manager.Membership/OrgUser/Contract.cs => Spd.Manager.Screening/OrgUserContract.cs} (99%) rename src/{Spd.Manager.Membership/OrgUser => Spd.Manager.Screening}/OrgUserManager.cs (99%) rename src/{Spd.Manager.Membership/OrgUser/Mappings.cs => Spd.Manager.Screening/OrgUserMappings.cs} (83%) create mode 100644 src/Spd.Manager.Screening/ServiceExtensions.cs rename src/{Spd.Manager.Cases/Spd.Manager.Cases.csproj => Spd.Manager.Screening/Spd.Manager.Screening.csproj} (76%) rename src/{Spd.Manager.Membership/UserProfile/Contract.cs => Spd.Manager.Screening/UserProfileContract.cs} (97%) rename src/{Spd.Manager.Membership/UserProfile => Spd.Manager.Screening}/UserProfileManager.cs (99%) rename src/{Spd.Manager.Membership/UserProfile/Mappings.cs => Spd.Manager.Screening/UserProfileMappings.cs} (95%) rename src/{Spd.Manager.Common/ManagerContracts => Spd.Manager.Shared}/Contract.cs (98%) create mode 100644 src/Spd.Manager.Shared/Spd.Manager.Shared.csproj create mode 100644 tools/helm/charts/tools/templates/training-release-pipeline.yaml diff --git a/src/Spd.Engine.Search/Contract.cs b/src/Spd.Engine.Search/Contract.cs index 228393cd6..abac1fddb 100644 --- a/src/Spd.Engine.Search/Contract.cs +++ b/src/Spd.Engine.Search/Contract.cs @@ -1,4 +1,4 @@ -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; namespace Spd.Engine.Search { diff --git a/src/Spd.Engine.Search/Spd.Engine.Search.csproj b/src/Spd.Engine.Search/Spd.Engine.Search.csproj index 9afb09f25..c4329ba83 100644 --- a/src/Spd.Engine.Search/Spd.Engine.Search.csproj +++ b/src/Spd.Engine.Search/Spd.Engine.Search.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Spd.Manager.Common/ServiceExtensions.cs b/src/Spd.Manager.Common/ServiceExtensions.cs index a2f48291c..10c6630c5 100644 --- a/src/Spd.Manager.Common/ServiceExtensions.cs +++ b/src/Spd.Manager.Common/ServiceExtensions.cs @@ -1,6 +1,5 @@ using Microsoft.Extensions.DependencyInjection; using Spd.Manager.Common.Admin; -using Spd.Manager.Common.Payment; using Spd.Utilities.Hosting; namespace Spd.Manager.Common @@ -10,7 +9,6 @@ public class ServiceExtension : IConfigureComponentServices public void ConfigureServices(ConfigurationServices configurationServices) { configurationServices.Services.AddTransient(); - configurationServices.Services.AddTransient(); } } } diff --git a/src/Spd.Manager.Licence/PersonalLicenceAppContract.cs b/src/Spd.Manager.Licence/PersonalLicenceAppContract.cs index e40032fc6..30cfccb6a 100644 --- a/src/Spd.Manager.Licence/PersonalLicenceAppContract.cs +++ b/src/Spd.Manager.Licence/PersonalLicenceAppContract.cs @@ -1,6 +1,6 @@ using MediatR; using Microsoft.AspNetCore.Http; -using GenderCode = Spd.Manager.Common.ManagerContract.GenderCode; +using GenderCode = Spd.Manager.Shared.GenderCode; namespace Spd.Manager.Licence; public interface IPersonalLicenceAppManager @@ -118,15 +118,7 @@ public record AdditionalGovIdDocument : Document; public record IdPhotoDocument : Document; public record ResidentialAddress : Address; public record MailingAddress : Address; -public abstract record Address -{ - public string? AddressLine1 { get; set; } - public string? AddressLine2 { get; set; } - public string? City { get; set; } - public string? Country { get; set; } - public string? PostalCode { get; set; } - public string? Province { get; set; } -} + public record Alias { public string? GivenName { get; set; } diff --git a/src/Spd.Manager.Licence/SharedContract.cs b/src/Spd.Manager.Licence/SharedContract.cs index db42c0d6e..c599d42ea 100644 --- a/src/Spd.Manager.Licence/SharedContract.cs +++ b/src/Spd.Manager.Licence/SharedContract.cs @@ -172,3 +172,13 @@ public enum ApplicationPortalStatusCode CancelledByApplicant, CancelledByOrganization } + +public record Address +{ + public string? AddressLine1 { get; set; } + public string? AddressLine2 { get; set; } + public string? City { get; set; } + public string? Country { get; set; } + public string? PostalCode { get; set; } + public string? Province { get; set; } +} \ No newline at end of file diff --git a/src/Spd.Manager.Licence/Spd.Manager.Licence.csproj b/src/Spd.Manager.Licence/Spd.Manager.Licence.csproj index 1a8122d67..e53e8c4f8 100644 --- a/src/Spd.Manager.Licence/Spd.Manager.Licence.csproj +++ b/src/Spd.Manager.Licence/Spd.Manager.Licence.csproj @@ -7,10 +7,11 @@ - + + diff --git a/src/Spd.Manager.Licence/UserProfileContract.cs b/src/Spd.Manager.Licence/UserProfileContract.cs new file mode 100644 index 000000000..94a9d07e5 --- /dev/null +++ b/src/Spd.Manager.Licence/UserProfileContract.cs @@ -0,0 +1,94 @@ +using MediatR; +using Spd.Manager.Shared; +using Spd.Utilities.LogonUser; + +namespace Spd.Manager.Licence +{ + public interface IUserProfileManager + { + public Task Handle(GetCurrentUserProfileQuery request, CancellationToken ct); + public Task Handle(GetApplicantProfileQuery request, CancellationToken ct); + public Task Handle(ManageApplicantProfileCommand request, CancellationToken ct); //used for worker licensing portal + } + + #region UserProfile + public record GetCurrentUserProfileQuery(PortalUserIdentity PortalUserIdentity) : IRequest; + + public class OrgUserProfileResponse + { + public Guid? UserGuid { get; set; }//from token + public string? UserDisplayName { get; set; } //from token + public IdentityProviderTypeCode? IdentityProviderType { get; set; } + public IEnumerable UserInfos { get; set; } = Array.Empty(); + } + + public record UserInfo + { + public Guid UserId { get; set; }//from spd, portal user id + public string FirstName { get; set; } = null!; + public string LastName { get; set; } = null!; + public string? Email { get; set; } + //public ContactAuthorizationTypeCode? ContactAuthorizationTypeCode { get; set; } = null;//from spd + public OrgSettings? OrgSettings { get; set; } + public Guid? OrgId { get; set; } + public Guid? OrgRegistrationId { get; set; } = null; + //public OrgRegistrationStatusCode? OrgRegistrationStatusCode { get; set; } = null; + public string? OrgRegistrationNumber { get; set; } = null; + public string? OrgName { get; set; } + public Guid? UserGuid { get; set; } + public UserInfoMsgTypeCode? UserInfoMsgType { get; set; } + } + + public enum UserInfoMsgTypeCode + { + REGISTRATION_DENIED, + ACCOUNT_NOT_MATCH_RECORD, + NO_ACTIVE_ACCOUNT_FOR_ORG + } + + public record OrgSettings + { + public PayerPreferenceTypeCode PayerPreference { get; set; } + public BooleanTypeCode ContractorsNeedVulnerableSectorScreening { get; set; } + public BooleanTypeCode LicenseesNeedVulnerableSectorScreening { get; set; } + public bool GenericUploadEnabled { get; set; } + } + + public class PortalUserIdentity + { + public string? BCeIDUserName { get; set; } + public string? DisplayName { get; set; } + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? PreferredUserName { get; set; } + public Guid? UserGuid { get; set; } + public Guid BizGuid { get; set; } + public string? BizName { get; set; } + public string? Issuer { get; set; } + public bool? EmailVerified { get; set; } + public string? Email { get; set; } + } + #endregion + + #region ApplicantProfile + public record GetApplicantProfileQuery(string BcscSub) : IRequest; + public class ApplicantProfileResponse + { + public Guid ApplicantId { get; set; } //which is contact id in db + public string? FirstName { get; set; } // which is contact firstname + public string? LastName { get; set; } // which is contact lastname + public string? Email { get; set; } + public GenderCode? Gender { get; set; } + public string Sub { get; set; } = null!; + public DateOnly BirthDate { get; set; } + public string? MiddleName1 { get; set; } + public string? MiddleName2 { get; set; } + public IdentityProviderTypeCode IdentityProviderTypeCode { get; set; } = IdentityProviderTypeCode.BcServicesCard; + public Address? ResidentialAddress { get; set; } + } + public record ManageApplicantProfileCommand(BcscIdentityInfo BcscIdentityInfo) : IRequest; + + #endregion + + +} diff --git a/src/Spd.Manager.Licence/UserProfileManager.cs b/src/Spd.Manager.Licence/UserProfileManager.cs new file mode 100644 index 000000000..a78feaf87 --- /dev/null +++ b/src/Spd.Manager.Licence/UserProfileManager.cs @@ -0,0 +1,126 @@ +using AutoMapper; +using MediatR; +using Microsoft.Extensions.Logging; +using Spd.Manager.Shared; +using Spd.Resource.Applicants.Application; +using Spd.Resource.Applicants.Contact; +using Spd.Resource.Applicants.PortalUser; +using Spd.Resource.Organizations.Identity; +using Spd.Resource.Organizations.Org; +using Spd.Resource.Organizations.Registration; +using Spd.Resource.Organizations.User; + +namespace Spd.Manager.Licence +{ + internal class UserProfileManager + : IRequestHandler, + IRequestHandler, + IRequestHandler, + IUserProfileManager + { + private readonly IOrgUserRepository _orgUserRepository; + private readonly IIdentityRepository _idRepository; + private readonly IOrgRepository _orgRepository; + private readonly IPortalUserRepository _portalUserRepository; + private readonly IContactRepository _contactRepository; + private readonly IMapper _mapper; + private readonly ILogger _logger; + + public UserProfileManager( + IOrgUserRepository orgUserRepository, + IIdentityRepository idRepository, + IOrgRepository orgRepository, + IPortalUserRepository portalUserRepository, + IContactRepository contactRepository, + IMapper mapper, + ILogger logger) + { + _orgUserRepository = orgUserRepository; + _idRepository = idRepository; + _orgRepository = orgRepository; + _mapper = mapper; + _logger = logger; + _portalUserRepository = portalUserRepository; + _contactRepository = contactRepository; + } + + public async Task Handle(GetCurrentUserProfileQuery request, CancellationToken ct) + { + Guid orgGuid = request.PortalUserIdentity.BizGuid; + Guid? userGuid = request.PortalUserIdentity.UserGuid; + List userInfos = new(); + + //get all orgs + var orgResult = (OrgsQryResult)await _orgRepository.QueryOrgAsync( + new OrgsQry(orgGuid, ServiceTypes: IApplicationRepository.ScreeningServiceTypes), + ct); + foreach (OrgResult org in orgResult.OrgResults) + { + UserInfo ui = new UserInfo(); + var orgUsers = (OrgUsersResult)await _orgUserRepository.QueryOrgUserAsync(new OrgUsersSearch(org.Id), ct); + var u = orgUsers.UserResults.FirstOrDefault(u => u.UserGuid == userGuid && u.IsActive); + if (u != null) + ui = _mapper.Map(u); + else + ui = new UserInfo() { UserInfoMsgType = UserInfoMsgTypeCode.NO_ACTIVE_ACCOUNT_FOR_ORG }; + ui.OrgName = org.OrganizationName; + ui.OrgId = org.Id; + ui.OrgSettings = _mapper.Map(org); + userInfos.Add(ui); + } + + return new OrgUserProfileResponse() + { + IdentityProviderType = IdentityProviderTypeCode.BusinessBceId, + UserDisplayName = request.PortalUserIdentity.DisplayName, + UserGuid = request.PortalUserIdentity.UserGuid, + UserInfos = userInfos + }; + } + + public async Task Handle(GetApplicantProfileQuery request, CancellationToken ct) + { + var result = await _idRepository.Query(new IdentityQry(request.BcscSub, null, IdentityProviderTypeEnum.BcServicesCard), ct); + return _mapper.Map(result.Items.FirstOrDefault()); + } + + public async Task Handle(ManageApplicantProfileCommand cmd, CancellationToken ct) + { + ContactResp contactResp = null; + var result = await _idRepository.Query(new IdentityQry(cmd.BcscIdentityInfo.Sub, null, IdentityProviderTypeEnum.BcServicesCard), ct); + + if (result == null || !result.Items.Any()) //first time to use system + { + //add identity + var id = await _idRepository.Manage(new CreateIdentityCmd(cmd.BcscIdentityInfo.Sub, null, IdentityProviderTypeEnum.BcServicesCard), ct); + CreateContactCmd createContactCmd = _mapper.Map(cmd); + createContactCmd.IdentityId = id.Id; + contactResp = await _contactRepository.ManageAsync(createContactCmd, ct); + //add address + } + else + { + Identity id = result.Items.FirstOrDefault(); + if (id.ContactId != null) + { + //depends on requirement, probably update later when user select "yes" in user profile for licensing portal. + UpdateContactCmd updateContactCmd = _mapper.Map(cmd); + updateContactCmd.Id = (Guid)id.ContactId; + updateContactCmd.IdentityId = id.Id; + contactResp = await _contactRepository.ManageAsync(updateContactCmd, ct); + } + else + { + //there is identity, but no contact + CreateContactCmd createContactCmd = _mapper.Map(cmd); + createContactCmd.IdentityId = id.Id; + contactResp = await _contactRepository.ManageAsync(createContactCmd, ct); + } + //update address + } + + return _mapper.Map(contactResp); + } + } +} + diff --git a/src/Spd.Manager.Licence/UserProfileMappings.cs b/src/Spd.Manager.Licence/UserProfileMappings.cs new file mode 100644 index 000000000..60baf8fbb --- /dev/null +++ b/src/Spd.Manager.Licence/UserProfileMappings.cs @@ -0,0 +1,61 @@ +using AutoMapper; +using Spd.Resource.Applicants.Contact; +using Spd.Resource.Organizations.Identity; +using Spd.Resource.Organizations.Org; +using Spd.Resource.Organizations.User; +using Spd.Utilities.Shared.ResourceContracts; + +namespace Spd.Manager.Licence +{ + internal class UserProfileMappings : Profile + { + public UserProfileMappings() + { + CreateMap(); + CreateMap() + .ForMember(d => d.OrgName, opt => opt.Ignore()) + .ForMember(d => d.OrgSettings, opt => opt.Ignore()) + .ForMember(d => d.UserId, opt => opt.MapFrom(s => s.Id)) + .ForMember(d => d.OrgRegistrationId, opt => opt.Ignore()) + .ForMember(d => d.OrgId, opt => opt.MapFrom(s => s.OrganizationId)); + + CreateMap() + .ForMember(d => d.ApplicantId, opt => opt.MapFrom(s => s.ContactId)) + .ForMember(d => d.Email, opt => opt.MapFrom(s => s.EmailAddress)) + ; + + CreateMap() + .ForMember(d => d.Sub, opt => opt.MapFrom(s => s.BcscIdentityInfo.Sub)) + .IncludeBase(); + + CreateMap() + .IncludeBase(); + + CreateMap() + .ForMember(d => d.FirstName, opt => opt.MapFrom(s => s.BcscIdentityInfo.FirstName)) + .ForMember(d => d.LastName, opt => opt.MapFrom(s => s.BcscIdentityInfo.LastName)) + .ForMember(d => d.EmailAddress, opt => opt.MapFrom(s => s.BcscIdentityInfo.Email)) + .ForMember(d => d.MiddleName1, opt => opt.MapFrom(s => s.BcscIdentityInfo.MiddleName1)) + .ForMember(d => d.MiddleName2, opt => opt.MapFrom(s => s.BcscIdentityInfo.MiddleName2)) + .ForMember(d => d.BirthDate, opt => opt.MapFrom(s => s.BcscIdentityInfo.BirthDate)) + .ForMember(d => d.Gender, opt => opt.MapFrom(s => GetGenderEnum(s.BcscIdentityInfo.Gender))); + + CreateMap() + .ForMember(d => d.ApplicantId, opt => opt.MapFrom(s => s.Id)); + } + + public static GenderEnum? GetGenderEnum(string? bscsGender) + { + if (bscsGender == null) return null; + string? str = bscsGender?.ToLower(); + GenderEnum? gender = str switch + { + "female" => GenderEnum.F, + "male" => GenderEnum.M, + "diverse" => GenderEnum.U, + _ => null, + }; + return gender; + } + } +} diff --git a/src/Spd.Manager.Membership/ServiceExtensions.cs b/src/Spd.Manager.Membership/ServiceExtensions.cs deleted file mode 100644 index e980f68c9..000000000 --- a/src/Spd.Manager.Membership/ServiceExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Spd.Manager.Membership.Org; -using Spd.Manager.Membership.OrgRegistration; -using Spd.Manager.Membership.OrgUser; -using Spd.Manager.Membership.UserProfile; -using Spd.Utilities.Hosting; - -namespace Spd.Manager.Membership -{ - public class ServiceExtension : IConfigureComponentServices - { - public void ConfigureServices(ConfigurationServices configurationServices) - { - configurationServices.Services.AddTransient(); - configurationServices.Services.AddTransient(); - configurationServices.Services.AddTransient(); - configurationServices.Services.AddTransient(); - } - } -} diff --git a/src/Spd.Manager.Membership/Spd.Manager.Membership.csproj b/src/Spd.Manager.Membership/Spd.Manager.Membership.csproj deleted file mode 100644 index 1b65de893..000000000 --- a/src/Spd.Manager.Membership/Spd.Manager.Membership.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/Spd.Manager.Common/Payment/Contract.cs b/src/Spd.Manager.Payment/Contract.cs similarity index 98% rename from src/Spd.Manager.Common/Payment/Contract.cs rename to src/Spd.Manager.Payment/Contract.cs index 596d1f6df..75671da2e 100644 --- a/src/Spd.Manager.Common/Payment/Contract.cs +++ b/src/Spd.Manager.Payment/Contract.cs @@ -1,8 +1,8 @@ using MediatR; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using System.ComponentModel.DataAnnotations; -namespace Spd.Manager.Common.Payment +namespace Spd.Manager.Payment { public interface IPaymentManager { diff --git a/src/Spd.Manager.Common/Payment/Mappings.cs b/src/Spd.Manager.Payment/Mappings.cs similarity index 98% rename from src/Spd.Manager.Common/Payment/Mappings.cs rename to src/Spd.Manager.Payment/Mappings.cs index 3b23dbead..5c2be2f8a 100644 --- a/src/Spd.Manager.Common/Payment/Mappings.cs +++ b/src/Spd.Manager.Payment/Mappings.cs @@ -3,7 +3,7 @@ using Spd.Resource.Applicants.Payment; using Spd.Utilities.Payment; -namespace Spd.Manager.Common.Payment +namespace Spd.Manager.Payment { internal class Mappings : Profile { diff --git a/src/Spd.Manager.Common/Payment/PaymentManager.cs b/src/Spd.Manager.Payment/PaymentManager.cs similarity index 99% rename from src/Spd.Manager.Common/Payment/PaymentManager.cs rename to src/Spd.Manager.Payment/PaymentManager.cs index 3f09e0f6b..51eb9d031 100644 --- a/src/Spd.Manager.Common/Payment/PaymentManager.cs +++ b/src/Spd.Manager.Payment/PaymentManager.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json; using Polly; using Polly.Retry; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Application; using Spd.Resource.Applicants.Document; using Spd.Resource.Applicants.DocumentTemplate; @@ -23,7 +23,7 @@ using Spd.Utilities.Shared.ResourceContracts; using System.Net; -namespace Spd.Manager.Common.Payment +namespace Spd.Manager.Payment { internal class PaymentManager : IRequestHandler, diff --git a/src/Spd.Manager.Cases/ServiceExtensions.cs b/src/Spd.Manager.Payment/ServiceExtensions.cs similarity index 61% rename from src/Spd.Manager.Cases/ServiceExtensions.cs rename to src/Spd.Manager.Payment/ServiceExtensions.cs index 9c219209a..a3a294b83 100644 --- a/src/Spd.Manager.Cases/ServiceExtensions.cs +++ b/src/Spd.Manager.Payment/ServiceExtensions.cs @@ -1,14 +1,13 @@ using Microsoft.Extensions.DependencyInjection; -using Spd.Manager.Cases.Screening; using Spd.Utilities.Hosting; -namespace Spd.Manager.Cases +namespace Spd.Manager.Payment { public class ServiceExtension : IConfigureComponentServices { public void ConfigureServices(ConfigurationServices configurationServices) { - configurationServices.Services.AddTransient(); + configurationServices.Services.AddTransient(); } } } diff --git a/src/Spd.Manager.Payment/Spd.Manager.Payment.csproj b/src/Spd.Manager.Payment/Spd.Manager.Payment.csproj new file mode 100644 index 000000000..0d9611907 --- /dev/null +++ b/src/Spd.Manager.Payment/Spd.Manager.Payment.csproj @@ -0,0 +1,22 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + diff --git a/src/Spd.Manager.Cases/Screening/Contract.cs b/src/Spd.Manager.Screening/ApplicationContract.cs similarity index 99% rename from src/Spd.Manager.Cases/Screening/Contract.cs rename to src/Spd.Manager.Screening/ApplicationContract.cs index 2992d1873..763463b10 100644 --- a/src/Spd.Manager.Cases/Screening/Contract.cs +++ b/src/Spd.Manager.Screening/ApplicationContract.cs @@ -1,13 +1,13 @@ using FluentValidation; using MediatR; using Microsoft.AspNetCore.Http; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Delegates; using Spd.Utilities.Shared; using System.ComponentModel; -using GenderCode = Spd.Manager.Common.ManagerContract.GenderCode; +using GenderCode = Spd.Manager.Shared.GenderCode; -namespace Spd.Manager.Cases.Screening +namespace Spd.Manager.Screening { public interface IApplicationManager { diff --git a/src/Spd.Manager.Cases/Screening/ApplicationManager.Delegate.cs b/src/Spd.Manager.Screening/ApplicationManager.Delegate.cs similarity index 99% rename from src/Spd.Manager.Cases/Screening/ApplicationManager.Delegate.cs rename to src/Spd.Manager.Screening/ApplicationManager.Delegate.cs index 54f75b1ab..3fdff2cf6 100644 --- a/src/Spd.Manager.Cases/Screening/ApplicationManager.Delegate.cs +++ b/src/Spd.Manager.Screening/ApplicationManager.Delegate.cs @@ -4,7 +4,7 @@ using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; -namespace Spd.Manager.Cases.Screening +namespace Spd.Manager.Screening { internal partial class ApplicationManager { diff --git a/src/Spd.Manager.Cases/Screening/ApplicationManager.Invite.cs b/src/Spd.Manager.Screening/ApplicationManager.Invite.cs similarity index 99% rename from src/Spd.Manager.Cases/Screening/ApplicationManager.Invite.cs rename to src/Spd.Manager.Screening/ApplicationManager.Invite.cs index f84e8eb29..f3986a0d8 100644 --- a/src/Spd.Manager.Cases/Screening/ApplicationManager.Invite.cs +++ b/src/Spd.Manager.Screening/ApplicationManager.Invite.cs @@ -7,7 +7,7 @@ using Spd.Utilities.Shared.ResourceContracts; using System.Net; -namespace Spd.Manager.Cases.Screening +namespace Spd.Manager.Screening { internal partial class ApplicationManager { diff --git a/src/Spd.Manager.Cases/Screening/ApplicationManager.cs b/src/Spd.Manager.Screening/ApplicationManager.cs similarity index 99% rename from src/Spd.Manager.Cases/Screening/ApplicationManager.cs rename to src/Spd.Manager.Screening/ApplicationManager.cs index 718c09efe..5367edc89 100644 --- a/src/Spd.Manager.Cases/Screening/ApplicationManager.cs +++ b/src/Spd.Manager.Screening/ApplicationManager.cs @@ -5,7 +5,7 @@ using Polly.Retry; using Spd.Engine.Search; using Spd.Engine.Validation; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Application; using Spd.Resource.Applicants.ApplicationInvite; using Spd.Resource.Applicants.Delegates; @@ -22,7 +22,7 @@ using Spd.Utilities.TempFileStorage; using System.Net; -namespace Spd.Manager.Cases.Screening +namespace Spd.Manager.Screening { internal partial class ApplicationManager : diff --git a/src/Spd.Manager.Cases/Screening/Mappings.cs b/src/Spd.Manager.Screening/ApplicationMappings.cs similarity index 97% rename from src/Spd.Manager.Cases/Screening/Mappings.cs rename to src/Spd.Manager.Screening/ApplicationMappings.cs index a10d50dc1..a3690b5fb 100644 --- a/src/Spd.Manager.Cases/Screening/Mappings.cs +++ b/src/Spd.Manager.Screening/ApplicationMappings.cs @@ -1,7 +1,7 @@ using AutoMapper; using Spd.Engine.Search; using Spd.Engine.Validation; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Application; using Spd.Resource.Applicants.ApplicationInvite; using Spd.Resource.Applicants.Delegates; @@ -11,11 +11,11 @@ using Spd.Utilities.Shared; using Spd.Utilities.Shared.ResourceContracts; -namespace Spd.Manager.Cases.Screening +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class ApplicationMappings : Profile { - public Mappings() + public ApplicationMappings() { _ = CreateMap() .ForMember(d => d.ApplicationInvites, opt => opt.MapFrom(s => s.ApplicationInviteCreateRequests)); diff --git a/src/Spd.Manager.Membership/FluentValidationEntry.cs b/src/Spd.Manager.Screening/FluentValidationEntry.cs similarity index 60% rename from src/Spd.Manager.Membership/FluentValidationEntry.cs rename to src/Spd.Manager.Screening/FluentValidationEntry.cs index c6292f455..1b0743839 100644 --- a/src/Spd.Manager.Membership/FluentValidationEntry.cs +++ b/src/Spd.Manager.Screening/FluentValidationEntry.cs @@ -1,4 +1,4 @@ -namespace Spd.Manager.Membership +namespace Spd.Manager.Screening { public class FluentValidationEntry { diff --git a/src/Spd.Manager.Membership/Org/Contract.cs b/src/Spd.Manager.Screening/OrgContract.cs similarity index 97% rename from src/Spd.Manager.Membership/Org/Contract.cs rename to src/Spd.Manager.Screening/OrgContract.cs index 9dbae9a1d..2ca716466 100644 --- a/src/Spd.Manager.Membership/Org/Contract.cs +++ b/src/Spd.Manager.Screening/OrgContract.cs @@ -1,8 +1,8 @@ using FluentValidation; using MediatR; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; -namespace Spd.Manager.Membership.Org +namespace Spd.Manager.Screening { public interface IOrgManager { diff --git a/src/Spd.Manager.Membership/Org/OrgManager.cs b/src/Spd.Manager.Screening/OrgManager.cs similarity index 98% rename from src/Spd.Manager.Membership/Org/OrgManager.cs rename to src/Spd.Manager.Screening/OrgManager.cs index cbc495fdd..7b689b982 100644 --- a/src/Spd.Manager.Membership/Org/OrgManager.cs +++ b/src/Spd.Manager.Screening/OrgManager.cs @@ -4,7 +4,7 @@ using Spd.Resource.Organizations.Org; using Spd.Utilities.Cache; -namespace Spd.Manager.Membership.Org +namespace Spd.Manager.Screening { internal class OrgManager : IRequestHandler, diff --git a/src/Spd.Manager.Membership/Org/Mappings.cs b/src/Spd.Manager.Screening/OrgMappings.cs similarity index 86% rename from src/Spd.Manager.Membership/Org/Mappings.cs rename to src/Spd.Manager.Screening/OrgMappings.cs index 6214a3a11..b47950f65 100644 --- a/src/Spd.Manager.Membership/Org/Mappings.cs +++ b/src/Spd.Manager.Screening/OrgMappings.cs @@ -1,12 +1,12 @@ using AutoMapper; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Organizations.Org; -namespace Spd.Manager.Membership.Org +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class OrgMappings : Profile { - public Mappings() + public OrgMappings() { CreateMap(); CreateMap(); diff --git a/src/Spd.Manager.Membership/OrgRegistration/Contract.cs b/src/Spd.Manager.Screening/OrgRegistrationContract.cs similarity index 98% rename from src/Spd.Manager.Membership/OrgRegistration/Contract.cs rename to src/Spd.Manager.Screening/OrgRegistrationContract.cs index caa0dc2ae..a3c369752 100644 --- a/src/Spd.Manager.Membership/OrgRegistration/Contract.cs +++ b/src/Spd.Manager.Screening/OrgRegistrationContract.cs @@ -1,9 +1,9 @@ using FluentValidation; using MediatR; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using System.ComponentModel; -namespace Spd.Manager.Membership.OrgRegistration +namespace Spd.Manager.Screening { public interface IOrgRegistrationManager { diff --git a/src/Spd.Manager.Membership/OrgRegistration/OrgRegistrationManager.cs b/src/Spd.Manager.Screening/OrgRegistrationManager.cs similarity index 98% rename from src/Spd.Manager.Membership/OrgRegistration/OrgRegistrationManager.cs rename to src/Spd.Manager.Screening/OrgRegistrationManager.cs index ccf74b5ed..e64912489 100644 --- a/src/Spd.Manager.Membership/OrgRegistration/OrgRegistrationManager.cs +++ b/src/Spd.Manager.Screening/OrgRegistrationManager.cs @@ -8,7 +8,7 @@ using System.Net; using System.Security.Principal; -namespace Spd.Manager.Membership.OrgRegistration +namespace Spd.Manager.Screening { internal class OrgRegistrationManager : IRequestHandler, @@ -87,7 +87,7 @@ private async Task CheckDuplicate(OrgRegistration if (_currentUser.IsAuthenticated()) { var org = (OrgsQryResult)await _orgRepository.QueryOrgAsync( - new OrgsQry(userIdentityInfo.BizGuid, ServiceTypes: IApplicationRepository.ScreeningServiceTypes), + new OrgsQry(userIdentityInfo.BizGuid, ServiceTypes: IApplicationRepository.ScreeningServiceTypes), cancellationToken); if (org != null && org.OrgResults.Any()) { diff --git a/src/Spd.Manager.Membership/OrgRegistration/Mappings.cs b/src/Spd.Manager.Screening/OrgRegistrationMappings.cs similarity index 76% rename from src/Spd.Manager.Membership/OrgRegistration/Mappings.cs rename to src/Spd.Manager.Screening/OrgRegistrationMappings.cs index 0ed3850b8..9fac32913 100644 --- a/src/Spd.Manager.Membership/OrgRegistration/Mappings.cs +++ b/src/Spd.Manager.Screening/OrgRegistrationMappings.cs @@ -2,11 +2,11 @@ using Spd.Resource.Organizations.Org; using Spd.Resource.Organizations.Registration; -namespace Spd.Manager.Membership.OrgRegistration +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class OrgRegistrationMappings : Profile { - public Mappings() + public OrgRegistrationMappings() { CreateMap(); CreateMap(); diff --git a/src/Spd.Manager.Membership/OrgReport/Contract.cs b/src/Spd.Manager.Screening/OrgReportContract.cs similarity index 89% rename from src/Spd.Manager.Membership/OrgReport/Contract.cs rename to src/Spd.Manager.Screening/OrgReportContract.cs index 62052a934..02af48188 100644 --- a/src/Spd.Manager.Membership/OrgReport/Contract.cs +++ b/src/Spd.Manager.Screening/OrgReportContract.cs @@ -1,7 +1,7 @@ using MediatR; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; -namespace Spd.Manager.Membership.Report +namespace Spd.Manager.Screening { public interface IReportManager { diff --git a/src/Spd.Manager.Membership/OrgReport/OrgReportManager.cs b/src/Spd.Manager.Screening/OrgReportManager.cs similarity index 96% rename from src/Spd.Manager.Membership/OrgReport/OrgReportManager.cs rename to src/Spd.Manager.Screening/OrgReportManager.cs index 0ce2c9b06..d60c0e52c 100644 --- a/src/Spd.Manager.Membership/OrgReport/OrgReportManager.cs +++ b/src/Spd.Manager.Screening/OrgReportManager.cs @@ -1,11 +1,11 @@ using AutoMapper; using MediatR; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Document; using Spd.Resource.Organizations.Report; using Spd.Utilities.FileStorage; -namespace Spd.Manager.Membership.Report +namespace Spd.Manager.Screening { internal class OrgReportManager : IRequestHandler, diff --git a/src/Spd.Manager.Membership/OrgReport/Mappings.cs b/src/Spd.Manager.Screening/OrgReportMappings.cs similarity index 57% rename from src/Spd.Manager.Membership/OrgReport/Mappings.cs rename to src/Spd.Manager.Screening/OrgReportMappings.cs index a27c79d74..f040c0abc 100644 --- a/src/Spd.Manager.Membership/OrgReport/Mappings.cs +++ b/src/Spd.Manager.Screening/OrgReportMappings.cs @@ -1,11 +1,11 @@ using AutoMapper; using Spd.Resource.Organizations.Report; -namespace Spd.Manager.Membership.Report +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class OrgReportMappings : Profile { - public Mappings() + public OrgReportMappings() { CreateMap(); } diff --git a/src/Spd.Manager.Membership/OrgUser/Contract.cs b/src/Spd.Manager.Screening/OrgUserContract.cs similarity index 99% rename from src/Spd.Manager.Membership/OrgUser/Contract.cs rename to src/Spd.Manager.Screening/OrgUserContract.cs index d0ff53b0c..45c1e012a 100644 --- a/src/Spd.Manager.Membership/OrgUser/Contract.cs +++ b/src/Spd.Manager.Screening/OrgUserContract.cs @@ -2,7 +2,7 @@ using MediatR; using System.ComponentModel; -namespace Spd.Manager.Membership.OrgUser +namespace Spd.Manager.Screening { public interface IOrgUserManager { diff --git a/src/Spd.Manager.Membership/OrgUser/OrgUserManager.cs b/src/Spd.Manager.Screening/OrgUserManager.cs similarity index 99% rename from src/Spd.Manager.Membership/OrgUser/OrgUserManager.cs rename to src/Spd.Manager.Screening/OrgUserManager.cs index f5b4b71a7..15819e3a7 100644 --- a/src/Spd.Manager.Membership/OrgUser/OrgUserManager.cs +++ b/src/Spd.Manager.Screening/OrgUserManager.cs @@ -5,7 +5,7 @@ using Spd.Utilities.Shared.Exceptions; using System.Net; -namespace Spd.Manager.Membership.OrgUser +namespace Spd.Manager.Screening { internal class OrgUserManager : IRequestHandler, diff --git a/src/Spd.Manager.Membership/OrgUser/Mappings.cs b/src/Spd.Manager.Screening/OrgUserMappings.cs similarity index 83% rename from src/Spd.Manager.Membership/OrgUser/Mappings.cs rename to src/Spd.Manager.Screening/OrgUserMappings.cs index 22280bda4..ea99c44af 100644 --- a/src/Spd.Manager.Membership/OrgUser/Mappings.cs +++ b/src/Spd.Manager.Screening/OrgUserMappings.cs @@ -1,11 +1,11 @@ using AutoMapper; using Spd.Resource.Organizations.User; -namespace Spd.Manager.Membership.OrgUser +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class OrgUserMappings : Profile { - public Mappings() + public OrgUserMappings() { CreateMap(); CreateMap(); diff --git a/src/Spd.Manager.Screening/ServiceExtensions.cs b/src/Spd.Manager.Screening/ServiceExtensions.cs new file mode 100644 index 000000000..3140ec72f --- /dev/null +++ b/src/Spd.Manager.Screening/ServiceExtensions.cs @@ -0,0 +1,16 @@ +using Microsoft.Extensions.DependencyInjection; +using Spd.Utilities.Hosting; + +namespace Spd.Manager.Screening; + +public class ServiceExtension : IConfigureComponentServices +{ + public void ConfigureServices(ConfigurationServices configurationServices) + { + configurationServices.Services.AddTransient(); + configurationServices.Services.AddTransient(); + configurationServices.Services.AddTransient(); + configurationServices.Services.AddTransient(); + configurationServices.Services.AddTransient(); + } +} diff --git a/src/Spd.Manager.Cases/Spd.Manager.Cases.csproj b/src/Spd.Manager.Screening/Spd.Manager.Screening.csproj similarity index 76% rename from src/Spd.Manager.Cases/Spd.Manager.Cases.csproj rename to src/Spd.Manager.Screening/Spd.Manager.Screening.csproj index 3d61ff573..63b6633b3 100644 --- a/src/Spd.Manager.Cases/Spd.Manager.Cases.csproj +++ b/src/Spd.Manager.Screening/Spd.Manager.Screening.csproj @@ -10,9 +10,11 @@ - + + + diff --git a/src/Spd.Manager.Membership/UserProfile/Contract.cs b/src/Spd.Manager.Screening/UserProfileContract.cs similarity index 97% rename from src/Spd.Manager.Membership/UserProfile/Contract.cs rename to src/Spd.Manager.Screening/UserProfileContract.cs index da3fb170f..effc4faf9 100644 --- a/src/Spd.Manager.Membership/UserProfile/Contract.cs +++ b/src/Spd.Manager.Screening/UserProfileContract.cs @@ -1,10 +1,8 @@ using MediatR; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Membership.OrgRegistration; -using Spd.Manager.Membership.OrgUser; +using Spd.Manager.Shared; using Spd.Utilities.LogonUser; -namespace Spd.Manager.Membership.UserProfile +namespace Spd.Manager.Screening { public interface IUserProfileManager { diff --git a/src/Spd.Manager.Membership/UserProfile/UserProfileManager.cs b/src/Spd.Manager.Screening/UserProfileManager.cs similarity index 99% rename from src/Spd.Manager.Membership/UserProfile/UserProfileManager.cs rename to src/Spd.Manager.Screening/UserProfileManager.cs index ab40ce37e..16a994ca8 100644 --- a/src/Spd.Manager.Membership/UserProfile/UserProfileManager.cs +++ b/src/Spd.Manager.Screening/UserProfileManager.cs @@ -1,8 +1,7 @@ using AutoMapper; using MediatR; using Microsoft.Extensions.Logging; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Membership.OrgRegistration; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Application; using Spd.Resource.Applicants.Contact; using Spd.Resource.Applicants.PortalUser; @@ -14,7 +13,7 @@ using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; -namespace Spd.Manager.Membership.UserProfile +namespace Spd.Manager.Screening { internal class UserProfileManager : IRequestHandler, diff --git a/src/Spd.Manager.Membership/UserProfile/Mappings.cs b/src/Spd.Manager.Screening/UserProfileMappings.cs similarity index 95% rename from src/Spd.Manager.Membership/UserProfile/Mappings.cs rename to src/Spd.Manager.Screening/UserProfileMappings.cs index 80610110c..10b47e455 100644 --- a/src/Spd.Manager.Membership/UserProfile/Mappings.cs +++ b/src/Spd.Manager.Screening/UserProfileMappings.cs @@ -1,5 +1,5 @@ using AutoMapper; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Shared; using Spd.Resource.Applicants.Contact; using Spd.Resource.Applicants.PortalUser; using Spd.Resource.Organizations.Identity; @@ -7,11 +7,11 @@ using Spd.Resource.Organizations.User; using Spd.Utilities.Shared.ResourceContracts; -namespace Spd.Manager.Membership.UserProfile +namespace Spd.Manager.Screening { - internal class Mappings : Profile + internal class UserProfileMappings : Profile { - public Mappings() + public UserProfileMappings() { CreateMap(); CreateMap() diff --git a/src/Spd.Manager.Common/ManagerContracts/Contract.cs b/src/Spd.Manager.Shared/Contract.cs similarity index 98% rename from src/Spd.Manager.Common/ManagerContracts/Contract.cs rename to src/Spd.Manager.Shared/Contract.cs index 94bea8c1f..d72d36339 100644 --- a/src/Spd.Manager.Common/ManagerContracts/Contract.cs +++ b/src/Spd.Manager.Shared/Contract.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace Spd.Manager.Common.ManagerContract +namespace Spd.Manager.Shared { public record PaginationRequest(int Page, int PageSize); public record PaginationResponse diff --git a/src/Spd.Manager.Shared/Spd.Manager.Shared.csproj b/src/Spd.Manager.Shared/Spd.Manager.Shared.csproj new file mode 100644 index 000000000..fa71b7ae6 --- /dev/null +++ b/src/Spd.Manager.Shared/Spd.Manager.Shared.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Spd.Presentation.Dynamics/Controllers/PaymentController.cs b/src/Spd.Presentation.Dynamics/Controllers/PaymentController.cs index d1dcd3e1b..167a5edba 100644 --- a/src/Spd.Presentation.Dynamics/Controllers/PaymentController.cs +++ b/src/Spd.Presentation.Dynamics/Controllers/PaymentController.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Common.Payment; +using Spd.Manager.Payment; using Spd.Utilities.Shared; using System.Configuration; diff --git a/src/Spd.Presentation.Dynamics/Spd.Presentation.Dynamics.csproj b/src/Spd.Presentation.Dynamics/Spd.Presentation.Dynamics.csproj index baa2ca141..2cd60a029 100644 --- a/src/Spd.Presentation.Dynamics/Spd.Presentation.Dynamics.csproj +++ b/src/Spd.Presentation.Dynamics/Spd.Presentation.Dynamics.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Spd.Presentation.Licensing/Controllers/Mapping.cs b/src/Spd.Presentation.Licensing/Controllers/Mapping.cs index 92f45db76..852d7957a 100644 --- a/src/Spd.Presentation.Licensing/Controllers/Mapping.cs +++ b/src/Spd.Presentation.Licensing/Controllers/Mapping.cs @@ -1,6 +1,6 @@ using AutoMapper; -using Spd.Manager.Common.Payment; using Spd.Manager.Licence; +using Spd.Manager.Payment; using Spd.Presentation.Licensing.Services; using System.Globalization; diff --git a/src/Spd.Presentation.Licensing/Controllers/PaymentController.cs b/src/Spd.Presentation.Licensing/Controllers/PaymentController.cs index b2b5fcf2c..2d6a93b1f 100644 --- a/src/Spd.Presentation.Licensing/Controllers/PaymentController.cs +++ b/src/Spd.Presentation.Licensing/Controllers/PaymentController.cs @@ -1,8 +1,8 @@ using AutoMapper; using MediatR; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Common.Payment; +using Spd.Manager.Shared; +using Spd.Manager.Payment; using Spd.Presentation.Licensing.Configurations; using Spd.Utilities.Shared; using System.ComponentModel.DataAnnotations; diff --git a/src/Spd.Presentation.Licensing/Controllers/UserProfileController.cs b/src/Spd.Presentation.Licensing/Controllers/UserProfileController.cs index 5fb000c46..323f6c028 100644 --- a/src/Spd.Presentation.Licensing/Controllers/UserProfileController.cs +++ b/src/Spd.Presentation.Licensing/Controllers/UserProfileController.cs @@ -2,8 +2,8 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Shared; +using Spd.Manager.Licence; using Spd.Utilities.LogonUser; using Spd.Utilities.Shared; using System.Security.Principal; diff --git a/src/Spd.Presentation.Licensing/Controllers/WorkerLicensingController.cs b/src/Spd.Presentation.Licensing/Controllers/WorkerLicensingController.cs index b53f995dc..8eee0ad6e 100644 --- a/src/Spd.Presentation.Licensing/Controllers/WorkerLicensingController.cs +++ b/src/Spd.Presentation.Licensing/Controllers/WorkerLicensingController.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Distributed; using Spd.Manager.Licence; -using Spd.Manager.Membership.UserProfile; using Spd.Presentation.Licensing.Configurations; using Spd.Presentation.Licensing.Services; using Spd.Utilities.Cache; diff --git a/src/Spd.Presentation.Licensing/Program.cs b/src/Spd.Presentation.Licensing/Program.cs index 0ad147171..b75d649b9 100644 --- a/src/Spd.Presentation.Licensing/Program.cs +++ b/src/Spd.Presentation.Licensing/Program.cs @@ -6,7 +6,6 @@ using Spd.Presentation.Licensing.Services; using Spd.Presentation.Licensing.Swagger; using Spd.Utilities.Address; -using Spd.Utilities.BCeIDWS; using Spd.Utilities.Dynamics; using Spd.Utilities.FileStorage; using Spd.Utilities.Hosting; @@ -69,7 +68,6 @@ builder.Services.AddFileStorageProxy(builder.Configuration); builder.Services .AddGoogleRecaptcha(builder.Configuration) - .AddBCeIDService(builder.Configuration) .AddPaymentService(builder.Configuration) .AddDynamicsProxy(builder.Configuration) .AddAddressAutoComplete(builder.Configuration); diff --git a/src/Spd.Presentation.Licensing/Spd.Presentation.Licensing.csproj b/src/Spd.Presentation.Licensing/Spd.Presentation.Licensing.csproj index 7d1bbe7b4..8f3cabd42 100644 --- a/src/Spd.Presentation.Licensing/Spd.Presentation.Licensing.csproj +++ b/src/Spd.Presentation.Licensing/Spd.Presentation.Licensing.csproj @@ -23,8 +23,9 @@ + - + diff --git a/src/Spd.Presentation.Licensing/UsersMiddleware.cs b/src/Spd.Presentation.Licensing/UsersMiddleware.cs index 747a042bb..e1f0c90a9 100644 --- a/src/Spd.Presentation.Licensing/UsersMiddleware.cs +++ b/src/Spd.Presentation.Licensing/UsersMiddleware.cs @@ -1,7 +1,7 @@ using AutoMapper; using MediatR; using Microsoft.Extensions.Caching.Distributed; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Licence; using Spd.Utilities.Cache; using Spd.Utilities.LogonUser; using Spd.Utilities.LogonUser.Configurations; diff --git a/src/Spd.Presentation.Screening/Controllers/ApplicantController.cs b/src/Spd.Presentation.Screening/Controllers/ApplicantController.cs index bffa92ea0..e3a738f5e 100644 --- a/src/Spd.Presentation.Screening/Controllers/ApplicantController.cs +++ b/src/Spd.Presentation.Screening/Controllers/ApplicantController.cs @@ -2,8 +2,8 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Screening; +using Spd.Manager.Shared; using Spd.Presentation.Screening.Configurations; using Spd.Utilities.LogonUser; using Spd.Utilities.Recaptcha; diff --git a/src/Spd.Presentation.Screening/Controllers/ApplicationController.cs b/src/Spd.Presentation.Screening/Controllers/ApplicationController.cs index 29e9ca971..348c8f503 100644 --- a/src/Spd.Presentation.Screening/Controllers/ApplicationController.cs +++ b/src/Spd.Presentation.Screening/Controllers/ApplicationController.cs @@ -2,8 +2,8 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Screening; +using Spd.Manager.Shared; using Spd.Utilities.LogonUser; using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; diff --git a/src/Spd.Presentation.Screening/Controllers/DelegateController.cs b/src/Spd.Presentation.Screening/Controllers/DelegateController.cs index 67100dca3..eb7e680f0 100644 --- a/src/Spd.Presentation.Screening/Controllers/DelegateController.cs +++ b/src/Spd.Presentation.Screening/Controllers/DelegateController.cs @@ -2,7 +2,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Cases.Screening; +using Spd.Manager.Screening; using Spd.Utilities.LogonUser; using Spd.Utilities.Shared; using System.ComponentModel.DataAnnotations; diff --git a/src/Spd.Presentation.Screening/Controllers/Mapping.cs b/src/Spd.Presentation.Screening/Controllers/Mapping.cs index c3cab8a17..3f894b4e7 100644 --- a/src/Spd.Presentation.Screening/Controllers/Mapping.cs +++ b/src/Spd.Presentation.Screening/Controllers/Mapping.cs @@ -1,8 +1,6 @@ using AutoMapper; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Common.Payment; -using Spd.Manager.Membership.Org; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Payment; +using Spd.Manager.Screening; using Spd.Utilities.LogonUser; using System.Globalization; @@ -51,7 +49,7 @@ public Mappings() private static Guid GetPaymentId(string ref2) { - return Guid.Parse(ref2.Split("*")[0]); + return Guid.Parse(ref2.Split("*")[0]); } private static Guid GetAppicationId(string ref2) diff --git a/src/Spd.Presentation.Screening/Controllers/OrgController.cs b/src/Spd.Presentation.Screening/Controllers/OrgController.cs index b160649f3..55863d548 100644 --- a/src/Spd.Presentation.Screening/Controllers/OrgController.cs +++ b/src/Spd.Presentation.Screening/Controllers/OrgController.cs @@ -2,8 +2,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Membership.Org; +using Spd.Manager.Screening; using Spd.Utilities.Shared; namespace Spd.Presentation.Screening.Controllers @@ -17,7 +16,7 @@ public class OrgController : SpdControllerBase private readonly IMediator _mediator; private readonly IMapper _mapper; - public OrgController( IMediator mediator, IMapper mapper) + public OrgController(IMediator mediator, IMapper mapper) { _mediator = mediator; _mapper = mapper; @@ -49,7 +48,7 @@ public async Task Get([FromRoute] Guid orgId) [AllowAnonymous] public async Task GetOrgFromAccessCode([FromRoute] string accessCode) { - var orgResponse = await _mediator.Send(new OrgGetQuery(null, accessCode)); + var orgResponse = await _mediator.Send(new OrgGetQuery(null, accessCode)); return _mapper.Map(orgResponse); } } diff --git a/src/Spd.Presentation.Screening/Controllers/OrgRegistrationController.cs b/src/Spd.Presentation.Screening/Controllers/OrgRegistrationController.cs index b72b57c46..6433456f7 100644 --- a/src/Spd.Presentation.Screening/Controllers/OrgRegistrationController.cs +++ b/src/Spd.Presentation.Screening/Controllers/OrgRegistrationController.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Membership.OrgRegistration; +using Spd.Manager.Screening; using Spd.Utilities.Recaptcha; using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; @@ -78,7 +78,7 @@ public async Task Register([FromBody][Required] O /// [Route("api/org-registrations/{registrationNumber}/status")] [HttpGet] - public async Task Status([FromRoute]string registrationNumber) + public async Task Status([FromRoute] string registrationNumber) { return await _mediator.Send(new GetOrgRegistrationStatusQuery(registrationNumber)); } diff --git a/src/Spd.Presentation.Screening/Controllers/OrgReportController.cs b/src/Spd.Presentation.Screening/Controllers/OrgReportController.cs index 7110639ef..4c2cfb1fb 100644 --- a/src/Spd.Presentation.Screening/Controllers/OrgReportController.cs +++ b/src/Spd.Presentation.Screening/Controllers/OrgReportController.cs @@ -2,8 +2,8 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Membership.Report; +using Spd.Manager.Screening; +using Spd.Manager.Shared; using Spd.Utilities.Shared; using System.Security.Claims; using System.Security.Principal; diff --git a/src/Spd.Presentation.Screening/Controllers/OrgUserController.cs b/src/Spd.Presentation.Screening/Controllers/OrgUserController.cs index 3e9bfc6ea..0172b49f7 100644 --- a/src/Spd.Presentation.Screening/Controllers/OrgUserController.cs +++ b/src/Spd.Presentation.Screening/Controllers/OrgUserController.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Membership.OrgUser; +using Spd.Manager.Screening; using Spd.Utilities.LogonUser; using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; diff --git a/src/Spd.Presentation.Screening/Controllers/PaymentController.cs b/src/Spd.Presentation.Screening/Controllers/PaymentController.cs index 13593b5b7..64964cdaf 100644 --- a/src/Spd.Presentation.Screening/Controllers/PaymentController.cs +++ b/src/Spd.Presentation.Screening/Controllers/PaymentController.cs @@ -2,8 +2,8 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Common.Payment; +using Spd.Manager.Shared; +using Spd.Manager.Payment; using Spd.Presentation.Screening.Configurations; using Spd.Utilities.Shared; using System.ComponentModel.DataAnnotations; diff --git a/src/Spd.Presentation.Screening/Controllers/UserProfileController.cs b/src/Spd.Presentation.Screening/Controllers/UserProfileController.cs index a8dd55cc3..7e055a26a 100644 --- a/src/Spd.Presentation.Screening/Controllers/UserProfileController.cs +++ b/src/Spd.Presentation.Screening/Controllers/UserProfileController.cs @@ -2,7 +2,7 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Screening; using Spd.Utilities.LogonUser; using Spd.Utilities.Shared; using Spd.Utilities.Shared.Exceptions; diff --git a/src/Spd.Presentation.Screening/Spd.Presentation.Screening.csproj b/src/Spd.Presentation.Screening/Spd.Presentation.Screening.csproj index 40292afe3..5370ba469 100644 --- a/src/Spd.Presentation.Screening/Spd.Presentation.Screening.csproj +++ b/src/Spd.Presentation.Screening/Spd.Presentation.Screening.csproj @@ -22,8 +22,9 @@ - - + + + @@ -55,7 +56,7 @@ - + wwwroot\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest true diff --git a/src/Spd.Presentation.Screening/Startup.cs b/src/Spd.Presentation.Screening/Startup.cs index 3604b6519..35d238b75 100644 --- a/src/Spd.Presentation.Screening/Startup.cs +++ b/src/Spd.Presentation.Screening/Startup.cs @@ -1,9 +1,6 @@ -using System.Reflection; -using System.Security.Principal; -using System.Text.Json.Serialization; -using FluentValidation; +using FluentValidation; using FluentValidation.AspNetCore; -using Spd.Manager.Membership; +using Spd.Manager.Screening; using Spd.Presentation.Screening.Swagger; using Spd.Utilities.Address; using Spd.Utilities.BCeIDWS; @@ -15,6 +12,9 @@ using Spd.Utilities.Payment; using Spd.Utilities.Recaptcha; using Spd.Utilities.TempFileStorage; +using System.Reflection; +using System.Security.Principal; +using System.Text.Json.Serialization; namespace Spd.Presentation.Screening { diff --git a/src/Spd.Presentation.Screening/UsersMiddleware.cs b/src/Spd.Presentation.Screening/UsersMiddleware.cs index eb7cbef13..7f8fffa5b 100644 --- a/src/Spd.Presentation.Screening/UsersMiddleware.cs +++ b/src/Spd.Presentation.Screening/UsersMiddleware.cs @@ -1,7 +1,7 @@ using AutoMapper; using MediatR; using Microsoft.Extensions.Caching.Distributed; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Screening; using Spd.Utilities.Cache; using Spd.Utilities.LogonUser.Configurations; using Spd.Utilities.Shared; diff --git a/src/Spd.Tests.Presentation.Dynamics/Integration/Managers/PaymentManagerTests.cs b/src/Spd.Tests.Presentation.Dynamics/Integration/Managers/PaymentManagerTests.cs index e6ac8b933..dc9163b63 100644 --- a/src/Spd.Tests.Presentation.Dynamics/Integration/Managers/PaymentManagerTests.cs +++ b/src/Spd.Tests.Presentation.Dynamics/Integration/Managers/PaymentManagerTests.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.Extensions.DependencyInjection; using Shouldly; -using Spd.Manager.Common.Payment; +using Spd.Manager.Payment; using Xunit.Abstractions; namespace Spd.Tests.Presentation.Dynamics.Integration.Managers; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/ApplicationScenarios.cs b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/ApplicationScenarios.cs index 239a6ddf7..36890fccd 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/ApplicationScenarios.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/ApplicationScenarios.cs @@ -1,6 +1,6 @@ using Alba; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Common.ManagerContract; +using Spd.Manager.Screening; +using Spd.Manager.Shared; using System.Net.Http.Json; using System.Net.Mime; using System.Text.Json; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgRegistrationScenarios.cs b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgRegistrationScenarios.cs index 625f80110..2fa6e0876 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgRegistrationScenarios.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgRegistrationScenarios.cs @@ -1,7 +1,7 @@ using Alba; using Microsoft.Dynamics.CRM; -using Spd.Manager.Common.ManagerContract; -using Spd.Manager.Membership.OrgRegistration; +using Spd.Manager.Shared; +using Spd.Manager.Screening; using Spd.Presentation.Screening.Controllers; using System.Net; using Xunit.Abstractions; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgScenarios.cs b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgScenarios.cs index 0164f2cf6..1f24b1997 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgScenarios.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgScenarios.cs @@ -1,5 +1,5 @@ using Alba; -using Spd.Manager.Membership.Org; +using Spd.Manager.Screening; using Xunit.Abstractions; namespace Spd.Tests.Presentation.Screening.Integration.Controllers; @@ -69,7 +69,7 @@ private OrgUpdateRequest Create_OrgUpdateRequest(Guid orgId) Id = orgId, AddressCity = "city", Email = "test@test.com", - PayerPreference = Spd.Manager.Common.ManagerContract.PayerPreferenceTypeCode.Applicant, + PayerPreference = Spd.Manager.Shared.PayerPreferenceTypeCode.Applicant, PhoneNumber = "111-111-1111", AddressLine1 = "line1", AddressCountry = "canada", diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgUserScenarios.cs b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgUserScenarios.cs index 3da5ed6db..1166ceb2c 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgUserScenarios.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Controllers/OrgUserScenarios.cs @@ -1,6 +1,6 @@ using Alba; using Microsoft.Dynamics.CRM; -using Spd.Manager.Membership.OrgUser; +using Spd.Manager.Screening; using Xunit.Abstractions; namespace Spd.Tests.Presentation.Screening.Integration.Controllers; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Managers/ApplicationManagerTests.cs b/src/Spd.Tests.Presentation.Screening/Integration/Managers/ApplicationManagerTests.cs index 90b9613b7..9600ebc0d 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Managers/ApplicationManagerTests.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Managers/ApplicationManagerTests.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.Extensions.DependencyInjection; using Shouldly; -using Spd.Manager.Cases.Screening; +using Spd.Manager.Screening; using Xunit.Abstractions; namespace Spd.Tests.Presentation.Screening.Integration.Managers; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Managers/PaymentManagerTests.cs b/src/Spd.Tests.Presentation.Screening/Integration/Managers/PaymentManagerTests.cs index 33925e8ec..2246929b5 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Managers/PaymentManagerTests.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Managers/PaymentManagerTests.cs @@ -1,9 +1,4 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; -using Shouldly; -using Spd.Manager.Common.Payment; -using Spd.Utilities.Payment; -using Xunit.Abstractions; +using Xunit.Abstractions; namespace Spd.Tests.Presentation.Screening.Integration.Managers; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Managers/UserProfileManagerTests.cs b/src/Spd.Tests.Presentation.Screening/Integration/Managers/UserProfileManagerTests.cs index 71d0ed182..7f6dc0b45 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Managers/UserProfileManagerTests.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Managers/UserProfileManagerTests.cs @@ -1,9 +1,7 @@ using MediatR; using Microsoft.Extensions.DependencyInjection; using Shouldly; -using Spd.Manager.Cases; -using Spd.Manager.Cases.Screening; -using Spd.Manager.Membership.UserProfile; +using Spd.Manager.Screening; using Xunit.Abstractions; namespace Spd.Tests.Presentation.Screening.Integration.Managers; diff --git a/src/Spd.Tests.Presentation.Screening/Integration/Search/SearchEngineTests.cs b/src/Spd.Tests.Presentation.Screening/Integration/Search/SearchEngineTests.cs index 8f0b9902c..0d91ca1b2 100644 --- a/src/Spd.Tests.Presentation.Screening/Integration/Search/SearchEngineTests.cs +++ b/src/Spd.Tests.Presentation.Screening/Integration/Search/SearchEngineTests.cs @@ -19,7 +19,7 @@ public async Task SearchShareableClearance_Success() var org2 = await fixture.testData.CreateOrg("org4"); ShareableClearanceSearchResponse searchResponse = (ShareableClearanceSearchResponse)await searchEngine.SearchAsync( - new ShareableClearanceSearchRequest((Guid)org2.accountid, bcscId, Spd.Manager.Common.ManagerContract.ServiceTypeCode.CRRP_EMPLOYEE), + new ShareableClearanceSearchRequest((Guid)org2.accountid, bcscId, Spd.Manager.Shared.ServiceTypeCode.CRRP_EMPLOYEE), CancellationToken.None); searchResponse.Items.Count().ShouldBe(1); } diff --git a/src/Spd.Utilities.LogonUser/IPrincipalExtensions.cs b/src/Spd.Utilities.LogonUser/IPrincipalExtensions.cs index bed84ae44..7f6cb4bed 100644 --- a/src/Spd.Utilities.LogonUser/IPrincipalExtensions.cs +++ b/src/Spd.Utilities.LogonUser/IPrincipalExtensions.cs @@ -6,6 +6,7 @@ namespace Spd.Utilities.LogonUser { public static class IPrincipalExtensions { +#pragma warning disable CA1707 // Identifiers should not contain underscores public static readonly string[] BCeID_IDENTITY_PROVIDERS = { "bceidboth", "bceidbusiness" }; public static readonly string IDIR_IDENTITY_PROVIDER = "idir"; public static readonly string BCeID_USER_NAME = "bceid_username"; @@ -19,6 +20,7 @@ public static class IPrincipalExtensions public static readonly string ISSUER = "iss"; public static readonly string SUB = "sub"; public static readonly string SPD_IDIR_IsPSA = "SPD_IDIR_IsPSA"; +#pragma warning restore CA1707 // Identifiers should not contain underscores public static bool IsAuthenticated(this IPrincipal principal) { var claimPrincipal = ValidatePrincipal(principal); diff --git a/src/Spd.sln b/src/Spd.sln index 791a92756..32fe38131 100644 --- a/src/Spd.sln +++ b/src/Spd.sln @@ -4,10 +4,6 @@ VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Presentation.Licensing", "Spd.Presentation.Licensing\Spd.Presentation.Licensing.csproj", "{358EC078-F4C0-4280-B155-EB5F2DAECB77}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Cases", "Spd.Manager.Cases\Spd.Manager.Cases.csproj", "{70E3BF6A-32CC-4372-905F-B3BEC6543B21}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Membership", "Spd.Manager.Membership\Spd.Manager.Membership.csproj", "{C5E66F85-1929-460B-90A2-CDD9C07F2E43}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Engine.Search", "Spd.Engine.Search\Spd.Engine.Search.csproj", "{731E91F9-3A6F-4784-9971-A8E6F7E316FA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Engine.Validation", "Spd.Engine.Validation\Spd.Engine.Validation.csproj", "{B5BC4B1E-3D3B-4916-BB03-4C24B2801F4D}" @@ -68,11 +64,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Utilities.BCeIDWS", "Sp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Licence", "Spd.Manager.Licence\Spd.Manager.Licence.csproj", "{119B3695-6918-46DD-82B7-493C9F6CAB77}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spd.Manager.Common", "Spd.Manager.Common\Spd.Manager.Common.csproj", "{D0A77F21-2E69-4526-87F9-649BEF9422E3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Common", "Spd.Manager.Common\Spd.Manager.Common.csproj", "{D0A77F21-2E69-4526-87F9-649BEF9422E3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Utilities.Printing", "Spd.Utilities.Printing\Spd.Utilities.Printing.csproj", "{6CF6C34F-23B4-4700-94A5-8BFA19D95238}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spd.Tests", "Spd.Tests\Spd.Tests.csproj", "{614AE12B-8E11-4466-A4AC-9A6D47150375}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Tests", "Spd.Tests\Spd.Tests.csproj", "{614AE12B-8E11-4466-A4AC-9A6D47150375}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Payment", "Spd.Manager.Payment\Spd.Manager.Payment.csproj", "{184CB1C9-EC53-4471-80A8-61AB9BA730D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Shared", "Spd.Manager.Shared\Spd.Manager.Shared.csproj", "{FA99429F-69D1-4BFE-BABF-156BF0FD0372}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spd.Manager.Screening", "Spd.Manager.Screening\Spd.Manager.Screening.csproj", "{3090F64A-05C1-4202-8139-08FEBF57A2D9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -84,14 +86,6 @@ Global {358EC078-F4C0-4280-B155-EB5F2DAECB77}.Debug|Any CPU.Build.0 = Debug|Any CPU {358EC078-F4C0-4280-B155-EB5F2DAECB77}.Release|Any CPU.ActiveCfg = Release|Any CPU {358EC078-F4C0-4280-B155-EB5F2DAECB77}.Release|Any CPU.Build.0 = Release|Any CPU - {70E3BF6A-32CC-4372-905F-B3BEC6543B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70E3BF6A-32CC-4372-905F-B3BEC6543B21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70E3BF6A-32CC-4372-905F-B3BEC6543B21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70E3BF6A-32CC-4372-905F-B3BEC6543B21}.Release|Any CPU.Build.0 = Release|Any CPU - {C5E66F85-1929-460B-90A2-CDD9C07F2E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C5E66F85-1929-460B-90A2-CDD9C07F2E43}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C5E66F85-1929-460B-90A2-CDD9C07F2E43}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C5E66F85-1929-460B-90A2-CDD9C07F2E43}.Release|Any CPU.Build.0 = Release|Any CPU {731E91F9-3A6F-4784-9971-A8E6F7E316FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {731E91F9-3A6F-4784-9971-A8E6F7E316FA}.Debug|Any CPU.Build.0 = Debug|Any CPU {731E91F9-3A6F-4784-9971-A8E6F7E316FA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -184,14 +178,24 @@ Global {614AE12B-8E11-4466-A4AC-9A6D47150375}.Debug|Any CPU.Build.0 = Debug|Any CPU {614AE12B-8E11-4466-A4AC-9A6D47150375}.Release|Any CPU.ActiveCfg = Release|Any CPU {614AE12B-8E11-4466-A4AC-9A6D47150375}.Release|Any CPU.Build.0 = Release|Any CPU + {184CB1C9-EC53-4471-80A8-61AB9BA730D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {184CB1C9-EC53-4471-80A8-61AB9BA730D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {184CB1C9-EC53-4471-80A8-61AB9BA730D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {184CB1C9-EC53-4471-80A8-61AB9BA730D1}.Release|Any CPU.Build.0 = Release|Any CPU + {FA99429F-69D1-4BFE-BABF-156BF0FD0372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA99429F-69D1-4BFE-BABF-156BF0FD0372}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA99429F-69D1-4BFE-BABF-156BF0FD0372}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA99429F-69D1-4BFE-BABF-156BF0FD0372}.Release|Any CPU.Build.0 = Release|Any CPU + {3090F64A-05C1-4202-8139-08FEBF57A2D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3090F64A-05C1-4202-8139-08FEBF57A2D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3090F64A-05C1-4202-8139-08FEBF57A2D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3090F64A-05C1-4202-8139-08FEBF57A2D9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {358EC078-F4C0-4280-B155-EB5F2DAECB77} = {B5A15349-F339-4FA1-A05D-7EE9866B8B46} - {70E3BF6A-32CC-4372-905F-B3BEC6543B21} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} - {C5E66F85-1929-460B-90A2-CDD9C07F2E43} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} {731E91F9-3A6F-4784-9971-A8E6F7E316FA} = {D2372F2D-0320-427B-9AA1-331722AB00EE} {B5BC4B1E-3D3B-4916-BB03-4C24B2801F4D} = {D2372F2D-0320-427B-9AA1-331722AB00EE} {A9403FBC-1851-4444-9577-BD119BDE0AE6} = {8D004FC3-58FA-40BA-9826-B0A2D8B8C7BD} @@ -215,6 +219,9 @@ Global {D0A77F21-2E69-4526-87F9-649BEF9422E3} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} {6CF6C34F-23B4-4700-94A5-8BFA19D95238} = {744553C0-C41C-4315-9592-92A97938234E} {614AE12B-8E11-4466-A4AC-9A6D47150375} = {44CEC402-28D1-4A94-B18A-F3147AD4CCCE} + {184CB1C9-EC53-4471-80A8-61AB9BA730D1} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} + {FA99429F-69D1-4BFE-BABF-156BF0FD0372} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} + {3090F64A-05C1-4202-8139-08FEBF57A2D9} = {AFA7034A-A8B1-489C-9A24-030B05C5412B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {07609A1C-A62A-4B0C-85C1-40600CB3DC45} diff --git a/tools/helm/charts/tools/templates/training-release-pipeline.yaml b/tools/helm/charts/tools/templates/training-release-pipeline.yaml new file mode 100644 index 000000000..cf46b4dd4 --- /dev/null +++ b/tools/helm/charts/tools/templates/training-release-pipeline.yaml @@ -0,0 +1,57 @@ +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: training-release-pipeline + labels: + DataClass: Low +spec: + tasks: + + ## Promote test to training ## + - name: training-screening-portal + params: + - name: imageName + value: screening-portal + - name: fromTag + value: test + - name: toTag + value: training + taskRef: + kind: Task + name: promote-image-task + + - name: training-licensing-portal + params: + - name: imageName + value: licensing-portal + - name: fromTag + value: test + - name: toTag + value: training + taskRef: + kind: Task + name: promote-image-task + + - name: training-dynamics-helper + params: + - name: imageName + value: dynamics-helper + - name: fromTag + value: test + - name: toTag + value: training + taskRef: + kind: Task + name: promote-image-task + + - name: test-job-scheduler + params: + - name: imageName + value: jag-jobscheduler + - name: fromTag + value: test + - name: toTag + value: training + taskRef: + kind: Task + name: promote-image-task