core/common/ui-state.service.ts
Properties |
Methods |
Accessors |
constructor(applicationService: ApplicationService, apiService: ApiService, options: OptionsService, fetchClient: FetchClient, tenantLoginOptionsService: TenantLoginOptionsService)
|
||||||||||||||||||
|
Parameters :
|
| assignApplicationKeyToDefaultHeaders |
assignApplicationKeyToDefaultHeaders()
|
|
Returns :
void
|
| getLangs |
getLangs()
|
|
Returns :
any
|
| Async isApplicationAvailable | ||||||||
isApplicationAvailable(name: string)
|
||||||||
|
Checks current users application list and matches it against given application name. Returns true if application is in the list.
Parameters :
Returns :
{}
|
| Async loadManifest |
loadManifest()
|
|
Loads the app manifest. If no access -> throw an error to verify app access.
Returns :
any
|
| Async refreshLoginOptions |
refreshLoginOptions()
|
Decorators :
@throttle(600, {trailing: undefined})
|
|
When this function called, it refreshes the values of loginOptions stored within ui state object. Function is throttled to execute the refresh once in a time specified by params of @throttled decorator, it should be called on leading edge of the timeout.
Returns :
any
|
| setUser | ||||||||
setUser(userInfo: literal type)
|
||||||||
|
Sets current user (including support user).
Parameters :
Returns :
void
|
| Public apiService |
apiService:
|
Type : ApiService
|
| currentSupportUserName |
currentSupportUserName:
|
Type : BehaviorSubject<string | null>
|
Default value : new BehaviorSubject(null)
|
| currentTenant |
currentTenant:
|
Type : BehaviorSubject<ICurrentTenant | null>
|
Default value : new BehaviorSubject(null)
|
| currentUser |
currentUser:
|
Type : BehaviorSubject<IUser | null>
|
Default value : new BehaviorSubject(null)
|
| state |
getstate()
|
|
Returns the current state. |
| uiVersion |
getuiVersion()
|
|
Returns the correct UI version. In hybrid mode for angular and ngx. |