|
|
|
@ -356,14 +356,113 @@ export const Address = ({ |
|
|
|
|
<span className="font-bold">برای خودم</span> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{activeCheckbox && <p>mahdi</p>} |
|
|
|
|
{ |
|
|
|
|
activeCheckbox === true ? ( |
|
|
|
|
<> |
|
|
|
|
<Header |
|
|
|
|
title="اطلاعات هویتی" |
|
|
|
|
text="( لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید )" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<Header |
|
|
|
|
<div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full"> |
|
|
|
|
<Input |
|
|
|
|
width={isMobile ? "100%" : "50%"} |
|
|
|
|
label={"نام"} |
|
|
|
|
regex={(val) => val} |
|
|
|
|
name="firstName" |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
profilePage |
|
|
|
|
? setProfileFields({ ...profileFields, firstName: value }) |
|
|
|
|
: onChange(name, value) |
|
|
|
|
} |
|
|
|
|
value={ |
|
|
|
|
profilePage |
|
|
|
|
? profileFields.firstName || user.firstName |
|
|
|
|
: addressFields?.firstName |
|
|
|
|
} |
|
|
|
|
align="text-right" |
|
|
|
|
direction="rtl" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<Input |
|
|
|
|
width={isMobile ? "100%" : "50%"} |
|
|
|
|
label={"نام خانوادگی"} |
|
|
|
|
regex={(val) => val} |
|
|
|
|
name="lastName" |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
profilePage |
|
|
|
|
? setProfileFields({ ...profileFields, lastName: value }) |
|
|
|
|
: onChange(name, value) |
|
|
|
|
} |
|
|
|
|
value={ |
|
|
|
|
profilePage |
|
|
|
|
? profileFields.lastName || user.lastName |
|
|
|
|
: addressFields?.lastName |
|
|
|
|
} |
|
|
|
|
align="text-right" |
|
|
|
|
direction="rtl" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<Header |
|
|
|
|
title="شماره تماس" |
|
|
|
|
text="( شماره موبایل و شماره تلفن ثابت خود را
|
|
|
|
|
به همراه پیش شماره وارد کنید )" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full"> |
|
|
|
|
<Input |
|
|
|
|
width={isMobile ? "100%" : "50%"} |
|
|
|
|
label={"شماره موبایل"} |
|
|
|
|
regex={(val) => onInput.phonenumber(val)} |
|
|
|
|
name="cellphone" |
|
|
|
|
value={ |
|
|
|
|
profilePage |
|
|
|
|
? profileFields.cellphone || user.cellphone |
|
|
|
|
: addressFields?.cellphone |
|
|
|
|
} |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
profilePage |
|
|
|
|
? setProfileFields({ ...profileFields, cellphone: value }) |
|
|
|
|
: onChange(name, value) |
|
|
|
|
} |
|
|
|
|
align="text-right" |
|
|
|
|
direction="ltr" |
|
|
|
|
maxLength={11} |
|
|
|
|
/> |
|
|
|
|
<Input |
|
|
|
|
width={isMobile ? "100%" : "50%"} |
|
|
|
|
label={"شماره تلفن"} |
|
|
|
|
regex={(val) => onInput.numberOnly(val)} |
|
|
|
|
name="phone" |
|
|
|
|
value={ |
|
|
|
|
profilePage |
|
|
|
|
? profileFields.phone || user.phone |
|
|
|
|
: addressFields?.phone |
|
|
|
|
} |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
profilePage |
|
|
|
|
? setProfileFields({ ...profileFields, phone: value }) |
|
|
|
|
: onChange(name, value) |
|
|
|
|
} |
|
|
|
|
align="text-right" |
|
|
|
|
direction="ltr" |
|
|
|
|
maxLength={11} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</> |
|
|
|
|
) : ( |
|
|
|
|
<p>mahdi mahdi mahdi</p> |
|
|
|
|
) |
|
|
|
|
// <p>mahdi</p> : <p>mahdiiii</p>
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
{/* <Header |
|
|
|
|
title="اطلاعات هویتی" |
|
|
|
|
text="( لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید )" |
|
|
|
|
/> |
|
|
|
|
/> */} |
|
|
|
|
|
|
|
|
|
<div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full"> |
|
|
|
|
{/* <div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full"> |
|
|
|
|
<Input |
|
|
|
|
width={isMobile ? "100%" : "50%"} |
|
|
|
|
label={"نام"} |
|
|
|
@ -401,7 +500,7 @@ export const Address = ({ |
|
|
|
|
align="text-right" |
|
|
|
|
direction="rtl" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> */} |
|
|
|
|
|
|
|
|
|
{profilePage && ( |
|
|
|
|
<Input |
|
|
|
@ -425,7 +524,7 @@ export const Address = ({ |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<Header |
|
|
|
|
{/* <Header |
|
|
|
|
title="شماره تماس" |
|
|
|
|
text="( شماره موبایل و شماره تلفن ثابت خود را
|
|
|
|
|
به همراه پیش شماره وارد کنید )" |
|
|
|
@ -470,7 +569,7 @@ export const Address = ({ |
|
|
|
|
direction="ltr" |
|
|
|
|
maxLength={11} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> */} |
|
|
|
|
|
|
|
|
|
{!isMobile && ( |
|
|
|
|
<> |
|
|
|
|