Skip to content

Commit

Permalink
Merge pull request frappe#425 from shariquerik/contact-email-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Oct 22, 2024
2 parents 137ca72 + 4072fd9 commit e9b448a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/Modals/ContactModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const filteredSections = computed(() => {
_contact.value.email_id = option.value
}
} else {
editOption('Contact Email', option.name, option.value)
editOption('Contact Email', option.name, 'email_id', option.value)
}
},
onDelete: async (option, isNew) => {
Expand Down Expand Up @@ -332,7 +332,7 @@ const filteredSections = computed(() => {
_contact.value.actual_mobile_no = option.value
}
} else {
editOption('Contact Phone', option.name, option.value)
editOption('Contact Phone', option.name, 'phone', option.value)
}
},
onDelete: async (option, isNew) => {
Expand Down Expand Up @@ -415,11 +415,11 @@ async function createNew(field, value) {
}
}
async function editOption(doctype, name, value) {
async function editOption(doctype, name, fieldname, value) {
let d = await call('frappe.client.set_value', {
doctype,
name,
fieldname: doctype == 'Contact Phone' ? 'phone' : 'email',
fieldname,
value,
})
if (d) {
Expand Down

0 comments on commit e9b448a

Please sign in to comment.