Merge branch 'dev' of http://git.verdnatura.es/salix into dev
This commit is contained in:
commit
e6dd09cb6a
|
@ -1,6 +1,7 @@
|
|||
vn-icon {
|
||||
display: inline-block;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
|
||||
& > i,
|
||||
& > i.material-icons {
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
<vn-vertical ng-if="$ctrl.state.current.name === 'home'">
|
||||
<vn-horizontal>
|
||||
<h6 vn-one translate="Modules access"></h6>
|
||||
</vn-horizontal>
|
||||
<vn-module-container>
|
||||
<a ng-repeat="mod in ::$ctrl.modules" ui-sref="{{::mod.route.state}}" class="vn-module mdl-shadow--4dp">
|
||||
<vn-vertical class="home__icon">
|
||||
<vn-one>
|
||||
<vn-icon ng-if="::mod.icon && !mod.icon.startsWith('/')" icon="{{::mod.icon}}"></vn-icon>
|
||||
<img ng-if="::mod.icon && mod.icon.startsWith('/')" ng-src="{{::mod.icon}}" />
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<h4 translate="{{::mod.name}}"></h4>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
<div ng-if="$ctrl.state.current.name === 'home'">
|
||||
<div class="modules">
|
||||
<a
|
||||
ng-repeat="mod in ::$ctrl.modules"
|
||||
ui-sref="{{::mod.route.state}}"
|
||||
translate-attr="{title: '{{::mod.name}}'}"
|
||||
class="mdl-shadow--4dp">
|
||||
<vn-icon icon="{{::mod.icon}}"></vn-icon>
|
||||
<h4 translate>{{::mod.name}}</h4>
|
||||
</a>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</div>
|
||||
</div>
|
|
@ -1,59 +1,49 @@
|
|||
vn-home {
|
||||
padding: 2em;
|
||||
vn-horizontal{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
h6{
|
||||
color: #3C393B;
|
||||
text-align: center;
|
||||
}
|
||||
a:link{
|
||||
text-decoration: none;
|
||||
}
|
||||
vn-module-container{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
|
||||
.vn-module{
|
||||
& > div {
|
||||
& > h6 {
|
||||
color: #3C393B;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
& > .modules {
|
||||
display: flex;
|
||||
flex: none;
|
||||
margin: 10px;
|
||||
background-color: #FF9300;
|
||||
color: white;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
overflow:hidden;
|
||||
-moz-border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
& > a {
|
||||
overflow:hidden;
|
||||
border-radius: 6px;
|
||||
background-color: #FF9300;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 8em;
|
||||
width: 7em;
|
||||
margin: .5em;
|
||||
padding: 1em;
|
||||
justify-content: center;
|
||||
|
||||
.home__icon{
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
img {
|
||||
max-width: 50%;
|
||||
margin-top: 20px;
|
||||
transition: opacity 250ms ease-out;
|
||||
|
||||
&:hover {
|
||||
opacity: .7;
|
||||
}
|
||||
& > vn-icon {
|
||||
font-size: 4em;
|
||||
}
|
||||
& > h4 {
|
||||
text-align: center;
|
||||
padding-top: .4em;
|
||||
font-size: 16pt;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
h4{
|
||||
text-transform: capitalize;
|
||||
font-size: 16pt;
|
||||
}
|
||||
vn-one{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
i{
|
||||
font-size: 75px !important;
|
||||
margin: 0 auto;
|
||||
padding-top: 15px;
|
||||
}
|
||||
&:hover{
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -113,6 +113,10 @@ html [noDrop], .noDrop{
|
|||
|
||||
a {
|
||||
color: inherit;
|
||||
|
||||
&:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.vn-clickable {
|
||||
|
|
|
@ -8,7 +8,6 @@ export default {
|
|||
vnSubmit: 'vn-submit > input',
|
||||
vnTopbar: 'vn-topbar > header',
|
||||
vnIcon: 'vn-icon',
|
||||
vnModuleContainer: 'vn-module-container > a',
|
||||
vnSearchBar: 'vn-searchbar > form > vn-horizontal',
|
||||
vnFloatButton: 'vn-float-button > button',
|
||||
vnMenuItem: 'vn-menu-item > li > a',
|
||||
|
|
|
@ -11,9 +11,9 @@ export default {
|
|||
ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li:nth-child(6)`
|
||||
},
|
||||
moduleAccessView: {
|
||||
clientsSectionButton: `${components.vnModuleContainer}[ui-sref="clients"]`,
|
||||
itemsSectionButton: `${components.vnModuleContainer}[ui-sref="item.index"]`,
|
||||
ticketsSectionButton: `${components.vnModuleContainer}[ui-sref="ticket.list"]`
|
||||
clientsSectionButton: `vn-home a[ui-sref="clients"]`,
|
||||
itemsSectionButton: `vn-home a[ui-sref="item.index"]`,
|
||||
ticketsSectionButton: `vn-home a[ui-sref="ticket.list"]`
|
||||
},
|
||||
clientsIndex: {
|
||||
searchClientInput: `${components.vnTextfield}`,
|
||||
|
|
|
@ -4,12 +4,18 @@
|
|||
"Unable to mark the equivalence surcharge": "Unable to mark the equivalence surcharge",
|
||||
"The default consignee can not be unchecked": "The default consignee can not be unchecked",
|
||||
"Unable to default a disabled consignee": "Unable to default a disabled consignee",
|
||||
"El método de pago seleccionado requiere que se especifique el IBAN": "El método de pago seleccionado requiere que se especifique el IBAN",
|
||||
"Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre",
|
||||
"Can't be blank": "No puede estar en blanco",
|
||||
"Invalid TIN": "Invalid TIN",
|
||||
"TIN must be unique": "TIN must be unique",
|
||||
"A user with that name already exists": "A user with that name already exists",
|
||||
"Is invalid": "Is invalid",
|
||||
"Quantity cannot be zero": "Quantity cannot be zero",
|
||||
"can't be blank": "can't be blank",
|
||||
"DNI Incorrecto": "DNI Incorrecto",
|
||||
"El NIF/CIF debe ser único": "El NIF/CIF debe ser único",
|
||||
"Enter an integer different to zero": "Enter an integer different to zero",
|
||||
"Package cannot be blank": "Package cannot be blank",
|
||||
"The company name must be unique": "The company name must be unique",
|
||||
"Invalid email": "Invalid email",
|
||||
"The IBAN does not have the correct format": "The IBAN does not have the correct format",
|
||||
"That payment method requires an IBAN": "That payment method requires an IBAN",
|
||||
"State cannot be blank": "State cannot be blank",
|
||||
"La razón social debe ser única": "La razón social debe ser única"
|
||||
"Cannot change the payment method if no salesperson": "Cannot change the payment method if no salesperson"
|
||||
}
|
|
@ -4,12 +4,18 @@
|
|||
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
|
||||
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
|
||||
"Unable to default a disabled consignee": "No se puede poner predeterminado un consignatario desactivado",
|
||||
"El método de pago seleccionado requiere que se especifique el IBAN": "El método de pago seleccionado requiere que se especifique el IBAN",
|
||||
"can't be blank": "can't be blank",
|
||||
"DNI Incorrecto": "DNI Incorrecto",
|
||||
"Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre",
|
||||
"is invalid": "is invalid",
|
||||
"Can't be blank": "Can't be blank",
|
||||
"Invalid TIN": "DNI Incorrecto",
|
||||
"TIN must be unique": "El NIF/CIF debe ser único",
|
||||
"A user with that name already exists": "Ya existe un usuario con ese nombre",
|
||||
"Is invalid": "Is invalid",
|
||||
"Quantity cannot be zero": "La cantidad no puede ser cero",
|
||||
"Enter an integer different to zero": "Introduce un entero distinto de cero",
|
||||
"Package cannot be blank": "Package cannot be blank",
|
||||
"State cannot be blank": "El estado no puede estar en blanco"
|
||||
"Package cannot be blank": "Embalaje no puede estar en blanco",
|
||||
"The company name must be unique": "La razón social debe ser única",
|
||||
"Invalid email": "Correo electrónico inválido",
|
||||
"The IBAN does not have the correct format": "El IBAN no tiene el formato correcto",
|
||||
"That payment method requires an IBAN": "El método de pago seleccionado requiere que se especifique el IBAN",
|
||||
"State cannot be blank": "El estado no puede estar en blanco",
|
||||
"Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado"
|
||||
}
|
|
@ -4,7 +4,7 @@ module.exports = function(Self) {
|
|||
// Validations
|
||||
|
||||
Self.validatesUniquenessOf('name', {
|
||||
message: 'Ya existe un usuario con ese nombre'
|
||||
message: 'A user with that name already exists'
|
||||
});
|
||||
|
||||
Self.observe('before save', (ctx, next) => {
|
||||
|
|
|
@ -23,13 +23,13 @@ module.exports = function(Self) {
|
|||
// Validations
|
||||
|
||||
Self.validatesUniquenessOf('fi', {
|
||||
message: 'El NIF/CIF debe ser único'
|
||||
message: 'TIN must be unique'
|
||||
});
|
||||
Self.validatesUniquenessOf('socialName', {
|
||||
message: 'La razón social debe ser única'
|
||||
message: 'The company name must be unique'
|
||||
});
|
||||
Self.validatesFormatOf('email', {
|
||||
message: 'Correo electrónico inválido',
|
||||
message: 'Invalid email',
|
||||
allowNull: true,
|
||||
allowBlank: true,
|
||||
with: /^[\w|.|-]+@[\w|-]+(\.[\w|-]+)*(,[\w|.|-]+@[\w|-]+(\.[\w|-]+)*)*$/
|
||||
|
@ -42,13 +42,13 @@ module.exports = function(Self) {
|
|||
|
||||
var validateIban = require('../validations/validateIban');
|
||||
Self.validateBinded('iban', validateIban, {
|
||||
message: 'El iban no tiene el formato correcto',
|
||||
message: 'The IBAN does not have the correct format',
|
||||
allowNull: true, // FIXME: Ignored by loopback when it's false
|
||||
allowBlank: true
|
||||
});
|
||||
|
||||
Self.validateAsync('fi', tinIsValid, {
|
||||
message: 'DNI Incorrecto'
|
||||
message: 'Invalid TIN'
|
||||
});
|
||||
let validateTin = require('../validations/validateTin');
|
||||
async function tinIsValid(err, done) {
|
||||
|
@ -65,7 +65,7 @@ module.exports = function(Self) {
|
|||
}
|
||||
|
||||
Self.validate('payMethod', hasSalesMan, {
|
||||
message: 'No se puede cambiar la forma de pago si no hay comercial asignado'
|
||||
message: 'Cannot change the payment method if no salesperson'
|
||||
});
|
||||
function hasSalesMan(err) {
|
||||
if (this.payMethod && !this.salesPerson)
|
||||
|
@ -73,7 +73,7 @@ module.exports = function(Self) {
|
|||
}
|
||||
|
||||
Self.validateAsync('payMethodFk', hasIban, {
|
||||
message: 'El método de pago seleccionado requiere que se especifique el IBAN'
|
||||
message: 'That payment method requires an IBAN'
|
||||
});
|
||||
function hasIban(err, done) {
|
||||
Self.app.models.PayMethod.findById(this.payMethodFk, (_, instance) => {
|
||||
|
|
Loading…
Reference in New Issue