feat: refs #7187 Add support for multiple PDAs per user
gitea/salix/pipeline/pr-test This commit looks good
Details
gitea/salix/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
6e06891937
commit
2142b78deb
|
@ -226,5 +226,6 @@
|
|||
"This password can only be changed by the user themselves": "This password can only be changed by the user themselves",
|
||||
"They're not your subordinate": "They're not your subordinate",
|
||||
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
||||
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency"
|
||||
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency",
|
||||
"You can only have one PDA": "You can only have one PDA"
|
||||
}
|
|
@ -357,6 +357,7 @@
|
|||
"This workCenter is already assigned to this agency": "Este centro de trabajo ya está asignado a esta agencia",
|
||||
"Select ticket or client": "Elija un ticket o un client",
|
||||
"It was not able to create the invoice": "No se pudo crear la factura",
|
||||
"This PDA is already assigned to another user": "This PDA is already assigned to another user",
|
||||
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)"
|
||||
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
||||
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
||||
"You can only have one PDA": "Solo puedes tener un PDA"
|
||||
}
|
|
@ -3,6 +3,9 @@ module.exports = Self => {
|
|||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_DUP_ENTRY')
|
||||
return new UserError(`This PDA is already assigned to another user`);
|
||||
|
||||
if (err.code === 'ER_SIGNAL_EXCEPTION' && err.sqlMessage === 'You can only have one active PDA')
|
||||
return new UserError(`You can only have one active PDA`);
|
||||
return err;
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue