Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
37 lines
670 B
Vue
37 lines
670 B
Vue
<script setup>
|
|
import BaseCell from 'dashboard/components/table/BaseCell.vue';
|
|
import { computed } from 'vue';
|
|
import { getCountryFlag } from 'dashboard/helper/flag';
|
|
|
|
const props = defineProps({
|
|
countryCode: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
country: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
});
|
|
|
|
const countryFlag = computed(() => {
|
|
if (!props.countryCode) {
|
|
return '';
|
|
}
|
|
|
|
return getCountryFlag(props.countryCode);
|
|
});
|
|
|
|
const formattedCountryName = computed(() => {
|
|
if (!props.country) {
|
|
return '';
|
|
}
|
|
|
|
return `${countryFlag.value} ${props.country}`;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<BaseCell :content="formattedCountryName" />
|
|
</template>
|