This commit is contained in:
Michele Artini 2021-04-13 14:45:27 +02:00
parent 2acb090bf4
commit c7a9e51bb8
4 changed files with 13 additions and 7 deletions

View File

@ -16,7 +16,7 @@
</div>
</div>
<h5 class="text-muted" ng-if="conflicts.length == 0">No conflicts</h5>
<h5 class="text-muted" ng-if="!loading && conflicts.length == 0">No conflicts</h5>
<p ng-show="conflicts.length > 0">
<input type="text" class="form-control form-control-sm" ng-model="conflictFilter" placeholder="Filter..." />

View File

@ -17,7 +17,7 @@
</div>
</div>
<h5 class="text-muted" ng-if="duplicates.length == 0">No duplicates</h5>
<h5 class="text-muted" ng-if="!loading && duplicates.length == 0">No duplicates</h5>
<p ng-show="duplicates.length > 0">
<input type="text" class="form-control" ng-model="duplicateFilter" placeholder="Filter..." />

View File

@ -16,7 +16,7 @@
</div>
</div>
<h5 class="text-muted" ng-if="orgs.length == 0">No pending organizations</h5>
<h5 class="text-muted" ng-if="!loading && orgs.length == 0">No pending organizations</h5>
<p ng-show="orgs.length > 0">
<input type="text" class="form-control form-control-sm" ng-model="orgFilter" placeholder="Filter..."/>

View File

@ -575,6 +575,7 @@ orgsModule.controller('showEditCtrl', function ($scope, $http, $routeParams, $ro
orgsModule.controller('pendingOrgsCtrl', function ($scope, $http, $routeParams, $location, suggestionInfo) {
$scope.info = suggestionInfo.getInfo();
$scope.loading = true;
$scope.orgs = [];
$scope.country = $routeParams.country;
@ -594,9 +595,10 @@ orgsModule.controller('pendingOrgsCtrl', function ($scope, $http, $routeParams,
$scope.refresh = function() {
$scope.orgs = [];
$scope.loading = true;
if ($scope.country != '_') {
call_http_get($http, 'api/organizations/byCountry/suggested/' + $scope.country, function(res) { $scope.orgs = res.data; });
call_http_get($http, 'api/organizations/byCountry/suggested/' + $scope.country, function(res) { $scope.orgs = res.data; $scope.loading = false; });
}
$scope.getInfo();
}
@ -606,6 +608,7 @@ orgsModule.controller('pendingOrgsCtrl', function ($scope, $http, $routeParams,
orgsModule.controller('duplicatesCtrl', function ($scope, $http, $routeParams, $location, $timeout, $route, suggestionInfo) {
$scope.info = suggestionInfo.getInfo();
$scope.loading = true;
$scope.duplicates = [];
$scope.country = $routeParams.country;
$scope.currentOrg = {};
@ -661,9 +664,10 @@ orgsModule.controller('duplicatesCtrl', function ($scope, $http, $routeParams, $
$scope.refresh = function() {
$scope.duplicates = [];
$scope.loading = true;
if ($scope.country != '_') {
call_http_get($http, 'api/organizations/duplicates/byCountry/' + $scope.country, function(res) { $scope.duplicates = res.data; });
call_http_get($http, 'api/organizations/duplicates/byCountry/' + $scope.country, function(res) { $scope.duplicates = res.data; $scope.loading = false; });
}
$scope.getInfo();
}
@ -673,6 +677,7 @@ orgsModule.controller('duplicatesCtrl', function ($scope, $http, $routeParams, $
orgsModule.controller('conflictsCtrl', function ($scope, $http, $routeParams, $location, $route, $q, suggestionInfo) {
$scope.info = suggestionInfo.getInfo();
$scope.loading = true;
$scope.conflicts = [];
$scope.country = $routeParams.country;
$scope.orgs = [];
@ -745,9 +750,10 @@ orgsModule.controller('conflictsCtrl', function ($scope, $http, $routeParams, $l
$scope.refresh = function() {
$scope.conflicts = [];
$scope.loading = true;
if ($scope.country != '_') {
call_http_get($http, 'api/organizations/conflicts/byCountry/' + $scope.country, function(res) { $scope.conflicts = res.data; });
call_http_get($http, 'api/organizations/conflicts/byCountry/' + $scope.country, function(res) { $scope.conflicts = res.data; $scope.loading = false; });
}
$scope.getInfo();
}