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 _0xcbb1=['remove','hasOwnProperty','hook','exports','../../mysqldb','save','update'];(function(_0x182893,_0x527205){var _0x3bf9e1=function(_0x591d7b){while(--_0x591d7b){_0x182893['push'](_0x182893['shift']());}};_0x3bf9e1(++_0x527205);}(_0xcbb1,0x1d2));var _0x1cbb=function(_0x516118,_0x26acb7){_0x516118=_0x516118-0x0;var _0x4922a8=_0xcbb1[_0x516118];return _0x4922a8;};'use strict';var EventEmitter=require('events');var Dashboard=require(_0x1cbb('0x0'))['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1cbb('0x1'),'afterUpdate':_0x1cbb('0x2'),'afterDestroy':_0x1cbb('0x3')};function emitEvent(_0x12f581){return function(_0x5f4112,_0x751433,_0x308313){DashboardEvents['emit'](_0x12f581+':'+_0x5f4112['id'],_0x5f4112);DashboardEvents['emit'](_0x12f581,_0x5f4112);_0x308313(null);};}for(var e in events){if(events[_0x1cbb('0x4')](e)){var event=events[e];Dashboard[_0x1cbb('0x5')](e,emitEvent(event));}}module[_0x1cbb('0x6')]=DashboardEvents;