diff --git a/apps/red-ui/src/app/app-routing.module.ts b/apps/red-ui/src/app/app-routing.module.ts
index a42c3cb55..b6820fa72 100644
--- a/apps/red-ui/src/app/app-routing.module.ts
+++ b/apps/red-ui/src/app/app-routing.module.ts
@@ -6,6 +6,7 @@ import {
IqserAuthGuard,
IqserPermissionsGuard,
IqserRoutes,
+ TenantResolveComponent,
} from '@iqser/common-ui';
import { RedRoleGuard } from '@users/red-role.guard';
import { BaseScreenComponent } from '@components/base-screen/base-screen.component';
@@ -96,11 +97,14 @@ const dossierTemplateIdRoutes: IqserRoutes = [
const routes: IqserRoutes = [
{
path: '',
- redirectTo: 'main',
- pathMatch: 'full',
+ component: TenantResolveComponent,
},
{
- path: 'main',
+ path: ':tenant',
+ component: TenantResolveComponent,
+ },
+ {
+ path: ':tenant/main',
component: BaseScreenComponent,
children: [
{
@@ -212,7 +216,7 @@ const routes: IqserRoutes = [
],
},
{
- path: 'auth-error',
+ path: ':tenant/auth-error',
component: AuthErrorComponent,
canActivate: [IqserAuthGuard],
},
diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts
index 4da89584c..65adfd2ba 100644
--- a/apps/red-ui/src/app/app.module.ts
+++ b/apps/red-ui/src/app/app.module.ts
@@ -12,6 +12,7 @@ import {
CommonUiModule,
EmptyStateComponent,
HiddenActionDirective,
+ IconButtonComponent,
InputWithActionComponent,
IqserAllowDirective,
IqserDenyDirective,
@@ -21,6 +22,7 @@ import {
IqserPermissionsService,
IqserTranslateModule,
IqserUsersModule,
+ KeycloakStatusService,
LanguageService,
LogoComponent,
MAX_RETRIES_ON_SERVER_ERROR,
@@ -29,6 +31,7 @@ import {
ServerErrorInterceptor,
SkeletonComponent,
StopPropagationDirective,
+ TenantsModule,
ToastComponent,
} from '@iqser/common-ui';
import { ToastrModule } from 'ngx-toastr';
@@ -66,13 +69,11 @@ import { AppConfig, ILoggerConfig } from '@red/domain';
import { SystemPreferencesService } from '@services/system-preferences.service';
import { PdfViewerModule } from './modules/pdf-viewer/pdf-viewer.module';
import { LicenseService } from '@services/license.service';
-import { TenantIdInterceptor } from '@utils/tenant-id-interceptor';
import { UI_CACHES } from '@utils/constants';
import { RedRoleGuard } from '@users/red-role.guard';
import { SkeletonTopBarComponent } from '@components/skeleton/skeleton-top-bar/skeleton-top-bar.component';
import { DossierSkeletonComponent } from '@components/skeleton/dossier-skeleton/dossier-skeleton.component';
import { SkeletonStatsComponent } from '@components/skeleton/skeleton-stats/skeleton-stats.component';
-import { TenantIdResponseInterceptor } from '@utils/tenant-id-response-interceptor';
const screens = [BaseScreenComponent, DownloadsListScreenComponent];
@@ -119,6 +120,7 @@ export const appModuleFactory = (config: AppConfig) => {
preventDuplicates: true,
resetTimeoutOnDuplicate: true,
}),
+ TenantsModule.forRoot(),
IqserTranslateModule.forRoot({ pathPrefix: config.BASE_TRANSLATIONS_DIRECTORY || '/assets/i18n/redact/' }),
IqserLoadingModule.forRoot(),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
@@ -170,6 +172,7 @@ export const appModuleFactory = (config: AppConfig) => {
IqserAllowDirective,
IqserDenyDirective,
IqserListingModule,
+ IconButtonComponent,
],
providers: [
{
@@ -181,22 +184,13 @@ export const appModuleFactory = (config: AppConfig) => {
provide: ErrorHandler,
useClass: GlobalErrorHandler,
},
- {
- provide: HTTP_INTERCEPTORS,
- multi: true,
- useClass: TenantIdInterceptor,
- },
- {
- provide: HTTP_INTERCEPTORS,
- multi: true,
- useClass: TenantIdResponseInterceptor,
- },
{
provide: APP_INITIALIZER,
multi: true,
useFactory: configurationInitializer,
deps: [
BASE_HREF,
+ KeycloakStatusService,
KeycloakService,
ConfigService,
SystemPreferencesService,
diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html
index f9f73cfb2..f651a33a1 100644
--- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html
+++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html
@@ -43,6 +43,10 @@
+
+