1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

fix default duration for new training session

This commit is contained in:
Sylvain 2020-06-16 15:23:54 +02:00
parent 933ce5df71
commit 28781a7bf4

View File

@ -774,6 +774,8 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui
// When the slot duration changes, we increment the availability to match the value
$scope.$watch('availability.slot_duration', function (newValue, oldValue, scope) {
if (newValue === undefined) return;
start = moment($scope.start);
start.add(newValue * $scope.slots_nb, 'minutes');
$scope.end = start.toDate();