diff --git a/tkeg/api/app/routers/dashboard.py b/tkeg/api/app/routers/dashboard.py
index 17a3af8..90592cb 100644
--- a/tkeg/api/app/routers/dashboard.py
+++ b/tkeg/api/app/routers/dashboard.py
@@ -427,71 +427,6 @@ async def get_quick_actions(
raise HTTPException(status_code=500, detail=f"빠른 작업 조회 실패: {str(e)}")
-@router.post("/projects")
-async def create_project(
- official_project_code: str = Query(..., description="프로젝트 코드"),
- project_name: str = Query(..., description="프로젝트 이름"),
- client_name: str = Query(None, description="고객사명"),
- current_user: dict = Depends(get_current_user),
- db: Session = Depends(get_db)
-):
- """
- 새 프로젝트 생성
-
- Args:
- official_project_code: 프로젝트 코드 (예: J24-001)
- project_name: 프로젝트 이름
- client_name: 고객사명 (선택)
-
- Returns:
- dict: 생성된 프로젝트 정보
- """
- try:
- # 중복 확인
- check_query = text("SELECT id FROM projects WHERE official_project_code = :code")
- existing = db.execute(check_query, {"code": official_project_code}).fetchone()
-
- if existing:
- raise HTTPException(status_code=400, detail="이미 존재하는 프로젝트 코드입니다")
-
- # 프로젝트 생성
- insert_query = text("""
- INSERT INTO projects (official_project_code, project_name, client_name, status)
- VALUES (:code, :name, :client, 'active')
- RETURNING *
- """)
-
- new_project = db.execute(insert_query, {
- "code": official_project_code,
- "name": project_name,
- "client": client_name
- }).fetchone()
-
- db.commit()
-
- # TODO: 활동 로그 기록 (추후 구현)
- # ActivityLogger 사용법 확인 필요
-
- return {
- "success": True,
- "message": "프로젝트가 생성되었습니다",
- "project": {
- "id": new_project.id,
- "official_project_code": new_project.official_project_code,
- "project_name": new_project.project_name,
- "client_name": new_project.client_name,
- "status": new_project.status
- }
- }
-
- except HTTPException:
- raise
- except Exception as e:
- db.rollback()
- logger.error(f"프로젝트 생성 실패: {str(e)}")
- raise HTTPException(status_code=500, detail=f"프로젝트 생성 실패: {str(e)}")
-
-
@router.get("/projects")
async def get_projects(
current_user: dict = Depends(get_current_user),
diff --git a/tkeg/web/src/pages/dashboard/CreateProjectDialog.jsx b/tkeg/web/src/pages/dashboard/CreateProjectDialog.jsx
deleted file mode 100644
index bc12f82..0000000
--- a/tkeg/web/src/pages/dashboard/CreateProjectDialog.jsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import React, { useState } from 'react';
-import Dialog from '@mui/material/Dialog';
-import DialogTitle from '@mui/material/DialogTitle';
-import DialogContent from '@mui/material/DialogContent';
-import DialogActions from '@mui/material/DialogActions';
-import TextField from '@mui/material/TextField';
-import Button from '@mui/material/Button';
-import Box from '@mui/material/Box';
-import api from '../../api';
-
-export default function CreateProjectDialog({ open, onClose, onCreated }) {
- const [code, setCode] = useState('');
- const [name, setName] = useState('');
- const [client, setClient] = useState('');
- const [submitting, setSubmitting] = useState(false);
-
- const handleSubmit = async () => {
- if (!code.trim() || !name.trim()) return;
- setSubmitting(true);
- try {
- await api.post('/dashboard/projects', null, {
- params: {
- official_project_code: code.trim(),
- project_name: name.trim(),
- client_name: client.trim() || undefined,
- },
- });
- setCode('');
- setName('');
- setClient('');
- onCreated?.();
- onClose();
- } catch (err) {
- alert(err.response?.data?.detail || '프로젝트 생성 실패');
- } finally {
- setSubmitting(false);
- }
- };
-
- return (
-
- );
-}
diff --git a/tkeg/web/src/pages/dashboard/DashboardPage.jsx b/tkeg/web/src/pages/dashboard/DashboardPage.jsx
index 37304db..3ebf7eb 100644
--- a/tkeg/web/src/pages/dashboard/DashboardPage.jsx
+++ b/tkeg/web/src/pages/dashboard/DashboardPage.jsx
@@ -6,7 +6,6 @@ import ProjectSelectorBar from './ProjectSelectorBar';
import MetricCards from './MetricCards';
import QuickActionCards from './QuickActionCards';
import AdminSection from './AdminSection';
-import CreateProjectDialog from './CreateProjectDialog';
import useDashboardData from './useDashboardData';
export default function DashboardPage({
@@ -22,7 +21,6 @@ export default function DashboardPage({
...rest
}) {
const [selectedProject, setSelectedProject] = useState(null);
- const [dialogOpen, setDialogOpen] = useState(false);
const { loading, getMetrics } = useDashboardData(user, projects, selectedProject);
const roleLabelMap = {
@@ -49,7 +47,6 @@ export default function DashboardPage({
projects={projects}
selectedProject={selectedProject}
onSelectProject={setSelectedProject}
- onCreateProject={() => setDialogOpen(true)}
inactiveProjects={inactiveProjects}
/>
@@ -72,13 +69,6 @@ export default function DashboardPage({
{/* Admin section */}
-
- {/* Create project dialog */}
- setDialogOpen(false)}
- onCreated={loadProjects}
- />
);
}
diff --git a/tkeg/web/src/pages/dashboard/ProjectSelectorBar.jsx b/tkeg/web/src/pages/dashboard/ProjectSelectorBar.jsx
index ce4e937..34578da 100644
--- a/tkeg/web/src/pages/dashboard/ProjectSelectorBar.jsx
+++ b/tkeg/web/src/pages/dashboard/ProjectSelectorBar.jsx
@@ -2,14 +2,11 @@ import React from 'react';
import Box from '@mui/material/Box';
import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
-import Button from '@mui/material/Button';
-import AddIcon from '@mui/icons-material/Add';
export default function ProjectSelectorBar({
projects,
selectedProject,
onSelectProject,
- onCreateProject,
inactiveProjects,
}) {
const activeProjects = projects.filter(p => {
@@ -38,15 +35,6 @@ export default function ProjectSelectorBar({
)}
noOptionsText="프로젝트 없음"
/>
- }
- onClick={onCreateProject}
- sx={{ whiteSpace: 'nowrap' }}
- >
- 프로젝트 생성
-
);
}