adcc16da36
- Added new `updateMoldSerial` API endpoint for updating mold serial details. - Modified existing mold-related SQL queries to include `id` and `created_date` fields. - Updated frontend to handle mold serial updates and image uploads. - Improved subcontractor management table with additional fields and rendering logic. This update improves the overall functionality and user experience in managing molds and subcontractors.
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import express from "express";
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
import {
|
|
getMoldList,
|
|
getMoldDetail,
|
|
createMold,
|
|
updateMold,
|
|
deleteMold,
|
|
getMoldSerials,
|
|
createMoldSerial,
|
|
updateMoldSerial,
|
|
deleteMoldSerial,
|
|
getMoldInspections,
|
|
createMoldInspection,
|
|
deleteMoldInspection,
|
|
getMoldParts,
|
|
createMoldPart,
|
|
deleteMoldPart,
|
|
getMoldSerialSummary,
|
|
} from "../controllers/moldController";
|
|
|
|
const router = express.Router();
|
|
router.use(authenticateToken);
|
|
|
|
// 금형 마스터
|
|
router.get("/", getMoldList);
|
|
router.get("/:moldCode", getMoldDetail);
|
|
router.post("/", createMold);
|
|
router.put("/:moldCode", updateMold);
|
|
router.delete("/:moldCode", deleteMold);
|
|
|
|
// 일련번호
|
|
router.get("/:moldCode/serials", getMoldSerials);
|
|
router.post("/:moldCode/serials", createMoldSerial);
|
|
router.put("/serials/:id", updateMoldSerial);
|
|
router.delete("/serials/:id", deleteMoldSerial);
|
|
|
|
// 일련번호 현황 집계
|
|
router.get("/:moldCode/serial-summary", getMoldSerialSummary);
|
|
|
|
// 점검항목
|
|
router.get("/:moldCode/inspections", getMoldInspections);
|
|
router.post("/:moldCode/inspections", createMoldInspection);
|
|
router.delete("/inspections/:id", deleteMoldInspection);
|
|
|
|
// 부품
|
|
router.get("/:moldCode/parts", getMoldParts);
|
|
router.post("/:moldCode/parts", createMoldPart);
|
|
router.delete("/parts/:id", deleteMoldPart);
|
|
|
|
export default router;
|