Skip to content

Commit

Permalink
Merge pull request #551 from bcgov/fix/ecer-3251
Browse files Browse the repository at this point in the history
ecer-3251 ecer-3252
  • Loading branch information
farzadnadiri authored Oct 9, 2024
2 parents 5701c1c + 02e306a commit c7410b1
Show file tree
Hide file tree
Showing 28 changed files with 2,152 additions and 88 deletions.
26 changes: 13 additions & 13 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@
<PackageVersion Include="Bogus" Version="35.6.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.301" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.403.6" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.404.4" />
<PackageVersion Include="HtmlSanitizer" Version="8.1.870" />
<PackageVersion Include="IdentityModel" Version="7.0.0" />
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.4.0" />
<PackageVersion Include="MediatR" Version="12.4.1" />
<PackageVersion Include="MediatR.Contracts" Version="2.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.OutputCaching.StackExchangeRedis" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.OutputCaching.StackExchangeRedis" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.8" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.IdentityModel.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.0" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.1.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.IdentityModel.Abstractions" Version="8.1.2" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.2" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.1.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.1.32" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client.Dynamics" Version="1.1.32" />
Expand All @@ -56,4 +56,4 @@
<PackageVersion Include="xunit.categories" Version="2.0.8" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ public record PreviousName([Required] string FirstName, [Required] string LastNa

public enum PreviousNameStage
{
Unverified,
Archived,
PendingforDocuments,
ReadyforVerification,
Unverified,
Verified,
Archived,
}

public enum PreviousNameSources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@
:go-to="() => $router.push({ name: 'profile' })"
:active="false"
/>
<ApplicationSummaryActionListItem
v-for="(previousName, index) in userStore.pendingforDocumentsPreviousNames"
:key="index"
:text="`Proof of previous name ${previousName.firstName} ${previousName.lastName}`"
:go-to="() => $router.push({ name: 'profile' })"
:active="false"
/>
<ApplicationSummaryActionListItem
v-if="showWorkExperience"
:active="totalObservedWorkExperienceHours < totalRequiredWorkExperienceHours"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const useUserStore = defineStore("user", {
return state.userProfile?.previousNames?.filter((name) => name.status === "ReadyforVerification") ?? [];
},
verifiedPreviousNames: (state): Components.Schemas.PreviousName[] => {
return state.userProfile?.previousNames?.filter((name) => name.status === "Verified" && name.source !== "NameLog") ?? [];
return state.userProfile?.previousNames?.filter((name) => name.status === "Verified") ?? [];
},
pendingforDocumentsPreviousNames: (state): Components.Schemas.PreviousName[] => {
return state.userProfile?.previousNames?.filter((name) => name.status === "PendingforDocuments") ?? [];
},
firstName: (state): string => state.userInfo?.firstName ?? "",
middleName: (state): string => state.userInfo?.middleName ?? "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ declare namespace Components {
documents?: IdentityDocument[] | null;
}
export type PreviousNameSources = "NameLog" | "Profile" | "Transcript" | "OutofProvinceCertificate";
export type PreviousNameStage = "Unverified" | "ReadyforVerification" | "Verified" | "Archived";
export type PreviousNameStage = "Archived" | "PendingforDocuments" | "ReadyforVerification" | "Unverified" | "Verified";
export interface ProblemDetails {
[name: string]: any;
type?: string | null;
Expand Down
5 changes: 3 additions & 2 deletions src/ECER.Managers.Registry.Contract/Registrants/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ public record PreviousName(string FirstName, string LastName)

public enum PreviousNameStage
{
Unverified,
Archived,
PendingforDocuments,
ReadyforVerification,
Unverified,
Verified,
Archived,
}

public enum PreviousNameSources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ public record PreviousName(string FirstName, string LastName)

public enum PreviousNameStage
{
Unverified,
Archived,
PendingforDocuments,
ReadyforVerification,
Unverified,
Verified,
Archived,
}

public enum PreviousNameSources
Expand All @@ -82,7 +83,6 @@ public enum PreviousNameSources
Profile,
Transcript,
OutofProvinceCertificate

}

public record IdentityDocument(string Id)
Expand Down
12 changes: 12 additions & 0 deletions src/ECER.Resources.Accounts/Registrants/RegistrantRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ join authentication in context.ecer_AuthenticationSet on contact.ContactId equal
.Include(a => a.ecer_previousname_Contactid)
.Execute();

// Filter out previous names where the Source is "Name Log"
foreach (var contact in results)
{
if (contact.ecer_previousname_Contactid != null && contact.ecer_previousname_Contactid.Any())
{
var previousNames = contact.ecer_previousname_Contactid
.Where(pn => pn.ecer_Source != ecer_PreviousNameSources.NameLog)
.ToList();
contact.ecer_previousname_Contactid = previousNames.Count != 0 ? previousNames : null;
}
}

return mapper.Map<IEnumerable<Registrant>>(results)!.ToList();
}

