import React, {useEffect, useState} from "react";
import Modal from "react-bootstrap/Modal";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Form from "react-bootstrap/Form";
import Table from "react-bootstrap/Table";
import * as EgovNet from "api/egovFetch";
function QuestionModal({svySeq}){
const [qtTag, setQtTag] = useState([]);
const [itemTag, setItemTag] = useState([]);
function getSurveyQt(){
EgovNet.requestFetch(
'/admin/survey/edit-qt?svySeq='+svySeq,
{
method: "GET"
},
(resp) => {
const temp = [];
resp.result.qtList.forEach(function (qt, index){
temp.push(
| selectQt(qt.itemList)}>
|
)
})
setQtTag(temp);
},
function (resp) {
console.log("err response : ", resp);
}
);
}
function selectQt(itemList){
const temp = [];
itemList.forEach(function (item, index){
temp.push(
|
|
)
})
setItemTag(temp);
}
function addQt(){
const temp = [...qtTag]
temp.push(
|
|
)
setQtTag(temp)
}
function addItem(){
const temp = [...itemTag]
temp.push(
|
|
)
setItemTag(temp)
}
function editSurveyQt(e){
}
useEffect(() => {
getSurveyQt()
}, []);
return (
<>
질문관리
>
);
}
export default QuestionModal;