diff --git a/src/App.js b/src/App.js index dc2ae016..80d797c0 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,7 @@ import CalendarPage from './pages/CalendarPage' import ReportPage from './pages/ReportFormPage.js' import FormPage from './pages/FormPage.js' import SingleReportPage from './pages/SingleReportPage' +<<<<<<< HEAD import { Highlighter } from './pages/CodeSnippetPage' import { QuizPage } from './pages/quiz/QuizPage' import { InterjacentPage } from './pages/quiz/InterjacentPage' @@ -24,6 +25,13 @@ import { QuizTestPage } from './pages/quiz/QuizTestPage' import { Instruction } from './components/features/quiz/Instructions' import { InstructionPage } from './pages/quiz/InstructionPage' import {ResultPage} from "./pages/quiz/ResultPage"; +======= +import Bookkeping from './pages/Bookkeeping' +import { TaxPage } from "./pages/TaxPage" +import { MoneyPage } from "./pages/MoneyPage" +import { ActPage } from "./pages/ActPage" +import { ContractPage } from "./pages/ContractPage" +>>>>>>> documents const App = (props) => { const isAuth = useSelector(selectAuth) @@ -52,11 +60,19 @@ const App = (props) => { /> +<<<<<<< HEAD +======= + + + + + +>>>>>>> documents
Page not found
} /> diff --git a/src/components/AuthBox/AuthBox.js b/src/components/AuthBox/AuthBox.js index d6a794da..c8ca7bf6 100644 --- a/src/components/AuthBox/AuthBox.js +++ b/src/components/AuthBox/AuthBox.js @@ -2,10 +2,11 @@ import React, { useState } from 'react' import { Link } from 'react-router-dom' import { useDispatch, useSelector } from 'react-redux' -import { auth } from '../../redux/outstaffingSlice' +import { auth, setUserInfo } from '../../redux/outstaffingSlice' import { loading } from '../../redux/loaderSlice' import ellipse from '../../images/ellipse.png' + import { Loader } from '../Loader/Loader' import { fetchAuth } from '../../server/server' @@ -74,8 +75,9 @@ export const AuthBox = ({ title, roleChangeLink }) => { fetchAuth({ username, password, - dispatch: () => { + dispatch: (resJSON) => { dispatch(auth(true)) + dispatch(setUserInfo(resJSON)) dispatch(loading(false)) dispatch(setRole('ROLE_PARTNER')) }, diff --git a/src/components/CandidateSidebar/CandidateSidebar.js b/src/components/CandidateSidebar/CandidateSidebar.js index d0574b9b..52603875 100644 --- a/src/components/CandidateSidebar/CandidateSidebar.js +++ b/src/components/CandidateSidebar/CandidateSidebar.js @@ -1,4 +1,5 @@ import React from 'react' +import { useSelector } from 'react-redux' import { Link } from 'react-router-dom' import { Achievement } from '../Achievement/Achievement' @@ -10,6 +11,9 @@ import { Highlighter } from '../../App' import { useState } from 'react' import { useEffect } from 'react' +import { selectUserInfo } from '../../redux/outstaffingSlice' +import { isRejected } from '@reduxjs/toolkit' + const getYearsString = (years) => { let yearsString if (years % 10 === 1) { @@ -24,12 +28,17 @@ const getYearsString = (years) => { return `${years} ${yearsString}` } +<<<<<<< HEAD const CandidateSidebar = ({ candidate, position, setActiveSnippet, activeSnippet }) => { const showSnippet = () => { setActiveSnippet((prev)=>!prev) } +======= +const CandidateSidebar = ({ candidate, position }) => { + const userId = localStorage.getItem('id') +>>>>>>> documents return (
@@ -53,10 +62,11 @@ const CandidateSidebar = ({ candidate, position, setActiveSnippet, activeSnippet Выбрать к собеседованию - + {userId && candidate.id === userId && ( +<<<<<<< HEAD {/* */} +
+ ) +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/ContentButton/contentButton.css b/src/components/features/bookkeeping/ContentButton/contentButton.css new file mode 100644 index 00000000..bf33661e --- /dev/null +++ b/src/components/features/bookkeeping/ContentButton/contentButton.css @@ -0,0 +1,22 @@ +.content-button { + font-family: "Muller"; + font-size: 22px; + letter-spacing: 1.1px; + cursor: pointer; + font-weight: 600; +} + +@media (max-width: 800px) { + .content-button { + max-width: 230px; + max-height: 65px; + } +} + +@media (max-width: 450px) { + .content-button { + max-width: 175px; + max-height: 60px; + font-size: 18px; + } +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/ContentTitle/ContentTitle.js b/src/components/features/bookkeeping/ContentTitle/ContentTitle.js new file mode 100644 index 00000000..7e1f529c --- /dev/null +++ b/src/components/features/bookkeeping/ContentTitle/ContentTitle.js @@ -0,0 +1,19 @@ +import React from "react" +import "./contentTitle.css" + +export const ContentTitle = (props) => { + return ( +
+
+
+

{props.title}

+
+ +
+

{props.description}

+
+ +
+
+ ) +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/ContentTitle/contentTitle.css b/src/components/features/bookkeeping/ContentTitle/contentTitle.css new file mode 100644 index 00000000..f8e580c4 --- /dev/null +++ b/src/components/features/bookkeeping/ContentTitle/contentTitle.css @@ -0,0 +1,31 @@ +.content__info-title h2 { + font-family: 'GT Eesti Pro Display'; + font-weight: 700; + font-size: 25px; + color: #000000; +} + +.content__info-title h2:after { + content: ""; + display: flex; + width: 315px; + height: 5px; + border-radius: 3px; + background-color: #54b611; + margin-top: 25px; + margin-bottom: 30px; +} + +.content__description h2 { + font-family: 'GT Eesti Pro Display'; + font-weight: 300; + font-size: 12px; + margin-bottom: 30px; +} + +@media (max-width: 450px) { + .content__info-title h2:after { + width: 200px; + } +} + diff --git a/src/components/features/bookkeeping/ContentTitleAbout/ContentTitleAbout.js b/src/components/features/bookkeeping/ContentTitleAbout/ContentTitleAbout.js new file mode 100644 index 00000000..745d3c0c --- /dev/null +++ b/src/components/features/bookkeeping/ContentTitleAbout/ContentTitleAbout.js @@ -0,0 +1,12 @@ +import React from "react"; +import "./contentTitleAbout.css" + +export const ContentTitleAbout = (props) => { + return ( +
+
+

{props.descriptionTitle}

+
+
+ ) +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/ContentTitleAbout/contentTitleAbout.css b/src/components/features/bookkeeping/ContentTitleAbout/contentTitleAbout.css new file mode 100644 index 00000000..22f0b66c --- /dev/null +++ b/src/components/features/bookkeeping/ContentTitleAbout/contentTitleAbout.css @@ -0,0 +1,7 @@ +.content__description-title h2 { + font-family: 'GT Eesti Pro Display'; + font-weight: 400; + font-size: 22px; + line-height: 36px; + padding-bottom: 29px; +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/ContractContent/ContractContent.js b/src/components/features/bookkeeping/ContractContent/ContractContent.js new file mode 100644 index 00000000..1569fbaa --- /dev/null +++ b/src/components/features/bookkeeping/ContractContent/ContractContent.js @@ -0,0 +1,97 @@ +import React, { useEffect, useState } from "react"; +import { ContentTitle } from "../ContentTitle/ContentTitle" +import { ContentButton } from "../ContentButton/ContentButton" +import { BookkeepingFormField } from "../BookkeepingFormField/BookkeepingFormField" +import { BookkepingSelect } from '../BookkepingSelect/BookkepingSelect'; +import { BookkepingInput } from '../BookkepingInput/BookkepingInput'; +import { fetchGet } from '../../../../server/server' +import { Link } from "react-router-dom" + +export const ContractContent = () => { + + const [templates, setTemplates] = useState([]) + const [selectedTemplate, setSelectedTemplate] = useState() + const [templatedFields, setTemplatedFields] = useState([]) + + useEffect(() => { + fetchGet({ + link: `${process.env.REACT_APP_API_URL}/api/document/get-document-list`, + }).then((res) => { + setTemplates(res) + }) + }, []) + + useEffect(() => { + if (selectedTemplate === undefined) { + return + } + fetchGet({ + link: `${process.env.REACT_APP_API_URL}/api/document/get-document?document_id=${selectedTemplate}`, + }) + .then((res) => { + setTemplatedFields(res[0].templateDocumentFields) + }) + }, [selectedTemplate]) + + return ( +
+
+ +
+ + +
+
+
Создание договора №
+ + от + +
+ {} + }} + /> + + {templatedFields.map((field, index ) => + + )} + +
+ Сохранить + +
+ Отменить +
+ +
+ +
+
+
+ ) +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/DocumentCard/DocumentCard.js b/src/components/features/bookkeeping/DocumentCard/DocumentCard.js new file mode 100644 index 00000000..11dc0186 --- /dev/null +++ b/src/components/features/bookkeeping/DocumentCard/DocumentCard.js @@ -0,0 +1,17 @@ +import React from "react" +import "./documentCard.css" +import { Link } from "react-router-dom" + +export const DocumentCard = (props) => { + return ( +
+
+ +
+
+
Добавить
+
{props.title}
+
+
+ ) +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/DocumentCard/documentCard.css b/src/components/features/bookkeeping/DocumentCard/documentCard.css new file mode 100644 index 00000000..d8038056 --- /dev/null +++ b/src/components/features/bookkeeping/DocumentCard/documentCard.css @@ -0,0 +1,68 @@ +.content-label-item { + display: flex; + width: 258px; + height: 112px; + border-radius: 20px; + background-color: #f9f9f9; + padding: 20px 20px; + margin-bottom: 94px; +} + +.content-label-item__img { + width: 60%; +} + +.content-label-item-img__pic { + position: relative; + top:7%; + left: -18%; +} + +.content-label-item__info { + width: 40%; +} + +.content-label-item__add { + line-height: 36px; + font-size: 12px; + font-family: 'GT Eesti Pro Display'; + font-weight: 300; + display: flex; + justify-content: end; + cursor: pointer; + position: relative; + color: black; +} + +.content-label-item__add:before, +.content-label-item__add:after { + cursor: pointer; + content: ""; + width: 10%; + height: 1px; + background-color: #54b611; + border-radius: 3px; + position: absolute; + z-index: 1; +} + +.content-label-item__add:before { + transform-origin: left top; + transform: rotate(90deg) + translate3d(0px, -2px, 0); + top: 14px; + left: 24px; +} + +.content-label-item__add:after { + transform-origin: left bottom; + bottom: 17px; + left: 21px; +} + +.content-label-item__title { + font-size: 18px; + font-family: 'GT Eesti Pro Display'; + font-weight: 400; + color: black; +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/Sidebar/Sidebar.css b/src/components/features/bookkeeping/Sidebar/Sidebar.css new file mode 100644 index 00000000..1408e27d --- /dev/null +++ b/src/components/features/bookkeeping/Sidebar/Sidebar.css @@ -0,0 +1,67 @@ +.nav { + width: 34%; + border: 1px solid #efefef; + background-color: rgb(249, 249, 249, 0.87); + height: 700px; + border-radius: 0 0 20px; + display: block; + width: 373px; +} + +.nav__btn-list { + display:grid; + justify-content: center; + margin-top: 55px; +} + +.nav__btn-item { + width: 280px; + height: 62px; + border-radius: 31px; + border-style: none; + cursor: pointer; + font-size: 16px; + font-family: "Muller"; + font-weight: 700; + letter-spacing: 0.8px; + color: #5cb42c; + border: 2px solid #54b611; + background-color: #fdfdfd; + margin-top: 20px; +} + +.nav__btn-item--selected { + background-image: linear-gradient(to top, #6aaf5c 0%, #52b709 100%), linear-gradient(36deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 47%, rgba(255, 255, 255, 0.17) 50%, rgba(255, 255, 255, 0) 100%); + box-shadow: 6px 5px 20px rgba(82, 151, 34, 0.21); + color: #ffffff; +} + +.adaptive { + display: none; +} + +@media (max-width: 1240px) { + .nav { + width: 100%; + max-height: 450px; + background: none; + border:none; + height: auto; + } + .nav__btn-list { + margin-top: 0; + } + .nav__btn-item { + display: none; + } + .adaptive { + display: block; + } +} + +@media (max-width: 450px) { + .nav__btn-item { + width: 210px; + font-size: 14px; + } +} \ No newline at end of file diff --git a/src/components/features/bookkeeping/Sidebar/Sidebar.js b/src/components/features/bookkeeping/Sidebar/Sidebar.js new file mode 100644 index 00000000..f7e65d9d --- /dev/null +++ b/src/components/features/bookkeeping/Sidebar/Sidebar.js @@ -0,0 +1,26 @@ +import React from "react" +import "./Sidebar.css" +import { Link } from "react-router-dom" +import { useLocation } from 'react-router-dom' + +const getActiveStatus = ({ pathName, location }) => { + const pathNameRegex = new RegExp(pathName,'g') + return ( + location.pathname.match(pathNameRegex) ? "nav__btn-item nav__btn-item--selected" : "nav__btn-item") +} + +export const Sidebar = () => { + const location = useLocation(); + + return( +
+
+ + + + + +
+
+ ) +} \ No newline at end of file diff --git a/src/images/Contract.png b/src/images/Contract.png new file mode 100644 index 00000000..4ae286d7 Binary files /dev/null and b/src/images/Contract.png differ diff --git a/src/images/Reporting-1.png b/src/images/Reporting-1.png new file mode 100644 index 00000000..f45411a3 Binary files /dev/null and b/src/images/Reporting-1.png differ diff --git a/src/images/Reporting-2.png b/src/images/Reporting-2.png new file mode 100644 index 00000000..bfafb4fb Binary files /dev/null and b/src/images/Reporting-2.png differ diff --git a/src/images/Reporting-3.png b/src/images/Reporting-3.png new file mode 100644 index 00000000..7cba2b60 Binary files /dev/null and b/src/images/Reporting-3.png differ diff --git a/src/images/Tax.png b/src/images/Tax.png new file mode 100644 index 00000000..a32d7c31 Binary files /dev/null and b/src/images/Tax.png differ diff --git a/src/images/Taxes.png b/src/images/Taxes.png new file mode 100644 index 00000000..4ee6c62b Binary files /dev/null and b/src/images/Taxes.png differ diff --git a/src/images/act.png b/src/images/act.png new file mode 100644 index 00000000..a62cec03 Binary files /dev/null and b/src/images/act.png differ diff --git a/src/images/money.png b/src/images/money.png new file mode 100644 index 00000000..2e0416a2 Binary files /dev/null and b/src/images/money.png differ diff --git a/src/pages/ActPage.js b/src/pages/ActPage.js new file mode 100644 index 00000000..ea89a220 --- /dev/null +++ b/src/pages/ActPage.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { ActContent } from "../components/features/bookkeeping/ActContent/ActContent" +import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete" + +export const ActPage = () => { + return ( +
+ + + +
+ ) +} \ No newline at end of file diff --git a/src/pages/Bookkeeping.js b/src/pages/Bookkeeping.js new file mode 100644 index 00000000..ad0a9c1d --- /dev/null +++ b/src/pages/Bookkeeping.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete" +import { BookkeepingContent } from "../components/features/bookkeeping/BookkeepingContent/BookkeepingContent" + + + +const Bookkeeping = () => { + return( +
+ + + +
+ ) +} + +export default Bookkeeping + diff --git a/src/pages/ContractPage.js b/src/pages/ContractPage.js new file mode 100644 index 00000000..2592c2ab --- /dev/null +++ b/src/pages/ContractPage.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete" +import { ContractContent } from "../components/features/bookkeeping/ContractContent/ContractContent" + +export const ContractPage = () => { + return ( +
+ + + +
+ ) +} diff --git a/src/pages/MoneyPage.js b/src/pages/MoneyPage.js new file mode 100644 index 00000000..158c7c56 --- /dev/null +++ b/src/pages/MoneyPage.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete" +import { MoneyContent } from "../components/features/Money/MoneyContent" + +export const MoneyPage = () => { + return ( +
+ + + +
+ ) +} \ No newline at end of file diff --git a/src/pages/TaxPage.js b/src/pages/TaxPage.js new file mode 100644 index 00000000..a53d21b6 --- /dev/null +++ b/src/pages/TaxPage.js @@ -0,0 +1,11 @@ +import React from 'react'; +import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete" +import { TaxContent } from "../components/features/Taxes/TaxContent/TaxContent" + +export const TaxPage = () => { + return ( + + + + ) +} \ No newline at end of file diff --git a/src/redux/outstaffingSlice.js b/src/redux/outstaffingSlice.js index 4c147280..304ad4ca 100644 --- a/src/redux/outstaffingSlice.js +++ b/src/redux/outstaffingSlice.js @@ -35,10 +35,13 @@ export const outstaffingSlice = createSlice({ setPositionId: (state, action) => { state.positionId = action.payload; }, + setUserInfo: (state, action) => { + state.userInfo = action.payload; + } }, }); -export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId } = outstaffingSlice.actions; +export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo } = outstaffingSlice.actions; export const selectProfiles = (state) => state.outstaffing.profiles; export const selectTags = (state) => state.outstaffing.tags; @@ -47,5 +50,6 @@ export const selectItems = (state) => state.outstaffing.selectedItems; export const selectCurrentCandidate = (state) => state.outstaffing.currentCandidate; export const selectAuth = (state) => state.outstaffing.auth; export const getPositionId = (state) => state.outstaffing.positionId; +export const selectUserInfo = (state) => state.outstaffing.userInfo; export default outstaffingSlice.reducer; diff --git a/src/server/server.js b/src/server/server.js index 0e09d4ef..ff49d1e9 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -54,7 +54,7 @@ export const fetchAuth = async ({ 'access_token_expired_at', resJSON.access_token_expired_at ) - dispatch() + dispatch(resJSON) }) } catch (error) { console.error('Error occured: ', error)