Merge pull request 'fix(ticket): throw error if id is null' (!2541) from hotFix_ticket_request into master
Reviewed-on: #2541 Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
This commit is contained in:
commit
963c2f68b7
|
@ -1,5 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
import ModuleCard from 'salix/components/module-card';
|
import ModuleCard from 'salix/components/module-card';
|
||||||
|
import UserError from 'core/lib/user-error';
|
||||||
|
|
||||||
class Controller extends ModuleCard {
|
class Controller extends ModuleCard {
|
||||||
reload() {
|
reload() {
|
||||||
|
@ -59,6 +60,10 @@ class Controller extends ModuleCard {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!this.$params.id) {
|
||||||
|
this.$state.go('ticket.index');
|
||||||
|
throw new UserError(`You must select a ticket`);
|
||||||
|
}
|
||||||
return this.$http.get(`Tickets/${this.$params.id}`, {filter})
|
return this.$http.get(`Tickets/${this.$params.id}`, {filter})
|
||||||
.then(res => this.onData(res.data));
|
.then(res => this.onData(res.data));
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ You are going to delete this ticket: Vas a eliminar este ticket
|
||||||
Ticket deleted. You can undo this action within the first hour: Ticket eliminado. Puedes deshacer esta acción durante la primera hora
|
Ticket deleted. You can undo this action within the first hour: Ticket eliminado. Puedes deshacer esta acción durante la primera hora
|
||||||
Search ticket by id or alias: Buscar tickets por identificador o alias
|
Search ticket by id or alias: Buscar tickets por identificador o alias
|
||||||
ticket: ticket
|
ticket: ticket
|
||||||
|
You must select a ticket: Debes seleccionar un ticket
|
||||||
|
|
||||||
#sections
|
#sections
|
||||||
List: Listado
|
List: Listado
|
||||||
|
|
Loading…
Reference in New Issue