AddPersons: add suggestion of name when creating new person or thirdparty

This commit is contained in:
nobohan
2022-02-14 12:22:02 +01:00
parent 1c3f6c7c1e
commit 94729a66ca
6 changed files with 51 additions and 6 deletions

View File

@@ -61,6 +61,13 @@
<input class="form-control form-control-lg" id="name" v-model="thirdparty.text" v-bind:placeholder="$t('thirdparty.name')" />
<label for="name">{{ $t('thirdparty.name') }}</label>
</div>
<div v-if="query.length > 0">
<ul class="list-suggest add-items inline">
<li @click="addQuery(query)">
<span class="person-text">{{ query }}</span>
</li>
</ul>
</div>
<template
v-if="thirdparty.kind !== 'child'">
@@ -102,7 +109,7 @@ import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
export default {
name: "OnTheFlyThirdParty",
props: ['id', 'type', 'action'],
props: ['id', 'type', 'action', 'query'],
components: {
ThirdPartyRenderBox,
AddAddress,
@@ -186,6 +193,9 @@ export default {
this.thirdparty.address = payload.address; // <--
console.log('switch address to edit mode', this.context);
}
},
addQuery(query) {
this.thirdparty.text = query;
}
},
mounted() {