fix: replaced salutation & organization with Link field in contact
This commit is contained in:
parent
21cc553d0c
commit
cc1657e91e
@ -129,14 +129,13 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<FormControl
|
<Link
|
||||||
v-else-if="field.type === 'link'"
|
v-else-if="field.type === 'link'"
|
||||||
type="autocomplete"
|
|
||||||
:value="contact[field.name]"
|
|
||||||
:options="field.options"
|
|
||||||
@change="(e) => e && field.change(e)"
|
|
||||||
:placeholder="field.placeholder"
|
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
:value="contact[field.name]"
|
||||||
|
:doctype="field.doctype"
|
||||||
|
:placeholder="field.placeholder"
|
||||||
|
@change="(e) => e && field.change(e)"
|
||||||
/>
|
/>
|
||||||
<FormControl
|
<FormControl
|
||||||
v-else
|
v-else
|
||||||
@ -215,6 +214,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import {
|
import {
|
||||||
FormControl,
|
FormControl,
|
||||||
FeatherIcon,
|
FeatherIcon,
|
||||||
@ -256,7 +256,7 @@ import { useRouter } from 'vue-router'
|
|||||||
|
|
||||||
const { getContactByName, contacts } = contactsStore()
|
const { getContactByName, contacts } = contactsStore()
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { getOrganization, getOrganizationOptions } = organizationsStore()
|
const { getOrganization } = organizationsStore()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
contactId: {
|
contactId: {
|
||||||
@ -530,21 +530,11 @@ const details = 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: (value) => {
|
||||||
{ label: 'Mr', value: 'Mr' },
|
contact.value.salutation = value
|
||||||
{ label: 'Mrs', value: 'Mrs' },
|
updateContact('salutation', value)
|
||||||
{ 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) => {
|
|
||||||
contact.value.salutation = data.value
|
|
||||||
updateContact('salutation', data.value)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -626,10 +616,10 @@ const details = computed(() => {
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
name: 'company_name',
|
name: 'company_name',
|
||||||
placeholder: 'Select organization',
|
placeholder: 'Select organization',
|
||||||
options: getOrganizationOptions(),
|
doctype: 'CRM Organization',
|
||||||
change: (data) => {
|
change: (value) => {
|
||||||
contact.value.company_name = data.value
|
contact.value.company_name = value
|
||||||
updateContact('company_name', data.value)
|
updateContact('company_name', value)
|
||||||
},
|
},
|
||||||
link: (data) => {
|
link: (data) => {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user