Skip to content

Commit

Permalink
fix: accessLevel on invite
Browse files Browse the repository at this point in the history
  • Loading branch information
jvJUCA committed Apr 23, 2024
1 parent 061d40e commit f8e16d2
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/views/admin/ManagerView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -397,20 +397,24 @@ export default {
const answers = []
const answersEntries = Object.entries(this.user.myAnswers)
answersEntries.forEach((a) => {
answers.push(a[1])
answersEntries.forEach((answer) => {
answers.push(answer[1])
})
const coopsInfo = this.test.cooperators.find(
(coops) => coops.userDocId === this.user.id,
)
if (coopsInfo) {
return coopsInfo.accessLevel
if (this.test.cooperators) {
const coopsInfo = this.test.cooperators.find(
(coops) => coops.userDocId === this.user.id,
)
if (coopsInfo) {
return coopsInfo.accessLevel
}
}
if (this.test.isPublic) {
return 1
} else {
return 3
}
u
}
return 1
return 1
},
},
Expand Down

0 comments on commit f8e16d2

Please sign in to comment.