Include local on userPresence View
This commit is contained in:
parent
0278e56929
commit
7f4fcb5318
|
@ -7,7 +7,12 @@ export async function userPresence(_, { search }) {
|
|||
where: {
|
||||
wifiDevices: { some: { lastSeen: { not: null } } }
|
||||
},
|
||||
include: { wifiDevices: { orderBy: [{ lastSeen: 'desc' }] } }
|
||||
include: {
|
||||
wifiDevices: {
|
||||
orderBy: [{ lastSeen: 'desc' }],
|
||||
include: { accessPoint: true }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
search = search.toLowerCase().trim()
|
||||
|
@ -57,7 +62,8 @@ export async function userPresence(_, { search }) {
|
|||
thumbnailPhoto: userPresence.thumbnailPhoto,
|
||||
lastSeen: userPresence.wifiDevices[0].lastSeen,
|
||||
status: userPresence.wifiDevices[0].status,
|
||||
apName: userPresence.wifiDevices[0].apName
|
||||
apName: userPresence.wifiDevices[0].apName,
|
||||
local: userPresence.wifiDevices[0].accessPoint.local
|
||||
}))
|
||||
.slice(0, 200)
|
||||
}
|
||||
|
|
|
@ -252,6 +252,7 @@ const typeDefs = gql`
|
|||
lastSeen: String!
|
||||
status: Status!
|
||||
apName: String!
|
||||
local: String
|
||||
}
|
||||
|
||||
"The status of a Device"
|
||||
|
|
|
@ -139,9 +139,8 @@
|
|||
<span class="font-weight-medium">On-line</span>
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle>
|
||||
Próximo ao AP
|
||||
<span class="font-weight-medium">
|
||||
{{ userPresence.apName }}
|
||||
{{ userPresence.local || userPresence.apName }}
|
||||
</span>
|
||||
</v-list-item-subtitle>
|
||||
</template>
|
||||
|
@ -290,6 +289,7 @@ export default {
|
|||
lastSeen
|
||||
status
|
||||
apName
|
||||
local
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
|
Loading…
Reference in New Issue
Block a user