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 _0xf398=['hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x1db251,_0xf0443d){var _0x56685a=function(_0x6ec6b7){while(--_0x6ec6b7){_0x1db251['push'](_0x1db251['shift']());}};_0x56685a(++_0xf0443d);}(_0xf398,0x181));var _0x8f39=function(_0x5324a2,_0x55f16c){_0x5324a2=_0x5324a2-0x0;var _0x4f9892=_0xf398[_0x5324a2];return _0x4f9892;};'use strict';var EventEmitter=require(_0x8f39('0x0'));var Dashboard=require(_0x8f39('0x1'))['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents[_0x8f39('0x2')](0x0);var events={'afterCreate':_0x8f39('0x3'),'afterUpdate':_0x8f39('0x4'),'afterDestroy':_0x8f39('0x5')};function emitEvent(_0x58d0fa){return function(_0x2c2360,_0x6337a,_0x79e024){DashboardEvents[_0x8f39('0x6')](_0x58d0fa+':'+_0x2c2360['id'],_0x2c2360);DashboardEvents[_0x8f39('0x6')](_0x58d0fa,_0x2c2360);_0x79e024(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0x8f39('0x7')](e,emitEvent(event));}}module['exports']=DashboardEvents;