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
b1f212ab
Commit
b1f212ab
authored
Oct 28, 2021
by
Choi Ga Young
Browse files
스케쥴폼 작성중, 서버연결준비중
parent
fc728eb7
Changes
5
Hide whitespace changes
Inline
Side-by-side
client/src/apis/auth.api.js
0 → 100644
View file @
b1f212ab
import
axios
from
"
axios
"
;
const
signup
=
async
(
user
)
=>
{
const
url
=
`/api/auth/signup`
;
const
{
data
}
=
await
axios
.
post
(
url
,
user
);
return
data
}
const
authApi
=
{
signup
};
export
default
authApi
\ No newline at end of file
client/src/components/Form/ScheduleForm.js
View file @
b1f212ab
...
@@ -68,7 +68,9 @@ const ScheduleForm = () => {
...
@@ -68,7 +68,9 @@ const ScheduleForm = () => {
return
(
return
(
<
form
className
=
"
pt-5
"
onSubmit
=
{
handleSubmit
}
>
<
form
className
=
"
pt-5
"
onSubmit
=
{
handleSubmit
}
>
<
input
className
=
{
`form-control form-control-lg shadow-none px-1 mb-5
${
styles
.
textInput
}
`
}
type
=
"
text
"
name
=
"
title
"
placeholder
=
"
제목
"
aria
-
label
=
"
title
"
onChange
=
{
handleChange
}
autoFocus
/>
<
div
>
<
input
className
=
{
`form-control form-control-lg shadow-none px-1 mb-5
${
styles
.
textInput
}
`
}
type
=
"
text
"
name
=
"
title
"
placeholder
=
"
제목
"
aria
-
label
=
"
title
"
onChange
=
{
handleChange
}
autoFocus
/>
<
/div
>
<
div
className
=
"
d-flex mb-4
"
>
<
div
className
=
"
d-flex mb-4
"
>
<
label
className
=
"
col col-form-label align-self-center py-0
"
>
시작
<
/label
>
<
label
className
=
"
col col-form-label align-self-center py-0
"
>
시작
<
/label
>
<
div
className
=
{
schedule
.
allDay
===
"
on
"
?
"
col-7
"
:
"
col-5
"
}
>
<
div
className
=
{
schedule
.
allDay
===
"
on
"
?
"
col-7
"
:
"
col-5
"
}
>
...
...
client/src/pages/StudyPlanEditPage.js
View file @
b1f212ab
import
{
useState
}
from
'
react
'
;
import
styles
from
"
../components/Form/form.module.scss
"
;
const
StudyPlanEditPage
=
()
=>
{
const
StudyPlanEditPage
=
()
=>
{
const
[
studyplan
,
setStudyplan
]
=
useState
({
title
:
""
,
endDate
:
""
,
endTime
:
""
,
contents
:
""
,
deadline
:
""
,
})
function
handleChange
(
e
)
{
const
{
name
,
value
}
=
e
.
target
if
(
name
===
"
deadline
"
)
{
studyplan
.
deadline
!==
"
on
"
?
setStudyplan
({
...
studyplan
,
[
name
]:
value
})
:
setStudyplan
({
...
studyplan
,
[
name
]:
"
off
"
})
}
else
{
setStudyplan
({
...
studyplan
,
[
name
]:
value
})
}
}
return
(
return
(
<>
<>
<
select
className
=
"
form-select
"
aria
-
label
=
"
Default select example
"
>
<
div
className
=
"
pt-5
"
>
<
option
selected
>
관련
과목을
선택해주세요
.
<
/option
>
<
select
className
=
"
form-select mb-4
"
aria
-
label
=
"
Default select example
"
>
<
option
value
=
"
1
"
>
운영체제
<
/option
>
<
option
selected
>
관련
과목을
선택해주세요
.
<
/option
>
<
option
value
=
"
2
"
>
네트워크
프로그래밍
및
실습
<
/option
>
<
option
value
=
"
1
"
>
운영체제
<
/option
>
<
option
value
=
"
3
"
>
수학적
모델링
<
/option
>
<
option
value
=
"
2
"
>
네트워크
프로그래밍
및
실습
<
/option
>
<
/select
>
<
option
value
=
"
3
"
>
수학적
모델링
<
/option
>
<
input
type
=
"
text
"
name
=
"
studyplanTitle
"
<
/select
>
className
=
"
form-control border-top-0 border-end-0 border-start-0
"
<
input
type
=
"
text
"
name
=
"
studyplanTitle
"
style
=
{{
boxShadow
:
"
none
"
,
borderRadius
:
"
0
"
}}
className
=
"
form-control border-top-0 border-end-0 border-start-0 mb-5
"
placeholder
=
"
제목
"
/>
style
=
{{
boxShadow
:
"
none
"
,
borderRadius
:
"
0
"
}}
<
label
className
=
"
form-label m-2
"
>
마감일
<
/label
>
placeholder
=
"
제목
"
/>
<
input
type
=
"
date
"
value
=
"
2021-10-12
"
className
=
""
/>
<
div
className
=
"
d-flex mb-3
"
>
<
input
type
=
"
time
"
value
=
"
00:00
"
className
=
""
/>
<
label
className
=
"
form-label m-2
"
>
마감일
<
/label
>
<
div
className
=
{
studyplan
.
deadline
===
"
on
"
?
"
col-7
"
:
"
col-5
"
}
>
<
input
className
=
{
`form-control shadow-none
${
styles
.
dateInput
}
`
}
type
=
"
date
"
name
=
"
endDate
"
aria
-
label
=
"
endDate
"
onChange
=
{
handleChange
}
/
>
<
/div
>
<
div
className
=
{
"
col-5
"
+
(
studyplan
.
deadline
===
"
on
"
?
"
d-none
"
:
"
d-block
"
)}
>
<
input
className
=
{
`form-control shadow-none
${
styles
.
dateInput
}
`
}
type
=
"
time
"
name
=
"
endTime
"
aria
-
label
=
"
endTime
"
onChange
=
{
handleChange
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"
d-flex justify-content-end form-check mb-4
"
>
<
input
className
=
{
`form-check-input shadow-none
${
styles
.
checkBox
}
`
}
type
=
"
checkbox
"
id
=
"
deadline
"
name
=
"
deadline
"
onChange
=
{
handleChange
}
/
>
<
label
className
=
"
form-check-label
"
htmlFor
=
"
deadline
"
>
시간
<
/label
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
}
}
...
...
server/db/index.js
View file @
b1f212ab
import
{
Sequelize
}
from
"
sequelize
"
import
{
Sequelize
}
from
"
sequelize
"
import
dbConfig
from
"
../config/db.config.js
"
import
dbConfig
from
"
../config/db.config.js
"
import
UserModel
from
"
../models/user.model.js
"
;
const
sequelize
=
new
Sequelize
(
const
sequelize
=
new
Sequelize
(
String
(
dbConfig
.
database
),
String
(
dbConfig
.
database
),
...
@@ -17,6 +18,9 @@ const sequelize = new Sequelize(
...
@@ -17,6 +18,9 @@ const sequelize = new Sequelize(
}
}
);
);
const
User
=
UserModel
(
sequelize
)
export
{
export
{
sequelize
,
sequelize
,
User
,
}
}
\ No newline at end of file
server/models/user.model.js
0 → 100644
View file @
b1f212ab
import
bcrypt
from
"
bcryptjs
"
;
import
Sequelize
from
"
sequelize
"
;
const
{
DataTypes
}
=
Sequelize
;
const
UserModel
=
(
sequelize
)
=>
{
const
User
=
sequelize
.
define
(
"
user
"
,
{
userID
:{
type
:
DataTypes
.
STRING
},
}
)
}
\ No newline at end of file
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