|
@@ -28,11 +28,14 @@ import {noop} from 'angular';
|
|
import {IActionButton, IHelpDeskConfigService, PASSWORD_UI_MODES} from '../../services/helpdesk-config.service';
|
|
import {IActionButton, IHelpDeskConfigService, PASSWORD_UI_MODES} from '../../services/helpdesk-config.service';
|
|
import {IPerson} from '../../models/person.model';
|
|
import {IPerson} from '../../models/person.model';
|
|
import {IChangePasswordSuccess} from '../../components/changepassword/success-change-password.controller';
|
|
import {IChangePasswordSuccess} from '../../components/changepassword/success-change-password.controller';
|
|
|
|
+import LocalStorageService from '../../services/local-storage.service';
|
|
|
|
|
|
-let autogenChangePasswordTemplateUrl = require('../../components/changepassword/autogen-change-password.component.html');
|
|
|
|
|
|
+let autogenChangePasswordTemplateUrl =
|
|
|
|
+ require('../../components/changepassword/autogen-change-password.component.html');
|
|
let helpdeskDetailDialogTemplateUrl = require('./helpdesk-detail-dialog.template.html');
|
|
let helpdeskDetailDialogTemplateUrl = require('./helpdesk-detail-dialog.template.html');
|
|
let randomChangePasswordTemplateUrl = require('../../components/changepassword/random-change-password.component.html');
|
|
let randomChangePasswordTemplateUrl = require('../../components/changepassword/random-change-password.component.html');
|
|
-let successChangePasswordTemplateUrl = require('../../components/changepassword/success-change-password.component.html');
|
|
|
|
|
|
+let successChangePasswordTemplateUrl =
|
|
|
|
+ require('../../components/changepassword/success-change-password.component.html');
|
|
let typeChangePasswordTemplateUrl = require('../../components/changepassword/type-change-password.component.html');
|
|
let typeChangePasswordTemplateUrl = require('../../components/changepassword/type-change-password.component.html');
|
|
let verificationsDialogTemplateUrl = require('./verifications-dialog.template.html');
|
|
let verificationsDialogTemplateUrl = require('./verifications-dialog.template.html');
|
|
|
|
|
|
@@ -50,6 +53,7 @@ export default class HelpDeskDetailComponent {
|
|
person: any;
|
|
person: any;
|
|
personCard: IPerson;
|
|
personCard: IPerson;
|
|
photosEnabled: boolean;
|
|
photosEnabled: boolean;
|
|
|
|
+ searchViewLocalStorageKey: string;
|
|
|
|
|
|
static $inject = [
|
|
static $inject = [
|
|
'$state',
|
|
'$state',
|
|
@@ -57,7 +61,8 @@ export default class HelpDeskDetailComponent {
|
|
'ConfigService',
|
|
'ConfigService',
|
|
'HelpDeskService',
|
|
'HelpDeskService',
|
|
'IasDialogService',
|
|
'IasDialogService',
|
|
- 'IasToggleService'
|
|
|
|
|
|
+ 'IasToggleService',
|
|
|
|
+ 'LocalStorageService'
|
|
];
|
|
];
|
|
|
|
|
|
constructor(private $state: ui.IStateService,
|
|
constructor(private $state: ui.IStateService,
|
|
@@ -65,7 +70,9 @@ export default class HelpDeskDetailComponent {
|
|
private configService: IHelpDeskConfigService,
|
|
private configService: IHelpDeskConfigService,
|
|
private helpDeskService: IHelpDeskService,
|
|
private helpDeskService: IHelpDeskService,
|
|
private IasDialogService: any,
|
|
private IasDialogService: any,
|
|
- private toggleService: { showComponent: (componentName: string) => null }) {
|
|
|
|
|
|
+ private toggleService: { showComponent: (componentName: string) => null },
|
|
|
|
+ private localStorageService: LocalStorageService) {
|
|
|
|
+ this.searchViewLocalStorageKey = this.localStorageService.keys.HELPDESK_SEARCH_VIEW;
|
|
}
|
|
}
|
|
|
|
|
|
$onInit(): void {
|
|
$onInit(): void {
|
|
@@ -353,7 +360,13 @@ export default class HelpDeskDetailComponent {
|
|
}
|
|
}
|
|
|
|
|
|
gotoSearch(): void {
|
|
gotoSearch(): void {
|
|
- this.$state.go('search.cards');
|
|
|
|
|
|
+ let view = this.localStorageService.getItem(this.searchViewLocalStorageKey);
|
|
|
|
+ if (view) {
|
|
|
|
+ this.$state.go(view);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$state.go('search.cards');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
initialize(): void {
|
|
initialize(): void {
|