Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

서술형 관련 코드 삭제 #117

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
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
24 changes: 5 additions & 19 deletions packages/admin/src/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { URL } from './constants/url';
import {
LoginPage,
DataLabelingPage,
DoneDataDetailPage,
ValidatingDataPage,
LabelingDataListPage,
ValidatingDataListPage,
DoneDataListPage,
LongProblemAddPage,
LongProblemDetailPage,
LongProblemListPage,
LongProblemEditPage,
} from './pages';
import { LoginPage } from './pages/login/LoginPage';
import { LongProblemListPage } from './pages/problem/long/LongProblemListPage';
import { LongProblemDetailPage } from './pages/problem/long/LongProblemDetailPage';
import { LongProblemAddPage } from './pages/problem/long/LongProblemAddPage';
import { LongProblemEditPage } from './pages/problem/long/LongProblemEditPage';
import { MultipleProblemAddPage } from './pages/problem/multiple/MultipleProblemAddPage';
import { MultipleProblemDetailPage } from './pages/problem/multiple/MultipleProblemDetailPage';
import { MultipleProblemEditPage } from './pages/problem/multiple/MultipleProblemEditPage';
Expand All @@ -31,12 +23,6 @@ const Router = () => {
<BrowserRouter>
<Routes>
<Route path={URL.LOGIN} element={<LoginPage />} />
<Route path={URL.LABELING_DATA_LIST} element={<LabelingDataListPage />} />
<Route path={URL.VALIDATING_DATA_LIST} element={<ValidatingDataListPage />} />
<Route path={URL.DONE_DATA_LIST} element={<DoneDataListPage />} />
<Route path={URL.DATA_LABELING} element={<DataLabelingPage />} />
<Route path={URL.DATA_VALIDATING} element={<ValidatingDataPage />} />
<Route path={URL.DATA_DONE} element={<DoneDataDetailPage />} />
<Route path={URL.LONG_PROBLEM_LIST} element={<LongProblemListPage />} />
<Route path={URL.LONG_PROBLEM_DETAIL} element={<LongProblemDetailPage />} />
<Route path={URL.LONG_PROBLEM_ADD} element={<LongProblemAddPage />} />
Expand Down
34 changes: 0 additions & 34 deletions packages/admin/src/api/wrapper/data/dataApiWrapper.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
IProblemDetailResponse,
IProblemCreateData,
IProblemListData,
IProblemUpdateData,
} from '../../../types/problem/api';
import apiClient from '../../apiClient';
import { API_URL, API_URL_WITH_PARAMS } from '../../../constants/apiUrl';
Expand All @@ -30,7 +31,7 @@ export const longProblemApiWrapper = {
createLongProblem: (data: IProblemCreateData) => {
apiClient.post(API_URL.LONG_PROBLEM_CREATE, data);
},
updateLongProblem: (problem_id: string, data: IProblemCreateData) => {
updateLongProblem: (problem_id: string, data: IProblemUpdateData) => {
isEmptyOrNotNumericError(problem_id);
return apiClient.put(API_URL_WITH_PARAMS.LONG_PROBLEM_UPDATE(problem_id), data);
},
Expand Down
11 changes: 0 additions & 11 deletions packages/admin/src/components/Menu/MenuBarItems.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import ShortTextIcon from '@mui/icons-material/ShortText';
import StickyNote2Icon from '@mui/icons-material/StickyNote2';
import FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';
import LabelIcon from '@mui/icons-material/Label';
import SearchIcon from '@mui/icons-material/Search';
import DoneAllIcon from '@mui/icons-material/DoneAll';
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
import ViewListIcon from '@mui/icons-material/ViewList';
import NotificationsIcon from '@mui/icons-material/Notifications';
Expand All @@ -20,14 +17,6 @@ const MENU_BAR_ITEMS = [
{ text: '문제 세트', icon: <ViewListIcon />, url: URL.PROBLEM_SET_LIST },
],
},
{
title: 'AI 데이터 관리',
menuBarListElements: [
{ text: '라벨링', icon: <LabelIcon />, url: URL.LABELING_DATA_LIST },
{ text: '검수', icon: <SearchIcon />, url: URL.VALIDATING_DATA_LIST },
{ text: '완료', icon: <DoneAllIcon />, url: URL.DONE_DATA_LIST },
],
},
{
title: '사용자 관리',
menuBarListElements: [
Expand Down
5 changes: 0 additions & 5 deletions packages/admin/src/constants/apiUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const API_URL = {
PROBLEM_SEARCH: '/v1/problems',
PROBLEM_SET_LIST: '/v1/problem-sets',
PROBLEM_SET_LIST_CREATE: '/admin/problem-sets',
DATA_LIST: '/admin/user-answers',
DATA_LIST_CREATE: '/admin/user-answers',
USER_DETAIL: '',
USER_LIST: '/v1/users',
NOTICE: '/admin/notification',
Expand All @@ -25,9 +23,6 @@ const API_URL_WITH_PARAMS = {
MULTIPLE_PROBLEM_UPDATE: (problem_id: string) => `/admin/problems/multiple/${problem_id}`,
SHORT_PROBLEM_DETAIL: (problem_id: string) => `/admin/problems/short/${problem_id}`,
SHORT_PROBLEM_UPDATE: (problem_id: string) => `/admin/problems/short/${problem_id}`,
DATA_DETAIL: (user_answer_id: string) => `/admin/user-answers/${user_answer_id}`,
DATA_LABELING: (user_answer_id: string) => `/admin/user-answers/${user_answer_id}/label`,
DATA_VALIDATING: (user_answer_id: string) => `/admin/user-answers/${user_answer_id}/validate`,
};

export { API_URL, API_URL_WITH_PARAMS };
6 changes: 0 additions & 6 deletions packages/admin/src/constants/standard.ts

This file was deleted.

61 changes: 0 additions & 61 deletions packages/admin/src/constants/tableHeads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,67 +79,6 @@ export const shortTableHeads: ITableHead[] = [
},
];

export const validatingDataTableHeads: ITableHead[] = [
{
id: 'id',
name: 'Data ID',
},
{
id: 'problemTitle',
name: '문제 제목',
},
{
id: 'assignedUsername',
name: '담당자',
},
{
id: 'updatedAt',
name: '완료된 시간',
},
];

export const labelingDataTableHeads: ITableHead[] = [
{
id: 'id',
name: 'Data ID',
},
{
id: 'problemTitle',
name: '문제 제목',
},
{
id: 'assignedUsername',
name: '담당자',
},
{
id: 'updatedAt',
name: '생성 시간',
},
];

export const doneDataTableHeads: ITableHead[] = [
{
id: 'id',
name: 'Data ID',
},
{
id: 'problemTitle',
name: '문제 제목',
},
{
id: 'validatingUsername',
name: '검수자',
},
{
id: 'assignedUsername',
name: '담당자',
},
{
id: 'updatedAt',
name: '완료된 시간',
},
];

export const userTableHeads: ITableHead[] = [
{
id: 'id',
Expand Down
9 changes: 0 additions & 9 deletions packages/admin/src/constants/url.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
const URL = {
LOGIN: '/',
LABELING_DATA_LIST: '/data/labeling',
VALIDATING_DATA_LIST: '/data/validating',
DONE_DATA_LIST: '/data/done',
DATA_LABELING: '/data/labeling/:id',
DATA_VALIDATING: '/data/validating/:id',
DATA_DONE: '/data/done/:id',
LONG_PROBLEM_LIST: '/problem/long',
SHORT_PROBLEM_LIST: '/problem/short',
MULTIPLE_PROBLEM_LIST: '/problem/multiple',
Expand All @@ -26,9 +20,6 @@ const URL = {
};

const URLWithParam = {
DATA_LABELING: (id: string) => `/data/labeling/${id}`,
DATA_VALIDATING: (id: string) => `/data/validating/${id}`,
DATA_DONE: (id: string) => `/data/done/${id}`,
LONG_PROBLEM_DETAIL: (id: string) => `/problem/long/${id}`,
LONG_PROBLEM_EDIT: (id: string) => `/problem/long/edit/${id}`,
SHORT_PROBLEM_DETAIL: (id: string) => `/problem/short/${id}`,
Expand Down
55 changes: 0 additions & 55 deletions packages/admin/src/hooks/useStandard.ts

This file was deleted.

25 changes: 1 addition & 24 deletions packages/admin/src/hooks/useStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,4 @@ const useAuthStore = create((set) => ({
setIsLogin: () => set((state: IAuthStoreState) => ({ isLogin: !state.isLogin })),
}));

interface ILabelingDataStore {
labelingDatas: number[];
setLabelingDatas: (newDatas: number[]) => void;
resetLabelingDatas: () => void;
currPage: number;
increaseCurrPage: () => void;
currIndex: number;
increaseCurrIndex: () => void;
}

// 라벨링 시작했을 때 데이터 id값 리스트
const useLabelingDataStore = (initialDatas: number[]) =>
create<ILabelingDataStore>((set) => ({
labelingDatas: [...initialDatas],
setLabelingDatas: (newDatas: number[]) => set({ labelingDatas: [...newDatas] }),
resetLabelingDatas: () => set({ labelingDatas: [] }),

currPage: 0,
increaseCurrPage: () => set((state) => ({ currPage: state.currPage + 1 })),
currIndex: 0,
increaseCurrIndex: () => set((state) => ({ currIndex: state.currIndex + 1 })),
}));

export { useAuthStore, useLabelingDataStore };
export { useAuthStore };
54 changes: 0 additions & 54 deletions packages/admin/src/pages/data/DataListPageTemplate.tsx

This file was deleted.

Loading