Only call confirmRefresh() on time, on date range change

Previously, when changing the date range, we had several modals that opened.
Now, the `confirmRefresh()` method should be open only one time.

Update specs as well:
 - use the method `accept_confirm`
 - Removing pending and sleep as the spec is now green
This commit is contained in:
Jean-Baptiste Bellet
2022-11-02 11:24:00 +01:00
parent 74529cd595
commit 1a241e4953
3 changed files with 6 additions and 9 deletions

View File

@@ -38,6 +38,8 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
return unless moment($scope.formattedStartDate).isValid() and moment($scope.formattedEndDate).isValid()
return unless $scope.confirmRefresh()
$scope.loadOrders()
$scope.loadLineItems()