File

projects/m2-core/src/lib/core/service/system/notification.service.ts

Index

Properties
Methods

Methods

Public checkErrors
checkErrors(result: Result, errorsHeader?: string, notificationType)
Parameters :
Name Type Optional Default value Description
result Result No

FALSE - no errors, TRUE - has errors

errorsHeader string Yes
notificationType No NotificationType.WARNING
Returns : boolean
Public closeNotification
closeNotification(predicate: (notification: Notification) => void)
Parameters :
Name Type Optional
predicate function No
Returns : void
Public error
error(msg: string | TemplateRef, lifetimeInMs, onCloseClickFn?: () => void, data?: D)
Type parameters :
  • D
Parameters :
Name Type Optional Default value
msg string | TemplateRef<any> No
lifetimeInMs No APP_SETTINGS.NOTIFICATION_LIFETIME
onCloseClickFn function Yes
data D Yes
Returns : void
Public getEntityDetailsMsg
getEntityDetailsMsg(entity, uuid?: string, auxParams?: StringMap<string | number>)
Parameters :
Name Type Optional
entity No
uuid string Yes
auxParams StringMap<string | number> Yes
Returns : string
Public getPermanentNotifications
getPermanentNotifications()

Permanent notifications

Public info
info(msg: string | TemplateRef, lifetimeInMs, onCloseClickFn?: () => void, data?: D)
Type parameters :
  • D
Parameters :
Name Type Optional Default value
msg string | TemplateRef<any> No
lifetimeInMs No APP_SETTINGS.NOTIFICATION_LIFETIME
onCloseClickFn function Yes
data D Yes
Returns : void
Public notify
notify(type: NotificationType, msg: string | TemplateRef, lifetimeInMs, onCloseClickFn?: () => void)
Parameters :
Name Type Optional Default value
type NotificationType No
msg string | TemplateRef<any> No
lifetimeInMs No APP_SETTINGS.NOTIFICATION_LIFETIME
onCloseClickFn function Yes
Returns : void
Public success
success(msg: string | TemplateRef, lifetimeInMs, onCloseClickFn?: () => void, data?: D)
Type parameters :
  • D
Parameters :
Name Type Optional Default value
msg string | TemplateRef<any> No
lifetimeInMs No APP_SETTINGS.NOTIFICATION_LIFETIME
onCloseClickFn function Yes
data D Yes
Returns : void
Public warn
warn(msg: string | TemplateRef, lifetimeInMs, onCloseClickFn?: () => void, data?: D)
Type parameters :
  • D
Parameters :
Name Type Optional Default value
msg string | TemplateRef<any> No
lifetimeInMs No APP_SETTINGS.NOTIFICATION_LIFETIME
onCloseClickFn function Yes
data D Yes
Returns : void

Properties

Public notifications$
Type : Observable<NotificationsConfig>
Default value : this.notificationsSubject.asObservable()

results matching ""

    No results matching ""