|
|
@ -19,6 +19,7 @@ const ProfileAddress = ({ |
|
|
|
userAddressId, |
|
|
|
userAddressId, |
|
|
|
getFactorInfo, |
|
|
|
getFactorInfo, |
|
|
|
loading, |
|
|
|
loading, |
|
|
|
|
|
|
|
setPhase, |
|
|
|
isMobile, |
|
|
|
isMobile, |
|
|
|
isDark, |
|
|
|
isDark, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
@ -52,54 +53,74 @@ const ProfileAddress = ({ |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
/* <div className="w-full flex flex-row justify-between items-center mt-4"> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
className={`flex justify-center text-tiny lg:text-sm rounded-md py-3 bg-grayF9 dark:bg-blueC0 dark:bg-opacity-30 cursor:pointer ${ |
|
|
|
|
|
|
|
isDark ? "text-white" : "text-gray70" |
|
|
|
|
|
|
|
} items-center w-full`}
|
|
|
|
|
|
|
|
action={() => navigation("/createAddress")} |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
border: `1px solid ${isDark ? "#DBDBDB22" : "#DBDBDB"}`, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
یک آدرس جدید اضافه کنید |
|
|
|
|
|
|
|
<strong className="text-lg transform translate-y-0.5 mr-1">+</strong> |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const Location = ({ address, active, userId, isDark, update }) => { |
|
|
|
const Location = ({ address, active, userId, isDark, update }) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
<> |
|
|
|
className={`flex items-center w-full px-3 py-4 rounded-md mt-2 border-2 border-solid ${ |
|
|
|
{/* */} |
|
|
|
active |
|
|
|
<div |
|
|
|
? "border-gray-300 bg-blueC0 bg-opacity-5" |
|
|
|
className={`flex items-center w-full px-3 py-4 rounded-md my-4 border-2 border-solid ${ |
|
|
|
: "border-green-400 bg-white" |
|
|
|
active |
|
|
|
}`}
|
|
|
|
? "border-gray-300 bg-blueC0 bg-opacity-5" |
|
|
|
onClick={() => |
|
|
|
: "border-green-400 bg-white" |
|
|
|
active ? {} : update({ userAddressId: address.id, userId }) |
|
|
|
}`}
|
|
|
|
} |
|
|
|
onClick={() => |
|
|
|
> |
|
|
|
active ? {} : update({ userAddressId: address.id, userId }) |
|
|
|
<div className="flex flex-1 flex-col mr-2"> |
|
|
|
} |
|
|
|
{active && ( |
|
|
|
> |
|
|
|
<div className="w-full flex justify-between mb-3"> |
|
|
|
<div className="flex flex-1 flex-col mr-2"> |
|
|
|
<div className="flex items-center"> |
|
|
|
{active && ( |
|
|
|
<strong className="text-base">آدرس انتخابی شما</strong> |
|
|
|
<div className="w-full flex justify-between mb-3"> |
|
|
|
<span className="mr-4 text-sm">فعال</span> |
|
|
|
<div className="flex items-center"> |
|
|
|
|
|
|
|
<strong className="text-base">آدرس انتخابی شما</strong> |
|
|
|
|
|
|
|
<span className="mr-4 text-sm">فعال</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<img src={menuIcon} alt="" className="w-6" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<div className="flex w-full"> |
|
|
|
|
|
|
|
<div className="flex flex-col flex-1 mb-4"> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"آدرس:" + " " + address.address} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"نام:" + " " + address.firstName + " " + address.lastName} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"کد پستی:" + " " + address.postalCode} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"شماره تماس:" + " " + address.cellphone} |
|
|
|
|
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<img src={menuIcon} alt="" className="w-6" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<div className="flex w-full"> |
|
|
|
|
|
|
|
<div className="flex flex-col flex-1 mb-4"> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"آدرس:" + " " + address.address} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"نام:" + " " + address.firstName + " " + address.lastName} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"کد پستی:" + " " + address.postalCode} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="mb-2 leading-6"> |
|
|
|
|
|
|
|
{"شماره تماس:" + " " + address.cellphone} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<Button |
|
|
|
|
|
|
|
title="مشاهده روی نقشه" |
|
|
|
|
|
|
|
backgroundColor={isDark ? "bg-blueC0" : "bg-blueC0"} |
|
|
|
|
|
|
|
border={{ color: isDark ? "#ffffff55" : "#196EC055", width: "0px" }} |
|
|
|
|
|
|
|
width="100%" |
|
|
|
|
|
|
|
color={"text-white"} |
|
|
|
|
|
|
|
onClick={() => {}} |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Button |
|
|
|
|
|
|
|
title="مشاهده روی نقشه" |
|
|
|
|
|
|
|
backgroundColor={isDark ? "bg-blueC0" : "bg-blueC0"} |
|
|
|
|
|
|
|
border={{ color: isDark ? "#ffffff55" : "#196EC055", width: "0px" }} |
|
|
|
|
|
|
|
width="100%" |
|
|
|
|
|
|
|
color={"text-white"} |
|
|
|
|
|
|
|
onClick={() => {}} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|