fix: replaced salutation, source & organization with link field in lead
This commit is contained in:
parent
ac1a20ec46
commit
5abf460b5c
@ -198,13 +198,13 @@
|
|||||||
"
|
"
|
||||||
:debounce="500"
|
:debounce="500"
|
||||||
/>
|
/>
|
||||||
<Autocomplete
|
<Link
|
||||||
v-else-if="field.type === 'link'"
|
v-else-if="field.type === 'link'"
|
||||||
:value="lead.data[field.name]"
|
|
||||||
:options="field.options"
|
|
||||||
@change="(e) => field.change(e)"
|
|
||||||
:placeholder="field.placeholder"
|
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
:value="lead.data[field.name]"
|
||||||
|
:doctype="field.doctype"
|
||||||
|
:placeholder="field.placeholder"
|
||||||
|
@change="(e) => e && field.change(e)"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="field.create"
|
v-if="field.create"
|
||||||
@ -223,7 +223,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Autocomplete>
|
</Link>
|
||||||
<FormControl
|
<FormControl
|
||||||
v-else-if="field.type === 'user'"
|
v-else-if="field.type === 'user'"
|
||||||
type="autocomplete"
|
type="autocomplete"
|
||||||
@ -318,7 +318,7 @@ import Toggler from '@/components/Toggler.vue'
|
|||||||
import Activities from '@/components/Activities.vue'
|
import Activities from '@/components/Activities.vue'
|
||||||
import UserAvatar from '@/components/UserAvatar.vue'
|
import UserAvatar from '@/components/UserAvatar.vue'
|
||||||
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
||||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import {
|
import {
|
||||||
leadStatuses,
|
leadStatuses,
|
||||||
statusDropdownOptions,
|
statusDropdownOptions,
|
||||||
@ -347,7 +347,7 @@ import { useRouter } from 'vue-router'
|
|||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { contacts } = contactsStore()
|
const { contacts } = contactsStore()
|
||||||
const { getOrganization, getOrganizationOptions } = organizationsStore()
|
const { getOrganization } = organizationsStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -452,8 +452,8 @@ const detailSections = computed(() => {
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
name: 'organization',
|
name: 'organization',
|
||||||
placeholder: 'Select organization',
|
placeholder: 'Select organization',
|
||||||
options: getOrganizationOptions(),
|
doctype: 'CRM Organization',
|
||||||
change: (data) => data && updateField('organization', data.value),
|
change: (data) => data && updateField('organization', data),
|
||||||
create: (value, close) => {
|
create: (value, close) => {
|
||||||
_organization.value.organization_name = value
|
_organization.value.organization_name = value
|
||||||
showOrganizationModal.value = true
|
showOrganizationModal.value = true
|
||||||
@ -492,12 +492,8 @@ const detailSections = computed(() => {
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
name: 'source',
|
name: 'source',
|
||||||
placeholder: 'Select source...',
|
placeholder: 'Select source...',
|
||||||
options: [
|
doctype: 'CRM Lead Source',
|
||||||
{ label: 'Advertisement', value: 'Advertisement' },
|
change: (data) => updateField('source', data),
|
||||||
{ label: 'Web', value: 'Web' },
|
|
||||||
{ label: 'Others', value: 'Others' },
|
|
||||||
],
|
|
||||||
change: (data) => updateField('source', data.value),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -509,19 +505,9 @@ const detailSections = computed(() => {
|
|||||||
label: 'Salutation',
|
label: 'Salutation',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
name: 'salutation',
|
name: 'salutation',
|
||||||
placeholder: 'Mr./Mrs./Ms.',
|
placeholder: 'Mr./Mrs./Ms...',
|
||||||
options: [
|
doctype: 'Salutation',
|
||||||
{ label: 'Dr', value: 'Dr' },
|
change: (data) => updateField('salutation', data),
|
||||||
{ label: 'Mr', value: 'Mr' },
|
|
||||||
{ label: 'Mrs', value: 'Mrs' },
|
|
||||||
{ label: 'Ms', value: 'Ms' },
|
|
||||||
{ label: 'Mx', value: 'Mx' },
|
|
||||||
{ label: 'Prof', value: 'Prof' },
|
|
||||||
{ label: 'Master', value: 'Master' },
|
|
||||||
{ label: 'Madam', value: 'Madam' },
|
|
||||||
{ label: 'Miss', value: 'Miss' },
|
|
||||||
],
|
|
||||||
change: (data) => updateField('salutation', data.value),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'First name',
|
label: 'First name',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user