cache buster

This commit is contained in:
Jake Kasper
2025-08-29 14:28:48 -04:00
parent f8cd440635
commit 62f7d85c58

View File

@@ -71,12 +71,18 @@ const ApplicationViewModal = ({ application, propertyDetails, onClose }) => {
// Try to fetch application logs to get GPS tracking data // Try to fetch application logs to get GPS tracking data
try { try {
console.log('Fetching logs for planId:', application.id); console.log('Fetching logs for planId:', application.id);
const logsResponse = await applicationsAPI.getLogs({ planId: application.id }); // Add cache-busting parameter to force fresh request
const logsResponse = await applicationsAPI.getLogs({
planId: application.id,
_t: Date.now()
});
console.log('Logs response:', logsResponse); console.log('Logs response:', logsResponse);
const logs = logsResponse.data.data.logs; const logs = logsResponse.data.data.logs;
console.log('Parsed logs:', logs); console.log('Parsed logs:', logs);
if (logs && logs.length > 0) { if (logs && logs.length > 0) {
console.log('Setting application log to:', logs[0]); console.log('Setting application log to:', logs[0]);
console.log('Log GPS track property:', logs[0].gpsTrack);
console.log('Full log object keys:', Object.keys(logs[0]));
setApplicationLog(logs[0]); // Get the most recent log setApplicationLog(logs[0]); // Get the most recent log
} else { } else {
console.log('No logs found in response'); console.log('No logs found in response');