+ if (!$scope.blueprintInstance
+ || !$scope.blueprintInstance.timeslots
+ || $scope.blueprintInstance.timeslots.length === 0) {
+ confirm("No available timeslots for this blueprint instance in this lab");
+ return;
+ }
+ angular.forEach($scope.blueprintInstance.timeslots,
+ function(timeslot) {
+ var temp = "id: " + timeslot.timeslotId
+ + " Start date and time: "
+ + timeslot.startDateTime
+ /*
+ * + " duration(in sec) :" +
+ * blueprintInstance["timeslot"].duration
+ */
+ + " lab :" + timeslot.labInfo.lab;
+ $scope.declerativeTimeslots.push(temp);
+ });
+ }
+
+ $scope.selectedDeclerativeTimeslotChange = function() {
+ $scope.blueprintLayers = [];
+ $scope.optionals = [];
+ $scope.selectedBlueprintLayer = {};
+ $scope.selectedOptional = "";
+ angular.forEach(
+ $scope.blueprintInstance.blueprintLayers,
+ function(layer) {
+ $scope.blueprintLayers.push(layer.layer);
+ });