worked | 150

temp
mahdi 2 years ago
parent c5d7e2030a
commit a7b1da36fd
  1. 16
      src/views/Address/index.js
  2. 37
      src/views/Dashboard/layouts/Main/Addresses/index.js
  3. 3
      src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js
  4. 3
      src/views/DeliveryForm/Address/index.js

@ -58,7 +58,11 @@ export const Address = ({
if (editPage || profilePage) {
setHeaderOptions(headerOptions);
} else {
setHeaderOptions({ shown: true, back: true, title: "آدرس جدید" });
setHeaderOptions({
shown: true,
back: true,
title: "آدرس",
});
}
}
if (editPage) {
@ -365,13 +369,13 @@ export const Address = ({
className={`flex flex-row items-center mb-7 cursor-pointer
`}
onClick={() => {
setActiveCheckbox(false);
setActiveCheckbox(true);
}}
>
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full">
<div
className={`w-2 h-2 rounded-full ${
activeCheckbox === false ? "bg-blueC0" : ""
activeCheckbox === true ? "bg-blueC0" : ""
}`}
></div>
</div>
@ -382,7 +386,7 @@ export const Address = ({
className={`flex flex-row items-center mb-7 cursor-pointer
`}
onClick={() => {
setActiveCheckbox(true);
setActiveCheckbox(false);
}}
// onClick={() => {
// setActiveCheckbox(!activeCheckbox);
@ -391,9 +395,9 @@ export const Address = ({
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full">
<div
className={`w-2 h-2 rounded-full ${
activeCheckbox === !false ? "bg-blueC0" : ""
activeCheckbox === false ? "bg-blueC0" : ""
}`}
></div>{" "}
></div>
</div>
<p className="font-bold text-sm ">گیرنده فرد دیگری است</p>
</div>

@ -32,6 +32,20 @@ const ProfileAddress = ({
return (
<div className={`flex-1 ${isMobile ? "" : "w-1/2"} mx-auto`}>
<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`}
onClick={() => navigation("/createAddress")}
style={{
border: `1px solid ${isDark ? "#DBDBDB22" : "#DBDBDB"}`,
}}
>
&nbsp;یک آدرس جدید اضافه کنید
<strong className="text-lg transform translate-y-0.5 mr-1">+</strong>
</button>
</div>
<div className={`p-0 m-0 flex flex-col mb-4`}>
{addresses.map((address, index) => (
<Location
@ -44,36 +58,13 @@ const ProfileAddress = ({
/>
))}
</div>
{/* <FloatingButton
action={() => navigation("/createAddress", { state: { panel: true } })}
// action={() => {}}
position={{ right: isMobile ? "" : 350, bottom: 50 }}
/> */}
</div>
);
};
{
/* <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 }) => {
return (
<>
{/* */}
<div
className={`flex items-center w-full px-3 py-4 rounded-md my-4 border-2 border-solid ${
active

@ -1,5 +1,6 @@
import React from "react";
import { connect } from "react-redux";
import {
userAddress,
userFactor,
@ -7,6 +8,7 @@ import {
menu,
dialog,
} from "../../../../../redux/actions";
import { Link, useNavigate } from "react-router-dom";
//components
@ -73,7 +75,6 @@ const ProfileAddress = ({
/> */}
<FloatingButton
action={() => navigation("/createAddress", { state: { panel: true } })}
// action={() => {}}
position={{ bottom: 100, left: 16 }}
/>
</div>

@ -11,13 +11,13 @@ import trash from "../../../assets/icons/trash.svg";
function Address({
addresses,
isDark,
isMobile,
setPhase,
update,
userId,
userAddressId,
loading,
isDark,
}) {
const Location = ({ address, active }) => {
return isMobile ? (
@ -125,6 +125,7 @@ function Address({
</button>
);
};
return isMobile ? (
<section className="mt-2 w-full">
<strong className="font-bold text-green7B dark:text-white lg:text-tiny">

Loading…
Cancel
Save