mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Address: fetch POST valid dates when applying changes from datePane
This commit is contained in:
@@ -53,32 +53,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Patch date
|
||||
* TO MOVE in DatePane
|
||||
addDateToAddressAndPostAddressTo(payload) {
|
||||
payload.body = {
|
||||
validFrom: {
|
||||
datetime: `${this.context.valid.from.toISOString().split('T')[0]}T00:00:00+0100`
|
||||
}
|
||||
};
|
||||
console.log('addDateToAddress', payload);
|
||||
|
||||
this.$refs.addAddress.flag.loading = true;
|
||||
return patchAddress(payload.addressId, payload.body)
|
||||
.then(address => new Promise((resolve, reject) => {
|
||||
this.context.valid.from = address.validFrom;
|
||||
resolve();
|
||||
})
|
||||
.then(this.postAddressTo(payload))
|
||||
)
|
||||
.catch((error) => {
|
||||
this.$refs.addAddress.errorMsg.push(error);
|
||||
this.$refs.addAddress.flag.loading = false;
|
||||
});
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
* Post new created address to targetEntity
|
||||
*/
|
||||
|
Reference in New Issue
Block a user