fixes on tenant urls
This commit is contained in:
parent
854a513c01
commit
e2efdf416e
|
@ -25,6 +25,7 @@ import { CssColorsTenantConfiguration, TenantConfiguration } from './core/model/
|
|||
import { nameof } from 'ts-simple-nameof';
|
||||
import { TenantHandlingService } from './core/services/tenant/tenant-handling.service';
|
||||
import { BreadcrumbService } from './ui/misc/breadcrumb/breadcrumb.service';
|
||||
import { RouterUtilsService } from './core/services/router/router-utils.service';
|
||||
|
||||
|
||||
declare const gapi: any;
|
||||
|
@ -49,6 +50,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private routerUtils: RouterUtilsService,
|
||||
private route: ActivatedRoute,
|
||||
private authentication: AuthService,
|
||||
private translate: TranslateService,
|
||||
|
@ -118,7 +120,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
if (this.location.path() === '') {
|
||||
if (!this.configurationService.useSplash) {
|
||||
this.onlySplash = false;
|
||||
this.router.navigate(['/home']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/home')]);
|
||||
} else {
|
||||
this.onlySplash = true;
|
||||
this.router.navigate(['/reload']).then(() => this.router.navigate(['/splash']));
|
||||
|
@ -266,7 +268,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
return this.authentication.currentAccountIsAuthenticated();
|
||||
}
|
||||
|
||||
goToDMPs() {
|
||||
goToDMPs() { //not used
|
||||
this.router.navigate(['/plans'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ } });
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<app-hybrid-listing [rows]="gridRows" [columns]="gridColumns" [visibleColumns]="visibleColumns" [count]="totalElements" [offset]="currentPageNumber" [limit]="lookup.page.size" [defaultSort]="lookup.order?.items" [externalSorting]="true" (rowActivated)="onRowActivated($event, '/description-templates')" (pageLoad)="alterPage($event)" (columnSort)="onColumnSort($event)" (columnsChanged)="onColumnsChanged($event)" [listItemTemplate]="listItemTemplate">
|
||||
<app-hybrid-listing [rows]="gridRows" [columns]="gridColumns" [visibleColumns]="visibleColumns" [count]="totalElements" [offset]="currentPageNumber" [limit]="lookup.page.size" [defaultSort]="lookup.order?.items" [externalSorting]="true" (rowActivated)="onRowActivated($event)" (pageLoad)="alterPage($event)" (columnSort)="onColumnSort($event)" (columnsChanged)="onColumnsChanged($event)" [listItemTemplate]="listItemTemplate">
|
||||
|
||||
<app-description-template-listing-filters hybrid-listing-filters [(filter)]="lookup" (filterChange)="filterChanged($event)" />
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
|||
private analyticsService: AnalyticsService,
|
||||
public routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.mode = this.route.snapshot?.data['mode'];
|
||||
|
|
|
@ -66,7 +66,7 @@ export class DescriptionTemplateTypeListingComponent extends BaseListingComponen
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<app-hybrid-listing [rows]="gridRows" [columns]="gridColumns" [visibleColumns]="visibleColumns" [count]="totalElements" [offset]="currentPageNumber" [limit]="lookup.page.size" [defaultSort]="lookup.order?.items" [externalSorting]="true" (rowActivated)="onRowActivated($event, '/dmp-blueprints')" (pageLoad)="alterPage($event)" (columnSort)="onColumnSort($event)" (columnsChanged)="onColumnsChanged($event)" [listItemTemplate]="listItemTemplate">
|
||||
<app-hybrid-listing [rows]="gridRows" [columns]="gridColumns" [visibleColumns]="visibleColumns" [count]="totalElements" [offset]="currentPageNumber" [limit]="lookup.page.size" [defaultSort]="lookup.order?.items" [externalSorting]="true" (rowActivated)="onRowActivated($event)" (pageLoad)="alterPage($event)" (columnSort)="onColumnSort($event)" (columnsChanged)="onColumnsChanged($event)" [listItemTemplate]="listItemTemplate">
|
||||
|
||||
<app-dmp-blueprint-listing-filters hybrid-listing-filters [(filter)]="lookup" (filterChange)="filterChanged($event)" />
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ export class DmpBlueprintListingComponent extends BaseListingComponent<DmpBluepr
|
|||
private fileUtils: FileUtils,
|
||||
private analyticsService: AnalyticsService
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.mode = this.route.snapshot?.data['mode'];
|
||||
|
|
|
@ -52,7 +52,6 @@ export class LockListingComponent extends BaseListingComponent<Lock, LockLookup>
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -64,7 +63,7 @@ export class LockListingComponent extends BaseListingComponent<Lock, LockLookup>
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -63,7 +63,7 @@ export class LanguageListingComponent extends BaseListingComponent<Language, Lan
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -64,7 +64,7 @@ export class PrefillingSourceListingComponent extends BaseListingComponent<Prefi
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -64,7 +64,7 @@ export class ReferenceTypeListingComponent extends BaseListingComponent<Referenc
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -68,7 +68,7 @@ export class ReferenceListingComponent extends BaseListingComponent<Reference, R
|
|||
private dialog: MatDialog,
|
||||
private sumarizeText: SumarizeTextPipe
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -63,7 +63,7 @@ export class TenantListingComponent extends BaseListingComponent<Tenant, TenantL
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -61,7 +61,6 @@ export class UserListingComponent extends BaseListingComponent<User, UserLookup>
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -74,7 +73,7 @@ export class UserListingComponent extends BaseListingComponent<User, UserLookup>
|
|||
private dialog: MatDialog,
|
||||
private fileUtils: FileUtils
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -2,8 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
|
|||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||
import { UserSettingsKey } from '@app/core/model/user-settings/user-settings.model';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
import { UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { Lookup } from '@common/model/lookup';
|
||||
|
@ -61,7 +60,6 @@ export abstract class BaseListingComponent<ItemModel, LookupModel extends Lookup
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -176,7 +174,7 @@ export abstract class BaseListingComponent<ItemModel, LookupModel extends Lookup
|
|||
route += `${baseRoute}/`;
|
||||
}
|
||||
route += event.row.id;
|
||||
this.router.navigate([this.routerUtils.generateUrl(route)], { relativeTo: this.route, queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookup), 'lv': ++this.lv } });
|
||||
this.router.navigate([route], { relativeTo: this.route, queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookup), 'lv': ++this.lv } });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ export class NotificationTemplateListingComponent extends BaseListingComponent<N
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -27,7 +27,6 @@ import { NotificationTrackingStatePipe } from '@common/formatting/pipes/notifica
|
|||
import { NotificationTrackingProcessPipe } from '@common/formatting/pipes/notification-tracking-process.pipe';
|
||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||
import { DataTableDateTimeFormatPipe } from '@app/core/pipes/date-time-format.pipe';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './notification-listing.component.html',
|
||||
|
@ -63,7 +62,6 @@ export class NotificationListingComponent extends BaseListingComponent<Notificat
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -75,7 +73,7 @@ export class NotificationListingComponent extends BaseListingComponent<Notificat
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -23,7 +23,6 @@ import { NotificationTypePipe } from '@common/formatting/pipes/notification-type
|
|||
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
||||
import { DataTableDateTimeFormatPipe } from '@app/core/pipes/date-time-format.pipe';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-mine-inapp-notification-listing',
|
||||
|
@ -53,7 +52,6 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -65,7 +63,7 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
Loading…
Reference in New Issue