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
survey
Commits
819cc64b
Commit
819cc64b
authored
Jul 27, 2022
by
Jiwon Yoon
Browse files
ui수정
parent
e23d0af8
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/answers/AEssayForm.tsx
View file @
819cc64b
import
React
,
{
useState
}
from
"
react
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
AnswerProps
,
AnswerQuestionType
,
EssayType
}
from
"
../types
"
;
import
{
AnswerProps
}
from
"
../types
"
;
export
const
AEssayForm
=
({
element
,
answerQuestion
}:
AnswerProps
)
=>
{
export
const
AEssayForm
=
({
element
,
answerQuestion
}:
AnswerProps
)
=>
{
const
[
answer
,
setAnswer
]
=
useState
(
""
);
const
[
answer
,
setAnswer
]
=
useState
(
""
);
...
...
frontend/src/questions/Question.tsx
View file @
819cc64b
...
@@ -160,31 +160,17 @@ Props) => {
...
@@ -160,31 +160,17 @@ Props) => {
style
=
{
{
borderColor
:
isSaved
?
"
#0A8A8A
"
:
"
red
"
}
}
style
=
{
{
borderColor
:
isSaved
?
"
#0A8A8A
"
:
"
red
"
}
}
className
=
"flex flex-col container w-4/5 h-auto border-2 items-center m-3 py-2 rounded-lg"
className
=
"flex flex-col container w-4/5 h-auto border-2 items-center m-3 py-2 rounded-lg"
>
>
<
div
className
=
"flex h-16 w-full place-content-
between
items-center"
>
<
div
className
=
"flex h-16 w-full place-content-
center
items-center"
>
<
input
<
input
type
=
"text"
type
=
"text"
name
=
"title"
name
=
"title"
id
=
{
question
.
_id
}
id
=
{
question
.
_id
}
className
=
"text-xl font-bold
ml-6
border-b-2 w-1
/
2"
className
=
"text-xl font-bold border-b-2 w-1
1/1
2"
placeholder
=
{
"
Question Title
"
}
placeholder
=
{
"
Question Title
"
}
value
=
{
question
.
title
}
value
=
{
question
.
title
}
onChange
=
{
handleQuestionInfo
}
onChange
=
{
handleQuestionInfo
}
disabled
=
{
isSaved
}
disabled
=
{
isSaved
}
></
input
>
></
input
>
<
select
id
=
{
question
.
_id
}
name
=
"type"
onChange
=
{
handleSelect
}
disabled
=
{
isSaved
}
value
=
{
question
.
type
}
className
=
"w-32 md:w-36 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-themeColor w-full mr-3 p-2.5"
>
{
Array
.
from
(
QUESTION_TYPES
.
entries
()).
map
(([
key
,
value
])
=>
(
<
option
key
=
{
key
}
id
=
{
question
.
_id
}
value
=
{
key
}
>
{
value
}
</
option
>
))
}
</
select
>
</
div
>
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
div
className
=
"flex w-full justify-center"
>
<
input
<
input
...
@@ -200,7 +186,22 @@ Props) => {
...
@@ -200,7 +186,22 @@ Props) => {
</
div
>
</
div
>
{
getContent
(
question
)
}
{
getContent
(
question
)
}
<
div
className
=
"place-self-end py-2"
>
<
div
className
=
"flex flex-row place-content-between w-11/12 py-2"
>
<
select
id
=
{
question
.
_id
}
name
=
"type"
onChange
=
{
handleSelect
}
disabled
=
{
isSaved
}
value
=
{
question
.
type
}
className
=
"w-32 h-10 md:w-36 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-themeColor"
>
{
Array
.
from
(
QUESTION_TYPES
.
entries
()).
map
(([
key
,
value
])
=>
(
<
option
key
=
{
key
}
id
=
{
question
.
_id
}
value
=
{
key
}
>
{
value
}
</
option
>
))
}
</
select
>
<
div
className
=
"place-self-center"
>
<
input
<
input
type
=
"checkbox"
type
=
"checkbox"
id
=
"isRequired"
id
=
"isRequired"
...
@@ -227,12 +228,17 @@ Props) => {
...
@@ -227,12 +228,17 @@ Props) => {
취소
취소
</
button
>
</
button
>
<
button
type
=
"button"
className
=
"px-1"
onClick
=
{
handleEditComplete
}
>
<
button
type
=
"button"
className
=
"px-1"
onClick
=
{
handleEditComplete
}
>
확인
확인
</
button
>
</
button
>
</>
</>
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
</
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