Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Daniel Herrero 2017-11-22 13:10:40 +01:00
commit bd5e2a5d91
27 changed files with 285 additions and 299 deletions

View File

@ -27,13 +27,13 @@
</vn-horizontal> </vn-horizontal>
<vn-horizontal margin-medium-bottom> <vn-horizontal margin-medium-bottom>
<vn-one> <vn-one>
<vn-check label="Recibido core VNH" field="$ctrl.client.coreVnh" vn-acl="administrative"></vn-check> <vn-check label="Recibido core VNH" field="$ctrl.client.hasCoreVnh" vn-acl="administrative"></vn-check>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-check label="Recibido core VNL" field="$ctrl.client.coreVnl" vn-acl="administrative"></vn-check> <vn-check label="Recibido core VNL" field="$ctrl.client.hasCoreVnl" vn-acl="administrative"></vn-check>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-check label="Recibido B2B VNL" field="$ctrl.client.sepaVnl" vn-acl="administrative"></vn-check> <vn-check label="Recibido B2B VNL" field="$ctrl.client.hasSepaVnl" vn-acl="administrative"></vn-check>
</vn-one> </vn-one>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>

View File

@ -1,3 +1,3 @@
vn-descriptor { vn-descriptor {
font-family: raleway-bold; font-family: vn-font-bold;
} }

View File

@ -8,7 +8,6 @@
<div class="margin-none">{{::$ctrl.client.id}}</div> <div class="margin-none">{{::$ctrl.client.id}}</div>
<div class="margin-none">{{$ctrl.client.name}}</div> <div class="margin-none">{{$ctrl.client.name}}</div>
<div class="margin-none">{{$ctrl.client.phone}}</div> <div class="margin-none">{{$ctrl.client.phone}}</div>
<vn-switch label="Activo" model="$ctrl.active"></vn-switch>
</vn-vertical> </vn-vertical>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>

View File

@ -12,6 +12,7 @@
<vn-horizontal> <vn-horizontal>
<vn-textfield autofocus vn-two label="Social name" field="$ctrl.client.socialName" vn-acl="administrative"></vn-textfield> <vn-textfield autofocus vn-two label="Social name" field="$ctrl.client.socialName" vn-acl="administrative"></vn-textfield>
<vn-textfield vn-one label="Tax number" field="$ctrl.client.fi" vn-acl="administrative"></vn-textfield> <vn-textfield vn-one label="Tax number" field="$ctrl.client.fi" vn-acl="administrative"></vn-textfield>
<vn-check vn-one label="Equalization tax" field="$ctrl.client.isEqualizated" vn-acl="administrative"></vn-check>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-two label="Street" field="$ctrl.client.street" vn-focus vn-acl="administrative"></vn-textfield> <vn-textfield vn-two label="Street" field="$ctrl.client.street" vn-focus vn-acl="administrative"></vn-textfield>
@ -42,25 +43,26 @@
</vn-horizontal> </vn-horizontal>
<vn-horizontal margin-small-bottom> <vn-horizontal margin-small-bottom>
<vn-one> <vn-one>
<vn-check label="Equalization tax" field="$ctrl.client.equalizationTax" vn-acl="administrative"></vn-check> <vn-check label="Active" field="$ctrl.client.isActive" vn-acl="administrative"></vn-check>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-check label="Invoice by address" field="$ctrl.client.hasToInvoiceByAddress" vn-acl="administrative"></vn-check> <vn-check label="Invoice by address" field="$ctrl.client.hasToInvoiceByAddress" vn-acl="administrative"></vn-check>
</vn-one> </vn-one>
<vn-one></vn-one> <vn-one>
<vn-check label="Datos comprobados" field="$ctrl.client.isTaxDataChecked" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-check label="Has to invoice" field="$ctrl.client.hasToInvoice" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check vn-one label="Invoice by mail" field="$ctrl.client.invoiceByEmail" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check vn-one label="Vies" field="$ctrl.client.isVies" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal> </vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-check label="Has to invoice" field="$ctrl.client.hasToInvoice" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Invoice by mail" field="$ctrl.client.invoiceByEmail" vn-acl="administrative"></vn-check>
</vn-one>
<vn-one>
<vn-check label="Vies" field="$ctrl.client.vies" vn-acl="administrative"></vn-check>
</vn-one>
</vn-horizontal>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
@ -70,13 +72,13 @@
</vn-button-bar> </vn-button-bar>
</form> </form>
<vn-dialog <vn-dialog
vn-id="propagate-equalizationTax" vn-id="propagate-isEqualizated"
on-response="$ctrl.returnDialogEt(response)" on-response="$ctrl.returnDialogEt(response)"
> >
<tpl-body> <tpl-body>
<vn-vertical> <vn-vertical>
<vn-one text-center translate>You changes the equivalent tax</vn-one> <vn-one text-center translate>You changes the equivalen
<vn-one text-center translate>Do you want to spread the change to their consignees?</vn-one> <vn-one text-center translate>Do you want to spread the change to their consig
</vn-vertical> </vn-vertical>
</tpl-body> </tpl-body>
<tpl-buttons> <tpl-buttons>

