fixes on tenant urls
This commit is contained in:
parent
2ed4669c4a
commit
854a513c01
|
@ -43,6 +43,7 @@ import { DescriptionTemplateEditorModel, DescriptionTemplateFieldEditorModel, De
|
|||
import { DescriptionTemplateEditorResolver } from './description-template-editor.resolver';
|
||||
import { DescriptionTemplateEditorService } from './description-template-editor.service';
|
||||
import { NewEntryType, ToCEntry, ToCEntryType } from './table-of-contents/description-template-table-of-contents-entry';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -138,7 +139,8 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
|||
private languageInfoService: LanguageInfoService,
|
||||
public userService: UserService,
|
||||
public titleService: Title,
|
||||
private analyticsService: AnalyticsService
|
||||
private analyticsService: AnalyticsService,
|
||||
private routerUtils: RouterUtilsService
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.label;
|
||||
if (descriptionLabel) {
|
||||
|
@ -225,10 +227,10 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
|||
let route = [];
|
||||
|
||||
if (id === null) {
|
||||
route.push('../..');
|
||||
route.push(this.routerUtils.generateUrl('/description-templates/'));
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
} else if (this.isNew || this.isNewVersion || this.isClone) {
|
||||
route.push('/description-templates/' + id);
|
||||
route.push(this.routerUtils.generateUrl('/description-templates/' + id));
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
} else {
|
||||
this.refreshData();
|
||||
|
@ -271,7 +273,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
|||
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
if (close) {
|
||||
this.formGroup = null;
|
||||
this.router.navigate(['/description-templates']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/description-templates')]);
|
||||
} else {
|
||||
this.refreshOnNavigateToData(data ? data.id : null);
|
||||
}
|
||||
|
@ -1270,6 +1272,6 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
|||
}
|
||||
|
||||
public cancel(): void {
|
||||
this.router.navigate(['/description-templates']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/description-templates')]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
|||
private analyticsService: AnalyticsService,
|
||||
public routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -79,7 +79,7 @@ export class DmpBlueprintListingComponent extends BaseListingComponent<DmpBluepr
|
|||
private fileUtils: FileUtils,
|
||||
private analyticsService: AnalyticsService
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.mode = this.route.snapshot?.data['mode'];
|
||||
|
|
|
@ -22,6 +22,7 @@ import { LockService } from '@app/core/services/lock/lock.service';
|
|||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { LockTargetTypePipe } from '@common/formatting/pipes/lock-target-type.pipe';
|
||||
import { User } from '@app/core/model/user/user';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './lock-listing.component.html',
|
||||
|
@ -51,6 +52,7 @@ export class LockListingComponent extends BaseListingComponent<Lock, LockLookup>
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -62,7 +64,7 @@ export class LockListingComponent extends BaseListingComponent<Lock, LockLookup>
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -24,6 +24,7 @@ import * as FileSaver from 'file-saver';
|
|||
import { Observable } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { nameof } from 'ts-simple-nameof';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './user-listing.component.html',
|
||||
|
@ -60,6 +61,7 @@ export class UserListingComponent extends BaseListingComponent<User, UserLookup>
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -72,7 +74,7 @@ export class UserListingComponent extends BaseListingComponent<User, UserLookup>
|
|||
private dialog: MatDialog,
|
||||
private fileUtils: FileUtils
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -3,6 +3,7 @@ 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 { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { Lookup } from '@common/model/lookup';
|
||||
|
@ -60,6 +61,7 @@ export abstract class BaseListingComponent<ItemModel, LookupModel extends Lookup
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -174,7 +176,7 @@ export abstract class BaseListingComponent<ItemModel, LookupModel extends Lookup
|
|||
route += `${baseRoute}/`;
|
||||
}
|
||||
route += event.row.id;
|
||||
this.router.navigate([route], { relativeTo: this.route, queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookup), 'lv': ++this.lv } });
|
||||
this.router.navigate([this.routerUtils.generateUrl(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, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -27,6 +27,7 @@ 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',
|
||||
|
@ -62,6 +63,7 @@ export class NotificationListingComponent extends BaseListingComponent<Notificat
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -73,7 +75,7 @@ export class NotificationListingComponent extends BaseListingComponent<Notificat
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
// Lookup setup
|
||||
// Default lookup values are defined in the user settings class.
|
||||
this.lookup = this.initializeLookup();
|
||||
|
|
|
@ -23,6 +23,7 @@ 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',
|
||||
|
@ -52,6 +53,7 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
|||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
protected route: ActivatedRoute,
|
||||
protected uiNotificationService: UiNotificationService,
|
||||
protected httpErrorHandlingService: HttpErrorHandlingService,
|
||||
|
@ -63,7 +65,7 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
|||
private language: TranslateService,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
|
||||
super(router, routerUtils, 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