Compare commits

..

2 Commits

Author SHA1 Message Date
Mikola
990abb491b partner active nav 2024-02-14 16:24:08 +03:00
Mikola
d2b53392fa partner active nav 2024-02-14 16:23:50 +03:00
5 changed files with 23 additions and 13 deletions

View File

@ -120,9 +120,9 @@ const App = () => {
<Route exact path="payouts" element={<Payouts />} /> <Route exact path="payouts" element={<Payouts />} />
<Route exact path="settings" element={<PartnerSettings />} /> <Route exact path="settings" element={<PartnerSettings />} />
<Route exact path="requests" element={<PartnerRequests />} /> <Route exact path="requests" element={<PartnerRequests />} />
<Route exact path="add-request" element={<PartnerAddRequest />} /> <Route exact path="requests-add" element={<PartnerAddRequest />} />
<Route exact path="edit-request" element={<PartnerAddRequest />} /> <Route exact path="requests-edit" element={<PartnerAddRequest />} />
<Route exact path="bid" element={<PartnerBid />} /> <Route exact path="requests-bid" element={<PartnerBid />} />
<Route exact path="employees" element={<PartnerCategories />} /> <Route exact path="employees" element={<PartnerCategories />} />
<Route exact path="employees/report/:uuid" element={<PartnerEmployeeReport />} /> <Route exact path="employees/report/:uuid" element={<PartnerEmployeeReport />} />
<Route exact path="treaties" element={<PartnerTreaties />} /> <Route exact path="treaties" element={<PartnerTreaties />} />

View File

@ -45,6 +45,7 @@ export const Navigation = () => {
partner: [ partner: [
{ {
path: "/catalog", path: "/catalog",
active: "candidate",
name: "Каталог" name: "Каталог"
}, },
{ {
@ -53,6 +54,7 @@ export const Navigation = () => {
}, },
{ {
path: "/employees", path: "/employees",
active: "calendar",
name: "Персонал" name: "Персонал"
}, },
{ {
@ -80,7 +82,12 @@ export const Navigation = () => {
key={index} key={index}
end end
to={link.path === "/Quiz" ? link.path : `/profile${link.path}`} 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} {link.name}
</NavLink> </NavLink>

View File

@ -49,7 +49,7 @@ export const PartnerAddRequest = () => {
const [inputs, setInputs] = useState({ title: "", description: "" }); const [inputs, setInputs] = useState({ title: "", description: "" });
if ( if (
currentUrl[0] === "/profile/edit-request" && currentUrl[0] === "/profile/requests-edit" &&
!Object.keys(partnerRequestInfo).length !Object.keys(partnerRequestInfo).length
) { ) {
return <Navigate to="/profile/requests" replace />; return <Navigate to="/profile/requests" replace />;
@ -69,7 +69,7 @@ export const PartnerAddRequest = () => {
useEffect(() => { useEffect(() => {
if ( if (
currentUrl[0] === "/profile/edit-request" && currentUrl[0] === "/profile/requests-edit" &&
Object.keys(partnerRequestInfo).length Object.keys(partnerRequestInfo).length
) { ) {
setInputs({ setInputs({
@ -102,7 +102,7 @@ export const PartnerAddRequest = () => {
}; };
const handler = () => { const handler = () => {
if (currentUrl[0] === "/profile/edit-request") { if (currentUrl[0] === "/profile/requests-edit") {
apiRequest("/request/update-request", { apiRequest("/request/update-request", {
method: "PUT", method: "PUT",
data: { data: {
@ -180,7 +180,7 @@ export const PartnerAddRequest = () => {
name: `${ name: `${
editRequest ? "Редактирование заявки" : "Создание новой заявки" editRequest ? "Редактирование заявки" : "Создание новой заявки"
}`, }`,
link: "/profile/add-request" link: "/profile/requests-add"
} }
]} ]}
/> />

View File

@ -107,7 +107,10 @@ export const PartnerBid = () => {
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Запросы и открытые позиции", link: "/profile/requests" }, { name: "Запросы и открытые позиции", link: "/profile/requests" },
{ name: "Просмотр заявки - PHP разработчик", link: "/profile/bid" } {
name: "Просмотр заявки - PHP разработчик",
link: "/profile/requests-bid"
}
]} ]}
/> />
<h2 className="partner-bid__title">Страница заявки </h2> <h2 className="partner-bid__title">Страница заявки </h2>
@ -117,7 +120,7 @@ export const PartnerBid = () => {
<div className="partner-bid__qualification"> <div className="partner-bid__qualification">
<h3>{requestInfo.title}</h3> <h3>{requestInfo.title}</h3>
<div className="partner-bid__qualification__buttons"> <div className="partner-bid__qualification__buttons">
<Link to="/profile/edit-request">Редактировать</Link> <Link to="/profile/requests-edit">Редактировать</Link>
<img <img
src={deleteBtn} src={deleteBtn}
alt="delete" alt="delete"

View File

@ -60,7 +60,7 @@ export const PartnerRequests = () => {
return ( return (
<Link <Link
key={index} key={index}
to={"/profile/bid"} to={"/profile/requests-bid"}
className="partner-requests__section__item" className="partner-requests__section__item"
onClick={() => { onClick={() => {
dispatch(setPartnerRequestId(item.id)); dispatch(setPartnerRequestId(item.id));
@ -85,7 +85,7 @@ export const PartnerRequests = () => {
параметры: количество сотрудников, стек, уровень специалиста параметры: количество сотрудников, стек, уровень специалиста
</p> </p>
<BaseButton> <BaseButton>
<Link to={"/profile/add-request"}> <Link to={"/profile/requests-add"}>
<span>+</span> <span>+</span>
Создать запрос Создать запрос
</Link> </Link>
@ -100,7 +100,7 @@ export const PartnerRequests = () => {
<img src={cursorImg} alt="cursor" /> <img src={cursorImg} alt="cursor" />
<p>У вас ещё нет запросов на сотрудников</p> <p>У вас ещё нет запросов на сотрудников</p>
<BaseButton> <BaseButton>
<Link to={"/profile/add-request"}> <Link to={"/profile/requests-add"}>
<span>+</span> <span>+</span>
Создать запрос Создать запрос
</Link> </Link>