update src/views/Address/index.js, src/views/Dashboard/layouts/Main/Addresses/index.js and src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js

temp
mahdi 2 years ago
parent cce743660a
commit 4c2fc83d6b
  1. 1
      src/views/Address/index.js
  2. 105
      src/views/Dashboard/layouts/Main/Addresses/index.js

@ -556,6 +556,7 @@ export const Address = ({
direction="ltr" direction="ltr"
maxLength={10} maxLength={10}
/> />
<div <div
className={`flex ${ className={`flex ${
profilePage ? "mt-10" : "lg:hidden" profilePage ? "mt-10" : "lg:hidden"

@ -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"}`,
}}
>
&nbsp;یک آدرس جدید اضافه کنید
<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> </>
); );
}; };

Loading…
Cancel
Save