Skip to content

Commit 379fdc7

Browse files
committed
fix event filtering
1 parent 064b1b8 commit 379fdc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/Calendar.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</div>
4444
<div class="flex middle col-sm-12">
4545
<input type="checkbox" id="official" v-model="show.officialOnly" />
46-
<label for="official" class="ml-2xsmall">Show only official events</label>
46+
<label for="official" class="ml-2xsmall">Show only sanctioned events</label>
4747
</div>
4848
<div class="flex middle col-sm-12">
4949
<input type="checkbox" id="CFP" v-model="show.types.CFP" />
@@ -86,7 +86,7 @@
8686
</div>
8787
<div v-if="event.hostedByFoundation" class="flex middle">
8888
<robot-icon size="1rem" class="mr-2xsmall" style="transform: translateY(-2px)" />
89-
Hosted by Foundation
89+
Sanctioned by Foundation
9090
</div>
9191
<details v-if="event.description && event.description.trim() !== ''">
9292
<summary class="color-link cursor-pointer flex middle" @click="showInfo($event.target.parentElement)">
@@ -164,8 +164,9 @@ export default {
164164
},
165165
shownItems() {
166166
const events = this.events
167-
.filter(({ eventType, date }) => {
167+
.filter(({ eventType, date, hostedByFoundation }) => {
168168
if (!this.show.past && isPast(new Date(date))) return false
169+
if (this.show.officialOnly && !hostedByFoundation) return false
169170
if (!this.show.types.Conference && eventType === 'Conference') return false
170171
if (!this.show.types['Meet-up'] && eventType === 'Meet-up') return false
171172
if (!this.show.types.Workshop && eventType === 'Workshop') return false

0 commit comments

Comments
 (0)