merge index.html

This commit is contained in:
Javi Gallego 2017-01-17 13:06:08 +01:00
commit b469b52ba1
19 changed files with 168 additions and 117 deletions

View File

@ -9,7 +9,7 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return {
require: 'E',
restrict: 'E',
transclude: true,
template: function(_, attr) {
return resolve.getTemplate(_NAME, attr);

View File

@ -48,6 +48,8 @@ export {NAME as CARD, directive as CardDirective} from './card/card';
export {NAME as CARD_MDL, factory as cardMdl} from './card/card.mdl';
export {NAME as SWITCH, directive as SwitchDirective} from './switch/switch';
export {NAME as SWITCH_MDL, factory as switchdMdl} from './switch/switch.mdl';
export {NAME as FLOATBUTTON, directive as FloatButtonDirective} from './floatbutton/floatbutton';
export {NAME as FLOATBUTTON_MDL, factory as floatButtondMdl} from './floatbutton/floatbutton.mdl';
export {directive as Icon} from './icon/icon';
export {factory as IconMdl} from './icon/icon.mdl';

View File

@ -0,0 +1,19 @@
import {module as _module} from '../module';
import * as resolveFactory from '../resolveDefaultComponents';
import * as util from '../util';
const _NAME = 'floatButton';
export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return {
restrict: 'E',
template: function(_, attr) {
return resolve.getTemplate(_NAME, attr);
}
};
}
_module.directive(NAME, directive);

View File

@ -0,0 +1,3 @@
<button class="*[className]*">
<vn-icon icon="*[icon]*"></vn-icon>
</button>

View File

@ -0,0 +1,20 @@
import {module as _module} from '../module';
import * as util from '../util';
import * as constant from '../constants';
import template from './floatbutton.mdl.html';
const _NAME = 'floatButton';
const DEFAULT_CLASS = 'mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored';
export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK);
export function factory() {
return {
template: template,
default: {
className: DEFAULT_CLASS
}
};
}
_module.factory(NAME, factory);

View File

@ -1,3 +1,3 @@
<button class="mdl-button mdl-js-button mdl-button--raised *[className]*" *[enabled]*>
<vn-icon icon="*[icon]*"></vn-icon>*[label]*
<button display-block class="mdl-button mdl-js-button mdl-button--raised *[className]*" *[enabled]*>
<vn-icon display-block icon="*[icon]*"></vn-icon>*[label]*
</button>

View File

@ -1 +1 @@
<i class="material-icons">*[icon]*</i>
<i display-block class="material-icons">*[icon]*</i>

View File

@ -28,3 +28,8 @@
.mdl-button--raised:hover {
background-color: #ffa410;
}
.mdl-button--fab{
color: white !important;
background-color: #ff9400 !important;
}

View File

@ -23,9 +23,9 @@
<option ng-repeat="a in addressData.agencies | orderBy:'name'" value="{{a.id}}">{{a.name}}</ng-repeat>
</vn-combo>
</vn-horizontal>
<vn-empty>
<vn-submit label="Guardar" id="save"></vn-submit>
</vn-empty>
</vn-vertical>
</vn-card>
<vn-empty margin-small-top >
<vn-submit label="Guardar" id="save"></vn-submit>
</vn-empty>
</form>

View File

@ -5,7 +5,7 @@ export const NAME = 'vnClientAddressesDataCreate';
export const COMPONENT = {
template: template,
controllerAs: 'addressData',
controller: function($http)
controller: function($http, $state)
{
this.address = {};
$http.get('/client/api/Agencies').then(
@ -16,10 +16,12 @@ export const COMPONENT = {
);
this.submit = function(){
$http.post('/client/api/Addresses', this.address);
}
$http.post('/client/api/Addresses', this.address).then(
json => $state.go('clientCard.addresses')
);
};
}
}
COMPONENT.controller.$inject = ['$http'];
COMPONENT.controller.$inject = ['$http', '$state'];
module.component(NAME, COMPONENT);

View File

@ -24,9 +24,9 @@
<option ng-repeat="a in addressData.agencies | orderBy:'name'" value="{{a.id}}">{{a.name}}</ng-repeat>
</vn-combo>
</vn-horizontal>
<vn-empty margin-large-top>
<vn-submit label="Guardar" id="save"></vn-submit>
</vn-empty>
</vn-vertical>
</vn-card>
<vn-empty margin-small-top>
<vn-submit label="Guardar" id="save"></vn-submit>
</vn-empty>
</form>

