fixed gender input bug in dashboard

This commit is contained in:
Mamalizz-dev
2026-02-21 02:24:31 +03:30
parent 102148b693
commit 1344b39e56
2 changed files with 10 additions and 5 deletions
+4 -3
View File
@@ -33,7 +33,7 @@ const personalData = ref<UpdateAccountRequest>({
first_name: account.value?.first_name ?? "",
last_name: account.value?.last_name ?? "",
phone: account.value?.phone ?? "",
gender: account.value?.gender ?? undefined,
gender: account.value?.gender || undefined,
email: account.value?.email ?? "",
birth_date: account.value?.birth_date ?? "",
});
@@ -64,7 +64,7 @@ const formRules = computed(() => {
required: helpers.withMessage("فیلد شماره تلفن الزامی می باشد", required),
phoneValidator: helpers.withMessage(
"شماره تلفن وارد شده معتبر نمی باشد",
helpers.regex(/^0?[1-9][0-9]{9}$/)
helpers.regex(/^0?[1-9][0-9]{9}$/),
),
},
};
@@ -99,7 +99,7 @@ const updateData = () => {
},
});
},
}
},
);
};
@@ -243,6 +243,7 @@ const handleSubmit = (withValidation: boolean) => {
<Input
v-model="personalData.phone!"
variant="outlined"
disabled
:error="formValidator$.phone.$error"
/>
</DataField>