Skip to content

Commit

Permalink
CON-1712-make review comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shomavg committed Apr 27, 2020
1 parent a45beee commit a786e26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
<None Include="Scripts\PreDeployment\AML-3784-AgreementTypeChanges.sql" />
<Build Include="StoredProcedures\GetPayeSchemesAddedByGovernmentGateway_ByAccountId.sql" />
<Build Include="StoredProcedures\UpdateAccount_SetAccountApprenticeshipEmployerType.sql" />
<Build Include="Scripts\Manual\CON-1712-alterTable.sql" />
</ItemGroup>
<ItemGroup>
<RefactorLog Include="SFA.DAS.EmployerApprenticeshipsService.Database.refactorlog" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
[PartialViewName] NVARCHAR(50) NOT NULL,
[CreatedDate] DATETIME NOT NULL,
[VersionNumber] INT NOT NULL,
[AgreementType] TINYINT NOT NULL DEFAULT 0
[AgreementType] TINYINT NOT NULL DEFAULT 0,
[PublishedDate] DATETIME NULL
)
GO

Expand Down
21 changes: 6 additions & 15 deletions src/SFA.DAS.EmployerAccounts.Web/Mappings/AgreementMappings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using AutoMapper;
using AutoMapper;
using SFA.DAS.EAS.Account.Api.Types;
using SFA.DAS.EmployerAccounts.Dtos;
using SFA.DAS.EmployerAccounts.Queries.GetEmployerAgreement;
Expand All @@ -14,19 +13,14 @@ public AgreementMappings()
{
CreateMap<AgreementDto, EmployerAccounts.Models.EmployerAgreement.EmployerAgreementView>()
.ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.StatusId))
.ForMember(dest => dest.LegalEntityAddress,
opt => opt.MapFrom(src => src.LegalEntity.RegisteredAddress))
.ForMember(dest => dest.LegalEntityInceptionDate,
opt => opt.MapFrom(src => src.LegalEntity.DateOfIncorporation))
.ForMember(dest => dest.LegalEntityAddress, opt => opt.MapFrom(src => src.LegalEntity.RegisteredAddress))
.ForMember(dest => dest.LegalEntityInceptionDate, opt => opt.MapFrom(src => src.LegalEntity.DateOfIncorporation))
.ForMember(dest => dest.Sector, opt => opt.MapFrom(src => src.LegalEntity.Sector))
.ForMember(dest => dest.LegalEntitySource, opt => opt.MapFrom(src => src.LegalEntity.Source))
.ForMember(dest => dest.TemplatePartialViewName,
opt => opt.MapFrom(src => src.Template.PartialViewName))
.ForMember(dest => dest.TemplatePartialViewName, opt => opt.MapFrom(src => src.Template.PartialViewName))
.ForMember(dest => dest.AgreementType, opt => opt.MapFrom(src => src.Template.AgreementType))
.ForMember(dest => dest.AccountLegalEntityId,
opt => opt.MapFrom(src => src.LegalEntity.AccountLegalEntityId))
.ForMember(dest => dest.AccountLegalEntityPublicHashedId,
opt => opt.MapFrom(src => src.LegalEntity.AccountLegalEntityPublicHashedId))
.ForMember(dest => dest.AccountLegalEntityId, opt => opt.MapFrom(src => src.LegalEntity.AccountLegalEntityId))
.ForMember(dest => dest.AccountLegalEntityPublicHashedId, opt => opt.MapFrom(src => src.LegalEntity.AccountLegalEntityPublicHashedId))
.ForMember(dest => dest.AgreementType, opts => opts.Ignore())
.ForMember(dest => dest.VersionNumber, opts => opts.Ignore());

Expand All @@ -47,9 +41,6 @@ public AgreementMappings()
.ForMember(dest => dest.SignedDateText, opt => opt.Ignore())
.ForMember(dest => dest.AccountLegalEntityPublicHashedId, opts => opts.Ignore());

CreateMap<AgreementTemplateDto, AgreementTemplateViewModel>()
.ForMember(dest => dest.PublishedDate, opt => opt.Ignore());

CreateMap<AccountLegalEntityDto, AccountLegalEntityViewModel>();
}
}
Expand Down

0 comments on commit a786e26

Please sign in to comment.