jsOMS/Model/Action/Message/Log.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

29 lines
712 B
JavaScript

import { NotificationMessage } from '../../../Message/Notification/NotificationMessage.js';
import { NotificationType } from '../../../Message/Notification/NotificationType.js';
/**
* Log.
*
* @param {Object} action Action data
* @param {function} callback Callback
* @param {string} id Action element
*
* @since 1.0.0
*/
export function logAction (action, callback, id)
{
'use strict';
window.omsApp.notifyManager.send(
new NotificationMessage(
action.data[0].status,
action.data[0].title,
action.data[0].message
), NotificationType.APP_NOTIFICATION
);
if (typeof callback === 'function') {
callback();
}
};