copy object para la modificación del cliente
This commit is contained in:
parent
d59beccd49
commit
b9e4f8fc92
|
@ -26,4 +26,4 @@
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
</form>
|
</form>
|
||||||
<vn-confirm-client client="basicData.client" state="basicData.state"></vn-confirm-client>
|
<vn-confirm-client client="basicData.client" client-old="basicData.clientOld" state="basicData.state"></vn-confirm-client>
|
||||||
|
|
|
@ -7,14 +7,15 @@ export const COMPONENT = {
|
||||||
controllerAs: 'clientConfirm',
|
controllerAs: 'clientConfirm',
|
||||||
bindings: {
|
bindings: {
|
||||||
state: '<',
|
state: '<',
|
||||||
client: '='
|
client: '=',
|
||||||
|
clientOld: "="
|
||||||
},
|
},
|
||||||
controller: function($state, $element, copyObject){
|
controller: function($state, $element, copyObject){
|
||||||
|
|
||||||
var dialog = $element.find('dialog')[0]
|
var dialog = $element.find('dialog')[0]
|
||||||
|
|
||||||
this.accept = function(){
|
this.accept = function(){
|
||||||
this.client.navigate = true;
|
copyObject(this.clientOld, this.client);
|
||||||
$state.go(this.state);
|
$state.go(this.state);
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue