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
|
||||
ui.navigate '#'
|
||||
|
||||
fail: ->
|
||||
ui.log 'save failed!'
|
||||
fail: (settings, details) ->
|
||||
ui.log 'errors', details
|
||||
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
|
||||
|
|
|
@ -177,9 +177,14 @@ class Index extends App.ControllerContent
|
|||
# redirect to zoom
|
||||
ui.navigate '#ticket/zoom/' + @id
|
||||
|
||||
fail: ->
|
||||
ui.log 'CustomerTicketCreate', 'error', 'can not create'
|
||||
fail: (settings, details) ->
|
||||
ui.log 'errors', details
|
||||
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')
|
||||
|
|
Loading…
Reference in a new issue