cambios pedro miercoles mañana

This commit is contained in:
Javi Gallego 2016-11-30 13:26:17 +01:00
parent f9f6e9c507
commit d451dfc6f5
2 changed files with 10 additions and 12 deletions

View File

@ -4,13 +4,13 @@ import {module} from '../../module';
export const NAME = 'vnClientBasicData'; export const NAME = 'vnClientBasicData';
export const COMPONENT = { export const COMPONENT = {
template: template, template: template,
controller: function ($http) { controller: function($http) {
this.submit = function () { this.submit = function() {
$http.post('/client/api/Clients', this.model).then ( $http.post('/client/api/Clients', this.model).then(
(json) => console.log (json.statusText), json => console.log(json.statusText),
(json) => console.error (json.data.error.message) json => console.error(json.data.error.message)
); );
}; };
}, }
}; };
module.component(NAME, COMPONENT); module.component(NAME, COMPONENT);

View File

@ -1,10 +1,9 @@
<form ng-submit="$ctrl.submit()"> <form ng-submit="frm.isValid && $ctrl.submit()" padding-large name="frm">
<vn-vertical class="form">
<h3 style="margin-top: 0;">Datos fiscales y de facturación</h3> <h3 style="margin-top: 0;">Datos fiscales y de facturación</h3>
<hr/> <hr/>
<vn-vertical class="uppercase"> <vn-vertical>
<vn-horizontal> <vn-horizontal>
<vn-check vn-one label="Cliente Activo" name"active" model="$ctrl.model.active"></vn-check> <vn-check vn-one label="Cliente activo" rule="client.active" name"active" model="$ctrl.model.active"></vn-check>
<vn-check vn-one label="Facturar" name="invoice" model="$ctrl.model.invoice"></vn-check> <vn-check vn-one label="Facturar" name="invoice" model="$ctrl.model.invoice"></vn-check>
<vn-check vn-one label="Factura Impresa" name="mail" model="$ctrl.model.mail"></vn-check> <vn-check vn-one label="Factura Impresa" name="mail" model="$ctrl.model.mail"></vn-check>
</vn-horizontal> </vn-horizontal>
@ -48,5 +47,4 @@
<vn-empty class="margin-large-top"> <vn-empty class="margin-large-top">
<vn-submit class="colored " text="Guardar"></vn-submit> <vn-submit class="colored " text="Guardar"></vn-submit>
</vn-empty> </vn-empty>
</vn-vertical>
</form> </form>