1
0
forked from test/crm

fix: newLead/newDeal dialog was not working

This commit is contained in:
Shariq Ansari 2023-12-13 16:28:29 +05:30
parent 37538bd267
commit 25300bcf54
2 changed files with 18 additions and 40 deletions

View File

@ -8,12 +8,10 @@
v-if="field.type === 'select'" v-if="field.type === 'select'"
type="select" type="select"
:options="field.options" :options="field.options"
v-model="newDeal[field.name]" v-model="field.value"
> >
<template v-if="field.name == 'status'" #prefix> <template v-if="field.prefix" #prefix>
<IndicatorIcon <IndicatorIcon :class="field.prefix" />
:class="getDealStatus(newDeal[field.name]).iconColorClass"
/>
</template> </template>
</FormControl> </FormControl>
<FormControl <FormControl
@ -95,21 +93,10 @@ const allFields = [
{ {
label: 'Salutation', label: 'Salutation',
name: 'salutation', name: 'salutation',
type: 'select', type: 'link',
options: [ doctype: 'Salutation',
{ placeholder: 'Salutation',
label: 'Mr', change: (data) => (props.newDeal.salutation = data),
value: 'Mr',
},
{
label: 'Ms',
value: 'Ms',
},
{
label: 'Mrs',
value: 'Mrs',
},
],
}, },
{ {
label: 'First Name', label: 'First Name',
@ -154,6 +141,8 @@ const allFields = [
name: 'status', name: 'status',
type: 'select', type: 'select',
options: statusOptions('deal'), options: statusOptions('deal'),
value: props.newDeal.status || getDealStatus(props.newDeal.status).name,
prefix: getDealStatus(props.newDeal.status).iconColorClass,
}, },
{ {
label: 'Deal Owner', label: 'Deal Owner',

View File

@ -8,12 +8,10 @@
v-if="field.type === 'select'" v-if="field.type === 'select'"
type="select" type="select"
:options="field.options" :options="field.options"
v-model="newLead[field.name]" v-model="field.value"
> >
<template v-if="field.name == 'status'" #prefix> <template v-if="field.prefix" #prefix>
<IndicatorIcon <IndicatorIcon :class="field.prefix" />
:class="getLeadStatus(newLead[field.name]).iconColorClass"
/>
</template> </template>
</FormControl> </FormControl>
<FormControl <FormControl
@ -95,21 +93,10 @@ const allFields = [
{ {
label: 'Salutation', label: 'Salutation',
name: 'salutation', name: 'salutation',
type: 'select', type: 'link',
options: [ placeholder: 'Salutation',
{ doctype: 'Salutation',
label: 'Mr', change: (data) => (props.newLead.salutation = data),
value: 'Mr',
},
{
label: 'Ms',
value: 'Ms',
},
{
label: 'Mrs',
value: 'Mrs',
},
],
}, },
{ {
label: 'First Name', label: 'First Name',
@ -154,6 +141,8 @@ const allFields = [
name: 'status', name: 'status',
type: 'select', type: 'select',
options: statusOptions('lead'), options: statusOptions('lead'),
value: props.newLead.status || getLeadStatus(props.newLead.status).name,
prefix: getLeadStatus(props.newLead.status).iconColorClass,
}, },
{ {
label: 'Lead Owner', label: 'Lead Owner',