diff --git a/vuejs/src/App.vue b/vuejs/src/App.vue index 5c7b808..29445fb 100644 --- a/vuejs/src/App.vue +++ b/vuejs/src/App.vue @@ -32,7 +32,8 @@ export default { const baseUrl = process.env.VUE_APP_DRUPAL_URL const params = qs.stringify({ - 'fields[node--session]': 'title' + 'fields[node--session]': 'title', + 'filter[field_session_status]': 'accepted' }) axios.get(`${baseUrl}/jsonapi/node/session?${params}`) @@ -51,6 +52,7 @@ export default { computed: { sortedSessions: function () { return _(this.sessions).sortBy(({ attributes }) => attributes.title) + .value() } } } diff --git a/vuejs/src/components/AcceptedSessionsList.vue b/vuejs/src/components/AcceptedSessionsList.vue index 04bd87f..45f09f0 100644 --- a/vuejs/src/components/AcceptedSessionsList.vue +++ b/vuejs/src/components/AcceptedSessionsList.vue @@ -2,9 +2,9 @@

Sessions

-
+
    -
  • +
  • {{ attributes.title }}
@@ -19,20 +19,6 @@ export default { type: Object, required: true } - }, - - computed: { - acceptedSessions: function () { - return this.sessions - .filter(session => this.isAccepted(session)) - .value() - } - }, - - methods: { - isAccepted: function ({ attributes }) { - return attributes.field_session_status === 'accepted' - } } }