forked from CGM_Public/pretix_original
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>
|
<h4>{{ checkResult.position.order }}-{{ checkResult.position.positionid }} {{ checkResult.position.attendee_name }}</h4>
|
||||||
<strong v-if="checkResult.reason_explanation">{{ checkResult.reason_explanation }}<br></strong>
|
<strong v-if="checkResult.reason_explanation">{{ checkResult.reason_explanation }}<br></strong>
|
||||||
<span>{{ checkResultItemvar }}</span><br>
|
<span>{{ checkResultItemvar }}</span><br>
|
||||||
|
<span v-if="checkResultSubevent">{{ checkResultSubevent }}<br></span>
|
||||||
<span class="secret">{{ checkResult.position.secret }}</span>
|
<span class="secret">{{ checkResult.position.secret }}</span>
|
||||||
<span v-if="checkResult.position.seat"><br>{{ checkResult.position.seat.name }}</span>
|
<span v-if="checkResult.position.seat"><br>{{ checkResult.position.seat.name }}</span>
|
||||||
</div>
|
</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)
|
const date = moment.utc(this.checkinlist.subevent.date_from).tz(this.$root.timezone).format(this.$root.datetime_format)
|
||||||
return `${name} · ${date}`
|
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() {
|
checkResultItemvar() {
|
||||||
if (!this.checkResult) return ''
|
if (!this.checkResult) return ''
|
||||||
if (this.checkResult.position.variation) {
|
if (this.checkResult.position.variation) {
|
||||||
@@ -331,7 +339,7 @@ export default {
|
|||||||
this.$refs.input.blur()
|
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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRFToken': document.querySelector("input[name=csrfmiddlewaretoken]").value,
|
'X-CSRFToken': document.querySelector("input[name=csrfmiddlewaretoken]").value,
|
||||||
|
|||||||
Reference in New Issue
Block a user