Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 33f9c430 authored by 65160383's avatar 65160383
Browse files

werehouse_db

parent b291ec67
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ router.post('/create', productController.createProduct);
router.get('/edit/:id', productController.editProductPage);
// อัพเดทสินค้า
router.post('/update/:id', productController.updateProduct);
router.put('/update/:id', productController.updateProduct);
// ลบสินค้า
router.post('/delete/:id', productController.deleteProduct);
......@@ -25,5 +25,6 @@ router.get('/search', productController.searchProducts);
// เบิกสินค้า
router.post('/withdraw', productController.withdrawProduct);
router.post('/confirm-withdraw', productController.confirmWithdraw);
module.exports = router;
......@@ -45,13 +45,11 @@
<td><%= product.price %></td>
<td>
<div class="d-flex gap-2">
<form action="/products/withdraw" method="POST" class="d-inline">
<form action="/products/withdraw" method="POST" class="d-flex align-items-center gap-2">
<input type="hidden" name="product_id" value="<%= product.id %>">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="number" name="quantity" class="form-control"
<input type="number" name="quantity" class="form-control form-control-sm quantity-input"
min="1" max="<%= product.quantity %>" value="1" required>
<button type="submit" class="btn btn-primary">เบิกสินค้า</button>
</div>
<button type="submit" class="btn btn-primary btn-sm">เบิก</button>
</form>
<a href="/products/edit/<%= product.id %>"
class="btn btn-warning btn-sm">แก้ไข</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment