try fix imports
This commit is contained in:
parent
8ac4bbfd9f
commit
a71e094e55
@ -1,4 +1,3 @@
|
||||
export * from './lib/common-ui.module';
|
||||
export * from './lib/buttons';
|
||||
export * from './lib/dialog';
|
||||
export * from './lib/form';
|
||||
@ -6,7 +5,6 @@ export * from './lib/listing';
|
||||
export * from './lib/help-mode';
|
||||
export * from './lib/inputs';
|
||||
export * from './lib/services';
|
||||
export * from './lib/shared';
|
||||
export * from './lib/loading';
|
||||
export * from './lib/error';
|
||||
export * from './lib/search';
|
||||
@ -17,4 +15,3 @@ export * from './lib/translations';
|
||||
export * from './lib/pipes';
|
||||
export * from './lib/permissions';
|
||||
export * from './lib/directives';
|
||||
export * from './lib/tenants';
|
||||
|
||||
@ -11,12 +11,11 @@ import { IFilter } from './models/filter.model';
|
||||
|
||||
@Injectable()
|
||||
export class FilterService {
|
||||
readonly showResetFilters$: Observable<boolean>;
|
||||
readonly filterGroups$: Observable<IFilterGroup[]>;
|
||||
|
||||
readonly #singleFilters = new Map<string, BehaviorSubject<IFilter | undefined>>();
|
||||
readonly #filterGroups$ = new BehaviorSubject<IFilterGroup[]>([]);
|
||||
readonly #refresh$ = new Subject();
|
||||
readonly showResetFilters$: Observable<boolean>;
|
||||
readonly filterGroups$: Observable<IFilterGroup[]>;
|
||||
|
||||
constructor() {
|
||||
this.filterGroups$ = this.#refresh$.pipe(
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
import { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';
|
||||
import { inject } from '@angular/core';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
|
||||
export const ifNotLoggedIn: CanActivateFn = async (route: ActivatedRouteSnapshot) => {
|
||||
const logger = inject(NGXLogger);
|
||||
const router = inject(Router);
|
||||
const keycloakService = inject(KeycloakService);
|
||||
|
||||
const isLoggedIn = await keycloakService.isLoggedIn();
|
||||
|
||||
if (!isLoggedIn) {
|
||||
logger.info('[ROUTES] Not logged in, continuing to selected route');
|
||||
return true;
|
||||
}
|
||||
|
||||
const tenant = route.paramMap.get('tenant') || keycloakService.getKeycloakInstance().realm;
|
||||
if (!tenant) {
|
||||
logger.error('[ROUTES] Tenant not found in route or keycloak realm');
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.warn('[ROUTES] Is logged in for ' + tenant + ', redirecting to /' + tenant);
|
||||
await router.navigate([tenant]);
|
||||
return false;
|
||||
};
|
||||
@ -1,5 +1,4 @@
|
||||
export * from './keycloak-initializer';
|
||||
export * from './guards/if-not-logged-in.guard';
|
||||
export * from './services';
|
||||
export * from './tenant.pipe';
|
||||
export * from './tenants.module';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user