Expand Down
11 changes: 11 additions & 0 deletions src/ECER.Utilities.DataverseSdk/Model/EcerContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,17 @@ public System.Linq.IQueryable<ECER.Utilities.DataverseSdk.Model.ecer_health_auth
}
}

/// <summary>
/// Gets a binding to the set of all <see cref="ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision"/> entities.
/// </summary>
public System.Linq.IQueryable<ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision> ecer_HistoricalDecisionSet
{
get
{
return this.CreateQuery<ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision>();
}
}

/// <summary>
/// Gets a binding to the set of all <see cref="ECER.Utilities.DataverseSdk.Model.ecer_Investigation"/> entities.
/// </summary>
Expand Down
85 changes: 83 additions & 2 deletions src/ECER.Utilities.DataverseSdk/Model/Entities/Contact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,19 @@ public enum Contact_StatusCode
{

[System.Runtime.Serialization.EnumMemberAttribute()]
Active = 1,
Inactive = 2,

[System.Runtime.Serialization.EnumMemberAttribute()]
Inactive = 2,
PendingforDocuments = 621870003,

[System.Runtime.Serialization.EnumMemberAttribute()]
ReadyforVerification = 621870001,

[System.Runtime.Serialization.EnumMemberAttribute()]
Unverified = 1,

[System.Runtime.Serialization.EnumMemberAttribute()]
Verified = 621870002,
}

/// <summary>
Expand Down Expand Up @@ -662,6 +671,8 @@ public partial class Fields
public const string ecer_ClientID = "ecer_clientid";
public const string ecer_comment_Contact_contact = "ecer_comment_Contact_contact";
public const string ecer_completedcourse_Applicantid = "ecer_completedcourse_Applicantid";
public const string ecer_Contact_Contact_ecer_health_authorities = "ecer_Contact_Contact_ecer_health_authorities";
public const string ecer_Contact_Contact_ecer_licensing_officers = "ecer_Contact_Contact_ecer_licensing_officers";
public const string ecer_contact_ecer_authentication_455 = "ecer_contact_ecer_authentication_455";
public const string ecer_contact_ecer_communication_122 = "ecer_contact_ecer_communication_122";
public const string ecer_contact_ecer_investigation_Applicant = "ecer_contact_ecer_investigation_Applicant";
Expand All @@ -683,6 +694,8 @@ public partial class Fields
public const string ecer_hascertificatesuspendedName = "ecer_hascertificatesuspendedname";
public const string ecer_HasCurrentCertificateConditions = "ecer_hascurrentcertificateconditions";
public const string ecer_hascurrentcertificateconditionsName = "ecer_hascurrentcertificateconditionsname";
public const string ecer_HasProvidedID = "ecer_hasprovidedid";
public const string ecer_hasprovidedidName = "ecer_hasprovidedidname";
public const string ecer_IsBCECE = "ecer_isbcece";
public const string ecer_isbceceName = "ecer_isbcecename";
public const string ecer_IsUnder19 = "ecer_isunder19";
Expand Down Expand Up @@ -4216,6 +4229,38 @@ public string ecer_hascurrentcertificateconditionsName
}
}

[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ecer_hasprovidedid")]
public System.Nullable<bool> ecer_HasProvidedID
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<bool>>("ecer_hasprovidedid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.SetAttributeValue("ecer_hasprovidedid", value);
}
}

[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ecer_hasprovidedidname")]
public string ecer_hasprovidedidName
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
if (this.FormattedValues.Contains("ecer_hasprovidedid"))
{
return this.FormattedValues["ecer_hasprovidedid"];
}
else
{
return default(string);
}
}
}

/// <summary>
/// is BC ECE Registrant. Use to show hide other tabs
/// </summary>
Expand Down Expand Up @@ -7372,6 +7417,42 @@ public System.Collections.Generic.IEnumerable<ECER.Utilities.DataverseSdk.Model.
}
}

