jsOMS/Model/Message/Notify.js
Dennis Eichhorn 7b75ec58f7
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
fix permissions
2025-04-02 14:15:07 +00:00

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
);
};