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
6836290e
Commit
6836290e
authored
Nov 08, 2021
by
Kim, Subin
Browse files
Link 해결
parent
f07adc61
Changes
3
Show whitespace changes
Inline
Side-by-side
client/src/components/StudyPlan/PlanLineList.js
View file @
6836290e
...
@@ -3,17 +3,17 @@ import styles from "./studyplan.module.scss";
...
@@ -3,17 +3,17 @@ import styles from "./studyplan.module.scss";
const
PlanLineList
=
({
subjectId
,
planList
=
[]
})
=>
{
const
PlanLineList
=
({
subjectId
,
planList
=
[]
})
=>
{
return
(
return
(
<
Link
to
=
{
`/studyplan/
${
subjectId
}
`
}
>
<>
{
planList
.
length
!==
0
?
planList
.
map
(
plan
=>
<
div
className
=
"
d-flex justify-content-between
"
>
{
planList
.
length
!==
0
?
planList
.
map
(
plan
=>
<
div
className
=
"
d-flex justify-content-between
"
>
<
p
className
=
{
`card-text mb-1
${
styles
.
text
}
`
}
>-
{
plan
.
title
}
<
/p
>
<
Link
to
=
{
`/studyplan/
${
subjectId
}
`
}
className
=
{
`col-11 card-text text-decoration-none link-dark mb-1
${
styles
.
text
}
`
}
>-
{
plan
.
title
}
<
/Link
>
<
input
className
=
{
`form-check-input shadow-none
${
styles
.
checkBox
}
`
}
type
=
"
checkbox
"
/>
<
div
className
=
"
col d-flex justify-content-end
"
>
<
/div>
)
: <Link className="text-decoration-none link-dark" to={`/
studyplan
/
submit
/
$
{
subjectId
}
`}>
<
input
className
=
{
`form-check-input shadow-none
${
styles
.
checkBox
}
`
}
type
=
"
checkbox
"
onClick
=
{()
=>
console
.
log
(
"
checkbox clicke
"
)}
/
>
<div className="d-flex">
<
/div
>
<
/div>
)
: <Link className="d-flex text-decoration-none link-dark" to={`/
studyplan
/
submit
/
$
{
subjectId
}
`}>
<i className="bi bi-plus"></i>
<i className="bi bi-plus"></i>
<p className="card-text mb-1">새로운 계획 추가하기</p>
<p className="card-text mb-1">새로운 계획 추가하기</p>
</div>
</Link>}
</Link>}
</
Link
>
</>
)
)
}
}
...
...
client/src/components/StudyPlan/StudyPlanCard.js
View file @
6836290e
...
@@ -4,20 +4,20 @@ import PlanLineList from "./PlanLineList";
...
@@ -4,20 +4,20 @@ import PlanLineList from "./PlanLineList";
const
StudyPlanCard
=
({
renList
,
handleClick
})
=>
{
const
StudyPlanCard
=
({
renList
,
handleClick
})
=>
{
return
(
return
(
<
div
className
=
"
card text-decoration-none link-dark mb-3
"
style
=
{{
width
:
"
20rem
"
}}
>
<
Link
className
=
"
card text-decoration-none link-dark mb-3
"
to
=
{
`/studyplan/
${
renList
.
id
}
`
}
style
=
{{
width
:
"
20rem
"
}}
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
d-flex
"
>
<
div
className
=
"
d-flex
"
>
<
h5
className
=
"
card-title col-10 text-nowrap
"
style
=
{{
overflow
:
"
hidden
"
,
textOverflow
:
"
ellipsis
"
}}
>
{
renList
.
name
}
<
/h5
>
<
h5
className
=
"
card-title col-10 text-nowrap
"
style
=
{{
overflow
:
"
hidden
"
,
textOverflow
:
"
ellipsis
"
}}
>
{
renList
.
name
}
<
/h5
>
<
div
className
=
"
col-2 d-flex justify-content-end
"
>
<
div
className
=
"
col-2 d-flex justify-content-end
"
>
<
Link
className
=
"
text-decoration-none link-dark
"
to
=
{
`/subject/edit/
${
renList
.
id
}
`
}
><
i
className
=
"
bi bi-pencil-square pe-2
"
><
/i></
Link
>
<
Link
className
=
"
text-decoration-none link-dark
"
to
=
{
`/subject/edit/
${
renList
.
id
}
`
}
><
i
className
=
"
bi bi-pencil-square pe-2
"
><
/i></
Link
>
<
i
className
=
"
bi bi-trash
"
onClick
=
{()
=>
handleClick
(
renList
.
id
)}
>
<
i
className
=
"
bi bi-trash
"
onClick
=
{(
e
)
=>
handleClick
(
e
,
renList
.
id
)}
>
<
/i
>
<
/i
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
p
className
=
"
card-subtitle ms-1 mb-2 text-muted
"
>
{
renList
.
prof
&&
renList
.
room
?
renList
.
prof
+
'
-
'
+
renList
.
room
:
(
renList
.
prof
||
renList
.
room
)}
<
/p
>
<
p
className
=
"
card-subtitle ms-1 mb-2 text-muted
"
>
{
renList
.
prof
&&
renList
.
room
?
renList
.
prof
+
'
-
'
+
renList
.
room
:
(
renList
.
prof
||
renList
.
room
)}
<
/p
>
<
PlanLineList
subjectId
=
{
renList
.
id
}
planList
=
{
renList
.
planList
}
/
>
<
PlanLineList
subjectId
=
{
renList
.
id
}
planList
=
{
renList
.
planList
}
/
>
<
/div
>
<
/div
>
<
/
div
>
<
/
Link
>
)
)
}
}
...
...
client/src/components/StudyPlan/StudyPlanList.js
View file @
6836290e
...
@@ -27,7 +27,8 @@ const StudyPlanList = () => {
...
@@ -27,7 +27,8 @@ const StudyPlanList = () => {
}
}
}
}
async
function
delSubject
(
subjectId
)
{
async
function
delSubject
(
e
,
subjectId
)
{
e
.
preventDefault
()
try
{
try
{
setError
(
""
)
setError
(
""
)
await
subjectApi
.
removeSubject
(
subjectId
,
user
.
id
)
await
subjectApi
.
removeSubject
(
subjectId
,
user
.
id
)
...
...
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