<commit_before>'use strict';

/**
 * @ngdoc function
 * @name barteguidenMarkedsWebApp.controller:NewCtrl
 * @description
 * # NewCtrl
 * Controller of the barteguidenMarkedsWebApp
 */
angular.module('barteguidenMarkedsWebApp.controllers')
  .controller('NewCtrl', function ($scope, Event) {

    $scope.datepicker = {};
    $scope.event = new Event();
    $scope.category = {};

    $scope.event.shows = [{
      startDate: new Date(),
      endDate: null
    }];

    $scope.add = function () {
      $scope.event.shows.push({
          startDate: new Date(),
          endDate: null
      });
    };

    $scope.remove = function(index) {
      if(index !== 0) {
        $scope.event.shows.splice(index, 1);
      }
    };

    $scope.submit = function() {
      $scope.event.tags.push($scope.category.categoryID);
      console.log($scope.event);
      // event.$save(function() {

      // });
    };
    //datepicker - startPicker
    $scope.format = 'dd. MMMM yyyy';<commit_msg>Add parent models for category and time<commit_after>'use strict';

/**
 * @ngdoc function
 * @name barteguidenMarkedsWebApp.controller:NewCtrl
 * @description
 * # NewCtrl
 * Controller of the barteguidenMarkedsWebApp
 */
angular.module('barteguidenMarkedsWebApp.controllers')
  .controller('NewCtrl', function ($scope, Event) {

    $scope.datepicker = {};
    $scope.event = new Event();
    $scope.time = [];
    $scope.cat = {};

    $scope.event.shows = [{
      startDate: new Date(),
      endDate: null
    }];

    $scope.add = function () {
      $scope.event.shows.push({
          startDate: new Date(),
          endDate: null
      });
    };

    $scope.remove = function(index) {
      if(index !== 0) {
        $scope.event.shows.splice(index, 1);
      }
    };

    $scope.submit = function() {
      if($scope.cat.id) {
        $scope.event.tags.push($scope.cat.id);
      }
      $scope.event.$save(function() {
        console.log('Success');
      });
    };
    //datepicker - startPicker
    $scope.format = 'dd. MMMM yyyy';
{'fraction_non_alphanumeric': 0.16461916461916462, 'fraction_numerical': 0.0019656019656019656, 'mean_word_length': 2.4450084602368864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5912568', 'n_tokens_mistral': 672, 'n_tokens_neox': 652, 'n_words': 113}