Skip to content

Commit 23fe1da

Browse files
committed
adding certificateHasOtherNameFlag
1 parent 5c8c562 commit 23fe1da

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

src/ECER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/ICRA/ICRAEligibilitiesEndpoints.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public record InternationalCertification
8585
public string? OtherFirstName { get; set; }
8686
public string? OtherMiddleName { get; set; }
8787
public string? OtherLastName { get; set; }
88+
public bool? CertificateHasOtherName { get; set; }
8889
public string? CountryId { get; set; }
8990
public string? NameOfRegulatoryAuthority { get; set; }
9091
public string? EmailOfRegulatoryAuthority { get; set; }

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceInternationalCertification.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
<v-col md="8" lg="6" xl="4">
8080
<p>What is your certification status?</p>
8181
<v-radio-group id="certificateStatusRadio" v-model="certificateStatus" :rules="[Rules.requiredRadio('Select the status of your certification')]">
82-
<v-radio label="Valid" :value="'valid'"></v-radio>
83-
<v-radio label="Expired" :value="'expired'"></v-radio>
82+
<v-radio label="Valid" :value="'Valid'"></v-radio>
83+
<v-radio label="Expired" :value="'Expired'"></v-radio>
8484
</v-radio-group>
8585
</v-col>
8686
</v-row>
@@ -377,7 +377,7 @@ export default defineComponent({
377377
otherFirstName: "",
378378
otherMiddleName: "",
379379
otherLastName: "",
380-
// isNameUnverified: false, TODO needs name verification
380+
certificateHasOtherName: false,
381381
//other data
382382
383383
internationalCertificationFormMode: undefined,
@@ -483,10 +483,10 @@ export default defineComponent({
483483
this.otherFirstName = internationalCertification.otherFirstName;
484484
this.otherMiddleName = internationalCertification.otherMiddleName;
485485
this.otherLastName = internationalCertification.otherLastName;
486-
this.isNameUnverified = internationalCertification.isNameUnverified;
486+
this.certificateHasOtherName = internationalCertification.certificateHasOtherName;
487487
488488
//set the radio button for previous names and field buttons correctly
489-
if (internationalCertification.isNameUnverified) {
489+
if (internationalCertification.certificateHasOtherName) {
490490
let index = this.applicantNameRadioOptions.findIndex((option) => option.value === "other");
491491
this.previousNameRadio = this.applicantNameRadioOptions[index]?.value;
492492
} else {
@@ -530,7 +530,7 @@ export default defineComponent({
530530
otherFirstName: this.otherFirstName,
531531
otherMiddleName: this.otherMiddleName,
532532
otherLastName: this.otherLastName,
533-
isNameUnverified: this.isNameUnverified,
533+
certificateHasOtherName: this.certificateHasOtherName,
534534
};
535535
let updatedModelValue = this.modelValue?.slice() || []; //create a copy of the array
536536
@@ -614,7 +614,7 @@ export default defineComponent({
614614
this.otherFirstName = "";
615615
this.otherMiddleName = "";
616616
this.otherLastName = "";
617-
this.isNameUnverified = false;
617+
this.certificateHasOtherName = false;
618618
//selection
619619
620620
this.internationalCertificationFormMode = undefined;
@@ -630,12 +630,12 @@ export default defineComponent({
630630
this.otherFirstName = "";
631631
this.otherMiddleName = "";
632632
this.otherLastName = "";
633-
this.isNameUnverified = true;
633+
this.certificateHasOtherName = true;
634634
} else {
635635
this.otherFirstName = option.firstName;
636636
this.otherMiddleName = option.middleName;
637637
this.otherLastName = option.lastName;
638-
this.isNameUnverified = false;
638+
this.certificateHasOtherName = false;
639639
}
640640
},
641641
},

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/types/openapi.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ declare namespace Components {
339339
otherFirstName?: string | null;
340340
otherMiddleName?: string | null;
341341
otherLastName?: string | null;
342+
certificateHasOtherName?: boolean | null;
342343
countryId?: string | null;
343344
nameOfRegulatoryAuthority?: string | null;
344345
emailOfRegulatoryAuthority?: string | null;

src/ECER.Managers.Registry.Contract/ICRA/Contract.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public record InternationalCertification
3030
public string? OtherFirstName { get; set; }
3131
public string? OtherMiddleName { get; set; }
3232
public string? OtherLastName { get; set; }
33+
public bool? CertificateHasOtherName { get; set; }
3334
public string? CountryId { get; set; }
3435
public string? NameOfRegulatoryAuthority { get; set; }
3536
public string? EmailOfRegulatoryAuthority { get; set; }
@@ -62,4 +63,3 @@ public enum ICRAStatus
6263
ReadyforReview,
6364
Submitted
6465
}
65-

src/ECER.Resources.Documents/ICRA/ICRARepositoryMapper.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public ICRARepositoryMapper()
2222
.ForMember(d => d.InternationalCertifications, opts => opts.MapFrom(s => s.ecer_internationalcertification_EligibilityAssessment_ecer_icraeligibilityassessment))
2323
.ForMember(d => d.CreatedOn, opts => opts.MapFrom(s => s.CreatedOn));
2424

25-
2625
CreateMap<InternationalCertification, ecer_InternationalCertification>(MemberList.Source)
2726
.ForSourceMember(s => s.NewFiles, opts => opts.DoNotValidate())
2827
.ForSourceMember(s => s.DeletedFiles, opts => opts.DoNotValidate())
@@ -31,6 +30,7 @@ public ICRARepositoryMapper()
3130
.ForMember(d => d.ecer_OtherFirstName, opts => opts.MapFrom(s => s.OtherFirstName))
3231
.ForMember(d => d.ecer_OtherMiddleName, opts => opts.MapFrom(s => s.OtherMiddleName))
3332
.ForMember(d => d.ecer_OtherLastName, opts => opts.MapFrom(s => s.OtherLastName))
33+
.ForMember(d => d.ecer_CertificateHasOtherName, opts => opts.MapFrom(s => s.CertificateHasOtherName))
3434
.ForMember(d => d.ecer_AuthorityName, opts => opts.MapFrom(s => s.NameOfRegulatoryAuthority))
3535
.ForMember(d => d.ecer_AuthorityEmail, opts => opts.MapFrom(s => s.EmailOfRegulatoryAuthority))
3636
.ForMember(d => d.ecer_AuthorityPhone, opts => opts.MapFrom(s => s.PhoneOfRegulatoryAuthority))
@@ -46,6 +46,7 @@ public ICRARepositoryMapper()
4646
.ForMember(d => d.OtherFirstName, opts => opts.MapFrom(s => s.ecer_OtherFirstName))
4747
.ForMember(d => d.OtherMiddleName, opts => opts.MapFrom(s => s.ecer_OtherMiddleName))
4848
.ForMember(d => d.OtherLastName, opts => opts.MapFrom(s => s.ecer_OtherLastName))
49+
.ForMember(d => d.CertificateHasOtherName, opts => opts.MapFrom(s => s.ecer_CertificateHasOtherName))
4950
.ForMember(d => d.CountryId, opts => opts.MapFrom(s => s.ecer_Country != null ? s.ecer_Country.Id.ToString() : null))
5051
.ForMember(d => d.NameOfRegulatoryAuthority, opts => opts.MapFrom(s => s.ecer_AuthorityName))
5152
.ForMember(d => d.EmailOfRegulatoryAuthority, opts => opts.MapFrom(s => s.ecer_AuthorityEmail))
@@ -67,6 +68,6 @@ public ICRARepositoryMapper()
6768

6869
public static string IdOrEmpty(EntityReference? reference) =>
6970
reference != null && reference.Id != Guid.Empty
70-
? reference.Id.ToString()
71-
: string.Empty;
71+
? reference.Id.ToString()
72+
: string.Empty;
7273
}

src/ECER.Resources.Documents/ICRA/IICRARepository.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public record InternationalCertification
3030
public string? OtherFirstName { get; set; }
3131
public string? OtherMiddleName { get; set; }
3232
public string? OtherLastName { get; set; }
33+
public bool? CertificateHasOtherName { get; set; }
3334
public string? CountryId { get; set; }
3435
public string? NameOfRegulatoryAuthority { get; set; }
3536
public string? EmailOfRegulatoryAuthority { get; set; }
@@ -50,6 +51,7 @@ public enum CertificateStatus
5051
Valid,
5152
Expired
5253
}
54+
5355
public enum ICRAStatus
5456
{
5557
Active,

0 commit comments

Comments
 (0)