1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x061f=['Dashboard','setMaxListeners','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x061f,0x15c));var _0xf061=function(_0x8b7a13,_0x11923b){_0x8b7a13=_0x8b7a13-0x0;var _0x53425a=_0x061f[_0x8b7a13];return _0x53425a;};'use strict';var EventEmitter=require(_0xf061('0x0'));var Dashboard=require(_0xf061('0x1'))['db'][_0xf061('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xf061('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5251f1){return function(_0x12a3f7,_0x4bb872,_0x3d01a5){DashboardEvents['emit'](_0x5251f1+':'+_0x12a3f7['id'],_0x12a3f7);DashboardEvents[_0xf061('0x4')](_0x5251f1,_0x12a3f7);_0x3d01a5(null);};}for(var e in events){if(events[_0xf061('0x5')](e)){var event=events[e];Dashboard['hook'](e,emitEvent(event));}}module[_0xf061('0x6')]=DashboardEvents;