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 _0xc801=['../../mysqldb','setMaxListeners','update','remove','emit','hook','events'];(function(_0x3118cc,_0x5066e6){var _0x127e19=function(_0x3e1152){while(--_0x3e1152){_0x3118cc['push'](_0x3118cc['shift']());}};_0x127e19(++_0x5066e6);}(_0xc801,0x195));var _0x1c80=function(_0x166d93,_0x301f09){_0x166d93=_0x166d93-0x0;var _0xba708=_0xc801[_0x166d93];return _0xba708;};'use strict';var EventEmitter=require(_0x1c80('0x0'));var DashboardItem=require(_0x1c80('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x1c80('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1c80('0x3'),'afterDestroy':_0x1c80('0x4')};function emitEvent(_0x5677eb){return function(_0x459c35,_0x32cc36,_0x4fe751){DashboardItemEvents[_0x1c80('0x5')](_0x5677eb+':'+_0x459c35['id'],_0x459c35);DashboardItemEvents[_0x1c80('0x5')](_0x5677eb,_0x459c35);_0x4fe751(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem[_0x1c80('0x6')](e,emitEvent(event));}}module['exports']=DashboardItemEvents;