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
@@ -108,7 +108,7 @@ const parallaxStyle = computed(() => {
</div> </div>
<div class="flex flex-col gap-1 px-2 items-start w-full text-black mt-4"> <div class="flex flex-col gap-1 px-2 items-start w-full text-black mt-4">
<span class="typo-sub-h-sm font-normal w-full truncate"> <span class="typo-sub-h-sm font-normal w-full line-clamp-2 leading-[175%]">
{{ title }} {{ title }}
</span> </span>
<div class="flex flex-col w-full mt-1"> <div class="flex flex-col w-full mt-1">
@@ -118,7 +118,11 @@ const parallaxStyle = computed(() => {
> >
{{ price }} {{ price }}
</span> </span>
<span v-if="priceAfter" class="whitespace-nowrap !font-bold">{{ priceAfter }}</span> <span
v-if="priceAfter"
class="whitespace-nowrap !font-bold"
>{{ priceAfter }}</span
>
</div> </div>
</div> </div>
</div> </div>
+4 -3
View File
@@ -33,7 +33,7 @@ const personalData = ref<UpdateAccountRequest>({
first_name: account.value?.first_name ?? "", first_name: account.value?.first_name ?? "",
last_name: account.value?.last_name ?? "", last_name: account.value?.last_name ?? "",
phone: account.value?.phone ?? "", phone: account.value?.phone ?? "",
gender: account.value?.gender ?? undefined, gender: account.value?.gender || undefined,
email: account.value?.email ?? "", email: account.value?.email ?? "",
birth_date: account.value?.birth_date ?? "", birth_date: account.value?.birth_date ?? "",
}); });
@@ -64,7 +64,7 @@ const formRules = computed(() => {
required: helpers.withMessage("فیلد شماره تلفن الزامی می باشد", required), required: helpers.withMessage("فیلد شماره تلفن الزامی می باشد", required),
phoneValidator: helpers.withMessage( 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 <Input
v-model="personalData.phone!" v-model="personalData.phone!"
variant="outlined" variant="outlined"
disabled
:error="formValidator$.phone.$error" :error="formValidator$.phone.$error"
/> />
</DataField> </DataField>