From d2b53392fa894dee4dfe42311dce51acf0f7d03c Mon Sep 17 00:00:00 2001 From: Mikola Date: Wed, 14 Feb 2024 16:23:50 +0300 Subject: [PATCH 1/2] partner active nav --- src/App.js | 6 +++--- src/components/Navigation/Navigation.jsx | 4 +++- src/pages/PartnerAddRequest/PartnerAddRequest.js | 8 ++++---- src/pages/PartnerBid/PartnerBid.jsx | 4 ++-- src/pages/PartnerRequests/PartnerRequests.jsx | 6 +++--- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/App.js b/src/App.js index ebacc0f0..3eadea5c 100644 --- a/src/App.js +++ b/src/App.js @@ -120,9 +120,9 @@ const App = () => { } /> } /> } /> - } /> - } /> - } /> + } /> + } /> + } /> } /> } /> } /> diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index 2940067a..a0c0c07d 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -45,6 +45,7 @@ export const Navigation = () => { partner: [ { path: "/catalog", + active: "candidate", name: "Каталог" }, { @@ -53,6 +54,7 @@ export const Navigation = () => { }, { path: "/employees", + active: "calendar", name: "Персонал" }, { @@ -80,7 +82,7 @@ export const Navigation = () => { key={index} end to={link.path === "/Quiz" ? link.path : `/profile${link.path}`} - className={currentPath.includes(link.path) ? "active" : ""} + className={currentPath.includes(link.path) || currentPath.includes(link.active) ? "active" : ""} > {link.name} diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.js index 6837d5f5..c0aad27d 100644 --- a/src/pages/PartnerAddRequest/PartnerAddRequest.js +++ b/src/pages/PartnerAddRequest/PartnerAddRequest.js @@ -49,7 +49,7 @@ export const PartnerAddRequest = () => { const [inputs, setInputs] = useState({ title: "", description: "" }); if ( - currentUrl[0] === "/profile/edit-request" && + currentUrl[0] === "/profile/requests-edit" && !Object.keys(partnerRequestInfo).length ) { return ; @@ -69,7 +69,7 @@ export const PartnerAddRequest = () => { useEffect(() => { if ( - currentUrl[0] === "/profile/edit-request" && + currentUrl[0] === "/profile/requests-edit" && Object.keys(partnerRequestInfo).length ) { setInputs({ @@ -102,7 +102,7 @@ export const PartnerAddRequest = () => { }; const handler = () => { - if (currentUrl[0] === "/profile/edit-request") { + if (currentUrl[0] === "/profile/requests-edit") { apiRequest("/request/update-request", { method: "PUT", data: { @@ -180,7 +180,7 @@ export const PartnerAddRequest = () => { name: `${ editRequest ? "Редактирование заявки" : "Создание новой заявки" }`, - link: "/profile/add-request" + link: "/profile/requests-add" } ]} /> diff --git a/src/pages/PartnerBid/PartnerBid.jsx b/src/pages/PartnerBid/PartnerBid.jsx index 3199b13e..64cadabb 100644 --- a/src/pages/PartnerBid/PartnerBid.jsx +++ b/src/pages/PartnerBid/PartnerBid.jsx @@ -107,7 +107,7 @@ export const PartnerBid = () => { links={[ { name: "Главная", link: "/profile" }, { name: "Запросы и открытые позиции", link: "/profile/requests" }, - { name: "Просмотр заявки - PHP разработчик", link: "/profile/bid" } + { name: "Просмотр заявки - PHP разработчик", link: "/profile/requests-bid" } ]} />

Страница заявки

@@ -117,7 +117,7 @@ export const PartnerBid = () => {

{requestInfo.title}

- Редактировать + Редактировать delete { return ( { dispatch(setPartnerRequestId(item.id)); @@ -85,7 +85,7 @@ export const PartnerRequests = () => { параметры: количество сотрудников, стек, уровень специалиста

- + + Создать запрос @@ -100,7 +100,7 @@ export const PartnerRequests = () => { cursor

У вас ещё нет запросов на сотрудников

- + + Создать запрос From 990abb491b84cf399fa38f7919364e4ff3394f00 Mon Sep 17 00:00:00 2001 From: Mikola Date: Wed, 14 Feb 2024 16:24:08 +0300 Subject: [PATCH 2/2] partner active nav --- src/components/Navigation/Navigation.jsx | 7 ++++++- src/pages/PartnerBid/PartnerBid.jsx | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index a0c0c07d..ce1f9747 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -82,7 +82,12 @@ export const Navigation = () => { key={index} end to={link.path === "/Quiz" ? link.path : `/profile${link.path}`} - className={currentPath.includes(link.path) || currentPath.includes(link.active) ? "active" : ""} + className={ + currentPath.includes(link.path) || + currentPath.includes(link.active) + ? "active" + : "" + } > {link.name} diff --git a/src/pages/PartnerBid/PartnerBid.jsx b/src/pages/PartnerBid/PartnerBid.jsx index 64cadabb..736816f5 100644 --- a/src/pages/PartnerBid/PartnerBid.jsx +++ b/src/pages/PartnerBid/PartnerBid.jsx @@ -107,7 +107,10 @@ export const PartnerBid = () => { links={[ { name: "Главная", link: "/profile" }, { name: "Запросы и открытые позиции", link: "/profile/requests" }, - { name: "Просмотр заявки - PHP разработчик", link: "/profile/requests-bid" } + { + name: "Просмотр заявки - PHP разработчик", + link: "/profile/requests-bid" + } ]} />

Страница заявки