fix: refs #7906 remake method #3109
|
@ -240,5 +240,6 @@
|
|||
"There is already a tray with the same height": "There is already a tray with the same height",
|
||||
"The height must be greater than 50cm": "The height must be greater than 50cm",
|
||||
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line"
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line",
|
||||
"There are tickets for this area, delete them first": "There are tickets for this area, delete them first"
|
||||
}
|
||||
|
|
|
@ -382,5 +382,6 @@
|
|||
"This buyer has already made a reservation for this date": "Este comprador ya ha hecho una reserva para esta fecha",
|
||||
"No valid travel thermograph found": "No se encontró un termógrafo válido",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea",
|
||||
"type cannot be blank": "Se debe rellenar el tipo"
|
||||
"type cannot be blank": "Se debe rellenar el tipo",
|
||||
"There are tickets for this area, delete them first": "Hay tickets para esta sección, borralos primero"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('deleteZone', {
|
||||
description: 'Delete a zone',
|
||||
|
@ -57,7 +58,8 @@ module.exports = Self => {
|
|||
where: {id: userId}
|
||||
}, myOptions);
|
||||
|
||||
carlossa marked this conversation as resolved
Outdated
|
||||
await models.Ticket.rawSql('UPDATE ticket SET zoneFk = NULL WHERE zoneFk = ?', [id], myOptions);
|
||||
if (ticketList.length > 0)
|
||||
throw new UserError('There are tickets for this area, delete them first');
|
||||
|
||||
for (ticket of ticketList) {
|
||||
carlossa marked this conversation as resolved
Outdated
alexm
commented
Pero si no se vol que se puga si te tickets, ja no cal mirar els tickets no? Pero si no se vol que se puga si te tickets, ja no cal mirar els tickets no?
|
||||
if (ticket.ticketState().alertLevel == 0) {
|
||||
|
|
Loading…
Reference in New Issue
Quitar