fixed default search on ticket index
This commit is contained in:
parent
288300db41
commit
bbb7fafed1
|
@ -2,16 +2,17 @@ import ngModule from '../module';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
|
||||||
export default class Controller {
|
export default class Controller {
|
||||||
constructor($scope, $state, $stateparams) {
|
constructor($scope, $state, $stateParams) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$stateparams = $stateparams;
|
this.$stateParams = $stateParams;
|
||||||
this.$state = $state;
|
this.$state = $state;
|
||||||
this.selectedTicket = null;
|
this.selectedTicket = null;
|
||||||
this.moreOptions = [
|
this.moreOptions = [
|
||||||
{callback: this.goToTurns, name: 'Turns', always: true},
|
{callback: this.goToTurns, name: 'Turns', always: true},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!$state && !$stateparams) {
|
if (!$stateParams.q) {
|
||||||
|
console.log($stateParams);
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
let offset = today.getTimezoneOffset() * 60000;
|
let offset = today.getTimezoneOffset() * 60000;
|
||||||
today.setHours(0, 0, 0, 0);
|
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', {
|
ngModule.component('vnTicketIndex', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
Loading…
Reference in New Issue