This commit is contained in:
Vicente Falco 2018-02-08 13:06:36 +01:00
commit f8dd52bd99
2 changed files with 5 additions and 2 deletions

View File

@ -3,9 +3,10 @@
url="/client/api/Addresses"
id-field="id"
data="$ctrl.address"
save="post"
form="form">
</vn-watcher>
<form name="form" ng-submit="watcher.submitGo('clientCard.addresses')" pad-medium>
<form name="form" ng-submit="watcher.submitGo('clientCard.addresses.list')" pad-medium>
<vn-card >
<vn-vertical pad-large>
<vn-title>Address</vn-title>

View File

@ -94,7 +94,9 @@ export default class Watcher extends Component {
(resolve, reject) => this.noChanges(reject)
);
}
let changedData = (this.$attrs.save && this.$attrs.save.toLowerCase() === 'post') ? this.copyInNewObject(this.data) : getModifiedData(this.data, this.orgData);
let changedData = (this.$attrs.save && this.$attrs.save.toLowerCase() === 'post')
? this.copyInNewObject(this.data)
: getModifiedData(this.data, this.orgData);
if (this.save && this.save.accept) {
this.save.model = changedData; // this.copyInNewObject(changedData);