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
65ed18b5
Commit
65ed18b5
authored
Jul 11, 2022
by
Lee SeoYeon
Browse files
주석처리
parent
1974a61d
Changes
9
Hide whitespace changes
Inline
Side-by-side
frontend/src/questions/CheckboxForm.tsx
View file @
65ed18b5
import
React
from
"
react
"
;
import
{
CheckboxType
}
from
"
../types
"
;
import
{
useQuestion
}
from
"
./question.context
"
;
import
{
Edit
}
from
"
./Edit
"
;
import
{
TypeChange
}
from
"
./typeDD
"
;
//
import { useQuestion } from "./question.context";
//
import { Edit } from "./Edit";
//
import { TypeChange } from "./typeDD";
type
Props
=
{
element
:
CheckboxType
;
};
export
const
QCheckbox
=
({
element
}:
Props
)
=>
{
const
{
questionListChange
}
=
useQuestion
();
//
const { questionListChange } = useQuestion();
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2"
>
...
...
@@ -20,9 +20,9 @@ export const QCheckbox = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder
=
{
element
.
title
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
TypeChange
tt
=
"checkbox"
/>
{
/*
<TypeChange tt="checkbox" />
*/
}
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
input
...
...
@@ -31,7 +31,7 @@ export const QCheckbox = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"border w-11/12"
placeholder
=
"질문에 대한 설명을 입력해주세요"
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
</
div
>
<
div
id
=
"commentarea"
className
=
"flex mt-4"
>
...
...
@@ -50,7 +50,7 @@ export const QCheckbox = ({ element }: Props) => {
<
button
className
=
"w-1/12"
>
필수
</
button
>
<
button
className
=
"w-1/12"
>
옵션
</
button
>
<
button
className
=
"w-1/12"
>
삭제
</
button
>
<
Edit
id
=
{
element
.
_id
}
/>
{
/*
<Edit id={element._id} />
*/
}
</
div
>
</
div
>
);
...
...
frontend/src/questions/DateForm.tsx
View file @
65ed18b5
import
{
useQuestion
}
from
"
./question.context
"
;
//
import { useQuestion } from "./question.context";
frontend/src/questions/DropdownForm.tsx
View file @
65ed18b5
import
React
from
"
react
"
;
import
{
DropdownType
}
from
"
../types
"
;
import
{
useQuestion
}
from
"
./question.context
"
;
import
{
TypeChange
}
from
"
./typeDD
"
;
//
import { useQuestion } from "./question.context";
//
import { TypeChange } from "./typeDD";
type
Props
=
{
element
:
DropdownType
;
};
export
const
QDropdown
=
({
element
}:
Props
)
=>
{
const
{
questionListChange
}
=
useQuestion
();
//
const { questionListChange } = useQuestion();
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2"
>
<
div
className
=
"flex flexgi-row h-16 w-full place-content-between items-center"
>
...
...
@@ -18,9 +18,9 @@ export const QDropdown = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder
=
{
element
.
title
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
TypeChange
tt
=
"dropdown"
/>
{
/*
<TypeChange tt="dropdown" />
*/
}
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
input
...
...
@@ -29,7 +29,7 @@ export const QDropdown = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"border w-11/12"
placeholder
=
"질문에 대한 설명을 입력해주세요"
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
</
div
>
<
div
id
=
"commentarea"
className
=
"flex mt-4"
>
...
...
frontend/src/questions/FileForm.tsx
View file @
65ed18b5
import
React
,
{
useState
}
from
"
react
"
;
import
{
FileType
}
from
"
../types
"
;
import
{
useQuestion
}
from
"
./question.context
"
;
import
{
TypeChange
}
from
"
./typeDD
"
;
//
import { useQuestion } from "./question.context";
//
import { TypeChange } from "./typeDD";
type
Props
=
{
element
:
FileType
;
};
export
const
QFile
=
({
element
}:
Props
)
=>
{
const
{
questionListChange
}
=
useQuestion
();
//
const { questionListChange } = useQuestion();
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2"
>
...
...
@@ -19,9 +19,9 @@ export const QFile = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder
=
{
element
.
title
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
TypeChange
tt
=
"file"
/>
{
/*
<TypeChange tt="file" />
*/
}
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
input
...
...
@@ -30,7 +30,7 @@ export const QFile = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"border w-11/12"
placeholder
=
"질문에 대한 설명을 입력해주세요"
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
</
div
>
<
div
id
=
"commentarea"
className
=
"flex mt-4 w-full justify-center"
>
...
...
frontend/src/questions/MatrixForm.tsx
View file @
65ed18b5
import
{
useQuestion
}
from
"
./question.context
"
;
//
import { useQuestion } from "./question.context";
///
frontend/src/questions/RadioForm.tsx
View file @
65ed18b5
import
React
from
"
react
"
;
import
{
RadioType
}
from
"
../types
"
;
import
{
useQuestion
}
from
"
./question.context
"
;
import
{
TypeChange
}
from
"
./typeDD
"
;
//
import { useQuestion } from "./question.context";
//
import { TypeChange } from "./typeDD";
type
Props
=
{
element
:
RadioType
;
};
export
const
QRadio
=
({
element
}:
Props
)
=>
{
const
{
questionListChange
}
=
useQuestion
();
//
const { questionListChange } = useQuestion();
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2"
>
<
div
className
=
"flex h-16 w-full place-content-between items-center"
>
...
...
@@ -18,9 +18,9 @@ export const QRadio = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder
=
{
element
.
title
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
TypeChange
tt
=
"radio"
/>
{
/*
<TypeChange tt="radio" />
*/
}
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
input
...
...
@@ -29,7 +29,7 @@ export const QRadio = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"border w-11/12"
placeholder
=
"질문에 대한 설명을 입력해주세요"
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
</
div
>
<
div
className
=
"flex mt-4"
>
...
...
@@ -48,7 +48,7 @@ export const QRadio = ({ element }: Props) => {
// key={`${index}`}
className
=
"mx-2 border-b-2"
placeholder
=
{
e
.
text
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
button
></
button
>
</
div
>
...
...
frontend/src/questions/RatingForm.tsx
View file @
65ed18b5
import
React
from
"
react
"
;
import
{
RatingType
}
from
"
../types
"
;
import
{
useQuestion
}
from
"
./question.context
"
;
import
{
TypeChange
}
from
"
./typeDD
"
;
//
import { useQuestion } from "./question.context";
//
import { TypeChange } from "./typeDD";
type
Props
=
{
element
:
RatingType
;
...
...
@@ -9,7 +9,7 @@ type Props = {
};
export
const
QRating
=
({
element
}:
Props
)
=>
{
const
{
questionListChange
}
=
useQuestion
();
//
const { questionListChange } = useQuestion();
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2"
>
...
...
@@ -20,9 +20,9 @@ export const QRating = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder
=
{
element
.
title
}
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
<
TypeChange
tt
=
"rating"
/>
{
/*
<TypeChange tt="rating" />
*/
}
</
div
>
<
div
className
=
"flex w-full justify-center"
>
<
input
...
...
@@ -31,7 +31,7 @@ export const QRating = ({ element }: Props) => {
id
=
{
element
.
_id
}
className
=
"border w-11/12"
placeholder
=
"질문에 대한 설명을 입력해주세요"
onChange
=
{
questionListChange
}
//
onChange={questionListChange}
></
input
>
</
div
>
<
div
className
=
"flex place-content-between items-center p-5"
>
...
...
frontend/src/questions/index.tsx
View file @
65ed18b5
export
{
Question
}
from
"
./Question
"
;
//
export { Question } from "./Question";
frontend/src/survey/CreateSurvey.tsx
View file @
65ed18b5
import
React
,
{
FormEvent
,
useState
}
from
"
react
"
;
import
{
questionApi
,
surveyApi
}
from
"
../apis
"
;
import
{
Question
}
from
"
../questions
"
;
//
import { Question } from "../questions";
import
{
BasicQuestionType
,
SurveyType
}
from
"
../types
"
;
export
const
CreateSurvey
=
()
=>
{
...
...
@@ -65,9 +65,9 @@ export const CreateSurvey = () => {
onChange
=
{
handleChange
}
></
input
>
</
div
>
{
questions
.
map
((
question
)
=>
(
{
/*
{questions.map((question) => (
<Question element={question} />
))
}
))}
*/
}
<
div
className
=
"flex w-4/5 content-center justify-center border-2 border-black h-8 mt-3"
>
<
button
type
=
"button"
onClick
=
{
addQuestion
}
>
질문 추가
...
...
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