Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(statutory,su): improve handling cancelled applications #2012

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/views/statutory/BoardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<div class="select">
<select v-model="props.row.user_id">
<option :value="null">Not set</option>
<option v-for="application in applications" v-bind:key="application.user_id" v-bind:value="application.user_id">
<option v-for="application in nonCancelledApplications" v-bind:key="application.user_id" v-bind:value="application.user_id">
{{ application.first_name }} {{ application.last_name }}
</option>
</select>
Expand Down Expand Up @@ -260,6 +260,9 @@ export default {
canEditSelectedBody () {
return this.can.set_board_comment_and_participant_type.global
|| this.can.set_board_comment_and_participant_type[this.selectedBody]
},
nonCancelledApplications () {
return this.applications.filter(app => !app.cancelled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure yet why, but it seems that cancelled applications are not sent to the BoardView. Even if you click the button in the view table.
At first sight it looks fine in the listBoardView function so it's being set somewhere else in statutory. https://github.com/AEGEE/statutory/blob/43ab951729e9d3580ec40f58775c069062c1322f/lib/applications.js#L193-L195

}
},
methods: {
Expand Down
13 changes: 9 additions & 4 deletions src/views/summeruniversity/BoardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@
</b-table-column>

<b-table-column field="status" label="Status" sortable>
<span v-if="props.row.status === 'accepted'">Accepted</span>
<span v-if="props.row.status === 'rejected'">Rejected</span>
<span v-if="props.row.status === 'waiting_list'">Waiting list</span>
<span v-if="props.row.status === 'pending'">Pending</span>
<span v-if="props.row.cancelled">
<span class="tag is-danger" v-if="props.row.cancelled">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks strange for rejected applications. And it would be better if cancelled participants do not have a colored column (or colored grey)
image

Cancelled
</span>
</span>
<span v-if="!props.row.cancelled && props.row.status === 'accepted'">Accepted</span>
<span v-if="!props.row.cancelled && props.row.status === 'rejected'">Rejected</span>
<span v-if="!props.row.cancelled && props.row.status === 'waiting_list'">Waiting list</span>
<span v-if="!props.row.cancelled && props.row.status === 'pending'">Pending</span>
</b-table-column>

<b-table-column field="board_comment" label="Board comment">
Expand Down