default period always most recent

This commit is contained in:
Gwenhael Le Moine 2015-10-09 10:09:22 +02:00
parent 35432857a4
commit 1190718023

View file

@ -211,10 +211,11 @@ app.controller( 'DashboardCtrl',
$scope.periods.push( period );
return [ period,
parseInt( value.amount ) * multiplicator ];
} ) };
} )
};
} )
.value();
$scope.periods = _.chain($scope.periods).uniq().reverse().value();
$scope.periods = _.chain($scope.periods).uniq().sort().reverse().value();
$scope.period = _($scope.periods).first();
} );
};