tracker-connect
This commit is contained in:
@ -6,10 +6,15 @@ import archiveSet from "../../images/archive.svg";
|
||||
import del from "../../images/delete.svg";
|
||||
import edit from "../../images/edit.svg";
|
||||
|
||||
// import {apiRequest} from "../../api/request";
|
||||
import {useDispatch} from "react-redux";
|
||||
import { setProjectBoardFetch } from "../../redux/projectsTrackerSlice";
|
||||
|
||||
import "./projectTiket.scss";
|
||||
|
||||
export const ProjectTiket = ({ project, index, setOpenProject }) => {
|
||||
const [modalSettings, setModalSettings] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
initListeners();
|
||||
@ -32,11 +37,14 @@ export const ProjectTiket = ({ project, index, setOpenProject }) => {
|
||||
|
||||
return (
|
||||
<div className="project" key={index}>
|
||||
<h3 onClick={() => setOpenProject(true)}>{project.name}</h3>
|
||||
<h3 onClick={() =>{
|
||||
setOpenProject(true)
|
||||
dispatch(setProjectBoardFetch(project.id))
|
||||
}}>{project.name}</h3>
|
||||
<div className="project__info">
|
||||
<p>Открытые задачи</p>
|
||||
<span className="count">{project.count}</span>
|
||||
<span className="add">+</span>
|
||||
<span className="count">-</span>
|
||||
{/*<span className="add">{project.columns.length ? '+' : ''}</span>*/}
|
||||
<span className="menu-settings" onClick={() => setModalSettings(true)}>
|
||||
...
|
||||
</span>
|
||||
|
@ -20,7 +20,7 @@
|
||||
padding: 60px 60px 30px 60px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@ -34,14 +34,14 @@
|
||||
height: 35px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-weight: 500;
|
||||
font-size: 22px;
|
||||
font-size: 17px;
|
||||
line-height: 26px;
|
||||
color: #263238 !important;
|
||||
margin-bottom: 22px !important;
|
||||
}
|
||||
|
||||
&__decs {
|
||||
@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
.button-add {
|
||||
margin: 20px 40% 0 0;
|
||||
margin: 20px;
|
||||
width: 130px;
|
||||
height: 37px;
|
||||
background: #52b709;
|
||||
|
@ -13,21 +13,15 @@ export const ModalCreate = ({ active, setActive, title }) => {
|
||||
if (inputValue === "") {
|
||||
return;
|
||||
} else {
|
||||
let newItem = {
|
||||
name: inputValue,
|
||||
count: 0,
|
||||
};
|
||||
apiRequest('/project/create', {
|
||||
method: 'POST',
|
||||
data: {
|
||||
user_id: localStorage.getItem('id'),
|
||||
name: inputValue,
|
||||
status: 1,
|
||||
// description: '',
|
||||
// company_id: 3
|
||||
}
|
||||
}).then((res) => {
|
||||
dispatch(setProject(newItem));
|
||||
dispatch(setProject(res));
|
||||
setActive(false);
|
||||
setInputValue("");
|
||||
})
|
||||
|
Reference in New Issue
Block a user