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:
kjs
2026-04-08 17:45:28 +09:00
parent 2a23cadb41
commit 0345926698
29 changed files with 396 additions and 310 deletions

View File

@@ -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 *
`;