fix: Date filter now sends both start_date and end_date to filter single day - v1.0.15

This commit is contained in:
2025-11-20 15:06:58 -03:00
parent e3a5fd6686
commit 9dd2e2598b
2 changed files with 7 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ services:
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4 command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
frontend: frontend:
image: dymai/syntria-frontend:1.0.14 image: dymai/syntria-frontend:1.0.15
container_name: syntria-frontend-prod container_name: syntria-frontend-prod
restart: always restart: always
depends_on: depends_on:

View File

@@ -3227,7 +3227,9 @@ function ReportsTab({ user }) {
const API_URL = import.meta.env.VITE_API_URL || '' const API_URL = import.meta.env.VITE_API_URL || ''
let url = `${API_URL}/api/reports/dashboard?` let url = `${API_URL}/api/reports/dashboard?`
if (filtersToApply.date) url += `start_date=${filtersToApply.date}&` if (filtersToApply.date) {
url += `start_date=${filtersToApply.date}&end_date=${filtersToApply.date}&`
}
if (filtersToApply.mechanicId) url += `mechanic_id=${filtersToApply.mechanicId}&` if (filtersToApply.mechanicId) url += `mechanic_id=${filtersToApply.mechanicId}&`
console.log('Dashboard URL:', url) console.log('Dashboard URL:', url)
@@ -3255,7 +3257,9 @@ function ReportsTab({ user }) {
const API_URL = import.meta.env.VITE_API_URL || '' const API_URL = import.meta.env.VITE_API_URL || ''
let url = `${API_URL}/api/reports/inspections?` let url = `${API_URL}/api/reports/inspections?`
if (filtersToApply.date) url += `start_date=${filtersToApply.date}&` if (filtersToApply.date) {
url += `start_date=${filtersToApply.date}&end_date=${filtersToApply.date}&`
}
if (filtersToApply.mechanicId) url += `mechanic_id=${filtersToApply.mechanicId}&` if (filtersToApply.mechanicId) url += `mechanic_id=${filtersToApply.mechanicId}&`
console.log('Inspections URL:', url) console.log('Inspections URL:', url)