From 434002b308e9d9f3aafa6e46495600f7ccc54c96 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 23 May 2017 10:58:17 +0200 Subject: [PATCH] =?UTF-8?q?separda=20la=20facturaci=C3=B3n=20en=202=20modu?= =?UTF-8?q?los?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client/routes.json | 11 +++++- client/client/src/billing-data/index.html | 41 +++++++++++++++++++++ client/client/src/billing-data/index.js | 11 ++++++ client/client/src/card/index.js | 43 ++++++++++++----------- client/client/src/client.js | 2 ++ client/client/src/fiscal-data/index.html | 33 +---------------- 6 files changed, 88 insertions(+), 53 deletions(-) create mode 100644 client/client/src/billing-data/index.html create mode 100644 client/client/src/billing-data/index.js diff --git a/client/client/routes.json b/client/client/routes.json index bf686e6e1..b1f7c7ffd 100644 --- a/client/client/routes.json +++ b/client/client/routes.json @@ -19,13 +19,22 @@ }, "description": "Datos básicos", "icon": "person" - }, { + }, { "url": "/fiscal-data", "state": "clientCard.fiscalData", "component": "vn-client-fiscal-data", "params": { "client": "card.client" }, + "description": "Datos fiscales", + "icon": "account_balance" + }, { + "url": "/billing-data", + "state": "clientCard.billingData", + "component": "vn-client-billing-data", + "params": { + "client": "card.client" + }, "description": "Datos facturación", "icon": "assignment" }, { diff --git a/client/client/src/billing-data/index.html b/client/client/src/billing-data/index.html new file mode 100644 index 000000000..ef4d9fc47 --- /dev/null +++ b/client/client/src/billing-data/index.html @@ -0,0 +1,41 @@ + + + +
+ + + Información de facturación + + + + + + + + + + + + + + + + Documentación + + + + + + + + + + + +
\ No newline at end of file diff --git a/client/client/src/billing-data/index.js b/client/client/src/billing-data/index.js new file mode 100644 index 000000000..7c6c6ffeb --- /dev/null +++ b/client/client/src/billing-data/index.js @@ -0,0 +1,11 @@ +import {module} from '../module'; + +export const NAME = 'vnClientBillingData'; +export const COMPONENT = { + template: require('./index.html'), + controllerAs: 'bill', + bindings: { + client: '<' + } +}; +module.component(NAME, COMPONENT); diff --git a/client/client/src/card/index.js b/client/client/src/card/index.js index 270d95c21..0c4067750 100644 --- a/client/client/src/card/index.js +++ b/client/client/src/card/index.js @@ -2,25 +2,28 @@ import {module} from '../module'; import './style.css'; export const NAME = 'vnClientCard'; -export const COMPONENT = { + +export default class vnClientCard { + constructor() { + this.client = null; + this.items = []; + this.init(); + } + + init() { + routes.client.routes.forEach(i => { + if (i.description) + this.items.push({ + description: i.description, + icon: i.icon, + href: i.state + }); + }); + } +} + +module.component(NAME, { template: require('./index.html'), controllerAs: 'card', - controller: function() { - var self = this; - self.client = null; - self.items = []; - - self.$onInit = function() { - routes.client.routes.forEach(i => { - if (i.description) - self.items.push({ - description: i.description, - icon: i.icon, - href: i.state - }); - }); - }; - } -}; - -module.component(NAME, COMPONENT); + controller: vnClientCard +}); diff --git a/client/client/src/client.js b/client/client/src/client.js index d65eedb9e..4bc822059 100644 --- a/client/client/src/client.js +++ b/client/client/src/client.js @@ -6,6 +6,8 @@ export {NAME as CLIENTS, COMPONENT as CLIENTS_COMPONENT} from './index/index'; export {NAME as CLIENT_FISCAL_DATA_INDEX, COMPONENT as CLIENT_FISCAL_DATA_INDEX_COMPONENT} from './fiscal-data/index'; +export {NAME as CLIENT_BILLING_DATA_INDEX, + COMPONENT as CLIENT_BILLINGL_DATA_INDEX_COMPONENT} from './billing-data/index'; export {NAME as CLIENT_DESCRIPTOR, COMPONENT as CLIENT_DESCRIPTOR_COMPONENT} from './descriptor/index'; export {NAME as CLIENT_NOTES, diff --git a/client/client/src/fiscal-data/index.html b/client/client/src/fiscal-data/index.html index 8cf20d74e..7e9b2a7e9 100644 --- a/client/client/src/fiscal-data/index.html +++ b/client/client/src/fiscal-data/index.html @@ -38,38 +38,7 @@ - - - Información de facturación - - - - - - - - - - - - - - - - Documentación - - - - - - - +