View File

@ -17,11 +17,9 @@
</vn-horizontal>
</vn-auto>
</vn-horizontal>
<vn-horizontal margin-large-top>
<vn-one>
<a ui-sref="clientCard.addressDataCreate"><vn-button label="Nuevo"></vn-button></a>
</vn-one>
</vn-horizontal>
</vn-vertical>
</vn-card>
<vn-one margin-large-top style="position: fixed; bottom: 2em; right: 2em;">
<a ui-sref="clientCard.addressDataCreate"><vn-float-button icon="add"></vn-float-button></a>
</vn-one>
</vn-vertical>

View File

@ -9,15 +9,16 @@
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Teléfono" field="basicData.client.phone"></vn-textfield>
<vn-textfield vn-one label="Móvil" field="basicData.client.mobile"></vn-textfield>
<vn-textfield vn-one label="Fax" field="basicData.client.fax"></vn-textfield>
<vn-textfield vn-one label="Email" field="basicData.client.email"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Email" field="basicData.client.email"></vn-textfield>
<vn-combo vn-one label="Comercial" field="basicData.client.salesPerson">
<option value=""></option>
<option ng-repeat="p in basicData.sales" value="{{p.id}}">{{p.name}}</ng-repeat>
</vn-combo>
<vn-two></vn-two>
<vn-one></vn-one>
</vn-horizontal>
</vn-vertical>

View File

@ -1,5 +1,6 @@
<vn-vertical full-height style="max-width: 85em; margin: 0 auto;">
<vn-horizontal full-height>
<vn-vertical full-height >
<vn-horizontal>
<vn-horizontal full-height vn-eleven>
<vn-empty pad-medium-left style="min-width: 18em;">
<vn-descriptor client="card.client" class="display-block" ></vn-descriptor>
<vn-left-menu items="card.items"></vn-left-menu>
@ -8,4 +9,6 @@
<vn-vertical ui-view></vn-vertical>
</vn-auto>
</vn-horizontal>
<vn-one></vn-one>
</vn-horizontal>
</vn-vertical>

View File

@ -5,7 +5,7 @@
<i class="material-icons descriptor-icon">person</i>
</vn-one>
<vn-vertical vn-two>
<div class="margin-none">{{descriptor.client.clientId}}</div>
<div class="margin-none">{{descriptor.client.id}}</div>
<div class="margin-none">{{descriptor.client.name}}</div>
<div class="margin-none">{{descriptor.client.phone}}</div>
</vn-vertical>

View File

@ -4,7 +4,6 @@
<vn-vertical pad-large>
<vn-title>Datos fiscales y de facturación</vn-title>
<vn-horizontal>
<vn-check vn-one label="Cliente activo" field="fiscal.client.active"></vn-check>
<vn-check vn-one label="Facturar" field="fiscal.client.hasToInvoice"></vn-check>
<vn-check vn-one label="Factura impresa" field="invoiceByEmail"></vn-check>
</vn-horizontal>
@ -21,11 +20,6 @@
<option ng-repeat="c in fiscal.countries | orderBy:'name'" value="{{c.id}}">{{c.name}}</option>
</vn-combo>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Teléfono Fijo" field="fiscal.client.phone"></vn-textfield>
<vn-textfield vn-one label="Teléfono Movil" field="fiscal.client.mobile"></vn-textfield>
<vn-textfield vn-one label="Correo electrónico" field="fiscal.client.email"></vn-textfield>
</vn-horizontal>
</vn-vertical>
</vn-card>
<vn-card margin-small-bottom>
@ -56,8 +50,8 @@
</vn-horizontal>
</vn-vertical>
</vn-card>
</form>
<vn-vertical>
<vn-submit label="Guardar"></vn-submit>
</vn-vertical>
<vn-dialog-confirm object="fiscal.client" object-old="fiscal.clientOld" state="fiscal.state"></vn-dialog-confirm>
</form>

View File

@ -7,7 +7,8 @@ vn-item-client a {
color: inherit;
}
vn-item-client a:hover {
background-color: rgba(0, 0, 0, .1);
color: white;
background-color: #424242;
}
.vn-item-client-name{

View File

@ -43,6 +43,9 @@
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"fax": {
"type": "string"
},