99 <v-col md =" 8" lg =" 6" xl =" 4" >
1010 Country
1111 <v-select
12+ id =" certificateCountrySelect"
1213 class =" pt-2"
1314 :items =" configStore.countryList.filter((country) => country.isICRA === true)"
1415 variant =" outlined"
142143 <div v-if =" previousNameRadio === 'other'" >
143144 <v-row >
144145 <v-col md =" 8" lg =" 6" xl =" 4" >
145- <EceTextField v-model =" otherFirstName" label =" First name on transcript" variant =" outlined" color =" primary" maxlength =" 100" ></EceTextField >
146+ <EceTextField
147+ id =" txtOtherFirstName"
148+ v-model =" otherFirstName"
149+ label =" First name on transcript"
150+ variant =" outlined"
151+ color =" primary"
152+ maxlength =" 100"
153+ ></EceTextField >
146154 </v-col >
147155 </v-row >
148156 <v-row >
149157 <v-col md =" 8" lg =" 6" xl =" 4" >
150- <EceTextField v-model =" otherMiddleName" label =" Middle name(s) on transcript (optional)" maxlength =" 100" ></EceTextField >
158+ <EceTextField id = " txtOtherMiddleName " v-model =" otherMiddleName" label =" Middle name(s) on transcript (optional)" maxlength =" 100" ></EceTextField >
151159 </v-col >
152160 </v-row >
153161 <v-row >
154162 <v-col md =" 8" lg =" 6" xl =" 4" >
155163 <EceTextField
164+ id =" txtOtherLastName"
156165 v-model =" otherLastName"
157166 :rules =" [Rules.required('Enter your last name')]"
158167 label =" Last name on transcript"
176185 :delete-file-from-temp-when-removed =" false"
177186 @update:files =" handleFileUpdate"
178187 @delete:file =" handleFileDelete"
188+ :rules =" [Rules.atLeastOneOptionRequired('Upload a certificate or document that shows you completed the course or workshop')]"
179189 />
180190 </v-col >
181- <!-- :rules="[Rules.atLeastOneOptionRequired('Upload a certificate or document that shows you completed the course or workshop')]" -->
182191 </v-row >
183192 </v-form >
184193
229238 />
230239 </v-col >
231240 </v-row >
232- <!-- this prevents form from proceeding if rules are not met -->
233- <v-input
234- class =" mt-6"
235- :model-value =" modelValue"
236- :rules =" [
237- (v) =>
238- //if user has 4 certificates and they are all expired they cannot proceed
239- hasValidCertificate ||
240- v.length < MAX_NUM_CERTIFICATIONS ||
241- `You have entered the maximum number of certifications. You must replace one of your entries with a valid certificate to proceed.`,
242- (v) =>
243- (v && v.some((certificate: any) => certificate.certificateStatus === 'Valid')) ||
244- `You provided an expired certificate. To continue, you must also provide a valid certificate.`,
245- ]"
246- auto-hide =" auto"
247- ></v-input >
248241 <v-row v-if =" showAddInternationalCertificationButton" >
249242 <v-col sm =" 12" md =" 10" lg =" 8" xl =" 6" >
250243 <v-btn
259252 </v-btn >
260253 </v-col >
261254 </v-row >
255+ <!-- this prevents form from proceeding if rules are not met -->
256+ <v-input
257+ class =" mt-6"
258+ :model-value =" modelValue"
259+ :rules =" [
260+ (v) =>
261+ //if user has 4 certificates and they are all expired they cannot proceed
262+ hasValidCertificate ||
263+ v.length < MAX_NUM_CERTIFICATIONS ||
264+ `You have entered the maximum number of certifications. You must replace one of your entries with a valid certificate to proceed.`,
265+ (v) => hasValidCertificate || `You provided an expired certificate. To continue, you must also provide a valid certificate.`,
266+ ]"
267+ auto-hide =" auto"
268+ ></v-input >
262269 <!-- callouts and optional messages -->
263270 <v-row >
264271 <v-col >
@@ -315,10 +322,10 @@ interface RadioOptions {
315322
316323interface InternationalCertificationData {
317324 // name fields
318- previousNameRadio? : any ; // TODO not supposed to be optional
325+ previousNameRadio: any ;
319326 newFilesWithData? : FileItem [];
320327 // other fields
321- internationalCertificationFormMode? : " add" | " edit" | undefined ; // TODO not supposed to be optional
328+ internationalCertificationFormMode: " add" | " edit" | undefined ;
322329}
323330
324331export interface InternationalCertificationExtended extends Components .Schemas .InternationalCertification {
@@ -335,7 +342,7 @@ export default defineComponent({
335342 },
336343 },
337344 emits: {
338- " update:model-value" : (_internationalCertificationData : Components . Schemas . InternationalCertification []) => true , // TODO change type to InternationalCertificationExtended[]
345+ " update:model-value" : (_internationalCertificationData : InternationalCertificationExtended []) => true ,
339346 },
340347 setup : () => {
341348 const alertStore = useAlertStore ();
@@ -614,13 +621,13 @@ export default defineComponent({
614621 // international certification
615622 this .id = " " ;
616623 this .countryId = undefined ;
617- this .nameOfRegulatoryAuthority = " test " ;
618- this .emailOfRegulatoryAuthority = " [email protected] " ; 619- this .phoneOfRegulatoryAuthority = " 60464646846468 " ;
624+ this .nameOfRegulatoryAuthority = " " ;
625+ this .emailOfRegulatoryAuthority = " " ;
626+ this .phoneOfRegulatoryAuthority = " " ;
620627 this .websiteOfRegulatoryAuthority = " " ;
621628 this .onlineCertificateValidationToolOfRegulatoryAuthority = " " ;
622- this .certificateStatus = " Expired " ;
623- this .certificateTitle = " aweoigwaogi " ;
629+ this .certificateStatus = undefined ;
630+ this .certificateTitle = " " ;
624631 this .issueDate = " " ;
625632 this .expiryDate = " " ;
626633 this .files = [];
0 commit comments