Skip to content
Snippets Groups Projects
Commit a6a5a7ef authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(ecogesture): ecogestures with no season are now on top when season is fall or spring

parent cfd21467
No related branches found
No related tags found
1 merge request!435WIP: 1.4.0
...@@ -20,6 +20,8 @@ export default class EcogestureService { ...@@ -20,6 +20,8 @@ export default class EcogestureService {
query = query query = query
.where({ season: { $ne: seasonFilter } }) .where({ season: { $ne: seasonFilter } })
.sortBy([{ season: 'desc' }]) .sortBy([{ season: 'desc' }])
} else {
query = query.where({}).sortBy([{ season: 'desc' }])
} }
const { const {
......
...@@ -129,7 +129,7 @@ export const getMonthName = (date: DateTime) => { ...@@ -129,7 +129,7 @@ export const getMonthName = (date: DateTime) => {
* @returns Season * @returns Season
*/ */
export const getSeason = (): Season => { export const getSeason = (): Season => {
const currentDate: DateTime = DateTime.local(2021, 12, 1).setZone('utc', { const currentDate: DateTime = DateTime.local().setZone('utc', {
keepLocalTime: true, keepLocalTime: true,
}) })
const currentYear: number = currentDate.year const currentYear: number = currentDate.year
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment