Remove funky panel open listener code and initialize the panel data with a ng-init in the panel template

This commit is contained in:
luisramos0
2019-11-22 17:58:08 +00:00
parent ff584f9be9
commit 9451f1b66d
11 changed files with 15 additions and 28 deletions

View File

@@ -11,7 +11,6 @@ describe 'AdminEditOrderCycleCtrl', ->
scope =
order_cycle_form: jasmine.createSpyObj('order_cycle_form', ['$dirty', '$setPristine'])
$watch: jasmine.createSpy('$watch')
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
event =
preventDefault: jasmine.createSpy('preventDefault')
location =

View File

@@ -10,7 +10,6 @@ describe 'AdminOrderCycleIncomingCtrl', ->
beforeEach ->
scope =
$watch: jasmine.createSpy('$watch')
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
location =
absUrl: ->
'example.com/admin/order_cycles/27/edit'
@@ -45,4 +44,4 @@ describe 'AdminOrderCycleIncomingCtrl', ->
scope.addSupplier(event)
expect(event.preventDefault).toHaveBeenCalled()
expect(OrderCycle.addSupplier).toHaveBeenCalledWith('new supplier id', scope.exchangeListChanged)
expect(OrderCycle.addSupplier).toHaveBeenCalledWith('new supplier id')

View File

@@ -10,7 +10,6 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
beforeEach ->
scope =
$watch: jasmine.createSpy('$watch')
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
location =
absUrl: ->
'example.com/admin/order_cycles/27/edit'
@@ -35,4 +34,4 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
scope.addDistributor(event)
expect(event.preventDefault).toHaveBeenCalled()
expect(OrderCycle.addDistributor).toHaveBeenCalledWith('new distributor id', scope.exchangeListChanged)
expect(OrderCycle.addDistributor).toHaveBeenCalledWith('new distributor id')