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",
|
"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",
|
"You can not use the same password": "You can not use the same password",
|
||||||
"Valid priorities": "Valid priorities: %d",
|
"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",
|
"Valid priorities": "Prioridades válidas: %d",
|
||||||
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
"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",
|
"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() {
|
deleteRoadmaps() {
|
||||||
console.log(this.checked);
|
|
||||||
|
|
||||||
for (const roadmap of this.checked) {
|
for (const roadmap of this.checked) {
|
||||||
this.$http.delete(`Roadmaps/${roadmap.id}`)
|
this.$http.delete(`Roadmaps/${roadmap.id}`)
|
||||||
.then(() => this.$.model.refresh())
|
.then(() => this.$.model.refresh())
|
||||||
|
|
|
@ -41,8 +41,8 @@ module.exports = Self => {
|
||||||
|
|
||||||
const isEditable = await Self.isEditable(ctx, id, myOptions);
|
const isEditable = await Self.isEditable(ctx, id, myOptions);
|
||||||
|
|
||||||
throw new UserError(`The sales of this ticket can't be modified`);
|
if (!isEditable)
|
||||||
// if (!isEditable)
|
throw new UserError(`The sales of this ticket can't be modified`);
|
||||||
|
|
||||||
// Check if ticket has refunds
|
// Check if ticket has refunds
|
||||||
const ticketRefunds = await models.TicketRefund.find({
|
const ticketRefunds = await models.TicketRefund.find({
|
||||||
|
|
|
@ -79,9 +79,9 @@ module.exports = Self => {
|
||||||
|
|
||||||
const saleIds = sales.map(sale => sale.id);
|
const saleIds = sales.map(sale => sale.id);
|
||||||
|
|
||||||
// const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
||||||
// if (ticketId != id && hasClaimedSales)
|
if (ticketId != id && hasClaimedSales)
|
||||||
// throw new UserError(`Can't transfer claimed sales`);
|
throw new UserError(`Can't transfer claimed sales`);
|
||||||
|
|
||||||
for (const sale of sales) {
|
for (const sale of sales) {
|
||||||
const originalSale = map.get(sale.id);
|
const originalSale = map.get(sale.id);
|
||||||
|
@ -101,14 +101,11 @@ module.exports = Self => {
|
||||||
try {
|
try {
|
||||||
await models.Ticket.setDeleted(ctx, id, myOptions);
|
await models.Ticket.setDeleted(ctx, id, myOptions);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('e:', e);
|
|
||||||
console.log('e.message:', e.message);
|
|
||||||
console.log('e translation:', $t(e.message, {}));
|
|
||||||
if (e.statusCode === 400) {
|
if (e.statusCode === 400) {
|
||||||
throw new UserError(
|
throw new UserError(
|
||||||
`This ticket cannot be left empty.`,
|
`This ticket cannot be left empty.`,
|
||||||
'TRANSFER_SET_DELETED',
|
'TRANSFER_SET_DELETED',
|
||||||
$t(e.message)
|
$t(e.message, ...e.translateArgs)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -120,7 +117,6 @@ module.exports = Self => {
|
||||||
return {id: ticketId};
|
return {id: ticketId};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (tx) await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
console.log('e.UserError:', e);
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue