Refactor userPresence query and updateQuery function
This commit is contained in:
parent
0b09d098fd
commit
9829092229
|
@ -8,9 +8,9 @@ export async function userPresence(_, { search, onlyServants }) {
|
|||
where: {
|
||||
wifiDevices: { some: { lastSeen: { not: null } } }
|
||||
},
|
||||
orderBy: { displayName: 'asc' },
|
||||
include: {
|
||||
wifiDevices: {
|
||||
orderBy: [{ lastSeen: 'desc' }],
|
||||
include: { accessPoint: true }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,7 +269,6 @@
|
|||
<script>
|
||||
import gql from 'graphql-tag'
|
||||
import Avatar from '@/components/Avatar'
|
||||
import { debounce } from '../utils/debounce'
|
||||
|
||||
export default {
|
||||
name: 'UserPresence',
|
||||
|
@ -363,14 +362,12 @@ export default {
|
|||
}[status]
|
||||
},
|
||||
updateQuery() {
|
||||
debounce(() =>
|
||||
this.$router.replace({
|
||||
query: {
|
||||
search: this.search || undefined,
|
||||
onlyServants: this.onlyServants || undefined
|
||||
}
|
||||
})
|
||||
)()
|
||||
this.$router.replace({
|
||||
query: {
|
||||
search: this.search || undefined,
|
||||
onlyServants: this.onlyServants || undefined
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user