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
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 = () => {
return
(
<>
{
console
.
log
(
"
usdiuasd==
"
,
scheduleList
)}
<
div
ref
=
{
calenIconRef
}
className
=
"
position-absolute
"
style
=
{{
top
:
"
9px
"
,
right
:
"
8px
"
}}
>
<
CalendarBtn
date
=
{
moment
(
initialDate
).
format
(
'
DD
'
)}
/
>
<
/div
>
...
...
client/src/components/Schedule/ScheduleCarousel.js
View file @
f124b710
...
...
@@ -32,14 +32,16 @@ const ScheduleCarousel = () => {
<
KU
schedule
=
{
schedule
}
/
>
<
/div>
)
: null
}
<
/div
>
<
button
className
=
"
carousel-control-prev
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
prev
"
>
<
span
className
=
"
carousel-control-prev-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
span
className
=
"
visually-hidden
"
>
Previous
<
/span
>
<
/button
>
<
button
className
=
"
carousel-control-next
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
next
"
>
<
span
className
=
"
carousel-control-next-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
span
className
=
"
visually-hidden
"
>
Next
<
/span
>
<
/button
>
{
scheduleList
.
length
>
1
?
<>
<
button
className
=
"
carousel-control-prev
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
prev
"
>
<
span
className
=
"
carousel-control-prev-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
span
className
=
"
visually-hidden
"
>
Previous
<
/span
>
<
/button
>
<
button
className
=
"
carousel-control-next
"
type
=
"
button
"
data
-
bs
-
target
=
"
#scheduleListCarousel
"
data
-
bs
-
slide
=
"
next
"
>
<
span
className
=
"
carousel-control-next-icon
"
aria
-
hidden
=
"
true
"
><
/span
>
<
span
className
=
"
visually-hidden
"
>
Next
<
/span
>
<
/button
>
<
/> : null
}
<
/div
>
)
}
...
...
client/src/components/StudyPlan/studyplan.module.scss
View file @
f124b710
...
...
@@ -4,7 +4,7 @@
}
.inCard
{
overflow
:
scroll
;
overflow
-y
:
auto
;
}
.checkBox
{
...
...
server/controllers/schedule.controller.js
View file @
f124b710
...
...
@@ -24,12 +24,12 @@ const findbyId = async (req, res, next) => {
findSchedule
=
await
Schedule
.
findOne
({
where
:
{
[
Op
.
and
]:
[{
id
:
id
},
{
userId
:
userId
}]
}
})
if
(
!
findSchedule
)
throw
new
Error
(
"
해당 일정을 찾지 못했습니다.
"
)
else
{
const
{
id
,
title
,
start
,
end
,
allDay
,
location
,
memo
}
=
findSchedule
const
{
id
,
title
,
start
,
end
,
allDay
,
location
,
memo
,
userId
}
=
findSchedule
startDate
=
dateToString
(
start
,
"
full
"
)
endDate
=
dateToString
(
end
,
"
full
"
)
const
startTime
=
dateToString
(
start
,
"
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
()
...
...
@@ -88,7 +88,7 @@ const findbyDate = async (req, res, next) => {
end
:
{
[
Op
.
gte
]:
endDate
}
}
}
,
{
userId
:
req
.
userId
}
]
},
order
:
[[
'
updatedAt
'
,
'
DESC
'
]]
})
...
...
@@ -137,20 +137,25 @@ const findbyDate = async (req, res, next) => {
}
else
{
findIndividualList
=
await
Schedule
.
findAll
({
where
:
{
[
Op
.
or
]:
[
[
Op
.
and
]:
[
{
userId
:
req
.
userId
},
{
[
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
.
or
]:
[
{
[
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
)
]
}
]
}
]
},
attributes
:
[
'
id
'
,
'
title
'
,
'
start
'
,
'
end
'
]
},
attributes
:
[
'
id
'
,
'
title
'
,
'
start
'
,
'
end
'
,
'
userId
'
]
,
order
:
[[
'
start
'
]]
})
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