mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
bugfix emit saveFormOnTheFly and add newly created contact to suggestion list immediately
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
v-bind:item="item"
|
||||
v-bind:search="search"
|
||||
v-bind:type="checkUniq"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
@updateSelected="updateSelected">
|
||||
</person-suggestion>
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
<suggestion-third-party
|
||||
v-if="item.result.type === 'thirdparty'"
|
||||
@saveFormOnTheFly="emitEvent"
|
||||
v-bind:item="item">
|
||||
</suggestion-third-party>
|
||||
|
||||
@@ -54,7 +55,7 @@ export default {
|
||||
'search',
|
||||
'type'
|
||||
],
|
||||
emits: ['updateSelected'],
|
||||
emits: ['updateSelected', 'saveFormOnTheFly'],
|
||||
computed: {
|
||||
selected: {
|
||||
set(value) {
|
||||
@@ -72,6 +73,9 @@ export default {
|
||||
methods: {
|
||||
setValueByType(value, type) {
|
||||
return (type === 'radio')? [value] : value;
|
||||
},
|
||||
emitEvent({data, type}) {
|
||||
this.$emit('saveFormOnTheFly', {type: type, data: data})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -25,6 +25,7 @@
|
||||
</badge-entity>
|
||||
<on-the-fly v-if="item.result.kind === 'company'"
|
||||
v-bind:parent="item.result"
|
||||
@saveFormOnTheFly="emitEvent"
|
||||
action="addContact"
|
||||
></on-the-fly>
|
||||
<on-the-fly
|
||||
@@ -58,6 +59,7 @@ export default {
|
||||
BadgeEntity
|
||||
},
|
||||
props: ['item'],
|
||||
emits: ['saveFormOnTheFly'],
|
||||
i18n,
|
||||
computed: {
|
||||
hasAddress() {
|
||||
@@ -81,6 +83,11 @@ export default {
|
||||
|
||||
return null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitEvent({data, type}) {
|
||||
this.$emit('saveFormOnTheFly', {type: type, data: data})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user