|
|
|
@ -3,7 +3,6 @@ import { |
|
|
|
LocalizationPipe, |
|
|
|
PagedResultDto, |
|
|
|
ReplaceableTemplateDirective, |
|
|
|
SSRService, |
|
|
|
} from '@abp/ng.core'; |
|
|
|
import { |
|
|
|
eFeatureManagementComponents, |
|
|
|
@ -25,7 +24,7 @@ import { |
|
|
|
FormPropData, |
|
|
|
generateFormFromProps, |
|
|
|
} from '@abp/ng.components/extensible'; |
|
|
|
import { Component, inject, Injector, makeStateKey, OnInit, TransferState } from '@angular/core'; |
|
|
|
import { Component, inject, Injector, makeStateKey, OnInit } from '@angular/core'; |
|
|
|
import { |
|
|
|
FormsModule, |
|
|
|
ReactiveFormsModule, |
|
|
|
@ -69,7 +68,6 @@ export class TenantsComponent implements OnInit { |
|
|
|
protected readonly toasterService = inject(ToasterService); |
|
|
|
private readonly fb = inject(UntypedFormBuilder); |
|
|
|
private readonly injector = inject(Injector); |
|
|
|
private readonly ssrService = inject(SSRService); |
|
|
|
|
|
|
|
data: PagedResultDto<TenantDto> = { items: [], totalCount: 0 }; |
|
|
|
|
|
|
|
@ -92,7 +90,7 @@ export class TenantsComponent implements OnInit { |
|
|
|
return Boolean(this.selected.id); |
|
|
|
} |
|
|
|
|
|
|
|
constructor(private transferState: TransferState) {} |
|
|
|
constructor() {} |
|
|
|
|
|
|
|
onVisibleFeaturesChange = (value: boolean) => { |
|
|
|
this.visibleFeatures = value; |
|
|
|
@ -157,19 +155,11 @@ export class TenantsComponent implements OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
hookToQuery() { |
|
|
|
if (this.transferState.hasKey(this.TENANTS_KEY)) { |
|
|
|
this.data = this.transferState.get(this.TENANTS_KEY, { items: [], totalCount: 0 }); |
|
|
|
this.transferState.remove(this.TENANTS_KEY); |
|
|
|
} else { |
|
|
|
this.list |
|
|
|
.hookToQuery(query => this.service.getList(query)) |
|
|
|
.subscribe(res => { |
|
|
|
this.data = res; |
|
|
|
if (this.ssrService.isServer) { |
|
|
|
this.transferState.set(this.TENANTS_KEY, res); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
this.list |
|
|
|
.hookToQuery(query => this.service.getList(query)) |
|
|
|
.subscribe(res => { |
|
|
|
this.data = res; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
onSharedDatabaseChange(value: boolean) { |
|
|
|
|