fixed default search on ticket index

This commit is contained in:
Gerard 2019-01-24 08:21:00 +01:00
parent 288300db41
commit bbb7fafed1
1 changed files with 5 additions and 4 deletions

View File

@ -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'),