Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/components/EgovContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link } from "react-router-dom";

import EgovLeftNav from "@/components/EgovLeftNav";

import EgovMenuHeader from "@/components/EgovMenuHeader";
function EgovContainer() {
return (
<div className="container">
Expand Down Expand Up @@ -29,11 +29,7 @@ function EgovContainer() {

{/* <!-- 본문 --> */}
<div className="contents WEEK_SCHEDULE" id="contents">
<div className="top_tit">
<h1 className="tit_1">알림마당</h1>
</div>

<h2 className="tit_2">금주의 행사</h2>
<EgovMenuHeader title="알림마당" subTitle="금주의 행사" />

{/* <!-- 검색조건 --> */}
<div className="condition">
Expand Down
13 changes: 13 additions & 0 deletions src/components/EgovMenuHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const EgovMenuHeader = ({ title, subTitle, showExampleLabel = false }) => {
return (
<>
<div className="top_tit">
<h1 className="tit_1">{title}</h1>
</div>
{subTitle && <h2 className="tit_2">{subTitle}</h2>}
{showExampleLabel && <h2 className="tit_7">본 화면은 디자인 예시임</h2>}
</>
);
};

export default EgovMenuHeader;
26 changes: 14 additions & 12 deletions src/pages/admin/board/EgovAdminBoardEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useDebouncedInput } from "@/hooks/useDebounce";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovRadioButtonGroup from "@/components/EgovRadioButtonGroup";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminBoardEdit(props) {
console.group("EgovAdminBoardEdit");
Expand Down Expand Up @@ -239,6 +240,15 @@ function EgovAdminBoardEdit(props) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const getSubTitle = () => {
if (modeInfo.mode === CODE.MODE_CREATE) {
return "게시판 생성";
} else if (modeInfo.mode === CODE.MODE_MODIFY) {
return "게시판 수정";
}
return "";
};

console.log("------------------------------EgovAdminBoardEdit [End]");
console.groupEnd("EgovAdminBoardEdit");

Expand Down Expand Up @@ -269,17 +279,7 @@ function EgovAdminBoardEdit(props) {
<div className="contents BOARD_CREATE_REG" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

{modeInfo.mode === CODE.MODE_CREATE && (
<h2 className="tit_2">게시판 생성</h2>
)}

{modeInfo.mode === CODE.MODE_MODIFY && (
<h2 className="tit_2">게시판 수정</h2>
)}
<EgovMenuHeader title="사이트관리" subTitle={getSubTitle()} />

<div className="board_view2">
<dl>
Expand Down Expand Up @@ -317,7 +317,9 @@ function EgovAdminBoardEdit(props) {
rows="10"
placeholder=""
defaultValue={boardDetail.bbsIntrcn}
onChange={(e) => handleInputChange("bbsIntrcn", e.target.value)}
onChange={(e) =>
handleInputChange("bbsIntrcn", e.target.value)
}
ref={(el) => (checkRef.current[1] = el)}
></textarea>
</dd>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/admin/board/EgovAdminBoardList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import URL from "@/constants/url";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovPaging from "@/components/EgovPaging";
import EgovMenuHeader from "@/components/EgovMenuHeader";

import { itemIdxByPage } from "@/utils/calc";

Expand Down Expand Up @@ -137,11 +138,7 @@ function EgovAdminBoardList(props) {
<div className="contents BOARD_CREATE_LIST" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">게시판생성 관리</h2>
<EgovMenuHeader title="사이트관리" subTitle="게시판생성 관리" />

{/* <!-- 검색조건 --> */}
<div className="condition">
Expand Down
9 changes: 3 additions & 6 deletions src/pages/admin/gallery/EgovAdminGalleryDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { GALLERY_BBS_ID } from "@/config";
import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovAttachFile from "@/components/EgovAttachFile";
import EgovImageGallery from "@/components/EgovImageGallery";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminGalleryDetail(props) {
console.group("EgovAdminGalleryDetail");
Expand Down Expand Up @@ -56,7 +57,7 @@ function EgovAdminGalleryDetail(props) {
headers: {
"Content-type": "application/json",
},
body: JSON.stringify({ atchFileId: atchFileId })
body: JSON.stringify({ atchFileId: atchFileId }),
};

EgovNet.requestFetch(deleteBoardURL, requestOptions, (resp) => {
Expand Down Expand Up @@ -114,11 +115,7 @@ function EgovAdminGalleryDetail(props) {
<div className="contents NOTICE_VIEW" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">{masterBoard && masterBoard.bbsNm}</h2>
<EgovMenuHeader title="사이트관리" subTitle={masterBoard?.bbsNm} />

{/* <!-- 게시판 상세보기 --> */}
<div className="board_view">
Expand Down
14 changes: 7 additions & 7 deletions src/pages/admin/gallery/EgovAdminGalleryEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovAttachFile from "@/components/EgovAttachFile";
import bbsFormVaildator from "@/utils/bbsFormVaildator";
import { useDebouncedInput } from "@/hooks/useDebounce";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminGalleryEdit(props) {
console.group("EgovAdminGalleryEdit");
Expand Down Expand Up @@ -176,13 +177,12 @@ function EgovAdminGalleryEdit(props) {
<div className="contents SITE_GALLARY_VIEW" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">
{masterBoard && masterBoard.bbsNm} {modeInfo.modeTitle}
</h2>
<EgovMenuHeader
title="사이트관리"
subTitle={`${masterBoard?.bbsNm ?? ""} ${
modeInfo?.modeTitle ?? ""
}`.trim()}
/>

<div className="board_view2">
<dl>
Expand Down
10 changes: 4 additions & 6 deletions src/pages/admin/gallery/EgovAdminGalleryList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { GALLERY_BBS_ID } from "@/config";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovPaging from "@/components/EgovPaging";
import EgovMenuHeader from "@/components/EgovMenuHeader";

import { itemIdxByPage } from "@/utils/calc";

Expand All @@ -22,7 +23,8 @@ function EgovAdminGalleryList(props) {
const bbsId = GALLERY_BBS_ID;

// 공통 네비게이션 훅 사용
const { searchCondition, handlePageMove, handleSearch } = useListNavigation(bbsId);
const { searchCondition, handlePageMove, handleSearch } =
useListNavigation(bbsId);
const [masterBoard, setMasterBoard] = useState({});
const [paginationInfo, setPaginationInfo] = useState({});

Expand Down Expand Up @@ -139,11 +141,7 @@ function EgovAdminGalleryList(props) {
<div className="contents SITE_GALLARY_LIST" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">{masterBoard && masterBoard.bbsNm}</h2>
<EgovMenuHeader title="사이트관리" subTitle={masterBoard?.bbsNm} />

{/* <!-- 검색조건 --> */}
<div className="condition">
Expand Down
13 changes: 6 additions & 7 deletions src/pages/admin/manager/EgovAdminPasswordUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as EgovNet from "@/api/egovFetch";
import URL from "@/constants/url";
import CODE from "@/constants/code";
import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminPasswordUpdate(props) {
console.group("EgovAdminPasswordUpdate");
Expand Down Expand Up @@ -73,9 +74,7 @@ function EgovAdminPasswordUpdate(props) {
}
};

useEffect(() => {

}, []);
useEffect(() => {}, []);

console.log("------------------------------EgovAdminPasswordUpdate [End]");
console.groupEnd("EgovAdminPasswordUpdate");
Expand Down Expand Up @@ -107,10 +106,10 @@ function EgovAdminPasswordUpdate(props) {
<div className="contents BOARD_CREATE_REG" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>
<h2 className="tit_2">사이트관리자 암호변경</h2>
<EgovMenuHeader
title="사이트관리"
subTitle="사이트관리자 암호변경"
/>
<div className="board_view2">
<dl>
<dt>
Expand Down
22 changes: 11 additions & 11 deletions src/pages/admin/members/EgovAdminMemberEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import CODE from "@/constants/code";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovRadioButtonGroup from "@/components/EgovRadioButtonGroup";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminMemberEdit(props) {
console.group("EgovAdminMemberEdit");
Expand Down Expand Up @@ -268,6 +269,15 @@ function EgovAdminMemberEdit(props) {
console.log("------------------------------EgovAdminMemberEdit [End]");
console.groupEnd("EgovAdminMemberEdit");

const getSubTitle = () => {
if (modeInfo.mode === CODE.MODE_CREATE) {
return "회원 생성";
} else if (modeInfo.mode === CODE.MODE_MODIFY) {
return "회원 수정";
}
return "";
};

return (
<div className="container">
<div className="c_wrap">
Expand Down Expand Up @@ -295,17 +305,7 @@ function EgovAdminMemberEdit(props) {
<div className="contents BOARD_CREATE_REG" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

{modeInfo.mode === CODE.MODE_CREATE && (
<h2 className="tit_2">회원 생성</h2>
)}

{modeInfo.mode === CODE.MODE_MODIFY && (
<h2 className="tit_2">회원 수정</h2>
)}
<EgovMenuHeader title="사이트관리" subTitle={getSubTitle()} />

<div className="board_view2">
<dl>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/admin/members/EgovAdminMemberList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import URL from "@/constants/url";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovPaging from "@/components/EgovPaging";
import EgovMenuHeader from "@/components/EgovMenuHeader";

import { itemIdxByPage } from "@/utils/calc";

Expand Down Expand Up @@ -147,11 +148,7 @@ function EgovAdminMemberList(props) {
<div className="contents BOARD_CREATE_LIST" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">회원 관리</h2>
<EgovMenuHeader title="사이트관리" subTitle="회원 관리" />

{/* <!-- 검색조건 --> */}
<div className="condition">
Expand Down
9 changes: 3 additions & 6 deletions src/pages/admin/notice/EgovAdminNoticeDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { NOTICE_BBS_ID } from "@/config";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovAttachFile from "@/components/EgovAttachFile";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminNoticeDetail(props) {
console.group("EgovAdminNoticeDetail");
Expand Down Expand Up @@ -55,7 +56,7 @@ function EgovAdminNoticeDetail(props) {
headers: {
"Content-type": "application/json",
},
body: JSON.stringify({ atchFileId: atchFileId })
body: JSON.stringify({ atchFileId: atchFileId }),
};

EgovNet.requestFetch(deleteBoardURL, requestOptions, (resp) => {
Expand Down Expand Up @@ -112,11 +113,7 @@ function EgovAdminNoticeDetail(props) {
<div className="contents NOTICE_VIEW" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">{masterBoard && masterBoard.bbsNm}</h2>
<EgovMenuHeader title="사이트관리" subTitle={masterBoard?.bbsNm} />

{/* <!-- 게시판 상세보기 --> */}
<div className="board_view">
Expand Down
16 changes: 8 additions & 8 deletions src/pages/admin/notice/EgovAdminNoticeEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import EgovAttachFile from "@/components/EgovAttachFile";
import bbsFormVaildator from "@/utils/bbsFormVaildator";

import { useDebouncedInput } from "@/hooks/useDebounce";
import EgovMenuHeader from "@/components/EgovMenuHeader";

function EgovAdminNoticeEdit(props) {
console.group("EgovAdminNoticeEdit");
Expand Down Expand Up @@ -76,7 +77,7 @@ function EgovAdminNoticeEdit(props) {
};

EgovNet.requestFetch(retrieveDetailURL, requestOptions, function (resp) {
setMasterBoard(resp.result );
setMasterBoard(resp.result);
});

setBoardDetail({ bbsId: bbsId, nttSj: "", nttCn: "" });
Expand Down Expand Up @@ -177,13 +178,12 @@ function EgovAdminNoticeEdit(props) {
<div className="contents NOTICE_LIST" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">
{masterBoard && masterBoard.bbsNm} {modeInfo.modeTitle}
</h2>
<EgovMenuHeader
title="사이트관리"
subTitle={`${masterBoard?.bbsNm ?? ""} ${
modeInfo?.modeTitle ?? ""
}`.trim()}
/>

<div className="board_view2">
<dl>
Expand Down
10 changes: 4 additions & 6 deletions src/pages/admin/notice/EgovAdminNoticeList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NOTICE_BBS_ID } from "@/config";

import { default as EgovLeftNav } from "@/components/leftmenu/EgovLeftNavAdmin";
import EgovPaging from "@/components/EgovPaging";
import EgovMenuHeader from "@/components/EgovMenuHeader";

import { itemIdxByPage } from "@/utils/calc";

Expand All @@ -22,7 +23,8 @@ function EgovAdminNoticeList(props) {
const bbsId = NOTICE_BBS_ID;

// 공통 네비게이션 훅 사용
const { searchCondition, handlePageMove, handleSearch } = useListNavigation(bbsId);
const { searchCondition, handlePageMove, handleSearch } =
useListNavigation(bbsId);
const [masterBoard, setMasterBoard] = useState({});
const [paginationInfo, setPaginationInfo] = useState({});

Expand Down Expand Up @@ -139,11 +141,7 @@ function EgovAdminNoticeList(props) {
<div className="contents NOTICE_LIST" id="contents">
{/* <!-- 본문 --> */}

<div className="top_tit">
<h1 className="tit_1">사이트관리</h1>
</div>

<h2 className="tit_2">{masterBoard && masterBoard.bbsNm}</h2>
<EgovMenuHeader title="사이트관리" subTitle={masterBoard?.bbsNm} />

{/* <!-- 검색조건 --> */}
<div className="condition">
Expand Down
Loading