Fixed new article creation on customer change.
This commit is contained in:
parent
3caaad2f7f
commit
2e1ebf0c6f
2 changed files with 5 additions and 3 deletions
|
@ -26,9 +26,11 @@ class App.TicketCustomer extends App.ControllerModal
|
||||||
@close()
|
@close()
|
||||||
|
|
||||||
# update ticket
|
# update ticket
|
||||||
@ticket.updateAttributes(
|
ticket = App.Ticket.find(@ticket_id)
|
||||||
|
ticket.article = undefined
|
||||||
|
ticket.updateAttributes(
|
||||||
customer_id: @customer_id
|
customer_id: @customer_id
|
||||||
)
|
)
|
||||||
|
|
||||||
# load user if not already exists
|
# load user if not already exists
|
||||||
App.User.full( @customer_id, callback )
|
App.User.full(@customer_id, callback)
|
||||||
|
|
|
@ -80,7 +80,7 @@ class App.TicketZoomSidebar extends App.ObserverController
|
||||||
)
|
)
|
||||||
changeCustomer = (e, el) =>
|
changeCustomer = (e, el) =>
|
||||||
new App.TicketCustomer(
|
new App.TicketCustomer(
|
||||||
ticket: ticket
|
ticket_id: ticket.id
|
||||||
container: @el.closest('.content')
|
container: @el.closest('.content')
|
||||||
)
|
)
|
||||||
@sidebarItems = [
|
@sidebarItems = [
|
||||||
|
|
Loading…
Reference in a new issue