fix: Correct SQL parameter indexing and improve date handling in various components
- Updated SQL query in `productionPlanService.ts` to fix parameter indexing for company code. - Refactored date handling in `department/page.tsx`, `customer/page.tsx`, and `sales-item/page.tsx` to ensure consistent date formatting. - Enhanced equipment list state management in `production/plan-management/page.tsx` to use more descriptive property names. These changes aim to improve the reliability of SQL operations and ensure consistent date handling across the application.
This commit is contained in:
@@ -371,7 +371,7 @@ export async function updatePlan(
|
||||
const query = `
|
||||
UPDATE production_plan_mng
|
||||
SET ${setClauses.join(", ")}
|
||||
WHERE id = $${paramIdx - 1} AND company_code = $${paramIdx}
|
||||
WHERE id = $${paramIdx} AND company_code = $${paramIdx + 1}
|
||||
RETURNING *
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user