no-mistakes(review): Fixed aging bucket boundaries and removed wasteful API call

This commit is contained in:
root
2026-07-23 19:21:31 +00:00
parent a9c17d0703
commit ef2297ea87
2 changed files with 13 additions and 17 deletions
+2 -2
View File
@@ -228,11 +228,11 @@
under24h: active.filter(t => (now - new Date(t.created_at)) < 24 * 60 * 60 * 1000).length, under24h: active.filter(t => (now - new Date(t.created_at)) < 24 * 60 * 60 * 1000).length,
oneToTwoDays: active.filter(t => { oneToTwoDays: active.filter(t => {
const diff = (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24); const diff = (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24);
return diff >= 1 && diff < 2; return diff >= 1 && diff < 3;
}).length, }).length,
threeToFiveDays: active.filter(t => { threeToFiveDays: active.filter(t => {
const diff = (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24); const diff = (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24);
return diff >= 2 && diff < 5; return diff >= 3 && diff < 5;
}).length, }).length,
overFiveDays: active.filter(t => (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24) >= 5).length, overFiveDays: active.filter(t => (now - new Date(t.created_at)) / (1000 * 60 * 60 * 24) >= 5).length,
}; };
-4
View File
@@ -328,9 +328,6 @@
}, },
async loadTechnicians() { async loadTechnicians() {
// Load all users and filter for Tech role
try {
const me = await app().apiGet('/api/auth/me');
// Users list not exposed via API directly, so use a known list // Users list not exposed via API directly, so use a known list
// In a real system we'd have GET /api/users // In a real system we'd have GET /api/users
this.technicians = [ this.technicians = [
@@ -342,7 +339,6 @@
{ id: 14, full_name: 'Desmond Afful' }, { id: 14, full_name: 'Desmond Afful' },
{ id: 15, full_name: 'Afful' }, { id: 15, full_name: 'Afful' },
]; ];
} catch (e) { console.error('Tech load error', e); }
}, },
async submitStatusUpdate() { async submitStatusUpdate() {