<commit_before>'use strict';

angular.module('BB.Directives').directive 'bbServices', () ->
  restrict: 'AE'
  replace: true
  scope : true
  controller : 'ServiceList'
  link : (scope, element, attrs) ->

    scope.options = scope.$eval(attrs.bbServices) or {}

    if attrs.bbItem
      scope.booking_item = scope.$eval( attrs.bbItem )
    if attrs.bbShowAll or scope.options.show_all 
      scope.show_all = true
    if scope.options.allow_single_pick
      scope.allowSinglePick = true
    return


angular.module('BB.Controllers').controller 'ServiceList',($scope,  $rootScope, $q, $attrs, $modal, $sce, ItemService, FormDataStoreService, ValidatorService, PageControllerService, halClient, AlertService, ErrorService, $filter, CategoryService, BBModel) ->

  $scope.controller = "public.controllers.ServiceList"
  FormDataStoreService.init 'ServiceList', $scope, [
    'service'
  ]
  $scope.notLoaded $scope
  angular.extend(this, new PageControllerService($scope, $q))

  $scope.validator = ValidatorService

  $scope.filters = {price: {}, name: null}

  $rootScope.connection_started.then () =>
    if $scope.bb.company
      $scope.init($scope.bb.company)
  , (err) ->  $scope.setLoadedAndShowError($scope, err, 'Sorry, something went wrong')


  $scope.init = (comp) ->
    $scope.booking_item ||= $scope.bb.current_item
<commit_msg>no longer include BBModel in service list controller<commit_after>'use strict';

angular.module('BB.Directives').directive 'bbServices', () ->
  restrict: 'AE'
  replace: true
  scope : true
  controller : 'ServiceList'
  link : (scope, element, attrs) ->

    scope.options = scope.$eval(attrs.bbServices) or {}

    if attrs.bbItem
      scope.booking_item = scope.$eval( attrs.bbItem )
    if attrs.bbShowAll or scope.options.show_all 
      scope.show_all = true
    if scope.options.allow_single_pick
      scope.allowSinglePick = true
    return


angular.module('BB.Controllers').controller 'ServiceList',($scope,  $rootScope, $q, $attrs, $modal, $sce, ItemService, FormDataStoreService, ValidatorService, PageControllerService, halClient, AlertService, ErrorService, $filter, CategoryService) ->

  $scope.controller = "public.controllers.ServiceList"
  FormDataStoreService.init 'ServiceList', $scope, [
    'service'
  ]
  $scope.notLoaded $scope
  angular.extend(this, new PageControllerService($scope, $q))

  $scope.validator = ValidatorService

  $scope.filters = {price: {}, name: null}

  $rootScope.connection_started.then () =>
    if $scope.bb.company
      $scope.init($scope.bb.company)
  , (err) ->  $scope.setLoadedAndShowError($scope, err, 'Sorry, something went wrong')


  $scope.init = (comp) ->
    $scope.booking_item ||= $scope.bb.current_item

{'fraction_non_alphanumeric': 0.1364974245768948, 'fraction_numerical': 0.0, 'mean_word_length': 4.238921001926783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3431723', 'n_tokens_mistral': 864, 'n_tokens_neox': 851, 'n_words': 176}