- Added support for filtering location data in a certain area. - Made date range selection optional. - A more robust way to detect changes in the location filter. - Let the timeline graph set the default time ticks.
This commit is contained in:
parent
35821dbccd
commit
282828df0b
15 changed files with 603 additions and 100 deletions
frontend/src/mixins
32
frontend/src/mixins/LocationQuery.vue
Normal file
32
frontend/src/mixins/LocationQuery.vue
Normal file
|
@ -0,0 +1,32 @@
|
|||
<script lang="ts">
|
||||
import _ from 'lodash'
|
||||
|
||||
import Dates from './Dates.vue'
|
||||
import LocationQuery from '../models/LocationQuery'
|
||||
|
||||
export default {
|
||||
mixins: [Dates],
|
||||
methods: {
|
||||
isQueryChanged({
|
||||
newValue,
|
||||
oldValue,
|
||||
}: {
|
||||
newValue?: LocationQuery,
|
||||
oldValue?: LocationQuery,
|
||||
}): boolean {
|
||||
return !_.isEqual(
|
||||
{
|
||||
...(oldValue || {}),
|
||||
startDate: this.normalizeDate(oldValue?.startDate),
|
||||
endDate: this.normalizeDate(oldValue?.endDate),
|
||||
},
|
||||
{
|
||||
...(newValue || {}),
|
||||
startDate: this.normalizeDate(newValue?.startDate),
|
||||
endDate: this.normalizeDate(newValue?.endDate),
|
||||
}
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue