const express = require('express');
const router = express.Router();
const { authenticate } = require('../middlewares/auth');
const assemblyFinalInspectionReportController = require('../controllers/assemblyFinalInspectionReportController');
const assemblyFinalInspectionReportPDFController = require('../controllers/assemblyFinalInspectionReportPDFController');

router.use(authenticate);

router.get('/', assemblyFinalInspectionReportController.getAll);
router.get('/work-orders/options', assemblyFinalInspectionReportController.getWorkOrderOptions);
router.get('/work-orders/:workOrderId/prefill', assemblyFinalInspectionReportController.getWorkOrderPrefill);
router.get('/:id/pdf', assemblyFinalInspectionReportPDFController.generatePDF);
router.get('/:id', assemblyFinalInspectionReportController.getById);
router.post('/', assemblyFinalInspectionReportController.create);
router.put('/:id', assemblyFinalInspectionReportController.update);
router.patch('/:id/status', assemblyFinalInspectionReportController.updateStatus);
router.delete('/:id', assemblyFinalInspectionReportController.delete);

module.exports = router;
