Skip to content

Commit c13d529

Browse files
committed
quick touchups for removing test code and unused imports
1 parent 9be423a commit c13d529

File tree

2 files changed

+35
-29
lines changed

2 files changed

+35
-29
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ import * as Rules from "@/utils/formRules";
153153
import { removeElementByIndex, replaceElementByIndex } from "@/utils/functions";
154154
155155
import ECEHeader from "../ECEHeader.vue";
156-
import FileUploader from "../FileUploader.vue";
157156
import EceIcraWorkExperienceEligibilityCard from "../EceIcraWorkExperienceEligibilityCard.vue";
158157
import ProgressBar from "../ProgressBar.vue";
159158
import { useIcraStore } from "@/store/icra";
@@ -167,7 +166,7 @@ interface IcraWorkExperienceEligibilityData extends Components.Schemas.WorkExper
167166
168167
export default defineComponent({
169168
name: "EceIcraWorkExperienceEligibility",
170-
components: { ProgressBar, FileUploader, EceIcraWorkExperienceEligibilityCard, EceDateInput, EceTextField, Callout, ECEHeader },
169+
components: { ProgressBar, EceIcraWorkExperienceEligibilityCard, EceDateInput, EceTextField, Callout, ECEHeader },
171170
props: {
172171
modelValue: {
173172
type: Object as () => Components.Schemas.WorkExperienceReference[],

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

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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"
@@ -142,17 +143,25 @@
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"
@@ -176,9 +185,9 @@
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

@@ -229,22 +238,6 @@
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
@@ -259,6 +252,20 @@
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
316323
interface 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
324331
export 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

Comments
 (0)