feat: Adds ability to delete contact without having to type name (#4155)
This commit is contained in:
@@ -77,9 +77,8 @@
|
|||||||
"CONFIRM": {
|
"CONFIRM": {
|
||||||
"TITLE": "Confirm Deletion",
|
"TITLE": "Confirm Deletion",
|
||||||
"MESSAGE": "Are you sure to delete ",
|
"MESSAGE": "Are you sure to delete ",
|
||||||
"PLACE_HOLDER": "Please type {contactName} to confirm",
|
"YES": "Yes, Delete",
|
||||||
"YES": "Yes, Delete ",
|
"NO": "No, Keep"
|
||||||
"NO": "No, Keep "
|
|
||||||
},
|
},
|
||||||
"API": {
|
"API": {
|
||||||
"SUCCESS_MESSAGE": "Contact deleted successfully",
|
"SUCCESS_MESSAGE": "Contact deleted successfully",
|
||||||
|
|||||||
@@ -126,17 +126,15 @@
|
|||||||
@close="toggleMergeModal"
|
@close="toggleMergeModal"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<woot-confirm-delete-modal
|
<woot-delete-modal
|
||||||
v-if="showDeleteModal"
|
v-if="showDeleteModal"
|
||||||
:show.sync="showDeleteModal"
|
:show.sync="showDeleteModal"
|
||||||
|
:on-close="closeDelete"
|
||||||
|
:on-confirm="confirmDeletion"
|
||||||
:title="$t('DELETE_CONTACT.CONFIRM.TITLE')"
|
:title="$t('DELETE_CONTACT.CONFIRM.TITLE')"
|
||||||
:message="confirmDeleteMessage"
|
:message="confirmDeleteMessage"
|
||||||
:confirm-text="deleteConfirmText"
|
:confirm-text="$t('DELETE_CONTACT.CONFIRM.YES')"
|
||||||
:reject-text="deleteRejectText"
|
:reject-text="$t('DELETE_CONTACT.CONFIRM.NO')"
|
||||||
:confirm-value="contact.name"
|
|
||||||
:confirm-place-holder-text="confirmPlaceHolderText"
|
|
||||||
@on-confirm="confirmDeletion"
|
|
||||||
@on-close="closeDelete"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -221,22 +219,11 @@ export default {
|
|||||||
return { twitter: twitterScreenName, ...(socialProfiles || {}) };
|
return { twitter: twitterScreenName, ...(socialProfiles || {}) };
|
||||||
},
|
},
|
||||||
// Delete Modal
|
// Delete Modal
|
||||||
deleteConfirmText() {
|
|
||||||
return `${this.$t('DELETE_CONTACT.CONFIRM.YES')} ${this.contact.name}`;
|
|
||||||
},
|
|
||||||
deleteRejectText() {
|
|
||||||
return `${this.$t('DELETE_CONTACT.CONFIRM.NO')} ${this.contact.name}`;
|
|
||||||
},
|
|
||||||
confirmDeleteMessage() {
|
confirmDeleteMessage() {
|
||||||
return `${this.$t('DELETE_CONTACT.CONFIRM.MESSAGE')} ${
|
return `${this.$t('DELETE_CONTACT.CONFIRM.MESSAGE')} ${
|
||||||
this.contact.name
|
this.contact.name
|
||||||
} ?`;
|
} ?`;
|
||||||
},
|
},
|
||||||
confirmPlaceHolderText() {
|
|
||||||
return `${this.$t('DELETE_CONTACT.CONFIRM.PLACE_HOLDER', {
|
|
||||||
contactName: this.contact.name,
|
|
||||||
})}`;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleMergeModal() {
|
toggleMergeModal() {
|
||||||
|
|||||||
Reference in New Issue
Block a user