View File

@ -6,7 +6,7 @@ export default class ClientFiscalData {
this.$http = $http; this.$http = $http;
this.vnApp = vnApp; this.vnApp = vnApp;
this.translate = $translate; this.translate = $translate;
this.equalizationTax = undefined; this.isEqualizated = undefined;
this.copyData(); this.copyData();
} }
@ -16,7 +16,7 @@ export default class ClientFiscalData {
copyData() { copyData() {
if (this.client) { if (this.client) {
this.equalizationTax = this.client.equalizationTax; this.isEqualizated = this.client.isEqualizated;
} }
} }
@ -26,16 +26,16 @@ export default class ClientFiscalData {
} }
checkEtChanges() { checkEtChanges() {
let equals = this.equalizationTax == this.client.equalizationTax; let equals = this.isEqualizated == this.client.isEqualizated;
this.equalizationTax = this.client.equalizationTax; this.isEqualizated = this.client.isEqualizated;
if (!equals) if (!equals)
this.$.propagateEqualizationTax.show(); this.$.propagateIsEqualizated.show();
} }
returnDialogEt(response) { returnDialogEt(response) {
if (response === 'ACCEPT') { if (response === 'ACCEPT') {
this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.equalizationTax}).then( this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.isEqualizated}).then(
res => { res => {
if (res.data) if (res.data)
this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded')); this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded'));

View File

@ -12,5 +12,5 @@ vn-item-client a:hover {
} }
.vn-item-client-name { .vn-item-client-name {
font-family: raleway-bold; font-family: vn-font-bold;
} }

View File

@ -1,4 +1,5 @@
{ {
"Active": "Activo",
"Client": "Cliente", "Client": "Cliente",
"Clients": "Clientes", "Clients": "Clientes",
"Fiscal data": "Datos Fiscales", "Fiscal data": "Datos Fiscales",

View File

@ -18,7 +18,7 @@ ul.vn-autocomplete {
} }
&.load-more { &.load-more {
color: #ffa410; color: #ffa410;
font-weight: bold; font-family: vn-font-bold;
padding: .4em .8em; padding: .4em .8em;
} }
} }

View File

@ -1,5 +1,5 @@
vn-confirm .dialog-title { vn-confirm .dialog-title {
color:#424242; color:#424242;
font-family: raleway-bold; font-family: vn-font-bold;
} }

View File

