fix: Date filter now sends both start_date and end_date to filter single day - v1.0.15
This commit is contained in:
@@ -3227,7 +3227,9 @@ function ReportsTab({ user }) {
|
||||
const API_URL = import.meta.env.VITE_API_URL || ''
|
||||
|
||||
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}&`
|
||||
|
||||
console.log('Dashboard URL:', url)
|
||||
@@ -3255,7 +3257,9 @@ function ReportsTab({ user }) {
|
||||
const API_URL = import.meta.env.VITE_API_URL || ''
|
||||
|
||||
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}&`
|
||||
|
||||
console.log('Inspections URL:', url)
|
||||
|
||||
Reference in New Issue
Block a user