 toImmutable = require 'app/util/toImmutable'
 immutable   = require 'immutable'
 isEmailValid = require 'app/util/isEmailValid'
+getFullnameFromAccount = require 'app/util/getFullnameFromAccount'
 
 
 team = ['TeamStore']

    return members
]


filteredMembersWithRole = [
  membersWithPendingInvitations
  searchInputValue
  (members, value) ->
    return members  if value is ''

  re = new RegExp(value, 'i')

  if member.get('status') is 'pending'
    re.test(member.get('firstName')) or \
    re.test(member.get('lastName')) or \
    re.test(member.get('email'))
  else
    re.test(member.get('profile').get('firstName')) or \
    re.test(member.get('profile').get('lastName')) or \
    re.test(member.get('profile').get('email'))


membersWithPendingInvitations = [
