dashboard: Wait for the themes to load before getting the events

This commit is contained in:
nemunaire 2023-08-01 18:20:08 +02:00
parent 4ee950cca2
commit bf61b0184b
2 changed files with 2 additions and 3 deletions

View File

@ -335,7 +335,7 @@
<div id="themesSummary" ng-cloak>
<div ng-repeat="(k,s) in display.side" class="repeatedd-item" style="margin-bottom: 7px;">
<div class="card niceborder bg-dark" ng-if="s.type == 'welcome' && !s.params.hide">
<div class="card niceborder bg-dark" ng-if="(s.type == 'welcome' && !s.params.hide || s.type == 'exercice_follow' && !s.params.hide && !lastExercice)">
<div class="card-body text-light text-indent" style="padding: 0.4rem;">
<h1 ng-if="!s.params.notitle" class="text-center niceborder">Le {{ challenge.title }}&nbsp;!</h1>
<p class="lead text-justify">
@ -391,7 +391,7 @@
</div>
</div>
<div class="card niceborder bg-dark" ng-if="s.type == 'exercice_follow' && !s.params.hide">
<div class="card niceborder bg-dark" ng-if="s.type == 'exercice_follow' && !s.params.hide && lastExercice">
<div class="text-light text-bold text-right" style="position: absolute; z-index: 10; width: 100%; padding: 1rem;">
<span style="background: rgba(50,50,50,0.66); padding: 0.2rem 0.4rem; border-radius: 3px; border-bottom-width: 3px;">
Challenges à la une

View File

@ -43,7 +43,6 @@ angular.module("FICApp", ["ngSanitize", "ngAnimate"])
$rootScope.lastExercice = lastExercice;
});
}
refreshEvents()
$interval(refreshEvents, 2100);
})
.controller("TimerController", function($scope, $rootScope, $interval, $timeout) {