fixes
Build And Push Image / docker (push) Successful in 3m33s Details

This commit is contained in:
Matt 2025-08-08 20:59:06 +02:00
parent cb73b239a8
commit 3951ce1d4e
1 changed files with 41 additions and 31 deletions

View File

@ -27,7 +27,8 @@
<v-row> <v-row>
<v-col cols="12" sm="6"> <v-col cols="12" sm="6">
<v-text-field <v-text-field
v-model="form.first_name" v-model="firstName"
:key="'first-name-field'"
name="firstName" name="firstName"
autocomplete="given-name" autocomplete="given-name"
label="First Name" label="First Name"
@ -36,12 +37,12 @@
variant="outlined" variant="outlined"
:disabled="loading" :disabled="loading"
required required
/> />
</v-col> </v-col>
<v-col cols="12" sm="6"> <v-col cols="12" sm="6">
<v-text-field <v-text-field
v-model="form.last_name" v-model="lastName"
:key="'last-name-field'"
name="lastName" name="lastName"
autocomplete="family-name" autocomplete="family-name"
label="Last Name" label="Last Name"
@ -49,13 +50,13 @@
variant="outlined" variant="outlined"
:disabled="loading" :disabled="loading"
required required
/> />
</v-col> </v-col>
</v-row> </v-row>
<v-text-field <v-text-field
v-model="form.email" v-model="email"
:key="'email-field'"
name="email" name="email"
autocomplete="email" autocomplete="email"
label="Email Address" label="Email Address"
@ -65,11 +66,11 @@
variant="outlined" variant="outlined"
:disabled="loading" :disabled="loading"
required required
/> />
<PhoneInputWrapper <PhoneInputWrapper
v-model="form.phone" v-model="phone"
:key="'phone-field'"
label="Phone Number" label="Phone Number"
:rules="phoneRules" :rules="phoneRules"
:disabled="loading" :disabled="loading"
@ -77,7 +78,8 @@
/> />
<v-text-field <v-text-field
v-model="form.date_of_birth" v-model="dateOfBirth"
:key="'dob-field'"
label="Date of Birth" label="Date of Birth"
type="date" type="date"
:rules="dobRules" :rules="dobRules"
@ -88,7 +90,8 @@
/> />
<v-textarea <v-textarea
v-model="form.address" v-model="address"
:key="'address-field'"
name="address" name="address"
autocomplete="street-address" autocomplete="street-address"
label="Address" label="Address"
@ -98,11 +101,11 @@
rows="3" rows="3"
:disabled="loading" :disabled="loading"
required required
/> />
<MultipleNationalityInput <MultipleNationalityInput
v-model="form.nationality" v-model="nationality"
:key="'nationality-field'"
label="Nationality" label="Nationality"
:rules="nationalityRules" :rules="nationalityRules"
:disabled="loading" :disabled="loading"
@ -242,16 +245,25 @@ useHead({
] ]
}); });
// Reactive data // Reactive data - Using individual refs to prevent Vue reactivity corruption
const form = ref<Omit<RegistrationFormData, 'recaptcha_token'>>({ const firstName = ref('');
first_name: '', const lastName = ref('');
last_name: '', const email = ref('');
email: '', const phone = ref('');
phone: '', const dateOfBirth = ref('');
date_of_birth: '', const address = ref('');
address: '', const nationality = ref('');
nationality: ''
}); // Computed property to create form object for submission
const form = computed(() => ({
first_name: firstName.value,
last_name: lastName.value,
email: email.value,
phone: phone.value,
date_of_birth: dateOfBirth.value,
address: address.value,
nationality: nationality.value
}));
const valid = ref(false); const valid = ref(false);
const loading = ref(false); const loading = ref(false);
@ -346,16 +358,14 @@ async function submitRegistration() {
if (response?.success) { if (response?.success) {
successMessage.value = response.message || 'Registration successful!'; successMessage.value = response.message || 'Registration successful!';
// Reset form // Reset form by resetting individual refs
form.value = { firstName.value = '';
first_name: '', lastName.value = '';
last_name: '', email.value = '';
email: '', phone.value = '';
phone: '', dateOfBirth.value = '';
date_of_birth: '', address.value = '';
address: '', nationality.value = '';
nationality: ''
};
recaptchaToken.value = ''; recaptchaToken.value = '';
// Reset reCAPTCHA // Reset reCAPTCHA
recaptcha.value?.reset(); recaptcha.value?.reset();