Update interface for botanic parc

This commit is contained in:
nemunaire 2020-10-28 01:18:58 +01:00
commit 3095640449
12 changed files with 427 additions and 406 deletions

View file

@ -81,6 +81,7 @@ angular.module("CheckHomeApp")
$rootScope.tagsReverse = false;
$rootScope.tagsShown = {};
$rootScope.stateShown = { "yes": true, "yesbut": true, "nobut": true, "no": true, "next": false , "na": true };
$rootScope.allDatesShown = false;
$scope.newRoom = function() {
var t = new Room();
@ -96,6 +97,9 @@ angular.module("CheckHomeApp")
});
this.room.closed = false;
}
$scope.toggleDate = function(state) {
$rootScope.allDatesShown = !$rootScope.allDatesShown;
}
$scope.toggleStateS = function(state) {
$rootScope.stateShown[state] = !$rootScope.stateShown[state];
}
@ -215,7 +219,7 @@ angular.module("CheckHomeApp")
}
var min = "N/A";
angular.forEach($scope.checks, function(check) {
if (state2int(min) > state2int(check["passed"]))
if (($rootScope.allDatesShown || new Date(check["date"]).getTime() > Date.now() - 86400000) && state2int(min) > state2int(check["passed"]))
min = check["passed"];
});
return min;