+++ src/admin/feature/board/article/api/boardArticleApi.ts
... | ... | @@ -0,0 +1,11 @@ |
| 1 | +import {apiClient} from "../../../../../api/apiClient.ts"; | |
| 2 | +import type {PageResponse} from "../../../../../type/pageResponse.ts"; | |
| 3 | +import type { | |
| 4 | + BoardArticleExtra, | |
| 5 | + BoardArticleListItem, | |
| 6 | + BoardArticleSearchParams | |
| 7 | +} from "../type/boardArticle.types.ts"; | |
| 8 | + | |
| 9 | +export async function fetchBoardArticleList(params: BoardArticleSearchParams) { | |
| 10 | + return apiClient.get<PageResponse<BoardArticleListItem, BoardArticleExtra>>('/cop/bbs/boardList.do', params); | |
| 11 | +} |
--- src/admin/feature/board/components/article/BoardArticleImageListTable.tsx
+++ src/admin/feature/board/article/components/BoardArticleImageListTable.tsx
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import {BoardArticleImageListTableRow} from "./BoardArticleImageListTableRow.tsx";
|
| 2 |
-import type {BoardArticleListItem} from "../../type/board.types.ts";
|
|
| 2 |
+import type {BoardArticleListItem} from "../type/boardArticle.types.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
type BoardArticleImageListTableProps = {
|
| 5 | 5 |
items: BoardArticleListItem[]; |
--- src/admin/feature/board/components/article/BoardArticleImageListTableRow.tsx
+++ src/admin/feature/board/article/components/BoardArticleImageListTableRow.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardArticleListItem} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardArticleListItem} from "../type/boardArticle.types.ts";
|
|
| 2 | 2 |
|
| 3 | 3 |
type BoardArticleImageListTableRowProps = {
|
| 4 | 4 |
item: BoardArticleListItem |
--- src/admin/feature/board/components/article/BoardArticleListTable.tsx
+++ src/admin/feature/board/article/components/BoardArticleListTable.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardArticleListItem, BoardArticleSearchParams} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardArticleListItem, BoardArticleSearchParams} from "../type/boardArticle.types.ts";
|
|
| 2 | 2 |
import {EmptyRow} from "../../../../component/EmptyRow.tsx";
|
| 3 | 3 |
import {BoardArticleListTableHeader} from "./BoardArticleListTableHeader.tsx";
|
| 4 | 4 |
import {BoardArticleListTableRow} from "./BoardArticleListTableRow.tsx";
|
--- src/admin/feature/board/components/article/BoardArticleListTableHeader.tsx
+++ src/admin/feature/board/article/components/BoardArticleListTableHeader.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardArticleSearchParams} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardArticleSearchParams} from "../type/boardArticle.types.ts";
|
|
| 2 | 2 |
import {CheckBox} from "../../../../component/checkbox/CheckBox.tsx";
|
| 3 | 3 |
|
| 4 | 4 |
type BoardArticleListTableHeaderProps = {
|
--- src/admin/feature/board/components/article/BoardArticleListTableRow.tsx
+++ src/admin/feature/board/article/components/BoardArticleListTableRow.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardArticleListItem} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardArticleListItem} from "../type/boardArticle.types.ts";
|
|
| 2 | 2 |
import type {SearchParams} from "../../../../../type/searchParams.ts";
|
| 3 | 3 |
import {CheckBox} from "../../../../component/checkbox/CheckBox.tsx";
|
| 4 | 4 |
|
--- src/admin/feature/board/hook/page/useBoardArticleListPage.ts
+++ src/admin/feature/board/article/hook/page/useBoardArticleListPage.ts
... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 |
import {useMemo, useState} from "react";
|
| 2 |
-import {ADMIN_BBS_MASTER_ROUTE} from "../../../../route/adminRouteMap.ts";
|
|
| 3 |
-import {useCheckedList} from "../../../../hook/useCheckedList.ts";
|
|
| 4 |
-import type {BoardArticleListItem, BoardArticleSearchParams} from "../../type/board.types.ts";
|
|
| 2 |
+import {ADMIN_BBS_MASTER_ROUTE} from "../../../../../route/adminRouteMap.ts";
|
|
| 3 |
+import {useCheckedList} from "../../../../../hook/useCheckedList.ts";
|
|
| 4 |
+import type {BoardArticleListItem, BoardArticleSearchParams} from "../../type/boardArticle.types.ts";
|
|
| 5 | 5 |
import {useBoardArticleList} from "../query/useBoardArticleList.ts";
|
| 6 | 6 |
import type {
|
| 7 | 7 |
CheckableTableModel, |
... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 |
PaginationModel, |
| 10 | 10 |
SearchModel, |
| 11 | 11 |
StatusModel, |
| 12 |
-} from "../../../../../type/viewModel.ts"; |
|
| 12 |
+} from "../../../../../../type/viewModel.ts"; |
|
| 13 | 13 |
|
| 14 | 14 |
type BoardArticleListPageModel = {
|
| 15 | 15 |
header: HeaderModel; |
--- src/admin/feature/board/hook/query/useBoardArticleList.ts
+++ src/admin/feature/board/article/hook/query/useBoardArticleList.ts
... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 |
import {keepPreviousData, useQuery} from "@tanstack/react-query";
|
| 2 |
-import {fetchBoardArticleList} from "../../api/boardApi.ts";
|
|
| 3 |
-import type {BoardArticleSearchParams} from "../../type/board.types.ts";
|
|
| 2 |
+import {fetchBoardArticleList} from "../../api/boardArticleApi.ts";
|
|
| 3 |
+import type {BoardArticleSearchParams} from "../../type/boardArticle.types.ts";
|
|
| 4 | 4 |
|
| 5 | 5 |
export function useBoardArticleList(searchParams: BoardArticleSearchParams) {
|
| 6 | 6 |
const query = useQuery({
|
--- src/admin/feature/board/page/BoardArticleListPage.tsx
+++ src/admin/feature/board/article/page/BoardArticleListPage.tsx
... | ... | @@ -1,10 +1,10 @@ |
| 1 | 1 |
import {useParams} from "react-router-dom";
|
| 2 |
-import {PageHeader} from "../../../component/PageHeader.tsx";
|
|
| 3 |
-import {ListSearchForm} from "../../../component/ListSearchForm.tsx";
|
|
| 4 |
-import {Pagination} from "../../../component/pagination/Pagination.tsx";
|
|
| 5 |
-import {useLoadingToast} from "../../../hook/useLoadingToast.ts";
|
|
| 6 |
-import {BoardArticleListTable} from "../components/article/BoardArticleListTable.tsx";
|
|
| 7 |
-import {BoardArticleImageListTable} from "../components/article/BoardArticleImageListTable.tsx";
|
|
| 2 |
+import {PageHeader} from "../../../../component/PageHeader.tsx";
|
|
| 3 |
+import {ListSearchForm} from "../../../../component/ListSearchForm.tsx";
|
|
| 4 |
+import {Pagination} from "../../../../component/pagination/Pagination.tsx";
|
|
| 5 |
+import {useLoadingToast} from "../../../../hook/useLoadingToast.ts";
|
|
| 6 |
+import {BoardArticleListTable} from "../components/BoardArticleListTable.tsx";
|
|
| 7 |
+import {BoardArticleImageListTable} from "../components/BoardArticleImageListTable.tsx";
|
|
| 8 | 8 |
import {useBoardArticleListPage} from "../hook/page/useBoardArticleListPage.ts";
|
| 9 | 9 |
|
| 10 | 10 |
export const BoardArticleListPage = () => {
|
+++ src/admin/feature/board/article/type/boardArticle.types.ts
... | ... | @@ -0,0 +1,25 @@ |
| 1 | +import type {SearchParams} from "../../../../../type/searchParams.ts"; | |
| 2 | + | |
| 3 | +export interface BoardArticleSearchParams extends SearchParams { | |
| 4 | + bbsId: string; | |
| 5 | +} | |
| 6 | + | |
| 7 | +export interface BoardArticleListItem { | |
| 8 | + bbsId: string; | |
| 9 | + nttId: string; | |
| 10 | + replyLc: string; | |
| 11 | + nttSj: string; | |
| 12 | + atchFileId: string; | |
| 13 | + secretAt: string; | |
| 14 | + frstRegisterNm: string; | |
| 15 | + frstRegisterPnttm: string; | |
| 16 | + inqireCo: string; | |
| 17 | + fileSn: string; | |
| 18 | +} | |
| 19 | + | |
| 20 | +export interface BoardArticleExtra { | |
| 21 | + boardMaster?: { | |
| 22 | + bbsNm: string; | |
| 23 | + bbsTyCode: string; | |
| 24 | + } | |
| 25 | +} |
--- src/admin/feature/board/api/boardApi.ts
+++ src/admin/feature/board/master/api/boardMasterApi.ts
... | ... | @@ -1,21 +1,15 @@ |
| 1 |
-import {apiClient} from "../../../../api/apiClient.ts";
|
|
| 2 |
-import type {PageResponse} from "../../../../type/pageResponse.ts";
|
|
| 1 |
+import {apiClient} from "../../../../../api/apiClient.ts";
|
|
| 2 |
+import type {PageResponse} from "../../../../../type/pageResponse.ts";
|
|
| 3 | 3 |
import type {
|
| 4 |
- BoardArticleExtra, |
|
| 5 |
- BoardArticleListItem, |
|
| 6 |
- BoardArticleSearchParams, BoardDeleteListItem, |
|
| 4 |
+ BoardDeleteListItem, |
|
| 7 | 5 |
BoardDetailResponse, |
| 8 | 6 |
BoardFormItem, |
| 9 | 7 |
BoardListItem, |
| 10 | 8 |
BoardSearchParams |
| 11 |
-} from "../type/board.types.ts"; |
|
| 9 |
+} from "../type/boardMaster.types.ts"; |
|
| 12 | 10 |
|
| 13 | 11 |
export async function fetchBoardList(params: BoardSearchParams) {
|
| 14 | 12 |
return apiClient.get<PageResponse<BoardListItem>>('/cop/bbs/list.do', params);
|
| 15 |
-} |
|
| 16 |
- |
|
| 17 |
-export async function fetchBoardArticleList(params: BoardArticleSearchParams) {
|
|
| 18 |
- return apiClient.get<PageResponse<BoardArticleListItem, BoardArticleExtra>>('/cop/bbs/boardList.do', params);
|
|
| 19 | 13 |
} |
| 20 | 14 |
|
| 21 | 15 |
export async function fetchBoardDetail(bbsId: string) {
|
... | ... | @@ -34,6 +28,6 @@ |
| 34 | 28 |
return apiClient.post(`/cop/bbs/deleteBoardMaster.do?bbsId=${bbsId}`);
|
| 35 | 29 |
} |
| 36 | 30 |
|
| 37 |
-export async function deleteBoardBatch(bbsIds: BoardDeleteListItem[] ) {
|
|
| 31 |
+export async function deleteBoardBatch(bbsIds: BoardDeleteListItem[]) {
|
|
| 38 | 32 |
return apiClient.post(`/cop/bbs/deleteBoardMasterBatch.do`, bbsIds); |
| 39 | 33 |
} |
--- src/admin/feature/board/components/master/BoardFormTable.tsx
+++ src/admin/feature/board/master/components/BoardFormTable.tsx
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import type {ChangeEvent} from "react";
|
| 2 |
-import type {BoardFormItem} from "../../type/board.types.ts";
|
|
| 2 |
+import type {BoardFormItem} from "../type/boardMaster.types.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
type BoardFormTableProps = {
|
| 5 | 5 |
form: BoardFormItem; |
--- src/admin/feature/board/components/master/BoardListTable.tsx
+++ src/admin/feature/board/master/components/BoardListTable.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardListItem} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardListItem} from "../type/boardMaster.types.ts";
|
|
| 2 | 2 |
import type {SearchParams} from "../../../../../type/searchParams.ts";
|
| 3 | 3 |
import {EmptyRow} from "../../../../component/EmptyRow.tsx";
|
| 4 | 4 |
import {BoardListTableHeader} from "./BoardListTableHeader.tsx";
|
--- src/admin/feature/board/components/master/BoardListTableHeader.tsx
+++ src/admin/feature/board/master/components/BoardListTableHeader.tsx
| No changes |
--- src/admin/feature/board/components/master/BoardListTableRow.tsx
+++ src/admin/feature/board/master/components/BoardListTableRow.tsx
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import type {BoardListItem} from "../../type/board.types.ts";
|
|
| 1 |
+import type {BoardListItem} from "../type/boardMaster.types.ts";
|
|
| 2 | 2 |
import type {SearchParams} from "../../../../../type/searchParams.ts";
|
| 3 | 3 |
import {CheckBox} from "../../../../component/checkbox/CheckBox.tsx";
|
| 4 | 4 |
|
--- src/admin/feature/board/hook/mutation/useCreateBoard.ts
+++ src/admin/feature/board/master/hook/mutation/useCreateBoard.ts
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import {useMutation, useQueryClient} from "@tanstack/react-query";
|
| 2 |
-import {createBoard} from "../../api/boardApi.ts";
|
|
| 2 |
+import {createBoard} from "../../api/boardMasterApi.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
export const useCreateBoard = () => {
|
| 5 | 5 |
const queryClient = useQueryClient(); |
--- src/admin/feature/board/hook/mutation/useDeleteBatchBoard.ts
+++ src/admin/feature/board/master/hook/mutation/useDeleteBatchBoard.ts
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import {useMutation, useQueryClient} from "@tanstack/react-query";
|
| 2 |
-import {deleteBoardBatch} from "../../api/boardApi.ts";
|
|
| 2 |
+import {deleteBoardBatch} from "../../api/boardMasterApi.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
export const useDeleteBatchBoard = () => {
|
| 5 | 5 |
const queryClient = useQueryClient(); |
--- src/admin/feature/board/hook/mutation/useDeleteBoard.ts
+++ src/admin/feature/board/master/hook/mutation/useDeleteBoard.ts
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import {useMutation, useQueryClient} from "@tanstack/react-query";
|
| 2 |
-import {deleteBoard} from "../../api/boardApi.ts";
|
|
| 2 |
+import {deleteBoard} from "../../api/boardMasterApi.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
export const useDeleteBoard = () => {
|
| 5 | 5 |
const queryClient = useQueryClient(); |
--- src/admin/feature/board/hook/mutation/useUpdateBoard.ts
+++ src/admin/feature/board/master/hook/mutation/useUpdateBoard.ts
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
import {useMutation, useQueryClient} from "@tanstack/react-query";
|
| 2 |
-import {updateBoard} from "../../api/boardApi.ts";
|
|
| 2 |
+import {updateBoard} from "../../api/boardMasterApi.ts";
|
|
| 3 | 3 |
|
| 4 | 4 |
export const useUpdateBoard = () => {
|
| 5 | 5 |
const queryClient = useQueryClient(); |
--- src/admin/feature/board/hook/page/useBoardFormPage.ts
+++ src/admin/feature/board/master/hook/page/useBoardFormPage.ts
... | ... | @@ -1,14 +1,14 @@ |
| 1 | 1 |
import {type ChangeEvent, useMemo, useState} from "react";
|
| 2 | 2 |
import {useNavigate} from "react-router-dom";
|
| 3 | 3 |
import {toast} from "react-toastify";
|
| 4 |
-import {ADMIN_BBS_MASTER_ROUTE} from "../../../../route/adminRouteMap.ts";
|
|
| 5 |
-import type {CommonCodeItem} from "../../../../../type/code.ts";
|
|
| 6 |
-import type {BoardFormItem} from "../../type/board.types.ts";
|
|
| 4 |
+import {ADMIN_BBS_MASTER_ROUTE} from "../../../../../route/adminRouteMap.ts";
|
|
| 5 |
+import type {CommonCodeItem} from "../../../../../../type/code.ts";
|
|
| 6 |
+import type {BoardFormItem} from "../../type/boardMaster.types.ts";
|
|
| 7 | 7 |
import {useBoardDetail} from "../query/useBoardDetail.ts";
|
| 8 | 8 |
import {useCreateBoard} from "../mutation/useCreateBoard.ts";
|
| 9 | 9 |
import {useDeleteBoard} from "../mutation/useDeleteBoard.ts";
|
| 10 | 10 |
import {useUpdateBoard} from "../mutation/useUpdateBoard.ts";
|
| 11 |
-import type {FormActionsModel, HeaderModel, StatusModel} from "../../../../../type/viewModel.ts";
|
|
| 11 |
+import type {FormActionsModel, HeaderModel, StatusModel} from "../../../../../../type/viewModel.ts";
|
|
| 12 | 12 |
|
| 13 | 13 |
export type BoardFormMode = 'create' | 'update'; |
| 14 | 14 |
|
--- src/admin/feature/board/hook/page/useBoardListPage.ts
+++ src/admin/feature/board/master/hook/page/useBoardListPage.ts
... | ... | @@ -1,9 +1,9 @@ |
| 1 | 1 |
import {useMemo, useState} from "react";
|
| 2 |
-import type {BoardDeleteListItem, BoardListItem, BoardSearchParams} from "../../type/board.types.ts";
|
|
| 2 |
+import type {BoardDeleteListItem, BoardListItem, BoardSearchParams} from "../../type/boardMaster.types.ts";
|
|
| 3 | 3 |
import {useBoardList} from "../query/useBoardList.ts";
|
| 4 |
-import {ADMIN_BBS_ARTICLE_FORM_ROUTE, ADMIN_BBS_ARTICLE_LIST_ROUTE} from "../../../../route/adminRouteMap.ts";
|
|
| 4 |
+import {ADMIN_BBS_ARTICLE_FORM_ROUTE, ADMIN_BBS_ARTICLE_LIST_ROUTE} from "../../../../../route/adminRouteMap.ts";
|
|
| 5 | 5 |
import {useNavigate} from "react-router-dom";
|
| 6 |
-import {useCheckedList} from "../../../../hook/useCheckedList.ts";
|
|
| 6 |
+import {useCheckedList} from "../../../../../hook/useCheckedList.ts";
|
|
| 7 | 7 |
import {toast} from "react-toastify";
|
| 8 | 8 |
import {useDeleteBatchBoard} from "../mutation/useDeleteBatchBoard.ts";
|
| 9 | 9 |
import type {
|
... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 |
RowActionsModel, |
| 15 | 15 |
SearchModel, |
| 16 | 16 |
StatusModel, |
| 17 |
-} from "../../../../../type/viewModel.ts"; |
|
| 17 |
+} from "../../../../../../type/viewModel.ts"; |
|
| 18 | 18 |
|
| 19 | 19 |
type BoardListRowActions = {
|
| 20 | 20 |
onDetail: (bbsId: string) => void; |
--- src/admin/feature/board/hook/query/useBoardDetail.ts
+++ src/admin/feature/board/master/hook/query/useBoardDetail.ts
... | ... | @@ -1,4 +1,4 @@ |
| 1 |
-import {fetchBoardDetail} from "../../api/boardApi.ts";
|
|
| 1 |
+import {fetchBoardDetail} from "../../api/boardMasterApi.ts";
|
|
| 2 | 2 |
import {keepPreviousData, useQuery} from "@tanstack/react-query";
|
| 3 | 3 |
|
| 4 | 4 |
type UseBoardDetailOptions = {
|
--- src/admin/feature/board/hook/query/useBoardList.ts
+++ src/admin/feature/board/master/hook/query/useBoardList.ts
... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 |
import {keepPreviousData, useQuery} from "@tanstack/react-query";
|
| 2 |
-import {fetchBoardList} from "../../api/boardApi.ts";
|
|
| 3 |
-import type {SearchParams} from "../../../../../type/searchParams.ts";
|
|
| 2 |
+import {fetchBoardList} from "../../api/boardMasterApi.ts";
|
|
| 3 |
+import type {SearchParams} from "../../../../../../type/searchParams.ts";
|
|
| 4 | 4 |
|
| 5 | 5 |
export function useBoardList(searchParams: SearchParams) {
|
| 6 | 6 |
|
--- src/admin/feature/board/page/BoardFormPage.tsx
+++ src/admin/feature/board/master/page/BoardFormPage.tsx
... | ... | @@ -1,8 +1,8 @@ |
| 1 | 1 |
import {useParams} from "react-router-dom";
|
| 2 |
-import {PageHeader} from "../../../component/PageHeader.tsx";
|
|
| 3 |
-import {useLoadingToast} from "../../../hook/useLoadingToast.ts";
|
|
| 4 |
-import {ActionButtonFormGroup} from "../../../component/button/ActionButtonFormGroup.tsx";
|
|
| 5 |
-import {BoardFormTable} from "../components/master/BoardFormTable.tsx";
|
|
| 2 |
+import {PageHeader} from "../../../../component/PageHeader.tsx";
|
|
| 3 |
+import {useLoadingToast} from "../../../../hook/useLoadingToast.ts";
|
|
| 4 |
+import {ActionButtonFormGroup} from "../../../../component/button/ActionButtonFormGroup.tsx";
|
|
| 5 |
+import {BoardFormTable} from "../components/BoardFormTable.tsx";
|
|
| 6 | 6 |
import {useBoardFormPage} from "../hook/page/useBoardFormPage.ts";
|
| 7 | 7 |
|
| 8 | 8 |
export const BoardFormPage = () => {
|
--- src/admin/feature/board/page/BoardListPage.tsx
+++ src/admin/feature/board/master/page/BoardListPage.tsx
... | ... | @@ -1,9 +1,9 @@ |
| 1 |
-import {PageHeader} from "../../../component/PageHeader.tsx";
|
|
| 2 |
-import {ListSearchForm} from "../../../component/ListSearchForm.tsx";
|
|
| 3 |
-import {BoardListTable} from "../components/master/BoardListTable.tsx";
|
|
| 4 |
-import {useLoadingToast} from "../../../hook/useLoadingToast.ts";
|
|
| 5 |
-import {Pagination} from "../../../component/pagination/Pagination.tsx";
|
|
| 6 |
-import {ActionButtonListGroup} from "../../../component/button/ActionButtonListGroup.tsx";
|
|
| 1 |
+import {PageHeader} from "../../../../component/PageHeader.tsx";
|
|
| 2 |
+import {ListSearchForm} from "../../../../component/ListSearchForm.tsx";
|
|
| 3 |
+import {BoardListTable} from "../components/BoardListTable.tsx";
|
|
| 4 |
+import {useLoadingToast} from "../../../../hook/useLoadingToast.ts";
|
|
| 5 |
+import {Pagination} from "../../../../component/pagination/Pagination.tsx";
|
|
| 6 |
+import {ActionButtonListGroup} from "../../../../component/button/ActionButtonListGroup.tsx";
|
|
| 7 | 7 |
import {useBoardListPage} from "../hook/page/useBoardListPage.ts";
|
| 8 | 8 |
|
| 9 | 9 |
export const BoardListPage = () => {
|
+++ src/admin/feature/board/master/type/boardMaster.types.ts
... | ... | @@ -0,0 +1,38 @@ |
| 1 | +import type {SearchParams} from "../../../../../type/searchParams.ts"; | |
| 2 | +import type {CommonCodeItem} from "../../../../../type/code.ts"; | |
| 3 | + | |
| 4 | +export interface BoardSearchParams extends SearchParams { | |
| 5 | +} | |
| 6 | + | |
| 7 | +export interface BoardDeleteListItem { | |
| 8 | + bbsId: string; | |
| 9 | +} | |
| 10 | + | |
| 11 | +export interface BoardListItem { | |
| 12 | + bbsId: string | |
| 13 | + bbsNm: string | |
| 14 | + menuNm: string | |
| 15 | + newCnt: number | |
| 16 | + totCnt: number | |
| 17 | + bbsTyCodeNm: string | |
| 18 | + frstRegisterPnttm: string | |
| 19 | + useAt: 'Y' | 'N' | |
| 20 | +} | |
| 21 | + | |
| 22 | +export interface BoardFormItem { | |
| 23 | + bbsId: string; | |
| 24 | + bbsNm: string; | |
| 25 | + bbsTyCode: string; | |
| 26 | + noticeYn: string; | |
| 27 | + addYn: string; | |
| 28 | + fileAtchPosblAt: string; | |
| 29 | + posblAtchFileNumber: string; | |
| 30 | + posblAtchFileSize: string; | |
| 31 | + viewsYn: string; | |
| 32 | + useAt: string; | |
| 33 | +} | |
| 34 | + | |
| 35 | +export interface BoardDetailResponse { | |
| 36 | + result: BoardFormItem; | |
| 37 | + typeList: CommonCodeItem[]; | |
| 38 | +} |
--- src/admin/feature/board/type/board.types.ts
... | ... | @@ -1,63 +0,0 @@ |
| 1 | -import type {SearchParams} from "../../../../type/searchParams.ts"; | |
| 2 | -import type {CommonCodeItem} from "../../../../type/code.ts"; | |
| 3 | - | |
| 4 | -export interface BoardSearchParams extends SearchParams { | |
| 5 | - | |
| 6 | -} | |
| 7 | - | |
| 8 | -export interface BoardArticleSearchParams extends SearchParams { | |
| 9 | - bbsId: string; | |
| 10 | -} | |
| 11 | - | |
| 12 | -export interface BoardDeleteListItem { | |
| 13 | - bbsId: string; | |
| 14 | -} | |
| 15 | - | |
| 16 | -export interface BoardListItem { | |
| 17 | - bbsId: string | |
| 18 | - bbsNm: string | |
| 19 | - menuNm: string | |
| 20 | - newCnt: number | |
| 21 | - totCnt: number | |
| 22 | - bbsTyCodeNm: string | |
| 23 | - frstRegisterPnttm: string | |
| 24 | - useAt: 'Y' | 'N' | |
| 25 | -} | |
| 26 | - | |
| 27 | -export interface BoardArticleListItem { | |
| 28 | - bbsId: string; | |
| 29 | - nttId: string; | |
| 30 | - replyLc: string; | |
| 31 | - nttSj: string; | |
| 32 | - atchFileId: string; | |
| 33 | - secretAt: string; | |
| 34 | - frstRegisterNm: string; | |
| 35 | - frstRegisterPnttm: string; | |
| 36 | - inqireCo: string; | |
| 37 | - fileSn: string; | |
| 38 | -} | |
| 39 | - | |
| 40 | -export interface BoardArticleExtra { | |
| 41 | - boardMaster?: { | |
| 42 | - bbsNm: string; | |
| 43 | - bbsTyCode: string; | |
| 44 | - } | |
| 45 | -} | |
| 46 | - | |
| 47 | -export interface BoardFormItem { | |
| 48 | - bbsId: string; | |
| 49 | - bbsNm: string; | |
| 50 | - bbsTyCode: string; | |
| 51 | - noticeYn: string; | |
| 52 | - addYn: string; | |
| 53 | - fileAtchPosblAt: string; | |
| 54 | - posblAtchFileNumber: string; | |
| 55 | - posblAtchFileSize: string; | |
| 56 | - viewsYn: string; | |
| 57 | - useAt: string; | |
| 58 | -} | |
| 59 | - | |
| 60 | -export interface BoardDetailResponse { | |
| 61 | - result: BoardFormItem; | |
| 62 | - typeList: CommonCodeItem[]; | |
| 63 | -}(No newline at end of file) |
--- src/admin/feature/role/api/roleApi.ts
... | ... | @@ -1,49 +0,0 @@ |
| 1 | -import {apiClient} from "../../../../api/apiClient.ts"; | |
| 2 | -import type { | |
| 3 | - AuthorRoleListItem, | |
| 4 | - AuthorGroupSearchParams, AuthorListItem, | |
| 5 | - AuthorRoleMenuSearchParams, | |
| 6 | - AuthorRoleSearchParams, | |
| 7 | - AuthorSearchParams, RoleSearchParams, UpdateAuthorRoleParams, RoleDetailResponse | |
| 8 | -} from "../type/role.types.ts"; | |
| 9 | -import type {PageResponse} from "../../../../type/pageResponse.ts"; | |
| 10 | -// 권한별롤관리 | |
| 11 | -export async function fetchAuthorList(params: AuthorSearchParams) { | |
| 12 | - return apiClient.get<PageResponse<AuthorListItem>>(`/sec/ram/list.do`, params); | |
| 13 | -} | |
| 14 | - | |
| 15 | -export async function fetchAuthorDetail(authorCode: string) { | |
| 16 | - return apiClient.get(`/sec/ram/detail.do?authorCode=${authorCode}`); | |
| 17 | -} | |
| 18 | - | |
| 19 | -// 권한롤관리 | |
| 20 | -export async function fetchAuthorRoleList(params: AuthorRoleSearchParams) { | |
| 21 | - return apiClient.get<PageResponse<AuthorRoleListItem>>(`/sec/ram/authorList.do`, params); | |
| 22 | -} | |
| 23 | - | |
| 24 | -// 권한별메뉴관리 | |
| 25 | -export async function fetchAuthorRoleMenuList(params: AuthorRoleMenuSearchParams) { | |
| 26 | - return apiClient.get(`/sym/mnu/mcm/list.do`, params); | |
| 27 | -} | |
| 28 | -export async function fetchAuthorRoleMenuDetail(authorCode: string) { | |
| 29 | - return apiClient.get(`/sym/mnu/mcm/detail?authorCode=${authorCode}`); | |
| 30 | -} | |
| 31 | - | |
| 32 | -// 관리자별권한관리 | |
| 33 | -export async function fetchAuthorGroupList(params: AuthorGroupSearchParams) { | |
| 34 | - return apiClient.get(`/sec/rgm/list.do`, params); | |
| 35 | -} | |
| 36 | - | |
| 37 | -// 롤관리 | |
| 38 | -export async function fetchRoleList(params: RoleSearchParams) { | |
| 39 | - return apiClient.get(`/sec/rmt/list.do`, params); | |
| 40 | -} | |
| 41 | - | |
| 42 | -export async function fetchRoleDetail(roleCode: string) { | |
| 43 | - return apiClient.get<RoleDetailResponse>(`/sec/rmt/detail.do?roleCode=${roleCode}`); | |
| 44 | -} | |
| 45 | - | |
| 46 | -export async function updateAuthorRole(params: UpdateAuthorRoleParams) { | |
| 47 | - return apiClient.post(`/sec/ram/updateAuthorRole.do?authorCode=${params.authorCode}&roleCode=${params.roleCode}®Yn=${params.regYn}`); | |
| 48 | -} | |
| 49 | - |
--- src/admin/feature/role/hook/query/useAuthorRoleMenuList.ts
... | ... | @@ -1,11 +0,0 @@ |
| 1 | -import type {AuthorRoleSearchParams} from "../../type/role.types.ts"; | |
| 2 | -import {keepPreviousData, useQuery} from "@tanstack/react-query"; | |
| 3 | -import {fetchAuthorRoleMenuList} from "../../api/roleApi.ts"; | |
| 4 | - | |
| 5 | -export function useAuthorRoleMenuList(searchParams: AuthorRoleSearchParams) { | |
| 6 | - return useQuery({ | |
| 7 | - queryKey: ['authorRoleMenuList', searchParams], | |
| 8 | - queryFn: () => fetchAuthorRoleMenuList(searchParams), | |
| 9 | - placeholderData: keepPreviousData | |
| 10 | - }); | |
| 11 | -}(No newline at end of file) |
+++ src/admin/feature/role/role/api/roleApi.ts
... | ... | @@ -0,0 +1,11 @@ |
| 1 | +import {apiClient} from "../../../../../api/apiClient.ts"; | |
| 2 | +import type {PageResponse} from "../../../../../type/pageResponse.ts"; | |
| 3 | +import type {RoleDetailResponse, RoleSearchParams} from "../type/role.types.ts"; | |
| 4 | + | |
| 5 | +export async function fetchRoleList(params: RoleSearchParams) { | |
| 6 | + return apiClient.get<PageResponse<unknown>>(`/sec/rmt/list.do`, params); | |
| 7 | +} | |
| 8 | + | |
| 9 | +export async function fetchRoleDetail(roleCode: string) { | |
| 10 | + return apiClient.get<RoleDetailResponse>(`/sec/rmt/detail.do?roleCode=${roleCode}`); | |
| 11 | +} |
--- src/admin/feature/role/hook/page/useRoleFormPage.ts
+++ src/admin/feature/role/role/hook/page/useRoleFormPage.ts
| No changes |
--- src/admin/feature/role/hook/query/useRoleDetail.ts
+++ src/admin/feature/role/role/hook/query/useRoleDetail.ts
| No changes |
--- src/admin/feature/role/hook/query/useRoleList.ts
+++ src/admin/feature/role/role/hook/query/useRoleList.ts
| No changes |
--- src/admin/feature/role/page/AuthorRoleFormPage.tsx
+++ src/admin/feature/role/role/page/AuthorRoleFormPage.tsx
| No changes |
+++ src/admin/feature/role/role/type/role.types.ts
... | ... | @@ -0,0 +1,13 @@ |
| 1 | +import type {SearchParams} from "../../../../../type/searchParams.ts"; | |
| 2 | + | |
| 3 | +export interface RoleSearchParams extends SearchParams { | |
| 4 | +} | |
| 5 | + | |
| 6 | +export interface RoleDetailResponse { | |
| 7 | + roleCode: string, | |
| 8 | + roleNm: string, | |
| 9 | + rolePtn: string, | |
| 10 | + roleDc: string, | |
| 11 | + roleSort: string, | |
| 12 | + roleCreatDe: string, | |
| 13 | +} |
--- src/admin/feature/role/type/role.types.ts
... | ... | @@ -1,51 +0,0 @@ |
| 1 | -import type {SearchParams} from "../../../../type/searchParams.ts"; | |
| 2 | - | |
| 3 | -export interface AuthorSearchParams extends SearchParams { | |
| 4 | -} | |
| 5 | - | |
| 6 | -export interface AuthorRoleSearchParams extends SearchParams { | |
| 7 | - authorCode: string; | |
| 8 | -} | |
| 9 | - | |
| 10 | -export interface AuthorRoleMenuSearchParams extends SearchParams { | |
| 11 | -} | |
| 12 | - | |
| 13 | -export interface AuthorGroupSearchParams extends SearchParams { | |
| 14 | -} | |
| 15 | - | |
| 16 | -export interface RoleSearchParams extends SearchParams { | |
| 17 | -} | |
| 18 | - | |
| 19 | -export interface UpdateAuthorRoleParams { | |
| 20 | - authorCode: string, | |
| 21 | - roleCode: string, | |
| 22 | - regYn: string | |
| 23 | -} | |
| 24 | - | |
| 25 | -export interface RoleDetailResponse { | |
| 26 | - roleCode: string, | |
| 27 | - roleNm: string, | |
| 28 | - rolePtn: string, | |
| 29 | - roleDc: string, | |
| 30 | - roleSort: string, | |
| 31 | - roleCreatDe: string, | |
| 32 | -} | |
| 33 | - | |
| 34 | - | |
| 35 | -export interface AuthorListItem { | |
| 36 | - authorCode: string; | |
| 37 | - authorNm: string; | |
| 38 | - authorDc: string; | |
| 39 | - authorCreatDe: string; | |
| 40 | -} | |
| 41 | - | |
| 42 | -export interface AuthorRoleListItem { | |
| 43 | - regYn: string; | |
| 44 | - roleNm: string; | |
| 45 | - roleCode: string; | |
| 46 | - rolePtn: string; | |
| 47 | - roleSort: string; | |
| 48 | - roleDc: string; | |
| 49 | - creatDt: string; | |
| 50 | - authorCode: string | |
| 51 | -}(No newline at end of file) |
--- src/admin/route/AdminRoute.tsx
+++ src/admin/route/AdminRoute.tsx
... | ... | @@ -1,16 +1,16 @@ |
| 1 | 1 |
import {Navigate, Route, Routes} from "react-router-dom";
|
| 2 |
-import {BoardListPage} from "../feature/board/page/BoardListPage.tsx";
|
|
| 2 |
+import {BoardListPage} from "../feature/board/master/page/BoardListPage.tsx";
|
|
| 3 | 3 |
import {
|
| 4 | 4 |
ADMIN_AUTHOR_DETAIL_ROUTE, |
| 5 | 5 |
ADMIN_AUTHOR_LIST_ROUTE, |
| 6 | 6 |
ADMIN_AUTHOR_ROLE_LIST_ROUTE, ADMIN_BBS_ARTICLE_FORM_ROUTE, |
| 7 | 7 |
ADMIN_BBS_MASTER_ROUTE, ADMIN_ROLE_FORM_ROUTE |
| 8 | 8 |
} from "./adminRouteMap.ts"; |
| 9 |
-import {BoardArticleListPage} from "../feature/board/page/BoardArticleListPage.tsx";
|
|
| 10 |
-import {BoardFormPage} from "../feature/board/page/BoardFormPage.tsx";
|
|
| 11 |
-import {AuthorListPage} from "../feature/role/page/AuthorListPage.tsx";
|
|
| 12 |
-import {AuthorRoleListPage} from "../feature/role/page/AuthorRoleListPage.tsx";
|
|
| 13 |
-import {AuthorRoleFormPage} from "../feature/role/page/AuthorRoleFormPage.tsx";
|
|
| 9 |
+import {BoardArticleListPage} from "../feature/board/article/page/BoardArticleListPage.tsx";
|
|
| 10 |
+import {BoardFormPage} from "../feature/board/master/page/BoardFormPage.tsx";
|
|
| 11 |
+import {AuthorListPage} from "../feature/role/author/page/AuthorListPage.tsx";
|
|
| 12 |
+import {AuthorRoleListPage} from "../feature/role/authorRole/page/AuthorRoleListPage.tsx";
|
|
| 13 |
+import {AuthorRoleFormPage} from "../feature/role/role/page/AuthorRoleFormPage.tsx";
|
|
| 14 | 14 |
|
| 15 | 15 |
const ReadyPage = () => {
|
| 16 | 16 |
return <div>Preparing menu.</div>; |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?