Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / dashboardItem / dashboardItem.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x25f6=['../../mysqldb','DashboardItem','setMaxListeners','remove','hasOwnProperty','hook','exports','events'];(function(_0x19c59d,_0x53c490){var _0x26374a=function(_0x47d5eb){while(--_0x47d5eb){_0x19c59d['push'](_0x19c59d['shift']());}};_0x26374a(++_0x53c490);}(_0x25f6,0x197));var _0x625f=function(_0x28b3d7,_0x17b41d){_0x28b3d7=_0x28b3d7-0x0;var _0x49619d=_0x25f6[_0x28b3d7];return _0x49619d;};'use strict';var EventEmitter=require(_0x625f('0x0'));var DashboardItem=require(_0x625f('0x1'))['db'][_0x625f('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x625f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x625f('0x4')};function emitEvent(_0x2e8d99){return function(_0x4b8d99,_0x442e7b,_0x148e21){DashboardItemEvents['emit'](_0x2e8d99+':'+_0x4b8d99['id'],_0x4b8d99);DashboardItemEvents['emit'](_0x2e8d99,_0x4b8d99);_0x148e21(null);};}for(var e in events){if(events[_0x625f('0x5')](e)){var event=events[e];DashboardItem[_0x625f('0x6')](e,emitEvent(event));}}module[_0x625f('0x7')]=DashboardItemEvents;