Merge pull request #2527 from nextcloud/fix/export-without-owner
skip participant on error
This commit is contained in:
Коммит
fb55da69e3
|
@ -12,6 +12,8 @@ All notable changes to this project will be documented in this file.
|
|||
### Fix
|
||||
- Unsubscribing from a public was not possible
|
||||
- Use display name for avatar of the current public user instead of user id
|
||||
- Fix export, if owner did not vote in the poll
|
||||
|
||||
## [3.7.0] - 2022-06-24
|
||||
### New
|
||||
- User setting for conflict check (hours before and after an option to search for conflicts)
|
||||
|
|
|
@ -176,21 +176,25 @@ export default {
|
|||
addVotesArray(style) {
|
||||
this.participants.forEach((participant) => {
|
||||
const votesLine = [participant.displayName]
|
||||
if (this.isOwner) {
|
||||
votesLine.push(this.emailAddresses.find((item) => item.displayName === participant.displayName).emailAddress)
|
||||
}
|
||||
|
||||
this.options.list.forEach((option, i) => {
|
||||
if (style === 'symbols') {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answerSymbol ?? '❌')
|
||||
} else if (style === 'raw') {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answer)
|
||||
} else {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answerTranslated ?? t('polls', 'No'))
|
||||
try {
|
||||
if (this.isOwner) {
|
||||
votesLine.push(this.emailAddresses.find((item) => item.displayName === participant.displayName).emailAddress)
|
||||
}
|
||||
})
|
||||
|
||||
this.sheetData.push(votesLine)
|
||||
this.options.list.forEach((option, i) => {
|
||||
if (style === 'symbols') {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answerSymbol ?? '❌')
|
||||
} else if (style === 'raw') {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answer)
|
||||
} else {
|
||||
votesLine.push(this.getVote({ userId: participant.userId, option }).answerTranslated ?? t('polls', 'No'))
|
||||
}
|
||||
})
|
||||
|
||||
this.sheetData.push(votesLine)
|
||||
} catch (e) {
|
||||
// just skip this participant
|
||||
}
|
||||
})
|
||||
|
||||
const workSheet = xlsxUtils.aoa_to_sheet(this.sheetData)
|
||||
|
|
Загрузка…
Ссылка в новой задаче