From baf353d7cdbe4ed937fc8829bf25092ef9e20208 Mon Sep 17 00:00:00 2001 From: Mikola Date: Fri, 3 Nov 2023 16:23:49 +0300 Subject: [PATCH] registration --- .../Modal/AcceptModal/AcceptModal.jsx | 17 +++--- .../ModalRegistration/ModalRegistration.jsx | 59 ++++++++++++------- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 2 +- .../TicketFullScreen/TicketFullScreen.jsx | 7 ++- src/pages/ProjectTracker/ProjectTracker.js | 27 ++++----- 5 files changed, 66 insertions(+), 46 deletions(-) diff --git a/src/components/Modal/AcceptModal/AcceptModal.jsx b/src/components/Modal/AcceptModal/AcceptModal.jsx index c115a4fe..c39af125 100644 --- a/src/components/Modal/AcceptModal/AcceptModal.jsx +++ b/src/components/Modal/AcceptModal/AcceptModal.jsx @@ -4,18 +4,19 @@ import close from "assets/icons/closeProjectPersons.svg"; import "./acceptModal.scss"; -export const AcceptModal = ({title, closeModal, agreeHandler }) => { +export const AcceptModal = ({ title, closeModal, agreeHandler }) => { return (
-

- {title} -

+

{title}

-
submitHandler()} - styles={inputsValue.userName && inputsValue.email && inputsValue.password ? "button-box__submit" : "button-box__submit disable"} + styles={ + inputsValue.userName && inputsValue.email && inputsValue.password + ? "button-box__submit" + : "button-box__submit disable" + } > Отправить diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index 454baffc..205c157b 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -1011,7 +1011,7 @@ export const ModalTiсket = ({
{acceptModalOpen && ( diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 4c1ad17f..b41f2df3 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -1208,9 +1208,10 @@ export const TicketFullScreen = () => {
{acceptModalOpen && ( + title={"Вы точно хотите переместить задачу в архив?"} + closeModal={closeAcceptModal} + agreeHandler={deleteTask} + /> )}
diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 9a19dd5c..f3e42392 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -33,13 +33,13 @@ import { useNotification } from "@hooks/useNotification"; import BaseButton from "@components/Common/BaseButton/BaseButton"; import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; +import AcceptModal from "@components/Modal/AcceptModal/AcceptModal"; import ModalTicket from "@components/Modal/Tracker/ModalTicket/ModalTicket"; import TrackerModal from "@components/Modal/Tracker/TrackerModal/TrackerModal"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import TrackerSelectColumn from "@components/TrackerSelectColumn/TrackerSelectColumn"; -import AcceptModal from "@components/Modal/AcceptModal/AcceptModal"; import arrow from "assets/icons/arrows/arrowCalendar.png"; import arrowDown from "assets/icons/arrows/selectArrow.png"; @@ -76,7 +76,7 @@ export const ProjectTracker = () => { edit: false, }); const [acceptModalOpen, setAcceptModalOpen] = useState(false); - const [currentColumnDelete, setCurrentColumnDelete] = useState(null) + const [currentColumnDelete, setCurrentColumnDelete] = useState(null); const [color, setColor] = useState("#aabbcc"); const [tagInfo, setTagInfo] = useState({ description: "", name: "" }); const [checkBoxParticipateTasks, setCheckBoxParticipateTasks] = @@ -913,14 +913,13 @@ export const ProjectTracker = () => {
{ - if (column.tasks.length) { - setAcceptModalOpen(true) - setCurrentColumnDelete(column) - } else { - deleteColumn(column) - } + if (column.tasks.length) { + setAcceptModalOpen(true); + setCurrentColumnDelete(column); + } else { + deleteColumn(column); } - } + }} > delete Удалить @@ -1067,11 +1066,11 @@ export const ProjectTracker = () => {
{acceptModalOpen && ( - deleteColumn(currentColumnDelete)} - /> + deleteColumn(currentColumnDelete)} + /> )}