게시물 리스트 카테고리

thkim
유민형 2024-03-22 10:34:43 +09:00
parent 3c00f5101b
commit c3cd079a8f
2 changed files with 14 additions and 9 deletions

View File

@ -13,6 +13,7 @@ import AboutSiteModal from "../config/aboutSiteMgt/AboutSiteModal";
import AdminPostMgtEdit from "./AdminPostMgtEdit";
import Modal from "react-bootstrap/Modal";
import {format} from "date-fns";
import {Form} from "react-bootstrap";
function AdminPostMgtList(props) {
console.group("EgovAdminPostList");
@ -30,6 +31,7 @@ function AdminPostMgtList(props) {
const wrdRef = useRef();
const [listTag, setListTag] = useState([]);
const [categoryList, setCategoryList] = useState([]);
const [show, setShow] = useState(false);
const [modalBody, setModalBody] = useState();
@ -55,6 +57,7 @@ function AdminPostMgtList(props) {
requestOptions,
(resp) => {
setPaginationInfo(resp.result.paginationInfo);
setCategoryList(resp.result.categoryList);
let mutListTag = [];
listTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); //
@ -92,6 +95,10 @@ function AdminPostMgtList(props) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const handleSelectChange = (e) => {
}
function editPost(item){
handleShow();
if(item != undefined) {
@ -134,14 +141,12 @@ function AdminPostMgtList(props) {
<li className="third_1 L">
<span className="lb">검색유형선택</span>
<label className="f_select" htmlFor="searchCnd">
<select id="searchCnd" name="searchCnd" title="검색유형선택" ref={cndRef}
onChange={e => {
cndRef.current.value = e.target.value;
}}
>
<option value="0">게시판명</option>
<option value="1">게시판유형</option>
</select>
<Form.Select id="select1" name="bbsId" onChange={handleSelectChange}>
<option value="">선택</option>
{categoryList.map((item) => (
<option key={item.bbsSeq} value={item.bbsId} selected={props?.bbsId === item.bbsId}>{item.bbsTitle}</option>
))}
</Form.Select>
</label>
</li>
<li className="third_2 R">

View File

@ -155,7 +155,7 @@ public class AdminBoardsController extends BaseController {
public ResultVO getPostList() throws Exception {
ResultVO resultVO = new ResultVO();
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("categoryList", adminBoardsService.selectBoardList());
resultMap.put("postList", adminBoardsService.selectPostList());
resultVO.setResult(resultMap);
return resultVO;