Readd filter store keys

Adds custom storage keys to the filter list again
prevents a problem that appears on minified code
This commit is contained in:
Sean Engelhardt 2019-08-21 14:53:07 +02:00
parent af0c00c89a
commit 5a7b32e3cd
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
*/
private storageKey: string;
protected abstract readonly storageKey: string;
/**
* Constructor.
@ -157,10 +157,7 @@ export abstract class BaseFilterListService<V extends BaseViewModel> {
* @param name the name of the filter service
* @param store storage service, to read saved filter variables
*/
public constructor(private store: StorageService, private OSStatus: OpenSlidesStatusService) {
this.storageKey = this.constructor.name;
console.log('storage-key: ', this.storageKey);
}
public constructor(private store: StorageService, private OSStatus: OpenSlidesStatusService) {}
/**
* Initializes the filterService.

View File

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

View File

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

View File

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

View File

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

View File

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