diff --git a/.gitignore b/.gitignore index 6ba2bc0a..6cf1c894 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ node_modules postgres Docker_Postgre -cards-test.js + diff --git a/Guid.txt b/Guid.txt index 26edc24f..32b8175a 100644 --- a/Guid.txt +++ b/Guid.txt @@ -1,6 +1,6 @@ How to start Tracker_Back - sudo docker run --rm --name work_db -e POSTGRES_PASSWORD=1 -e POSTGRES_USER=sergey1 -e POSTGRES_DB=work_db -d -p 5433:5432 -v $HOME/Documents/last_commits/Project_Management/Docker_Postgre:/var/lib/postgresql/data postgres + sudo docker run --rm --name pmt-db -e POSTGRES_PASSWORD=1 -e POSTGRES_USER=sergey1 -e POSTGRES_DB=pmt-db -d -p 5433:5432 -v $HOME/Documents/App-Project_Management-DEV/Docker_Postgre:/var/lib/postgresql/data postgres sudo ss -lptn 'sport = :5432' sudo kill 931 docker-compose up @@ -11,4 +11,4 @@ How to start Tracker_Back - \ No newline at end of file + diff --git a/PMT-Client/.gitignore b/PMT-Client/.gitignore new file mode 100644 index 00000000..94c511a0 --- /dev/null +++ b/PMT-Client/.gitignore @@ -0,0 +1,4 @@ +.env +node_modules/ +build/ + diff --git a/Tracker_Front/README.md b/PMT-Client/README.md similarity index 100% rename from Tracker_Front/README.md rename to PMT-Client/README.md diff --git a/Tracker_Front/package-lock.json b/PMT-Client/package-lock.json similarity index 100% rename from Tracker_Front/package-lock.json rename to PMT-Client/package-lock.json diff --git a/Tracker_Front/package.json b/PMT-Client/package.json similarity index 100% rename from Tracker_Front/package.json rename to PMT-Client/package.json diff --git a/Tracker_Front/build/favicon.ico b/PMT-Client/public/favicon.ico similarity index 100% rename from Tracker_Front/build/favicon.ico rename to PMT-Client/public/favicon.ico diff --git a/Tracker_Front/public/index.html b/PMT-Client/public/index.html similarity index 97% rename from Tracker_Front/public/index.html rename to PMT-Client/public/index.html index aa069f27..ae4d185c 100644 --- a/Tracker_Front/public/index.html +++ b/PMT-Client/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Project Managment Tool diff --git a/Tracker_Front/build/logo192.png b/PMT-Client/public/logo192.png similarity index 100% rename from Tracker_Front/build/logo192.png rename to PMT-Client/public/logo192.png diff --git a/Tracker_Front/build/logo512.png b/PMT-Client/public/logo512.png similarity index 100% rename from Tracker_Front/build/logo512.png rename to PMT-Client/public/logo512.png diff --git a/Tracker_Front/build/manifest.json b/PMT-Client/public/manifest.json similarity index 100% rename from Tracker_Front/build/manifest.json rename to PMT-Client/public/manifest.json diff --git a/Tracker_Front/build/robots.txt b/PMT-Client/public/robots.txt similarity index 100% rename from Tracker_Front/build/robots.txt rename to PMT-Client/public/robots.txt diff --git a/PMT-Client/src/Component/Footer/Footer.js b/PMT-Client/src/Component/Footer/Footer.js new file mode 100644 index 00000000..d0c75c3f --- /dev/null +++ b/PMT-Client/src/Component/Footer/Footer.js @@ -0,0 +1,21 @@ + +import React from 'react'; +import '../../Styles/styleFooter.css' +const Footer = () => { + return ( +
+
+ +
+ +
+ ); +}; + +export default Footer; \ No newline at end of file diff --git a/PMT-Client/src/Component/Header/NavBar.js b/PMT-Client/src/Component/Header/NavBar.js new file mode 100644 index 00000000..a72d32a2 --- /dev/null +++ b/PMT-Client/src/Component/Header/NavBar.js @@ -0,0 +1,83 @@ +import React, { useState } from "react" +import 'bootstrap/dist/css/bootstrap.min.css'; +import {Nav, Navbar, Container, NavDropdown, Dropdown, Row, Col, Stack} from 'react-bootstrap/' +import "../../Styles/styleHeader.css" + +import { useHistory } from "react-router"; +import { useDispatch, useSelector } from "react-redux"; +import { user_logout } from "../../store/actions/auth"; + + +export default function NavBar(){ + const history = useHistory(); + const dispatch = useDispatch() + const data = useSelector((state) => state.Auth.data_user) + let name_user = null + data.map((item) => { + name_user = item.name_user + }) + + let isauth = useSelector((state) => state.Auth.authenticate) + + const handle_logout =() =>{ + dispatch(user_logout()) + localStorage.setItem('token', null) + window.location.replace("/") + } + + return( +
+ + + history.push("/startp")}> + startUP! Factory + + + + + + {isauth ? ( + <> + + + + + ) : ( + <> + + + + )} + + + +
+ + ) +} + + + diff --git a/PMT-Client/src/Component/Main/AboutUs.js b/PMT-Client/src/Component/Main/AboutUs.js new file mode 100644 index 00000000..23b9fca8 --- /dev/null +++ b/PMT-Client/src/Component/Main/AboutUs.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const AboutUs = () => { + return ( +
+ Welcome! +
+ ); +}; + +export default AboutUs; \ No newline at end of file diff --git a/PMT-Client/src/Component/Main/Auth.js b/PMT-Client/src/Component/Main/Auth.js new file mode 100644 index 00000000..4ecc48bd --- /dev/null +++ b/PMT-Client/src/Component/Main/Auth.js @@ -0,0 +1,67 @@ +import React, { useEffect, useState } from 'react' +import {Form, Row, Col, Button} from 'react-bootstrap' +import { connect, useDispatch, useSelector } from 'react-redux'; +import { useHistory } from 'react-router'; + +import '../../Styles/styleAuth.css' +import f11 from '../../Styles/img/f11.svg' +import { auth, req_auth } from '../../store/operations/auth'; +import { ROUTES } from '../../constans/constans'; + + export default function Auth(){ + const dispatch = useDispatch() + const history = useHistory(); + + const [stateEmail, setEmail] = useState("") + const [statePassword, setPassword] = useState("") + const [stateName, setName] = useState("") + + const authenticate = useSelector((state) => state.Auth.authenticate) + const obj = {email: stateEmail, password: statePassword, name: stateName} + + useEffect(() => { + if(authenticate == true){ + // alert('Authorization was successful!!!'); + history.push('/create_profiles_page') //Переход на создание профиля + } + }, [authenticate]) + + const handleSub = _event => { + if(obj.email, obj.password, obj.name === ''){ + alert('fild form'); + }else{ + dispatch(auth(obj, ROUTES.AUTH.SIGNUP)) //-----REQ + } + } + + return ( +
+
+ + setName(e.target.value)}> + Name + + + + setEmail(e.target.value)}> + Email + + + + setPassword(e.target.value)}> + Password + + + + + + + + + +
+
+
+ ) +} + diff --git a/Tracker_Front/src/Component/Main/Chat.js b/PMT-Client/src/Component/Main/Chat.js similarity index 100% rename from Tracker_Front/src/Component/Main/Chat.js rename to PMT-Client/src/Component/Main/Chat.js diff --git a/Tracker_Front/src/Component/Main/Create.js b/PMT-Client/src/Component/Main/Create.js similarity index 97% rename from Tracker_Front/src/Component/Main/Create.js rename to PMT-Client/src/Component/Main/Create.js index f2ceb02e..0dd1cfa5 100644 --- a/Tracker_Front/src/Component/Main/Create.js +++ b/PMT-Client/src/Component/Main/Create.js @@ -1,4 +1,4 @@ - + import React, { useEffect } from 'react' import { Form, Button } from 'react-bootstrap' import { connect, useDispatch, useSelector } from 'react-redux'; @@ -16,7 +16,7 @@ const mapStateToProps = (state) => { }; function Create(){ const dispatch = useDispatch() - const history = useHistory(); + const history = useHistory() const state = useSelector((state) => state) const email = useSelector((state) => state.setAuth.email) @@ -38,7 +38,7 @@ const mapStateToProps = (state) => { else{ dispatch(reqcreateProject(obj)) } - } + bdb} return (
Create new project
diff --git a/Tracker_Front/src/Component/Main/Login.js b/PMT-Client/src/Component/Main/Login.js similarity index 66% rename from Tracker_Front/src/Component/Main/Login.js rename to PMT-Client/src/Component/Main/Login.js index 42126eb8..c72e36ca 100644 --- a/Tracker_Front/src/Component/Main/Login.js +++ b/PMT-Client/src/Component/Main/Login.js @@ -6,46 +6,30 @@ import { LOGIN, SETEMAIL, SETPASSWORD } from '../../Utils/redux/redux-types' import { reqlogin } from '../../Utils/redux/actions'; import f8 from '../../Styles/img/f8.svg' import '../../Styles/styleLogin.css' +import { login } from '../../store/operations/auth'; +import { ROUTES } from '../../constans/constans'; -const mapDispatchToProps = { - reqlogin, -}; -const mapStateToProps = (state) => { - return { - store: state.reducer.success - } -}; - - function LogForm(){ +export default function LogForm(){ const dispatch = useDispatch() const history = useHistory(); const [stateEmail, setEmail] = useState("") const [statePassword, setPassword] = useState("") - const state = useSelector((state) => state) - const email = useSelector((state) => state.setAuth.email) - const password = useSelector((state) => state.setAuth.password) - - const obj = {email: email, password: password} - - const handleDispatch = _event => { - dispatch({type: SETEMAIL, payload: stateEmail}) - dispatch({type: SETPASSWORD, payload: statePassword}) -} + const authenticate = useSelector((state) => state.Auth.authenticate) + const obj = {email: stateEmail, password: statePassword} useEffect(() => { - if(state.reducer.success){ - dispatch({type: LOGIN, payload: true }) - history.push('/startp') + if(authenticate == true){ + history.push('/startp') //...переход по определенному профилю для пользователя } - }, [state.reducer.success]) + }, [authenticate]) const handlesub = _event => { if(obj.email, obj.password === ''){ alert('fild form'); }else{ - dispatch(reqlogin(obj)) + dispatch(login(obj, ROUTES.AUTH.LOGIN)) //----REQ } } @@ -62,17 +46,16 @@ const mapStateToProps = (state) => { Email address We'll never share your email with anyone else. - - + setPassword(e.target.value)}> Password - + {/* - + */}
@@ -82,5 +65,5 @@ const mapStateToProps = (state) => { ) } -export default connect(mapStateToProps, mapDispatchToProps)(LogForm); + diff --git a/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateDevProfile.js b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateDevProfile.js new file mode 100644 index 00000000..4a772a97 --- /dev/null +++ b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateDevProfile.js @@ -0,0 +1,92 @@ +import React, { useState } from 'react'; +import { Form, Col } from 'react-bootstrap'; +import '../../../../Styles/styleCreateDevProfile.css' +import devimg2 from '../../../../Styles/img/dev4.jpg' +import devimg3 from '../../../../Styles/img/dev5.jpg' +import { Button } from 'react-bootstrap'; +import { useHistory } from 'react-router'; +import { useDispatch } from 'react-redux'; +import { FloatingLabel } from 'react-bootstrap'; +import { create_profile_dev } from '../../../../store/operations/profile'; +import { ROUTES } from '../../../../constans/constans'; + +const CreateDevProfile = () => { + + const history = useHistory() + const dispatch = useDispatch() + + const [FirstName, setFirstName] = useState("") + const [LastName, setLastName] = useState("") + const [Country, setCountry] = useState("") + const [WorkExp, setWorkExp] = useState("") + const [Proffetion, setProff] = useState("") + const [Stack, setStack] = useState('') + + const obj = {fname: FirstName, lname: LastName, country: Country, workexp: WorkExp, proff: Proffetion, stack: Stack} + + const handleCreateProfile = () => { + if (obj.fname, obj.lname, obj.country, obj.workexp === '') { + alert('fild form'); + }else{ + dispatch(create_profile_dev(obj, ROUTES.PROFILE.CREATING_PROFILE.CREATE_DEVELOPER_PROFILE)) + } + } + + return ( +
+
+

startUP!Factory - Developer

+

Sign up for your Profile for Developers

+ +
+ setFirstName(e.target.value)}> + + + + setLastName(e.target.value)}> + + + + setCountry(e.target.value)}> + + + + setWorkExp(e.target.value)}> + + + + + + + + + + setProff(e.target.value)}> + + + + + + + + + + setStack(e.target.value)}> + + + + + +
+ + + +
+ + + +
+ ); +}; + +export default CreateDevProfile; \ No newline at end of file diff --git a/PMT-Client/src/Component/Main/Profiles/creating_profile/CreatePMProfile.js b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreatePMProfile.js new file mode 100644 index 00000000..c7f09495 --- /dev/null +++ b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreatePMProfile.js @@ -0,0 +1,51 @@ +import React from 'react'; +import '../../../../Styles/styleCreatePMProfile.css' +import { Form, Col } from 'react-bootstrap'; +import devimg2 from '../../../../Styles/img/dev4.jpg' +import devimg3 from '../../../../Styles/img/dev5.jpg' +import { Button } from 'react-bootstrap'; + +const CreatePMProfile = () => { + return ( +
+
+

startUP!Factory - Creator

+

Sign up for your Profile for Creator

+ +
+ + + + + + + + + + + + + + + + setProffetion(e.target.value)}*/> + + + + + + + + + + +
+
+ + + +
+ ); +}; + +export default CreatePMProfile; \ No newline at end of file diff --git a/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateProfiles.js b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateProfiles.js new file mode 100644 index 00000000..d4aeea29 --- /dev/null +++ b/PMT-Client/src/Component/Main/Profiles/creating_profile/CreateProfiles.js @@ -0,0 +1,76 @@ +import React, { useEffect } from 'react'; +import { Button } from 'react-bootstrap'; +import { Card } from 'react-bootstrap'; +import '../../../../Styles/styleCreateProfiles.css' +import f8 from '../../../../Styles/img/f10.jpg' +import devimg from '../../../../Styles/img/dev.jpg' +import pmimg from '../../../../Styles/img/PM.jpg' +import { useHistory } from 'react-router'; + +const CreateProfiles = () => { console.log("dev") + const history = useHistory() + + const handle_crete_dev_profile = () => { + + history.push('/create_dev_profile') + } + + const handle_crete_pm_profile = () => { + history.push('/create_pm_profile') + } + + return ( +
+ +
+ +
+

Работайте в команде

+

Приймите участие в создании проекта и выводите продуктивность на новый уровень собственным уникальным способом вместе с startUP! Factory.

+
+ + {/* */} +
+ +
+ +
+ + + + Developer Profile + Developer + + Some quick example text to build on the card title and make up the bulk of + the card's content. + +
+ +
+
+
+ +
+ + + + Creator Profile + Project Manager + + Some quick example text to build on the card title and make up the bulk of + the card's content.Some quick example text to build on the card title and make up the bulk of + + + +
+ +
+
+
+
+ +
+ ); +}; + +export default CreateProfiles; \ No newline at end of file diff --git a/Tracker_Front/src/Component/Footer/Style_Header.css b/PMT-Client/src/Component/Main/Profiles/user_profiles/adminProfile.js similarity index 100% rename from Tracker_Front/src/Component/Footer/Style_Header.css rename to PMT-Client/src/Component/Main/Profiles/user_profiles/adminProfile.js diff --git a/Tracker_Front/src/Styles/indexstyle.css b/PMT-Client/src/Component/Main/Profiles/user_profiles/devProfile.js similarity index 100% rename from Tracker_Front/src/Styles/indexstyle.css rename to PMT-Client/src/Component/Main/Profiles/user_profiles/devProfile.js diff --git a/Tracker_Front/src/config/config.js b/PMT-Client/src/Component/Main/Profiles/user_profiles/pmProfile.js similarity index 100% rename from Tracker_Front/src/config/config.js rename to PMT-Client/src/Component/Main/Profiles/user_profiles/pmProfile.js diff --git a/Tracker_Front/src/Component/Main/Project.js b/PMT-Client/src/Component/Main/Project.js similarity index 100% rename from Tracker_Front/src/Component/Main/Project.js rename to PMT-Client/src/Component/Main/Project.js diff --git a/PMT-Client/src/Component/Main/StartPage.js b/PMT-Client/src/Component/Main/StartPage.js new file mode 100644 index 00000000..820a8e1a --- /dev/null +++ b/PMT-Client/src/Component/Main/StartPage.js @@ -0,0 +1,64 @@ + +import React from "react" +import {Button, ButtonGroup, Card, Col, Container, Row } from "react-bootstrap" + +import '../../Styles/styleStartPage.css' +import f7 from '../../Styles/img/f7.svg' +import f8 from '../../Styles/img/f8.svg' +import f10 from '../../Styles/img/f10.jpg' + +export default function StartPage(){ + + return( + +
+ +
+
+ +
+

Работайте в команде

+

Приймите участие в создании проекта и выводите продуктивность на новый уровень собственным уникальным способом вместе с startUP! Factory.

+
+ +
+
+
+
+ +
+ +
+ +
+

Создайте свой проект и свою команду.

+

Придумайте свой проект и начните планровать с помощью досок, колонок и карточек, а затем переходите к более сложным функциям. Создавайте проекты и управляйте ими, упорядочивайте задачи и поддерживайте командный дух — все это в startUP! Factory.

+
+
+
+
+ + +
+ +
+ +
+
+

Функции для эффективной командной работы.

+

Продуктивность команды зависит от эффективных инструментов и комфортной рабочей обстановки. Интуитивно понятные функции startUP! Factory позволяют команде быстро настроить рабочие процессы для любых задач: от совещаний и проектов до мероприятий и постановки целей.

+
+ +
+
+
+
+ + +
+ +
+ + + ) +} diff --git a/Tracker_Front/src/Component/Main/Tracker.js b/PMT-Client/src/Component/Main/Tracker.js similarity index 100% rename from Tracker_Front/src/Component/Main/Tracker.js rename to PMT-Client/src/Component/Main/Tracker.js diff --git a/Tracker_Front/src/Component/Main/vueProject/Developers.js b/PMT-Client/src/Component/Main/vueProject/Developers.js similarity index 100% rename from Tracker_Front/src/Component/Main/vueProject/Developers.js rename to PMT-Client/src/Component/Main/vueProject/Developers.js diff --git a/Tracker_Front/src/Component/Main/vueProject/Tasks.js b/PMT-Client/src/Component/Main/vueProject/Tasks.js similarity index 100% rename from Tracker_Front/src/Component/Main/vueProject/Tasks.js rename to PMT-Client/src/Component/Main/vueProject/Tasks.js diff --git a/Tracker_Front/src/Component/Main/vueProject/VueProject.js b/PMT-Client/src/Component/Main/vueProject/VueProject.js similarity index 100% rename from Tracker_Front/src/Component/Main/vueProject/VueProject.js rename to PMT-Client/src/Component/Main/vueProject/VueProject.js diff --git a/PMT-Client/src/Nav.js b/PMT-Client/src/Nav.js new file mode 100644 index 00000000..4bacb433 --- /dev/null +++ b/PMT-Client/src/Nav.js @@ -0,0 +1,63 @@ +import React, { useEffect } from 'react' +import { useDispatch, useSelector } from 'react-redux'; +import { + BrowserRouter as Router, + Switch, + Route, +} from "react-router-dom"; + +import Auth from './Component/Main/Auth'; +import Login from './Component/Main/Login'; +// import Vue_Project from './Component/Main/vueProject/VueProject'; +import GuardedRoute from './Utils/GuardPro'; +import StartPage from './Component/Main/StartPage' +// import Tracker from './Component/Main/Tracker' +// import Project from './Component/Main/Project' +// import Create from './Component/Main/Create' +import NavBar from './Component/Header/NavBar'; + +// import { reqChekToken } from './Utils/redux/actions'; +// import { Container } from 'react-bootstrap'; +// import Footer from './Component/Footer/Footer'; +import AboutUs from './Component/Main/AboutUs'; + +import CreatePMProfile from './Component/Main/Profiles/creating_profile/CreatePMProfile'; +import CreateDevProfile from './Component/Main/Profiles/creating_profile/CreateDevProfile'; +import CreateProfiles from './Component/Main/Profiles/creating_profile/CreateProfiles'; + + + +export default function Nav(){ + // const item = useSelector((state) => state.enter) + // const dispatch = useDispatch() + // useEffect(() => { + // const token = localStorage.getItem('token') + // dispatch(reqChekToken(token)) + // }, []) + return ( + + + + + + {/* + + + */} + {/* */} + + + + + + + + + + + + {/*