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`
position: absolute;
left: 0;
right: 0;
bottom: 5px;
top: 64px;
`
// const container = document.getElementById('calendar');
const options = {
defaultView: 'week', defaultView: 'week',
// useCreationPopup: true, taskView: false,
// useDetailPopup: true week: {
}); workweek: true
},
useCreationPopup: true,
useDetailPopup: true
};
calendar.createSchedules([ const calendar = new Calendar('#calendar', options);
calendar.setCalendars([
{
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', id: '1',
calendarId: 'Major Lecture', calendarId: 'Major Subject',
title: '자료 구조', title: '자료구조',
category: 'time', category: 'time',
start: '2018-11-20T10:30:00', start: '2020-10-05T11:00:00',
end: '2018-11-20T12:30:00' end: '2020-10-05T12:00:00',
isReadOnly : true
}, },
{ {
id: '2', id: '2',
calendarId: 'General Lecture', calendarId: 'Elective Subject',
title: '건강과 영양', 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', category: 'time',
dueDateClass: '', start: '2020-10-8T11:00:00',
start: '2018-11-20T14:30:00', end: '2020-10-8T15:00:00',
end: '2018-11-20T16:30:00', isReadOnly : true
isReadOnly: true // schedule is read-only
} }
]); ]);
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();
......
...@@ -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