forked from verdnatura/salix-front
feat: refs #6818 saysimple integration
This commit is contained in:
parent
0c6d6d6925
commit
a467c44b91
|
@ -1,16 +1,29 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
defineProps({ phoneNumber: { type: [String, Number], default: null } });
|
import { useAttrs } from 'vue';
|
||||||
|
const props = defineProps({
|
||||||
|
phoneNumber: { type: [String, Number], default: null },
|
||||||
|
channel: { type: Number, default: 1320 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
sip: { icon: 'phone_in_talk', href: `sip:${props.phoneNumber}` },
|
||||||
|
'say-simple': {
|
||||||
|
icon: 'help', // 'whatsapp',
|
||||||
|
href: `https://verdnatura.saysimple.io/start-conversation?customerIdentity=%2B${props.phoneNumber}&channelId=${props.channel}`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const type = Object.keys(config).find((key) => key in useAttrs()) || 'sip';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="phoneNumber"
|
v-if="phoneNumber"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="phone"
|
:icon="config[type].icon"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="primary"
|
color="primary"
|
||||||
padding="none"
|
padding="none"
|
||||||
:href="`sip:${phoneNumber}`"
|
:href="config[type].href"
|
||||||
@click.stop
|
@click.stop
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -95,6 +95,11 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ t('customer.summary.mobile') }}
|
{{ t('customer.summary.mobile') }}
|
||||||
<VnLinkPhone :phone-number="entity.mobile" />
|
<VnLinkPhone :phone-number="entity.mobile" />
|
||||||
|
<VnLinkPhone
|
||||||
|
say-simple
|
||||||
|
:phone-number="entity.mobile"
|
||||||
|
:channel="entity.country?.saySimpleCountry?.channel"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="entity.email" copy
|
<VnLv :value="entity.email" copy
|
||||||
|
@ -142,7 +147,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnLv
|
<VnLv
|
||||||
v-if="entity.country"
|
v-if="entity.country"
|
||||||
:label="t('customer.summary.country')"
|
:label="t('customer.summary.country')"
|
||||||
:value="entity.country.country"
|
:value="entity.country.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
Loading…
Reference in New Issue