fix: added more fields in contact edit dialog
This commit is contained in:
parent
6e294ee34c
commit
d2be5936c0
@ -27,9 +27,11 @@
|
||||
<div
|
||||
v-for="field in detailFields"
|
||||
:key="field.name"
|
||||
class="flex h-7 items-center gap-2 text-gray-800 text-base"
|
||||
class="flex h-7 items-center gap-2 text-base text-gray-800"
|
||||
>
|
||||
<div class="w-7 grid place-content-center"><component class="" :is="field.icon" /></div>
|
||||
<div class="grid w-7 place-content-center">
|
||||
<component :is="field.icon" />
|
||||
</div>
|
||||
<div v-if="field.type == 'dropdown'">
|
||||
<Dropdown
|
||||
:options="field.options"
|
||||
@ -227,7 +229,7 @@ async function callInsertDoc() {
|
||||
}
|
||||
|
||||
function handleContactUpdate(doc) {
|
||||
contacts.value.reload()
|
||||
contacts.reload()
|
||||
if (doc.name && props.options.redirect) {
|
||||
router.push({
|
||||
name: 'Contact',
|
||||
@ -283,7 +285,7 @@ const detailFields = computed(() => {
|
||||
icon: PhoneIcon,
|
||||
name: 'mobile_no',
|
||||
value: _contact.value.mobile_no,
|
||||
...sections.value[2].fields[1],
|
||||
...sections.value[3].fields[0],
|
||||
},
|
||||
{
|
||||
icon: OrganizationsIcon,
|
||||
@ -369,6 +371,10 @@ const sections = computed(() => {
|
||||
_show.value = true
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
label: 'Mobile no.',
|
||||
type: 'dropdown',
|
||||
@ -401,6 +407,16 @@ const sections = computed(() => {
|
||||
_show.value = true
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Gender',
|
||||
type: 'link',
|
||||
name: 'gender',
|
||||
placeholder: 'Select gender',
|
||||
doctype: 'Gender',
|
||||
change: (value) => {
|
||||
_contact.value.gender = value
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -423,6 +439,29 @@ const sections = computed(() => {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
label: 'Designation',
|
||||
type: 'data',
|
||||
name: 'designation',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
label: 'Address',
|
||||
type: 'link',
|
||||
name: 'address',
|
||||
placeholder: 'Select address',
|
||||
doctype: 'Address',
|
||||
change: (value) => {
|
||||
_contact.value.address = value
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
:key="field.name"
|
||||
>
|
||||
<div class="grid w-7 place-content-center">
|
||||
<component class="" :is="field.icon" />
|
||||
<component :is="field.icon" />
|
||||
</div>
|
||||
<div>{{ field.value }}</div>
|
||||
</div>
|
||||
@ -211,7 +211,7 @@ async function callInsertDoc() {
|
||||
}
|
||||
|
||||
function handleOrganizationUpdate(doc) {
|
||||
organizations.value?.reload()
|
||||
organizations.reload()
|
||||
if (doc.name && props.options.redirect) {
|
||||
router.push({
|
||||
name: 'Organization',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user