enhancement: Show agent availability status in conversation assignee select list (#2122)
* show agent status on conversation assignation * add agent status in contact sidebar * availability status badge component * review fixes * review fixes * chore: Fixes issue with status badge (#2136) * add empty case in agent list * Chore: Availability badge shape issue. #2140 Co-authored-by: Nithin David <webofnithin@gmail.com> Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div :class="`status-badge status-badge__${status}`" />
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
status: { type: String, default: '' },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '~dashboard/assets/scss/variables';
|
||||
.status-badge {
|
||||
width: var(--space-one);
|
||||
height: var(--space-one);
|
||||
margin-right: var(--space-micro);
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
&__online {
|
||||
background: var(--g-400);
|
||||
}
|
||||
&__offline {
|
||||
background: var(--b-600);
|
||||
}
|
||||
&__busy {
|
||||
background: var(--y-700);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -46,6 +46,14 @@
|
||||
@select="assignAgent"
|
||||
@remove="removeAgent"
|
||||
>
|
||||
<template slot="option" slot-scope="props">
|
||||
<div class="option__desc">
|
||||
<availability-status-badge
|
||||
:status="props.option.availability_status"
|
||||
/>
|
||||
<span class="option__title">{{ props.option.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<span slot="noResult">{{ $t('AGENT_MGMT.SEARCH.NO_RESULTS') }}</span>
|
||||
</multiselect>
|
||||
</div>
|
||||
@@ -57,11 +65,13 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MoreActions from './MoreActions';
|
||||
import Thumbnail from '../Thumbnail';
|
||||
import AvailabilityStatusBadge from '../conversation/AvailabilityStatusBadge';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MoreActions,
|
||||
Thumbnail,
|
||||
AvailabilityStatusBadge,
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -126,7 +136,6 @@ export default {
|
||||
bus.$emit('newToastMessage', this.$t('CONVERSATION.CHANGE_AGENT'));
|
||||
});
|
||||
},
|
||||
|
||||
removeAgent() {},
|
||||
},
|
||||
};
|
||||
@@ -142,4 +151,17 @@ export default {
|
||||
.conv-header {
|
||||
flex: 0 0 var(--space-jumbo);
|
||||
}
|
||||
|
||||
.option__desc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.option__desc {
|
||||
&::v-deep .status-badge {
|
||||
margin-right: var(--space-small);
|
||||
min-width: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user