This commit is contained in:
Juan Ferrer Toribio 2016-12-14 09:30:46 +01:00
commit ae70f9b509
48 changed files with 244 additions and 186 deletions

View File

@ -14,5 +14,5 @@ export const bootstrap = () => {
throw new Error("element is not defined");
}
ng.bootstrap(_element, [SALIX]);
};

View File

@ -1,5 +1,5 @@
<vn-horizontal>
<ul style="list-style-type: none; margin: 0; padding: 0; width: 100%; color: #666;">
<vn-menu-item ng-repeat="item in $ctrl.items" item = "item"></vn-menu-item>
<vn-menu-item ng-repeat="item in action.items" item = "item"></vn-menu-item>
</ul>
</vn-horizontal>

View File

@ -4,6 +4,7 @@ import {module} from '../../module';
export const NAME = 'vnActions';
export const COMPONENT = {
template: template,
controllerAs: "action",
bindings: {
items: '<'
}

View File

@ -1,3 +1,3 @@
<vn-vertical>
<vn-actions items = "$ctrl.items"></vn-actions>
<vn-actions items = "menu.items"></vn-actions>
</vn-vertical>

View File

@ -5,6 +5,7 @@ import {module} from '../../module';
export const NAME = "vnLeftMenu";
export const COMPONENT = {
template: template,
controllerAs: "menu",
bindings: {
items: '<'
}

View File

@ -1,7 +1,7 @@
<li>
<a ui-sref="{{$ctrl.item.href}}" style="display: block; text-decoration: none; color: inherit; padding: .5em 2em;">
<a ui-sref="{{menu.item.href}}" style="display: block; text-decoration: none; color: inherit; padding: .5em 2em;">
<i class="material-icons" style="float: right; margin-left: .4em;">keyboard_arrow_right</i>
<i class="material-icons" style="vertical-align: middle; margin-right: .4em;">{{$ctrl.item.icon}}</i>
<span>{{$ctrl.item.description}}</span>
<i class="material-icons" style="vertical-align: middle; margin-right: .4em;">{{menu.item.icon}}</i>
<span>{{menu.item.description}}</span>
</a>
</li>

View File

@ -4,6 +4,7 @@ import {module} from '../../module';
export const NAME = 'vnMenuItem';
export const COMPONENT = {
template: template,
controllerAs: "menu",
bindings: {
item: '<'
}

View File

@ -1,5 +1,5 @@
<div style="position: fixed; top: 0; right: 0; padding: .8em 1.5em; color: white; z-index: 10;">
<i class="material-icons" title="Logout" ng-click="$ctrl.onLogoutClick()">exit_to_app</i>
<i class="material-icons" title="Logout" ng-click="mainMenu.onLogoutClick()">exit_to_app</i>
<i class="material-icons" id="apps" style="cursor: pointer;">apps</i>
<i class="material-icons" title="Notifications">notifications</i>
<i class="material-icons" title="Profile" style="font-size: 35px;">account_circle</i>

View File

@ -5,6 +5,7 @@ import {module} from '../../module';
export const NAME = 'vnMainMenu';
export const COMPONENT = {
template: template,
controllerAs: "mainMenu",
controller: function ()
{
this.onLogoutClick = function ()

View File

@ -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);

View File

@ -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></${route.component}>`,
template: `<${route.component} full-height ${getParams(route)}></${route.component}>`,
resolve: {
loader: loader(module)
}
})
loader: loader(module)
}
});
});
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -5,7 +5,7 @@
<vn-auto>Consignee</vn-auto>
<vn-empty style="width: 7em;">Enabled</vn-empty>
</vn-horizontal>
<vn-horizontal ng-repeat="i in $ctrl.addresses" class="pad-medium-top" style="align-items: center;">
<vn-horizontal ng-repeat="i in address.addresses" class="pad-medium-top" style="align-items: center;">
<vn-empty style="width: 7em; text-align: center;">
<input type="radio" name="default"/>
</vn-empty>

View File

@ -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);

View File

@ -1,20 +1,20 @@
<form ng-submit="$ctrl.submit()" pad-large>
<form ng-submit="basicData.submit()" pad-large>
<vn-title>Datos básicos</vn-title>
<vn-horizontal>
<vn-textfield vn-one label="Alias" name="alias" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" name="fi" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Alias" name="alias" model="basicData.client"></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" name="fi" model="basicData.client"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield autofocus vn-one label="Razón social" name="socialName" model="$ctrl.model"></vn-textfield>
<vn-date-picker vn-one label="Fecha alta" name="dischargeDate" model="$ctrl.model"></vn-date-picker>
<vn-textfield autofocus vn-one label="Razón social" name="socialName" model="basicData.client"></vn-textfield>
<vn-date-picker vn-one label="Fecha alta" name="dischargeDate" model="basicData.client"></vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Contacto" name="contact" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Teléfono" name="telefono" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Contacto" name="contact" model="basicData.client"></vn-textfield>
<vn-textfield vn-one label="Teléfono" name="telefono" model="basicData.client"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Calidad" name="quality" model="$ctrl.model"></vn-textfield>
<vn-combo vn-one label="Comercial" name="salesPerson" model="$ctrl.model">
<vn-textfield vn-one label="Calidad" name="quality" model="basicData.client"></vn-textfield>
<vn-combo vn-one label="Comercial" name="salesPerson" model="basicData.client">
<option value="1">Comercial 1</option>
<option value="2">Comercial 2</option>
</vn-combo>

View File

@ -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(

View File

@ -2,10 +2,10 @@
<vn-topbar></vn-topbar>
<vn-horizontal class="full-height">
<vn-empty class="bg-content" style="width: 18em">
<vn-descriptor descriptor = "$ctrl.descriptor"></vn-descriptor>
<vn-left-menu items="$ctrl.items"></vn-left-menu>
<vn-descriptor descriptor = "card.descriptor"></vn-descriptor>
<vn-left-menu items="card.items"></vn-left-menu>
</vn-empty>
<vn-auto>
<vn-auto >
<vn-vertical ui-view></vn-vertical>
</vn-auto>
</vn-horizontal>

View File

@ -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'];

View File

@ -3,9 +3,9 @@
<i class="material-icons" style="font-size:60px;">person</i>
</vn-one>
<vn-vertical>
<vn-one class="margin-right: .4em;" class="margin-none">{{$ctrl.descriptor.clientId}}</vn-one>
<vn-one class="margin-none">{{$ctrl.descriptor.name}}</vn-one>
<vn-one class="margin-none">{{$ctrl.descriptor.phone}}</vn-one>
<vn-one class="margin-right: .4em;" class="margin-none">{{descriptor.descriptor.clientId}}</vn-one>
<vn-one class="margin-none">{{descriptor.descriptor.name}}</vn-one>
<vn-one class="margin-none">{{descriptor.descriptor.phone}}</vn-one>
</vn-vertical>
</vn-horizontal>

View File

@ -4,6 +4,7 @@ import {module} from '../../module';
export const NAME = 'vnDescriptor';
export const COMPONENT = {
template: template,
controllerAs: 'descriptor',
bindings: {
descriptor: '<'
}

View File

@ -1,47 +1,47 @@
<form ng-submit="frm.isValid && $ctrl.submit()" pad-large>
<form ng-submit="frm.isValid && fiscal.submit()" pad-large>
<vn-title>Datos fiscales y de facturación</vn-title>
<vn-horizontal>
<vn-check vn-one label="Cliente Activo" name="active" model="$ctrl.model"></vn-check>
<vn-check vn-one label="Facturar" name="invoice" model="$ctrl.model"></vn-check>
<vn-check vn-one label="Factura Impresa" name="mailInvoice" model="$ctrl.model"></vn-check>
<vn-check vn-one label="Cliente Activo" name="active" model="fiscal.model"></vn-check>
<vn-check vn-one label="Facturar" name="invoice" model="fiscal.model"></vn-check>
<vn-check vn-one label="Factura Impresa" name="mailInvoice" model="fiscal.model"></vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-two label="Domicilio Fiscal" name="consignee" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Municipio" name="city" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-two label="Domicilio Fiscal" name="consignee" model="fiscal.model"></vn-textfield>
<vn-textfield vn-one label="Municipio" name="city" model="fiscal.model"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Codigo Postal" name="postcode" model="$ctrl.model"></vn-textfield>
<vn-combo vn-one label="Provincia" name="province" model="$ctrl.model"></vn-combo>
<vn-combo vn-one label="Pais" name="country" model="$ctrl.model">
<vn-textfield vn-one label="Codigo Postal" name="postcode" model="fiscal.model"></vn-textfield>
<vn-combo vn-one label="Provincia" name="province" model="fiscal.model"></vn-combo>
<vn-combo vn-one label="Pais" name="country" model="fiscal.model">
<option value="1">Comercial 1</option>
<option value="2">Comercial 2</option>
</vn-combo>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Telefono Fijo" name="phone" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Telefono Movil" name="mobile" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Email" name="email" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Telefono Fijo" name="phone" model="fiscal.model"></vn-textfield>
<vn-textfield vn-one label="Telefono Movil" name="mobile" model="fiscal.model"></vn-textfield>
<vn-textfield vn-one label="Email" name="email" model="fiscal.model"></vn-textfield>
</vn-horizontal>
<hr class="border-dashed-top"/>
<h5 vn-one style="margin-top: 0;">Información de facturación</h5>
<vn-horizontal>
<vn-combo vn-two label="Forma de Pago" name="payMethod" model="$ctrl.model"></vn-combo>
<vn-textfield vn-one label="Vencimiento" name="expiration" model="$ctrl.model"></vn-textfield>
<vn-check vn-three label="Recargo de equivalencia" name="er" model="$ctrl.model"></vn-check>
<vn-combo vn-two label="Forma de Pago" name="payMethod" model="fiscal.model"></vn-combo>
<vn-textfield vn-one label="Vencimiento" name="expiration" model="fiscal.model"></vn-textfield>
<vn-check vn-three label="Recargo de equivalencia" name="er" model="fiscal.model"></vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Credito" name="credit" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="CyC" name="cyc" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="IAE" name="iae" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-three label="iban" name="iban" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Credito" name="credit" model="fiscal.model"></vn-textfield>
<vn-textfield vn-one label="CyC" name="cyc" model="fiscal.model"></vn-textfield>
<vn-textfield vn-one label="IAE" name="iae" model="fiscal.model"></vn-textfield>
<vn-textfield vn-three label="iban" name="iban" model="fiscal.model"></vn-textfield>
</vn-horizontal>
<hr class="border-dashed-top"/>
<h5 style="margin-top: 0;">Documentación</h5>
<vn-horizontal>
<vn-check vn-two label="Recibido core vnh" name="coreVnh" model="$ctrl.model"></vn-check>
<vn-check vn-two label="Recibido core vnl" name="coreVnl" model="$ctrl.model"></vn-check>
<vn-check vn-two label="Recibido B2B vnl" name="sepaVnl" model="$ctrl.model"></vn-check>
<vn-check vn-two label="Recibido core vnh" name="coreVnh" model="fiscal.model"></vn-check>
<vn-check vn-two label="Recibido core vnl" name="coreVnl" model="fiscal.model"></vn-check>
<vn-check vn-two label="Recibido B2B vnl" name="sepaVnl" model="fiscal.model"></vn-check>
</vn-horizontal>
<vn-empty class="margin-large-top">
<vn-submit text="Guardar"></vn-submit>

View File

@ -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(

View File

@ -9,7 +9,7 @@
<vn-horizontal>
<vn-three></vn-three>
<vn-vertical>
<vn-item-client ng-repeat="client in $ctrl.clients" client = "client" vn-six></vn-item-client>
<vn-item-client ng-repeat="client in search.clients" client = "client" vn-six></vn-item-client>
</vn-vertical>
<vn-three></vn-three>
</vn-horizontal>

View File

@ -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}};

View File

@ -1,12 +1,12 @@
<vn-auto style="border-radius: .5em;" >
<vn-horizontal style="align-items: center;">
<vn-auto>
<div><b>{{$ctrl.client.alias}}</b></div>
<div>{{$ctrl.client.name}}</div>
<div>{{$ctrl.client.phone}}, {{$ctrl.client.contact}}</div>
<div><b>{{itemClient.client.alias}}</b></div>
<div>{{itemClient.client.name}}</div>
<div>{{itemClient.client.phone}}, {{itemClient.client.contact}}</div>
</vn-auto>
<vn-empty>
<a ui-sref="clientCard.basicData({ id: {{$ctrl.client.id}} })"><vn-icon-button icon="edit" ></vn-icon-button></a>
<a ui-sref="clientCard.basicData({ id: {{itemClient.client.id}} })"><vn-icon-button icon="edit" ></vn-icon-button></a>
</vn-empty>
</vn-horizontal>
</vn-auto>

View File

@ -4,6 +4,7 @@ import {module} from '../../module';
export const NAME = 'vnItemClient';
export const COMPONENT = {
template: template,
controllerAs: 'itemClient',
bindings: {
client: '<'
}

View File

@ -1,5 +1,5 @@
<form ng-submit="$ctrl.submit()" pad-large>
<form ng-submit="note.submit()" pad-large>
<vn-title>Notas</vn-title>
<vn-textfield label="Notas" class="padd-medium-top" name="notes" model="$ctrl.model"></vn-textfield>
<vn-textfield label="Notas" class="padd-medium-top" name="notes" model="note.model"></vn-textfield>
<vn-submit text="Guardar"></vn-submit>
</form>

View File

@ -3,6 +3,7 @@ import {module} from '../../module';
export const NAME = 'vnClientNotes';
export const COMPONENT = {
controllerAs: 'note',
template: template
};
module.component(NAME, COMPONENT);

View File

@ -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"
},{

View File

@ -1,22 +1,22 @@
<div class="mdl-menu mdl-js-menu mdl-menu--bottom-left user-menu" pad-medium for="searchbar" style="width:600px">
<form ng-submit="$ctrl.submit()" pad-large>
<form ng-submit="search.submit()" pad-large>
<vn-horizontal>
<vn-textfield vn-one label="Id Cliente" name="id" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" name="fi" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Id Cliente" name="id" model="search.model"></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" name="fi" model="search.model"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Alias" name="alias" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Alias" name="alias" model="search.model"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-two label="Razon Social" name="name" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-two label="Razon Social" name="name" model="search.model"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Población" name="city" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Código Postal" name="postcode" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Población" name="city" model="search.model"></vn-textfield>
<vn-textfield vn-one label="Código Postal" name="postcode" model="search.model"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Email" name="email" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Teléfono" name="phone" model="$ctrl.model"></vn-textfield>
<vn-textfield vn-one label="Email" name="email" model="search.model"></vn-textfield>
<vn-textfield vn-one label="Teléfono" name="phone" model="search.model"></vn-textfield>
</vn-horizontal>
<vn-submit label="">
<i class="material-icons">add_shopping_cart</i>Add to shopping cart

View File

@ -3,6 +3,7 @@ import {module} from '../../module';
export const NAME = "vnSearchPanel";
export const COMPONENT = {
controllerAs: 'search',
template: template
};
module.component(NAME, COMPONENT);

View File

@ -1,6 +1,6 @@
<form ng-submit="$ctrl.submit()" pad-large>
<form ng-submit="web.submit()" pad-large>
<vn-title>Acceso Web</vn-title>
<vn-check label="Acceso web activo" name="active" model="$ctrl.model"></vn-check>
<vn-textfield label="Usuario" class="padd-medium-top" name="user" model="$ctrl.model"></vn-textfield>
<vn-check label="Acceso web activo" name="active" model="web.model"></vn-check>
<vn-textfield label="Usuario" class="padd-medium-top" name="user" model="web.model"></vn-textfield>
<vn-submit text="Guardar"></vn-submit>
</form>

View File

@ -3,6 +3,7 @@ import {module} from '../../module';
export const NAME = 'vnClientWebAccess';
export const COMPONENT = {
controllerAs: 'web',
template: template
};
module.component(NAME, COMPONENT);

View File

@ -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;

19
db.json Normal file
View File

@ -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}"
}
}
}

View File

@ -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

View File

View File

@ -6,7 +6,7 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<vn-vertical id="app" class="full-height">
<vn-vertical id="app" class="full-height" >
<vn-main-menu></vn-main-menu>
<vn-vertical ui-view scrollable></vn-vertical>
</vn-vertical>