diff --git a/@salix/app/src/components.js b/@salix/app/src/components.js index e3947825d..454d0573f 100644 --- a/@salix/app/src/components.js +++ b/@salix/app/src/components.js @@ -1,6 +1,5 @@ export {NAME as VN_MAINMENU, COMPONENT as VN_MAINMENU_COMPONENT} from './components/main-menu/main-menu'; export {NAME as ACTIONS, COMPONENT as ACTIONS_COMPONENT} from './components/left-menu/actions'; -export {NAME as DESCRIPTOR, COMPONENT as DESCRIPTOR_COMPONENT} from './components/left-menu/descriptor'; export {NAME as LEFT_MENU, COMPONENT as LEFTMENU_COMPONENT} from './components/left-menu/left-menu'; export {NAME as MENU_ITEM, COMPONENT as MENU_ITEM_COMPONENT} from './components/left-menu/menu-item'; export {NAME as CLIENT_TOPBAR, COMPONENT as CLIENT_TOPBAR_COMPONENT} from './components/topbar/topbar'; diff --git a/@salix/app/src/components/left-menu/descriptor.html b/@salix/app/src/components/left-menu/descriptor.html deleted file mode 100644 index 0ca4b6737..000000000 --- a/@salix/app/src/components/left-menu/descriptor.html +++ /dev/null @@ -1,4 +0,0 @@ -
- person -

{{descriptor1.text}}

-
diff --git a/@salix/app/src/components/left-menu/left-menu.html b/@salix/app/src/components/left-menu/left-menu.html index b32ca864b..e90ce1506 100644 --- a/@salix/app/src/components/left-menu/left-menu.html +++ b/@salix/app/src/components/left-menu/left-menu.html @@ -1,4 +1,3 @@ - \ No newline at end of file diff --git a/@salix/app/src/components/left-menu/left-menu.js b/@salix/app/src/components/left-menu/left-menu.js index b6d708647..3d0c527ed 100644 --- a/@salix/app/src/components/left-menu/left-menu.js +++ b/@salix/app/src/components/left-menu/left-menu.js @@ -1,13 +1,12 @@ +require('./style.css'); import template from './left-menu.html'; -import style from './style.css'; import {module} from '../../module'; export const NAME = "vnLeftMenu"; export const COMPONENT = { template: template, bindings: { - items: '<', - descriptor: '<' + items: '<' } }; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/basic-data/index.js b/@salix/crud/src/client/basic-data/index.js index 75d59cc17..cae0df0f6 100644 --- a/@salix/crud/src/client/basic-data/index.js +++ b/@salix/crud/src/client/basic-data/index.js @@ -4,13 +4,13 @@ import {module} from '../../module'; export const NAME = 'vnClientBasicData'; export const COMPONENT = { template: template, - controller: function ($http) { - this.submit = function () { - $http.post('/client/api/Clients', this.model).then ( - (json) => console.log (json.statusText), - (json) => console.error (json.data.error.message) + controller: function($http) { + this.submit = function() { + $http.post('/client/api/Clients', this.model).then( + json => console.log(json.statusText), + json => console.error(json.data.error.message) ); - }; - }, + }; + } }; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/client.js b/@salix/crud/src/client/client.js index f1b5077cf..18b1f3f64 100644 --- a/@salix/crud/src/client/client.js +++ b/@salix/crud/src/client/client.js @@ -10,3 +10,5 @@ export {NAME as CLIENT_FISCAL_DATA_INDEX, COMPONENT as CLIENT_FISCAL_DATA_INDEX_COMPONENT} from './fiscal-data/index'; export {NAME as CLIENT_WEB_ACCESS, COMPONENT as CLIENT_WEB_ACCESS_COMPONENT} from './web-access/index'; +export {NAME as CLIENT_DESCRIPTOR, + COMPONENT as CLIENT_DESCRIPTOR_COMPONENT} from './descriptor/descriptor'; diff --git a/@salix/crud/src/client/client/client.html b/@salix/crud/src/client/client/client.html index 9dae5e69d..7a97ad5cf 100644 --- a/@salix/crud/src/client/client/client.html +++ b/@salix/crud/src/client/client/client.html @@ -2,7 +2,8 @@ - + + diff --git a/@salix/crud/src/client/client/client.js b/@salix/crud/src/client/client/client.js index 654c97c44..35d1aa4dc 100644 --- a/@salix/crud/src/client/client/client.js +++ b/@salix/crud/src/client/client/client.js @@ -14,11 +14,11 @@ export const COMPONENT = { {text: "Consignatarios", image: "local_shipping", href: "#/client/addresses"}, {text: "Notas", image: "insert_drive_file", href: "#/client/notes"} ]; - this.descriptor = [ - {text: "Cliente 1231"}, - {text: "Floristeria Lola"}, - {text: "987 654 321"} - ]; + this.descriptor = + {clientId: "Cliente 1231", + name: "Floristeria Lola", + phone: "987 654 321"} + ; } }; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/descriptor/descriptor.html b/@salix/crud/src/client/descriptor/descriptor.html new file mode 100644 index 000000000..5d3b47fc2 --- /dev/null +++ b/@salix/crud/src/client/descriptor/descriptor.html @@ -0,0 +1,11 @@ + + + person + + + {{$ctrl.descriptor.clientId}} + {{$ctrl.descriptor.name}} + {{$ctrl.descriptor.phone}} + + + diff --git a/@salix/app/src/components/left-menu/descriptor.js b/@salix/crud/src/client/descriptor/descriptor.js similarity index 100% rename from @salix/app/src/components/left-menu/descriptor.js rename to @salix/crud/src/client/descriptor/descriptor.js diff --git a/@salix/crud/src/client/fiscal-data/index.html b/@salix/crud/src/client/fiscal-data/index.html index 2ac5fd9b3..7cd9c0829 100644 --- a/@salix/crud/src/client/fiscal-data/index.html +++ b/@salix/crud/src/client/fiscal-data/index.html @@ -1,4 +1,5 @@ -
+ + Datos fiscales y de facturaciĆ³n diff --git a/@salix/crud/src/client/index/index.js b/@salix/crud/src/client/index/index.js index c023b8d31..367d9b296 100644 --- a/@salix/crud/src/client/index/index.js +++ b/@salix/crud/src/client/index/index.js @@ -4,19 +4,19 @@ import {module} from '../../module'; export const NAME = "vnClientIndex"; export const COMPONENT = { template: template, - controller: function($http){ - this.submit = function () { - var query = {"where": this.model, "fields": {"id": true}}; + controller: function($http) { + this.submit = function() { + var query = {where: this.model, fields: {id: true}}; console.log(query); - $http.get(`/client/api/Clients/findOne?filter=${JSON.stringify(query)}`).then ( - function(response){ + $http.get(`/client/api/Clients/findOne?filter=${JSON.stringify(query)}`).then( + function(response) { console.log(response); - }, - function(response){ + }, + function(response) { console.log(response); } ); - }; + }; } }; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/module.js b/@salix/crud/src/module.js index 5db9a9344..a0abd0639 100644 --- a/@salix/crud/src/module.js +++ b/@salix/crud/src/module.js @@ -2,5 +2,5 @@ import * as vendors from 'vendor'; import * as core from 'core'; export const NAME = 'crud'; -export const module = vendors.ng.module(NAME,[]); +export const module = vendors.ng.module(NAME, []);