Tarea #171 Añadir revision
This commit is contained in:
parent
4d1609c445
commit
151a19b0ba
|
@ -0,0 +1,23 @@
|
|||
<mg-ajax path="/ticket/api/TicketTrackings/" options="vnPost"></mg-ajax>
|
||||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
data="$ctrl.ticket"
|
||||
form="form"
|
||||
save="post">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()">
|
||||
<vn-card pad-large>
|
||||
<vn-title>New state</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
field="$ctrl.ticket.stateFk"
|
||||
url="/ticket/api/States"
|
||||
label="State"
|
||||
vn-focus>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit label="Save"></vn-submit>
|
||||
</vn-button-bar>
|
||||
</form>
|
|
@ -0,0 +1,25 @@
|
|||
import ngModule from '../../module';
|
||||
|
||||
export default class Controller {
|
||||
constructor($scope, $state) {
|
||||
this.$ = $scope;
|
||||
this.$state = $state;
|
||||
this.ticket = {
|
||||
ticketFk: $state.params.id,
|
||||
text: null
|
||||
};
|
||||
}
|
||||
onSubmit() {
|
||||
this.$.watcher.submit().then(
|
||||
() => {
|
||||
this.$state.go('ticket.card.tracking.index');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope', '$state'];
|
||||
|
||||
ngModule.component('vnTicketTrackingEdit', {
|
||||
template: require('./edit.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -6,5 +6,6 @@
|
|||
"Unable to default a disabled consignee": "Unable to default a disabled consignee",
|
||||
"El método de pago seleccionado requiere que se especifique el IBAN": "El método de pago seleccionado requiere que se especifique el IBAN",
|
||||
"Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre",
|
||||
"Quantity cannot be zero": "Quantity cannot be zero"
|
||||
"Quantity cannot be zero": "Quantity cannot be zero",
|
||||
"can't be blank": "can't be blank"
|
||||
}
|
Loading…
Reference in New Issue