Merge branch 'dev' of http://39.117.244.52:3000/kjs/ERP-node into dataflowMng

This commit is contained in:
hyeonsu
2025-09-10 11:04:22 +09:00
135 changed files with 26619 additions and 2662 deletions

View File

@@ -0,0 +1,30 @@
import express from "express";
import { ButtonActionStandardController } from "../controllers/buttonActionStandardController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = express.Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
// 버튼 액션 표준 관리 라우트
router.get("/", ButtonActionStandardController.getButtonActions);
router.get(
"/categories",
ButtonActionStandardController.getButtonActionCategories
);
router.get("/:actionType", ButtonActionStandardController.getButtonAction);
router.post("/", ButtonActionStandardController.createButtonAction);
router.put("/:actionType", ButtonActionStandardController.updateButtonAction);
router.delete(
"/:actionType",
ButtonActionStandardController.deleteButtonAction
);
router.put(
"/sort-order/bulk",
ButtonActionStandardController.updateButtonActionSortOrder
);
export default router;

View File

@@ -0,0 +1,66 @@
import { Router } from "express";
import componentStandardController from "../controllers/componentStandardController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
// 컴포넌트 목록 조회
router.get(
"/",
componentStandardController.getComponents.bind(componentStandardController)
);
// 카테고리 목록 조회
router.get(
"/categories",
componentStandardController.getCategories.bind(componentStandardController)
);
// 통계 조회
router.get(
"/statistics",
componentStandardController.getStatistics.bind(componentStandardController)
);
// 컴포넌트 상세 조회
router.get(
"/:component_code",
componentStandardController.getComponent.bind(componentStandardController)
);
// 컴포넌트 생성
router.post(
"/",
componentStandardController.createComponent.bind(componentStandardController)
);
// 컴포넌트 수정
router.put(
"/:component_code",
componentStandardController.updateComponent.bind(componentStandardController)
);
// 컴포넌트 삭제
router.delete(
"/:component_code",
componentStandardController.deleteComponent.bind(componentStandardController)
);
// 정렬 순서 업데이트
router.put(
"/sort/order",
componentStandardController.updateSortOrder.bind(componentStandardController)
);
// 컴포넌트 복제
router.post(
"/duplicate",
componentStandardController.duplicateComponent.bind(
componentStandardController
)
);
export default router;

View File

