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 _0x777d=['events','Dashboard','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x1a2c50,_0x40b686){var _0xeb852f=function(_0x401699){while(--_0x401699){_0x1a2c50['push'](_0x1a2c50['shift']());}};_0xeb852f(++_0x40b686);}(_0x777d,0x1e0));var _0xd777=function(_0x2575eb,_0x456f3f){_0x2575eb=_0x2575eb-0x0;var _0x1c49da=_0x777d[_0x2575eb];return _0x1c49da;};'use strict';var EventEmitter=require(_0xd777('0x0'));var Dashboard=require('../../mysqldb')['db'][_0xd777('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xd777('0x2')](0x0);var events={'afterCreate':_0xd777('0x3'),'afterUpdate':_0xd777('0x4'),'afterDestroy':_0xd777('0x5')};function emitEvent(_0xefd807){return function(_0x1a1619,_0x98c467,_0x26047d){DashboardEvents[_0xd777('0x6')](_0xefd807+':'+_0x1a1619['id'],_0x1a1619);DashboardEvents[_0xd777('0x6')](_0xefd807,_0x1a1619);_0x26047d(null);};}for(var e in events){if(events[_0xd777('0x7')](e)){var event=events[e];Dashboard[_0xd777('0x8')](e,emitEvent(event));}}module[_0xd777('0x9')]=DashboardEvents;