Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
zheki4sh05 committed Nov 8, 2024
1 parent 4cdded3 commit 433cb61
Show file tree
Hide file tree
Showing 18 changed files with 1,801 additions and 6,195 deletions.
7,635 changes: 1,621 additions & 6,014 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.15",
"@mui/material": "^5.15.15",
"@mui/x-date-pickers": "^7.1.0",
"@mui/x-tree-view": "^7.5.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^6.1.6",
"@mui/material": "^6.1.6",
"@mui/x-date-pickers": "^7.22.1",
"@mui/x-tree-view": "^7.22.1",
"@reduxjs/toolkit": "^2.2.3",
"@syncfusion/ej2-react-gantt": "^25.2.3",
"@tanstack/react-query": "^5.28.14",
"axios": "^1.6.8",
"date-fns": "^3.6.0",
"dayjs": "^1.11.10",
"mui-color-input": "^2.0.3",
"mui-file-input": "^4.0.4",
"mui-color-input": "^4.0.2",
"mui-file-input": "^6.0.0",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-color": "^2.19.3",
Expand Down
7 changes: 0 additions & 7 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ function App() {
element:<MyTasksPage/>
},
{
path:PathConstants.CALENDAR,
element:<CalendarPage/>
},
{
path:PathConstants.PROCESSES,
element:<ProcessesPage/>
},{
path:PathConstants.DOCUMENTS,
element:<DocumentsPage/>
},{
Expand Down
4 changes: 3 additions & 1 deletion src/Components/AsideBox/AsideBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function AsideBox() {

return (
<>
<Box sx={{ pt: 2,mr:1 }}>
<Box >
<Box
sx={{
display: "flex",
Expand All @@ -109,6 +109,8 @@ function AsideBox() {
boxSizing: "border-box",
height: "auto",
boxShadow: 2,
maxWidth:"80px",
margin:"0 auto"
}}
>
<IconButton onClick={toggleDrawer("right", true, "chat")}>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/AssignmentComponents/ToDoList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { useEffect, useState } from "react";

function ToDoList({handleTodos, initialList=[]}) {
console.log(initialList)

const [inputVal, setInputVal] = useState("");
const [todos, setTodos] = useState(initialList);
const [isEdited, setIsEdited] = useState(false);
Expand Down
9 changes: 0 additions & 9 deletions src/Components/CustomTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ EnhancedTableToolbar.propTypes = {
};

const CustomTable = memo(({ rows = [], tableTitle, tableHeadCells })=> {
console.log("CustomTable")
console.log(rows)
const [order, setOrder] = React.useState("asc");
const [orderBy, setOrderBy] = React.useState("calories");
const [selected, setSelected] = React.useState([]);
Expand Down Expand Up @@ -398,13 +396,6 @@ const CustomTable = memo(({ rows = [], tableTitle, tableHeadCells })=> {
{row[cell.id]}
</TableCell>
))}

{/* <TableCell align="left">{row.name}</TableCell>
<TableCell align="left">{row.done}</TableCell>
<TableCell align="left">{row.start}</TableCell>
<TableCell align="left">{row.workers}</TableCell>
<TableCell align="left">{row.role}</TableCell>
<TableCell align="left">{row.access}</TableCell> */}
</TableRow>
);
})}
Expand Down
23 changes: 10 additions & 13 deletions src/Components/SearchBar/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,33 @@ export default function SearchBar({
placeHolder = "Поиск",
handleSearch,
}) {
console.log(" placeHolder" + placeHolder);

return (
<Paper
component="form"
elevation={elevation | 0}
sx={{
display: "flex",
alignItems: "center",
width: 300,
width: "100%",
height:40,
bgcolor: "white",
borderRadius:"10px",
padding:"10px",
boxSizing:"border-box",

}}
onSubmit={handleSearch}
>
{/* <InputBase
<InputBase
id="input"

sx={{ ml: 1, flex: 1 }}
sx={{ ml: 1, flex: 1,fontSize:"16px" }}
placeholder={placeHolder}
inputProps={{ 'aria-label': 'Поиск' }}

/> */}
<TextField
id="input"
name="input"
sx={{ flex: 1 }}

siz="small"
variant="standard"

/>

<IconButton type="submit" sx={{ p: "5px" }} aria-label="search">
<SearchIcon />
</IconButton>
Expand Down
27 changes: 9 additions & 18 deletions src/Components/UserDrawer/UserDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import TimelineIcon from '@mui/icons-material/Timeline';
import DescriptionIcon from '@mui/icons-material/Description';
import AssignmentIndIcon from '@mui/icons-material/AssignmentInd';
import Diversity3Icon from '@mui/icons-material/Diversity3';
import { Typography } from "@mui/material";
const drawerWidth = 240;

const openedMixin = (theme) => ({
Expand Down Expand Up @@ -85,16 +86,6 @@ const menu_items = [
name:"Мои задачи",
icon: <AssignmentReturnedIcon />
},
{
path:PathConstants.CALENDAR,
name:"Календарь",
icon: <CalendarMonthIcon/>
},
{
path:PathConstants.PROCESSES,
name:"Процессы",
icon: <TimelineIcon />
},
{
path:PathConstants.DOCUMENTS,
name:"Документы",
Expand Down Expand Up @@ -128,14 +119,11 @@ export default function UserDrawer() {
};

return (
<Box sx={{
height:"100%",

}}>

<Drawer
variant="permanent"
open={open}
sx={{ position: "relative", mt: 2, height:"100%",marginLeft:"10px",borderRadius:"10px" }}
sx={{ position: "relative", height:"100%",borderRadius:"10px",maxWidth:"240px"}}
PaperProps={{ sx: { position: "relative", height:"100%", bgcolor:"#6495ED" } }}
>
<Box sx={{ display: "flex", alignItems: "center", width: "100%" }}>
Expand Down Expand Up @@ -176,10 +164,13 @@ export default function UserDrawer() {

{item.icon}
</ListItemIcon>

<ListItemText

primary={item.name}
sx={{ opacity: open ? 1 : 0, color:"white" }}
primary={(<Typography variant="h6" sx={{textDecoration:"none"}} >
{item.name}
</Typography>)}
sx={{ opacity: open ? 1 : 0, color:"white",textDecoration:"none" }}
/>
</ListItemButton>
</Link>
Expand All @@ -188,6 +179,6 @@ export default function UserDrawer() {
)}
</List>
</Drawer>
</Box>

);
}
22 changes: 1 addition & 21 deletions src/Containers/AssignmentsPage.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { Box } from "@mui/material";
import SearchBox from "./../Components/SearchBox/SearchBox";
import CustomTable from "./../Components/CustomTable";
import CustomTabPanel from "./../Components/CustomTabPanel/CustomTabPanel";
import { useEffect, useMemo, useState } from "react";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import PageInfo from "../Components/PageInfo";
import CreateAssignment from "../Components/CreateAssignment";
import DialogContext from "../Components/DialogContext";
Expand Down Expand Up @@ -71,23 +67,7 @@ function AssignmentsPage() {
]}
/>

<CustomTabPanel
content={{
tabNames: ["Список", "Календарь", "Канбан"],
}}
>
<AssignmentTable assignments={assignments}/>
<Typography variant="h5" gutterBottom>
контент 1
</Typography>

<Typography variant="h5" gutterBottom>
контент 3
</Typography>
<Typography variant="h5" gutterBottom>
контент 4
</Typography>
</CustomTabPanel>
<AssignmentTable assignments={assignments}/>

<CreateAssignment

Expand Down
23 changes: 0 additions & 23 deletions src/Containers/DocumentsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,6 @@ const DocumentsPage = memo(()=> {
},
]}
/>

{/* {projects.length > 0 ? (
<FormControl fullWidth>
<InputLabel id="demo-simple-select-label">
Выбрать область
</InputLabel>
<Select
labelId="demo-simple-select-label"
id="demo-simple-select"
value={projects[0].name}
label="Выбрать специализацию"
onChange={handleProjectChange}
>
{projects.map((item, index) => (
<MenuItem value={index.name} key={index}>
{item}
</MenuItem>
))}
</Select>
</FormControl>
) : (
<Typography>У вас нет проектов</Typography>
)} */}

<DocumentTable/>

Expand Down
Loading

0 comments on commit 433cb61

Please sign in to comment.