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
4c93398b
Commit
4c93398b
authored
Nov 03, 2020
by
Lee Jin Ju
Browse files
하아
parent
7d9a695e
Changes
2
Show whitespace changes
Inline
Side-by-side
server/client/src/Components/Schedule.js
View file @
4c93398b
...
@@ -3,14 +3,9 @@ import Calendar from '@toast-ui/react-calendar';
...
@@ -3,14 +3,9 @@ import Calendar from '@toast-ui/react-calendar';
import
"
tui-calendar/dist/tui-calendar.css
"
;
import
"
tui-calendar/dist/tui-calendar.css
"
;
import
"
tui-date-picker/dist/tui-date-picker.css
"
;
import
"
tui-date-picker/dist/tui-date-picker.css
"
;
import
"
tui-time-picker/dist/tui-time-picker.css
"
;
import
"
tui-time-picker/dist/tui-time-picker.css
"
;
<<<<<<<
HEAD
function
Cal
(
calledday
)
{
=======
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
function
Cal
(
props
)
{
function
Cal
(
props
)
{
>>>>>>>
origin
/
cherry
const
calendarRef
=
useRef
();
const
calendarRef
=
useRef
();
const
[
reserve
,
setReserve
]
=
useState
([]);
const
[
reserve
,
setReserve
]
=
useState
([]);
// const [day, setDay] = useState(props.calledday);
// const [day, setDay] = useState(props.calledday);
...
@@ -23,39 +18,6 @@ function Cal(props) {
...
@@ -23,39 +18,6 @@ function Cal(props) {
// Theme object to extends default dark theme.
// Theme object to extends default dark theme.
});
});
<<<<<<<
HEAD
function
getDataAction
(
target
)
{
return
target
.
dataset
?
target
.
dataset
.
action
:
target
.
getAttribute
(
'
data-action
'
);
}
function
onClickNavi
(
e
)
{
const
cal
=
calendarRef
.
current
.
getInstance
();
const
action
=
getDataAction
(
e
.
target
);
switch
(
action
)
{
case
'
move-prev
'
:
cal
.
prev
();
break
;
case
'
move-next
'
:
cal
.
next
();
break
;
case
'
move-today
'
:
cal
.
today
();
break
;
default
:
return
;
}
// setRenderRangeText();
// setSchedules();
}
function
useday
(
day
)
{
const
cal
=
calendarRef
.
current
.
getInstance
();
cal
.
setDate
(
new
Date
(
day
));
cal
.
changeView
(
'
week
'
,
true
);
cal
.
today
(
new
Date
(
day
));
=======
const
yj
=
[
const
yj
=
[
{
{
id
:
'
a
'
,
id
:
'
a
'
,
...
@@ -107,7 +69,6 @@ function Cal(props) {
...
@@ -107,7 +69,6 @@ function Cal(props) {
.
catch
(
err
=>
{
.
catch
(
err
=>
{
alert
(
err
.
error
)
alert
(
err
.
error
)
});
});
>>>>>>>
origin
/
cherry
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -147,78 +108,6 @@ function Cal(props) {
...
@@ -147,78 +108,6 @@ function Cal(props) {
},
[
day
])
},
[
day
])
return
(
return
(
<<<<<<<
HEAD
<
div
className
=
"
container mt-3
"
>
<
div
class
=
"
tui-datepicker-input tui-datetime-input tui-has-focus
"
>
<
input
type
=
"
text
"
id
=
"
datepicker-input
"
aria
-
label
=
"
Date-Time
"
><
/input
>
<
span
class
=
"
tui-ico-date
"
><
/span
>
<
/div
>
<
div
id
=
"
wrapper
"
style
=
"
margin-top: -1px;
"
><
/div
>
<
Calendar
ref
=
{
calendarRef
}
height
=
"
100%
"
calendars
=
{[
{
id
:
'
Subject
'
,
bgColor
:
'
#a9a9a9
'
,
borderColor
:
'
#a9a9a9
'
,
isReadOnly
:
'
true
'
}
]}
view
=
"
week
"
disableDblClick
=
{
false
}
disableClick
=
{
true
}
isReadOnly
=
{
false
}
// template={
// popupIsAllDay=function {
// return display: "none"
// }
// }
schedules
=
{[
{
id
:
'
1
'
,
calendarId
:
'
Subject
'
,
category
:
'
time
'
,
start
:
'
2020-10-05T11:00:00
'
,
end
:
'
2020-10-05T12:00:00
'
,
},
{
id
:
'
2
'
,
calendarId
:
'
Subject
'
,
category
:
'
time
'
,
start
:
'
2020-10-09T10:00:00
'
,
end
:
'
2020-10-09T11:00:00
'
,
},
{
id
:
'
3
'
,
calendarId
:
'
Subject
'
,
category
:
'
time
'
,
start
:
'
2020-10-08T11:00:00
'
,
end
:
'
2020-10-08T15:00:00
'
,
}
]}
scheduleView
=
{[
'
time
'
]}
taskView
=
{
false
}
theme
=
{
myTheme
}
timezones
=
{[
{
timezoneOffset
:
540
,
displayLabel
:
'
GMT+09:00
'
,
tooltip
:
'
Seoul
'
},
]}
useDetailPopup
useCreationPopup
view
=
{
"
week
"
}
week
=
{{
workweek
:
true
,
hourStart
:
8
,
hourEnd
:
23
}}
/
>
=======
<
div
>
{
<
div
>
{
console
.
log
(
"
reserve
"
,
reserve
)}
console
.
log
(
"
reserve
"
,
reserve
)}
<
Calendar
<
Calendar
...
@@ -290,7 +179,6 @@ function Cal(props) {
...
@@ -290,7 +179,6 @@ function Cal(props) {
hourEnd
:
23
hourEnd
:
23
}}
}}
/
>
/
>
>>>>>>>
origin
/
cherry
<
/div
>
<
/div
>
)
)
}
}
...
...
server/schemas/index.js
View file @
4c93398b
...
@@ -5,11 +5,7 @@ module.exports = () => {
...
@@ -5,11 +5,7 @@ module.exports = () => {
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
mongoose
.
set
(
'
debug
'
,
true
);
mongoose
.
set
(
'
debug
'
,
true
);
}
}
<<<<<<<
HEAD
mongoose
.
connect
(
'
mongodb://hijinju:highlight@localhost:27017/admin
'
,
{
mongoose
.
connect
(
'
mongodb://hijinju:highlight@localhost:27017/admin
'
,
{
=======
mongoose
.
connect
(
'
mongodb://cherry:1q2w3e4r@localhost:27017/admin
'
,
{
>>>>>>>
origin
/
cherry
dbName
:
'
ku_rental
'
,
useNewUrlParser
:
true
,
useUnifiedTopology
:
true
,
dbName
:
'
ku_rental
'
,
useNewUrlParser
:
true
,
useUnifiedTopology
:
true
,
},
(
error
)
=>
{
},
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
...
...
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