Bug #437 Boton cancelar
This commit is contained in:
parent
82b0323847
commit
d6f3f22970
|
@ -102,5 +102,6 @@
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
<vn-submit label="Save"></vn-submit>
|
<vn-submit label="Save"></vn-submit>
|
||||||
|
<vn-button ng-click="$ctrl.cancel($event)" label="Cancel"></vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -12,6 +12,16 @@ export default class Controller {
|
||||||
this.$.model.remove(index);
|
this.$.model.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancel(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
this.goToIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
goToIndex() {
|
||||||
|
this.$state.go('client.card.address.index');
|
||||||
|
}
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
this.$.watcher.check();
|
this.$.watcher.check();
|
||||||
this.$.watcher.realSubmit()
|
this.$.watcher.realSubmit()
|
||||||
|
@ -20,7 +30,7 @@ export default class Controller {
|
||||||
this.$.watcher.setPristine();
|
this.$.watcher.setPristine();
|
||||||
this.$.watcher.notifySaved();
|
this.$.watcher.notifySaved();
|
||||||
this.card.reload();
|
this.card.reload();
|
||||||
this.$state.go('client.card.address.index', {id: this.$stateParams.id});
|
this.goToIndex();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
<vn-submit label="Save"></vn-submit>
|
<vn-submit label="Save"></vn-submit>
|
||||||
|
<vn-button ng-click="$ctrl.cancel($event)" label="Cancel"></vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</form>
|
</form>
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
|
|
|
@ -17,15 +17,25 @@ class Controller {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancel(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
this.goToIndex();
|
||||||
|
}
|
||||||
|
|
||||||
returnDialog(response) {
|
returnDialog(response) {
|
||||||
if (response === 'ACCEPT')
|
if (response === 'ACCEPT')
|
||||||
this.addCredit();
|
this.addCredit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goToIndex() {
|
||||||
|
this.$state.go('client.card.credit.index');
|
||||||
|
}
|
||||||
|
|
||||||
addCredit() {
|
addCredit() {
|
||||||
this.$scope.watcher.submit().then(
|
this.$scope.watcher.submit().then(
|
||||||
() => {
|
() => {
|
||||||
this.$state.go('client.card.credit.index');
|
this.goToIndex();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,5 +38,6 @@
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
<vn-submit label="Save"></vn-submit>
|
<vn-submit label="Save"></vn-submit>
|
||||||
|
<vn-button ng-click="$ctrl.cancel($event)" label="Cancel"></vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -8,11 +8,22 @@ class Controller {
|
||||||
started: new Date()
|
started: new Date()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancel(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
this.goToIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
goToIndex() {
|
||||||
|
this.$state.go('client.card.recovery.index');
|
||||||
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.recovery.clientFk = this.$state.params.id;
|
this.recovery.clientFk = this.$state.params.id;
|
||||||
this.$.watcher.submit().then(
|
this.$.watcher.submit().then(
|
||||||
() => {
|
() => {
|
||||||
this.$state.go('client.card.recovery.index');
|
this.goToIndex();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue