From 4dc44c615657a779a05255100f29462ac5aae01b Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Fri, 20 Mar 2026 15:49:41 +1100 Subject: [PATCH] Fix code syntax --- .../controllers/incoming_controller.js.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/admin/order_cycles/controllers/incoming_controller.js.coffee b/app/assets/javascripts/admin/order_cycles/controllers/incoming_controller.js.coffee index 8f709b4d39..94e1b30932 100644 --- a/app/assets/javascripts/admin/order_cycles/controllers/incoming_controller.js.coffee +++ b/app/assets/javascripts/admin/order_cycles/controllers/incoming_controller.js.coffee @@ -8,12 +8,9 @@ angular.module('admin.orderCycles').controller 'AdminOrderCycleIncomingCtrl', ($ # We want to make sure to load the filtered EnterpriseFee when any previous request is finished # otherwise the enterprise_fees migh get overriden by non filtered ones. - $scope.$watch () -> - EnterpriseFee.loading - , (isLoading) => - return if $scope.enterprise_fees - - $scope.enterprise_fees = EnterpriseFee.index(order_cycle_id: $scope.order_cycle_id, per_item: true) isLoading == false + $scope.$watch(( -> EnterpriseFee.loading), (isLoading) => + $scope.enterprise_fees ||= $scope.enterprise_fees = EnterpriseFee.index(order_cycle_id: $scope.order_cycle_id, per_item: true) unless isLoading + ) $scope.exchangeTotalVariants = (exchange) -> return unless $scope.enterprises? && $scope.enterprises[exchange.enterprise_id]?