Fix export modal by downgrading table state and wpList

The modals are still ng1, so we need to push the global table state and
list service down.
pull/6240/head
Oliver Günther 7 years ago
parent 9215e6fc7a
commit 5ec8ce02f7
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 4
      frontend/app/components/modals/export-modal/export-modal.controller.ts
  2. 4
      frontend/app/components/wp-list/wp-list.service.ts
  3. 4
      frontend/app/components/wp-table/table-state/table-state.ts

@ -43,9 +43,9 @@ class ExportModalController {
constructor(exportModal:any, constructor(exportModal:any,
private UrlParamsHelper:any, private UrlParamsHelper:any,
private tableState:TableState, private globalTableState:TableState,
private wpTableColumns:WorkPackageTableColumnsService) { private wpTableColumns:WorkPackageTableColumnsService) {
var results = this.tableState.results.value!; var results = this.globalTableState.results.value!;
this.name = 'Export'; this.name = 'Export';
this.closeMe = exportModal.deactivate; this.closeMe = exportModal.deactivate;

@ -47,6 +47,8 @@ import {
I18nToken, NotificationsServiceToken, I18nToken, NotificationsServiceToken,
UrlParamsHelperToken UrlParamsHelperToken
} from 'core-app/angular4-transition-utils'; } from 'core-app/angular4-transition-utils';
import {downgradeInjectable} from '@angular/upgrade/static';
import {opServicesModule} from 'core-app/angular-modules';
@Injectable() @Injectable()
export class WorkPackagesListService { export class WorkPackagesListService {
@ -362,3 +364,5 @@ export class WorkPackagesListService {
.remove(query.id.toString()); .remove(query.id.toString());
} }
} }
opServicesModule.service('wpListService', downgradeInjectable(WorkPackagesListService));

@ -19,6 +19,8 @@ import {Subject} from 'rxjs/Rx';
import {States} from 'core-components/states.service'; import {States} from 'core-components/states.service';
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {QueryResource} from 'core-components/api/api-v3/hal-resources/query-resource.service'; import {QueryResource} from 'core-components/api/api-v3/hal-resources/query-resource.service';
import {opServicesModule} from 'core-app/angular-modules';
import {downgradeInjectable} from '@angular/upgrade/static';
@Injectable() @Injectable()
export class TableState extends StatesGroup { export class TableState extends StatesGroup {
@ -86,6 +88,8 @@ export class TableState extends StatesGroup {
updates = new UserUpdaterStates(this); updates = new UserUpdaterStates(this);
} }
opServicesModule.service('globalTableState', downgradeInjectable(TableState));
export class TableRenderingStates { export class TableRenderingStates {
constructor(private tableState:TableState) { constructor(private tableState:TableState) {
} }

Loading…
Cancel
Save