diff --git a/client/core/src/components/icon/style.scss b/client/core/src/components/icon/style.scss index e9764adec..bed29630d 100644 --- a/client/core/src/components/icon/style.scss +++ b/client/core/src/components/icon/style.scss @@ -1,6 +1,7 @@ vn-icon { display: inline-block; font-size: 18pt; + text-align: center; & > i, & > i.material-icons { diff --git a/client/salix/src/components/home/home.html b/client/salix/src/components/home/home.html index df6699a79..81a4f331c 100644 --- a/client/salix/src/components/home/home.html +++ b/client/salix/src/components/home/home.html @@ -1,18 +1,12 @@ - - -
-
- - - - - - - - -

-
-
+
+
+ + +

{{::mod.name}}

- - \ No newline at end of file +
+
\ No newline at end of file diff --git a/client/salix/src/components/home/style.scss b/client/salix/src/components/home/style.scss index b35c1a1c7..b311ccdf7 100644 --- a/client/salix/src/components/home/style.scss +++ b/client/salix/src/components/home/style.scss @@ -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; - } - - } } } \ No newline at end of file diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index b90297764..b7fbde50e 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -113,6 +113,10 @@ html [noDrop], .noDrop{ a { color: inherit; + + &:link { + text-decoration: none; + } } .vn-clickable { diff --git a/e2e/helpers/components_selectors.js b/e2e/helpers/components_selectors.js index 488d002e0..7aae5042c 100644 --- a/e2e/helpers/components_selectors.js +++ b/e2e/helpers/components_selectors.js @@ -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', diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3356faf67..7a27bb70c 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -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}`, diff --git a/services/loopback/common/locale/en.json b/services/loopback/common/locale/en.json index c6aeaa3f6..7f83a1124 100644 --- a/services/loopback/common/locale/en.json +++ b/services/loopback/common/locale/en.json @@ -4,11 +4,17 @@ "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", - "Quantity cannot be zero": "La cantidad no puede ser cero", "Can't be blank": "No puede estar en blanco", - "Invalid TIN": "DNI Incorrecto", - "TIN must be unique": "El NIF/CIF debe ser único", - "Package cannot be blank": "Package cannot be blank" + "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", + "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", + "Cannot change the payment method if no salesperson": "Cannot change the payment method if no salesperson" } \ No newline at end of file diff --git a/services/loopback/common/locale/es.json b/services/loopback/common/locale/es.json index c7df26934..1943c4a95 100644 --- a/services/loopback/common/locale/es.json +++ b/services/loopback/common/locale/es.json @@ -4,11 +4,17 @@ "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", "Invalid TIN": "DNI Incorrecto", - "Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre", - "is invalid": "is invalid", + "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" + "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", + "Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado" } \ No newline at end of file diff --git a/services/loopback/common/models/account.js b/services/loopback/common/models/account.js index 7a3e2a94a..a6de406de 100644 --- a/services/loopback/common/models/account.js +++ b/services/loopback/common/models/account.js @@ -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) => { diff --git a/services/loopback/common/models/client.js b/services/loopback/common/models/client.js index 4c4ac4638..eb150b848 100644 --- a/services/loopback/common/models/client.js +++ b/services/loopback/common/models/client.js @@ -26,10 +26,10 @@ module.exports = function(Self) { 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,7 +42,7 @@ 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 }); @@ -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) => {