@ -1,68 +1,68 @@
.vn-dialog { .vn-dialog {
display: none; display: none;
z-index: 100; z-index: 100;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(1,1,1,.4); background-color: rgba(1,1,1,.4);
button.close { button.close {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
border-style: none; border-style: none;
background-color: transparent; background-color: transparent;
padding: .3em; padding: .3em;
cursor: pointer; cursor: pointer;
vn-icon { vn-icon {
display: block; display: block;
i { i {
display: block; display: block;
} }
} }
&:hover { &:hover {
background-color: rgba(0, 0, 0, .1); background-color: rgba(0, 0, 0, .1);
} }
} }
& > div { & > div {
position: relative; position: relative;
box-shadow: 0 0 .4em rgba(1,1,1,.4); box-shadow: 0 0 .4em rgba(1,1,1,.4);
background-color: white; background-color: white;
border-radius: .2em; border-radius: .2em;
overflow: auto; overflow: auto;
top: 50%; top: 50%;
left: 50%; left: 50%;
padding: 2em; padding: 2em;
box-sizing: border-box; box-sizing: border-box;
width: 28em; width: 28em;
margin-top: -10em; margin-top: -10em;
margin-left: -14em; margin-left: -14em;
} }
.button-bar { .button-bar {
margin-top: 1.5em; margin-top: 1.5em;
text-align: right; text-align: right;
button { button {
background: none; background: none;
border: none; border: none;
text-transform: uppercase; text-transform: uppercase;
font-size: 1.1em; font-size: 1.1em;
color: #ffa410; color: #ffa410;
font-weight: bold; font-family: vn-font-bold;
cursor: pointer; cursor: pointer;
padding: .5em; padding: .5em;
margin: -0.5em; margin: -0.5em;
margin-left: .5em; margin-left: .5em;
&:hover { &:hover {
background-color: rgba(1,1,1,.1); background-color: rgba(1,1,1,.1);
} }
} }
} }
} }

View File

@ -1,60 +1,60 @@
/** /**
* Rewrited CSS rules from Material Design Lite. * Rewrited CSS rules from Material Design Lite.
* TODO: don't use !important * TODO: don't use !important
*/ */
.mdl-textfield { .mdl-textfield {
width: 100%; width: 100%;
} }
.mdl-button { .mdl-button {
font-weight: bolder; font-weight: bolder;
color: #ffa410; color: #ffa410;
} }
.mdl-button--colored { .mdl-button--colored {
color: white !important; color: white !important;
} }
.mdl-button--colored, .mdl-button--colored,
.mdl-button--colored:focus, .mdl-button--colored:focus,
.mdl-button--colored:active { .mdl-button--colored:active {
background-color: #ffa410 !important; background-color: #ffa410 !important;
} }
.mdl-button--colored:hover, .mdl-button--colored:hover,
.mdl-button--raised:hover { .mdl-button--raised:hover {
background-color: #ffa410 !important; background-color: #ffa410 !important;
} }
.mdl-button--fab{ .mdl-button--fab{
color: white !important; color: white !important;
background-color: #ff9400 !important; background-color: #ff9400 !important;
} }
.mdl-dialog__actions--full-width>*{ .mdl-dialog__actions--full-width>*{
text-align: center; text-align: center;
} }
.mdl-dialog{ .mdl-dialog{
width: 400px; width: 400px;
font-family: raleway-regular; font-family: vn-font;
line-height:60px; line-height:60px;
text-align: center; text-align: center;
} }
.mdl-textfield__error { .mdl-textfield__error {
visibility: visible; visibility: visible;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 100%; width: 100%;
} }
.mdl-textfield.invalid .mdl-textfield__input { .mdl-textfield.invalid .mdl-textfield__input {
border-color: #d50000; border-color: #d50000;
box-shadow: none; box-shadow: none;
} }
.mdl-textfield.invalid .mdl-textfield__label::after { .mdl-textfield.invalid .mdl-textfield__label::after {
background-color: #d50000; background-color: #d50000;
} }
.mdl-textfield--floating-label.invalid .mdl-textfield__label { .mdl-textfield--floating-label.invalid .mdl-textfield__label {
color: #d50000; color: #d50000;
font-size: 12px; font-size: 12px;
top: 4px; top: 4px;
} }

View File

