@propmix/profet-eula
v1.0.0
Published
A library to show EULA dialog box based on the current user in Profet suite of applications.
Downloads
32
Readme
Profet EULA
A library to show EULA dialog box based on the current user in Profet suite of applications.
Peer Dependencies
Make sure you have the following minimum versions of dependencies installed.
- Angular 15.0.0 or higher
- Angular Material 15.0.0 or higher
- RxJS 7.0.0 or higher
Installation
npm install @propmix/profet-eula
Configuring
The library requires only one configuration, i.e. the Profet Portal backend base URL.
This configuration can be provided using the PROFET_EULA_CONFIG
injection token through a module or a standalone component.
@NgModule({
providers: [
...
{
provide: 'PROFET_EULA_CONFIG',
useValue: { portalBackendBaseUrl: ENV.portalBackendBaseUrl }
},
]
})
Usage
The library exports only one service function i.e. ProfetEulaService.verify()
which should be called after user authentication is complete. If the user has not accepted the EULA, the dialog box will be shown to the user.
import { ProfetEulaService } from 'profet-eula';
constructor( private profetEulaService: ProfetEulaService ) {}
this.profetEulaService.verify();
Interfaces
ProfetEulaConfig
{
portalBackendBaseUrl: string; // Base URL of Profet Portal backend without trailing slash.
}