Skip to content

Commit

Permalink
fix: filter whole data by idf department
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Jan 19, 2024
1 parent bcf24a5 commit 84c0d7a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions webapp-next/utils/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ export function transformFilters(filters: Filters): any[] {
});
}

if (filters.department.length > 0) {
transformed.push({
terms: {
department: filters.department
}
});
}
transformed.push({
terms: {
department:
filters.department.length > 0
? filters.department
: ['91', '92', '93', '94', '95', '77', '78', '75']
}
});

if (filters.start_date && filters.end_date) {
transformed.push({
Expand Down

0 comments on commit 84c0d7a

Please sign in to comment.