feat: added translations and show error in item-type
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-12-05 10:28:57 +01:00
parent 86a36732f0
commit 97f08542be
6 changed files with 23 additions and 3 deletions

View File

@ -390,6 +390,7 @@
"The web user's email already exists": "El correo del usuario web ya existe", "The web user's email already exists": "El correo del usuario web ya existe",
"Sales already moved": "Ya han sido transferidas", "Sales already moved": "Ya han sido transferidas",
"The raid information is not correct": "La información de la redada no es correcta", "The raid information is not correct": "La información de la redada no es correcta",
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero" "There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero",
"An item type with the same code already exists": "Un tipo con el mismo código ya existe"
} }

View File

@ -0,0 +1,5 @@
name: Minimum Quantity
columns:
ended: Ended
code: Code
started: Started

View File

@ -0,0 +1,5 @@
name: Cantidad Mínima
columns:
ended: Finaliza
quantity: Cantidad
started: Comienza

View File

@ -46,4 +46,4 @@ columns:
itemFk: item itemFk: item
density: density density: density
compression: compression compression: compression
minQuantity: min quantity

View File

@ -46,4 +46,4 @@ columns:
itemFk: artículo itemFk: artículo
density: densidad density: densidad
compression: compresión compression: compresión
minQuantity: Cantidad mínima

View File

@ -0,0 +1,9 @@
let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.rewriteDbError(function(err) {
if (err.code === 'ER_DUP_ENTRY')
return new UserError(`An item type with the same code already exists`);
return err;
});
};