feat: user export service. bug and UX fixes. Complete minus outstanding email template fixes.

This commit is contained in:
Eric Gullickson
2025-12-26 14:06:03 -06:00
parent 8c13dc0a55
commit fb52ce398b
35 changed files with 1686 additions and 118 deletions

View File

@@ -384,4 +384,12 @@ export class MaintenanceRepository {
);
return result.rows[0] ? this.mapMaintenanceSchedule(result.rows[0]) : null;
}
async findSchedulesByUserId(userId: string): Promise<MaintenanceSchedule[]> {
const res = await this.db.query(
`SELECT * FROM maintenance_schedules WHERE user_id = $1 ORDER BY created_at DESC`,
[userId]
);
return res.rows.map(row => this.mapMaintenanceSchedule(row));
}
}