diff --git a/@salix/app/src/bootstrap.js b/@salix/app/src/bootstrap.js index 2e2704312..b49a0112d 100644 --- a/@salix/app/src/bootstrap.js +++ b/@salix/app/src/bootstrap.js @@ -14,5 +14,5 @@ export const bootstrap = () => { throw new Error("element is not defined"); } ng.bootstrap(_element, [SALIX]); - + }; diff --git a/@salix/app/src/components/left-menu/actions.html b/@salix/app/src/components/left-menu/actions.html index 3daf70551..b794c7faa 100644 --- a/@salix/app/src/components/left-menu/actions.html +++ b/@salix/app/src/components/left-menu/actions.html @@ -1,5 +1,5 @@ diff --git a/@salix/app/src/components/left-menu/actions.js b/@salix/app/src/components/left-menu/actions.js index 01b7dd0d4..a477eb0a3 100644 --- a/@salix/app/src/components/left-menu/actions.js +++ b/@salix/app/src/components/left-menu/actions.js @@ -4,6 +4,7 @@ import {module} from '../../module'; export const NAME = 'vnActions'; export const COMPONENT = { template: template, + controllerAs: "action", bindings: { items: '<' } diff --git a/@salix/app/src/components/left-menu/left-menu.html b/@salix/app/src/components/left-menu/left-menu.html index e90ce1506..dd68d8a7e 100644 --- a/@salix/app/src/components/left-menu/left-menu.html +++ b/@salix/app/src/components/left-menu/left-menu.html @@ -1,3 +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 3d0c527ed..9c0232413 100644 --- a/@salix/app/src/components/left-menu/left-menu.js +++ b/@salix/app/src/components/left-menu/left-menu.js @@ -5,6 +5,7 @@ import {module} from '../../module'; export const NAME = "vnLeftMenu"; export const COMPONENT = { template: template, + controllerAs: "menu", bindings: { items: '<' } diff --git a/@salix/app/src/components/left-menu/menu-item.html b/@salix/app/src/components/left-menu/menu-item.html index ac04772d9..3f38ba07e 100644 --- a/@salix/app/src/components/left-menu/menu-item.html +++ b/@salix/app/src/components/left-menu/menu-item.html @@ -1,7 +1,7 @@
  • - + keyboard_arrow_right - {{$ctrl.item.icon}} - {{$ctrl.item.description}} + {{menu.item.icon}} + {{menu.item.description}}
  • \ No newline at end of file diff --git a/@salix/app/src/components/left-menu/menu-item.js b/@salix/app/src/components/left-menu/menu-item.js index a5b8f582c..b85250bc7 100644 --- a/@salix/app/src/components/left-menu/menu-item.js +++ b/@salix/app/src/components/left-menu/menu-item.js @@ -4,6 +4,7 @@ import {module} from '../../module'; export const NAME = 'vnMenuItem'; export const COMPONENT = { template: template, + controllerAs: "menu", bindings: { item: '<' } diff --git a/@salix/app/src/components/main-menu/main-menu.html b/@salix/app/src/components/main-menu/main-menu.html index e3d2e7f7f..cc39d6c75 100644 --- a/@salix/app/src/components/main-menu/main-menu.html +++ b/@salix/app/src/components/main-menu/main-menu.html @@ -1,5 +1,5 @@
    - exit_to_app + exit_to_app apps notifications account_circle diff --git a/@salix/app/src/components/main-menu/main-menu.js b/@salix/app/src/components/main-menu/main-menu.js index afb5869c3..aa20ba198 100644 --- a/@salix/app/src/components/main-menu/main-menu.js +++ b/@salix/app/src/components/main-menu/main-menu.js @@ -5,6 +5,7 @@ import {module} from '../../module'; export const NAME = 'vnMainMenu'; export const COMPONENT = { template: template, + controllerAs: "mainMenu", controller: function () { this.onLogoutClick = function () diff --git a/@salix/app/src/components/searchbar/searchbar.js b/@salix/app/src/components/searchbar/searchbar.js index 0d9e5efc2..a3f36dd72 100644 --- a/@salix/app/src/components/searchbar/searchbar.js +++ b/@salix/app/src/components/searchbar/searchbar.js @@ -3,9 +3,6 @@ import {module} from '../../module'; export const NAME = 'vnSearchbar' export const COMPONENT = { - template: template, - controller: function(){ - - } + template: template }; module.component(NAME, COMPONENT); diff --git a/@salix/app/src/configroutes.js b/@salix/app/src/configroutes.js index ab96122a0..2a5ae738e 100644 --- a/@salix/app/src/configroutes.js +++ b/@salix/app/src/configroutes.js @@ -2,34 +2,52 @@ import * as core from 'core'; import * as spliting from './spliting'; import * as deps from './spliting/deps.json'; + function loader(module) { - return function ($ocLazyLoad, $q) { + + return function load($ocLazyLoad, $q){ return $q((resolve) => { core.splitingRegister.execute(module).then(function (dependencies) { var array = dependencies.map((item) => { return { name: item } }); resolve($ocLazyLoad.load(array)); }); }); - }; + + } + load.$inject = ['$ocLazyLoad', '$q']; +} + +function getParams(route) { + var params = "", + temporalParams = []; + + if (!route.params) { + return params; + } + + Object.keys(route.params).forEach(key => { + temporalParams.push(key + `= "${route.params[key]}"`); + }); + return temporalParams.join(" "); } function config($stateProvider, $urlRouterProvider) { core.splitingRegister.registerGraph(deps); $urlRouterProvider.otherwise('/clients'); - for (var file in routes) + for (var file in routes) { let fileRoutes = routes[file].routes; - let module = routes[file].module; + let module = routes[file].module; fileRoutes.forEach(function(route) { $stateProvider.state(route.state, { url: route.url, - template: `<${route.component} full-height>`, + template: `<${route.component} full-height ${getParams(route)}>`, resolve: { - loader: loader(module) - } - }) + loader: loader(module) + } + }); }); } } diff --git a/@salix/core/src/combo/combo.js b/@salix/core/src/combo/combo.js index 782c3b9a7..3c29a815c 100644 --- a/@salix/core/src/combo/combo.js +++ b/@salix/core/src/combo/combo.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as normalizerFactory from '../inputAttrsNormalizer'; import * as util from '../util'; @@ -17,4 +17,4 @@ export function directive(resolve, normalizer) { } }; } -module.directive(NAME, directive); +_module.directive(NAME, directive); diff --git a/@salix/core/src/date-picker/date-picker.js b/@salix/core/src/date-picker/date-picker.js index c734910e8..5e5ca2e4d 100644 --- a/@salix/core/src/date-picker/date-picker.js +++ b/@salix/core/src/date-picker/date-picker.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as normalizerFactory from '../inputAttrsNormalizer'; import * as util from '../util'; @@ -16,4 +16,4 @@ export function directive(resolve, normalizer) { } }; } -module.directive(NAME, directive); +_module.directive(NAME, directive); diff --git a/@salix/core/src/icon-button/icon-button.js b/@salix/core/src/icon-button/icon-button.js index 095911090..180eb1b28 100644 --- a/@salix/core/src/icon-button/icon-button.js +++ b/@salix/core/src/icon-button/icon-button.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as util from '../util'; @@ -14,4 +14,4 @@ export function directive(resolve) { } }; } -module.directive(NAME, directive); +_module.directive(NAME, directive); diff --git a/@salix/core/src/interpolate.js b/@salix/core/src/interpolate.js index 0c20426d1..115c1f98e 100644 --- a/@salix/core/src/interpolate.js +++ b/@salix/core/src/interpolate.js @@ -36,32 +36,7 @@ $interpolateMinErr.interr = function (text, err) { return $interpolateMinErr('interr', 'Can\'t interpolate: {0}\n{1}', text, err.toString()); }; -export class Interpolate -{ - constructor () { - this._startSymbol='*['; - this._endSymbol = ']*'; - } - - set startSymbol (value) { - if (value) { - this._startSymbol = value; - return this; - } else { - return this._startSymbol; - } - }; - - set endSymbol (value) { - if (value) { - this._endSymbol = value; - return this; - } else { - return this._endSymbol; - } - }; - - $get($parse, $exceptionHandler, $sce) { +function $get($parse, $exceptionHandler, $sce) { var startSymbolLength = this._startSymbol.length, endSymbolLength = this._endSymbol.length, escapedStartRegexp = new RegExp(this._startSymbol.replace(/./g, escape), 'g'), @@ -195,8 +170,37 @@ export class Interpolate return $interpolate; } + +$get.$inject = ['$parse', '$exceptionHandler', '$sce']; + +export class Interpolate +{ + constructor () { + this._startSymbol='*['; + this._endSymbol = ']*'; + } + + set startSymbol (value) { + if (value) { + this._startSymbol = value; + return this; + } else { + return this._startSymbol; + } + }; + + set endSymbol (value) { + if (value) { + this._endSymbol = value; + return this; + } else { + return this._endSymbol; + } + }; + + } +Interpolate.prototype.$get = $get; var interpolate = new Interpolate(); -interpolate.$get.$inject = ['$parse', '$exceptionHandler', '$sce']; module.provider(NAME, () => interpolate); diff --git a/@salix/core/src/password/password.js b/@salix/core/src/password/password.js index b68191ad9..8acd37bdf 100644 --- a/@salix/core/src/password/password.js +++ b/@salix/core/src/password/password.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as normalizerFactory from '../inputAttrsNormalizer'; import * as util from '../util'; @@ -17,4 +17,4 @@ export function directive (resolve, normalizer){ } } -module.directive(NAME,directive); +_module.directive(NAME,directive); diff --git a/@salix/core/src/resolveDefaultComponents.js b/@salix/core/src/resolveDefaultComponents.js index 25de84dd3..fa45672c2 100644 --- a/@salix/core/src/resolveDefaultComponents.js +++ b/@salix/core/src/resolveDefaultComponents.js @@ -5,6 +5,26 @@ import Interpolate from './interpolate'; export const NAME = util.getProviderName('ResolveDefaultComponent'); +function $get($injector, vnInterpolate){ + return { + getTemplate:function(name, attrs) { + this._frameworkName = 'Mdl'; + let _name = util.getFactoryName( name + this._frameworkName); + let defaultfactory = $injector.has(_name) ? $injector.get(_name) : undefined; + + if(!defaultfactory) { + throw new Error("factory is not defined"); + } + + let defaultValues = defaultfactory.default; + let template = defaultfactory.template; + let scope = Object.assign({}, defaultValues || {}, attrs || {}); + return template && vnInterpolate(template)(scope); + } + }; +} +$get.$inject = ['$injector', 'vnInterpolate']; + export class ResolveDefaultComponent { constructor() { this._frameworkName='Mdl'; @@ -12,26 +32,8 @@ export class ResolveDefaultComponent { set frameworkName(value) { this._frameworkName = value; } - $get($injector,vnInterpolate) { - return { - getTemplate:function(name, attrs) { - this._frameworkName = 'Mdl'; - let _name = util.getFactoryName( name + this._frameworkName); - let defaultfactory = $injector.has(_name) ? $injector.get(_name) : undefined; - - if(!defaultfactory) { - throw new Error("factory is not defined"); - } - - let defaultValues = defaultfactory.default; - let template = defaultfactory.template; - let scope = Object.assign({}, defaultValues || {}, attrs || {}); - return template && vnInterpolate(template)(scope); - } - }; - } } +ResolveDefaultComponent.prototype.$get = $get; var resolve = new ResolveDefaultComponent(); -resolve.$get.$inject = ['$injector', 'vnInterpolate']; _module.provider(NAME,() => resolve); \ No newline at end of file diff --git a/@salix/core/src/routesLoader.js b/@salix/core/src/routesLoader.js index 99c001786..4ea96e99d 100644 --- a/@salix/core/src/routesLoader.js +++ b/@salix/core/src/routesLoader.js @@ -4,28 +4,25 @@ import * as util from './util' export const NAME = util.getProviderName ('RoutesLoader') -export class RoutesLoader -{ - constructor () {} - - $get ($http) - { - let script = document.currentScript || (() => { +function $get($http){ + let script = document.currentScript || (() => { let scripts = document.getElementsByTagName ('script'); return scripts[scripts.length - 1]; }) (); let routesCdn = script.getAttribute ('routes-cdn'); - - return $http + return $http ({ method: 'GET', url: routesCdn }) - } } +$get.$inject = ["$http"]; + +export class RoutesLoader{ constructor () {} } + +RoutesLoader.prototype.$get = $get; var routes = new RoutesLoader (); -routes.$get.$inject = ['$http']; _module.provider (NAME, () => routes) diff --git a/@salix/core/src/snackbar/snackbar.js b/@salix/core/src/snackbar/snackbar.js index 3209b3671..b04571659 100644 --- a/@salix/core/src/snackbar/snackbar.js +++ b/@salix/core/src/snackbar/snackbar.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as util from '../util'; @@ -15,4 +15,4 @@ export function directive (resolve){ } } -module.directive(NAME,directive); +_module.directive(NAME,directive); diff --git a/@salix/core/src/spinner/spinner.js b/@salix/core/src/spinner/spinner.js index b7bc987b2..03bbd9f5f 100644 --- a/@salix/core/src/spinner/spinner.js +++ b/@salix/core/src/spinner/spinner.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as util from '../util'; @@ -15,4 +15,4 @@ export function directive (resolve){ } } -module.directive(NAME,directive); +_module.directive(NAME,directive); diff --git a/@salix/core/src/submit/submit.js b/@salix/core/src/submit/submit.js index 4f548ced9..a13771944 100644 --- a/@salix/core/src/submit/submit.js +++ b/@salix/core/src/submit/submit.js @@ -1,4 +1,4 @@ -import {module} from '../module'; +import {module as _module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; import * as util from '../util'; @@ -15,4 +15,4 @@ export function directive (resolve){ } } -module.directive(NAME,directive); +_module.directive(NAME,directive); diff --git a/@salix/core/src/title/title.js b/@salix/core/src/title/title.js index 7cde9b468..8de6aad4d 100644 --- a/@salix/core/src/title/title.js +++ b/@salix/core/src/title/title.js @@ -1,9 +1,9 @@ import template from './title.html'; -import {module} from '../module'; +import {module as _module} from '../module'; export const NAME = "vnTitle"; export const COMPONENT = { template: template, transclude: true }; -module.component(NAME, COMPONENT); +_module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/addresses/index.html b/@salix/crud/src/client/addresses/index.html index d8bb95e7a..e51684d82 100644 --- a/@salix/crud/src/client/addresses/index.html +++ b/@salix/crud/src/client/addresses/index.html @@ -5,7 +5,7 @@ Consignee Enabled - + diff --git a/@salix/crud/src/client/addresses/index.js b/@salix/crud/src/client/addresses/index.js index 35725150e..f00d9ea39 100644 --- a/@salix/crud/src/client/addresses/index.js +++ b/@salix/crud/src/client/addresses/index.js @@ -4,28 +4,26 @@ import {module} from '../../module'; export const NAME = 'vnClientAddresses'; export const COMPONENT = { template: template, - controller: function ($http) + controllerAs: 'address', + controller: function($http) { -/* $http.get('/client/api/Addresses', this.model).then ( - (json) => { this.addresses = json.data; }, - (json) => console.error (json.data.error.message) - ); -*/ - this.addresses = []; - for (var i = 1; i <= 4; i++) - this.addresses.push ({ - "consignee": "Consignee", - "street": "Street", - "city": "City", - "postcode": "46600", - "province": "Province", - "country": "Country", - "phone": "+XX XXX XX XX XX", - "mobile": "+XX 6XX XX XX XX", - "enabled": true - }); - }, + this.addresses = []; + + for (var i = 1; i <= 4; i++) + this.addresses.push({ + consignee: "Consignee", + street: "Street", + city: "City", + postcode: "46600", + province: "Province", + country: "Country", + phone: "+XX XXX XX XX XX", + mobile: "+XX 6XX XX XX XX", + enabled: true + }); + } }; + COMPONENT.controller.$inject = ['$http']; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/basic-data/index.html b/@salix/crud/src/client/basic-data/index.html index 9cd76e86a..1d9faafcf 100644 --- a/@salix/crud/src/client/basic-data/index.html +++ b/@salix/crud/src/client/basic-data/index.html @@ -1,20 +1,20 @@ -
    + Datos básicos - - + + - - + + - - + + - - + + diff --git a/@salix/crud/src/client/basic-data/index.js b/@salix/crud/src/client/basic-data/index.js index 0073c6daa..c26858545 100644 --- a/@salix/crud/src/client/basic-data/index.js +++ b/@salix/crud/src/client/basic-data/index.js @@ -4,6 +4,10 @@ import {module} from '../../module'; export const NAME = 'vnClientBasicData'; export const COMPONENT = { template: template, + controllerAs: 'basicData', + bindings: { + client: '<' + }, controller: function($http) { this.submit = function() { $http.post('/client/api/Clients', this.model).then( diff --git a/@salix/crud/src/client/card/card.html b/@salix/crud/src/client/card/card.html index 7a97ad5cf..d20991987 100644 --- a/@salix/crud/src/client/card/card.html +++ b/@salix/crud/src/client/card/card.html @@ -2,10 +2,10 @@ - - + + - + diff --git a/@salix/crud/src/client/card/card.js b/@salix/crud/src/client/card/card.js index 3c70a6f9f..041b28559 100644 --- a/@salix/crud/src/client/card/card.js +++ b/@salix/crud/src/client/card/card.js @@ -6,13 +6,21 @@ const _NAME = 'clientClient'; export const NAME = "vnClientCard"; export const COMPONENT = { template: template, + controllerAs: 'card', controller: function($http, $stateParams) { let clientRoutes = routes['src/client/routes.js'].routes; - this.client = []; this.items = []; + this.client = null; $http.get(`/client/api/Clients/${$stateParams.id}`).then( - (json) => {this.client = json.data;}, + (json) => { + this.client = json.data; + this.descriptor = { + clientId: this.client.id, + name: this.client.name, + phone: this.client.phone + }; + }, (json) => console.error (json.data.error.message) ); @@ -24,12 +32,6 @@ export const COMPONENT = { href: i.state }); }); - - this.descriptor = { - clientId: "Cliente 1231", - name: "Floristeria Lola", - phone: "987 654 321" - }; } }; COMPONENT.controller.$inject = ['$http', '$stateParams']; diff --git a/@salix/crud/src/client/descriptor/descriptor.html b/@salix/crud/src/client/descriptor/descriptor.html index 5d3b47fc2..ce29df7b7 100644 --- a/@salix/crud/src/client/descriptor/descriptor.html +++ b/@salix/crud/src/client/descriptor/descriptor.html @@ -3,9 +3,9 @@ person - {{$ctrl.descriptor.clientId}} - {{$ctrl.descriptor.name}} - {{$ctrl.descriptor.phone}} + {{descriptor.descriptor.clientId}} + {{descriptor.descriptor.name}} + {{descriptor.descriptor.phone}} diff --git a/@salix/crud/src/client/descriptor/descriptor.js b/@salix/crud/src/client/descriptor/descriptor.js index 930d8ef98..012ad8f5d 100644 --- a/@salix/crud/src/client/descriptor/descriptor.js +++ b/@salix/crud/src/client/descriptor/descriptor.js @@ -4,6 +4,7 @@ import {module} from '../../module'; export const NAME = 'vnDescriptor'; export const COMPONENT = { template: template, + controllerAs: 'descriptor', bindings: { descriptor: '<' } diff --git a/@salix/crud/src/client/fiscal-data/index.html b/@salix/crud/src/client/fiscal-data/index.html index 7cd9c0829..77e1fb625 100644 --- a/@salix/crud/src/client/fiscal-data/index.html +++ b/@salix/crud/src/client/fiscal-data/index.html @@ -1,47 +1,47 @@ - + Datos fiscales y de facturación - - - + + + - - + + - - - + + + - - - + + +
    Información de facturación
    - - - + + + - - - - + + + +
    Documentación
    - - - + + + diff --git a/@salix/crud/src/client/fiscal-data/index.js b/@salix/crud/src/client/fiscal-data/index.js index 7dac6e7ba..d951f6b79 100644 --- a/@salix/crud/src/client/fiscal-data/index.js +++ b/@salix/crud/src/client/fiscal-data/index.js @@ -4,6 +4,7 @@ import {module} from '../../module'; export const NAME = 'vnClientFiscalData'; export const COMPONENT = { template: template, + controllerAs: 'fiscal', controller: function($http) { this.submit = function() { $http.post('/client/api/Clients', this.model).then( diff --git a/@salix/crud/src/client/index/index.html b/@salix/crud/src/client/index/index.html index 11a34cf46..575bbbb37 100644 --- a/@salix/crud/src/client/index/index.html +++ b/@salix/crud/src/client/index/index.html @@ -9,7 +9,7 @@ - + diff --git a/@salix/crud/src/client/index/index.js b/@salix/crud/src/client/index/index.js index 32cbe9f85..1938dc461 100644 --- a/@salix/crud/src/client/index/index.js +++ b/@salix/crud/src/client/index/index.js @@ -1,17 +1,20 @@ import template from './index.html'; import {module} from '../../module'; -export const NAME = "vnClientIndex"; +export const NAME = 'vnClientIndex'; export const COMPONENT = { template: template, + controllerAs: 'search', controller: function($http) { this.clients = []; - + $http.get('/client/api/Clients').then( - (json) => {this.clients = json.data; }, - (json) => console.error (json.data.error.message) + json => { + this.clients = json.data; + }, + json => console.error(json.data.error.message) ); - + this.submit = function() { var query = {where: this.model, fields: {id: true}}; diff --git a/@salix/crud/src/client/index/item-client.html b/@salix/crud/src/client/index/item-client.html index 4ee649cd3..cfd940ac2 100644 --- a/@salix/crud/src/client/index/item-client.html +++ b/@salix/crud/src/client/index/item-client.html @@ -1,12 +1,12 @@ -
    {{$ctrl.client.alias}}
    -
    {{$ctrl.client.name}}
    -
    {{$ctrl.client.phone}}, {{$ctrl.client.contact}}
    +
    {{itemClient.client.alias}}
    +
    {{itemClient.client.name}}
    +
    {{itemClient.client.phone}}, {{itemClient.client.contact}}
    - +
    \ No newline at end of file diff --git a/@salix/crud/src/client/index/item-client.js b/@salix/crud/src/client/index/item-client.js index 0ee02cb75..65f0a26f2 100644 --- a/@salix/crud/src/client/index/item-client.js +++ b/@salix/crud/src/client/index/item-client.js @@ -4,6 +4,7 @@ import {module} from '../../module'; export const NAME = 'vnItemClient'; export const COMPONENT = { template: template, + controllerAs: 'itemClient', bindings: { client: '<' } diff --git a/@salix/crud/src/client/notes/index.html b/@salix/crud/src/client/notes/index.html index 3361a1846..39ccf46d0 100644 --- a/@salix/crud/src/client/notes/index.html +++ b/@salix/crud/src/client/notes/index.html @@ -1,5 +1,5 @@ - + Notas - + \ No newline at end of file diff --git a/@salix/crud/src/client/notes/index.js b/@salix/crud/src/client/notes/index.js index b8e2aa334..f5d7378a9 100644 --- a/@salix/crud/src/client/notes/index.js +++ b/@salix/crud/src/client/notes/index.js @@ -3,6 +3,7 @@ import {module} from '../../module'; export const NAME = 'vnClientNotes'; export const COMPONENT = { + controllerAs: 'note', template: template }; module.component(NAME, COMPONENT); \ No newline at end of file diff --git a/@salix/crud/src/client/routes.js b/@salix/crud/src/client/routes.js index 4730c72aa..fafd52143 100644 --- a/@salix/crud/src/client/routes.js +++ b/@salix/crud/src/client/routes.js @@ -12,6 +12,9 @@ url: "/basic-data", state: "clientCard.basicData", component: "vn-client-basic-data", + params: { + client: "card.client" + }, description: "Datos básicos", icon: "person" },{ diff --git a/@salix/crud/src/client/search-panel/search-panel.html b/@salix/crud/src/client/search-panel/search-panel.html index 57d39588c..96c819fdc 100644 --- a/@salix/crud/src/client/search-panel/search-panel.html +++ b/@salix/crud/src/client/search-panel/search-panel.html @@ -1,22 +1,22 @@
    -
    + - - + + - + - + - - + + - - + + add_shopping_cartAdd to shopping cart diff --git a/@salix/crud/src/client/search-panel/search-panel.js b/@salix/crud/src/client/search-panel/search-panel.js index 559a95a27..73e2a9e39 100644 --- a/@salix/crud/src/client/search-panel/search-panel.js +++ b/@salix/crud/src/client/search-panel/search-panel.js @@ -3,6 +3,7 @@ import {module} from '../../module'; export const NAME = "vnSearchPanel"; export const COMPONENT = { + controllerAs: 'search', template: template }; module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/web-access/index.html b/@salix/crud/src/client/web-access/index.html index 9efea2eba..16542a5b6 100644 --- a/@salix/crud/src/client/web-access/index.html +++ b/@salix/crud/src/client/web-access/index.html @@ -1,6 +1,6 @@ - + Acceso Web - - + + \ No newline at end of file diff --git a/@salix/crud/src/client/web-access/index.js b/@salix/crud/src/client/web-access/index.js index 1660ec601..fb2807c33 100644 --- a/@salix/crud/src/client/web-access/index.js +++ b/@salix/crud/src/client/web-access/index.js @@ -3,6 +3,7 @@ import {module} from '../../module'; export const NAME = 'vnClientWebAccess'; export const COMPONENT = { + controllerAs: 'web', template: template }; module.component(NAME, COMPONENT); \ No newline at end of file diff --git a/@salix/webpack.config.js b/@salix/webpack.config.js index ee67c4f41..415185128 100644 --- a/@salix/webpack.config.js +++ b/@salix/webpack.config.js @@ -49,16 +49,16 @@ var config = { ] }, plugins: [], - devtool: 'source-map' + //devtool: 'source-map' }; -if (!devMode) { +//if (!devMode) { config.plugins.push ( new webpack.optimize.UglifyJsPlugin({ minimize: true, compress: { warnings: false } }) ); -} +//} module.exports = config; diff --git a/db.json b/db.json new file mode 100644 index 000000000..5a84316b7 --- /dev/null +++ b/db.json @@ -0,0 +1,19 @@ +{ + "ids": { + "User": 2, + "AccessToken": 2, + "Client": 3 + }, + "models": { + "User": { + "1": "{\"password\":\"$2a$10$af5k9noiG1GqxxTE9tyO4OJg/Bx1BZYm3d0sRf1gNlC57k9AK5ApK\",\"email\":\"admin@admin.com\",\"id\":1}" + }, + "AccessToken": { + "NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue": "{\"id\":\"NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue\",\"ttl\":1209600,\"created\":\"2016-11-21T11:06:11.113Z\",\"userId\":1}" + }, + "Client": { + "1": "{\"name\":\"Cliente1 SL\",\"salesPerson\":1,\"fi\":\"123456789\",\"alias\":\"Cliente1\",\"dischargeDate\":\"29/11/2016\",\"contact\":\"a@a.com\",\"phone\":\"123456789\",\"quality\":\"1\",\"id\":1}", + "2": "{\"name\":\"Cliente2 SL\",\"salesPerson\":1,\"fi\":\"123456788\",\"alias\":\"Cliente2\",\"contact\":\"b@b.com\",\"phone\":\"222222222\",\"quality\":\"1\",\"id\":2}" + } + } +} \ No newline at end of file diff --git a/dev.cmd b/dev.cmd index c0cb57543..5c37499c2 100644 --- a/dev.cmd +++ b/dev.cmd @@ -14,6 +14,7 @@ goto caseUsage echo "################################ Starting services" call forever start forever.json call forever list + call mkdir "%nginxPrefix%\temp" call start /b nginx -c "%nginxConf%" -p "%nginxPrefix%" cd @salix gulp diff --git a/services/nginx/logs/error.log b/services/nginx/logs/error.log new file mode 100644 index 000000000..e69de29bb diff --git a/services/salix/client/index.ejs b/services/salix/client/index.ejs index 9881a4421..b26d25ee9 100644 --- a/services/salix/client/index.ejs +++ b/services/salix/client/index.ejs @@ -6,7 +6,7 @@ - +