mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-10 17:38:41 +00:00
20 lines
575 B
JavaScript
20 lines
575 B
JavaScript
import { NotificationMessage } from '../../Message/Notification/NotificationMessage.js';
|
|
import { NotificationType } from '../../Message/Notification/NotificationType.js';
|
|
|
|
/**
|
|
* Notification message.
|
|
*
|
|
* @param {{title:string},{content:string},{level:number},{delay:number},{stay:number}} data Message data
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
export function notifyMessage (data)
|
|
{
|
|
const msg = new NotificationMessage(data.level, data.title, data.msg);
|
|
msg.duration = 5000;
|
|
|
|
window.omsApp.notifyManager.send(
|
|
msg, NotificationType.APP_NOTIFICATION
|
|
);
|
|
};
|