mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Address: context id received from twig are integer
This commit is contained in:
@@ -31,7 +31,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//console.log('AddAddress: data context', this.context);
|
||||
console.log('AddAddress: data context', this.context);
|
||||
//console.log('AddAddress: data options', this.options);
|
||||
},
|
||||
methods: {
|
||||
@@ -83,12 +83,12 @@ export default {
|
||||
* Post new created address to targetEntity
|
||||
*/
|
||||
postAddressTo(payload) {
|
||||
console.log('postAddressTo', payload.target);
|
||||
console.log('postAddress', payload.addressId, 'To', payload.target, payload.targetId);
|
||||
switch (payload.target) {
|
||||
case 'household':
|
||||
postAddressToHousehold(payload.targetId, payload.addressId)
|
||||
.then(household => new Promise((resolve, reject) => {
|
||||
console.log('..toHousehold', household);
|
||||
.then(address => new Promise((resolve, reject) => {
|
||||
console.log('..household address', address);
|
||||
this.$refs.addAddress.flag.loading = false;
|
||||
this.$refs.addAddress.flag.success = true;
|
||||
|
||||
@@ -105,8 +105,8 @@ export default {
|
||||
break;
|
||||
case 'person':
|
||||
postAddressToPerson(payload.targetId, payload.addressId)
|
||||
.then(person => new Promise((resolve, reject) => {
|
||||
console.log('..toPerson', person);
|
||||
.then(address => new Promise((resolve, reject) => {
|
||||
console.log('..person address', address);
|
||||
this.$refs.addAddress.flag.loading = false;
|
||||
this.$refs.addAddress.flag.success = true;
|
||||
|
||||
|
Reference in New Issue
Block a user