Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
f986cafc
Commit
f986cafc
authored
Feb 21, 2023
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#166
remove of lazy import in week and month calendars , task tables , projects containers
parent
7074af30
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
48 deletions
+16
-48
tasks.ts
planner-api/src/routers/tasks.ts
+0
-1
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+4
-12
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+3
-9
Projects.js
planner-front/src/containers/Projects/Projects.js
+3
-9
WeekCalendar.js
planner-front/src/containers/WeekCalendar/WeekCalendar.js
+6
-17
No files found.
planner-api/src/routers/tasks.ts
View file @
f986cafc
...
...
@@ -45,7 +45,6 @@ router.post('/', auth, async(req:Request, res:Response):Promise<Response>=>{
newTask
.
title
=
title
;
newTask
.
description
=
description
;
if
(
project
)
{
const
watcherOfProject
=
await
dataSource
.
getRepository
(
Project
)
.
findOne
({
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
f986cafc
import
{
useEffect
,
useCallback
,
useState
,
useMemo
}
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
//
import CalendarModalWorkerContent from '../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent';
//
import MonthCalendarBody from '../../components/Calendars/MonthCalendar/MonthCalendarBody/MonthCalendarBody';
//
import MonthCalendarHeader from '../../components/Calendars/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader';
//
import DefaultModal from '../../components/UI/DefaultModal/DefaultModal';
import
CalendarModalWorkerContent
from
'../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent'
;
import
MonthCalendarBody
from
'../../components/Calendars/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
;
import
MonthCalendarHeader
from
'../../components/Calendars/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
;
import
DefaultModal
from
'../../components/UI/DefaultModal/DefaultModal'
;
import
{
dateToISOLikeButLocal
,
getCurrentMonthString
,
getDaysInMonth
}
from
'../../helpers/CalendarHelpers'
;
import
{
fetchAllUserProjects
,
fetchProject
}
from
'../../store/actions/projectsActions'
;
import
{
addCalendarTask
,
addCopyCalendarTask
,
deleteCalendarTask
,
editCalendarTask
,
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
import
{
fetchCurrentCalendarDisplayName
}
from
'../../store/actions/usersActions'
;
import
{
AllHoursOneHourFormat
,
AllHoursTwoHourFormat
}
from
'../../constants'
;
// make components mentioned above in lazy import
import
{
lazy
,
Suspense
}
from
'react'
;
const
CalendarModalWorkerContent
=
lazy
(()
=>
import
(
'../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent'
));
const
MonthCalendarBody
=
lazy
(()
=>
import
(
'../../components/Calendars/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
));
const
MonthCalendarHeader
=
lazy
(()
=>
import
(
'../../components/Calendars/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
));
const
DefaultModal
=
lazy
(()
=>
import
(
'../../components/UI/DefaultModal/DefaultModal'
));
function
MonthCalendar
()
{
const
dispatch
=
useDispatch
();
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
f986cafc
import
Paper
from
'@mui/material/Paper'
;
//
import MyTasksTableToolbar from '../../components/MyTasksCompoments/MyTasksTableToolbar/MyTasksTableToolbar';
//
import MyTasksTablePagination from '../../components/MyTasksCompoments/MyTasksTablePagination/MyTasksTablePagination';
//
import MyTasksTableContainer from '../../components/MyTasksCompoments/MyTasksTableContainer/MyTasksTableContainer';
import
MyTasksTableToolbar
from
'../../components/MyTasksCompoments/MyTasksTableToolbar/MyTasksTableToolbar'
;
import
MyTasksTablePagination
from
'../../components/MyTasksCompoments/MyTasksTablePagination/MyTasksTablePagination'
;
import
MyTasksTableContainer
from
'../../components/MyTasksCompoments/MyTasksTableContainer/MyTasksTableContainer'
;
import
{
activateCreateCopyTasksMode
,
fetchAllTasks
,
sortTaskByProjects
,
addTask
,
deleteTask
,
deleteDateTimeTask
,
editTask
}
from
'../../store/actions/tasksActions'
;
import
{
shallowEqual
,
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
useCallback
,
useEffect
,
useState
}
from
'react'
;
...
...
@@ -9,12 +9,6 @@ import { fetchAllUserProjects, fetchProjects } from '../../store/actions/project
import
moment
from
'moment'
;
import
{
useNavigate
}
from
'react-router-dom'
;
// make components mentioned above in lazy import
import
{
lazy
,
Suspense
}
from
"react"
;
const
MyTasksTableToolbar
=
lazy
(()
=>
import
(
"../../components/MyTasksCompoments/MyTasksTableToolbar/MyTasksTableToolbar"
));
const
MyTasksTablePagination
=
lazy
(()
=>
import
(
"../../components/MyTasksCompoments/MyTasksTablePagination/MyTasksTablePagination"
));
const
MyTasksTableContainer
=
lazy
(()
=>
import
(
"../../components/MyTasksCompoments/MyTasksTableContainer/MyTasksTableContainer"
));
export
default
function
MyTasks
()
{
const
dispatch
=
useDispatch
();
...
...
planner-front/src/containers/Projects/Projects.js
View file @
f986cafc
...
...
@@ -2,17 +2,11 @@ import { Grid } from "@mui/material";
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
createProject
,
deleteProject
,
fetchProjects
}
from
"../../store/actions/projectsActions"
;
//
import FullProject from "../FullProject/FullProject";
//
import ProjectsWrapper from "../../components/ProjectsComponents/ProjectsWrapper/ProjectsWrapper";
//
import DefaultModal from "../../components/UI/DefaultModal/DefaultModal";
import
FullProject
from
"../FullProject/FullProject"
;
import
ProjectsWrapper
from
"../../components/ProjectsComponents/ProjectsWrapper/ProjectsWrapper"
;
import
DefaultModal
from
"../../components/UI/DefaultModal/DefaultModal"
;
import
NewProjectModalContent
from
"../../components/ProjectsComponents/NewProjectModalContent/NewProjectModalContent"
;
// make components mentioned above in lazy import
import
{
lazy
,
Suspense
}
from
"react"
;
const
FullProject
=
lazy
(()
=>
import
(
"../FullProject/FullProject"
));
const
ProjectsWrapper
=
lazy
(()
=>
import
(
"../../components/ProjectsComponents/ProjectsWrapper/ProjectsWrapper"
));
const
DefaultModal
=
lazy
(()
=>
import
(
"../../components/UI/DefaultModal/DefaultModal"
));
const
Projects
=
()
=>
{
const
{
projects
}
=
useSelector
(
state
=>
state
.
projects
.
projects
);
const
{
user
}
=
useSelector
(
state
=>
state
.
users
)
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
f986cafc
...
...
@@ -3,29 +3,18 @@ import { useEffect, useState, useMemo, useCallback } from 'react';
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
useNavigate
}
from
'react-router-dom'
;
// import CreateCopyTasksModeBlock from '../../components/Calendars/CreateCopyTasksModeBlock/CreateCopyTasksModeBlock';
// import CalendarModalWorkerContent from '../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent';
// import WeekCalendarBody from '../../components/Calendars/WeekCalendar/WeekCalendarBody/WeekCalendarBody';
// import WeekCalendarHeader from '../../components/Calendars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader';
// import DefaultModal from '../../components/UI/DefaultModal/DefaultModal';
import
CreateCopyTasksModeBlock
from
'../../components/Calendars/CreateCopyTasksModeBlock/CreateCopyTasksModeBlock'
;
import
CalendarModalWorkerContent
from
'../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent'
;
import
WeekCalendarBody
from
'../../components/Calendars/WeekCalendar/WeekCalendarBody/WeekCalendarBody'
;
import
WeekCalendarHeader
from
'../../components/Calendars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
;
import
DefaultModal
from
'../../components/UI/DefaultModal/DefaultModal'
;
import
{
AllHoursOneHourFormat
,
AllHoursTwoHourFormat
}
from
'../../constants'
;
import
{
getWeekInfoString
,
getWeekFromCurrentDate
,
dateToISOLikeButLocal
}
from
'../../helpers/CalendarHelpers'
;
import
{
fetchAllUserProjects
}
from
'../../store/actions/projectsActions'
;
import
{
addCalendarTask
,
addCopyCalendarTask
,
deactivateCreateCopyTasksMode
,
deleteCalendarTask
,
editCalendarTask
,
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
import
{
fetchCurrentCalendarDisplayName
}
from
'../../store/actions/usersActions'
;
// make components mentioned above in lazy import
import
{
lazy
,
Suspense
}
from
'react'
;
const
WeekCalendarBody
=
lazy
(()
=>
import
(
'../../components/Calendars/WeekCalendar/WeekCalendarBody/WeekCalendarBody'
));
const
WeekCalendarHeader
=
lazy
(()
=>
import
(
'../../components/Calendars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
));
const
CreateCopyTasksModeBlock
=
lazy
(()
=>
import
(
'../../components/Calendars/CreateCopyTasksModeBlock/CreateCopyTasksModeBlock'
));
const
CalendarModalWorkerContent
=
lazy
(()
=>
import
(
'../../components/Calendars/UI/CalendarModalWorkerContent/CalendarModalWorkerContent'
));
const
DefaultModal
=
lazy
(()
=>
import
(
'../../components/UI/DefaultModal/DefaultModal'
));
function
WeekCalendar
()
{
const
dispatch
=
useDispatch
();
const
navigate
=
useNavigate
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment