1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix events page + fix disableAnimation directive

This commit is contained in:
Sylvain 2018-11-20 16:25:15 +01:00
parent a4b3bfb4ba
commit 8a03b0b4f2
2 changed files with 7 additions and 3 deletions

View File

@ -111,7 +111,11 @@ Application.Controllers.controller('EventsController', ['$scope', '$state', 'Eve
*/
const groupEvents = function (events) {
if (events.length > 0) {
const eventsGroupedByMonth = _.groupBy(function(events, obj) { _.map(['month_id', 'year'], function(key) { return obj[key]; }); })
const eventsGroupedByMonth = _.groupBy(events, function(obj) {
return _.map(['month_id', 'year'], function(key) {
return obj[key];
});
})
$scope.eventsGroupByMonth = Object.assign($scope.eventsGroupByMonth, eventsGroupedByMonth)
return $scope.monthOrder = Object.keys($scope.eventsGroupByMonth)
}

View File

@ -81,14 +81,14 @@ Application.Directives.directive('publishProject', [ () =>
])
Application.Directives.directive('disableAnimation', $animate =>
Application.Directives.directive('disableAnimation', ['$animate', ($animate) =>
({
restrict: 'A',
link (scope, elem, attrs) {
return attrs.$observe('disableAnimation', value => $animate.enabled(!value, elem))
}
})
)
])
// #
// Isolate a form's scope from its parent : no nested validation