Compare commits
5 Commits
d42fb1896d
...
a42ad70a47
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | a42ad70a47 | |
Sofia Papacharalampous | 14b2645539 | |
Sofia Papacharalampous | e2efdf416e | |
Sofia Papacharalampous | 854a513c01 | |
Sofia Papacharalampous | 2ed4669c4a |
|
@ -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*/ } });
|
||||
}
|
||||
|
||||
|
|
|
@ -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')]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)" />
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { DescriptionTemplateTypeEditorModel } from './description-template-type-editor.model';
|
||||
import { DescriptionTemplateTypeEditorResolver } from './description-template-type-editor.resolver';
|
||||
import { DescriptionTemplateTypeEditorService } from './description-template-type-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './description-template-type-editor.component.html',
|
||||
|
@ -78,7 +79,8 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor<Descripti
|
|||
private descriptionTemplateTypeService: DescriptionTemplateTypeService,
|
||||
private logger: LoggingService,
|
||||
private descriptionTemplateTypeEditorService: DescriptionTemplateTypeEditorService,
|
||||
public titleService: Title
|
||||
public titleService: Title,
|
||||
protected routerUtils: RouterUtilsService
|
||||
) {
|
||||
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.name;
|
||||
|
@ -130,17 +132,8 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor<Descripti
|
|||
|
||||
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('/description-template-type')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
@ -150,8 +143,7 @@ export class DescriptionTemplateTypeEditorComponent extends BaseEditor<Descripti
|
|||
.pipe(takeUntil(this._destroyed)).subscribe(
|
||||
// for each state navigate to listing page
|
||||
complete => {
|
||||
this.formGroup = null;
|
||||
this.router.navigate(['description-template-type'])
|
||||
this.onCallbackSuccess();
|
||||
},
|
||||
error => this.onCallbackError(error)
|
||||
);
|
||||
|
|
|
@ -44,6 +44,7 @@ import { DescriptionTemplatePreviewDialogComponent } from '../../description-tem
|
|||
import { DmpBlueprintEditorModel, FieldInSectionEditorModel } from './dmp-blueprint-editor.model';
|
||||
import { DmpBlueprintEditorResolver } from './dmp-blueprint-editor.resolver';
|
||||
import { DmpBlueprintEditorService } from './dmp-blueprint-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -133,6 +134,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
|
|||
public prefillingSourceService: PrefillingSourceService,
|
||||
public titleService: Title,
|
||||
private analyticsService: AnalyticsService,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.label;
|
||||
if (descriptionLabel) {
|
||||
|
@ -212,7 +214,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
|
|||
this.formGroup.markAsPristine();
|
||||
if (this.isNew || this.isNewVersion) {
|
||||
let route = [];
|
||||
route.push('/dmp-blueprints/' + id);
|
||||
route.push(this.routerUtils.generateUrl('/dmp-blueprints/' + id));
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
} else {
|
||||
this.refreshData(id);
|
||||
|
@ -554,7 +556,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
|
|||
}
|
||||
|
||||
public cancel(): void {
|
||||
this.router.navigate(['/dmp-blueprints']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/dmp-blueprints')]);
|
||||
}
|
||||
|
||||
finalize() {
|
||||
|
|
|
@ -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)" />
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -29,6 +29,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { LanguageEditorModel } from './language-editor.model';
|
||||
import { LanguageEditorResolver } from './language-editor.resolver';
|
||||
import { LanguageEditorService } from './language-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -84,7 +85,8 @@ export class LanguageEditorComponent extends BaseEditor<LanguageEditorModel, Lan
|
|||
private languageEditorService: LanguageEditorService,
|
||||
private fileUtils: FileUtils,
|
||||
private titleService: Title,
|
||||
private analyticsService: AnalyticsService
|
||||
private analyticsService: AnalyticsService,
|
||||
protected routerUtils: RouterUtilsService
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.code;
|
||||
if (descriptionLabel) {
|
||||
|
@ -103,7 +105,7 @@ export class LanguageEditorComponent extends BaseEditor<LanguageEditorModel, Lan
|
|||
.subscribe(
|
||||
data => this.availableLanguageCodes = data.items,
|
||||
error => {
|
||||
this.router.navigate(['/languages']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/languages')]);
|
||||
this.httpErrorHandlingService.handleBackedRequestError(error);
|
||||
}
|
||||
);
|
||||
|
@ -143,17 +145,8 @@ export class LanguageEditorComponent extends BaseEditor<LanguageEditorModel, Lan
|
|||
|
||||
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('/languages')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
|
@ -3,6 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|||
import { Router } from '@angular/router';
|
||||
import { MaintenanceService } from '@app/core/services/maintenance/maintenance.service';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
@ -22,6 +23,7 @@ export class MaintenanceTasksComponent extends BaseComponent implements OnInit {
|
|||
private uiNotificationService: UiNotificationService,
|
||||
private translate: TranslateService,
|
||||
private router: Router,
|
||||
private routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
@ -217,7 +219,7 @@ export class MaintenanceTasksComponent extends BaseComponent implements OnInit {
|
|||
|
||||
onCallbackSuccess(): void {
|
||||
this.uiNotificationService.snackBarNotification(this.translate.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
this.router.navigate(['/reload']).then(() => this.router.navigate(['/maintenance-tasks']));
|
||||
this.router.navigate(['/reload']).then(() => this.router.navigate([this.routerUtils.generateUrl('/maintenance-tasks')]));
|
||||
}
|
||||
|
||||
onCallbackError(error: any) {
|
||||
|
|
|
@ -29,6 +29,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { PrefillingSourceDefinitionEditorModel, PrefillingSourceEditorModel } from './prefilling-source-editor.model';
|
||||
import { PrefillingSourceEditorResolver } from './prefilling-source-editor.resolver';
|
||||
import { PrefillingSourceEditorService } from './prefilling-source-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-prefilling-source-editor-component',
|
||||
|
@ -75,7 +76,8 @@ export class PrefillingSourceEditorComponent extends BaseEditor<PrefillingSource
|
|||
private logger: LoggingService,
|
||||
private prefillingSourceEditorService: PrefillingSourceEditorService,
|
||||
private titleService: Title,
|
||||
private analyticsService: AnalyticsService
|
||||
private analyticsService: AnalyticsService,
|
||||
private routerUtils: RouterUtilsService
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.label;
|
||||
if (descriptionLabel) {
|
||||
|
@ -126,17 +128,8 @@ export class PrefillingSourceEditorComponent extends BaseEditor<PrefillingSource
|
|||
|
||||
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('/prefilling-sources')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
|
@ -29,6 +29,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { ReferenceTypeEditorModel } from './reference-type-editor.model';
|
||||
import { ReferenceTypeEditorResolver } from './reference-type-editor.resolver';
|
||||
import { ReferenceTypeEditorService } from './reference-type-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-reference-type-editor-component',
|
||||
|
@ -86,7 +87,8 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
|
|||
public referenceTypeService: ReferenceTypeService,
|
||||
private logger: LoggingService,
|
||||
private referenceTypeEditorService: ReferenceTypeEditorService,
|
||||
private titleService: Title
|
||||
private titleService: Title,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
) {
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.name;
|
||||
if (descriptionLabel) {
|
||||
|
@ -138,17 +140,8 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
|
|||
|
||||
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('/reference-type')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
@ -332,7 +325,7 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
|
|||
})
|
||||
},
|
||||
error => {
|
||||
this.router.navigate(['/reference-type']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('/reference-type')]);
|
||||
this.httpErrorHandlingService.handleBackedRequestError(error);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { ReferenceEditorModel } from './reference-editor.model';
|
||||
import { ReferenceEditorResolver } from './reference-editor.resolver';
|
||||
import { ReferenceEditorService } from './reference-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -87,7 +88,8 @@ export class ReferenceEditorComponent extends BaseEditor<ReferenceEditorModel, R
|
|||
private fileUtils: FileUtils,
|
||||
public referenceTypeService: ReferenceTypeService,
|
||||
public titleService: Title,
|
||||
private analyticsService: AnalyticsService
|
||||
private analyticsService: AnalyticsService,
|
||||
private routerUtils: RouterUtilsService
|
||||
) {
|
||||
|
||||
const descriptionLabel: string = route.snapshot.data['entity']?.label;
|
||||
|
@ -135,17 +137,8 @@ export class ReferenceEditorComponent extends BaseEditor<ReferenceEditorModel, R
|
|||
|
||||
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('/references')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
|
@ -14,7 +14,6 @@ import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { TenantService } from '@app/core/services/tenant/tenant.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';
|
||||
|
@ -27,6 +26,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
import { TenantEditorModel } from './tenant-editor.model';
|
||||
import { TenantEditorResolver } from './tenant-editor.resolver';
|
||||
import { TenantEditorService } from './tenant-editor.service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -80,8 +80,8 @@ export class TenantEditorComponent extends BaseEditor<TenantEditorModel, Tenant>
|
|||
private tenantService: TenantService,
|
||||
private logger: LoggingService,
|
||||
private tenantEditorService: TenantEditorService,
|
||||
private fileUtils: FileUtils,
|
||||
private analyticsService: AnalyticsService
|
||||
private analyticsService: AnalyticsService,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, route, queryParamsService, lockService, authService, configurationService);
|
||||
}
|
||||
|
@ -123,15 +123,8 @@ export class TenantEditorComponent extends BaseEditor<TenantEditorModel, Tenant>
|
|||
|
||||
refreshOnNavigateToData(id?: Guid): void {
|
||||
this.formGroup.markAsPristine();
|
||||
let route = [];
|
||||
|
||||
if (id === null) {
|
||||
route.push('../..');
|
||||
} 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('/tenants')], { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
}
|
||||
|
||||
persistEntity(onSuccess?: (response) => void): void {
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -7,6 +7,7 @@ import { AnnotationLookup } from '@annotation-service/core/query/annotation.look
|
|||
import { AnnotationService } from '@annotation-service/services/http/annotation.service';
|
||||
import { AnnotationProtectionType } from '@app/core/common/enum/annotation-protection-type.enum';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||
import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
|
@ -54,6 +55,7 @@ export class AnnotationDialogComponent extends BaseComponent {
|
|||
private annotationService: AnnotationService,
|
||||
private formService: FormService,
|
||||
private enumUtils: EnumUtils,
|
||||
protected routerUtils: RouterUtilsService,
|
||||
) {
|
||||
super();
|
||||
this.entityId = data.entityId;
|
||||
|
@ -204,8 +206,8 @@ export class AnnotationDialogComponent extends BaseComponent {
|
|||
this.dialogRef.close(this.changesMade);
|
||||
}
|
||||
|
||||
startWizard() {
|
||||
this.router.navigate(['/plans/new']);
|
||||
startWizard() { // not used
|
||||
this.router.navigate([this.routerUtils.generateUrl('/plans/new')]);
|
||||
this.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { HttpErrorResponse } from "@angular/common/http";
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { SnackBarNotificationLevel } from '@app/core/services/notification/ui-notification-service';
|
||||
import { RouterUtilsService } from "@app/core/services/router/router-utils.service";
|
||||
import { UserService } from "@app/core/services/user/user.service";
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { HttpError, HttpErrorHandlingService } from "@common/modules/errors/error-handling/http-error-handling.service";
|
||||
|
@ -29,8 +30,8 @@ export class MergeEmailConfirmation extends BaseComponent implements OnInit {
|
|||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private language: TranslateService,
|
||||
private uiNotificationService: UiNotificationService,
|
||||
private httpErrorHandlingService: HttpErrorHandlingService
|
||||
private httpErrorHandlingService: HttpErrorHandlingService,
|
||||
private routerUtils: RouterUtilsService
|
||||
) { super(); }
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -64,7 +65,7 @@ export class MergeEmailConfirmation extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
onCallbackEmailConfirmationSuccess() {
|
||||
this.router.navigate(['home'])
|
||||
this.router.navigate([this.routerUtils.generateUrl('home')])
|
||||
.then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
|
@ -78,7 +79,7 @@ export class MergeEmailConfirmation extends BaseComponent implements OnInit {
|
|||
|
||||
const error: HttpError = this.httpErrorHandlingService.getError(errorResponse);
|
||||
if (error.statusCode === 302) {
|
||||
this.router.navigate(['home']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('home')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
import { UserService } from '@app/core/services/user/user.service';
|
||||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||
|
@ -26,7 +26,7 @@ export class UnlinkEmailConfirmation extends BaseComponent implements OnInit {
|
|||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private language: TranslateService,
|
||||
private uiNotificationService: UiNotificationService,
|
||||
private routerUtils: RouterUtilsService,
|
||||
private httpErrorHandlingService: HttpErrorHandlingService
|
||||
) { super(); }
|
||||
|
||||
|
@ -54,7 +54,7 @@ export class UnlinkEmailConfirmation extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
onCallbackConfirmationSuccess() {
|
||||
this.router.navigate(['home']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('home')]);
|
||||
}
|
||||
|
||||
onCallbackError(errorResponse: HttpErrorResponse) {
|
||||
|
@ -66,7 +66,7 @@ export class UnlinkEmailConfirmation extends BaseComponent implements OnInit {
|
|||
|
||||
const error: HttpError = this.httpErrorHandlingService.getError(errorResponse);
|
||||
if (error.statusCode === 302) {
|
||||
this.router.navigate(['home']);
|
||||
this.router.navigate([this.routerUtils.generateUrl('home')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ export class DashboardComponent extends BaseComponent implements OnInit {
|
|||
if (result.startNewDmp) {
|
||||
this.openNewDmpDialog();
|
||||
} else {
|
||||
this.router.navigate(['/plans', 'edit', result.formGroup.get('dmpId').value]);
|
||||
this.router.navigate([this.routerUtils.generateUrl(['/plans/', 'edit/', result.formGroup.get('dmpId').value])]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -277,7 +277,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
|
||||
if (this.isNew || this.isCopy) {
|
||||
let route = [];
|
||||
route.push('/descriptions/edit/' + id);
|
||||
route.push(this.routerUtils.generateUrl('/descriptions/edit/' + id));
|
||||
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
|
||||
} else {
|
||||
this.refreshData();
|
||||
|
@ -403,7 +403,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
}
|
||||
|
||||
backToDmp(dmpId) {
|
||||
this.router.navigate(['/plans', 'edit', dmpId]);
|
||||
this.router.navigate([this.routerUtils.generateUrl(['/plans/', 'edit/', dmpId])]);
|
||||
}
|
||||
|
||||
private showSaveStateValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) {
|
||||
|
@ -689,8 +689,8 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
return [];
|
||||
}
|
||||
|
||||
public cancel(): void {
|
||||
this.router.navigate(['/descriptions']);
|
||||
public cancel(): void { //not used
|
||||
this.router.navigate([this.routerUtils.generateUrl('/descriptions')]);
|
||||
}
|
||||
|
||||
finalize() {
|
||||
|
|
|
@ -340,7 +340,7 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
|
|||
if (result.startNewDmp) {
|
||||
this.openNewDmpDialog();
|
||||
} else {
|
||||
this.router.navigate(['/plans', 'edit', result.formGroup.get('dmpId').value]);
|
||||
this.router.navigate([this.routerUtils.generateUrl(['/plans/', 'edit/', result.formGroup.get('dmpId').value])]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<div class="icon-bar2"></div>
|
||||
<div class="icon-bar3"></div>
|
||||
</div>
|
||||
<a class="logo" [routerLink]="['home']"><img class="logo-image" src="../../../assets/images/nav-logo.png"></a>
|
||||
<a class="logo" [routerLink]="routerUtils.generateUrl(['home'])"><img class="logo-image" src="../../../assets/images/nav-logo.png"></a>
|
||||
<ng-container>
|
||||
<a class="extra-logo" [routerLink]="['home']"><img class="extra-logo-image" [src]="extraImageURL"></a>
|
||||
<a class="extra-logo" [routerLink]="routerUtils.generateUrl(['home'])"><img class="extra-logo-image" [src]="extraImageURL"></a>
|
||||
</ng-container>
|
||||
<button class="navbar-toggler ml-auto" type="button" [matMenuTriggerFor]="toggleMenu">
|
||||
<img *ngIf="this.isAuthenticated();else loginoption" mat-card-avatar class="my-mat-card-avatar" [src]="getPrincipalAvatar() ?? getDefaultAvatar()" (error)="this.applyFallbackAvatar($event)">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Location } from '@angular/common';
|
||||
import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
||||
|
@ -26,6 +26,7 @@ import { nameof } from 'ts-simple-nameof';
|
|||
import { StartNewDmpDialogComponent } from '../dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
||||
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
||||
import { UserDialogComponent } from './user-dialog/user-dialog.component';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navbar',
|
||||
|
@ -51,9 +52,9 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|||
extraImageURL: SafeUrl;
|
||||
|
||||
constructor(location: Location,
|
||||
private element: ElementRef,
|
||||
private router: Router,
|
||||
public routerUtils: RouterUtilsService,
|
||||
public authentication: AuthService,
|
||||
private router: Router,
|
||||
private userService: UserService,
|
||||
private dialog: MatDialog,
|
||||
private progressIndicationService: ProgressIndicationService,
|
||||
|
|
|
@ -2,7 +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 { 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';
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<mat-icon>more_horiz</mat-icon>
|
||||
</button>
|
||||
<mat-menu #actionsMenu="matMenu">
|
||||
<button mat-menu-item [routerLink]="routerUtils.generateUrl(['/notification-templates/' + row.id])">
|
||||
<button mat-menu-item [routerLink]="routerUtils.generateUrl(['/notification-templates/', row.id])">
|
||||
<mat-icon>edit</mat-icon>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-LISTING.ACTIONS.EDIT' | translate}}
|
||||
</button>
|
||||
<button mat-menu-item (click)="deleteType(row.id)">
|
||||
|
|
Loading…
Reference in New Issue