mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
edit and create of thirdparty pers physique is possible, but current civility and profession don't display yet in edit form
This commit is contained in:
parent
52a78902f7
commit
506118b3f1
@ -223,13 +223,11 @@ export default {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (typeof this.type === 'undefined') { // action=create or addContact
|
if (typeof this.type === 'undefined') { // action=create or addContact
|
||||||
console.log('will rewrite data');
|
// console.log('will rewrite data');
|
||||||
if (this.action === 'addContact') {
|
if (this.action === 'addContact') {
|
||||||
type = 'thirdparty'
|
type = 'thirdparty'
|
||||||
data = this.$refs.castThirdparty.$data.thirdparty;
|
data = this.$refs.castThirdparty.$data.thirdparty;
|
||||||
console.log('data original', data);
|
// console.log('data original', data);
|
||||||
data.civility = data.civility ? {type: 'chill_main_civility', id: data.civility.id} : null;
|
|
||||||
data.profession = data.profession ? {type: 'third_party_profession', id: data.profession.id} : null;
|
|
||||||
data.parent = {type: "thirdparty", id: this.parent.id};
|
data.parent = {type: "thirdparty", id: this.parent.id};
|
||||||
} else {
|
} else {
|
||||||
type = this.$refs.castNew.radioType;
|
type = this.$refs.castNew.radioType;
|
||||||
|
@ -70,14 +70,14 @@
|
|||||||
<select class="form-select form-select-lg" id="civility"
|
<select class="form-select form-select-lg" id="civility"
|
||||||
v-model="thirdparty.civility">
|
v-model="thirdparty.civility">
|
||||||
<option selected disabled :value="null" >{{ $t('thirdparty.civility') }}</option>
|
<option selected disabled :value="null" >{{ $t('thirdparty.civility') }}</option>
|
||||||
<option v-for="civility in civilities" :key="civility.id" :value="civility">{{ civility.name.fr }}</option>
|
<option v-for="civility in civilities" :key="civility.id" :value="{type: 'chill_main_civility', id: civility.id}">{{ civility.name.fr }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<select class="form-select form-select-lg" id="profession"
|
<select class="form-select form-select-lg" id="profession"
|
||||||
v-model="thirdparty.profession">
|
v-model="thirdparty.profession">
|
||||||
<option selected disabled :value="null">{{ $t('thirdparty.profession') }}</option>
|
<option selected disabled :value="null">{{ $t('thirdparty.profession') }}</option>
|
||||||
<option v-for="profession in professions" :key="profession.id" :value="profession">{{ profession.name.fr }}</option>
|
<option v-for="profession in professions" :key="profession.id" :value="{type: 'third_party_profession', id: profession.id}">{{ profession.name.fr }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -264,10 +264,10 @@ export default {
|
|||||||
this.thirdparty.name = query;
|
this.thirdparty.name = query;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let dependencies = [];
|
let dependencies = [];
|
||||||
dependencies.push(this.loadProfessions());
|
dependencies.push(this.loadProfessions());
|
||||||
dependencies.push(this.loadCivilities());
|
dependencies.push(this.loadCivilities());
|
||||||
if (this.action !== 'create') {
|
if (this.action !== 'create') {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
dependencies.push(this.loadData());
|
dependencies.push(this.loadData());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user