fixes on tenant urls
This commit is contained in:
parent
d4b15ff65d
commit
5142e5cd56
|
@ -4,6 +4,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '../../../core/services/auth/auth.service';
|
||||
import { Observable, Subscription, fromEvent } from 'rxjs';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-dialog-component',
|
||||
|
@ -21,6 +22,7 @@ export class UserDialogComponent implements OnInit, OnDestroy {
|
|||
private authentication: AuthService,
|
||||
private router: Router,
|
||||
public dialogRef: MatDialogRef<UserDialogComponent>,
|
||||
private routerUtils: RouterUtilsService,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) { }
|
||||
|
||||
|
@ -68,6 +70,6 @@ export class UserDialogComponent implements OnInit, OnDestroy {
|
|||
|
||||
public navigateToMyDmps() {
|
||||
this.dialogRef.close();
|
||||
this.router.navigate(['/plans']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/plans')]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,13 +9,11 @@ import { SupportiveMaterial, SupportiveMaterialPersist } from '@app/core/model/s
|
|||
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||
import { LanguageHttpService } from '@app/core/services/language/language.http.service';
|
||||
import { LanguageService } from '@app/core/services/language/language.service';
|
||||
import { LockService } from '@app/core/services/lock/lock.service';
|
||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
|
||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||
import { BaseEditor } from '@common/base/base-editor';
|
||||
import { FormService } from '@common/forms/form-service';
|
||||
|
@ -28,6 +26,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { SupportiveMaterialEditorModel } from './supportive-material-editor.model';
|
||||
import { SupportiveMaterialEditorResolver } from './supportive-material-editor.resolver';
|
||||
import { SupportiveMaterialEditorService } from './supportive-material-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -63,11 +62,10 @@ export class SupportiveMaterialEditorComponent extends BaseEditor<SupportiveMate
|
|||
// Rest dependencies. Inject any other needed deps here:
|
||||
public enumUtils: EnumUtils,
|
||||
private supportiveMaterialService: SupportiveMaterialService,
|
||||
private languageService: LanguageService,
|
||||
private languageV2Service: LanguageHttpService,
|
||||
private logger: LoggingService,
|
||||
private supportiveMaterialEditorService: SupportiveMaterialEditorService,
|
||||
private fileUtils: FileUtils,
|
||||
private routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, route, queryParamsService, lockService, authService, configurationService);
|
||||
}
|
||||
|
@ -112,17 +110,8 @@ export class SupportiveMaterialEditorComponent extends BaseEditor<SupportiveMate
|
|||
|
||||
refreshOnNavigateToData(id?: Guid): void {
|
||||
this.formGroup.markAsPristine();
|
||||
let route = [];
|
||||
|
||||
if (id === null) {
|
||||
route.push('../..');
|
||||
} else if (this.isNew) {
|
||||
route.push('../' + id);
|
||||
} else {
|
||||
route.push('..');
|
||||
}
|
||||
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
this.router.navigate([this.routerUtils.generateUrl('supportive-material')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
|
@ -35,6 +35,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { NotificationTemplateEditorModel } from './notification-template-editor.model';
|
||||
import { NotificationTemplateEditorResolver } from './notification-template-editor.resolver';
|
||||
import { NotificationTemplateEditorService } from './notification-template-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-notification-template-editor',
|
||||
|
@ -98,6 +99,7 @@ export class NotificationTemplateEditorComponent extends BaseEditor<Notification
|
|||
private logger: LoggingService,
|
||||
private titleService: Title,
|
||||
private analyticsService: AnalyticsService,
|
||||
private routerUtils: RouterUtilsService,
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.notificationType;
|
||||
if (descriptionLabel) {
|
||||
|
@ -175,17 +177,8 @@ export class NotificationTemplateEditorComponent extends BaseEditor<Notification
|
|||
|
||||
refreshOnNavigateToData(id?: Guid): void {
|
||||
this.formGroup.markAsPristine();
|
||||
let route = [];
|
||||
|
||||
if (id === null) {
|
||||
route.push('../..');
|
||||
} else if (this.isNew) {
|
||||
route.push('../' + id);
|
||||
} else {
|
||||
route.push('..');
|
||||
}
|
||||
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
this.router.navigate([this.routerUtils.generateUrl('notification-templates')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
Loading…
Reference in New Issue