Skip to content

Commit

Permalink
feat(statutory): update export of participants (#2223)
Browse files Browse the repository at this point in the history
* fix(statutory): add name of statutory event to export page

* feat(statutory): add column 'was on previous memberslist' for Agora pax

* feat(statutory): add export filter for cancelled participants

* chore(statutory): fix lint

---------

Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
  • Loading branch information
LeonVreling and WikiRik authored Dec 5, 2024
1 parent c85644c commit bef4708
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/views/statutory/Applications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@
</b-table-column>

<b-table-column field="is_on_memberslist" label="Is on memberslist?" centered sortable :visible="event.type === 'agora'">
<span :class="calculateClassForMemberslist(props.row)">
<span :class="calculateClassForMemberslist(props.row.is_on_memberslist)">
{{ props.row.is_on_memberslist | beautify }}
</span>
</b-table-column>

<b-table-column field="was_on_memberslist" label="Was on previous memberslist?" centered sortable :visible="event.type === 'agora'">
<span :class="calculateClassForMemberslist(props.row.is_on_previous_memberslist)">
{{ props.row.is_on_previous_memberslist | beautify }}
</span>
</b-table-column>

<!-- important: there should be no whitespaces/line breaks inside this tag, as it messes up the white-space: pre-wrap styling. !-->
<b-table-column
v-for="(field, index) in fields"
Expand Down Expand Up @@ -216,8 +222,8 @@ export default {
return ''
}
},
calculateClassForMemberslist (pax) {
return ['tag', 'is-small', pax.is_on_memberslist ? 'is-primary' : 'is-danger']
calculateClassForMemberslist (isOnMemberslist) {
return ['tag', 'is-small', isOnMemberslist ? 'is-primary' : 'is-danger']
},
switchPaxStatus (pax) {
pax.isSaving = true
Expand Down
15 changes: 14 additions & 1 deletion src/views/statutory/Export.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="tile is-ancestor">
<div class="tile is-parent">
<div class="tile is-child">
<div class="title">Export data</div>
<div class="title">Export data for {{ event.name }}</div>
<div v-if="can.export.openslides">
<div class="field">
<div class="control">
Expand Down Expand Up @@ -34,6 +34,17 @@
</div>
</div>

<div class="field is-fullwidth" v-if="this.can.export.all">
<label class="label">Filter on cancellation</label>
<div class="select">
<select v-model="filter.cancelled">
<option :value="null">Everybody</option>
<option :value="true">Cancelled participants</option>
<option :value="false">Not cancelled participants</option>
</select>
</div>
</div>

<div class="field is-fullwidth" v-if="this.can.export.all">
<label class="label">Filter on confirmation</label>
<div class="select">
Expand Down Expand Up @@ -95,6 +106,7 @@ export default {
},
filter: {
status: null,
cancelled: null,
confirmed: null,
participant_type: null
},
Expand Down Expand Up @@ -156,6 +168,7 @@ export default {
const filter = {}
if (this.filter.status !== null) filter.status = this.filter.status
if (this.filter.cancelled !== null) filter.cancelled = this.filter.cancelled
if (this.filter.confirmed !== null) filter.confirmed = this.filter.confirmed
if (this.filter.participant_type !== null) filter.participant_type = this.filter.participant_type
Expand Down

0 comments on commit bef4708

Please sign in to comment.