fix: issue with team members list not being up to date
This commit is contained in:
@@ -242,7 +242,6 @@ watch(
|
||||
watch(
|
||||
() => props.editingTeamID,
|
||||
(teamID: string) => {
|
||||
console.log("teamID", teamID)
|
||||
teamDetails.execute({ teamID })
|
||||
}
|
||||
)
|
||||
@@ -252,6 +251,7 @@ const teamDetails = useGQLQuery<GetTeamQuery, GetTeamQueryVariables, "">({
|
||||
variables: {
|
||||
teamID: props.editingTeamID,
|
||||
},
|
||||
pollDuration: 10000,
|
||||
defer: true,
|
||||
updateSubs: computed(() => {
|
||||
if (props.editingTeamID) {
|
||||
@@ -282,6 +282,17 @@ const teamDetails = useGQLQuery<GetTeamQuery, GetTeamQueryVariables, "">({
|
||||
}),
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (!show) {
|
||||
teamDetails.pause()
|
||||
} else {
|
||||
teamDetails.unpause()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const roleUpdates = ref<
|
||||
{
|
||||
userID: string
|
||||
@@ -294,8 +305,6 @@ watch(
|
||||
() => {
|
||||
if (teamDetails.loading) return
|
||||
|
||||
console.log(teamDetails)
|
||||
|
||||
const data = teamDetails.data
|
||||
|
||||
if (E.isRight(data)) {
|
||||
@@ -326,11 +335,6 @@ const updateMemberRole = (userID: string, role: TeamMemberRole) => {
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => teamDetails.data,
|
||||
(newVal) => console.log(newVal)
|
||||
)
|
||||
|
||||
const membersList = computed(() => {
|
||||
if (teamDetails.loading) return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user