Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
reservation-service
Commits
cd650135
Commit
cd650135
authored
Nov 03, 2020
by
Kim, Subin
Browse files
스케쥴 끝
parent
409bc0c7
Changes
2
Show whitespace changes
Inline
Side-by-side
server/client/src/Components/Schedule.js
View file @
cd650135
...
@@ -13,9 +13,7 @@ function Cal(props) {
...
@@ -13,9 +13,7 @@ function Cal(props) {
const
[
myTheme
,
setMyTheme
]
=
useState
({
const
[
myTheme
,
setMyTheme
]
=
useState
({
'
common.dayname.color
'
:
'
#333
'
,
'
common.dayname.color
'
:
'
#333
'
,
'
common.today.color
'
:
'
#333
'
,
'
common.today.color
'
:
'
#333
'
,
// 'common.creationGuide.color': 'white',
'
common.creationGuide.backgroundColor
'
:
'
gray
'
,
'
common.creationGuide.backgroundColor
'
:
'
gray
'
,
// Theme object to extends default dark theme.
});
});
function
getReserve
(
room
)
{
function
getReserve
(
room
)
{
...
@@ -30,7 +28,6 @@ function Cal(props) {
...
@@ -30,7 +28,6 @@ function Cal(props) {
calendarId
:
'
Subject
'
,
calendarId
:
'
Subject
'
,
category
:
'
time
'
,
category
:
'
time
'
,
}))
}))
console
.
log
(
"
room list
"
,
res
.
data
);
setReserve
(
reserves
);
setReserve
(
reserves
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -65,19 +62,17 @@ function Cal(props) {
...
@@ -65,19 +62,17 @@ function Cal(props) {
function
setRenderRangeText
()
{
function
setRenderRangeText
()
{
const
cal
=
calendarRef
.
current
.
getInstance
();
const
cal
=
calendarRef
.
current
.
getInstance
();
// const renderRange = document.getElementById('renderRange');
let
html
=
[];
let
html
=
[];
html
.
push
(
moment
(
cal
.
getDateRangeStart
().
getTime
()).
format
(
'
YYYY.MM.DD
'
));
html
.
push
(
moment
(
cal
.
getDateRangeStart
().
getTime
()).
format
(
'
YYYY.MM.DD
'
));
html
.
push
(
'
~
'
);
html
.
push
(
'
~
'
);
html
.
push
(
moment
(
cal
.
getDateRangeEnd
().
getTime
()).
format
(
'
MM.DD
'
));
html
.
push
(
moment
(
cal
.
getDateRangeEnd
().
getTime
()).
format
(
'
MM.DD
'
));
setPeriod
(
html
.
join
(
''
))
setPeriod
(
html
.
join
(
''
))
// cal.render();
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
setRenderRangeText
();
setRenderRangeText
();
getReserve
(
props
.
room
);
getReserve
(
props
.
room
);
},
[])
},
[
props
.
room
])
return
(
return
(
<
div
>
<
div
>
...
@@ -108,11 +103,6 @@ function Cal(props) {
...
@@ -108,11 +103,6 @@ function Cal(props) {
disableDblClick
=
{
false
}
disableDblClick
=
{
false
}
disableClick
=
{
true
}
disableClick
=
{
true
}
isReadOnly
=
{
true
}
isReadOnly
=
{
true
}
// template={
// popupIsAllDay=function {
// return display: "none"
// }
// }
schedules
=
{
reserve
}
schedules
=
{
reserve
}
scheduleView
=
{[
'
time
'
]}
scheduleView
=
{[
'
time
'
]}
taskView
=
{
false
}
taskView
=
{
false
}
...
...
server/client/src/Pages/HomePage.js
View file @
cd650135
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
import
Menu
from
'
../Components/Menu
'
;
import
Schedule
from
'
../Components/Schedule
'
;
import
Schedule
from
'
../Components/Schedule
'
;
// import styled from 'styled-components';
import
Tabs
from
'
react-bootstrap/Tabs
'
;
import
Tabs
from
'
react-bootstrap/Tabs
'
;
import
Tab
from
'
react-bootstrap/Tab
'
;
import
Tab
from
'
react-bootstrap/Tab
'
;
// const Tab = styled.ul`
// & a, a:hover, a:active {
// color: black;
// }
// `
function
Home
()
{
function
Home
()
{
const
[
key
,
setKey
]
=
useState
(
'
9-116
'
);
return
(
return
(
<
div
>
<
div
>
<
Menu
/>
<
Menu
/>
...
@@ -24,39 +19,17 @@ function Home() {
...
@@ -24,39 +19,17 @@ function Home() {
<
li
>
주말
:
이용
불가
<
/li
>
<
li
>
주말
:
이용
불가
<
/li
>
<
/ul
>
<
/ul
>
<
/p
>
<
/p
>
<
Tabs
defaultActiveKey
=
"
9-116
"
id
=
"
uncontrolled-tab-example
"
>
<
Tabs
defaultActiveKey
=
"
9-116
"
id
=
"
uncontrolled-tab-example
"
onSelect
=
{(
k
)
=>
setKey
(
k
)}
>
<
Tab
eventKey
=
"
9-116
"
title
=
"
9-116
"
>
<
Tab
eventKey
=
"
9-116
"
title
=
"
9-116
"
>
<
Schedule
room
=
{
"
9-116
"
}
/
>
<
Schedule
room
=
{
key
}
/
>
<
/Tab
>
<
/Tab
>
<
Tab
eventKey
=
"
7-234
"
title
=
"
7-234
"
>
<
Tab
eventKey
=
"
7-234
"
title
=
"
7-234
"
>
<
Schedule
room
=
{
"
7-234
"
}
/
>
<
Schedule
room
=
{
key
}
/
>
<
/Tab
>
<
/Tab
>
<
Tab
eventKey
=
"
25-101
"
title
=
"
25-101
"
>
<
Tab
eventKey
=
"
25-101
"
title
=
"
25-101
"
>
<
Schedule
room
=
{
"
25-101
"
}
/
>
<
Schedule
room
=
{
key
}
/
>
<
/Tab
>
<
/Tab
>
<
/Tabs
>
<
/Tabs
>
{
/* <Tab className="nav nav-tabs nav-justified mt-4" id="myTab" role="tablist" >
<li className="nav-item">
<a className="nav-link active" id="7-tab" data-toggle="tab" href="#tab-7" role="tab" aria-controls="7" aria-selected="true"> 7-223 </a>
</li>
<li className="nav-item">
<a className="nav-link" id="9-tab" data-toggle="tab" href="#tab-9" role="tab" aria-controls="9" aria-selected="false"> 9-116 </a>
</li>
<li className="nav-item">
<a className="nav-link" id="25-tab" data-toggle="tab" href="#tab-25" role="tab" aria-controls="25" aria-selected="false"> 25-101 </a>
</li>
</Tab>
<div className="tab-content row justify-content-center" id="myTabContent" >
<div className="tab-pane fade show active col-md-11 col-12" id="tab-7" role="tabpanel" aria-labelledby="7-tab">
<Schedule schedules={sched1}/>
</div>
<div className="tab-pane fade show col-md-11 col-12" id="tab-9" role="tabpanel" aria-labelledby="9-tab">
<Schedule schedules={sched2}/>
</div>
<div className="tab-pane fade show col-md-11 col-12" id="tab-25" role="tabpanel" aria-labelledby="25-tab">
<Schedule schedules={sched3}/>
</div>
</div> */
}
<
h3
>
유의사항
<
/h3
>
<
h3
>
유의사항
<
/h3
>
<
p
>
<
p
>
<
ul
>
<
ul
>
...
...
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