diff --git a/frontend/src/components/Modals/ContactModal.vue b/frontend/src/components/Modals/ContactModal.vue
index c8e855ca..3690fa51 100644
--- a/frontend/src/components/Modals/ContactModal.vue
+++ b/frontend/src/components/Modals/ContactModal.vue
@@ -10,10 +10,10 @@
@@ -91,8 +91,9 @@ import AddressIcon from '@/components/Icons/AddressIcon.vue'
import CertificateIcon from '@/components/Icons/CertificateIcon.vue'
import EditIcon from '@/components/Icons/EditIcon.vue'
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
+import { usersStore } from '@/stores/users'
import { call, createResource } from 'frappe-ui'
-import { ref, nextTick, watch, computed, h } from 'vue'
+import { ref, nextTick, watch, computed } from 'vue'
import { createToast } from '@/utils'
import { useRouter } from 'vue-router'
@@ -111,6 +112,8 @@ const props = defineProps({
},
})
+const { isManager } = usersStore()
+
const router = useRouter()
const show = defineModel()
@@ -237,7 +240,7 @@ const detailFields = computed(() => {
const sections = createResource({
url: 'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.get_fields_layout',
cache: ['quickEntryFields', 'Contact'],
- params: { doctype: 'Contact', type: 'Quick Entry'},
+ params: { doctype: 'Contact', type: 'Quick Entry' },
auto: true,
})
@@ -273,7 +276,7 @@ const filteredSections = computed(() => {
onDelete: async (option, isNew) => {
props.contact.data.email_ids =
props.contact.data.email_ids.filter(
- (email) => email.name !== option.name
+ (email) => email.name !== option.name,
)
!isNew && (await deleteOption('Contact Email', option.name))
if (_contact.value.email_id === option.value) {
@@ -281,7 +284,7 @@ const filteredSections = computed(() => {
_contact.value.email_id = ''
} else {
_contact.value.email_id = props.contact.data.email_ids.find(
- (email) => email.is_primary
+ (email) => email.is_primary,
)?.email_id
}
}
@@ -296,7 +299,10 @@ const filteredSections = computed(() => {
isNew: true,
})
}
- } else if (field.name == 'mobile_no' || field.name == 'actual_mobile_no') {
+ } else if (
+ field.name == 'mobile_no' ||
+ field.name == 'actual_mobile_no'
+ ) {
field.type = props.contact?.data?.name ? 'Dropdown' : 'Data'
field.name = 'actual_mobile_no'
field.options =
@@ -323,7 +329,7 @@ const filteredSections = computed(() => {
onDelete: async (option, isNew) => {
props.contact.data.phone_nos =
props.contact.data.phone_nos.filter(
- (phone) => phone.name !== option.name
+ (phone) => phone.name !== option.name,
)
!isNew && (await deleteOption('Contact Phone', option.name))
if (_contact.value.actual_mobile_no === option.value) {
@@ -332,7 +338,7 @@ const filteredSections = computed(() => {
} else {
_contact.value.actual_mobile_no =
props.contact.data.phone_nos.find(
- (phone) => phone.is_primary_mobile_no
+ (phone) => phone.is_primary_mobile_no,
)?.phone
}
}
@@ -432,8 +438,17 @@ watch(
editMode.value = true
}
})
- }
+ },
)
+
+const showQuickEntryModal = defineModel('quickEntry')
+
+function openQuickEntryModal() {
+ showQuickEntryModal.value = true
+ nextTick(() => {
+ show.value = false
+ })
+}