@ -24,9 +24,9 @@
} }
.popover-label { .popover-label {
font-weight: bold; font-family: vn-font-bold;
color: black; color: black;
padding-top:5px; padding-top:5px;
} }
/* Icon cuadrado */ /* Icon cuadrado */

View File

@ -1,21 +1,12 @@
@font-face { @font-face {
font-family: raleway-italic; font-family: vn-font-medium;
src: url(./fonts/Raleway-Italic.ttf); src: url(./fonts/Roboto-Medium.ttf);
} }
@font-face { @font-face {
font-family: raleway-thin; font-family: vn-font;
src: url(./fonts/Raleway-Thin.ttf); src: url(./fonts/Roboto.ttf);
} }
@font-face { @font-face {
font-family: raleway-regular; font-family: vn-font-bold;
src: url(./fonts/Raleway-Regular.ttf); src: url(./fonts/Roboto-Bold.ttf);
} }
@font-face {
font-family: raleway-bold;
src: url(./fonts/Raleway-Bold.ttf);
}
@font-face {
font-family: raleway-semi-bold;
src: url(./fonts/Raleway-SemiBold.ttf);
}

View File

@ -1,12 +1,12 @@
@import "colors"; @import "colors";
@import "font-family"; @import "font-family";
$font-color: $color-dark-grey; $font-color: $color-dark-grey;
body { body {
color: $font-color; color: $font-color;
font-family: raleway-regular; font-family: vn-font;
} }
html [uppercase], .uppercase { html [uppercase], .uppercase {
text-transform: uppercase; text-transform: uppercase;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -64,7 +64,7 @@ html [vn-center], .vn-center{
.tooltip { .tooltip {
.list-header{ .list-header{
border-bottom: 3px solid $color-medium-grey; border-bottom: 3px solid $color-medium-grey;
font-weight: bold; font-family: vn-font-bold;
text-align: center text-align: center
} }
.list-element{ .list-element{
@ -72,7 +72,7 @@ html [vn-center], .vn-center{
} }
} }
.list-footer{ .list-footer{
font-weight: bold; font-family: vn-font-bold;
border-top: 3px solid $color-medium-grey; border-top: 3px solid $color-medium-grey;
} }
.list-element.warning{ .list-element.warning{

View File

@ -1,25 +1,25 @@
h1 { h1 {
font-size: 32pt; font-size: 32pt;
} }
h2 { h2 {
font-size: 28pt; font-size: 28pt;
} }
h3 { h3 {
font-size: 24pt; font-size: 24pt;
} }
h4 { h4 {
font-size: 20pt; font-size: 20pt;
} }
h5 { h5 {
font-size: 16pt; font-size: 16pt;
} }
h6 { h6 {
font-size: 12pt; font-size: 12pt;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
padding: 0; padding: 0;
margin: .4em 0; margin: .4em 0;
font-family: raleway-semi-bold; font-family: vn-font-bold;
} }

View File

@ -1,9 +1,9 @@
{ {
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -13,15 +13,15 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
} }
} }

View File

@ -1,6 +1,12 @@
{ {
"name": "Client", "name": "Client",
"base": "VnModel", "base": "VnModel",
"options": {
"mysql": {
"table": "client",
"database": "vn"
}
},
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",
@ -39,15 +45,9 @@
"mobile": { "mobile": {
"type": "string" "type": "string"
}, },
"fax": { "isActive": {
"type": "string"
},
"active": {
"type": "boolean" "type": "boolean"
}, },
"discount":{
"type": "Number"
},
"credit": { "credit": {
"type": "Number" "type": "Number"
}, },
@ -60,7 +60,7 @@
"dueDay": { "dueDay": {
"type": "Number" "type": "Number"
}, },
"equalizationTax": { "isEqualizated": {
"type": "boolean", "type": "boolean",
"description": "The client has equalization tax" "description": "The client has equalization tax"
}, },
@ -76,13 +76,16 @@
"type": "boolean", "type": "boolean",
"description": "Send invoices by email" "description": "Send invoices by email"
}, },
"sepaVnl": { "hasSepaVnl": {
"type": "boolean" "type": "boolean"
}, },
"coreVnl": { "hasCoreVnl": {
"type": "boolean" "type": "boolean"
}, },
"coreVnh": { "hasCoreVnh": {
"type": "boolean"
},
"isTaxDataChecked":{
"type": "boolean" "type": "boolean"
}, },
"eypbc": { "eypbc": {
@ -91,7 +94,7 @@
"quality": { "quality": {
"type": "Number" "type": "Number"
}, },
"vies": { "isVies": {
"type": "boolean" "type": "boolean"
}, },
"isRelevant": { "isRelevant": {

View File

@ -1,9 +1,9 @@
{ {
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -13,51 +13,51 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Client": { "Client": {
"dataSource": "vn" "dataSource": "vn"
}, },
"ClientCredit": { "ClientCredit": {
"dataSource": "vn" "dataSource": "salix"
}, },
"ClientCreditLimit": { "ClientCreditLimit": {
"dataSource": "vn" "dataSource": "salix"
}, },
"ClientObservation": { "ClientObservation": {
"dataSource": "vn" "dataSource": "salix"
}, },
"PayMethod": { "PayMethod": {
"dataSource": "vn" "dataSource": "salix"
}, },
"Address": { "Address": {
"dataSource": "vn" "dataSource": "salix"
}, },
"AgencyMode": { "AgencyMode": {
"dataSource": "vn" "dataSource": "salix"
}, },
"Province": { "Province": {
"dataSource": "vn" "dataSource": "salix"
}, },
"Country": { "Country": {
"dataSource": "vn" "dataSource": "salix"
}, },
"ContactChannel": { "ContactChannel": {
"dataSource": "vn" "dataSource": "salix"
}, },
"Employee": { "Employee": {
"dataSource": "vn" "dataSource": "salix"
}, },
"CreditClassification": { "CreditClassification": {
"dataSource": "vn" "dataSource": "salix"
} }
} }

View File

@ -1,22 +1,17 @@
{ {
"db": "vn": {
{
"name": "db",
"connector": "memory",
"file": "db.json"
},
"auth":
{
"name": "mysql", "name": "mysql",
"connector": "mysql", "connector": "mysql",
"database": "salix", "database": "vn",
"debug": false, "debug": false,
"host": "localhost", "host": "localhost",
"port": 3306, "port": 3306,
"username": "root", "username": "root",
"password": "" "password": "",
"connectTimeout": 20000,
"acquireTimeout": 20000
}, },
"vn": { "salix": {
"name": "mysql", "name": "mysql",
"connector": "mysql", "connector": "mysql",
"database": "salix", "database": "salix",
@ -27,11 +22,6 @@
"password": "", "password": "",
"connectTimeout": 20000, "connectTimeout": 20000,
"acquireTimeout": 20000 "acquireTimeout": 20000
},
"client": {
"name": "client",
"connector": "remote",
"url": "http://localhost:3002/api"
} }
} }

View File

@ -14,10 +14,10 @@
] ]
}, },
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -27,15 +27,15 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
} }
} }

View File

@ -1,9 +1,9 @@
{ {
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -13,16 +13,16 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Ticket": { "Ticket": {
"dataSource": "vn" "dataSource": "vn"

View File

@ -1,9 +1,9 @@
{ {
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -13,16 +13,16 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Delivery": { "Delivery": {
"dataSource": "vn" "dataSource": "vn"

View File

@ -1,9 +1,9 @@
{ {
"user": { "user": {
"dataSource": "auth" "dataSource": "salix"
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "salix",
"relations": { "relations": {
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
@ -13,15 +13,15 @@
} }
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "salix"
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "salix"
}, },
"Account": { "Account": {
"dataSource": "auth" "dataSource": "salix"
} }
} }