Fix code syntax

This commit is contained in:
Gaetan Craig-Riou
2026-03-20 15:49:41 +11:00
parent 8defb2f4c8
commit 4dc44c6156

View File

@@ -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]?