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
617ce4d0
Commit
617ce4d0
authored
Nov 04, 2021
by
Kim, Subin
Browse files
병합 충돌 해결
parent
04f7c521
Changes
3
Show whitespace changes
Inline
Side-by-side
client/src/components/Form/SubjectForm.js
View file @
617ce4d0
...
...
@@ -2,22 +2,21 @@ import { useState, useEffect } from 'react';
import
{
Redirect
,
useParams
}
from
'
react-router-dom
'
;
import
{
useAuth
}
from
'
../../utils/context.js
'
;
import
BtnGroup
from
"
../Buttons/BtnGroup
"
;
import
styles
from
"
./form.module.scss
"
;
import
subjectApi
from
'
../../apis/subject.api
'
;
import
catchErrors
from
'
../../utils/catchErrors.js
'
;
import
styles
from
"
./form.module.scss
"
;
const
SubjectForm
=
()
=>
{
const
{
user
}
=
useAuth
();
const
{
subjectId
}
=
useParams
();
const
[
success
,
setSuccess
]
=
useState
(
false
)
const
[
error
,
setError
]
=
useState
(
""
);
const
[
disabled
,
setDisabled
]
=
useState
(
true
)
const
[
subject
,
setSubject
]
=
useState
({
lectureName
:
""
,
prof
:
""
,
classRoom
:
""
})
const
[
disabled
,
setDisabled
]
=
useState
(
true
)
useEffect
(()
=>
{
getInfo
(
subjectId
);
...
...
@@ -39,12 +38,10 @@ const SubjectForm = () => {
function
handleChange
(
e
)
{
const
{
name
,
value
}
=
e
.
target
setSubject
({
...
subject
,
[
name
]:
value
})
}
async
function
getInfo
(
id
)
{
const
result
=
await
subjectApi
.
getSubInfo
(
id
)
console
.
log
(
'
과목수정 result확인
'
,
result
)
setSubject
({
lectureName
:
result
.
name
,
prof
:
result
.
prof
,
...
...
@@ -76,13 +73,11 @@ const SubjectForm = () => {
}
if
(
success
)
{
return
<
Redirect
to
=
"
/studyplan
"
/>
}
return
(
<>
<
div
className
=
"
position-absolute top-50 start-50 translate-middle
"
style
=
{{
width
:
"
80%
"
}}
>
<
div
>
<
div
className
=
"
mb-5 d-flex flex-row
"
>
...
...
@@ -99,10 +94,9 @@ const SubjectForm = () => {
<
/div
>
<
/div
>
<
div
className
=
"
pt-2
"
>
<
BtnGroup
disabled
=
{
disabled
}
handleSubmit
=
{
handleSubmit
}
/
>
<
BtnGroup
text
=
{
subjectId
}
disabled
=
{
disabled
}
handleSubmit
=
{
handleSubmit
}
/
>
<
/div
>
<
/div
>
<
/
>
)
}
...
...
client/src/components/Menu/Menu.js
View file @
617ce4d0
import
{
Link
,
Redirect
}
from
"
react-router-dom
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
useAuth
}
from
"
../../utils/context.js
"
;
import
moment
from
"
moment
"
;
import
styles
from
"
./menu.module.scss
"
;
const
Menu
=
()
=>
{
const
{
logout
}
=
useAuth
();
return
(
<>
<
button
className
=
"
btn btn-crimson shadow-none mt-2
"
type
=
"
button
"
data
-
bs
-
toggle
=
"
collapse
"
data
-
bs
-
target
=
"
#menuContent
"
aria
-
controls
=
"
menuContent
"
aria
-
expanded
=
"
false
"
aria
-
label
=
"
menu
"
>
...
...
client/src/components/StudyPlanList.js
View file @
617ce4d0
...
...
@@ -4,19 +4,15 @@ import StudyPlanCard from "./Card/StudyPlanCard.js";
const
StudyPlanList
=
()
=>
{
return
(
<>
<
div
>
<
StudyPlanCard
/>
<
/div
>
<
div
className
=
"
d-flex justify-content-center mt-3
"
>
<
Link
className
=
"
text-decoration-none link-dark
"
to
=
"
/subject/edit
"
style
=
{{
width
:
"
20rem
"
}}
>
<
div
className
=
"
card
"
>
<
div
className
=
"
card-body d-flex flex-column bg-secondary bg-opacity-25
"
>
<
Link
className
=
"
card text-decoration-none link-dark
"
to
=
"
/subject/edit
"
style
=
{{
width
:
"
20rem
"
}}
>
<
div
className
=
"
card-body d-flex flex-column bg-secondary bg-opacity-25
"
>
<
div
>
<
i
className
=
"
bi bi-plus-lg d-flex justify-content-center fs-3
"
><
/i
>
<
p
className
=
"
card-text mt-2 text-center
"
>
새로운
과목
추가하기
<
/p
>
<
/div
>
<
/div
>
<
/div
>
<
/Link
>
<
/div
>
<
/
>
...
...
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