import React, {useCallback, useEffect, useState} from 'react'; import { Link } from 'react-router-dom'; import URL from 'constants/url'; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import * as EgovNet from "api/egovFetch"; import Modal from "react-bootstrap/Modal"; import Form from "react-bootstrap/Form"; import SurveyModal from "./survey/SurveyModal"; import QuestionModal from "./survey/QuestionModal"; import CODE from "../../../constants/code"; function Survey({}) { const [listTag, setListTag] = useState([]); const [show, setShow] = useState(false); const [modalSize, setModalSize] = useState("md"); const [modalBody, setModalBody] = useState(); const handleClose = () => setShow(false); const handleShow = () => setShow(true); const retrieveList = useCallback(() => { handleClose() EgovNet.requestFetch( '/admin/survey/list', { method: "GET" }, (resp) => { let mutListTag = []; setListTag([]); // 리스트 항목 구성 resp.result.surveyList.forEach(function (item, index) { mutListTag.push(
검색된 결과가 없습니다.
); // 게시판 목록 초기값 setListTag(mutListTag); }, function (resp) { console.log("err response : ", resp); } ); },[]); function editUseYn(svySeq){ EgovNet.requestFetch( '/admin/survey/info-use-yn', { method: "PUT", headers: { 'Content-type': 'application/json' }, body: JSON.stringify({svySeq:svySeq}) }, (resp) => { if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) { alert("저장되었습니다.") retrieveList(); }else{ alert(resp.resultMessage) } } ) } function editSurvey(item){ handleShow(); setModalSize("md") setModalBody(