Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev to staging #329

Merged
merged 58 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
235dc97
feat(dbchanges) : make certificate review table columns nullable
AiswaryaEY Nov 22, 2024
1ead1d5
feat(db-changes): update publicinterestcheck fields table to nullable
KobithasanVasantharajah Nov 22, 2024
14201f7
feat(db-changes): update publicinterestcheck fields table to nullable
KobithasanVasantharajah Nov 22, 2024
da9040f
Merge pull request #305 from UKGovernmentBEIS/dvs-39-save-as-draft-fu…
AiswaryaBEIS Nov 26, 2024
b1cbc74
feat(consent): add content to consent error pages
qumberhussain Nov 27, 2024
23d605d
Merge pull request #308 from UKGovernmentBEIS/dvs-94-consent-journey-…
AiswaryaBEIS Nov 27, 2024
51c1ed7
feat(email-notification) : send confirmation to dsit when provider co…
AiswaryaEY Nov 29, 2024
22b6c31
Merge pull request #311 from UKGovernmentBEIS/dvs-125-send-confirmati…
AiswaryaBEIS Nov 29, 2024
feb1154
feat(register) add supplementary schemes to provider details page
JoeGLauria Nov 27, 2024
f608d16
fix(register): add "Not certified against GPG45" string for when ther…
KobithasanVasantharajah Dec 2, 2024
bcd9c37
Merge pull request #312 from UKGovernmentBEIS/dvs-155-pfr-gpg45-missing
AiswaryaBEIS Dec 2, 2024
df8e2c5
Merge pull request #309 from UKGovernmentBEIS/dvs-143-pfr-supplementa…
AiswaryaBEIS Dec 2, 2024
b24f927
fix(register): add "Not certified against GPG44" string for when ther…
KobithasanVasantharajah Nov 28, 2024
4cff48d
Merge pull request #310 from UKGovernmentBEIS/dvs-144-pfr-gpg44-value
AiswaryaBEIS Dec 3, 2024
930869f
fix(register): add "Not certified against GPG45" string for when ther…
KobithasanVasantharajah Dec 4, 2024
c8287f9
Merge pull request #313 from UKGovernmentBEIS/dvs-155-pfr-gpg45-missing
KobithasanVasantharajah Dec 4, 2024
324e99b
fix(pen-test): csp nonce inplementation
AiswaryaEY Dec 4, 2024
21fab7a
fix(code-clean): remove unused file _ValidationScriptsPartial
AiswaryaEY Dec 4, 2024
d82b07c
Merge pull request #314 from UKGovernmentBEIS/dvs-79-add-noncehash-to…
AiswaryaBEIS Dec 4, 2024
f64512d
fix(register): spacing of register entries
qumberhussain Dec 5, 2024
5e8d68c
fix(cab-service): remove link to file name in summary
qumberhussain Dec 5, 2024
f2316e7
fix(login): width of login input field and put back aria attribute
qumberhussain Dec 5, 2024
a352086
fix(code-clean) : remove unusused code and script
AiswaryaEY Dec 5, 2024
312610e
fix(cab-provider) : change the accepted character string
JoeGLauria Dec 4, 2024
c3f0622
feat(testing): add unit test to project
JoeGLauria Dec 5, 2024
95fac3d
fix(cab): add validation for parent company location
JoeGLauria Dec 5, 2024
20e57a8
fix(register): services typo
qumberhussain Dec 6, 2024
3324116
Merge pull request #317 from UKGovernmentBEIS/dvs-204-parent-company-…
AiswaryaBEIS Dec 6, 2024
827dc2e
Merge pull request #316 from UKGovernmentBEIS/dvs-128-cannot-add-apos…
AiswaryaBEIS Dec 6, 2024
6292890
Merge pull request #318 from UKGovernmentBEIS/dvs-165-missing-spaces-…
AiswaryaBEIS Dec 6, 2024
846642a
fix(cab) : add spaces to the validation strings and unit tests
JoeGLauria Dec 6, 2024
d0b90ed
Merge pull request #320 from UKGovernmentBEIS/dvs-128-cannot-add-apos…
JoeGLauria Dec 6, 2024
b2cc711
Merge pull request #315 from UKGovernmentBEIS/dvs-79-add-noncehash-to…
AiswaryaBEIS Dec 6, 2024
485173c
fix(register) : add string 'no public telephone number' when not present
JoeGLauria Dec 6, 2024
87c1cf1
Merge pull request #321 from UKGovernmentBEIS/dvs-218-public-telephon…
AiswaryaBEIS Dec 6, 2024
91e596a
feat(provider): add validation to ensure primary contact email is not…
KobithasanVasantharajah Dec 5, 2024
527ca38
feat(provider): add validation to ensure primary contact email is not…
KobithasanVasantharajah Dec 6, 2024
b07b6f9
Merge pull request #319 from UKGovernmentBEIS/dvs-142-implement-valid…
AiswaryaBEIS Dec 9, 2024
8d84698
feat(extensions): add new date format method so that when its 12pm mi…
KobithasanVasantharajah Dec 10, 2024
2709f74
feat(cab): change date format to midday when 12pm and midnight when 12am
KobithasanVasantharajah Dec 10, 2024
39f585f
feat(register): change date format to midday when 12pm and midnight w…
KobithasanVasantharajah Dec 10, 2024
b72189d
Merge pull request #322 from UKGovernmentBEIS/dvs-212-time-format
JoeGLauria Dec 12, 2024
09ef691
fix(register) : add sentence for when no identity profile is selected
JoeGLauria Dec 11, 2024
b508934
Merge pull request #323 from UKGovernmentBEIS/dvs-287-add-sentence-if…
KobithasanVasantharajah Dec 12, 2024
4fd89d3
fix(register) : move service name above company adress
JoeGLauria Dec 12, 2024
3deb7e0
fix(register) : remove identity profiles duplicate of gpg45
JoeGLauria Dec 12, 2024
200f15f
fix(register): add date of issue for service
JoeGLauria Dec 12, 2024
15fa33a
Merge branch 'develop' into dvs-289-correct-the-provider-details-page
JoeGLauria Dec 12, 2024
7810c4f
Merge pull request #324 from UKGovernmentBEIS/dvs-289-correct-the-pro…
AiswaryaBEIS Dec 16, 2024
67c8ca3
fix(search) : fix for search using trigram
AiswaryaEY Dec 16, 2024
f4fb00b
fix(db-changes) : remove search vector column
AiswaryaEY Dec 16, 2024
4273bb2
Merge pull request #325 from UKGovernmentBEIS/dvs-216-issue-with-sear…
AiswaryaBEIS Dec 16, 2024
b6ed41e
fix(register) : correct the provider details page to match the figma
JoeGLauria Dec 16, 2024
caa0ee2
Merge pull request #326 from UKGovernmentBEIS/dvs-289-correct-the-pro…
AiswaryaBEIS Dec 16, 2024
ba7e844
fix(search): increase threshold for comparison
AiswaryaEY Dec 17, 2024
d016e6b
fix(register) : update secondary contact validation to work in edit flow
KobithasanVasantharajah Dec 17, 2024
a352d06
Merge pull request #328 from UKGovernmentBEIS/dvs-299-duplicate-secon…
KobithasanVasantharajah Dec 17, 2024
4bea87e
Merge pull request #327 from UKGovernmentBEIS/dvs-216-issue-with-sear…
AiswaryaBEIS Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion DVSRegister.BusinessLogic/Services/Consent/ConsentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ public async Task<bool> RemoveProceedApplicationConsentToken(string token, strin
return null ;
}
}
public async Task<GenericResponse> UpdateServiceStatus(int serviceId, string providerEmail)
public async Task<GenericResponse> UpdateServiceStatus(int serviceId, string providerEmail, string companyName, string serviceName)
{
GenericResponse genericResponse = await consentRepository.UpdateServiceStatus(serviceId, ServiceStatusEnum.Received, providerEmail);
if(genericResponse.Success)
{
await emailSender.SendAgreementToProceedApplicationToDSIT(companyName, serviceName);
}
return genericResponse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IConsentService
//opening loop
public Task<bool> RemoveConsentToken(string token, string tokenId, string loggedInUserEmail);
public Task<ServiceDto?> GetProviderAndCertificateDetailsByToken(string token, string tokenId);
public Task<GenericResponse> UpdateServiceStatus(int serviceId, string providerEmail);
public Task<GenericResponse> UpdateServiceStatus(int serviceId, string providerEmail, string companyName, string serviceName);


//closing loop
Expand Down
21 changes: 21 additions & 0 deletions DVSRegister.CommonUtility/Email/GovUkNotifyApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,27 @@ public async Task<bool> SendCertificateInfoSubmittedToDSIT()
return await SendEmail(emailModel);
}


