fix: replaced organization & add contact autocomplete with link field
This commit is contained in:
parent
5abf460b5c
commit
dc5b206e56
@ -115,17 +115,10 @@
|
|||||||
{{ section.label }}
|
{{ section.label }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="section.contacts" class="pr-2">
|
<div v-if="section.contacts" class="pr-2">
|
||||||
<Autocomplete
|
<Link
|
||||||
value=""
|
value=""
|
||||||
:options="
|
doctype="Contact"
|
||||||
contacts.data.map((contact) => {
|
@change="(e) => e && addContact(e)"
|
||||||
return {
|
|
||||||
label: contact.full_name,
|
|
||||||
value: contact.name,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
"
|
|
||||||
@change="(e) => e.value && addContact(e.value)"
|
|
||||||
>
|
>
|
||||||
<template #target="{ togglePopover }">
|
<template #target="{ togglePopover }">
|
||||||
<Button
|
<Button
|
||||||
@ -161,7 +154,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Autocomplete>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition
|
<transition
|
||||||
@ -183,13 +176,13 @@
|
|||||||
{{ field.label }}
|
{{ field.label }}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 overflow-hidden">
|
<div class="flex-1 overflow-hidden">
|
||||||
<Autocomplete
|
<Link
|
||||||
v-if="field.type === 'link'"
|
v-if="field.type === 'link'"
|
||||||
:value="deal.data[field.name]"
|
|
||||||
:options="field.options"
|
|
||||||
@change="(e) => field.change(e)"
|
|
||||||
:placeholder="field.placeholder"
|
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
:value="deal.data[field.name]"
|
||||||
|
:doctype="field.doctype"
|
||||||
|
:placeholder="field.placeholder"
|
||||||
|
@change="(e) => field.change(e)"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="field.create"
|
v-if="field.create"
|
||||||
@ -208,7 +201,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Autocomplete>
|
</Link>
|
||||||
<FormControl
|
<FormControl
|
||||||
v-else-if="field.type === 'date'"
|
v-else-if="field.type === 'date'"
|
||||||
type="date"
|
type="date"
|
||||||
@ -392,7 +385,7 @@ 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 ContactModal from '@/components/Modals/ContactModal.vue'
|
import ContactModal from '@/components/Modals/ContactModal.vue'
|
||||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import {
|
import {
|
||||||
dealStatuses,
|
dealStatuses,
|
||||||
statusDropdownOptions,
|
statusDropdownOptions,
|
||||||
@ -519,8 +512,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) => updateField('organization', data.value),
|
change: (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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user