Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest schedule #47

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4ce2c85
feat: add new schedule table (#13)
not-SAINT Nov 16, 2020
05b1785
feat: add switcher schedule view mode
not-SAINT Nov 18, 2020
d6f11a9
feat: implement desktop calendar
keksik77 Dec 2, 2020
3b18b11
feat: implement mobile calendar
keksik77 Dec 2, 2020
e282508
fix: remove console.log
keksik77 Dec 2, 2020
46d337d
refactor: refactoring the code according to yuliaHope requirements
keksik77 Dec 8, 2020
e18ab75
Feature/s 10 user settings (#19)
Ftorik Dec 7, 2020
4de6315
feat: add edit mode for table schedule
not-SAINT Nov 25, 2020
2e25172
fix: add props for table
not-SAINT Nov 26, 2020
9ef199c
chore: refactor code
not-SAINT Nov 27, 2020
314a77b
feat: add Organizer search input
not-SAINT Dec 4, 2020
ae57e03
feat: add hiding and show columns
Mach1nka Dec 23, 2020
5aeaca0
feat: add new schedule table (#13)
not-SAINT Nov 16, 2020
4b13afd
feat: add switcher schedule view mode
not-SAINT Nov 18, 2020
0aff978
feat:add schedule list
Nov 13, 2020
5b2f615
chore: deep refactor code
not-SAINT Dec 9, 2020
d1a957a
fix: no expand empty today
not-SAINT Dec 9, 2020
40f5c5e
chore: refactor code
not-SAINT Dec 10, 2020
4a894c3
fix: fix bracket in filterComponent
Mach1nka Jan 11, 2021
c869c34
feat: implement set of tags, change variable for better reading
Ftorik Dec 16, 2020
dd35205
feat: add tag renderer, change structure of the project, rename vars …
Ftorik Dec 17, 2020
2e685e0
feat: implement tag colors to ListView
Ftorik Dec 23, 2020
2659b9d
feat: implement tag colors to CalendarView
Ftorik Dec 23, 2020
04648e2
fix: implement data check for no data
Ftorik Dec 23, 2020
e0b5f57
refactor: change render condition
Ftorik Dec 24, 2020
ff59dfd
fix: fix typescript errors
Mach1nka Jan 14, 2021
3a35ddd
fix: fix typescript
Mach1nka Jan 18, 2021
8954e5a
feat: add details page
tritonJS826 Dec 14, 2020
fc64ad4
refactor: one common page for displaying taskDetails or eventDetails
tritonJS826 Jan 16, 2021
f035c66
feat: add export to Csv
not-SAINT Dec 28, 2020
2a84600
fix: change type for special field
not-SAINT Dec 28, 2020
bf569b8
chore: edit export data columns
not-SAINT Jan 12, 2021
ea42269
chore: remove extra column data
not-SAINT Jan 19, 2021
0a8dea8
chore: join entity's id in one column
not-SAINT Jan 22, 2021
bbe3016
chore: prettier fix
not-SAINT Mar 1, 2021
f37ee69
feat: add editable task and event in table
not-SAINT Jan 23, 2021
a12c42b
chore: refactor stored tag colors
not-SAINT Jan 25, 2021
c0408b5
fix: change id for update task and event
not-SAINT Jan 25, 2021
4f0e5c0
fix: add special, duration field to task entity
not-SAINT Jan 29, 2021
803e7b2
chore: refactor code style
not-SAINT Jan 29, 2021
ee3776c
feat: add new version details pages
not-SAINT Jan 29, 2021
5aacbc1
add modal form files
DzmitrySiniakou Feb 4, 2021
daa71ed
feat: add modal for add task
not-SAINT Feb 8, 2021
0a3f51b
feat: add preview
not-SAINT Feb 9, 2021
d17c69a
feat: add update mode
not-SAINT Feb 9, 2021
6819a59
feat: add update mode for task and event
not-SAINT Feb 11, 2021
9aa99b3
fix: delete trash
not-SAINT Feb 11, 2021
f05ce12
fix: data format
Feb 12, 2021
37750dc
feat: add new types for tasks and event
not-SAINT Feb 13, 2021
e8dc967
chore: refactor code
not-SAINT Feb 13, 2021
3fdeb59
feat: add default colors
not-SAINT Feb 14, 2021
ac551d2
fix: update organizer, description
not-SAINT Feb 14, 2021
e3d9f64
chore: refactor code
not-SAINT Feb 17, 2021
66aa28a
chore: refactor code
not-SAINT Feb 25, 2021
084b103
add: settings columns and types in localstorage
Mar 10, 2021
cd2f521
test: export to csv
not-SAINT Dec 28, 2020
f5b399d
draft: import csv
tritonJS826 Feb 18, 2021
3c1d540
feat: add update entities for import csv
not-SAINT Mar 10, 2021
b5f4b02
feat: add create for new tasks & events
not-SAINT Mar 11, 2021
0162413
fix: update organizer info
not-SAINT Mar 15, 2021
80e2222
fix: update organizerId
not-SAINT Mar 23, 2021
f8c033f
fix: delete organizer for editable table cell
not-SAINT Mar 23, 2021
667cab9
fix: import: problem with identificators
tritonJS826 Mar 27, 2021
b5970ce
fix: reload page after import
not-SAINT Mar 28, 2021
7d21377
New fields for task (#45)
not-SAINT Apr 4, 2021
c45d229
feat: style calendar (#51)
not-SAINT Apr 22, 2021
f22a465
add sort for export to csv (#49)
not-SAINT Apr 22, 2021
e93a053
refactor: remove unused components
May 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 122 additions & 6 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,24 @@
"coverage": "jest --coverage --config=./src/jest.config.js"
},
"dependencies": {
"@types/react-custom-scrollbars": "^4.0.7",
"@types/react-color": "^2.17.4",
"algolia-places-react": "^1.5.1",
"antd": "^4.6.6",
"axios": "~0.20.0",
"chart.js": "^2.9.3",
"csvtojson": "~2.0.10",
"lodash": "~4.17.19",
"mobile-device-detect": "^0.4.3",
"moment": "~2.24.0",
"moment-timezone": "~0.5.28",
"next": "^9.5.4",
"next-transpile-modules": "^4.1.0",
"qs": "^6.9.4",
"react": "~16.13.1",
"react-chartjs-2": "^2.9.0",
"react-custom-scrollbars": "^4.2.1",
"react-color": "^2.19.3",
"react-dom": "~16.13.1",
"react-gauge-chart": "git+https://github.com/BossBele/react-gauge-chart.git",
"react-masonry-css": "^1.0.14",
Expand Down
24 changes: 24 additions & 0 deletions client/src/components/Schedule/CalendarView/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import MobileCalendar from './components/MobileCalendar';
import DesktopCalendar from './components/DesktopCalendar';
import { CourseEvent } from 'services/course';
import { isMobile } from 'mobile-device-detect';

type Props = {
data: CourseEvent[];
timeZone: string;
storedTagColors?: object;
alias: string;
};

export const CalendarView: React.FC<Props> = ({ data, timeZone, storedTagColors, alias }) => {
return (
<>
{isMobile ? (
<MobileCalendar data={data} timeZone={timeZone} storedTagColors={storedTagColors} alias={alias} />
) : (
<DesktopCalendar data={data} timeZone={timeZone} storedTagColors={storedTagColors} alias={alias} />
)}
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import React, { useState } from 'react';
import { Calendar, Badge, Typography, Tooltip } from 'antd';
import { getMonthValue, getListData } from '../utils/filters';
import { Scrollbars } from 'react-custom-scrollbars';
import ModalWindow from './ModalWindow';
import { CourseEvent } from 'services/course';
import { Moment } from 'moment';

const { Title } = Typography;

type Props = {
data: CourseEvent[];
timeZone: string;
storedTagColors?: object;
alias: string;
};

const DesktopCalendar: React.FC<Props> = ({ data, timeZone, storedTagColors, alias }) => {
const [modalWindowData, setModalWindowData] = useState<CourseEvent | null>(null);
const [showWindow, setShowWindow] = useState<boolean>(false);

const handleOnClose = () => {
setShowWindow(false);
};

function showModalWindow(id: number) {
setModalWindowData(() => {
setShowWindow(true);
return data.filter(event => event.id === id)[0];
});
}

const dateCellRender = (date: unknown | Moment) => {
return (
<Scrollbars autoHide autoHideTimeout={500} autoHideDuration={200}>
<ul style={{ padding: '5px' }}>
{getListData((date as unknown) as Moment, data, timeZone, storedTagColors).map(coloredEvent => {
return (
<Tooltip title={coloredEvent.time}>
<li
style={{
border: `1px solid ${coloredEvent.color}`,
borderRadius: '5px',
backgroundColor: `${coloredEvent.color}10`,
listStyleType: 'none',
overflowWrap: 'anywhere',
marginBottom: '5px',
padding: '0px 2px 2px',
}}
key={coloredEvent.key}
onClick={() => showModalWindow(coloredEvent.key)}
>
<Badge color={coloredEvent.color} text={coloredEvent.name} />
</li>
</Tooltip>
);
})}
</ul>
</Scrollbars>
);
};

const monthCellRender = (date: unknown | Moment) => {
const num = getMonthValue((date as unknown) as Moment, data, timeZone);

return !!num && <Title level={5} style={{ textAlign: 'center' }}>{`Events & tasks: ${num}.`}</Title>;
};

return (
<div className="calendar-container">
{modalWindowData && (
<ModalWindow
isOpen={showWindow}
data={modalWindowData}
handleOnClose={handleOnClose}
timeZone={timeZone}
storedTagColors={storedTagColors}
alias={alias}
/>
)}
<Calendar dateCellRender={dateCellRender} monthCellRender={monthCellRender} />
</div>
);
};

export default DesktopCalendar;
Loading