#region openong the loop
public async Task<bool> SendAgreementToProceedApplicationToDSIT(string companyName, string serviceName)
{
var template = govUkNotifyConfig.AgreementToProceedApplicationToDSIT;

var personalisation = new Dictionary<string, dynamic>
{
{ template.CompanyName, companyName},
{ template.ServiceName, serviceName}
};
var emailModel = new GovUkNotifyEmailModel
{
EmailAddress = govUkNotifyConfig.OfDiaEmailId,
TemplateId = template.Id,
Personalisation = personalisation
};
return await SendEmail(emailModel);
}
#endregion

#region closing the loop
public async Task<bool> SendAgreementToPublishToDIP(string companyName, string serviceName, string recipientName, string emailAddress)
{
Expand Down
3 changes: 3 additions & 0 deletions DVSRegister.CommonUtility/Email/IEmailSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public interface IEmailSender
public Task<bool> SendEmailCabInformationSubmitted(string emailAddress, string recipientName);
public Task<bool> SendCertificateInfoSubmittedToDSIT();

//opening the loop
public Task<bool> SendAgreementToProceedApplicationToDSIT(string companyName, string serviceName);

//closing the loop
public Task<bool> SendAgreementToPublishToDSIT(string companyName, string serviceName);
public Task<bool> SendAgreementToPublishToDIP(string companyName, string serviceName, string recipientName, string emailAddress);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace DVSRegister.CommonUtility.Models
{
public class AgreementToProceedApplicationToDSIT
{
public string Id { get; set; }
public string CompanyName { get; set; }
public string ServiceName { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public class GovUkNotifyConfiguration

public AgreementToPublishTemplate AgreementToPublishTemplate { get; set; }
public AgreementToPublishToDSITTemplate AgreementToPublishToDSITTemplate { get; set; }
public AgreementToProceedApplicationToDSIT AgreementToProceedApplicationToDSIT { get; set; }
}
}
9 changes: 4 additions & 5 deletions DVSRegister.Data/CAB/CabRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ public async Task<List<ProviderProfile>> GetProviders(int cabId, string searchTe
.OrderBy(p => p.ModifiedTime != null ? p.ModifiedTime : p.CreatedTime);
if (!string.IsNullOrEmpty(searchText))
{
searchText = searchText.Trim().ToLower();
providerQuery = providerQuery.Where(p => p.SearchVector.Matches(searchText) ||
p.Services.Any(s => s.SearchVector.Matches(searchText)));
}
searchText = searchText.Trim().ToLower();
providerQuery = providerQuery.Where(p => p.Services.Any(s => EF.Functions.TrigramsSimilarity(s.ServiceName.ToLower(), searchText.ToLower()) > .1));
}
var searchResults = await providerQuery.ToListAsync();
return searchResults;
}
}

