asdfsadf
This commit is contained in:
@@ -1446,6 +1446,7 @@ router.get('/logs', async (req, res, next) => {
|
||||
propertyName: row.property_name,
|
||||
propertyAddress: row.property_address,
|
||||
sectionName: row.section_name,
|
||||
sectionArea: row.area_covered, // Map area_covered to sectionArea for consistency
|
||||
equipmentName: row.equipment_name,
|
||||
equipmentType: row.equipment_type,
|
||||
applicationDate: row.application_date,
|
||||
@@ -1453,12 +1454,20 @@ router.get('/logs', async (req, res, next) => {
|
||||
averageSpeed: row.average_speed,
|
||||
areaCovered: row.area_covered,
|
||||
notes: row.notes,
|
||||
createdAt: row.created_at
|
||||
createdAt: row.created_at,
|
||||
weatherConditions: row.weather_conditions
|
||||
}));
|
||||
|
||||
console.log(`GET /logs query with planId: ${planId}, found ${logs.length} logs`);
|
||||
if (logs.length > 0) {
|
||||
console.log('First log GPS track:', logs[0].gpsTrack);
|
||||
console.log('First log raw row data:', {
|
||||
id: result.rows[0].id,
|
||||
gps_track: result.rows[0].gps_track,
|
||||
average_speed: result.rows[0].average_speed,
|
||||
area_covered: result.rows[0].area_covered,
|
||||
notes: result.rows[0].notes
|
||||
});
|
||||
}
|
||||
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user