mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Web check-in: Show subevent with check result
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
<h4>{{ checkResult.position.order }}-{{ checkResult.position.positionid }} {{ checkResult.position.attendee_name }}</h4>
|
||||
<strong v-if="checkResult.reason_explanation">{{ checkResult.reason_explanation }}<br></strong>
|
||||
<span>{{ checkResultItemvar }}</span><br>
|
||||
<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>
|
||||
</div>
|
||||
@@ -254,6 +255,13 @@ export default {
|
||||
const date = moment.utc(this.checkinlist.subevent.date_from).tz(this.$root.timezone).format(this.$root.datetime_format)
|
||||
return `${name} · ${date}`
|
||||
},
|
||||
checkResultSubevent() {
|
||||
if (!this.checkResult) return ''
|
||||
if (!this.checkResult.position.subevent) return ''
|
||||
const name = i18nstring_localize(this.checkResult.position.subevent.name)
|
||||
const date = moment.utc(this.checkResult.position.subevent.date_from).tz(this.$root.timezone).format(this.$root.datetime_format)
|
||||
return `${name} · ${date}`
|
||||
},
|
||||
checkResultItemvar() {
|
||||
if (!this.checkResult) return ''
|
||||
if (this.checkResult.position.variation) {
|
||||
@@ -331,7 +339,7 @@ export default {
|
||||
this.$refs.input.blur()
|
||||
})
|
||||
|
||||
fetch(this.$root.api.lists + this.checkinlist.id + '/positions/' + encodeURIComponent(id) + '/redeem/?expand=item&expand=variation', {
|
||||
fetch(this.$root.api.lists + this.checkinlist.id + '/positions/' + encodeURIComponent(id) + '/redeem/?expand=item&expand=subevent&expand=variation', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRFToken': document.querySelector("input[name=csrfmiddlewaretoken]").value,
|
||||
|
||||
Reference in New Issue
Block a user