Commit 872ffa42 authored by Lee Jin Ju's avatar Lee Jin Ju
Browse files

.

parent aebef277
...@@ -20,8 +20,4 @@ ...@@ -20,8 +20,4 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
<<<<<<< HEAD yarn-error.log*
yarn-error.log* \ No newline at end of file
=======
yarn-error.log*
>>>>>>> origin/rkyoung7
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import Calendar from 'tui-calendar'; import Calendar from 'tui-calendar';
import "tui-calendar/dist/tui-calendar.css"; import "tui-calendar/dist/tui-calendar.css";
import styled from 'styled-components';
const calendar = new Calendar('#calendar', { const cal = styled.div`
defaultView: 'week', position: absolute;
// useCreationPopup: true, left: 0;
// useDetailPopup: true right: 0;
}); bottom: 5px;
top: 64px;
calendar.createSchedules([ `
{
id: '1', // const container = document.getElementById('calendar');
calendarId: 'Major Lecture', const options = {
title: '자료 구조', defaultView: 'week',
category: 'time', taskView: false,
start: '2018-11-20T10:30:00', week: {
end: '2018-11-20T12:30:00' workweek: true
}, },
{ useCreationPopup: true,
id: '2', useDetailPopup: true
calendarId: 'General Lecture', };
title: '건강과 영양',
category: 'time', const calendar = new Calendar('#calendar', options);
dueDateClass: '',
start: '2018-11-20T14:30:00', calendar.setCalendars([
end: '2018-11-20T16:30:00', {
isReadOnly: true // schedule is read-only id: 'Major Subject',
} name: '전공 필수',
]); color: '#ffffff',
bgColor: '#ff5583',
dragBgColor: '#ff5583',
borderColor: '#ff5583'
},
{
id: 'Elective Subject',
name: '전공 선택',
color: '#ffffff',
bgColor: '#ffbb3b',
dragBgColor: '#ffbb3b',
borderColor: '#ffbb3b'
},
{
id: 'General Subject',
name: '일반 교양',
color: '#ffffff',
bgColor: '#03bd9e',
dragBgColor: '#03bd9e',
borderColor: '#03bd9e'
}
]);
calendar.createSchedules([
{
id: '1',
calendarId: 'Major Subject',
title: '자료구조론',
category: 'time',
start: '2020-10-05T11:00:00',
end: '2020-10-05T12:00:00',
isReadOnly : true
},
{
id: '2',
calendarId: 'Elective Subject',
title: '웹 프로그래밍',
category: 'allday',
start: '2020-10-5T10:00:00',
end: '2020-10-9T11:00:00',
isReadOnly : true
},
{
id: '3',
calendarId: 'General Subject',
title: '영양과 건강',
category: 'time',
start: '2020-10-8T11:00:00',
end: '2020-10-8T15:00:00',
isReadOnly : true
}
]);
calendar.render();
export default Calendar export default Calendar
\ No newline at end of file
...@@ -9,39 +9,6 @@ const Drop = styled.div` ...@@ -9,39 +9,6 @@ const Drop = styled.div`
} }
` `
const Schedule = styled.div`
& ul {
list-style-type: none;
}
& .cd-schedule__events {
width: 100%;
> ul {
display: flex;
flex-wrap: nowrap;
}
& .cd-schedule__timeline {
> ul {
line-height: 1em;
}
}
& .cd-schedule__group {
flex-basis: 0;
flex-grow: 1;
}
& .cd-schedule__event {
position: absolute;
z-index: 3;
width: calc(100% + 2px); // top position and height will be set using js
left: -1px;
}
`
function Home() { function Home() {
const [click, setState] = useState(); const [click, setState] = useState();
......
...@@ -10,4 +10,4 @@ body { ...@@ -10,4 +10,4 @@ body {
code { code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace; monospace;
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ module.exports = () => { ...@@ -6,7 +6,7 @@ module.exports = () => {
mongoose.set('debug', true); mongoose.set('debug', true);
} }
mongoose.connect('mongodb://hijinju:highlight@localhost:27017/admin', { mongoose.connect('mongodb://hijinju:highlight@localhost:27017/admin', {
dbName: 'KU_Rental', dbName: 'ku_rental',
}, (error) => { }, (error) => {
if (error) { if (error) {
console.log('몽고디비 연결 에러', error); console.log('몽고디비 연결 에러', error);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment