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 _0x1b7e=['exports','events','../../mysqldb','Dashboard','setMaxListeners','update','remove','emit','hook'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0x1b7e,0x64));var _0xe1b7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1b7e[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0xe1b7('0x0'));var Dashboard=require(_0xe1b7('0x1'))['db'][_0xe1b7('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xe1b7('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe1b7('0x4'),'afterDestroy':_0xe1b7('0x5')};function emitEvent(_0x49c1d9){return function(_0x2c8d13,_0x50489a,_0x387a13){DashboardEvents[_0xe1b7('0x6')](_0x49c1d9+':'+_0x2c8d13['id'],_0x2c8d13);DashboardEvents['emit'](_0x49c1d9,_0x2c8d13);_0x387a13(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0xe1b7('0x7')](e,emitEvent(event));}}module[_0xe1b7('0x8')]=DashboardEvents;