diff --git a/frontend/src/components/Icons/WhatsAppIcon.vue b/frontend/src/components/Icons/WhatsAppIcon.vue
index 924a16b8..b4ee2250 100644
--- a/frontend/src/components/Icons/WhatsAppIcon.vue
+++ b/frontend/src/components/Icons/WhatsAppIcon.vue
@@ -9,7 +9,7 @@
diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue
index 3e010b00..d38fae9a 100644
--- a/frontend/src/pages/Deal.vue
+++ b/frontend/src/pages/Deal.vue
@@ -47,9 +47,10 @@
- {{ __('About this Deal') }}
+ {{ __(deal.data.name) }}
@@ -316,6 +317,7 @@ import {
setupAssignees,
setupCustomActions,
errorMessage,
+ copyToClipboard,
} from '@/utils'
import { globalStore } from '@/stores/global'
import { organizationsStore } from '@/stores/organizations'
diff --git a/frontend/src/pages/Lead.vue b/frontend/src/pages/Lead.vue
index fe976a3d..e94e4c2f 100644
--- a/frontend/src/pages/Lead.vue
+++ b/frontend/src/pages/Lead.vue
@@ -52,9 +52,10 @@
- {{ __('About this Lead') }}
+ {{ __(lead.data.name) }}
updateField('image', file.file_url)"
@@ -282,6 +283,7 @@ import {
setupAssignees,
setupCustomActions,
errorMessage,
+ copyToClipboard,
} from '@/utils'
import { globalStore } from '@/stores/global'
import { contactsStore } from '@/stores/contacts'
diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js
index 0c7dc03b..77065a49 100644
--- a/frontend/src/utils/index.js
+++ b/frontend/src/utils/index.js
@@ -147,3 +147,25 @@ export function errorMessage(title, message) {
iconClasses: 'text-red-600',
})
}
+
+export function copyToClipboard(text) {
+ if (navigator.clipboard && window.isSecureContext) {
+ navigator.clipboard.writeText(string).then(show_success_alert)
+ } else {
+ let input = document.createElement('textarea')
+ document.body.appendChild(input)
+ input.value = text
+ input.select()
+ document.execCommand('copy')
+ show_success_alert()
+ document.body.removeChild(input)
+ }
+ function show_success_alert() {
+ createToast({
+ title: 'Copied to clipboard',
+ text: text,
+ icon: 'check',
+ iconClasses: 'text-green-600',
+ })
+ }
+}