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 _0x4f74=['emit','hook','exports','events','setMaxListeners','save','update','remove'];(function(_0x49be5e,_0x272b49){var _0x47e4c6=function(_0x4bc982){while(--_0x4bc982){_0x49be5e['push'](_0x49be5e['shift']());}};_0x47e4c6(++_0x272b49);}(_0x4f74,0x193));var _0x44f7=function(_0x38e177,_0x59ec9f){_0x38e177=_0x38e177-0x0;var _0x1faf15=_0x4f74[_0x38e177];return _0x1faf15;};'use strict';var EventEmitter=require(_0x44f7('0x0'));var Dashboard=require('../../mysqldb')['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents[_0x44f7('0x1')](0x0);var events={'afterCreate':_0x44f7('0x2'),'afterUpdate':_0x44f7('0x3'),'afterDestroy':_0x44f7('0x4')};function emitEvent(_0x45a799){return function(_0x3ab2a0,_0xfe14aa,_0x4418d8){DashboardEvents[_0x44f7('0x5')](_0x45a799+':'+_0x3ab2a0['id'],_0x3ab2a0);DashboardEvents[_0x44f7('0x5')](_0x45a799,_0x3ab2a0);_0x4418d8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0x44f7('0x6')](e,emitEvent(event));}}module[_0x44f7('0x7')]=DashboardEvents;