From c831931083cd61e487340e75ab1eb55ba4863d41 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Thu, 23 Jun 2022 12:14:42 +0430 Subject: [PATCH] roye ye jozeyat kar kardam | 120 --- .../Dashboard/layouts/Main/Addresses/index.js | 152 ++++++++---------- .../layouts/Mobile/ProfileAddress/index.js | 11 +- src/views/DeliveryForm/Address/index.js | 4 +- 3 files changed, 77 insertions(+), 90 deletions(-) diff --git a/src/views/Dashboard/layouts/Main/Addresses/index.js b/src/views/Dashboard/layouts/Main/Addresses/index.js index 026d632..06a3d13 100644 --- a/src/views/Dashboard/layouts/Main/Addresses/index.js +++ b/src/views/Dashboard/layouts/Main/Addresses/index.js @@ -12,6 +12,9 @@ import Button from "../../../../../components/Button"; import { Link, useNavigate } from "react-router-dom"; +import editButton from "../../../../../assets/icons/edit.svg"; +import trash from "../../../../../assets/icons/trash.svg"; + const ProfileAddress = ({ addresses, update, @@ -32,7 +35,11 @@ const ProfileAddress = ({ }, []); return ( -
+
-
+
{addresses.map((address, index) => ( active ? {} : update({ userAddressId: address.id, userId }) } > -
e.stopPropagation()} - > - setMenu()} - > - ویرایش - - -
-
- {active && ( -
-
- آدرس انتخابی شما - فعال +
+
+
+
+
+ {active && ( +
+
+ آدرس انتخابی شما + فعال +
+
+ )} +
+
+ + {"آدرس:" + " " + address.address} + + + {"نام:" + " " + address.firstName + " " + address.lastName} + + + {"کد پستی:" + " " + address.postalCode} + + + {"شماره تماس:" + " " + address.cellphone} +
- clickOnMenu(e)} - > - - - - -
- )} -
-
- - {"آدرس:" + " " + address.address} - - - {"نام:" + " " + address.firstName + " " + address.lastName} - - - {"کد پستی:" + " " + address.postalCode} - - - {"شماره تماس:" + " " + address.cellphone} - +
+ {/* edit / delete button */} +
+
+ + delete-address +
+
+ + edit-address
- {!active && ( - clickOnMenu(e)} - > - - - - - - )}
-
+
); }; diff --git a/src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js b/src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js index 55a954c..1af2340 100644 --- a/src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js +++ b/src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js @@ -120,9 +120,14 @@ const Location = ({ return (
active ? {} : update({ userAddressId: address.id, userId }) } diff --git a/src/views/DeliveryForm/Address/index.js b/src/views/DeliveryForm/Address/index.js index bbf39bf..ee42ce1 100644 --- a/src/views/DeliveryForm/Address/index.js +++ b/src/views/DeliveryForm/Address/index.js @@ -52,7 +52,7 @@ function Address({
{/* edit / delete button */} -
+
-
+