2020-02-05 05:57:22 +00:00
|
|
|
<template>
|
2020-10-18 18:02:22 +00:00
|
|
|
<grouped-avatars :users="users" />
|
2020-02-05 05:57:22 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import GroupedAvatars from 'widget/components/GroupedAvatars.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'AvailableAgents',
|
|
|
|
components: { GroupedAvatars },
|
|
|
|
props: {
|
|
|
|
agents: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
users() {
|
2020-10-18 18:02:22 +00:00
|
|
|
return this.agents.slice(0, 5).map(agent => ({
|
2020-02-05 05:57:22 +00:00
|
|
|
id: agent.id,
|
|
|
|
avatar: agent.avatar_url,
|
|
|
|
name: agent.name,
|
|
|
|
}));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|