public async Task<ProviderProfile> GetProvider(int providerId,int cabId)
{
Expand Down
9 changes: 0 additions & 9 deletions DVSRegister.Data/DVSRegisterDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity<TrustmarkNumber>()
.ToTable(b => b.HasCheckConstraint("CK_ServiceNumber", "\"ServiceNumber\" BETWEEN 1 AND 99"));

modelBuilder.Entity<ProviderProfile>()
.HasGeneratedTsVectorColumn(p => p.SearchVector, "english", p => new { p.RegisteredName, p.TradingName })
.HasIndex(p => p.SearchVector)
.HasMethod("GIN");

modelBuilder.Entity<Service>()
.HasGeneratedTsVectorColumn(p => p.SearchVector, "english", p => new { p.ServiceName })
.HasIndex(p => p.SearchVector)
.HasMethod("GIN");

modelBuilder.Entity<QualityLevel>().HasData(
new QualityLevel { Id =1, Level = "Low", QualityType = QualityTypeEnum.Authentication },
Expand Down
30 changes: 15 additions & 15 deletions DVSRegister.Data/Entities/CertificateReview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ public CertificateReview() { }
public int ProviProviderProfileId { get; set; }
public ProviderProfile ProviderProfile { get; set; }

public bool IsCabLogoCorrect { get; set; }
public bool IsCabDetailsCorrect { get; set; }
public bool IsProviderDetailsCorrect { get; set; }
public bool IsServiceNameCorrect { get; set; }
public bool IsRolesCertifiedCorrect { get; set; }
public bool IsCertificationScopeCorrect { get; set; }
public bool IsServiceSummaryCorrect { get; set; }
public bool IsURLLinkToServiceCorrect { get; set; }
public bool IsGPG44Correct { get; set; }
public bool IsGPG45Correct { get; set; }
public bool IsServiceProvisionCorrect { get; set; }
public bool IsLocationCorrect { get; set; }
public bool IsDateOfIssueCorrect { get; set; }
public bool IsDateOfExpiryCorrect { get; set; }
public bool IsAuthenticyVerifiedCorrect { get; set; }
public bool? IsCabLogoCorrect { get; set; }
public bool? IsCabDetailsCorrect { get; set; }
public bool? IsProviderDetailsCorrect { get; set; }
public bool? IsServiceNameCorrect { get; set; }
public bool? IsRolesCertifiedCorrect { get; set; }
public bool? IsCertificationScopeCorrect { get; set; }
public bool? IsServiceSummaryCorrect { get; set; }
public bool? IsURLLinkToServiceCorrect { get; set; }
public bool? IsGPG44Correct { get; set; }
public bool? IsGPG45Correct { get; set; }
public bool? IsServiceProvisionCorrect { get; set; }
public bool? IsLocationCorrect { get; set; }
public bool? IsDateOfIssueCorrect { get; set; }
public bool? IsDateOfExpiryCorrect { get; set; }
public bool? IsAuthenticyVerifiedCorrect { get; set; }
public string? Comments { get; set; }
public bool? InformationMatched { get; set; }
public string CommentsForIncorrect { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions DVSRegister.Data/Entities/ProviderProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public class ProviderProfile
public int CabUserId { get; set; }
public CabUser CabUser { get; set; }
public ProviderStatusEnum ProviderStatus { get; set; }
public ICollection<Service>? Services { get; set; }
public NpgsqlTsVector SearchVector { get; set; }
public ICollection<Service>? Services { get; set; }
public DateTime? CreatedTime { get; set; }
public DateTime? ModifiedTime { get; set; }
public DateTime? PublishedTime { get; set; }
Expand Down
20 changes: 10 additions & 10 deletions DVSRegister.Data/Entities/PublicInterestCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ public PublicInterestCheck() { }
[ForeignKey("ProviderProfile")]
public int ProviderProfileId { get; set; }
public ProviderProfile Provider { get; set; }
public bool IsCompanyHouseNumberApproved { get; set; }
public bool IsDirectorshipsApproved { get; set; }
public bool IsDirectorshipsAndRelationApproved { get; set; }
public bool IsTradingAddressApproved { get; set; }
public bool IsSanctionListApproved { get; set; }
public bool IsUNFCApproved { get; set; }
public bool IsECCheckApproved { get; set; }
public bool IsTARICApproved { get; set; }
public bool IsBannedPoliticalApproved { get; set; }
public bool IsProvidersWebpageApproved { get; set; }
public bool? IsCompanyHouseNumberApproved { get; set; }
public bool? IsDirectorshipsApproved { get; set; }
public bool? IsDirectorshipsAndRelationApproved { get; set; }
public bool? IsTradingAddressApproved { get; set; }
public bool? IsSanctionListApproved { get; set; }
public bool? IsUNFCApproved { get; set; }
public bool? IsECCheckApproved { get; set; }
public bool? IsTARICApproved { get; set; }
public bool? IsBannedPoliticalApproved { get; set; }
public bool? IsProvidersWebpageApproved { get; set; }
public PublicInterestCheckEnum PublicInterestCheckStatus { get; set; }
public RejectionReasonEnum? RejectionReason { get; set; }
public string? RejectionReasons { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions DVSRegister.Data/Entities/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public Service() { }
public CabUser CabUser { get; set; }
public int ServiceNumber { get;set; }

public ServiceStatusEnum ServiceStatus { get; set; }
public NpgsqlTsVector SearchVector { get; set; }
public ServiceStatusEnum ServiceStatus { get; set; }
public DateTime? CreatedTime { get; set; }
public DateTime? ModifiedTime { get; set; }
public DateTime? PublishedTime { get; set; }
Expand Down
Loading
Loading