Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
Today KU
Commits
f124b710
Commit
f124b710
authored
Dec 22, 2021
by
Choi Ga Young
Browse files
이전에러
parent
b3127999
Changes
4
Hide whitespace changes
Inline
Side-by-side
client/src/components/Calendar/Monthly.js
View file @
f124b710
...
@@ -71,6 +71,7 @@ const Monthly = () => {
...
@@ -71,6 +71,7 @@ const Monthly = () => {
return
(
return
(
<>
<>
{
console
.
log
(
"
usdiuasd==
"
,
scheduleList
)}
<
div
ref
=
{
calenIconRef
}
className
=
"
position-absolute
"
style
=
{{
top
:
"
9px
"
,
right
:
"
8px
"
}}
>
<
div
ref
=
{
calenIconRef
}
className
=
"
position-absolute
"
style
=
{{
top
:
"
9px
"
,
right
:
"
8px
"
}}
>
<
CalendarBtn
date
=
{
moment
(
initialDate
).
format
(
'
DD
'
)}
/
>
<
CalendarBtn
date
=
{
moment
(
initialDate
).
format
(
'
DD
'
)}
/
>
<
/div
>
<
/div
>
...
...
client/src/components/Schedule/ScheduleCarousel.js
View file @
f124b710
...
@@ -32,14 +32,16 @@ const ScheduleCarousel = () => {
...
@@ -32,14 +32,16 @@ const ScheduleCarousel = () => {
<
KU
schedule
=
{
schedule
}
/
>
<
KU
schedule
=
{
schedule
}
/
>
<
/div>
)
: null
}
<
/div>
)
: null
}
<
/div
>
<
/div
>
<
button
className
=
"
carousel-control-prev
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
prev
"
>
{
scheduleList
.
length
>
1
?
<>
<
span
className
=
"
carousel-control-prev-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
button
className
=
"
carousel-control-prev
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
prev
"
>
<
span
className
=
"
visually-hidden
"
>
Previous
<
/span
>
<
span
className
=
"
carousel-control-prev-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
/button
>
<
span
className
=
"
visually-hidden
"
>
Previous
<
/span
>
<
button
className
=
"
carousel-control-next
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
next
"
>
<
/button
>
<
span
className
=
"
carousel-control-next-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
button
className
=
"
carousel-control-next
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
next
"
>
<
span
className
=
"
visually-hidden
"
>
Next
<
/span
>
<
span
className
=
"
carousel-control-next-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
/button
>
<
span
className
=
"
visually-hidden
"
>
Next
<
/span
>
<
/button
>
<
/> : null
}
<
/div
>
<
/div
>
)
)
}
}
...
...
client/src/components/StudyPlan/studyplan.module.scss
View file @
f124b710
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
}
}
.inCard
{
.inCard
{
overflow
:
scroll
;
overflow
-y
:
auto
;
}
}
.checkBox
{
.checkBox
{
...
...
server/controllers/schedule.controller.js
View file @
f124b710
...
@@ -24,12 +24,12 @@ const findbyId = async (req, res, next) => {
...
@@ -24,12 +24,12 @@ const findbyId = async (req, res, next) => {
findSchedule
=
await
Schedule
.
findOne
({
where
:
{
[
Op
.
and
]:
[{
id
:
id
},
{
userId
:
userId
}]
}
})
findSchedule
=
await
Schedule
.
findOne
({
where
:
{
[
Op
.
and
]:
[{
id
:
id
},
{
userId
:
userId
}]
}
})
if
(
!
findSchedule
)
throw
new
Error
(
"
해당 일정을 찾지 못했습니다.
"
)
if
(
!
findSchedule
)
throw
new
Error
(
"
해당 일정을 찾지 못했습니다.
"
)
else
{
else
{
const
{
id
,
title
,
start
,
end
,
allDay
,
location
,
memo
}
=
findSchedule
const
{
id
,
title
,
start
,
end
,
allDay
,
location
,
memo
,
userId
}
=
findSchedule
startDate
=
dateToString
(
start
,
"
full
"
)
startDate
=
dateToString
(
start
,
"
full
"
)
endDate
=
dateToString
(
end
,
"
full
"
)
endDate
=
dateToString
(
end
,
"
full
"
)
const
startTime
=
dateToString
(
start
,
"
time
"
)
const
startTime
=
dateToString
(
start
,
"
time
"
)
const
endTime
=
dateToString
(
end
,
"
time
"
)
const
endTime
=
dateToString
(
end
,
"
time
"
)
req
.
schedule
=
{
id
,
title
,
startDate
,
endDate
,
startTime
,
endTime
,
allDay
:
allDay
?
"
on
"
:
"
off
"
,
location
,
memo
}
req
.
schedule
=
{
id
,
title
,
startDate
,
endDate
,
startTime
,
endTime
,
allDay
:
allDay
?
"
on
"
:
"
off
"
,
location
,
memo
,
userId
}
}
}
}
}
next
()
next
()
...
@@ -88,7 +88,7 @@ const findbyDate = async (req, res, next) => {
...
@@ -88,7 +88,7 @@ const findbyDate = async (req, res, next) => {
end
:
{
end
:
{
[
Op
.
gte
]:
endDate
[
Op
.
gte
]:
endDate
}
}
}
}
,
{
userId
:
req
.
userId
}
]
]
},
order
:
[[
'
updatedAt
'
,
'
DESC
'
]]
},
order
:
[[
'
updatedAt
'
,
'
DESC
'
]]
})
})
...
@@ -137,20 +137,25 @@ const findbyDate = async (req, res, next) => {
...
@@ -137,20 +137,25 @@ const findbyDate = async (req, res, next) => {
}
else
{
}
else
{
findIndividualList
=
await
Schedule
.
findAll
({
findIndividualList
=
await
Schedule
.
findAll
({
where
:
{
where
:
{
[
Op
.
or
]:
[
[
Op
.
and
]:
[
{
userId
:
req
.
userId
},
{
{
[
Op
.
and
]:
[
[
Op
.
or
]:
[
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
year
'
,
sequelize
.
col
(
'
start
'
)),
year
),
{
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
month
'
,
sequelize
.
col
(
'
start
'
)),
month
)
[
Op
.
and
]:
[
]
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
year
'
,
sequelize
.
col
(
'
start
'
)),
year
),
},
{
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
month
'
,
sequelize
.
col
(
'
start
'
)),
month
)
[
Op
.
and
]:
[
]
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
year
'
,
sequelize
.
col
(
'
end
'
)),
year
),
},
{
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
month
'
,
sequelize
.
col
(
'
end
'
)),
month
)
[
Op
.
and
]:
[
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
year
'
,
sequelize
.
col
(
'
end
'
)),
year
),
sequelize
.
where
(
sequelize
.
fn
(
'
date_part
'
,
'
month
'
,
sequelize
.
col
(
'
end
'
)),
month
)
]
}
]
]
}
}
]
]
},
attributes
:
[
'
id
'
,
'
title
'
,
'
start
'
,
'
end
'
]
},
attributes
:
[
'
id
'
,
'
title
'
,
'
start
'
,
'
end
'
,
'
userId
'
]
,
order
:
[[
'
start
'
]]
,
order
:
[[
'
start
'
]]
})
})
findIndividualList
.
forEach
(
schedule
=>
{
findIndividualList
.
forEach
(
schedule
=>
{
...
...
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