fix: admin users
Deploy banu-front / deploy (push) Failing after 16s

This commit is contained in:
sajjadtalkhabi
2026-06-10 20:55:54 +03:30
parent b8ccbcc030
commit b9fa65b84f
51 changed files with 373 additions and 255 deletions
+6 -6
View File
@@ -4,13 +4,13 @@
<AuthHeading title="ورود" subtitle="در این قسمت اطلاعات خود را وارد کنید." />
<TextField
v-model="form.phoneNumber"
name="phoneNumber"
v-model="form.phone"
name="phone"
label="شماره تلفن همراه"
inputmode="numeric"
:convert-digits="true"
:error="errors.phoneNumber"
@blur="validateAt('phoneNumber', form.phoneNumber)"
:error="errors.phone"
@blur="validateAt('phone', form.phone)"
>
<template #appendIcon>
<SvgIcon name="phone" :size="22" color="var(--color-thd-gray)" />
@@ -81,7 +81,7 @@ const emit = defineEmits(['next'])
const schema = loginSchema
const form = ref({ phoneNumber: '', password: '' })
const form = ref({ phone: '', password: '' })
const { validate, validateAt, errors } = useYup(schema)
const loginMutation = useLoginMutation()
@@ -92,7 +92,7 @@ const onSubmit = async () => {
const { isValid, payload } = await validate(form.value)
if (!isValid) return
const response = await loginMutation.mutateAsync({
phone: payload.phoneNumber,
phone: payload.phone,
password: payload.password,
deviceName: 'web',
})
@@ -11,13 +11,13 @@
/>
<TextField
v-model="form.phoneNumber"
name="phoneNumber"
v-model="form.phone"
name="phone"
label="شماره تلفن همراه"
inputmode="numeric"
:convert-digits="true"
:error="errors.phoneNumber"
@blur="validateAt('phoneNumber', form.phoneNumber)"
:error="errors.phone"
@blur="validateAt('phone', form.phone)"
>
<template #appendIcon>
<SvgIcon name="phone" :size="22" color="var(--color-thd-gray)" />
@@ -67,7 +67,7 @@ const emit = defineEmits(['next', 'back'])
const isForgotPassword = computed(() => props.mode === 'forgotPassword')
const schema = loginWithCodeSchema
const form = ref({ phoneNumber: '' })
const form = ref({ phone: '' })
const { validate, validateAt, errors } = useYup(schema)
const { savePhoneNumber } = useAuth()
@@ -86,8 +86,8 @@ const onSubmit = async () => {
} else {
await loginCodeMutation.mutateAsync(payload)
}
savePhoneNumber(payload.phoneNumber)
emit('next', { phoneNumber: payload.phoneNumber, mode: props.mode })
savePhoneNumber(payload.phone)
emit('next', { phone: payload.phone, mode: props.mode })
}
</script>
+8 -8
View File
@@ -28,13 +28,13 @@
</TextField>
<TextField
v-model="form.phoneNumber"
name="phoneNumber"
v-model="form.phone"
name="phone"
label="شماره موبایل"
inputmode="numeric"
:convert-digits="true"
:error="errors.phoneNumber"
@blur="validateAt('phoneNumber', form.phoneNumber)"
:error="errors.phone"
@blur="validateAt('phone', form.phone)"
>
<template #appendIcon>
<SvgIcon name="phone" :size="22" color="var(--color-thd-gray)" />
@@ -102,7 +102,7 @@ const schema = signupSchema
const form = ref({
firstName: '',
lastName: '',
phoneNumber: '',
phone: '',
password: '',
passwordConfirmation: '',
})
@@ -117,12 +117,12 @@ const onSubmit = async () => {
const name = [payload.firstName, payload.lastName].filter(Boolean).join(' ').trim()
await registerMutation.mutateAsync({
name,
phone: payload.phoneNumber,
phone: payload.phone,
password: payload.password,
passwordConfirmation: payload.passwordConfirmation,
})
savePhoneNumber(payload.phoneNumber)
emit('next', { phoneNumber: payload.phoneNumber })
savePhoneNumber(payload.phone)
emit('next', { phone: payload.phone })
}
</script>
@@ -103,7 +103,7 @@ const resending = computed(
const onSubmit = async () => {
const { isValid, payload } = await validate(form.value)
if (!isValid) return
const body = { phoneNumber: props.phoneNumber, verifyCode: payload.verifyCode }
const body = { phone: props.phoneNumber, verifyCode: payload.verifyCode }
if (props.mode === 'loginWithCode') {
const response = await verifyLoginMutation.mutateAsync(body)
@@ -93,14 +93,14 @@
<div class="personal-info__row">
<div class="personal-info__cell personal-info__cell--full-sm">
<TextField
v-model="form.phoneNumber"
name="phoneNumber"
v-model="form.phone"
name="phone"
label="شماره تلفن همراه"
inputmode="numeric"
:convert-digits="true"
:disabled="!!initialPhoneNumber"
:error="errors.phoneNumber"
@blur="validateAt('phoneNumber', form.phoneNumber)"
:disabled="!!initialPhone"
:error="errors.phone"
@blur="validateAt('phone', form.phone)"
>
<template #appendIcon>
<SvgIcon name="phone" :size="20" color="var(--color-thd-gray)" />
@@ -206,9 +206,7 @@ const maxBirthDate = computed(() => {
}
})
const initialPhoneNumber = ref(
user.value?.phone || user.value?.phoneNumber || store.personal.phoneNumber || ''
)
const initialPhone = ref(user.value?.phone || store.personal.phone || '')
const form = ref({
firstName: store.personal.firstName || '',
@@ -217,7 +215,7 @@ const form = ref({
nationalCode: store.personal.nationalCode || '',
maritalStatus: store.personal.maritalStatus || '',
gender: store.personal.gender || '',
phoneNumber: initialPhoneNumber.value,
phone: initialPhone.value,
provinceId: store.personal.provinceId || null,
cityId: store.personal.cityId || null,
address: store.personal.address || '',
+26
View File
@@ -0,0 +1,26 @@
export { default as AuthCopyright } from './components/AuthCopyright.vue'
export { default as AuthHeading } from './components/AuthHeading.vue'
export { default as AuthShell } from './components/AuthShell.vue'
export { default as EducationalInformation } from './components/studentRegister/EducationalInformation.vue'
export { default as LoginForm } from './components/LoginForm.vue'
export { default as LoginWithVerifyCodeForm } from './components/LoginWithVerifyCodeForm.vue'
export { default as MediaRecorder } from './components/studentRegister/MediaRecorder.vue'
export { default as PatternSection } from './components/PatternSection.vue'
export { default as PermissionModal } from './components/studentRegister/PermissionModal.vue'
export { default as PersonalInformation } from './components/studentRegister/PersonalInformation.vue'
export { default as ProfessionalInformation } from './components/studentRegister/ProfessionalInformation.vue'
export { default as SideBarSteps } from './components/studentRegister/SideBarSteps.vue'
export { default as SignupForm } from './components/SignupForm.vue'
export { default as SkillAssessmentPart1 } from './components/studentRegister/SkillAssessmentPart1.vue'
export { default as SkillAssessmentPart2 } from './components/studentRegister/SkillAssessmentPart2.vue'
export { default as SkillAssessmentPart3 } from './components/studentRegister/SkillAssessmentPart3.vue'
export { default as SkillAssessmentPart4 } from './components/studentRegister/SkillAssessmentPart4.vue'
export { default as SkillAssessmentPart5 } from './components/studentRegister/SkillAssessmentPart5.vue'
export { default as SkillAssessmentPart6 } from './components/studentRegister/SkillAssessmentPart6.vue'
export { default as SkillAssessmentPart7 } from './components/studentRegister/SkillAssessmentPart7.vue'
export { default as SkillSelectStep } from './components/studentRegister/SkillSelectStep.vue'
export { default as StepActions } from './components/studentRegister/StepActions.vue'
export { default as SuccessModal } from './components/studentRegister/SuccessModal.vue'
export { default as VerifyCodeForm } from './components/VerifyCodeForm.vue'
export * from './schema'
@@ -5,10 +5,10 @@
<AuthHeading title="تغییر رمز عبور" subtitle="در این قسمت رمز عبور جدید خود را وارد کنید" />
<TextField
v-model="form.phoneNumber"
name="phoneNumber"
v-model="form.phone"
name="phone"
label="شماره موبایل"
:disabled="!!(user?.phone || user?.phoneNumber)"
:disabled="!!(user?.phone || user?.phone)"
>
<template #appendIcon>
<SvgIcon name="phone" :size="22" color="var(--color-thd-gray)" />
@@ -71,7 +71,7 @@ const redirectAfterLogin = useRedirectAfterLogin()
const schema = resetPasswordSchema
const form = ref({
phoneNumber: user.value?.phone || user.value?.phoneNumber || '',
phone: user.value?.phone || '',
password: '',
passwordConfirmation: '',
})
+3 -3
View File
@@ -4,18 +4,18 @@ import { phoneNumberRule } from '@/constants/rules/phoneNumberRule'
import { passwordConfirmationRule } from '@/constants/rules/passwordConfirmationRule'
export const loginSchema = object().shape({
phoneNumber: phoneNumberRule,
phone: phoneNumberRule,
password: string().required(),
})
export const loginWithCodeSchema = object().shape({
phoneNumber: phoneNumberRule,
phone: phoneNumberRule,
})
export const signupSchema = object().shape({
firstName: string().required().min(3),
lastName: string().required().min(3),
phoneNumber: phoneNumberRule,
phone: phoneNumberRule,
password: passwordRule,
passwordConfirmation: passwordConfirmationRule,
})