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
088ded29
Commit
088ded29
authored
Nov 08, 2021
by
Choi Ga Young
Browse files
Merge remote-tracking branch 'origin/kimpen' into rkyoung7
parents
fd15d0de
6836290e
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/components/StudyPlan/PlanLineList.js
View file @
088ded29
...
...
@@ -2,19 +2,19 @@ import { Link } from "react-router-dom";
import
styles
from
"
./studyplan.module.scss
"
;
const
PlanLineList
=
({
subjectId
,
planList
=
[]
})
=>
{
return
(
<
Link
to
=
{
`/studyplan/
${
subjectId
}
`
}
>
{
planList
.
length
!==
0
?
planList
.
map
(
plan
=>
<
div
className
=
"
d-flex justify-content-between
"
>
<
p
className
=
{
`card-text mb-1
${
styles
.
text
}
`
}
>-
{
plan
.
title
}
<
/
p
>
<
input
className
=
{
`form-check-input shadow-none
${
styles
.
checkBox
}
`
}
type
=
"
checkbox
"
/
>
<
/div>
)
: <Link className="text-decoration-none link-dark" to={`/
studyplan
/
submit
/
$
{
subjectId
}
`}
>
<div className="d-flex"
>
<i className="bi bi-plus"></i
>
<p
className="
card-text mb-1">새로운 계획 추가하기
</
p
>
</div
>
</Link>}
</
Link
>
)
return
(
<>
{
planList
.
length
!==
0
?
planList
.
map
(
plan
=>
<
div
className
=
"
d-flex justify-content-between
"
>
<
Link
to
=
{
`/studyplan/
${
subjectId
}
`
}
className
=
{
`
col-11
card-text
text-decoration-none link-dark
mb-1
${
styles
.
text
}
`
}
>-
{
plan
.
title
}
<
/
Link
>
<
div
className
=
"
col d-flex justify-content-end
"
>
<
input
className
=
{
`form-check-input shadow-none
${
styles
.
checkBox
}
`
}
type
=
"
checkbox
"
onClick
=
{()
=>
console
.
log
(
"
checkbox clicke
"
)}
/
>
<
/div
>
<
/div>
)
: <Link className="d-flex text-decoration-none link-dark" to={`/
studyplan
/
submit
/
$
{
subjectId
}
`}
>
<i
className="
bi bi-plus">
</
i
>
<p className="card-text mb-1">새로운 계획 추가하기</p
>
</Link>}
</>
)
}
export default PlanLineList
\ No newline at end of file
client/src/components/StudyPlan/StudyPlanCard.js
View file @
088ded29
...
...
@@ -4,20 +4,20 @@ import PlanLineList from "./PlanLineList";
const
StudyPlanCard
=
({
renList
,
handleClick
})
=>
{
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
=
"
d-flex
"
>
<
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
"
>
<
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
>
<
/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
>
<
PlanLineList
subjectId
=
{
renList
.
id
}
planList
=
{
renList
.
planList
}
/
>
<
/div
>
<
/
div
>
<
/
Link
>
)
}
...
...
client/src/components/StudyPlan/StudyPlanList.js
View file @
088ded29
...
...
@@ -27,7 +27,8 @@ const StudyPlanList = () => {
}
}
async
function
delSubject
(
subjectId
)
{
async
function
delSubject
(
e
,
subjectId
)
{
e
.
preventDefault
()
try
{
setError
(
""
)
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