Skip to content

Commit

Permalink
fix: rescope accept_meters function within upload modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Lara committed Jun 17, 2021
1 parent 7ea4037 commit 6d687a0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions seed/static/seed/js/controllers/data_upload_modal_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,6 @@ angular.module('BE.seed.controller.data_upload_modal', [])
break;
}

$scope.accept_meters = function (file_id, cycle_id) {
$scope.uploader.in_progress = true;
save_raw_assessed_data(file_id, cycle_id, true);
};

// $apply() or $digest() needed maybe because of this:
// https://github.com/angular-ui/bootstrap/issues/1798
// otherwise alert doesn't show unless modal is interacted with
Expand All @@ -381,6 +376,13 @@ angular.module('BE.seed.controller.data_upload_modal', [])
});
};

$scope.accept_meters = function (file_id, cycle_id) {
file_id = file_id || $scope.dataset.import_file_id;
cycle_id = cycle_id || $scope.selectedCycle.id;
$scope.uploader.in_progress = true;
save_raw_assessed_data(file_id, cycle_id, true);
};

/**
* save_map_match_PM_data: saves, maps, and matches PM data
*
Expand Down

0 comments on commit 6d687a0

Please sign in to comment.