This commit is contained in:
parent
f07ac89cb6
commit
2c79056f34
|
@ -178,5 +178,6 @@
|
|||
"The renew period has not been exceeded": "The renew period has not been exceeded",
|
||||
"You can not use the same password": "You can not use the same password",
|
||||
"Valid priorities": "Valid priorities: %d",
|
||||
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}"
|
||||
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}",
|
||||
"This ticket cannot be left empty.": "This ticket cannot be left empty. %s"
|
||||
}
|
||||
|
|
|
@ -306,5 +306,5 @@
|
|||
"Valid priorities": "Prioridades válidas: %d",
|
||||
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
||||
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado",
|
||||
"This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %d"
|
||||
"This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %s"
|
||||
}
|
||||
|
|
|
@ -46,8 +46,6 @@ class Controller extends Section {
|
|||
}
|
||||
|
||||
deleteRoadmaps() {
|
||||
console.log(this.checked);
|
||||
|
||||
for (const roadmap of this.checked) {
|
||||
this.$http.delete(`Roadmaps/${roadmap.id}`)
|
||||
.then(() => this.$.model.refresh())
|
||||
|
|
|
@ -41,8 +41,8 @@ module.exports = Self => {
|
|||
|
||||
const isEditable = await Self.isEditable(ctx, id, myOptions);
|
||||
|
||||
if (!isEditable)
|
||||
throw new UserError(`The sales of this ticket can't be modified`);
|
||||
// if (!isEditable)
|
||||
|
||||
// Check if ticket has refunds
|
||||
const ticketRefunds = await models.TicketRefund.find({
|
||||
|
|
|
@ -79,9 +79,9 @@ module.exports = Self => {
|
|||
|
||||
const saleIds = sales.map(sale => sale.id);
|
||||
|
||||
// const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
||||
// if (ticketId != id && hasClaimedSales)
|
||||
// throw new UserError(`Can't transfer claimed sales`);
|
||||
const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
||||
if (ticketId != id && hasClaimedSales)
|
||||
throw new UserError(`Can't transfer claimed sales`);
|
||||
|
||||
for (const sale of sales) {
|
||||
const originalSale = map.get(sale.id);
|
||||
|
@ -101,14 +101,11 @@ module.exports = Self => {
|
|||
try {
|
||||
await models.Ticket.setDeleted(ctx, id, myOptions);
|
||||
} catch (e) {
|
||||
console.log('e:', e);
|
||||
console.log('e.message:', e.message);
|
||||
console.log('e translation:', $t(e.message, {}));
|
||||
if (e.statusCode === 400) {
|
||||
throw new UserError(
|
||||
`This ticket cannot be left empty.`,
|
||||
'TRANSFER_SET_DELETED',
|
||||
$t(e.message)
|
||||
$t(e.message, ...e.translateArgs)
|
||||
);
|
||||
}
|
||||
throw e;
|
||||
|
@ -120,7 +117,6 @@ module.exports = Self => {
|
|||
return {id: ticketId};
|
||||
} catch (e) {
|
||||
if (tx) await tx.rollback();
|
||||
console.log('e.UserError:', e);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue