diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Actions/ActionCopyNtoFN.vue | 11 | ||||
-rw-r--r-- | src/components/Properties/PropertyActions.vue | 11 | ||||
-rw-r--r-- | src/components/Properties/PropertyDateTime.vue | 1 |
3 files changed, 14 insertions, 9 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') } }, }, diff --git a/src/components/Properties/PropertyActions.vue b/src/components/Properties/PropertyActions.vue index c604de86..2d1388a3 100644 --- a/src/components/Properties/PropertyActions.vue +++ b/src/components/Properties/PropertyActions.vue @@ -28,9 +28,10 @@ </template> {{ t('contacts', 'Delete') }} </ActionButton> - <Actions :is="action" - v-for="(action, index) in actions" - :key="index" /> + <component v-for="action in actions" + :is="action" + :key="action.name" + :component="propertyComponent" /> </Actions> </template> @@ -53,6 +54,10 @@ export default { type: Array, default: () => [], }, + propertyComponent: { + type: Object, + required: true, + }, }, methods: { diff --git a/src/components/Properties/PropertyDateTime.vue b/src/components/Properties/PropertyDateTime.vue index 1d8b1b6a..3bf5392e 100644 --- a/src/components/Properties/PropertyDateTime.vue +++ b/src/components/Properties/PropertyDateTime.vue @@ -73,6 +73,7 @@ <PropertyActions v-if="!isReadOnly" :actions="actions" + :property-component="this" @delete="deleteProperty" /> </div> </div> |