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 _0x905c=['exports','events','../../mysqldb','DashboardItem','setMaxListeners','remove','emit','hasOwnProperty','hook'];(function(_0x4f8b2b,_0x1dc8dd){var _0x2f230a=function(_0x232685){while(--_0x232685){_0x4f8b2b['push'](_0x4f8b2b['shift']());}};_0x2f230a(++_0x1dc8dd);}(_0x905c,0x14e));var _0xc905=function(_0x553dab,_0x4beef7){_0x553dab=_0x553dab-0x0;var _0xa5e444=_0x905c[_0x553dab];return _0xa5e444;};'use strict';var EventEmitter=require(_0xc905('0x0'));var DashboardItem=require(_0xc905('0x1'))['db'][_0xc905('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xc905('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xc905('0x4')};function emitEvent(_0xfa93f2){return function(_0x163bdc,_0xc722dd,_0x4abe71){DashboardItemEvents[_0xc905('0x5')](_0xfa93f2+':'+_0x163bdc['id'],_0x163bdc);DashboardItemEvents[_0xc905('0x5')](_0xfa93f2,_0x163bdc);_0x4abe71(null);};}for(var e in events){if(events[_0xc905('0x6')](e)){var event=events[e];DashboardItem[_0xc905('0x7')](e,emitEvent(event));}}module[_0xc905('0x8')]=DashboardItemEvents;