Merge pull request #4935 from tsiegleauq/storage-key

Readd filter store keys
This commit is contained in:
Emanuel Schütze 2019-08-21 15:23:29 +02:00 committed by GitHub
commit 8f8c359874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 6 deletions

View File

@ -149,7 +149,7 @@ export abstract class BaseFilterListService<V extends BaseViewModel> {
/** /**
* The key to access stored valued * The key to access stored valued
*/ */
private storageKey: string; protected abstract readonly storageKey: string;
/** /**
* Constructor. * Constructor.
@ -157,10 +157,7 @@ export abstract class BaseFilterListService<V extends BaseViewModel> {
* @param name the name of the filter service * @param name the name of the filter service
* @param store storage service, to read saved filter variables * @param store storage service, to read saved filter variables
*/ */
public constructor(private store: StorageService, private OSStatus: OpenSlidesStatusService) { public constructor(private store: StorageService, private OSStatus: OpenSlidesStatusService) {}
this.storageKey = this.constructor.name;
console.log('storage-key: ', this.storageKey);
}
/** /**
* Initializes the filterService. * Initializes the filterService.

View File

@ -15,6 +15,11 @@ import { ViewItem } from '../models/view-item';
providedIn: 'root' providedIn: 'root'
}) })
export class AgendaFilterListService extends BaseFilterListService<ViewItem> { export class AgendaFilterListService extends BaseFilterListService<ViewItem> {
/**
* set the storage key name
*/
protected storageKey = 'AgendaList';
/** /**
* Constructor. Also creates the dynamic filter options * Constructor. Also creates the dynamic filter options
* *

View File

@ -12,6 +12,11 @@ import { AssignmentPhases, ViewAssignment } from '../models/view-assignment';
providedIn: 'root' providedIn: 'root'
}) })
export class AssignmentFilterListService extends BaseFilterListService<ViewAssignment> { export class AssignmentFilterListService extends BaseFilterListService<ViewAssignment> {
/**
* set the storage key name
*/
protected storageKey = 'AssignmentList';
/** /**
* Constructor. Activates the phase options subscription * Constructor. Activates the phase options subscription
* *

View File

@ -24,10 +24,15 @@ import { ViewMotion } from '../models/view-motion';
}) })
export class AmendmentFilterListService extends MotionFilterListService { export class AmendmentFilterListService extends MotionFilterListService {
/** /**
* Private acessor for an amendment id * Private accessor for an amendment id
*/ */
private _parentMotionId: number; private _parentMotionId: number;
/**
* set the storage key nae
*/
protected storageKey = 'AmendmentList';
/** /**
* publicly get an amendment id * publicly get an amendment id
*/ */

View File

@ -34,6 +34,11 @@ interface WorkflowFilterDesc {
providedIn: 'root' providedIn: 'root'
}) })
export class MotionFilterListService extends BaseFilterListService<ViewMotion> { export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
/**
* set the storage key name
*/
protected storageKey = 'MotionList';
/** /**
* Listen to the configuration for change in defined/used workflows * Listen to the configuration for change in defined/used workflows
*/ */

View File

@ -15,6 +15,11 @@ import { ViewUser } from '../models/view-user';
providedIn: 'root' providedIn: 'root'
}) })
export class UserFilterListService extends BaseFilterListService<ViewUser> { export class UserFilterListService extends BaseFilterListService<ViewUser> {
/**
* set the storage key name
*/
protected storageKey = 'UserList';
private userGroupFilterOptions: OsFilter = { private userGroupFilterOptions: OsFilter = {
property: 'groups_id', property: 'groups_id',
label: 'Groups', label: 'Groups',