import Ember from 'ember';

const {
  get,
  inject: { service },
  Route,
  RSVP
 } = Ember;

export default Route.extend({
  projectTaskBoard: service(),

  model() {
    let project = this.modelFor('project');
    let members = RSVP.all(get(project, 'organization.organizationMemberships').mapBy('member'));
    return RSVP.hash({ project, members });
  },

  setupController(controller, models) {
    controller.setProperties(models);
  },

  actions: {
    didTransition() {
      this._super(...arguments);
      get(this, 'projectTaskBoard').activate();
      return true;
    },

    willTransition() {
      this._super(...arguments);
      get(this, 'projectTaskBoard').deactivate();
      return true;
    },

    transitionToTask(task) {
      let project = get(task, 'project');
      let organizationSlug = get(project, 'organization.slug');
      let projectSlug = get(project, 'slug');
      let taskNumber = get(task, 'number');
      this.transitionTo('project.tasks.task', organizationSlug, projectSlug, taskNumber);
    }
  }
});

@@ -152,16 +152,22 @@
 e(),%0A%0A  
+async 
 model() 
@@ -164,24 +164,24 @@
 c model() %7B%0A
-
     let proj
@@ -230,21 +230,25 @@
 mber
-s = RSVP.all(
+Promises = await 
 get(
@@ -300,14 +300,93 @@
 s').
-mapBy(
+then((memberships) =%3E %7B%0A      return memberships.map((membership) =%3E get(membership, 
 'mem
@@ -393,16 +393,24 @@
 ber'));%0A
+    %7D);%0A
     retu
@@ -440,16 +440,42 @@
  members
+: RSVP.all(memberPromises)
  %7D);%0A  %7D

Fix membership async loading for tasks