fix: replace modal with prototype version, extend /list API fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-28 15:28:12 +08:00
parent 752208da02
commit d6ac1044fe
3 changed files with 180 additions and 121 deletions

View File

@@ -642,7 +642,7 @@ app.get('/inventory-analysis', async (c) => {
// GET /api/vehicles/dept-stats — department & manager breakdown
app.get('/dept-stats', async (c) => {
const vehicles = await getVehicles();
const withManager = vehicles.filter((v) => v.customerManager);
const withManager = vehicles.filter((v) => v.customerManager && v.status === 'Operating');
const deptMap = new Map<string, Map<string, Vehicle[]>>();
for (const v of withManager) {
@@ -805,6 +805,10 @@ app.get('/list', async (c) => {
contractNo: v.contractNo,
customerName: v.customerName,
subjectOrg: v.subjectOrg,
departmentName: v.departmentName,
customerManager: v.customerManager,
brandLabel: v.brandLabel,
orgName: v.orgName,
})),
);
});