2021-09-29 14:03:51 +00:00
|
|
|
<template>
|
2021-12-01 05:03:18 +00:00
|
|
|
<div class="inbox--name">
|
|
|
|
<fluent-icon class="inbox--icon" :icon="computedInboxClass" size="12" />
|
2021-09-29 14:03:51 +00:00
|
|
|
{{ inbox.name }}
|
2021-12-01 05:03:18 +00:00
|
|
|
</div>
|
2021-09-29 14:03:51 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { getInboxClassByType } from 'dashboard/helper/inbox';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
inbox: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computedInboxClass() {
|
|
|
|
const { phone_number: phoneNumber, channel_type: type } = this.inbox;
|
|
|
|
const classByType = getInboxClassByType(type, phoneNumber);
|
|
|
|
return classByType;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
.inbox--name {
|
2021-12-01 05:03:18 +00:00
|
|
|
display: inline-flex;
|
2021-09-29 14:03:51 +00:00
|
|
|
padding: var(--space-micro) 0;
|
|
|
|
line-height: var(--space-slab);
|
|
|
|
font-weight: var(--font-weight-medium);
|
|
|
|
background: none;
|
|
|
|
color: var(--s-500);
|
|
|
|
font-size: var(--font-size-mini);
|
|
|
|
}
|
2021-12-01 05:03:18 +00:00
|
|
|
|
|
|
|
.inbox--icon {
|
|
|
|
margin-right: var(--space-micro);
|
|
|
|
}
|
2021-09-29 14:03:51 +00:00
|
|
|
</style>
|