no-mistakes(review): Fix F01/F02/F05: technician name, duplicate timeline, FM dashboard property counts

This commit is contained in:
root
2026-07-23 19:13:10 +00:00
parent 7fab1ede51
commit 5560496653
4 changed files with 14 additions and 12 deletions
+6 -9
View File
@@ -203,16 +203,13 @@
// Emergency
this.emergencyCount = active.filter(t => t.priority === 'urgent').length;
// East vs West — we need full tickets with unit info
// For now, estimate from overall data or show placeholder
// We'll load again with property filter or just use total
// East vs West — compute from loaded tickets using unit map
try {
const east = await app().apiGet('/api/tickets?property=East&page_size=1');
const west = await app().apiGet('/api/tickets?property=West&page_size=1');
const eastTotal = east?.total || 0;
const westTotal = west?.total || 0;
this.kpi.eastJobs = eastTotal;
this.kpi.westJobs = westTotal;
const units = await app().apiGet('/api/tickets/units');
const unitMap = {};
if (units) units.forEach(u => { unitMap[u.id] = u.property; });
this.kpi.eastJobs = active.filter(t => t.unit_id && unitMap[t.unit_id] === 'East').length;
this.kpi.westJobs = active.filter(t => t.unit_id && unitMap[t.unit_id] === 'West').length;
} catch (e) { console.error('Property stats error', e); }
// Tech workload (simulated from assigned_to counts)