mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Web check-in: Show addons of ticket (Z#23220213) (#5827)
* Web check-in: Show addons of ticket (Z#23220213) * Update src/pretix/plugins/webcheckin/static/pretixplugins/webcheckin/components/app.vue Co-authored-by: luelista <weller@rami.io> --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
<div class="details">
|
||||
<code>{{ checkResult.position.order }}-{{ checkResult.position.positionid }}</code>
|
||||
<h4>{{ checkResult.position.attendee_name }}</h4>
|
||||
<div v-if="checkResultAddons" class="addons">{{ checkResultAddons }}</div>
|
||||
<span v-if="checkResultSubevent">{{ checkResultSubevent }}<br></span>
|
||||
<span class="secret">{{ checkResult.position.secret }}</span>
|
||||
<span v-if="checkResult.position.seat"><br>{{ checkResult.position.seat.name }}</span>
|
||||
@@ -265,6 +266,16 @@ export default {
|
||||
const date = moment.utc(this.checkinlist.subevent.date_from).tz(this.$root.timezone).format(this.$root.datetime_format)
|
||||
return `${name} · ${date}`
|
||||
},
|
||||
checkResultAddons() {
|
||||
if (!this.checkResult) return ''
|
||||
if (!this.checkResult.position.addons) return ''
|
||||
return this.checkResult.position.addons.map((addon) => {
|
||||
if (addon.variation) {
|
||||
return `+ ${addon.item.internal_name || i18nstring_localize(addon.item.name)} – ${i18nstring_localize(addon.variation.value)}`
|
||||
}
|
||||
return "+ " + (addon.item.internal_name || i18nstring_localize(addon.item.name));
|
||||
}).join("\n")
|
||||
},
|
||||
checkResultSubevent() {
|
||||
if (!this.checkResult) return ''
|
||||
if (!this.checkResult.position.subevent) return ''
|
||||
@@ -369,7 +380,7 @@ export default {
|
||||
this.$refs.input.blur()
|
||||
})
|
||||
|
||||
let url = this.$root.api.lists + this.checkinlist.id + '/positions/' + encodeURIComponent(id) + '/redeem/?expand=item&expand=subevent&expand=variation&expand=answers.question'
|
||||
let url = this.$root.api.lists + this.checkinlist.id + '/positions/' + encodeURIComponent(id) + '/redeem/?expand=item&expand=subevent&expand=variation&expand=answers.question&expand=addons'
|
||||
if (untrusted) {
|
||||
url += '&untrusted_input=true'
|
||||
}
|
||||
|
||||
@@ -92,6 +92,9 @@ a.searchresult, .check-result {
|
||||
word-break: break-word;
|
||||
color: $text-muted;
|
||||
}
|
||||
.addons {
|
||||
white-space: pre-line;
|
||||
}
|
||||
}
|
||||
|
||||
.check-result-status {
|
||||
|
||||
Reference in New Issue
Block a user