Improved error handling.
This commit is contained in:
parent
aa8f0f5255
commit
e3f23d16eb
2 changed files with 14 additions and 4 deletions
|
@ -483,9 +483,14 @@ class App.TicketCreate extends App.Controller
|
||||||
# if not, show start screen
|
# if not, show start screen
|
||||||
ui.navigate '#'
|
ui.navigate '#'
|
||||||
|
|
||||||
fail: ->
|
fail: (settings, details) ->
|
||||||
ui.log 'save failed!'
|
ui.log 'errors', details
|
||||||
ui.formEnable(e)
|
ui.formEnable(e)
|
||||||
|
ui.notify(
|
||||||
|
type: 'error'
|
||||||
|
msg: App.i18n.translateContent(details.error_human || details.error || 'Unable to create object!')
|
||||||
|
timeout: 6000
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
class Sidebar extends App.Controller
|
class Sidebar extends App.Controller
|
||||||
|
|
|
@ -177,9 +177,14 @@ class Index extends App.ControllerContent
|
||||||
# redirect to zoom
|
# redirect to zoom
|
||||||
ui.navigate '#ticket/zoom/' + @id
|
ui.navigate '#ticket/zoom/' + @id
|
||||||
|
|
||||||
fail: ->
|
fail: (settings, details) ->
|
||||||
ui.log 'CustomerTicketCreate', 'error', 'can not create'
|
ui.log 'errors', details
|
||||||
ui.formEnable(e)
|
ui.formEnable(e)
|
||||||
|
ui.notify(
|
||||||
|
type: 'error'
|
||||||
|
msg: App.i18n.translateContent(details.error_human || details.error || 'Unable to create object!')
|
||||||
|
timeout: 6000
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
App.Config.set('customer_ticket_new', Index, 'Routes')
|
App.Config.set('customer_ticket_new', Index, 'Routes')
|
||||||
|
|
Loading…
Reference in a new issue