refactor
This commit is contained in:
parent
4cf5777b4e
commit
9aceb3ea6f
|
@ -0,0 +1,31 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $element) {
|
||||
this.$ = $scope;
|
||||
this.ticket = {};
|
||||
}
|
||||
show() {
|
||||
this.$.dialog.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.$.dialog.hide();
|
||||
}
|
||||
|
||||
onResponse(response) {
|
||||
this.$.ticketCreate.createTicket().then(res => {
|
||||
this.callback({res});
|
||||
});
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope'];
|
||||
|
||||
ngModule.component('vnTicketCreateDialog', {
|
||||
template: require('./create-dialog.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
ticket: '<?',
|
||||
callback: '&'
|
||||
}
|
||||
});
|
|
@ -298,7 +298,7 @@
|
|||
</vn-vertical>
|
||||
<vn-confirm
|
||||
vn-id="deleteConfirmation"
|
||||
on-response="$ctrl.returnDeleteTicketDialog(response)"
|
||||
on-response="$ctrl.deleteTicket(response)"
|
||||
question="You are going to delete this ticket"
|
||||
message="Continue anyway?">
|
||||
</vn-confirm>
|
||||
|
|
Loading…
Reference in New Issue