From bbb7fafed14d86842988751153b6c8edb52f69a2 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 24 Jan 2019 08:21:00 +0100 Subject: [PATCH] fixed default search on ticket index --- modules/ticket/front/index/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index 878f05b79..f22b8ad83 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -2,16 +2,17 @@ import ngModule from '../module'; import './style.scss'; export default class Controller { - constructor($scope, $state, $stateparams) { + constructor($scope, $state, $stateParams) { this.$ = $scope; - this.$stateparams = $stateparams; + this.$stateParams = $stateParams; this.$state = $state; this.selectedTicket = null; this.moreOptions = [ {callback: this.goToTurns, name: 'Turns', always: true}, ]; - if (!$state && !$stateparams) { + if (!$stateParams.q) { + console.log($stateParams); let today = new Date(); let offset = today.getTimezoneOffset() * 60000; today.setHours(0, 0, 0, 0); @@ -96,7 +97,7 @@ export default class Controller { } } -Controller.$inject = ['$scope', '$state']; +Controller.$inject = ['$scope', '$state', '$stateParams']; ngModule.component('vnTicketIndex', { template: require('./index.html'),