mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix name suggestion badges underneath input fields
This commit is contained in:
parent
0546a43d63
commit
6151d0ce54
@ -66,14 +66,14 @@
|
||||
|
||||
<div v-if="thirdparty.kind === 'child' || thirdparty.kind === 'contact'">
|
||||
<div class="child-info">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group mb-3 input-section">
|
||||
<select class="form-select form-select-lg" id="profession"
|
||||
v-model="thirdparty.civility">
|
||||
<option selected disabled :value="null" >{{ $t('thirdparty.civility') }}</option>
|
||||
<option v-for="civility in civilities" :key="civility.id" :value="{type: 'chill_main_civility', id: civility.id }">{{ civility.name.fr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group mb-3 input-section">
|
||||
<select class="form-select form-select-lg" id="civility"
|
||||
v-model="thirdparty.profession">
|
||||
<option selected disabled :value="null">{{ $t('thirdparty.profession') }}</option>
|
||||
@ -82,18 +82,37 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="child-info">
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="firstname" v-model="thirdparty.firstname" v-bind:placeholder="$t('thirdparty.firstname')" />
|
||||
<label for="firstname">{{ $t('thirdparty.firstname') }}</label>
|
||||
</div>
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="(qi, i) in queryItems" :key="i" @click="addQueryItem('firstName', qi)">
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.lastname')" />
|
||||
<label for="name">{{ $t('thirdparty.lastname') }}</label>
|
||||
</div>
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="(qi, i) in queryItems" :key="i" @click="addQueryItem('name', qi)">
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3" v-if="thirdparty.kind === 'company'">
|
||||
<div v-if="thirdparty.kind === 'company'">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.name')" />
|
||||
<label for="name">{{ $t('thirdparty.name') }}</label>
|
||||
</div>
|
||||
@ -104,6 +123,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template
|
||||
v-if="thirdparty.kind !== 'child'">
|
||||
@ -168,6 +188,7 @@ export default {
|
||||
type: 'thirdparty',
|
||||
address: null,
|
||||
kind: 'company',
|
||||
firstname: '',
|
||||
name: '',
|
||||
telephone: '',
|
||||
civility: null,
|
||||
@ -223,6 +244,9 @@ export default {
|
||||
//this.context = context; <--
|
||||
return context;
|
||||
},
|
||||
queryItems() {
|
||||
return this.query ? this.query.split(' ') : null;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
loadData(){
|
||||
@ -272,6 +296,16 @@ export default {
|
||||
console.log('switch address to edit mode', this.context);
|
||||
}
|
||||
},
|
||||
addQueryItem(field, queryItem) {
|
||||
switch (field) {
|
||||
case 'name':
|
||||
this.thirdparty.name = queryItem;
|
||||
break;
|
||||
case 'firstName':
|
||||
this.thirdparty.firstname = queryItem;
|
||||
break;
|
||||
}
|
||||
},
|
||||
addQuery(query) {
|
||||
this.thirdparty.name = query;
|
||||
},
|
||||
@ -320,7 +354,7 @@ dl {
|
||||
.child-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
.input-section {
|
||||
width: 49%;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user