Add editable supply material details
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s

This commit is contained in:
Cauê Faleiros
2026-08-10 10:15:01 -03:00
parent 40737faaa5
commit 5ed91fa36f
8 changed files with 261 additions and 26 deletions

View File

@@ -10,6 +10,7 @@ const {
deleteReceipt,
getSupplySummary,
listFabricPlans,
saveMaterialDetails,
listLots,
listMovements,
listPurchaseNeeds,
@@ -124,4 +125,12 @@ router.get('/supply/purchase-needs', verifyToken, async (req, res, next) => {
}
});
router.put('/supply/materials/:materialKey', verifyToken, async (req, res, next) => {
try {
res.json(await saveMaterialDetails(req.params.materialKey, req.body || {}));
} catch (error) {
next(error);
}
});
module.exports = router;