summaryrefslogtreecommitdiffstats
path: root/src/components/Actions/ActionCopyNtoFN.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Actions/ActionCopyNtoFN.vue')
-rw-r--r--src/components/Actions/ActionCopyNtoFN.vue11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/Actions/ActionCopyNtoFN.vue b/src/components/Actions/ActionCopyNtoFN.vue
index 4f4335b8..771880b6 100644
--- a/src/components/Actions/ActionCopyNtoFN.vue
+++ b/src/components/Actions/ActionCopyNtoFN.vue
@@ -21,7 +21,7 @@
-->
<template>
- <ActionButton icon="icon-up" @click="copyNtoFN">
+ <ActionButton icon="icon-up" @click="copyNToFN">
{{ t('contacts', 'Copy to full name') }}
</ActionButton>
</template>
@@ -37,13 +37,12 @@ export default {
mixins: [ActionsMixin],
methods: {
copyNToFN() {
- console.info(this.component)
- if (this.component.contact.vCard.hasProperty('n')) {
+ if (this.component.localContact.vCard.hasProperty('n')) {
// Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.
// -> John Stevenson
- const n = this.component.contact.vCard.getFirstPropertyValue('n')
- this.component.contact.fullName = n.slice(0, 2).reverse().join(' ')
- this.component.updateContact()
+ const n = this.component.localContact.vCard.getFirstPropertyValue('n')
+ this.component.localContact.fullName = n.slice(0, 2).reverse().join(' ')
+ this.component.$emit('update')
}
},
},