@@ -4,6 +4,7 @@ import {
deleteFile,
getFileList,
downloadFile,
previewFile,
getLinkedFiles,
uploadMiddleware,
} from "../controllers/fileController";
@@ -43,6 +44,13 @@ router.get("/linked/:tableName/:recordId", getLinkedFiles);
*/
router.delete("/:objid", deleteFile);
/**
* @route GET /api/files/preview/:objid
* @desc 파일 미리보기 (이미지 등)
* @access Private
*/
router.get("/preview/:objid", previewFile);
/**
* @route GET /api/files/download/:objid
* @desc 파일 다운로드

View File

@@ -6,6 +6,11 @@ import {
createScreen,
updateScreen,
deleteScreen,
checkScreenDependencies,
restoreScreen,
permanentDeleteScreen,
getDeletedScreens,
bulkPermanentDeleteScreens,
copyScreen,
getTables,
getTableInfo,
@@ -16,6 +21,7 @@ import {
assignScreenToMenu,
getScreensByMenu,
unassignScreenFromMenu,
cleanupDeletedScreenMenuAssignments,
} from "../controllers/screenManagementController";
const router = express.Router();
@@ -28,9 +34,16 @@ router.get("/screens", getScreens);
router.get("/screens/:id", getScreen);
router.post("/screens", createScreen);
router.put("/screens/:id", updateScreen);
router.delete("/screens/:id", deleteScreen);
router.get("/screens/:id/dependencies", checkScreenDependencies); // 의존성 체크
router.delete("/screens/:id", deleteScreen); // 휴지통으로 이동
router.post("/screens/:id/copy", copyScreen);
// 휴지통 관리
router.get("/screens/trash/list", getDeletedScreens); // 휴지통 화면 목록
router.post("/screens/:id/restore", restoreScreen); // 휴지통에서 복원
router.delete("/screens/:id/permanent", permanentDeleteScreen); // 영구 삭제
router.delete("/screens/trash/bulk", bulkPermanentDeleteScreens); // 일괄 영구 삭제
// 화면 코드 자동 생성
router.get("/generate-screen-code/:companyCode", generateScreenCode);
@@ -48,4 +61,10 @@ router.post("/screens/:screenId/assign-menu", assignScreenToMenu);
router.get("/menus/:menuObjid/screens", getScreensByMenu);
router.delete("/screens/:screenId/menus/:menuObjid", unassignScreenFromMenu);
// 관리자용 정리 기능
router.post(
"/admin/cleanup-deleted-screen-menu-assignments",
cleanupDeletedScreenMenuAssignments
);
export default router;

View File

@@ -0,0 +1,25 @@
import express from "express";
import { WebTypeStandardController } from "../controllers/webTypeStandardController";
import { ButtonActionStandardController } from "../controllers/buttonActionStandardController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = express.Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
// 화면관리에서 사용할 조회 전용 API
router.get("/web-types", WebTypeStandardController.getWebTypes);
router.get(
"/web-types/categories",
WebTypeStandardController.getWebTypeCategories
);
router.get("/button-actions", ButtonActionStandardController.getButtonActions);
router.get(
"/button-actions/categories",
ButtonActionStandardController.getButtonActionCategories
);
export default router;

View File

@@ -8,6 +8,7 @@ import {
getTableLabels,
getColumnLabels,
updateColumnWebType,
updateTableLabel,
getTableData,
addTableData,
editTableData,
@@ -31,6 +32,12 @@ router.get("/tables", getTableList);
*/
router.get("/tables/:tableName/columns", getColumnList);
/**
* 테이블 라벨 설정
* PUT /api/table-management/tables/:tableName/label
*/
router.put("/tables/:tableName/label", updateTableLabel);
/**
* 개별 컬럼 설정 업데이트
* POST /api/table-management/tables/:tableName/columns/:columnName/settings

View File

@@ -0,0 +1,70 @@
import { Router } from "express";
import { templateStandardController } from "../controllers/templateStandardController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
// 템플릿 목록 조회
router.get(
"/",
templateStandardController.getTemplates.bind(templateStandardController)
);
// 템플릿 카테고리 목록 조회
router.get(
"/categories",
templateStandardController.getCategories.bind(templateStandardController)
);
// 템플릿 정렬 순서 일괄 업데이트
router.put(
"/sort-order/bulk",
templateStandardController.updateSortOrder.bind(templateStandardController)
);
// 템플릿 가져오기
router.post(
"/import",
templateStandardController.importTemplate.bind(templateStandardController)
);
// 템플릿 상세 조회
router.get(
"/:templateCode",
templateStandardController.getTemplate.bind(templateStandardController)
);
// 템플릿 내보내기
router.get(
"/:templateCode/export",
templateStandardController.exportTemplate.bind(templateStandardController)
);
// 템플릿 생성
router.post(
"/",
templateStandardController.createTemplate.bind(templateStandardController)
);
// 템플릿 수정
router.put(
"/:templateCode",
templateStandardController.updateTemplate.bind(templateStandardController)
);
// 템플릿 삭제
router.delete(
"/:templateCode",
templateStandardController.deleteTemplate.bind(templateStandardController)
);
// 템플릿 복제
router.post(
"/:templateCode/duplicate",
templateStandardController.duplicateTemplate.bind(templateStandardController)
);
export default router;

View File

@@ -0,0 +1,24 @@
import express from "express";
import { WebTypeStandardController } from "../controllers/webTypeStandardController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = express.Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
// 웹타입 표준 관리 라우트
router.get("/", WebTypeStandardController.getWebTypes);
router.get("/categories", WebTypeStandardController.getWebTypeCategories);
router.get("/:webType", WebTypeStandardController.getWebType);
router.post("/", WebTypeStandardController.createWebType);
router.put("/:webType", WebTypeStandardController.updateWebType);
router.delete("/:webType", WebTypeStandardController.deleteWebType);
router.put(
"/sort-order/bulk",
WebTypeStandardController.updateWebTypeSortOrder
);
export default router;