/// <summary>
/// 1:N ecer_Contact_Contact_ecer_health_authorities
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("ecer_Contact_Contact_ecer_health_authorities")]
public System.Collections.Generic.IEnumerable<ECER.Utilities.DataverseSdk.Model.ecer_health_authorities> ecer_Contact_Contact_ecer_health_authorities
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_health_authorities>("ecer_Contact_Contact_ecer_health_authorities", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.SetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_health_authorities>("ecer_Contact_Contact_ecer_health_authorities", null, value);
}
}

/// <summary>
/// 1:N ecer_Contact_Contact_ecer_licensing_officers
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("ecer_Contact_Contact_ecer_licensing_officers")]
public System.Collections.Generic.IEnumerable<ECER.Utilities.DataverseSdk.Model.ecer_licensing_officers> ecer_Contact_Contact_ecer_licensing_officers
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_licensing_officers>("ecer_Contact_Contact_ecer_licensing_officers", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.SetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_licensing_officers>("ecer_Contact_Contact_ecer_licensing_officers", null, value);
}
}

/// <summary>
/// 1:N ecer_contact_ecer_authentication_455
/// </summary>
Expand Down
19 changes: 19 additions & 0 deletions src/ECER.Utilities.DataverseSdk/Model/Entities/ECER_Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public partial class Fields
public const string ecer_hasprovided400hoursworkexperienceName = "ecer_hasprovided400hoursworkexperiencename";
public const string ecer_HasProvided500HoursWorkExperience = "ecer_hasprovided500hoursworkexperience";
public const string ecer_hasprovided500hoursworkexperienceName = "ecer_hasprovided500hoursworkexperiencename";
public const string ecer_historicaldecision_ApplicationId = "ecer_historicaldecision_ApplicationId";
public const string ecer_investigationparallelprocesscommunication = "ecer_investigationparallelprocesscommunication";
public const string ecer_IsCharacterReferenceProvided = "ecer_ischaracterreferenceprovided";
public const string ecer_ischaracterreferenceprovidedName = "ecer_ischaracterreferenceprovidedname";
Expand Down Expand Up @@ -4099,6 +4100,24 @@ public System.Collections.Generic.IEnumerable<ECER.Utilities.DataverseSdk.Model.
}
}

/// <summary>
/// 1:N ecer_historicaldecision_ApplicationId
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("ecer_historicaldecision_ApplicationId")]
public System.Collections.Generic.IEnumerable<ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision> ecer_historicaldecision_ApplicationId
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision>("ecer_historicaldecision_ApplicationId", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.SetRelatedEntities<ECER.Utilities.DataverseSdk.Model.ecer_HistoricalDecision>("ecer_historicaldecision_ApplicationId", null, value);
}
}

/// <summary>
/// 1:N ecer_investigationparallelprocesscommunication
/// </summary>
Expand Down
16 changes: 16 additions & 0 deletions src/ECER.Utilities.DataverseSdk/Model/Entities/ECER_Certificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public partial class Fields
public const string ecer_RegistrantidName = "ecer_registrantidname";
public const string ecer_RegistrantidYomiName = "ecer_registrantidyominame";
public const string ecer_renewalassessment_CurrentCertificateId = "ecer_renewalassessment_CurrentCertificateId";
public const string ecer_SuspendedDate = "ecer_suspendeddate";
public const string ImportSequenceNumber = "importsequencenumber";
public const string ModifiedBy = "modifiedby";
public const string ModifiedByName = "modifiedbyname";
Expand Down Expand Up @@ -743,6 +744,21 @@ public string ecer_RegistrantidYomiName
}
}

[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ecer_suspendeddate")]
public System.Nullable<System.DateTime> ecer_SuspendedDate
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("ecer_suspendeddate");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.SetAttributeValue("ecer_suspendeddate", value);
}
}

/// <summary>
/// Sequence number of the import that created this record.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ public string ecer_ReferenceContactidYomiName
}

/// <summary>
/// Printed Name of Reference
/// Reference Name as recipient. Last Name unless there is first name
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ecer_referencefullname")]
public string ecer_ReferenceFullName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public enum ecer_PreviousName_StatusCode
[System.Runtime.Serialization.EnumMemberAttribute()]
Archived = 2,

[System.Runtime.Serialization.EnumMemberAttribute()]
PendingforDocuments = 621870003,

[System.Runtime.Serialization.EnumMemberAttribute()]
ReadyforVerification = 621870001,

Expand Down
Loading

0 comments on commit c7410b1

Please sign in to comment.