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 _0x07f4=['save','update','hasOwnProperty','hook','events','Dashboard','setMaxListeners'];(function(_0x2948ea,_0x30e30c){var _0x2b8ee4=function(_0x1d1b33){while(--_0x1d1b33){_0x2948ea['push'](_0x2948ea['shift']());}};_0x2b8ee4(++_0x30e30c);}(_0x07f4,0xd6));var _0x407f=function(_0x58a860,_0x4344f2){_0x58a860=_0x58a860-0x0;var _0x36ca4c=_0x07f4[_0x58a860];return _0x36ca4c;};'use strict';var EventEmitter=require(_0x407f('0x0'));var Dashboard=require('../../mysqldb')['db'][_0x407f('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0x407f('0x2')](0x0);var events={'afterCreate':_0x407f('0x3'),'afterUpdate':_0x407f('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4c92b2){return function(_0x37f627,_0x26a77f,_0x4af64b){DashboardEvents['emit'](_0x4c92b2+':'+_0x37f627['id'],_0x37f627);DashboardEvents['emit'](_0x4c92b2,_0x37f627);_0x4af64b(null);};}for(var e in events){if(events[_0x407f('0x5')](e)){var event=events[e];Dashboard[_0x407f('0x6')](e,emitEvent(event));}}module['exports']=DashboardEvents;