/**
 * Wace PLM 결재 라우트
 */
import { Router } from "express";
import { authenticateToken } from "../middleware/authMiddleware";
import { WacePlmApprovalController } from "../controllers/wacePlmApprovalController";

const router = Router();

router.get("/inbox", authenticateToken, WacePlmApprovalController.listInbox);
router.get("/by-target", authenticateToken, WacePlmApprovalController.byTarget);
router.get("/:approvalObjid", authenticateToken, WacePlmApprovalController.detail);

router.post("/start", authenticateToken, WacePlmApprovalController.start);
router.post("/inbox/:objid/approve", authenticateToken, WacePlmApprovalController.approve);
router.post("/inbox/:objid/reject", authenticateToken, WacePlmApprovalController.reject);
router.post("/:approvalObjid/amaranth-link", authenticateToken, WacePlmApprovalController.amaranthLink);

export default router;
