Fix
This commit is contained in:
parent
773171f4af
commit
6d97f7588b
@ -3,7 +3,7 @@ import dayjs from 'dayjs';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { List } from '../../utils';
|
||||
import { GenericService } from '../../services';
|
||||
import { Tenant } from '../types';
|
||||
import { Tenant, TenantDetails } from '../types';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface IStoredTenantId {
|
||||
@ -27,7 +27,6 @@ export class TenantsService extends GenericService<Tenant> {
|
||||
key: localStorage.key.bind(localStorage),
|
||||
};
|
||||
readonly #activeTenantId = signal('');
|
||||
|
||||
protected readonly _defaultModelPath = 'tenants';
|
||||
protected readonly _serviceName: string = 'tenant-user-management';
|
||||
|
||||
@ -35,7 +34,7 @@ export class TenantsService extends GenericService<Tenant> {
|
||||
return this.#activeTenantId();
|
||||
}
|
||||
|
||||
async selectTenant(tenantId: string) {
|
||||
async selectTenant(tenantId: string): Promise<boolean> {
|
||||
this.#mutateStorage(tenantId);
|
||||
this.#setActiveTenantId(tenantId);
|
||||
return true;
|
||||
@ -101,7 +100,7 @@ export class TenantsService extends GenericService<Tenant> {
|
||||
this.#logger.info('[TENANTS] Stored tenants at logout: ', storedTenants);
|
||||
}
|
||||
|
||||
getActiveTenant<TD extends Record<string, unknown>>(): Observable<Tenant<TD>> {
|
||||
getActiveTenant<TD extends TenantDetails>(): Observable<Tenant<TD>> {
|
||||
return this._getOne([this.activeTenantId]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user