diff --git a/public/js/5.js b/public/js/5.js
index 2a018e5ce..5f11db55d 100644
--- a/public/js/5.js
+++ b/public/js/5.js
@@ -246,7 +246,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Nav/SidebarItem */ 916);\n/* harmony import */ var components_Nav_NavSeperator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! components/Nav/NavSeperator */ 917);\n/* harmony import */ var components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Nav/Submenu */ 918);\n/* harmony import */ var components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/Nav/SubmenuItem */ 919);\n/* harmony import */ var actions_nav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/nav */ 920);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_7__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 1/20/19 4:46 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\nvar Sidebar = /*#__PURE__*/function (_React$Component) {\n _inherits(Sidebar, _React$Component);\n\n var _super = _createSuper(Sidebar);\n\n function Sidebar(props) {\n _classCallCheck(this, Sidebar);\n\n return _super.call(this, props);\n }\n\n _createClass(Sidebar, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Helpers.UI.getPlugins((err, result) => {\n // if (!err && result.plugins) {\n // this.setState({ plugins: result.plugins })\n // }\n // })\n var sidebarRoute = document.getElementById('__sidebar_route').innerText;\n var sidebarSubRoute = document.getElementById('__sidebar_sub_route').innerText;\n this.props.updateNavChange({\n activeItem: sidebarRoute,\n activeSubItem: sidebarSubRoute\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.initSidebar();\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.bindExpand();\n }\n }, {\n key: \"renderPlugins\",\n value: function renderPlugins() {\n var _this$state = this.state,\n plugins = _this$state.plugins,\n sessionUser = _this$state.sessionUser,\n activeItem = _this$state.activeItem,\n activeSubItem = _this$state.activeSubItem;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Plugins\",\n icon: \"extension\",\n href: \"/plugins\",\n \"class\": \"navPlugins tether-plugins\",\n hasSubmenu: plugins && plugins.length > 0,\n subMenuTarget: \"plugins\",\n active: activeItem === 'plugins'\n }, plugins && plugins.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"plugins\",\n subMenuOpen: activeItem === 'plugins'\n }, plugins.map(function (item) {\n var perms = item.permissions.split(' ');\n if (perms.indexOf(sessionUser.role) === -1) return;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n key: item.name,\n text: item.menu.main.name,\n icon: item.menu.main.icon,\n href: item.menu.main.link,\n active: activeSubItem === item.name\n });\n })));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n activeItem = _this$props.activeItem,\n activeSubItem = _this$props.activeSubItem,\n sessionUser = _this$props.sessionUser;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'sidebar nopadding',\n style: {\n overflowX: 'hidden',\n top: this.props.notice ? '95px' : '65px'\n },\n \"data-scroll-opacitymax\": \"0.1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'side-nav-container',\n style: {\n minHeight: 'calc(100% - 50px)'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"side-nav\"\n }, sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Dashboard\",\n icon: \"dashboard\",\n href: \"/dashboard\",\n \"class\": \"navHome\",\n active: activeItem === 'dashboard'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('tickets:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Tickets\",\n icon: \"assignment\",\n href: \"/tickets\",\n \"class\": \"navTickets no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"tickets\",\n active: activeItem === 'tickets'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"tickets\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Active\",\n icon: \"timer\",\n href: \"/tickets/active\",\n active: activeSubItem === 'tickets-active'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Assigned\",\n icon: \"assignment_ind\",\n href: \"/tickets/assigned\",\n active: activeSubItem === 'tickets-assigned'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Unassigned\",\n icon: \"person_add_disabled\",\n href: \"/tickets/unassigned\",\n active: activeSubItem === 'tickets-unassigned'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_NavSeperator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"New\",\n icon: \"\\uE24D\",\n href: \"/tickets/new\",\n active: activeSubItem === 'tickets-new'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Pending\",\n icon: \"\\uE629\",\n href: \"/tickets/pending\",\n active: activeSubItem === 'tickets-pending'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Open\",\n icon: \"\\uE2C8\",\n href: \"/tickets/open\",\n active: activeSubItem === 'tickets-open'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Closed\",\n icon: \"\\uE2C7\",\n href: \"/tickets/closed\",\n active: activeSubItem === 'tickets-closed'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Messages\",\n icon: \"chat\",\n href: \"/messages\",\n \"class\": \"navMessages\",\n active: activeItem === 'messages'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('accounts:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Accounts\",\n icon: \"\\uE7FD\",\n href: \"/accounts\",\n \"class\": \"navAccounts\",\n active: activeItem === 'accounts',\n subMenuTarget: \"accounts\",\n hasSubmenu: sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true)\n }, sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"accounts\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/customers',\n text: 'Customers',\n icon: 'account_box',\n active: activeSubItem === 'accounts-customers'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/agents',\n text: 'Agents',\n icon: 'account_circle',\n active: activeSubItem === 'accounts-agents'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('admin:*') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/admins',\n text: 'Admins',\n icon: 'how_to_reg',\n active: activeSubItem === 'accounts-admins'\n }))), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('groups:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Customer Groups\",\n icon: \"supervisor_account\",\n href: \"/groups\",\n \"class\": \"navGroups\",\n active: activeItem === 'groups'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('teams:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Teams\",\n icon: \"wc\",\n href: \"/teams\",\n \"class\": \"navTeams\",\n active: activeItem === 'teams'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('departments:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Departments\",\n icon: \"domain\",\n href: \"/departments\",\n \"class\": \"navTeams\",\n active: activeItem === 'departments'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('reports:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Reports\",\n icon: \"assessment\",\n href: \"/reports/generate\",\n \"class\": \"navReports no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"reports\",\n active: activeItem === 'reports'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"reports\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Generate\",\n icon: \"timeline\",\n href: \"/reports/generate\",\n active: activeSubItem === 'reports-generate'\n }))), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('notices:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Notices\",\n icon: \"campaign\",\n href: \"/notices\",\n \"class\": \"navNotices\",\n active: activeItem === 'notices'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('settings:edit') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Settings\",\n icon: \"settings\",\n href: \"/settings/general\",\n \"class\": \"navSettings no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"settings\",\n active: activeItem === 'settings'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"settings\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"General\",\n icon: \"tune\",\n href: \"/settings\",\n active: activeSubItem === 'settings-general'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Accounts\",\n icon: \"tune\",\n href: \"/settings/accounts\",\n active: activeSubItem === 'settings-accounts'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Appearance\",\n icon: \"style\",\n href: \"/settings/appearance\",\n active: activeSubItem === 'settings-appearance'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Tickets\",\n icon: \"assignment\",\n href: \"/settings/tickets\",\n active: activeSubItem === 'settings-tickets'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Permissions\",\n icon: \"security\",\n href: \"/settings/permissions\",\n active: activeSubItem === 'settings-permissions'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Mailer\",\n icon: \"email\",\n href: \"/settings/mailer\",\n active: activeSubItem === 'settings-mailer'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/settings/elasticsearch',\n text: 'Elasticsearch',\n icon: 'search',\n active: activeSubItem === 'settings-elasticsearch'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Backup/Restore\",\n icon: \"archive\",\n href: \"/settings/backup\",\n active: activeSubItem === 'settings-backup'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Server\",\n icon: \"dns\",\n href: \"/settings/server\",\n active: activeSubItem === 'settings-server'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Legal\",\n icon: \"gavel\",\n href: \"/settings/legal\",\n active: activeSubItem === 'settings-legal'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('settings:logs') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Logs\",\n icon: \"remove_from_queue\",\n href: \"/settings/logs\",\n hasSeperator: true,\n active: activeSubItem === 'settings-logs'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_NavSeperator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n href: \"/about\",\n icon: \"help\",\n text: \"About\",\n active: activeItem === 'about'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"side-nav-bottom-panel\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n id: \"expand-menu\",\n className: \"no-ajaxy\",\n href: \"#\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"menu\"), \"Collapse Menu\")));\n }\n }]);\n\n return Sidebar;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nSidebar.propTypes = {\n updateNavChange: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired),\n activeItem: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired),\n activeSubItem: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired),\n sessionUser: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().object),\n plugins: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().array),\n notice: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().object)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n activeItem: state.sidebar.activeItem,\n activeSubItem: state.sidebar.activeSubItem,\n sessionUser: state.shared.sessionUser,\n notice: state.shared.notice\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n updateNavChange: actions_nav__WEBPACK_IMPORTED_MODULE_6__.updateNavChange\n})(Sidebar));\n\n//# sourceURL=webpack://trudesk/./src/client/components/Nav/Sidebar/index.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Nav/SidebarItem */ 916);\n/* harmony import */ var components_Nav_NavSeperator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! components/Nav/NavSeperator */ 917);\n/* harmony import */ var components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Nav/Submenu */ 918);\n/* harmony import */ var components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/Nav/SubmenuItem */ 919);\n/* harmony import */ var actions_nav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/nav */ 920);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_7__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 1/20/19 4:46 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\nvar Sidebar = /*#__PURE__*/function (_React$Component) {\n _inherits(Sidebar, _React$Component);\n\n var _super = _createSuper(Sidebar);\n\n function Sidebar(props) {\n _classCallCheck(this, Sidebar);\n\n return _super.call(this, props);\n }\n\n _createClass(Sidebar, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Helpers.UI.getPlugins((err, result) => {\n // if (!err && result.plugins) {\n // this.setState({ plugins: result.plugins })\n // }\n // })\n var sidebarRoute = document.getElementById('__sidebar_route').innerText;\n var sidebarSubRoute = document.getElementById('__sidebar_sub_route').innerText;\n this.props.updateNavChange({\n activeItem: sidebarRoute,\n activeSubItem: sidebarSubRoute\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.initSidebar();\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.bindExpand();\n }\n }, {\n key: \"renderPlugins\",\n value: function renderPlugins() {\n var _this$state = this.state,\n plugins = _this$state.plugins,\n sessionUser = _this$state.sessionUser,\n activeItem = _this$state.activeItem,\n activeSubItem = _this$state.activeSubItem;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Plugins\",\n icon: \"extension\",\n href: \"/plugins\",\n \"class\": \"navPlugins tether-plugins\",\n hasSubmenu: plugins && plugins.length > 0,\n subMenuTarget: \"plugins\",\n active: activeItem === 'plugins'\n }, plugins && plugins.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"plugins\",\n subMenuOpen: activeItem === 'plugins'\n }, plugins.map(function (item) {\n var perms = item.permissions.split(' ');\n if (perms.indexOf(sessionUser.role) === -1) return;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n key: item.name,\n text: item.menu.main.name,\n icon: item.menu.main.icon,\n href: item.menu.main.link,\n active: activeSubItem === item.name\n });\n })));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n activeItem = _this$props.activeItem,\n activeSubItem = _this$props.activeSubItem,\n sessionUser = _this$props.sessionUser;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'sidebar nopadding',\n style: {\n overflowX: 'hidden',\n top: this.props.notice ? '95px' : '65px'\n },\n \"data-scroll-opacitymax\": \"0.1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'side-nav-container',\n style: {\n minHeight: 'calc(100% - 50px)'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"side-nav\"\n }, sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Dashboard\",\n icon: \"dashboard\",\n href: \"/dashboard\",\n \"class\": \"navHome\",\n active: activeItem === 'dashboard'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('tickets:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Tickets\",\n icon: \"assignment\",\n href: \"/tickets\",\n \"class\": \"navTickets no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"tickets\",\n active: activeItem === 'tickets'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"tickets\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Active\",\n icon: \"timer\",\n href: \"/tickets/active\",\n active: activeSubItem === 'tickets-active'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Assigned\",\n icon: \"assignment_ind\",\n href: \"/tickets/assigned\",\n active: activeSubItem === 'tickets-assigned'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Unassigned\",\n icon: \"person_add_disabled\",\n href: \"/tickets/unassigned\",\n active: activeSubItem === 'tickets-unassigned'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Messages\",\n icon: \"chat\",\n href: \"/messages\",\n \"class\": \"navMessages\",\n active: activeItem === 'messages'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('accounts:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Accounts\",\n icon: \"\\uE7FD\",\n href: \"/accounts\",\n \"class\": \"navAccounts\",\n active: activeItem === 'accounts',\n subMenuTarget: \"accounts\",\n hasSubmenu: sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true)\n }, sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"accounts\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/customers',\n text: 'Customers',\n icon: 'account_box',\n active: activeSubItem === 'accounts-customers'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/agents',\n text: 'Agents',\n icon: 'account_circle',\n active: activeSubItem === 'accounts-agents'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('admin:*') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/accounts/admins',\n text: 'Admins',\n icon: 'how_to_reg',\n active: activeSubItem === 'accounts-admins'\n }))), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('groups:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Customer Groups\",\n icon: \"supervisor_account\",\n href: \"/groups\",\n \"class\": \"navGroups\",\n active: activeItem === 'groups'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('teams:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Teams\",\n icon: \"wc\",\n href: \"/teams\",\n \"class\": \"navTeams\",\n active: activeItem === 'teams'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('departments:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Departments\",\n icon: \"domain\",\n href: \"/departments\",\n \"class\": \"navTeams\",\n active: activeItem === 'departments'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('reports:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Reports\",\n icon: \"assessment\",\n href: \"/reports/generate\",\n \"class\": \"navReports no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"reports\",\n active: activeItem === 'reports'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"reports\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Generate\",\n icon: \"timeline\",\n href: \"/reports/generate\",\n active: activeSubItem === 'reports-generate'\n }))), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('notices:view') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Notices\",\n icon: \"campaign\",\n href: \"/notices\",\n \"class\": \"navNotices\",\n active: activeItem === 'notices'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('settings:edit') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: \"Settings\",\n icon: \"settings\",\n href: \"/settings/general\",\n \"class\": \"navSettings no-ajaxy\",\n hasSubmenu: true,\n subMenuTarget: \"settings\",\n active: activeItem === 'settings'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_Submenu__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n id: \"settings\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"General\",\n icon: \"tune\",\n href: \"/settings\",\n active: activeSubItem === 'settings-general'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Accounts\",\n icon: \"tune\",\n href: \"/settings/accounts\",\n active: activeSubItem === 'settings-accounts'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Appearance\",\n icon: \"style\",\n href: \"/settings/appearance\",\n active: activeSubItem === 'settings-appearance'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Tickets\",\n icon: \"assignment\",\n href: \"/settings/tickets\",\n active: activeSubItem === 'settings-tickets'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Permissions\",\n icon: \"security\",\n href: \"/settings/permissions\",\n active: activeSubItem === 'settings-permissions'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Mailer\",\n icon: \"email\",\n href: \"/settings/mailer\",\n active: activeSubItem === 'settings-mailer'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n href: '/settings/elasticsearch',\n text: 'Elasticsearch',\n icon: 'search',\n active: activeSubItem === 'settings-elasticsearch'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Backup/Restore\",\n icon: \"archive\",\n href: \"/settings/backup\",\n active: activeSubItem === 'settings-backup'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Server\",\n icon: \"dns\",\n href: \"/settings/server\",\n active: activeSubItem === 'settings-server'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Legal\",\n icon: \"gavel\",\n href: \"/settings/legal\",\n active: activeSubItem === 'settings-legal'\n }), sessionUser && lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().canUser('settings:logs') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SubmenuItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Logs\",\n icon: \"remove_from_queue\",\n href: \"/settings/logs\",\n hasSeperator: true,\n active: activeSubItem === 'settings-logs'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_NavSeperator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Nav_SidebarItem__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n href: \"/about\",\n icon: \"help\",\n text: \"About\",\n active: activeItem === 'about'\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"side-nav-bottom-panel\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n id: \"expand-menu\",\n className: \"no-ajaxy\",\n href: \"#\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"menu\"), \"Collapse Menu\")));\n }\n }]);\n\n return Sidebar;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nSidebar.propTypes = {\n updateNavChange: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired),\n activeItem: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired),\n activeSubItem: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired),\n sessionUser: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().object),\n plugins: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().array),\n notice: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().object)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n activeItem: state.sidebar.activeItem,\n activeSubItem: state.sidebar.activeSubItem,\n sessionUser: state.shared.sessionUser,\n notice: state.shared.notice\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n updateNavChange: actions_nav__WEBPACK_IMPORTED_MODULE_6__.updateNavChange\n})(Sidebar));\n\n//# sourceURL=webpack://trudesk/./src/client/components/Nav/Sidebar/index.jsx?");
/***/ }),
@@ -444,7 +444,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sanitize-html */ 982);\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sanitize_html__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var actions_search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/search */ 620);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_4__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 4/16/19 11:48 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\nvar SearchResults = /*#__PURE__*/function (_React$Component) {\n _inherits(SearchResults, _React$Component);\n\n var _super = _createSuper(SearchResults);\n\n function SearchResults() {\n _classCallCheck(this, SearchResults);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SearchResults, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.setupDataTethers();\n jquery__WEBPACK_IMPORTED_MODULE_3___default()(document).on('mousedown', SearchResults.documentMouseEvent);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {}\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n SearchResults.toggleAnimation(true, false);\n jquery__WEBPACK_IMPORTED_MODULE_3___default()(document).off('mousedown', SearchResults.documentMouseEvent);\n }\n }, {\n key: \"onSearchItemClick\",\n value: function onSearchItemClick(e) {\n e.preventDefault();\n SearchResults.toggleAnimation(true, false);\n var href = e.currentTarget.getAttribute('href');\n History.pushState(null, null, href);\n this.props.unloadSearchResults();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var _this$props = this.props,\n target = _this$props.target,\n searchResults = _this$props.searchResults,\n error = _this$props.error;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'search-results-container animate-in',\n \"data-tether\": \"{target: '\".concat(target, \"', pos: 'top right', targetAttachment: 'bottom right', offset: '0 8px'}\")\n }, error && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-1 uk-text-center text-light mt-15 text-danger'\n }, error.error), !searchResults || searchResults.size < 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-1 uk-text-center text-light mt-15'\n }, \"No Results\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: 'search-results-list'\n }, searchResults && searchResults.map(function (item) {\n var doc = item.get('_source');\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: item.get('_id'),\n className: \"search-results-item status-\".concat(doc.get('status'))\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"/tickets/\".concat(doc.get('uid')),\n onClick: function onClick(e) {\n return _this.onSearchItemClick(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"priority\",\n style: {\n background: \"\".concat(doc.getIn(['priority', 'htmlColor']))\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"uid\"\n }, doc.get('uid')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"subject\"\n }, doc.get('subject')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"issue\"\n }, sanitize_html__WEBPACK_IMPORTED_MODULE_5___default()(doc.get('issue'), {\n allowedTags: []\n }))));\n })));\n }\n }], [{\n key: \"documentMouseEvent\",\n value: function documentMouseEvent(event) {\n var $target = jquery__WEBPACK_IMPORTED_MODULE_3___default()(event.target);\n var isInContainer = $target.parents('.search-results-container').length > 0;\n if (isInContainer) return false;\n SearchResults.toggleAnimation(true, false);\n }\n }, {\n key: \"toggleAnimation\",\n value: function toggleAnimation(forceState, state) {\n var animateItems = jquery__WEBPACK_IMPORTED_MODULE_3___default()('.search-results-container');\n var docElemStyle = document.documentElement.style;\n var transitionProp = typeof docElemStyle.transition === 'string' ? 'transition' : 'WebkitTransition';\n\n for (var i = 0; i < animateItems.length; i++) {\n var item = animateItems[i];\n item.style[transitionProp + 'Delay'] = i * 50 + 'ms';\n\n if (forceState) {\n if (state) {\n item.classList.remove('hide');\n item.classList.add('is-in');\n } else {\n item.classList.add('hide');\n item.classList.remove('is-in');\n }\n } else {\n item.classList.toggle('hide');\n item.classList.toggle('is-in');\n }\n }\n }\n }]);\n\n return SearchResults;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nSearchResults.propTypes = {\n target: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string.isRequired),\n searchResults: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object.isRequired),\n error: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n unloadSearchResults: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n searchResults: state.searchState.results,\n error: state.searchState.error\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n unloadSearchResults: actions_search__WEBPACK_IMPORTED_MODULE_2__.unloadSearchResults\n}, null, {\n forwardRef: true\n})(SearchResults));\n\n//# sourceURL=webpack://trudesk/./src/client/components/SearchResults/index.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sanitize-html */ 982);\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sanitize_html__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var actions_search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/search */ 620);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_4__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 4/16/19 11:48 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\nvar SearchResults = /*#__PURE__*/function (_React$Component) {\n _inherits(SearchResults, _React$Component);\n\n var _super = _createSuper(SearchResults);\n\n function SearchResults() {\n _classCallCheck(this, SearchResults);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SearchResults, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.setupDataTethers();\n jquery__WEBPACK_IMPORTED_MODULE_3___default()(document).on('mousedown', SearchResults.documentMouseEvent);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {}\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n SearchResults.toggleAnimation(true, false);\n jquery__WEBPACK_IMPORTED_MODULE_3___default()(document).off('mousedown', SearchResults.documentMouseEvent);\n }\n }, {\n key: \"onSearchItemClick\",\n value: function onSearchItemClick(e) {\n e.preventDefault();\n SearchResults.toggleAnimation(true, false);\n var href = e.currentTarget.getAttribute('href');\n History.pushState(null, null, href);\n this.props.unloadSearchResults();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var _this$props = this.props,\n target = _this$props.target,\n searchResults = _this$props.searchResults,\n error = _this$props.error;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'search-results-container animate-in',\n \"data-tether\": \"{target: '\".concat(target, \"', pos: 'top right', targetAttachment: 'bottom right', offset: '0 8px'}\")\n }, error && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-1 uk-text-center text-light mt-15 text-danger'\n }, error.error), !searchResults || searchResults.size < 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-1 uk-text-center text-light mt-15'\n }, \"No Results\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: 'search-results-list'\n }, searchResults && searchResults.map(function (item) {\n var doc = item.get('_source');\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: item.get('_id'),\n className: \"search-results-item\",\n style: {\n position: 'relative'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n style: {\n display: 'block',\n height: '100%',\n width: 5,\n background: doc.getIn(['status', 'htmlColor']),\n position: 'absolute',\n top: 0,\n left: 0\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"/tickets/\".concat(doc.get('uid')),\n onClick: function onClick(e) {\n return _this.onSearchItemClick(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"priority\",\n style: {\n background: \"\".concat(doc.getIn(['priority', 'htmlColor']))\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"uid\"\n }, doc.get('uid')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"subject\"\n }, doc.get('subject')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"issue\"\n }, sanitize_html__WEBPACK_IMPORTED_MODULE_5___default()(doc.get('issue'), {\n allowedTags: []\n }))));\n })));\n }\n }], [{\n key: \"documentMouseEvent\",\n value: function documentMouseEvent(event) {\n var $target = jquery__WEBPACK_IMPORTED_MODULE_3___default()(event.target);\n var isInContainer = $target.parents('.search-results-container').length > 0;\n if (isInContainer) return false;\n SearchResults.toggleAnimation(true, false);\n }\n }, {\n key: \"toggleAnimation\",\n value: function toggleAnimation(forceState, state) {\n var animateItems = jquery__WEBPACK_IMPORTED_MODULE_3___default()('.search-results-container');\n var docElemStyle = document.documentElement.style;\n var transitionProp = typeof docElemStyle.transition === 'string' ? 'transition' : 'WebkitTransition';\n\n for (var i = 0; i < animateItems.length; i++) {\n var item = animateItems[i];\n item.style[transitionProp + 'Delay'] = i * 50 + 'ms';\n\n if (forceState) {\n if (state) {\n item.classList.remove('hide');\n item.classList.add('is-in');\n } else {\n item.classList.add('hide');\n item.classList.remove('is-in');\n }\n } else {\n item.classList.toggle('hide');\n item.classList.toggle('is-in');\n }\n }\n }\n }]);\n\n return SearchResults;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nSearchResults.propTypes = {\n target: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string.isRequired),\n searchResults: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object.isRequired),\n error: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n unloadSearchResults: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n searchResults: state.searchState.results,\n error: state.searchState.error\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n unloadSearchResults: actions_search__WEBPACK_IMPORTED_MODULE_2__.unloadSearchResults\n}, null, {\n forwardRef: true\n})(SearchResults));\n\n//# sourceURL=webpack://trudesk/./src/client/components/SearchResults/index.jsx?");
/***/ }),
@@ -983,7 +983,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var _BaseModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BaseModal */ 45);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/ColorSelector */ 151);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_7__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2;\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/4/19 1:47 AM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\nvar CreateStatusModal = (0,mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(CreateStatusModal, _React$Component);\n\n var _super = _createSuper(CreateStatusModal);\n\n function CreateStatusModal(props) {\n var _this;\n\n _classCallCheck(this, CreateStatusModal);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"name\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"htmlColor\", _descriptor2, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(CreateStatusModal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.inputs();\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().formvalidator();\n }\n }, {\n key: \"onCreateStatusSubmit\",\n value: function onCreateStatusSubmit(e) {\n e.preventDefault();\n var $form = jquery__WEBPACK_IMPORTED_MODULE_6___default()(e.target);\n if (!$form.isValid(null, null, false)) return true; // Form is valid... Submit..\n\n this.props.createStatus({\n name: this.name,\n htmlColor: this.htmlColor\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_BaseModal__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, this.props, {\n ref: function ref(i) {\n return _this2.base = i;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: 'uk-form-stacked',\n onSubmit: function onSubmit(e) {\n return _this2.onCreateStatusSubmit(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", null, \"Create Status\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"z-box uk-grid uk-grid-collpase uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", null, \"Status Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n className: 'md-input',\n value: this.name,\n onChange: function onChange(e) {\n return _this2.name = e.target.value;\n },\n \"data-validation\": \"length\",\n \"data-validation-length\": \"min3\",\n \"data-validation-error-msg\": \"Invalid name (3+ characters)\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n hideRevert: true,\n defaultColor: '#29B995',\n validationEnabled: true,\n onChange: function onChange(e) {\n return _this2.htmlColor = e.target.value;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-modal-footer uk-text-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Cancel',\n type: 'button',\n extraClass: 'uk-modal-close',\n flat: true,\n waves: true\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Create',\n type: 'submit',\n flat: true,\n waves: true,\n style: 'success'\n }))))));\n }\n }]);\n\n return CreateStatusModal;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"name\", [mobx__WEBPACK_IMPORTED_MODULE_9__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"htmlColor\", [mobx__WEBPACK_IMPORTED_MODULE_9__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '#29B995';\n }\n})), _class2)) || _class;\n\nCreateStatusModal.propTypes = {\n onPriorityCreated: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),\n createStatus: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(null, {\n createStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_2__.createStatus\n})(CreateStatusModal));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/CreateStatusModal.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var _BaseModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BaseModal */ 45);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/ColorSelector */ 151);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/Settings/EnableSwitch */ 72);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/4/19 1:47 AM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar CreateStatusModal = (0,mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(CreateStatusModal, _React$Component);\n\n var _super = _createSuper(CreateStatusModal);\n\n function CreateStatusModal(props) {\n var _this;\n\n _classCallCheck(this, CreateStatusModal);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"name\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"htmlColor\", _descriptor2, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"slatimer\", _descriptor3, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"isResolved\", _descriptor4, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(CreateStatusModal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.inputs();\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().formvalidator();\n }\n }, {\n key: \"onCreateStatusSubmit\",\n value: function onCreateStatusSubmit(e) {\n e.preventDefault();\n var $form = jquery__WEBPACK_IMPORTED_MODULE_6___default()(e.target);\n if (!$form.isValid(null, null, false)) return true; // Form is valid... Submit..\n\n this.props.createStatus({\n name: this.name,\n htmlColor: this.htmlColor,\n slatimer: this.slatimer,\n isResolved: this.isResolved\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_BaseModal__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, this.props, {\n large: true\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: 'uk-form-stacked',\n onSubmit: function onSubmit(e) {\n return _this2.onCreateStatusSubmit(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", null, \"Create Status\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"z-box uk-grid uk-grid-collpase uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-4\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", null, \"Status Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n className: 'md-input',\n value: this.name,\n onChange: function onChange(e) {\n return _this2.name = e.target.value;\n },\n \"data-validation\": \"length\",\n \"data-validation-length\": \"min3\",\n \"data-validation-error-msg\": \"Invalid name (3+ characters)\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-4\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n hideRevert: true,\n defaultColor: '#29B995',\n validationEnabled: true,\n onChange: function onChange(e) {\n return _this2.htmlColor = e.target.value;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-width-1-4'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-left'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n stateName: 'slatimer',\n label: 'SLA',\n checked: this.slatimer,\n onChange: function onChange(e) {\n return _this2.slatimer = e.target.checked;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-left'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n stateName: 'isResolved',\n label: 'isResolved',\n checked: this.isResolved,\n onChange: function onChange(e) {\n return _this2.isResolved = e.target.checked;\n }\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-modal-footer uk-text-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Cancel',\n type: 'button',\n extraClass: 'uk-modal-close',\n flat: true,\n waves: true\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Create',\n type: 'submit',\n flat: true,\n waves: true,\n style: 'success'\n }))))));\n }\n }]);\n\n return CreateStatusModal;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"name\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"htmlColor\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '#29B995';\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"slatimer\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return true;\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"isResolved\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return false;\n }\n})), _class2)) || _class;\n\nCreateStatusModal.propTypes = {\n createStatus: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(null, {\n createStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_2__.createStatus\n})(CreateStatusModal));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/CreateStatusModal.jsx?");
/***/ }),
@@ -1053,6 +1053,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ }),
+/***/ 1300:
+/*!******************************************************************!*\
+ !*** ./src/client/containers/Modals/DeleteTicketStatusModal.jsx ***!
+ \******************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var _BaseModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BaseModal */ 45);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var components_SingleSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/SingleSelect */ 49);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_6__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 6/21/23 11:59 AM\r\n * Copyright (c) 2014-2023. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\nvar DeleteTicketStatusModal = /*#__PURE__*/function (_React$Component) {\n _inherits(DeleteTicketStatusModal, _React$Component);\n\n var _super = _createSuper(DeleteTicketStatusModal);\n\n function DeleteTicketStatusModal(props) {\n var _this;\n\n _classCallCheck(this, DeleteTicketStatusModal);\n\n _this = _super.call(this, props);\n _this.state = {\n selectedStatus: ''\n };\n return _this;\n }\n\n _createClass(DeleteTicketStatusModal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {}\n }, {\n key: \"getTicketStatuses\",\n value: function getTicketStatuses() {\n return this.props.settings && this.props.settings.get('status') ? this.props.settings.get('status').toArray() : [];\n }\n }, {\n key: \"onSelectChanged\",\n value: function onSelectChanged(e) {\n this.setState({\n selectedStatus: e.target.value\n });\n }\n }, {\n key: \"onFormSubmit\",\n value: function onFormSubmit(e) {\n e.preventDefault();\n\n if (!this.state.selectedStatus) {\n lib_helpers__WEBPACK_IMPORTED_MODULE_6___default().UI.showSnackbar('Unable to get new ticket status. Aborting...', true);\n return true;\n }\n\n this.props.deleteStatus({\n id: this.props.status.get('_id'),\n newStatusId: this.state.selectedStatus\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var status = this.props.status;\n var mappedStatuses = this.getTicketStatuses().filter(function (obj) {\n return status.get('name') !== obj.get('name');\n }).map(function (item) {\n return {\n text: item.get('name'),\n value: item.get('_id')\n };\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_BaseModal__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, this.props, {\n options: {\n bgclose: false\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: 'uk-form-stacked',\n onSubmit: function onSubmit(e) {\n return _this2.onFormSubmit(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", null, \"Remove Ticket Status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Please select the ticket status you wish to reassign tickets to in order to delete this ticket status.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-left\",\n style: {\n width: '100%'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n className: 'uk-form-label nopadding nomargin'\n }, \"Status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n showTextbox: false,\n items: mappedStatuses,\n onSelectChange: function onSelectChange(e) {\n return _this2.onSelectChanged(e);\n },\n value: this.state.selectedStatus\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"uk-text-danger\"\n }, \"WARNING: This will change all tickets with status \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"strong\", null, status.get('name')), \" to the selected ticket status.\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"strong\", null, \"This is permanent!\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-modal-footer uk-text-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Cancel',\n flat: true,\n waves: true,\n extraClass: 'uk-modal-close'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Delete',\n style: 'danger',\n flat: true,\n type: 'submit'\n }))));\n }\n }]);\n\n return DeleteTicketStatusModal;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nDeleteTicketStatusModal.propTypes = {\n status: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired),\n settings: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired),\n deleteStatus: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n settings: state.settings.settings,\n ticketStatuses: state.ticketsState.ticketStatuses\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_2__.fetchTicketStatus,\n deleteStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_2__.deleteStatus\n})(DeleteTicketStatusModal));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/DeleteTicketStatusModal.jsx?");
+
+/***/ }),
+
/***/ 924:
/*!****************************************************************!*\
!*** ./src/client/containers/Modals/DeleteTicketTypeModal.jsx ***!
@@ -1126,7 +1137,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var actions_groups__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/groups */ 53);\n/* harmony import */ var actions_accounts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/accounts */ 59);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var containers_Modals_BaseModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! containers/Modals/BaseModal */ 45);\n/* harmony import */ var components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/SingleSelect */ 49);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_10__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 5/18/19 1:19 AM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar FilterTicketsModal = /*#__PURE__*/function (_React$Component) {\n _inherits(FilterTicketsModal, _React$Component);\n\n var _super = _createSuper(FilterTicketsModal);\n\n function FilterTicketsModal(props) {\n _classCallCheck(this, FilterTicketsModal);\n\n return _super.call(this, props);\n }\n\n _createClass(FilterTicketsModal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().UI.inputs();\n this.props.fetchGroups();\n this.props.fetchAccounts({\n page: 0,\n limit: -1,\n type: 'agents',\n showDeleted: false\n });\n this.props.getTagsWithPage({\n limit: -1\n });\n this.props.fetchTicketTypes();\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().UI.reRenderInputs();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.unloadGroups();\n this.props.unloadAccounts();\n }\n }, {\n key: \"onSubmit\",\n value: function onSubmit(e) {\n e.preventDefault();\n var startDate = e.target.filterDate_Start.value;\n var endDate = e.target.filterDate_End.value;\n var subject = e.target.subject.value;\n var statuses = this.statusSelect.value;\n var tags = this.tagsSelect.value;\n var types = this.typesSelect.value;\n var groups = this.groupSelect.value;\n var assignees = this.assigneeSelect.value;\n var queryString = '?f=1';\n if (startDate) queryString += \"&ds=\".concat(startDate);\n if (endDate) queryString += \"&de=\".concat(endDate);\n if (subject) queryString += \"&fs=\".concat(subject);\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(statuses, function (i) {\n queryString += \"&st=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(types, function (i) {\n queryString += \"&tt=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(tags, function (i) {\n queryString += \"&tag=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(groups, function (i) {\n queryString += \"&gp=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(assignees, function (i) {\n queryString += \"&au=\".concat(i);\n });\n History.pushState(null, null, \"/tickets/filter/\".concat(queryString, \"&r=\").concat(Math.floor(Math.random() * (99999 - 1 + 1)) + 1));\n this.props.hideModal();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var statuses = this.props.ticketStatuses.map(function (s) {\n return {\n text: s.get('name'),\n value: s.get('uid')\n };\n }).toArray();\n var tags = this.props.ticketTags.map(function (t) {\n return {\n text: t.get('name'),\n value: t.get('_id')\n };\n }).toArray();\n var types = this.props.ticketTypes.map(function (t) {\n return {\n text: t.get('name'),\n value: t.get('_id')\n };\n }).toArray();\n var groups = this.props.groupsState.groups.map(function (g) {\n return {\n text: g.get('name'),\n value: g.get('_id')\n };\n }).toArray();\n var assignees = this.props.accountsState.accounts.map(function (a) {\n return {\n text: a.get('fullname'),\n value: a.get('_id')\n };\n }).toArray();\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Modals_BaseModal__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n options: {\n bgclose: false\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n style: {\n marginBottom: 20\n }\n }, \"Ticket Filter\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: 'uk-form-stacked',\n onSubmit: function onSubmit(e) {\n return _this.onSubmit(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", null, \"Subject\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n name: 'subject',\n className: 'md-input'\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2\",\n style: {\n padding: '0 15px 0 0'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterDate_Start\",\n className: \"uk-form-label nopadding nomargin\"\n }, \"Date Start\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: \"filterDate_Start\",\n className: \"md-input\",\n name: \"filterDate_Start\",\n type: \"text\",\n \"data-uk-datepicker\": \"{format:'\" + lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().getShortDateFormat() + \"'}\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2\",\n style: {\n padding: '0 0 0 15px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterDate_End\",\n className: \"uk-form-label nopadding nomargin\"\n }, \"Date End\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: \"filterDate_End\",\n className: \"md-input\",\n name: \"filterDate_End\",\n type: \"text\",\n \"data-uk-datepicker\": \"{format:'\" + lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().getShortDateFormat() + \"'}\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: statuses,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.statusSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Ticket Tags\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: tags,\n showTextbox: true,\n multiple: true,\n ref: function ref(r) {\n return _this.tagsSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Ticket Type\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: types,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.typesSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Assignee\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: assignees,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.assigneeSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Groups\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: groups,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.groupSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-modal-footer uk-text-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n text: 'Cancel',\n flat: true,\n waves: true,\n extraClass: 'uk-modal-close'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n text: 'Apply Filter',\n style: 'primary',\n flat: false,\n type: 'submit'\n }))));\n }\n }]);\n\n return FilterTicketsModal;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nFilterTicketsModal.propTypes = {\n viewdata: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n groupsState: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n accountsState: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n hideModal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n fetchGroups: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n unloadGroups: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n fetchAccounts: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n unloadAccounts: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n getTagsWithPage: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketTags: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n fetchTicketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n viewdata: state.common.viewdata,\n groupsState: state.groupsState,\n accountsState: state.accountsState,\n ticketTags: state.tagsSettings.tags,\n ticketTypes: state.ticketsState.types,\n ticketStatuses: state.ticketsState.ticketStatuses\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)(mapStateToProps, {\n hideModal: actions_common__WEBPACK_IMPORTED_MODULE_3__.hideModal,\n fetchGroups: actions_groups__WEBPACK_IMPORTED_MODULE_4__.fetchGroups,\n unloadGroups: actions_groups__WEBPACK_IMPORTED_MODULE_4__.unloadGroups,\n fetchAccounts: actions_accounts__WEBPACK_IMPORTED_MODULE_5__.fetchAccounts,\n unloadAccounts: actions_accounts__WEBPACK_IMPORTED_MODULE_5__.unloadAccounts,\n getTagsWithPage: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.getTagsWithPage,\n fetchTicketTypes: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.fetchTicketTypes,\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.fetchTicketStatus\n})(FilterTicketsModal));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/FilterTicketsModal.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var actions_groups__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/groups */ 53);\n/* harmony import */ var actions_accounts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/accounts */ 59);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var containers_Modals_BaseModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! containers/Modals/BaseModal */ 45);\n/* harmony import */ var components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/SingleSelect */ 49);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_10__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 5/18/19 1:19 AM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar FilterTicketsModal = /*#__PURE__*/function (_React$Component) {\n _inherits(FilterTicketsModal, _React$Component);\n\n var _super = _createSuper(FilterTicketsModal);\n\n function FilterTicketsModal(props) {\n _classCallCheck(this, FilterTicketsModal);\n\n return _super.call(this, props);\n }\n\n _createClass(FilterTicketsModal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().UI.inputs();\n this.props.fetchGroups();\n this.props.fetchAccounts({\n page: 0,\n limit: -1,\n type: 'agents',\n showDeleted: false\n });\n this.props.getTagsWithPage({\n limit: -1\n });\n this.props.fetchTicketTypes();\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().UI.reRenderInputs();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.unloadGroups();\n this.props.unloadAccounts();\n }\n }, {\n key: \"onSubmit\",\n value: function onSubmit(e) {\n e.preventDefault();\n var startDate = e.target.filterDate_Start.value;\n var endDate = e.target.filterDate_End.value;\n var subject = e.target.subject.value;\n var statuses = this.statusSelect.value;\n var tags = this.tagsSelect.value;\n var types = this.typesSelect.value;\n var groups = this.groupSelect.value;\n var assignees = this.assigneeSelect.value;\n var queryString = '?f=1';\n if (startDate) queryString += \"&ds=\".concat(startDate);\n if (endDate) queryString += \"&de=\".concat(endDate);\n if (subject) queryString += \"&fs=\".concat(subject);\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(statuses, function (i) {\n queryString += \"&st=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(types, function (i) {\n queryString += \"&tt=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(tags, function (i) {\n queryString += \"&tag=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(groups, function (i) {\n queryString += \"&gp=\".concat(i);\n });\n (0,lodash__WEBPACK_IMPORTED_MODULE_1__.each)(assignees, function (i) {\n queryString += \"&au=\".concat(i);\n });\n History.pushState(null, null, \"/tickets/filter/\".concat(queryString, \"&r=\").concat(Math.floor(Math.random() * (99999 - 1 + 1)) + 1));\n this.props.hideModal();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var statuses = this.props.ticketStatuses.map(function (s) {\n return {\n text: s.get('name'),\n value: s.get('_id')\n };\n }).toArray();\n var tags = this.props.ticketTags.map(function (t) {\n return {\n text: t.get('name'),\n value: t.get('_id')\n };\n }).toArray();\n var types = this.props.ticketTypes.map(function (t) {\n return {\n text: t.get('name'),\n value: t.get('_id')\n };\n }).toArray();\n var groups = this.props.groupsState.groups.map(function (g) {\n return {\n text: g.get('name'),\n value: g.get('_id')\n };\n }).toArray();\n var assignees = this.props.accountsState.accounts.map(function (a) {\n return {\n text: a.get('fullname'),\n value: a.get('_id')\n };\n }).toArray();\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Modals_BaseModal__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n options: {\n bgclose: false\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n style: {\n marginBottom: 20\n }\n }, \"Ticket Filter\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: 'uk-form-stacked',\n onSubmit: function onSubmit(e) {\n return _this.onSubmit(e);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-margin-medium-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", null, \"Subject\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n name: 'subject',\n className: 'md-input'\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2\",\n style: {\n padding: '0 15px 0 0'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterDate_Start\",\n className: \"uk-form-label nopadding nomargin\"\n }, \"Date Start\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: \"filterDate_Start\",\n className: \"md-input\",\n name: \"filterDate_Start\",\n type: \"text\",\n \"data-uk-datepicker\": \"{format:'\" + lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().getShortDateFormat() + \"'}\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2\",\n style: {\n padding: '0 0 0 15px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterDate_End\",\n className: \"uk-form-label nopadding nomargin\"\n }, \"Date End\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: \"filterDate_End\",\n className: \"md-input\",\n name: \"filterDate_End\",\n type: \"text\",\n \"data-uk-datepicker\": \"{format:'\" + lib_helpers__WEBPACK_IMPORTED_MODULE_10___default().getShortDateFormat() + \"'}\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: statuses,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.statusSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Ticket Tags\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: tags,\n showTextbox: true,\n multiple: true,\n ref: function ref(r) {\n return _this.tagsSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Ticket Type\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: types,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.typesSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Assignee\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: assignees,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.assigneeSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-grid uk-grid-collapse uk-margin-small-bottom\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"filterStatus\",\n className: \"uk-form-label\",\n style: {\n paddingBottom: 0,\n marginBottom: 0\n }\n }, \"Groups\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SingleSelect__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n items: groups,\n showTextbox: false,\n multiple: true,\n ref: function ref(r) {\n return _this.groupSelect = r;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-modal-footer uk-text-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n text: 'Cancel',\n flat: true,\n waves: true,\n extraClass: 'uk-modal-close'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n text: 'Apply Filter',\n style: 'primary',\n flat: false,\n type: 'submit'\n }))));\n }\n }]);\n\n return FilterTicketsModal;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nFilterTicketsModal.propTypes = {\n viewdata: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n groupsState: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n accountsState: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n hideModal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n fetchGroups: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n unloadGroups: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n fetchAccounts: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n unloadAccounts: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n getTagsWithPage: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketTags: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n fetchTicketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n viewdata: state.common.viewdata,\n groupsState: state.groupsState,\n accountsState: state.accountsState,\n ticketTags: state.tagsSettings.tags,\n ticketTypes: state.ticketsState.types,\n ticketStatuses: state.ticketsState.ticketStatuses\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)(mapStateToProps, {\n hideModal: actions_common__WEBPACK_IMPORTED_MODULE_3__.hideModal,\n fetchGroups: actions_groups__WEBPACK_IMPORTED_MODULE_4__.fetchGroups,\n unloadGroups: actions_groups__WEBPACK_IMPORTED_MODULE_4__.unloadGroups,\n fetchAccounts: actions_accounts__WEBPACK_IMPORTED_MODULE_5__.fetchAccounts,\n unloadAccounts: actions_accounts__WEBPACK_IMPORTED_MODULE_5__.unloadAccounts,\n getTagsWithPage: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.getTagsWithPage,\n fetchTicketTypes: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.fetchTicketTypes,\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_6__.fetchTicketStatus\n})(FilterTicketsModal));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/FilterTicketsModal.jsx?");
/***/ }),
@@ -1192,7 +1203,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var _NoticeAlertModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NoticeAlertModal */ 922);\n/* harmony import */ var _CreateTicketTypeModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CreateTicketTypeModal */ 923);\n/* harmony import */ var _DeleteTicketTypeModal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DeleteTicketTypeModal */ 924);\n/* harmony import */ var _FilterTicketsModal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FilterTicketsModal */ 925);\n/* harmony import */ var _AddPriorityToTypeModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AddPriorityToTypeModal */ 926);\n/* harmony import */ var _CreatePriorityModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreatePriorityModal */ 927);\n/* harmony import */ var _CreateStatusModal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CreateStatusModal */ 928);\n/* harmony import */ var _DeletePriorityModal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./DeletePriorityModal */ 929);\n/* harmony import */ var _CreateTagModal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CreateTagModal */ 930);\n/* harmony import */ var _AddTagsModal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./AddTagsModal */ 931);\n/* harmony import */ var _CreateTicketModal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CreateTicketModal */ 932);\n/* harmony import */ var _CreateRoleModal__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CreateRoleModal */ 936);\n/* harmony import */ var _DeleteRoleModal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./DeleteRoleModal */ 937);\n/* harmony import */ var _ViewAllNotificationsModal__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ViewAllNotificationsModal */ 938);\n/* harmony import */ var _CreateAccountModal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CreateAccountModal */ 939);\n/* harmony import */ var _EditAccountModal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./EditAccountModal */ 940);\n/* harmony import */ var _CreateGroupModal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./CreateGroupModal */ 941);\n/* harmony import */ var _EditGroupModal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./EditGroupModal */ 942);\n/* harmony import */ var _CreateTeamModal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./CreateTeamModal */ 943);\n/* harmony import */ var _EditTeamModal__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./EditTeamModal */ 944);\n/* harmony import */ var _CreateDepartmentModal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CreateDepartmentModal */ 945);\n/* harmony import */ var _EditDepartmentModal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./EditDepartmentModal */ 946);\n/* harmony import */ var containers_Modals_CreateNoticeModal__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! containers/Modals/CreateNoticeModal */ 947);\n/* harmony import */ var containers_Modals_EditNoticeModal__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! containers/Modals/EditNoticeModal */ 949);\n/* harmony import */ var containers_Modals_LinkWarningModal__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! containers/Modals/LinkWarningModal */ 950);\n/* harmony import */ var containers_Modals_PasswordPromptModal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! containers/Modals/PasswordPromptModal */ 951);\n/* harmony import */ var containers_Modals_PrivacyPolicyModal__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! containers/Modals/PrivacyPolicyModal */ 952);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 8:28 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n // Modals\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar MODAL_COMPONENTS = {\n NOTICE_ALERT: _NoticeAlertModal__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CREATE_TICKET: _CreateTicketModal__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n CREATE_TICKET_TYPE: _CreateTicketTypeModal__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n DELETE_TICKET_TYPE: _DeleteTicketTypeModal__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n FILTER_TICKET: _FilterTicketsModal__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ADD_PRIORITY_TO_TYPE: _AddPriorityToTypeModal__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CREATE_PRIORITY: _CreatePriorityModal__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n DELETE_PRIORITY: _DeletePriorityModal__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n CREATE_STATUS: _CreateStatusModal__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CREATE_TAG: _CreateTagModal__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n ADD_TAGS_MODAL: _AddTagsModal__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n CREATE_ROLE: _CreateRoleModal__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n DELETE_ROLE: _DeleteRoleModal__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n VIEW_ALL_NOTIFICATIONS: _ViewAllNotificationsModal__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n CREATE_ACCOUNT: _CreateAccountModal__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n EDIT_ACCOUNT: _EditAccountModal__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n CREATE_GROUP: _CreateGroupModal__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n EDIT_GROUP: _EditGroupModal__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n CREATE_TEAM: _CreateTeamModal__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n EDIT_TEAM: _EditTeamModal__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n CREATE_DEPARTMENT: _CreateDepartmentModal__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n EDIT_DEPARTMENT: _EditDepartmentModal__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n CREATE_NOTICE: containers_Modals_CreateNoticeModal__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n EDIT_NOTICE: containers_Modals_EditNoticeModal__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n LINK_WARNING: containers_Modals_LinkWarningModal__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n PASSWORD_PROMPT: containers_Modals_PasswordPromptModal__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n PRIVACY_POLICY: containers_Modals_PrivacyPolicyModal__WEBPACK_IMPORTED_MODULE_28__[\"default\"]\n};\n\nvar ModalRoot = function ModalRoot(_ref) {\n var modalType = _ref.modalType,\n modalProps = _ref.modalProps;\n\n if (!modalType) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'modal-wrap'\n });\n }\n\n var SpecificModal = MODAL_COMPONENTS[modalType];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SpecificModal, modalProps);\n};\n\nModalRoot.propTypes = {\n modalType: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().string),\n modalProps: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(function (state) {\n return state.modal;\n})(ModalRoot));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/index.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var _NoticeAlertModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NoticeAlertModal */ 922);\n/* harmony import */ var _CreateTicketTypeModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CreateTicketTypeModal */ 923);\n/* harmony import */ var _DeleteTicketTypeModal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DeleteTicketTypeModal */ 924);\n/* harmony import */ var _FilterTicketsModal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FilterTicketsModal */ 925);\n/* harmony import */ var _AddPriorityToTypeModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AddPriorityToTypeModal */ 926);\n/* harmony import */ var _CreatePriorityModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreatePriorityModal */ 927);\n/* harmony import */ var _DeletePriorityModal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DeletePriorityModal */ 929);\n/* harmony import */ var _CreateStatusModal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CreateStatusModal */ 928);\n/* harmony import */ var _DeleteTicketStatusModal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DeleteTicketStatusModal */ 1300);\n/* harmony import */ var _CreateTagModal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateTagModal */ 930);\n/* harmony import */ var _AddTagsModal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./AddTagsModal */ 931);\n/* harmony import */ var _CreateTicketModal__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CreateTicketModal */ 932);\n/* harmony import */ var _CreateRoleModal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CreateRoleModal */ 936);\n/* harmony import */ var _DeleteRoleModal__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./DeleteRoleModal */ 937);\n/* harmony import */ var _ViewAllNotificationsModal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ViewAllNotificationsModal */ 938);\n/* harmony import */ var _CreateAccountModal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CreateAccountModal */ 939);\n/* harmony import */ var _EditAccountModal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./EditAccountModal */ 940);\n/* harmony import */ var _CreateGroupModal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CreateGroupModal */ 941);\n/* harmony import */ var _EditGroupModal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./EditGroupModal */ 942);\n/* harmony import */ var _CreateTeamModal__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CreateTeamModal */ 943);\n/* harmony import */ var _EditTeamModal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./EditTeamModal */ 944);\n/* harmony import */ var _CreateDepartmentModal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./CreateDepartmentModal */ 945);\n/* harmony import */ var _EditDepartmentModal__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./EditDepartmentModal */ 946);\n/* harmony import */ var containers_Modals_CreateNoticeModal__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! containers/Modals/CreateNoticeModal */ 947);\n/* harmony import */ var containers_Modals_EditNoticeModal__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! containers/Modals/EditNoticeModal */ 949);\n/* harmony import */ var containers_Modals_LinkWarningModal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! containers/Modals/LinkWarningModal */ 950);\n/* harmony import */ var containers_Modals_PasswordPromptModal__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! containers/Modals/PasswordPromptModal */ 951);\n/* harmony import */ var containers_Modals_PrivacyPolicyModal__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! containers/Modals/PrivacyPolicyModal */ 952);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 8:28 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\n\n\n // Modals\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar MODAL_COMPONENTS = {\n NOTICE_ALERT: _NoticeAlertModal__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n CREATE_TICKET: _CreateTicketModal__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n CREATE_TICKET_TYPE: _CreateTicketTypeModal__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n DELETE_TICKET_TYPE: _DeleteTicketTypeModal__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n FILTER_TICKET: _FilterTicketsModal__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ADD_PRIORITY_TO_TYPE: _AddPriorityToTypeModal__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CREATE_PRIORITY: _CreatePriorityModal__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n DELETE_PRIORITY: _DeletePriorityModal__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n CREATE_STATUS: _CreateStatusModal__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n DELETE_STATUS: _DeleteTicketStatusModal__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n CREATE_TAG: _CreateTagModal__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n ADD_TAGS_MODAL: _AddTagsModal__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n CREATE_ROLE: _CreateRoleModal__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n DELETE_ROLE: _DeleteRoleModal__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n VIEW_ALL_NOTIFICATIONS: _ViewAllNotificationsModal__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n CREATE_ACCOUNT: _CreateAccountModal__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n EDIT_ACCOUNT: _EditAccountModal__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n CREATE_GROUP: _CreateGroupModal__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n EDIT_GROUP: _EditGroupModal__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n CREATE_TEAM: _CreateTeamModal__WEBPACK_IMPORTED_MODULE_21__[\"default\"],\n EDIT_TEAM: _EditTeamModal__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n CREATE_DEPARTMENT: _CreateDepartmentModal__WEBPACK_IMPORTED_MODULE_23__[\"default\"],\n EDIT_DEPARTMENT: _EditDepartmentModal__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n CREATE_NOTICE: containers_Modals_CreateNoticeModal__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n EDIT_NOTICE: containers_Modals_EditNoticeModal__WEBPACK_IMPORTED_MODULE_26__[\"default\"],\n LINK_WARNING: containers_Modals_LinkWarningModal__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n PASSWORD_PROMPT: containers_Modals_PasswordPromptModal__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n PRIVACY_POLICY: containers_Modals_PrivacyPolicyModal__WEBPACK_IMPORTED_MODULE_29__[\"default\"]\n};\n\nvar ModalRoot = function ModalRoot(_ref) {\n var modalType = _ref.modalType,\n modalProps = _ref.modalProps;\n\n if (!modalType) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'modal-wrap'\n });\n }\n\n var SpecificModal = MODAL_COMPONENTS[modalType];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SpecificModal, modalProps);\n};\n\nModalRoot.propTypes = {\n modalType: (prop_types__WEBPACK_IMPORTED_MODULE_30___default().string),\n modalProps: (prop_types__WEBPACK_IMPORTED_MODULE_30___default().object)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(function (state) {\n return state.modal;\n})(ModalRoot));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Modals/index.jsx?");
/***/ }),
@@ -1511,7 +1522,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var components_Input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Input */ 602);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var actions_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! actions/settings */ 47);\n/* harmony import */ var components_ColorSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/ColorSelector */ 151);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/Settings/EnableSwitch */ 72);\n/* harmony import */ var api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! api */ 52);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\n * . .o8 oooo\n * .o8 \"888 `888\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\n * ========================================================================\n * Author: Chris Brame\n * Updated: 6/20/23 6:00 PM\n * Copyright (c) 2014-2023. All rights reserved.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TicketStatusBody = (0,mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketStatusBody, _React$Component);\n\n var _super = _createSuper(TicketStatusBody);\n\n function TicketStatusBody(props) {\n var _this;\n\n _classCallCheck(this, TicketStatusBody);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"statusName\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"htmlColor\", _descriptor2, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"slatimer\", _descriptor3, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"isResolved\", _descriptor4, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TicketStatusBody, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.statusName = this.props.status.get('name') || '';\n this.htmlColor = this.props.status.get('htmlColor') || '';\n this.isResolved = this.props.status.get('isResolved') || false;\n this.slatimer = this.props.status.get('slatimer') || false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.statusName === '') this.statusName = this.props.status.get('name') || '';\n if (this.htmlColor === '') this.htmlColor = this.props.status.get('htmlColor') || '';\n if (this.isResolved === '') this.isResolved = this.props.status.get('isResolved') || false;\n if (this.slatimer === '') this.slatimer = this.props.status.get('slatimer') || false;\n }\n }, {\n key: \"onSaveClicked\",\n value: function onSaveClicked(e) {\n var _this2 = this;\n\n var id = this.props.status.get('_id');\n var name = this.statusName;\n var htmlColor = this.htmlColor;\n var isResolved = this.isResolved;\n var slatimer = this.slatimer;\n api__WEBPACK_IMPORTED_MODULE_7__[\"default\"].tickets.updateStatus({\n id: id,\n name: name,\n htmlColor: htmlColor,\n isResolved: isResolved,\n slatimer: slatimer\n }).then(function (res) {\n lib_helpers__WEBPACK_IMPORTED_MODULE_8___default().UI.showSnackbar('Status updated');\n\n _this2.props.fetchSettings();\n })[\"catch\"](function (e) {\n console.log(e);\n lib_helpers__WEBPACK_IMPORTED_MODULE_8___default().UI.showSnackbar(e, true);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'ticket-status-general-wrapper'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light\"\n }, \"General\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n margin: '5px 0 25px 0'\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginBottom: 15\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n style: {\n display: 'inline-block',\n cursor: 'pointer'\n }\n }, \"Status Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Input__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n defaultValue: this.statusName,\n onChange: function onChange(v) {\n return _this3.statusName = v;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginBottom: 15\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n style: {\n display: 'inline-block',\n cursor: 'pointer'\n }\n }, \"Status Color\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_ColorSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n showLabel: false,\n hideRevert: true,\n defaultColor: this.htmlColor,\n onChange: function onChange(e) {\n return _this3.htmlColor = e.target.value;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light mt-25\"\n }, \"Properties\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n margin: '5px 0 25px 0'\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-2',\n style: {\n flexGrow: 1\n }\n }, \"SLA Timer\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n stateName: \"slatimer_\".concat(this.props.status.get('_id')),\n label: 'Yes',\n checked: this.slatimer,\n onChange: function onChange(e) {\n return _this3.slatimer = e.target.checked;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-2',\n style: {\n flexGrow: 1\n }\n }, \"Is Resolved\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n stateName: \"isResolved_\".concat(this.props.status.get('_id')),\n label: 'Yes',\n checked: this.isResolved,\n onChange: function onChange(e) {\n return _this3.isResolved = e.target.checked;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top',\n style: {\n display: 'flex',\n justifyContent: 'flex-end'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: 'Save Status',\n style: 'success',\n onClick: function onClick(e) {\n return _this3.onSaveClicked(e);\n }\n }))), !this.props.status.get('isLocked') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top',\n style: {\n display: 'block',\n height: 15\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light\"\n }, \"Danger Zone\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"danger-zone\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"dz-box uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-left\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", null, \"Delete this status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, \"Once you delete a ticket status, there is no going back. Please be certain.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\",\n style: {\n paddingTop: '10px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: 'Delete',\n small: true,\n style: 'danger',\n onClick: function onClick(e) {\n return _this3.showDeleteTicketStatusModal(e, type);\n }\n })))))));\n }\n }]);\n\n return TicketStatusBody;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"statusName\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"htmlColor\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"slatimer\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"isResolved\", [mobx__WEBPACK_IMPORTED_MODULE_10__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n})), _class2)) || _class;\n\nTicketStatusBody.propTypes = {\n status: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object.isRequired),\n fetchSettings: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(null, {\n fetchSettings: actions_settings__WEBPACK_IMPORTED_MODULE_3__.fetchSettings\n})(TicketStatusBody));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Settings/Tickets/ticketStatusBody.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var components_Input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Input */ 602);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var actions_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! actions/settings */ 47);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/ColorSelector */ 151);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! components/Settings/EnableSwitch */ 72);\n/* harmony import */ var api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! api */ 52);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_9__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\n * . .o8 oooo\n * .o8 \"888 `888\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\n * ========================================================================\n * Author: Chris Brame\n * Updated: 6/20/23 6:00 PM\n * Copyright (c) 2014-2023. All rights reserved.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TicketStatusBody = (0,mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketStatusBody, _React$Component);\n\n var _super = _createSuper(TicketStatusBody);\n\n function TicketStatusBody(props) {\n var _this;\n\n _classCallCheck(this, TicketStatusBody);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"statusName\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"htmlColor\", _descriptor2, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"slatimer\", _descriptor3, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"isResolved\", _descriptor4, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_11__.makeObservable)(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TicketStatusBody, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.statusName = this.props.status.get('name') || '';\n this.htmlColor = this.props.status.get('htmlColor') || '';\n this.isResolved = this.props.status.get('isResolved') || false;\n this.slatimer = this.props.status.get('slatimer') || false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.statusName === '') this.statusName = this.props.status.get('name') || '';\n if (this.htmlColor === '') this.htmlColor = this.props.status.get('htmlColor') || '';\n if (this.isResolved === '') this.isResolved = this.props.status.get('isResolved') || false;\n if (this.slatimer === '') this.slatimer = this.props.status.get('slatimer') || false;\n }\n }, {\n key: \"onSaveClicked\",\n value: function onSaveClicked(e) {\n var _this2 = this;\n\n var id = this.props.status.get('_id');\n var name = this.statusName;\n var htmlColor = this.htmlColor;\n var isResolved = this.isResolved;\n var slatimer = this.slatimer;\n api__WEBPACK_IMPORTED_MODULE_8__[\"default\"].tickets.updateStatus({\n id: id,\n name: name,\n htmlColor: htmlColor,\n isResolved: isResolved,\n slatimer: slatimer\n }).then(function (res) {\n lib_helpers__WEBPACK_IMPORTED_MODULE_9___default().UI.showSnackbar('Status updated');\n\n _this2.props.fetchSettings();\n })[\"catch\"](function (e) {\n console.log(e);\n lib_helpers__WEBPACK_IMPORTED_MODULE_9___default().UI.showSnackbar(e, true);\n });\n }\n }, {\n key: \"showDeleteTicketStatusModal\",\n value: function showDeleteTicketStatusModal(e, status) {\n this.props.showModal('DELETE_STATUS', {\n status: status\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'ticket-status-general-wrapper'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light\"\n }, \"General\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n margin: '5px 0 25px 0'\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginBottom: 15\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n style: {\n display: 'inline-block',\n cursor: 'pointer'\n }\n }, \"Status Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Input__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n defaultValue: this.statusName,\n onChange: function onChange(v) {\n return _this3.statusName = v;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginBottom: 15\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n style: {\n display: 'inline-block',\n cursor: 'pointer'\n }\n }, \"Status Color\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_ColorSelector__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n showLabel: false,\n hideRevert: true,\n defaultColor: this.htmlColor,\n onChange: function onChange(e) {\n return _this3.htmlColor = e.target.value;\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light mt-25\"\n }, \"Properties\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n margin: '5px 0 25px 0'\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-2',\n style: {\n flexGrow: 1\n }\n }, \"SLA Timer\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n stateName: \"slatimer_\".concat(this.props.status.get('_id')),\n label: 'Yes',\n checked: this.slatimer,\n onChange: function onChange(e) {\n return _this3.slatimer = e.target.checked;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", {\n className: 'uk-width-1-2',\n style: {\n flexGrow: 1\n }\n }, \"Is Resolved\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_EnableSwitch__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n stateName: \"isResolved_\".concat(this.props.status.get('_id')),\n label: 'Yes',\n checked: this.isResolved,\n onChange: function onChange(e) {\n return _this3.isResolved = e.target.checked;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top',\n style: {\n display: 'flex',\n justifyContent: 'flex-end'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n text: 'Save Status',\n style: 'success',\n onClick: function onClick(e) {\n return _this3.onSaveClicked(e);\n }\n }))), !this.props.status.get('isLocked') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top',\n style: {\n display: 'block',\n height: 15\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-margin-large-top'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h2\", {\n className: \"text-light\"\n }, \"Danger Zone\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"danger-zone\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"dz-box uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-left\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", null, \"Delete this status\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, \"Once you delete a ticket status, there is no going back. Please be certain.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\",\n style: {\n paddingTop: '10px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n text: 'Delete',\n small: true,\n style: 'danger',\n onClick: function onClick(e) {\n return _this3.showDeleteTicketStatusModal(e, _this3.props.status);\n }\n })))))));\n }\n }]);\n\n return TicketStatusBody;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"statusName\", [mobx__WEBPACK_IMPORTED_MODULE_11__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"htmlColor\", [mobx__WEBPACK_IMPORTED_MODULE_11__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"slatimer\", [mobx__WEBPACK_IMPORTED_MODULE_11__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"isResolved\", [mobx__WEBPACK_IMPORTED_MODULE_11__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n})), _class2)) || _class;\n\nTicketStatusBody.propTypes = {\n status: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().object.isRequired),\n fetchSettings: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func.isRequired),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func.isRequired),\n hideModal: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(null, {\n fetchSettings: actions_settings__WEBPACK_IMPORTED_MODULE_3__.fetchSettings,\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_4__.showModal,\n hideModal: actions_common__WEBPACK_IMPORTED_MODULE_4__.hideModal\n})(TicketStatusBody));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Settings/Tickets/ticketStatusBody.jsx?");
/***/ }),
@@ -1522,7 +1533,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var components_Settings_SplitSettingsPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Settings/SplitSettingsPanel */ 335);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var containers_Settings_Tickets_ticketStatusBody__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! containers/Settings/Tickets/ticketStatusBody */ 1299);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 6/20/23 3:39 PM\r\n * Copyright (c) 2014-2023. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\nvar TicketStatusContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(_class = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketStatusContainer, _React$Component);\n\n var _super = _createSuper(TicketStatusContainer);\n\n function TicketStatusContainer() {\n _classCallCheck(this, TicketStatusContainer);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TicketStatusContainer, [{\n key: \"onCreateStatusClicked\",\n value: function onCreateStatusClicked(e) {\n console.log(e);\n }\n }, {\n key: \"onStatusOrderChanged\",\n value: function onStatusOrderChanged(e) {\n var children = jquery__WEBPACK_IMPORTED_MODULE_4___default()(e.target).children('li');\n var arr = [];\n\n for (var i = 0; i < children.length; i++) {\n arr.push(jquery__WEBPACK_IMPORTED_MODULE_4___default()(children[i]).attr('data-key'));\n }\n\n axios__WEBPACK_IMPORTED_MODULE_5___default().put('/api/v1/tickets/status/order', {\n order: arr\n }).then(function (res) {\n console.log(res);\n })[\"catch\"](function (err) {\n var _err$response;\n\n console.log(err);\n lib_helpers__WEBPACK_IMPORTED_MODULE_6___default().UI.showSnackbar(err.message || ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.statusText), true);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_SplitSettingsPanel__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n title: 'Ticket Status',\n subtitle: 'Ticket status sets the state of a ticket. (Active, Pending, Resolved, etc.)',\n rightComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n text: 'Create',\n style: 'success',\n flat: true,\n waves: true,\n onClick: function onClick(e) {\n return _this.onCreateStatusClicked(e);\n }\n }),\n menuItems: this.props.statuses ? this.props.statuses.map(function (status) {\n return {\n key: status.get('_id'),\n title: status.get('name'),\n content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", {\n style: {\n display: 'inline-block'\n }\n }, status.get('name')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n style: {\n display: 'inline-block',\n marginLeft: 5,\n width: 10,\n height: 10,\n background: status.get('htmlColor'),\n borderRadius: 3\n }\n })),\n bodyComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Settings_Tickets_ticketStatusBody__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n status: status\n })\n };\n }) : [],\n menuDraggable: true,\n menuOnDrag: function menuOnDrag(e) {\n return _this.onStatusOrderChanged(e);\n }\n }));\n }\n }]);\n\n return TicketStatusContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component)) || _class;\n\nTicketStatusContainer.propTypes = {\n statuses: prop_types__WEBPACK_IMPORTED_MODULE_9___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_9___default().object))\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {};\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {})(TicketStatusContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Settings/Tickets/ticketStatusContainer.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var components_Settings_SplitSettingsPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! components/Settings/SplitSettingsPanel */ 335);\n/* harmony import */ var components_Button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/Button */ 39);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! jquery */ 0);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var containers_Settings_Tickets_ticketStatusBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! containers/Settings/Tickets/ticketStatusBody */ 1299);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 6/20/23 3:39 PM\r\n * Copyright (c) 2014-2023. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\nvar TicketStatusContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(_class = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketStatusContainer, _React$Component);\n\n var _super = _createSuper(TicketStatusContainer);\n\n function TicketStatusContainer() {\n _classCallCheck(this, TicketStatusContainer);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TicketStatusContainer, [{\n key: \"onCreateStatusClicked\",\n value: function onCreateStatusClicked(e) {\n this.props.showModal('CREATE_STATUS');\n }\n }, {\n key: \"onStatusOrderChanged\",\n value: function onStatusOrderChanged(e) {\n var children = jquery__WEBPACK_IMPORTED_MODULE_5___default()(e.target).children('li');\n var arr = [];\n\n for (var i = 0; i < children.length; i++) {\n arr.push(jquery__WEBPACK_IMPORTED_MODULE_5___default()(children[i]).attr('data-key'));\n }\n\n axios__WEBPACK_IMPORTED_MODULE_6___default().put('/api/v1/tickets/status/order', {\n order: arr\n }).then(function (res) {})[\"catch\"](function (err) {\n var _err$response;\n\n console.log(err);\n lib_helpers__WEBPACK_IMPORTED_MODULE_7___default().UI.showSnackbar(err.message || ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.statusText), true);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Settings_SplitSettingsPanel__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n title: 'Ticket Status',\n subtitle: 'Ticket status sets the state of a ticket. (Active, Pending, Resolved, etc.)',\n rightComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Button__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: 'Create',\n style: 'success',\n flat: true,\n waves: true,\n onClick: function onClick(e) {\n return _this.onCreateStatusClicked(e);\n }\n }),\n menuItems: this.props.statuses ? this.props.statuses.map(function (status) {\n return {\n key: status.get('_id'),\n title: status.get('name'),\n content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", {\n style: {\n display: 'inline-block'\n }\n }, status.get('name')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n style: {\n display: 'inline-block',\n marginLeft: 5,\n width: 10,\n height: 10,\n background: status.get('htmlColor'),\n borderRadius: 3\n }\n })),\n bodyComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Settings_Tickets_ticketStatusBody__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n status: status\n })\n };\n }) : [],\n menuDraggable: true,\n menuOnDrag: function menuOnDrag(e) {\n return _this.onStatusOrderChanged(e);\n }\n }));\n }\n }]);\n\n return TicketStatusContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component)) || _class;\n\nTicketStatusContainer.propTypes = {\n statuses: prop_types__WEBPACK_IMPORTED_MODULE_10___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_10___default().object)),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func.isRequired),\n hideModal: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {};\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_2__.showModal,\n hideModal: actions_common__WEBPACK_IMPORTED_MODULE_2__.hideModal\n})(TicketStatusContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Settings/Tickets/ticketStatusContainer.jsx?");
/***/ }),
@@ -1566,7 +1577,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_html_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-html-parser */ 663);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_3__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/22/19 4:14 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\nvar setupImages = function setupImages(parent) {\n var imagesEl = parent.body.querySelectorAll('img:not(.hasLinked)');\n imagesEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().setupImageLink(i);\n });\n};\n\nvar setupLinks = function setupLinks(parent) {\n var linksEl = parent.body.querySelectorAll('a');\n linksEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().setupLinkWarning(i);\n });\n};\n\nvar CommentNotePartial = /*#__PURE__*/function (_React$Component) {\n _inherits(CommentNotePartial, _React$Component);\n\n var _super = _createSuper(CommentNotePartial);\n\n function CommentNotePartial() {\n _classCallCheck(this, CommentNotePartial);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CommentNotePartial, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n setupImages(this);\n setupLinks(this);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n setupImages(this);\n setupLinks(this);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {}\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var _this$props = this.props,\n ticketSubject = _this$props.ticketSubject,\n comment = _this$props.comment,\n isNote = _this$props.isNote,\n dateFormat = _this$props.dateFormat,\n onEditClick = _this$props.onEditClick,\n onRemoveClick = _this$props.onRemoveClick;\n var dateFormatted = lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().formatDate(comment.date, dateFormat);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-comment\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n image: comment.owner.image,\n userId: comment.owner._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, \"Re: \", ticketSubject), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n className: \"comment-email-link\",\n href: \"mailto:\".concat(comment.owner.email)\n }, comment.owner.fullname, \" <\", comment.owner.email, \">\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: dateFormatted,\n title: dateFormatted,\n \"data-uk-tooltip\": \"{delay: 200}\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().calendarDate(comment.date)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"uk-badge uk-badge-small nomargin-left-right text-white\"\n }, \"NOTE\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comment-body\",\n style: {\n marginTop: 10\n },\n ref: function ref(r) {\n return _this.body = r;\n }\n }, isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(comment.note)), !isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(comment.comment)))), this.props.ticketStatus !== 3 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comment-actions\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().hasPermOverRole(comment.owner.role, null, 'comments:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"remove-comment\",\n onClick: onRemoveClick\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE5CD\")), lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().hasPermOverRole(comment.owner.role, null, 'comments:update', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"edit-comment\",\n onClick: onEditClick\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE254\"))));\n }\n }]);\n\n return CommentNotePartial;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nCommentNotePartial.propTypes = {\n ticketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number.isRequired),\n ticketSubject: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string.isRequired),\n comment: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object.isRequired),\n dateFormat: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string.isRequired),\n isNote: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool.isRequired),\n onEditClick: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func.isRequired),\n onRemoveClick: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func.isRequired)\n};\nCommentNotePartial.defaultProps = {\n isNote: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CommentNotePartial);\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/CommentNotePartial.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_html_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-html-parser */ 663);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_3__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/22/19 4:14 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\nvar setupImages = function setupImages(parent) {\n var imagesEl = parent.body.querySelectorAll('img:not(.hasLinked)');\n imagesEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().setupImageLink(i);\n });\n};\n\nvar setupLinks = function setupLinks(parent) {\n var linksEl = parent.body.querySelectorAll('a');\n linksEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().setupLinkWarning(i);\n });\n};\n\nvar CommentNotePartial = /*#__PURE__*/function (_React$Component) {\n _inherits(CommentNotePartial, _React$Component);\n\n var _super = _createSuper(CommentNotePartial);\n\n function CommentNotePartial() {\n _classCallCheck(this, CommentNotePartial);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CommentNotePartial, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n setupImages(this);\n setupLinks(this);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n setupImages(this);\n setupLinks(this);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {}\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var _this$props = this.props,\n ticketSubject = _this$props.ticketSubject,\n comment = _this$props.comment,\n isNote = _this$props.isNote,\n dateFormat = _this$props.dateFormat,\n onEditClick = _this$props.onEditClick,\n onRemoveClick = _this$props.onRemoveClick;\n var dateFormatted = lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().formatDate(comment.date, dateFormat);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-comment\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n image: comment.owner.image,\n userId: comment.owner._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, \"Re: \", ticketSubject), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n className: \"comment-email-link\",\n href: \"mailto:\".concat(comment.owner.email)\n }, comment.owner.fullname, \" <\", comment.owner.email, \">\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: dateFormatted,\n title: dateFormatted,\n \"data-uk-tooltip\": \"{delay: 200}\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().calendarDate(comment.date)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"uk-badge uk-badge-small nomargin-left-right text-white\"\n }, \"NOTE\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comment-body\",\n style: {\n marginTop: 10\n },\n ref: function ref(r) {\n return _this.body = r;\n }\n }, isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(comment.note)), !isNote && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(comment.comment)))), this.props.ticketStatus.get('isResolved') === false && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comment-actions\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().hasPermOverRole(comment.owner.role, null, 'comments:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"remove-comment\",\n onClick: onRemoveClick\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE5CD\")), lib_helpers__WEBPACK_IMPORTED_MODULE_3___default().hasPermOverRole(comment.owner.role, null, 'comments:update', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"edit-comment\",\n onClick: onEditClick\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE254\"))));\n }\n }]);\n\n return CommentNotePartial;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nCommentNotePartial.propTypes = {\n ticketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object.isRequired),\n ticketSubject: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string.isRequired),\n comment: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object.isRequired),\n dateFormat: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string.isRequired),\n isNote: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool.isRequired),\n onEditClick: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func.isRequired),\n onRemoveClick: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func.isRequired)\n};\nCommentNotePartial.defaultProps = {\n isNote: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CommentNotePartial);\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/CommentNotePartial.jsx?");
/***/ }),
@@ -1577,7 +1588,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var react_html_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-html-parser */ 663);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ 41);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/24/19 5:32 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\nvar setupImages = function setupImages(parent) {\n var imagesEl = parent.issueBody.querySelectorAll('img:not(.hasLinked)');\n imagesEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().setupImageLink(i);\n });\n};\n\nvar setupLinks = function setupLinks(parent) {\n var linksEl = parent.issueBody.querySelectorAll('a');\n linksEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().setupLinkWarning(i);\n });\n};\n\nvar IssuePartial = (0,mobx_react__WEBPACK_IMPORTED_MODULE_7__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(IssuePartial, _React$Component);\n\n var _super = _createSuper(IssuePartial);\n\n function IssuePartial(props) {\n var _this;\n\n _classCallCheck(this, IssuePartial);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"ticketId\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"status\", _descriptor2, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"owner\", _descriptor3, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"subject\", _descriptor4, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"issue\", _descriptor5, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"attachments\", _descriptor6, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(_assertThisInitialized(_this));\n _this.ticketId = _this.props.ticketId;\n _this.status = _this.props.status;\n _this.owner = _this.props.owner;\n _this.subject = _this.props.subject;\n _this.issue = _this.props.issue;\n _this.attachments = _this.props.attachments;\n _this.onUpdateTicketAttachments = _this.onUpdateTicketAttachments.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(IssuePartial, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n setupImages(this);\n setupLinks(this);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, this.onUpdateTicketAttachments);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.ticketId !== this.props.ticketId) this.ticketId = this.props.ticketId;\n if (prevProps.status !== this.props.status) this.status = this.props.status;\n if (prevProps.owner !== this.props.owner) this.owner = this.props.owner;\n if (prevProps.subject !== this.props.subject) this.subject = this.props.subject;\n if (prevProps.issue !== this.props.issue) this.issue = this.props.issue;\n if (prevProps.attachments !== this.props.attachments) this.attachments = this.props.attachments;\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, this.onUpdateTicketAttachments);\n }\n }, {\n key: \"onUpdateTicketAttachments\",\n value: function onUpdateTicketAttachments(data) {\n if (this.ticketId === data.ticket._id) {\n this.attachments = data.ticket.attachments;\n }\n }\n }, {\n key: \"onAttachmentInputChange\",\n value: function onAttachmentInputChange(e) {\n var _this2 = this;\n\n var formData = new FormData();\n var attachmentFile = e.target.files[0];\n formData.append('ticketId', this.ticketId);\n formData.append('attachment', attachmentFile);\n var token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n axios__WEBPACK_IMPORTED_MODULE_5___default().post(\"/tickets/uploadattachment\", formData, {\n headers: {\n 'Content-Type': 'multipart/form-data',\n 'CSRF-TOKEN': token\n }\n }).then(function () {\n _this2.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, {\n _id: _this2.ticketId\n });\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar('Attachment Successfully Uploaded');\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"removeAttachment\",\n value: function removeAttachment(e, attachmentId) {\n var _this3 = this;\n\n axios__WEBPACK_IMPORTED_MODULE_5___default()[\"delete\"](\"/api/v1/tickets/\".concat(this.ticketId, \"/attachments/remove/\").concat(attachmentId)).then(function () {\n _this3.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, {\n _id: _this3.ticketId\n });\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar('Attachment Removed');\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"initial-issue uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n image: this.owner.image,\n userId: this.owner._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", {\n className: \"subject-text\"\n }, this.subject), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"mailto:\".concat(this.owner.email)\n }, this.owner.fullname, \" <\", this.owner.email, \">\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().formatDate(this.props.date, 'YYYY-MM-DD HH:mm')\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().formatDate(this.props.date, this.props.dateFormat)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"attachments\"\n }, this.attachments && this.attachments.map(function (attachment) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: attachment._id\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: attachment.path,\n className: \"no-ajaxy\",\n rel: \"noopener noreferrer\",\n target: \"_blank\"\n }, attachment.name), _this4.status !== 3 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: 'remove-attachment',\n onClick: function onClick(e) {\n return _this4.removeAttachment(e, attachment._id);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"fa fa-remove\"\n })));\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-body\",\n ref: function ref(r) {\n return _this4.issueBody = r;\n }\n }, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.issue))), this.status !== 3 && lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().hasPermOverRole(this.props.owner.role, null, 'tickets:update', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'edit-issue',\n onClick: function onClick() {\n if (_this4.props.editorWindow) _this4.props.editorWindow.openEditorWindow({\n subject: _this4.subject,\n text: _this4.issue,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_ISSUE_SET, {\n _id: _this4.ticketId,\n value: data.text,\n subject: data.subjectText\n });\n }\n });\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE254\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: \"form nomargin\",\n encType: \"multipart/form-data\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"add-attachment\",\n onClick: function onClick(e) {\n return _this4.attachmentInput.click();\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE226\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n ref: function ref(r) {\n return _this4.attachmentInput = r;\n },\n className: \"hide\",\n type: \"file\",\n onChange: function onChange(e) {\n return _this4.onAttachmentInputChange(e);\n }\n }))));\n }\n }]);\n\n return IssuePartial;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"ticketId\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"status\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"owner\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"subject\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, \"issue\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, \"attachments\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return [];\n }\n})), _class2)) || _class;\n\nIssuePartial.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n status: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number.isRequired),\n owner: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object.isRequired),\n subject: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n issue: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n date: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n dateFormat: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n attachments: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().array),\n editorWindow: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IssuePartial);\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/IssuePartial.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var react_html_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-html-parser */ 663);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ 41);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/24/19 5:32 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\nvar setupImages = function setupImages(parent) {\n var imagesEl = parent.issueBody.querySelectorAll('img:not(.hasLinked)');\n imagesEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().setupImageLink(i);\n });\n};\n\nvar setupLinks = function setupLinks(parent) {\n var linksEl = parent.issueBody.querySelectorAll('a');\n linksEl.forEach(function (i) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().setupLinkWarning(i);\n });\n};\n\nvar IssuePartial = (0,mobx_react__WEBPACK_IMPORTED_MODULE_7__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(IssuePartial, _React$Component);\n\n var _super = _createSuper(IssuePartial);\n\n function IssuePartial(props) {\n var _this;\n\n _classCallCheck(this, IssuePartial);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"ticketId\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"status\", _descriptor2, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"owner\", _descriptor3, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"subject\", _descriptor4, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"issue\", _descriptor5, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"attachments\", _descriptor6, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(_assertThisInitialized(_this));\n _this.ticketId = _this.props.ticketId;\n _this.status = _this.props.status;\n _this.owner = _this.props.owner;\n _this.subject = _this.props.subject;\n _this.issue = _this.props.issue;\n _this.attachments = _this.props.attachments;\n _this.onUpdateTicketAttachments = _this.onUpdateTicketAttachments.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(IssuePartial, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n setupImages(this);\n setupLinks(this);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, this.onUpdateTicketAttachments);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.ticketId !== this.props.ticketId) this.ticketId = this.props.ticketId;\n if (prevProps.status !== this.props.status) this.status = this.props.status;\n if (prevProps.owner !== this.props.owner) this.owner = this.props.owner;\n if (prevProps.subject !== this.props.subject) this.subject = this.props.subject;\n if (prevProps.issue !== this.props.issue) this.issue = this.props.issue;\n if (prevProps.attachments !== this.props.attachments) this.attachments = this.props.attachments;\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, this.onUpdateTicketAttachments);\n }\n }, {\n key: \"onUpdateTicketAttachments\",\n value: function onUpdateTicketAttachments(data) {\n if (this.ticketId === data.ticket._id) {\n this.attachments = data.ticket.attachments;\n }\n }\n }, {\n key: \"onAttachmentInputChange\",\n value: function onAttachmentInputChange(e) {\n var _this2 = this;\n\n var formData = new FormData();\n var attachmentFile = e.target.files[0];\n formData.append('ticketId', this.ticketId);\n formData.append('attachment', attachmentFile);\n var token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n axios__WEBPACK_IMPORTED_MODULE_5___default().post(\"/tickets/uploadattachment\", formData, {\n headers: {\n 'Content-Type': 'multipart/form-data',\n 'CSRF-TOKEN': token\n }\n }).then(function () {\n _this2.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, {\n _id: _this2.ticketId\n });\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar('Attachment Successfully Uploaded');\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"removeAttachment\",\n value: function removeAttachment(e, attachmentId) {\n var _this3 = this;\n\n axios__WEBPACK_IMPORTED_MODULE_5___default()[\"delete\"](\"/api/v1/tickets/\".concat(this.ticketId, \"/attachments/remove/\").concat(attachmentId)).then(function () {\n _this3.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_ATTACHMENTS_UPDATE, {\n _id: _this3.ticketId\n });\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar('Attachment Removed');\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"initial-issue uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n image: this.owner.image,\n userId: this.owner._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", {\n className: \"subject-text\"\n }, this.subject), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"mailto:\".concat(this.owner.email)\n }, this.owner.fullname, \" <\", this.owner.email, \">\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().formatDate(this.props.date, 'YYYY-MM-DD HH:mm')\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().formatDate(this.props.date, this.props.dateFormat)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"attachments\"\n }, this.attachments && this.attachments.map(function (attachment) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: attachment._id\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: attachment.path,\n className: \"no-ajaxy\",\n rel: \"noopener noreferrer\",\n target: \"_blank\"\n }, attachment.name), _this4.status.get('isResolved') === false && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: 'remove-attachment',\n onClick: function onClick(e) {\n return _this4.removeAttachment(e, attachment._id);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"fa fa-remove\"\n })));\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"issue-body\",\n ref: function ref(r) {\n return _this4.issueBody = r;\n }\n }, (0,react_html_parser__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.issue))), this.status.get('isResolved') === false && lib_helpers__WEBPACK_IMPORTED_MODULE_4___default().hasPermOverRole(this.props.owner.role, null, 'tickets:update', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'edit-issue',\n onClick: function onClick() {\n if (_this4.props.editorWindow) _this4.props.editorWindow.openEditorWindow({\n subject: _this4.subject,\n text: _this4.issue,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_ISSUE_SET, {\n _id: _this4.ticketId,\n value: data.text,\n subject: data.subjectText\n });\n }\n });\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE254\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n className: \"form nomargin\",\n encType: \"multipart/form-data\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"add-attachment\",\n onClick: function onClick(e) {\n return _this4.attachmentInput.click();\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE226\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n ref: function ref(r) {\n return _this4.attachmentInput = r;\n },\n className: \"hide\",\n type: \"file\",\n onChange: function onChange(e) {\n return _this4.onAttachmentInputChange(e);\n }\n }))));\n }\n }]);\n\n return IssuePartial;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"ticketId\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"status\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"owner\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"subject\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, \"issue\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, \"attachments\", [mobx__WEBPACK_IMPORTED_MODULE_8__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return [];\n }\n})), _class2)) || _class;\n\nIssuePartial.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n status: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object.isRequired),\n owner: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object.isRequired),\n subject: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n issue: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n date: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n dateFormat: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string.isRequired),\n attachments: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().array),\n editorWindow: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object.isRequired)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IssuePartial);\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/IssuePartial.jsx?");
/***/ }),
@@ -1588,7 +1599,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/sortBy */ 639);\n/* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/union */ 653);\n/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_union__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var actions_groups__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/groups */ 53);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var containers_Tickets_AssigneeDropdownPartial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! containers/Tickets/AssigneeDropdownPartial */ 998);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! containers/Tickets/CommentNotePartial */ 999);\n/* harmony import */ var components_DatePicker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/DatePicker */ 111);\n/* harmony import */ var components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! components/EasyMDE */ 196);\n/* harmony import */ var containers_Tickets_IssuePartial__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! containers/Tickets/IssuePartial */ 1023);\n/* harmony import */ var components_OffCanvasEditor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/OffCanvasEditor */ 1024);\n/* harmony import */ var components_PDropdown_PDropdownTrigger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! components/PDropdown/PDropdownTrigger */ 516);\n/* harmony import */ var containers_Tickets_StatusSelector__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! containers/Tickets/StatusSelector */ 1025);\n/* harmony import */ var components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! components/TruTabs/TruTabSection */ 679);\n/* harmony import */ var components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! components/TruTabs/TruTabSelector */ 680);\n/* harmony import */ var components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! components/TruTabs/TruTabSelectors */ 681);\n/* harmony import */ var components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! components/TruTabs/TruTabWrapper */ 682);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var uikit__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! uikit */ 4);\n/* harmony import */ var uikit__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(uikit__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! moment */ 5);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var components_SpinLoader__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! components/SpinLoader */ 65);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/21/19 9:32 AM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar fetchTicket = function fetchTicket(parent) {\n axios__WEBPACK_IMPORTED_MODULE_21___default().get(\"/api/v2/tickets/\".concat(parent.props.ticketUid)).then(function (res) {\n // setTimeout(() => {\n parent.ticket = res.data.ticket;\n parent.isSubscribed = parent.ticket && parent.ticket.subscribers.findIndex(function (i) {\n return i._id === parent.props.shared.sessionUser._id;\n }) !== -1; // }, 3000)\n })[\"catch\"](function (error) {\n if (error.response.status === 403) {\n History.pushState(null, null, '/tickets');\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error);\n });\n};\n\nvar showPriorityConfirm = function showPriorityConfirm() {\n uikit__WEBPACK_IMPORTED_MODULE_24___default().modal.confirm('Selected Priority does not exist for this ticket type. Priority has reset to the default for this type.' + '
Please select a new priority', function () {}, {\n cancelButtonClass: 'uk-hidden'\n });\n};\n\nvar SingleTicketContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_27__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(SingleTicketContainer, _React$Component);\n\n var _super = _createSuper(SingleTicketContainer);\n\n function SingleTicketContainer(props) {\n var _this;\n\n _classCallCheck(this, SingleTicketContainer);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"ticket\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"isSubscribed\", _descriptor2, _assertThisInitialized(_this));\n\n _this.assigneeDropdownPartial = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();\n (0,mobx__WEBPACK_IMPORTED_MODULE_28__.makeObservable)(_assertThisInitialized(_this));\n _this.onUpdateTicket = _this.onUpdateTicket.bind(_assertThisInitialized(_this));\n _this.onSocketUpdateComments = _this.onSocketUpdateComments.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketNotes = _this.onUpdateTicketNotes.bind(_assertThisInitialized(_this));\n _this.onUpdateAssignee = _this.onUpdateAssignee.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketType = _this.onUpdateTicketType.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketPriority = _this.onUpdateTicketPriority.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketGroup = _this.onUpdateTicketGroup.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketDueDate = _this.onUpdateTicketDueDate.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketTags = _this.onUpdateTicketTags.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(SingleTicketContainer, [{\n key: \"notesTagged\",\n get: function get() {\n this.ticket.notes.forEach(function (i) {\n return i.isNote = true;\n });\n return this.ticket.notes;\n }\n }, {\n key: \"commentsAndNotes\",\n get: function get() {\n if (!this.ticket) return [];\n\n if (!lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)) {\n return lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default()(this.ticket.comments, 'date');\n }\n\n var commentsAndNotes = lodash_union__WEBPACK_IMPORTED_MODULE_3___default()(this.ticket.comments, this.notesTagged);\n commentsAndNotes = lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default()(commentsAndNotes, 'date');\n return commentsAndNotes;\n }\n }, {\n key: \"hasCommentsOrNotes\",\n get: function get() {\n if (!this.ticket) return false;\n return this.ticket.comments.length > 0 || this.ticket.notes.length > 0;\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UPDATE, this.onUpdateTicket);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_UPDATE, this.onUpdateAssignee);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TYPE_UPDATE, this.onUpdateTicketType);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_PRIORITY_UPDATE, this.onUpdateTicketPriority);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_GROUP_UPDATE, this.onUpdateTicketGroup);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_DUEDATE_UPDATE, this.onUpdateTicketDueDate);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TAGS_UPDATE, this.onUpdateTicketTags);\n fetchTicket(this);\n this.props.fetchTicketTypes();\n this.props.fetchGroups();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().resizeFullHeight();\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().setupScrollers();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UPDATE, this.onUpdateTicket);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_UPDATE, this.onUpdateAssignee);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TYPE_UPDATE, this.onUpdateTicketType);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_PRIORITY_UPDATE, this.onUpdateTicketPriority);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_GROUP_UPDATE, this.onUpdateTicketGroup);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_DUEDATE_UPDATE, this.onUpdateTicketDueDate);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TAGS_UPDATE, this.onUpdateTicketTags);\n this.props.unloadGroups();\n }\n }, {\n key: \"onUpdateTicket\",\n value: function onUpdateTicket(data) {\n if (this.ticket._id === data._id) {\n this.ticket = data;\n }\n }\n }, {\n key: \"onSocketUpdateComments\",\n value: function onSocketUpdateComments(data) {\n if (this.ticket._id === data._id) this.ticket.comments = data.comments;\n }\n }, {\n key: \"onUpdateTicketNotes\",\n value: function onUpdateTicketNotes(data) {\n if (this.ticket._id === data._id) this.ticket.notes = data.notes;\n }\n }, {\n key: \"onUpdateAssignee\",\n value: function onUpdateAssignee(data) {\n if (this.ticket._id === data._id) {\n this.ticket.assignee = data.assignee;\n if (this.ticket.assignee && this.ticket.assignee._id === this.props.shared.sessionUser._id) this.isSubscribed = true;\n }\n }\n }, {\n key: \"onUpdateTicketType\",\n value: function onUpdateTicketType(data) {\n if (this.ticket._id === data._id) this.ticket.type = data.type;\n }\n }, {\n key: \"onUpdateTicketPriority\",\n value: function onUpdateTicketPriority(data) {\n if (this.ticket._id === data._id) this.ticket.priority = data.priority;\n }\n }, {\n key: \"onUpdateTicketGroup\",\n value: function onUpdateTicketGroup(data) {\n if (this.ticket._id === data._id) this.ticket.group = data.group;\n }\n }, {\n key: \"onUpdateTicketDueDate\",\n value: function onUpdateTicketDueDate(data) {\n if (this.ticket._id === data._id) this.ticket.dueDate = data.dueDate;\n }\n }, {\n key: \"onUpdateTicketTags\",\n value: function onUpdateTicketTags(data) {\n if (this.ticket._id === data._id) this.ticket.tags = data.tags;\n }\n }, {\n key: \"onCommentNoteSubmit\",\n value: function onCommentNoteSubmit(e, type) {\n var _this2 = this;\n\n e.preventDefault();\n var isNote = type === 'note';\n axios__WEBPACK_IMPORTED_MODULE_21___default().post(\"/api/v1/tickets/add\".concat(isNote ? 'note' : 'comment'), {\n _id: !isNote && this.ticket._id,\n comment: !isNote && this.commentMDE.getEditorText(),\n ticketid: isNote && this.ticket._id,\n note: isNote && this.noteMDE.getEditorText()\n }).then(function (res) {\n if (res && res.data && res.data.success) {\n if (isNote) {\n _this2.ticket.notes = res.data.ticket.notes;\n\n _this2.noteMDE.setEditorText('');\n } else {\n _this2.ticket.comments = res.data.ticket.comments;\n\n _this2.commentMDE.setEditorText('');\n }\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().scrollToBottom('.page-content-right', true);\n _this2.ticket.history = res.data.ticket.history;\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"onSubscriberChanged\",\n value: function onSubscriberChanged(e) {\n var _this3 = this;\n\n axios__WEBPACK_IMPORTED_MODULE_21___default().put(\"/api/v1/tickets/\".concat(this.ticket._id, \"/subscribe\"), {\n user: this.props.shared.sessionUser._id,\n subscribe: e.target.checked\n }).then(function (res) {\n if (res.data.success && res.data.ticket) {\n _this3.ticket.subscribers = res.data.ticket.subscribers;\n _this3.isSubscribed = _this3.ticket.subscribers.findIndex(function (i) {\n return i._id === _this3.props.shared.sessionUser._id;\n }) !== -1;\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error.response || error);\n });\n }\n }, {\n key: \"transferToThirdParty\",\n value: function transferToThirdParty(e) {\n this.props.transferToThirdParty({\n uid: this.ticket.uid\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var mappedGroups = this.props.groupsState ? this.props.groupsState.groups.map(function (group) {\n return {\n text: group.get('name'),\n value: group.get('_id')\n };\n }) : [];\n var mappedTypes = this.props.ticketTypes ? this.props.ticketTypes.map(function (type) {\n return {\n text: type.get('name'),\n value: type.get('_id'),\n raw: type.toJS()\n };\n }) : []; // Perms\n\n var hasTicketUpdate = this.ticket && this.ticket.status !== 3 && lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:update');\n\n var hasTicketStatusUpdate = function hasTicketStatusUpdate() {\n var isAgent = _this4.props.sessionUser ? _this4.props.sessionUser.role.isAgent : false;\n var isAdmin = _this4.props.sessionUser ? _this4.props.sessionUser.role.isAdmin : false;\n\n if (isAgent || isAdmin) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:update');\n } else {\n if (!_this4.ticket || !_this4.props.sessionUser) return false;\n return lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().hasPermOverRole(_this4.ticket.owner.role, _this4.props.sessionUser.role, 'tickets:update', false);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-clearfix uk-position-relative',\n style: {\n width: '100%',\n height: '100vh'\n }\n }, !this.ticket && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SpinLoader__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n active: true\n }), this.ticket && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'page-content'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-left page-title page-title-small noshadow nopadding relative\",\n style: {\n width: 360,\n maxWidth: 360,\n minWidth: 360\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-title-border-right relative\",\n style: {\n padding: '0 30px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, \"Ticket #\", this.ticket.uid), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_StatusSelector__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ticketId: this.ticket._id,\n status: this.ticket.status,\n socket: this.props.socket,\n onStatusChange: function onStatusChange(status) {\n _this4.ticket.status = status;\n },\n hasPerm: hasTicketStatusUpdate()\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-content-left full-height scrollable\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-details-wrap uk-position-relative uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee-wrap uk-clearfix\",\n style: {\n paddingRight: 30\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", null, \"Assignee\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee uk-clearfix\"\n }, hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n title: \"Set Assignee\",\n style: {\n \"float\": 'left'\n },\n className: \"relative no-ajaxy\",\n onClick: function onClick() {\n return _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_LOAD);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PDropdown_PDropdownTrigger__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n target: this.assigneeDropdownPartial\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.ticket.assignee && this.ticket.assignee.image,\n showOnlineBubble: this.ticket.assignee !== undefined,\n userId: this.ticket.assignee && this.ticket.assignee._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"drop-icon material-icons\"\n }, \"keyboard_arrow_down\"))), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.ticket.assignee && this.ticket.assignee.image,\n showOnlineBubble: this.ticket.assignee !== undefined,\n userId: this.ticket.assignee && this.ticket.assignee._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee-details\"\n }, !this.ticket.assignee && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, \"No User Assigned\"), this.ticket.assignee && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, this.ticket.assignee.fullname), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n className: \"comment-email-link uk-text-truncate uk-display-inline-block\",\n href: \"mailto:\".concat(this.ticket.assignee.email)\n }, this.ticket.assignee.email), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: 'uk-display-block'\n }, this.ticket.assignee.title)))), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_AssigneeDropdownPartial__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n forwardedRef: this.assigneeDropdownPartial,\n ticketId: this.ticket._id,\n onClearClick: function onClearClick() {\n return _this4.ticket.assignee = undefined;\n },\n onAssigneeClick: function onAssigneeClick(_ref) {\n var agent = _ref.agent;\n return _this4.ticket.assignee = agent;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 padding-left-right-15\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tru-card ticket-details uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2 uk-float-left nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"marginright5\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Type\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n value: this.ticket.type._id,\n onChange: function onChange(e) {\n var type = _this4.props.ticketTypes.find(function (t) {\n return t.get('_id') === e.target.value;\n });\n\n var priority = type.get('priorities').findIndex(function (p) {\n return p.get('_id') === _this4.ticket.priority._id;\n });\n var hasPriority = priority !== -1;\n\n if (!hasPriority) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_PRIORITY_SET, {\n _id: _this4.ticket._id,\n value: type.get('priorities').find(function () {\n return true;\n })\n });\n\n showPriorityConfirm();\n }\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_TYPE_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, mappedTypes && mappedTypes.map(function (type) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: type.value,\n value: type.value\n }, type.text);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"input-box\"\n }, this.ticket.type.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2 uk-float-left nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"marginleft5\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Priority\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n name: \"tPriority\",\n id: \"tPriority\",\n value: this.ticket.priority._id,\n onChange: function onChange(e) {\n return _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_PRIORITY_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, this.ticket.type && this.ticket.type.priorities && this.ticket.type.priorities.map(function (priority) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: priority._id,\n value: priority._id\n }, priority.name);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'input-box'\n }, this.ticket.priority.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 nopadding uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Group\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n value: this.ticket.group._id,\n onChange: function onChange(e) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_GROUP_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, mappedGroups && mappedGroups.map(function (group) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: group.value,\n value: group.value\n }, group.text);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'input-box'\n }, this.ticket.group.name)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 p-0\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Due Date\"), \" \", hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"-\\xA0\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-display-inline'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: 'button',\n onClick: function onClick(e) {\n e.preventDefault();\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_DUEDATE_SET, {\n _id: _this4.ticket._id,\n value: undefined\n });\n }\n }, \"Clear\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DatePicker__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n name: 'ticket_due_date',\n format: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().getShortDateFormat(),\n value: this.ticket.dueDate,\n small: true,\n onChange: function onChange(e) {\n var dueDate = moment__WEBPACK_IMPORTED_MODULE_25___default()(e.target.value, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().getShortDateFormat()).utc().toISOString();\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_DUEDATE_SET, {\n _id: _this4.ticket._id,\n value: dueDate\n });\n }\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"input-box\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().formatDate(this.ticket.dueDate, this.props.common.get('shortDateFormat')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Tags\", hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \" - \"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: \"editTags\",\n className: 'uk-display-inline'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: 'button',\n style: {\n fontSize: 11\n },\n className: \"no-ajaxy\",\n onClick: function onClick() {\n _this4.props.showModal('ADD_TAGS_MODAL', {\n ticketId: _this4.ticket._id,\n currentTags: _this4.ticket.tags.map(function (tag) {\n return tag._id;\n })\n });\n }\n }, \"Edit Tags\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tag-list uk-clearfix\"\n }, this.ticket.tags && this.ticket.tags.map(function (tag) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n key: tag._id,\n className: \"item\"\n }, tag.name);\n }))))), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 padding-left-right-15\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tru-card ticket-details pr-0 pb-0\",\n style: {\n height: 250\n }\n }, \"Ticket History\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n padding: 0,\n margin: 0\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"history-items scrollable\",\n style: {\n paddingTop: 12\n }\n }, this.ticket.history && this.ticket.history.map(function (item) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n key: item._id,\n className: \"history-item\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().formatDate(item.date, _this4.props.common.get('longDateFormat'))\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"em\", null, \"Action by: \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, item.owner.fullname)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, item.description));\n }))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-message nopadding\",\n style: {\n marginLeft: 360\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-title-right noshadow\"\n }, this.props.common.get('hasThirdParty') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-top-comments uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: \"btn md-btn-primary no-ajaxy\",\n onClick: function onClick(e) {\n e.preventDefault();\n\n _this4.transferToThirdParty(e);\n }\n }, \"Transfer to ThirdParty\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-top-comments uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: \"btn no-ajaxy\",\n onClick: function onClick(e) {\n e.preventDefault();\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().scrollToBottom('.page-content-right', true);\n }\n }, \"Add Comment\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"onoffswitch subscribeSwitch uk-float-right\",\n style: {\n marginRight: 10,\n position: 'relative',\n top: 18\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: 'subscribeSwitch',\n type: \"checkbox\",\n name: \"subscribeSwitch\",\n className: \"onoffswitch-checkbox\",\n checked: this.isSubscribed,\n onChange: function onChange(e) {\n return _this4.onSubscriberChanged(e);\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n className: \"onoffswitch-label\",\n htmlFor: \"subscribeSwitch\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"onoffswitch-inner subscribeSwitch-inner\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"onoffswitch-switch subscribeSwitch-switch\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"pagination uk-float-right\",\n style: {\n marginRight: 5\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"button-group\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:print') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n className: \"pagination\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"/tickets/print/\".concat(this.ticket.uid),\n className: \"btn no-ajaxy\",\n style: {\n borderRadius: 3,\n marginRight: 5\n },\n rel: \"noopener noreferrer\",\n target: \"_blank\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE8AD\")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-content-right full-height scrollable\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comments-wrapper\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_IssuePartial__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n ticketId: this.ticket._id,\n status: this.ticket.status,\n owner: this.ticket.owner,\n subject: this.ticket.subject,\n issue: this.ticket.issue,\n date: this.ticket.date,\n dateFormat: \"\".concat(this.props.common.get('longDateFormat'), \", \").concat(this.props.common.get('timeFormat')),\n attachments: this.ticket.attachments,\n editorWindow: this.editorWindow,\n socket: this.props.socket\n }), this.hasCommentsOrNotes && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n style: {\n marginLeft: 110\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 0,\n label: \"All\",\n active: true,\n showBadge: true,\n badgeText: this.commentsAndNotes.length\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 1,\n label: \"Comments\",\n showBadge: true,\n badgeText: this.ticket ? this.ticket.comments && this.ticket.comments.length : 0\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 2,\n label: \"Notes\",\n showBadge: true,\n badgeText: this.ticket ? this.ticket.notes && this.ticket.notes.length : 0\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 0,\n active: true\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"all-comments\"\n }, this.commentsAndNotes.map(function (item) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: item._id,\n ticketStatus: _this4.ticket.status,\n ticketSubject: _this4.ticket.subject,\n comment: item,\n isNote: item.isNote,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: !item.isNote ? item.comment : item.note,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: item._id,\n isNote: item.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: item._id,\n isNote: item.isNote\n });\n }\n });\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 1\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comments\"\n }, this.ticket && this.ticket.comments.map(function (comment) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: comment._id,\n ticketStatus: _this4.ticket.status,\n ticketSubject: _this4.ticket.subject,\n comment: comment,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: comment.comment,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: comment._id,\n isNote: comment.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: comment._id,\n isNote: comment.isNote\n });\n }\n });\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 2\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"notes\"\n }, this.ticket && this.ticket.notes.map(function (note) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: note._id,\n ticketStatus: _this4.ticket.status,\n ticketSubject: _this4.ticket.subject,\n comment: note,\n isNote: true,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: note.note,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: note._id,\n isNote: note.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: note._id,\n isNote: note.isNote\n });\n }\n });\n })))), this.ticket.status !== 3 && (lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true) || lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 ticket-reply uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.props.shared.sessionUser.image,\n showOnlineBubble: false\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n style: {\n paddingLeft: 85\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n showTrack: false\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 0,\n label: 'Comment',\n active: true\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 1,\n label: 'Internal Note',\n active: !lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 0,\n style: {\n paddingTop: 0\n },\n active: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n onSubmit: function onSubmit(e) {\n return _this4.onCommentNoteSubmit(e, 'comment');\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n allowImageUpload: true,\n inlineImageUploadUrl: '/tickets/uploadmdeimage',\n inlineImageUploadHeaders: {\n ticketid: this.ticket._id\n },\n ref: function ref(r) {\n return _this4.commentMDE = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 uk-clearfix\",\n style: {\n marginTop: 50\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", {\n type: \"submit\",\n className: \"uk-button uk-button-accent\",\n style: {\n padding: '10px 15px'\n }\n }, \"Post Comment\"))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 1,\n style: {\n paddingTop: 0\n },\n active: !lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create') && lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n onSubmit: function onSubmit(e) {\n return _this4.onCommentNoteSubmit(e, 'note');\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n allowImageUpload: true,\n inlineImageUploadUrl: '/tickets/uploadmdeimage',\n inlineImageUploadHeaders: {\n ticketid: this.ticket._id\n },\n ref: function ref(r) {\n return _this4.noteMDE = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 uk-clearfix\",\n style: {\n marginTop: 50\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", {\n type: \"submit\",\n className: \"uk-button uk-button-accent\",\n style: {\n padding: '10px 15px'\n }\n }, \"Save Note\"))))))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_OffCanvasEditor__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n primaryLabel: 'Save Edit',\n ref: function ref(r) {\n return _this4.editorWindow = r;\n }\n })));\n }\n }]);\n\n return SingleTicketContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"ticket\", [mobx__WEBPACK_IMPORTED_MODULE_28__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"isSubscribed\", [mobx__WEBPACK_IMPORTED_MODULE_28__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return false;\n }\n}), _applyDecoratedDescriptor(_class2.prototype, \"notesTagged\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"notesTagged\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"commentsAndNotes\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"commentsAndNotes\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"hasCommentsOrNotes\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"hasCommentsOrNotes\"), _class2.prototype)), _class2)) || _class;\n\nSingleTicketContainer.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired),\n ticketUid: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired),\n shared: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n sessionUser: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n common: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n ticketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n fetchTicketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n groupsState: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n fetchGroups: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n unloadGroups: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n transferToThirdParty: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n common: state.common.viewdata,\n shared: state.shared,\n sessionUser: state.shared.sessionUser,\n socket: state.shared.socket,\n ticketTypes: state.ticketsState.types,\n groupsState: state.groupsState\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n fetchTicketTypes: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.fetchTicketTypes,\n fetchGroups: actions_groups__WEBPACK_IMPORTED_MODULE_5__.fetchGroups,\n unloadGroups: actions_groups__WEBPACK_IMPORTED_MODULE_5__.unloadGroups,\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_6__.showModal,\n transferToThirdParty: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.transferToThirdParty\n})(SingleTicketContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/SingleTicketContainer.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/sortBy */ 639);\n/* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/union */ 653);\n/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_union__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var actions_groups__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/groups */ 53);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var containers_Tickets_AssigneeDropdownPartial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! containers/Tickets/AssigneeDropdownPartial */ 998);\n/* harmony import */ var components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Avatar/Avatar */ 70);\n/* harmony import */ var containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! containers/Tickets/CommentNotePartial */ 999);\n/* harmony import */ var components_DatePicker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/DatePicker */ 111);\n/* harmony import */ var components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! components/EasyMDE */ 196);\n/* harmony import */ var containers_Tickets_IssuePartial__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! containers/Tickets/IssuePartial */ 1023);\n/* harmony import */ var components_OffCanvasEditor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/OffCanvasEditor */ 1024);\n/* harmony import */ var components_PDropdown_PDropdownTrigger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! components/PDropdown/PDropdownTrigger */ 516);\n/* harmony import */ var containers_Tickets_StatusSelector__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! containers/Tickets/StatusSelector */ 1025);\n/* harmony import */ var components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! components/TruTabs/TruTabSection */ 679);\n/* harmony import */ var components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! components/TruTabs/TruTabSelector */ 680);\n/* harmony import */ var components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! components/TruTabs/TruTabSelectors */ 681);\n/* harmony import */ var components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! components/TruTabs/TruTabWrapper */ 682);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var uikit__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! uikit */ 4);\n/* harmony import */ var uikit__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(uikit__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! moment */ 5);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var components_SpinLoader__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! components/SpinLoader */ 65);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor, _descriptor2;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/21/19 9:32 AM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar fetchTicket = function fetchTicket(parent) {\n axios__WEBPACK_IMPORTED_MODULE_21___default().get(\"/api/v2/tickets/\".concat(parent.props.ticketUid)).then(function (res) {\n // setTimeout(() => {\n parent.ticket = res.data.ticket;\n parent.isSubscribed = parent.ticket && parent.ticket.subscribers.findIndex(function (i) {\n return i._id === parent.props.shared.sessionUser._id;\n }) !== -1; // }, 3000)\n })[\"catch\"](function (error) {\n if (error.response.status === 403) {\n History.pushState(null, null, '/tickets');\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error);\n });\n};\n\nvar showPriorityConfirm = function showPriorityConfirm() {\n uikit__WEBPACK_IMPORTED_MODULE_24___default().modal.confirm('Selected Priority does not exist for this ticket type. Priority has reset to the default for this type.' + '
Please select a new priority', function () {}, {\n cancelButtonClass: 'uk-hidden'\n });\n};\n\nvar SingleTicketContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_27__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(SingleTicketContainer, _React$Component);\n\n var _super = _createSuper(SingleTicketContainer);\n\n function SingleTicketContainer(props) {\n var _this;\n\n _classCallCheck(this, SingleTicketContainer);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"ticket\", _descriptor, _assertThisInitialized(_this));\n\n _initializerDefineProperty(_this, \"isSubscribed\", _descriptor2, _assertThisInitialized(_this));\n\n _this.assigneeDropdownPartial = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();\n (0,mobx__WEBPACK_IMPORTED_MODULE_28__.makeObservable)(_assertThisInitialized(_this));\n _this.onUpdateTicket = _this.onUpdateTicket.bind(_assertThisInitialized(_this));\n _this.onSocketUpdateComments = _this.onSocketUpdateComments.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketNotes = _this.onUpdateTicketNotes.bind(_assertThisInitialized(_this));\n _this.onUpdateAssignee = _this.onUpdateAssignee.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketType = _this.onUpdateTicketType.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketPriority = _this.onUpdateTicketPriority.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketGroup = _this.onUpdateTicketGroup.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketDueDate = _this.onUpdateTicketDueDate.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketTags = _this.onUpdateTicketTags.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(SingleTicketContainer, [{\n key: \"notesTagged\",\n get: function get() {\n this.ticket.notes.forEach(function (i) {\n return i.isNote = true;\n });\n return this.ticket.notes;\n }\n }, {\n key: \"commentsAndNotes\",\n get: function get() {\n if (!this.ticket) return [];\n\n if (!lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)) {\n return lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default()(this.ticket.comments, 'date');\n }\n\n var commentsAndNotes = lodash_union__WEBPACK_IMPORTED_MODULE_3___default()(this.ticket.comments, this.notesTagged);\n commentsAndNotes = lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default()(commentsAndNotes, 'date');\n return commentsAndNotes;\n }\n }, {\n key: \"hasCommentsOrNotes\",\n get: function get() {\n if (!this.ticket) return false;\n return this.ticket.comments.length > 0 || this.ticket.notes.length > 0;\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UPDATE, this.onUpdateTicket);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_UPDATE, this.onUpdateAssignee);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TYPE_UPDATE, this.onUpdateTicketType);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_PRIORITY_UPDATE, this.onUpdateTicketPriority);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_GROUP_UPDATE, this.onUpdateTicketGroup);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_DUEDATE_UPDATE, this.onUpdateTicketDueDate);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TAGS_UPDATE, this.onUpdateTicketTags);\n fetchTicket(this);\n this.props.fetchTicketTypes();\n this.props.fetchGroups();\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().resizeFullHeight();\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().setupScrollers();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UPDATE, this.onUpdateTicket);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_UPDATE, this.onUpdateAssignee);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TYPE_UPDATE, this.onUpdateTicketType);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_PRIORITY_UPDATE, this.onUpdateTicketPriority);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_GROUP_UPDATE, this.onUpdateTicketGroup);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_DUEDATE_UPDATE, this.onUpdateTicketDueDate);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_UI_TAGS_UPDATE, this.onUpdateTicketTags);\n this.props.unloadGroups();\n }\n }, {\n key: \"onUpdateTicket\",\n value: function onUpdateTicket(data) {\n if (this.ticket._id === data._id) {\n this.ticket = data;\n }\n }\n }, {\n key: \"onSocketUpdateComments\",\n value: function onSocketUpdateComments(data) {\n if (this.ticket._id === data._id) this.ticket.comments = data.comments;\n }\n }, {\n key: \"onUpdateTicketNotes\",\n value: function onUpdateTicketNotes(data) {\n if (this.ticket._id === data._id) this.ticket.notes = data.notes;\n }\n }, {\n key: \"onUpdateAssignee\",\n value: function onUpdateAssignee(data) {\n if (this.ticket._id === data._id) {\n this.ticket.assignee = data.assignee;\n if (this.ticket.assignee && this.ticket.assignee._id === this.props.shared.sessionUser._id) this.isSubscribed = true;\n }\n }\n }, {\n key: \"onUpdateTicketType\",\n value: function onUpdateTicketType(data) {\n if (this.ticket._id === data._id) this.ticket.type = data.type;\n }\n }, {\n key: \"onUpdateTicketPriority\",\n value: function onUpdateTicketPriority(data) {\n if (this.ticket._id === data._id) this.ticket.priority = data.priority;\n }\n }, {\n key: \"onUpdateTicketGroup\",\n value: function onUpdateTicketGroup(data) {\n if (this.ticket._id === data._id) this.ticket.group = data.group;\n }\n }, {\n key: \"onUpdateTicketDueDate\",\n value: function onUpdateTicketDueDate(data) {\n if (this.ticket._id === data._id) this.ticket.dueDate = data.dueDate;\n }\n }, {\n key: \"onUpdateTicketTags\",\n value: function onUpdateTicketTags(data) {\n if (this.ticket._id === data._id) this.ticket.tags = data.tags;\n }\n }, {\n key: \"onCommentNoteSubmit\",\n value: function onCommentNoteSubmit(e, type) {\n var _this2 = this;\n\n e.preventDefault();\n var isNote = type === 'note';\n axios__WEBPACK_IMPORTED_MODULE_21___default().post(\"/api/v1/tickets/add\".concat(isNote ? 'note' : 'comment'), {\n _id: !isNote && this.ticket._id,\n comment: !isNote && this.commentMDE.getEditorText(),\n ticketid: isNote && this.ticket._id,\n note: isNote && this.noteMDE.getEditorText()\n }).then(function (res) {\n if (res && res.data && res.data.success) {\n if (isNote) {\n _this2.ticket.notes = res.data.ticket.notes;\n\n _this2.noteMDE.setEditorText('');\n } else {\n _this2.ticket.comments = res.data.ticket.comments;\n\n _this2.commentMDE.setEditorText('');\n }\n\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().scrollToBottom('.page-content-right', true);\n _this2.ticket.history = res.data.ticket.history;\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error);\n if (error.response) _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error.response);\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().UI.showSnackbar(error, true);\n });\n }\n }, {\n key: \"onSubscriberChanged\",\n value: function onSubscriberChanged(e) {\n var _this3 = this;\n\n axios__WEBPACK_IMPORTED_MODULE_21___default().put(\"/api/v1/tickets/\".concat(this.ticket._id, \"/subscribe\"), {\n user: this.props.shared.sessionUser._id,\n subscribe: e.target.checked\n }).then(function (res) {\n if (res.data.success && res.data.ticket) {\n _this3.ticket.subscribers = res.data.ticket.subscribers;\n _this3.isSubscribed = _this3.ticket.subscribers.findIndex(function (i) {\n return i._id === _this3.props.shared.sessionUser._id;\n }) !== -1;\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_23__[\"default\"].error(error.response || error);\n });\n }\n }, {\n key: \"transferToThirdParty\",\n value: function transferToThirdParty(e) {\n this.props.transferToThirdParty({\n uid: this.ticket.uid\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var mappedGroups = this.props.groupsState ? this.props.groupsState.groups.map(function (group) {\n return {\n text: group.get('name'),\n value: group.get('_id')\n };\n }) : [];\n var mappedTypes = this.props.ticketTypes ? this.props.ticketTypes.map(function (type) {\n return {\n text: type.get('name'),\n value: type.get('_id'),\n raw: type.toJS()\n };\n }) : []; // Perms\n\n var hasTicketUpdate = this.ticket && this.ticket.status.isResolved === false && lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:update');\n var statusObj = this.ticket ? this.props.ticketStatuses.find(function (s) {\n return s.get('_id') === _this4.ticket.status._id;\n }) : null;\n\n var hasTicketStatusUpdate = function hasTicketStatusUpdate() {\n var isAgent = _this4.props.sessionUser ? _this4.props.sessionUser.role.isAgent : false;\n var isAdmin = _this4.props.sessionUser ? _this4.props.sessionUser.role.isAdmin : false;\n\n if (isAgent || isAdmin) {\n return lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:update');\n } else {\n if (!_this4.ticket || !_this4.props.sessionUser) return false;\n return lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().hasPermOverRole(_this4.ticket.owner.role, _this4.props.sessionUser.role, 'tickets:update', false);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-clearfix uk-position-relative',\n style: {\n width: '100%',\n height: '100vh'\n }\n }, !this.ticket && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SpinLoader__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n active: true\n }), this.ticket && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'page-content'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-left page-title page-title-small noshadow nopadding relative\",\n style: {\n width: 360,\n maxWidth: 360,\n minWidth: 360\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-title-border-right relative\",\n style: {\n padding: '0 30px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, \"Ticket #\", this.ticket.uid), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_StatusSelector__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ticketId: this.ticket._id,\n status: this.ticket.status._id,\n socket: this.props.socket,\n onStatusChange: function onStatusChange(status) {\n _this4.ticket.status = status;\n },\n hasPerm: hasTicketStatusUpdate()\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-content-left full-height scrollable\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-details-wrap uk-position-relative uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee-wrap uk-clearfix\",\n style: {\n paddingRight: 30\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", null, \"Assignee\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee uk-clearfix\"\n }, hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n title: \"Set Assignee\",\n style: {\n \"float\": 'left'\n },\n className: \"relative no-ajaxy\",\n onClick: function onClick() {\n return _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_ASSIGNEE_LOAD);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PDropdown_PDropdownTrigger__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n target: this.assigneeDropdownPartial\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.ticket.assignee && this.ticket.assignee.image,\n showOnlineBubble: this.ticket.assignee !== undefined,\n userId: this.ticket.assignee && this.ticket.assignee._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"drop-icon material-icons\"\n }, \"keyboard_arrow_down\"))), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.ticket.assignee && this.ticket.assignee.image,\n showOnlineBubble: this.ticket.assignee !== undefined,\n userId: this.ticket.assignee && this.ticket.assignee._id\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"ticket-assignee-details\"\n }, !this.ticket.assignee && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, \"No User Assigned\"), this.ticket.assignee && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h3\", null, this.ticket.assignee.fullname), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n className: \"comment-email-link uk-text-truncate uk-display-inline-block\",\n href: \"mailto:\".concat(this.ticket.assignee.email)\n }, this.ticket.assignee.email), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: 'uk-display-block'\n }, this.ticket.assignee.title)))), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_AssigneeDropdownPartial__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n forwardedRef: this.assigneeDropdownPartial,\n ticketId: this.ticket._id,\n onClearClick: function onClearClick() {\n return _this4.ticket.assignee = undefined;\n },\n onAssigneeClick: function onAssigneeClick(_ref) {\n var agent = _ref.agent;\n return _this4.ticket.assignee = agent;\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 padding-left-right-15\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tru-card ticket-details uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2 uk-float-left nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"marginright5\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Type\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n value: this.ticket.type._id,\n onChange: function onChange(e) {\n var type = _this4.props.ticketTypes.find(function (t) {\n return t.get('_id') === e.target.value;\n });\n\n var priority = type.get('priorities').findIndex(function (p) {\n return p.get('_id') === _this4.ticket.priority._id;\n });\n var hasPriority = priority !== -1;\n\n if (!hasPriority) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_PRIORITY_SET, {\n _id: _this4.ticket._id,\n value: type.get('priorities').find(function () {\n return true;\n })\n });\n\n showPriorityConfirm();\n }\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_TYPE_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, mappedTypes && mappedTypes.map(function (type) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: type.value,\n value: type.value\n }, type.text);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"input-box\"\n }, this.ticket.type.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-2 uk-float-left nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"marginleft5\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Priority\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n name: \"tPriority\",\n id: \"tPriority\",\n value: this.ticket.priority._id,\n onChange: function onChange(e) {\n return _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_PRIORITY_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, this.ticket.type && this.ticket.type.priorities && this.ticket.type.priorities.map(function (priority) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: priority._id,\n value: priority._id\n }, priority.name);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'input-box'\n }, this.ticket.priority.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 nopadding uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Group\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"select\", {\n value: this.ticket.group._id,\n onChange: function onChange(e) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_GROUP_SET, {\n _id: _this4.ticket._id,\n value: e.target.value\n });\n }\n }, mappedGroups && mappedGroups.map(function (group) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: group.value,\n value: group.value\n }, group.text);\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'input-box'\n }, this.ticket.group.name)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 p-0\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Due Date\"), \" \", hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"-\\xA0\"), hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-display-inline'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: 'button',\n onClick: function onClick(e) {\n e.preventDefault();\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_DUEDATE_SET, {\n _id: _this4.ticket._id,\n value: undefined\n });\n }\n }, \"Clear\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DatePicker__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n name: 'ticket_due_date',\n format: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().getShortDateFormat(),\n value: this.ticket.dueDate,\n small: true,\n onChange: function onChange(e) {\n var dueDate = moment__WEBPACK_IMPORTED_MODULE_25___default()(e.target.value, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().getShortDateFormat()).utc().toISOString();\n\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_DUEDATE_SET, {\n _id: _this4.ticket._id,\n value: dueDate\n });\n }\n })), !hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"input-box\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().formatDate(this.ticket.dueDate, this.props.common.get('shortDateFormat')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 nopadding\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \"Tags\", hasTicketUpdate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, \" - \"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: \"editTags\",\n className: 'uk-display-inline'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: 'button',\n style: {\n fontSize: 11\n },\n className: \"no-ajaxy\",\n onClick: function onClick() {\n _this4.props.showModal('ADD_TAGS_MODAL', {\n ticketId: _this4.ticket._id,\n currentTags: _this4.ticket.tags.map(function (tag) {\n return tag._id;\n })\n });\n }\n }, \"Edit Tags\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tag-list uk-clearfix\"\n }, this.ticket.tags && this.ticket.tags.map(function (tag) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n key: tag._id,\n className: \"item\"\n }, tag.name);\n }))))), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('agent:*', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 padding-left-right-15\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"tru-card ticket-details pr-0 pb-0\",\n style: {\n height: 250\n }\n }, \"Ticket History\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", {\n style: {\n padding: 0,\n margin: 0\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"history-items scrollable\",\n style: {\n paddingTop: 12\n }\n }, this.ticket.history && this.ticket.history.map(function (item) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n key: item._id,\n className: \"history-item\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"time\", {\n dateTime: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().formatDate(item.date, _this4.props.common.get('longDateFormat'))\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"em\", null, \"Action by: \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, item.owner.fullname)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, item.description));\n }))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-message nopadding\",\n style: {\n marginLeft: 360\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-title-right noshadow\"\n }, this.props.common.get('hasThirdParty') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-top-comments uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: \"btn md-btn-primary no-ajaxy\",\n onClick: function onClick(e) {\n e.preventDefault();\n\n _this4.transferToThirdParty(e);\n }\n }, \"Transfer to ThirdParty\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-top-comments uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n role: \"button\",\n className: \"btn no-ajaxy\",\n onClick: function onClick(e) {\n e.preventDefault();\n lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().scrollToBottom('.page-content-right', true);\n }\n }, \"Add Comment\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"onoffswitch subscribeSwitch uk-float-right\",\n style: {\n marginRight: 10,\n position: 'relative',\n top: 18\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n id: 'subscribeSwitch',\n type: \"checkbox\",\n name: \"subscribeSwitch\",\n className: \"onoffswitch-checkbox\",\n checked: this.isSubscribed,\n onChange: function onChange(e) {\n return _this4.onSubscriberChanged(e);\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n className: \"onoffswitch-label\",\n htmlFor: \"subscribeSwitch\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"onoffswitch-inner subscribeSwitch-inner\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"onoffswitch-switch subscribeSwitch-switch\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"pagination uk-float-right\",\n style: {\n marginRight: 5\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", {\n className: \"button-group\"\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:print') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n className: \"pagination\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"a\", {\n href: \"/tickets/print/\".concat(this.ticket.uid),\n className: \"btn no-ajaxy\",\n style: {\n borderRadius: 3,\n marginRight: 5\n },\n rel: \"noopener noreferrer\",\n target: \"_blank\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"i\", {\n className: \"material-icons\"\n }, \"\\uE8AD\")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"page-content-right full-height scrollable\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comments-wrapper\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_IssuePartial__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n ticketId: this.ticket._id,\n status: statusObj,\n owner: this.ticket.owner,\n subject: this.ticket.subject,\n issue: this.ticket.issue,\n date: this.ticket.date,\n dateFormat: \"\".concat(this.props.common.get('longDateFormat'), \", \").concat(this.props.common.get('timeFormat')),\n attachments: this.ticket.attachments,\n editorWindow: this.editorWindow,\n socket: this.props.socket\n }), this.hasCommentsOrNotes && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n style: {\n marginLeft: 110\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 0,\n label: \"All\",\n active: true,\n showBadge: true,\n badgeText: this.commentsAndNotes.length\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 1,\n label: \"Comments\",\n showBadge: true,\n badgeText: this.ticket ? this.ticket.comments && this.ticket.comments.length : 0\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 2,\n label: \"Notes\",\n showBadge: true,\n badgeText: this.ticket ? this.ticket.notes && this.ticket.notes.length : 0\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 0,\n active: true\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"all-comments\"\n }, this.commentsAndNotes.map(function (item) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: item._id,\n ticketStatus: statusObj,\n ticketSubject: _this4.ticket.subject,\n comment: item,\n isNote: item.isNote,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: !item.isNote ? item.comment : item.note,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: item._id,\n isNote: item.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: item._id,\n isNote: item.isNote\n });\n }\n });\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 1\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"comments\"\n }, this.ticket && this.ticket.comments.map(function (comment) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: comment._id,\n ticketStatus: statusObj,\n ticketSubject: _this4.ticket.subject,\n comment: comment,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: comment.comment,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: comment._id,\n isNote: comment.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: comment._id,\n isNote: comment.isNote\n });\n }\n });\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 2\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"notes\"\n }, this.ticket && this.ticket.notes.map(function (note) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(containers_Tickets_CommentNotePartial__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: note._id,\n ticketStatus: statusObj,\n ticketSubject: _this4.ticket.subject,\n comment: note,\n isNote: true,\n dateFormat: \"\".concat(_this4.props.common.get('longDateFormat'), \", \").concat(_this4.props.common.get('timeFormat')),\n onEditClick: function onEditClick() {\n _this4.editorWindow.openEditorWindow({\n showSubject: false,\n text: note.note,\n onPrimaryClick: function onPrimaryClick(data) {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_SET, {\n _id: _this4.ticket._id,\n item: note._id,\n isNote: note.isNote,\n value: data.text\n });\n }\n });\n },\n onRemoveClick: function onRemoveClick() {\n _this4.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_7__.TICKETS_COMMENT_NOTE_REMOVE, {\n _id: _this4.ticket._id,\n value: note._id,\n isNote: note.isNote\n });\n }\n });\n })))), this.ticket.status.isResolved === false && (lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true) || lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 ticket-reply uk-clearfix\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n image: this.props.shared.sessionUser.image,\n showOnlineBubble: false\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabWrapper__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n style: {\n paddingLeft: 85\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelectors__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n showTrack: false\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 0,\n label: 'Comment',\n active: true\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSelector__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n selectorId: 1,\n label: 'Internal Note',\n active: !lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 0,\n style: {\n paddingTop: 0\n },\n active: lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create', true)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n onSubmit: function onSubmit(e) {\n return _this4.onCommentNoteSubmit(e, 'comment');\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n allowImageUpload: true,\n inlineImageUploadUrl: '/tickets/uploadmdeimage',\n inlineImageUploadHeaders: {\n ticketid: this.ticket._id\n },\n ref: function ref(r) {\n return _this4.commentMDE = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 uk-clearfix\",\n style: {\n marginTop: 50\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", {\n type: \"submit\",\n className: \"uk-button uk-button-accent\",\n style: {\n padding: '10px 15px'\n }\n }, \"Post Comment\"))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TruTabs_TruTabSection__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n sectionId: 1,\n style: {\n paddingTop: 0\n },\n active: !lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('comments:create') && lib_helpers__WEBPACK_IMPORTED_MODULE_22___default().canUser('tickets:notes', true)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"form\", {\n onSubmit: function onSubmit(e) {\n return _this4.onCommentNoteSubmit(e, 'note');\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_EasyMDE__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n allowImageUpload: true,\n inlineImageUploadUrl: '/tickets/uploadmdeimage',\n inlineImageUploadHeaders: {\n ticketid: this.ticket._id\n },\n ref: function ref(r) {\n return _this4.noteMDE = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-width-1-1 uk-clearfix\",\n style: {\n marginTop: 50\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"uk-float-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", {\n type: \"submit\",\n className: \"uk-button uk-button-accent\",\n style: {\n padding: '10px 15px'\n }\n }, \"Save Note\"))))))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_OffCanvasEditor__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n primaryLabel: 'Save Edit',\n ref: function ref(r) {\n return _this4.editorWindow = r;\n }\n })));\n }\n }]);\n\n return SingleTicketContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"ticket\", [mobx__WEBPACK_IMPORTED_MODULE_28__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"isSubscribed\", [mobx__WEBPACK_IMPORTED_MODULE_28__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return false;\n }\n}), _applyDecoratedDescriptor(_class2.prototype, \"notesTagged\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"notesTagged\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"commentsAndNotes\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"commentsAndNotes\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"hasCommentsOrNotes\", [mobx__WEBPACK_IMPORTED_MODULE_28__.computed], Object.getOwnPropertyDescriptor(_class2.prototype, \"hasCommentsOrNotes\"), _class2.prototype)), _class2)) || _class;\n\nSingleTicketContainer.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired),\n ticketUid: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired),\n shared: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n sessionUser: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n common: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n ticketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n fetchTicketTypes: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n groupsState: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n fetchGroups: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n unloadGroups: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired),\n transferToThirdParty: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_29___default().func.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n common: state.common.viewdata,\n shared: state.shared,\n sessionUser: state.shared.sessionUser,\n socket: state.shared.socket,\n ticketTypes: state.ticketsState.types,\n ticketStatuses: state.ticketsState.ticketStatuses,\n groupsState: state.groupsState\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n fetchTicketTypes: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.fetchTicketTypes,\n fetchGroups: actions_groups__WEBPACK_IMPORTED_MODULE_5__.fetchGroups,\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.fetchTicketStatus,\n unloadGroups: actions_groups__WEBPACK_IMPORTED_MODULE_5__.unloadGroups,\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_6__.showModal,\n transferToThirdParty: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.transferToThirdParty\n})(SingleTicketContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/SingleTicketContainer.jsx?");
/***/ }),
@@ -1599,7 +1610,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 54);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/tickets */ 51);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/24/19 6:33 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\nvar StatusSelector = (0,mobx_react__WEBPACK_IMPORTED_MODULE_5__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(StatusSelector, _React$Component);\n\n var _super = _createSuper(StatusSelector);\n\n function StatusSelector(props) {\n var _this;\n\n _classCallCheck(this, StatusSelector);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"status\", _descriptor, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_6__.makeObservable)(_assertThisInitialized(_this));\n _this.status = _this.props.status;\n _this.onDocumentClick = _this.onDocumentClick.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketStatus = _this.onUpdateTicketStatus.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(StatusSelector, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n document.addEventListener('click', this.onDocumentClick);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_STATUS_UPDATE, this.onUpdateTicketStatus);\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.status !== this.props.status) this.status = this.props.status;\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n document.removeEventListener('click', this.onDocumentClick);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_STATUS_UPDATE, this.onUpdateTicketStatus);\n }\n }, {\n key: \"onDocumentClick\",\n value: function onDocumentClick(e) {\n if (!this.selectorButton.contains(e.target) && this.dropMenu.classList.contains('shown')) this.forceClose();\n }\n }, {\n key: \"onUpdateTicketStatus\",\n value: function onUpdateTicketStatus(data) {\n if (this.props.ticketId === data.tid) {\n this.status = data.status;\n if (this.props.onStatusChange) this.props.onStatusChange(this.status);\n }\n }\n }, {\n key: \"toggleDropMenu\",\n value: function toggleDropMenu(e) {\n e.stopPropagation();\n if (!this.props.hasPerm) return;\n var hasHide = this.dropMenu.classList.contains('hide');\n var hasShown = this.dropMenu.classList.contains('shown');\n hasHide ? this.dropMenu.classList.remove('hide') : this.dropMenu.classList.add('hide');\n hasShown ? this.dropMenu.classList.remove('shown') : this.dropMenu.classList.add('shown');\n }\n }, {\n key: \"forceClose\",\n value: function forceClose() {\n this.dropMenu.classList.remove('shown');\n this.dropMenu.classList.add('hide');\n }\n }, {\n key: \"changeStatus\",\n value: function changeStatus(status) {\n if (!this.props.hasPerm) return;\n this.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_STATUS_SET, {\n _id: this.props.ticketId,\n value: status\n });\n this.forceClose();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var currentStatus = this.props.ticketStatuses ? this.props.ticketStatuses.find(function (s) {\n return s.get('uid') === _this2.status;\n }) : null;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"floating-ticket-status\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n title: \"Change Status\",\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"ticket-status\", this.props.hasPerm && \"cursor-pointer\"),\n style: {\n color: 'white',\n background: currentStatus != null ? currentStatus.get('htmlColor') : '#000000'\n },\n onClick: function onClick(e) {\n return _this2.toggleDropMenu(e);\n },\n ref: function ref(r) {\n return _this2.selectorButton = r;\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, currentStatus != null ? currentStatus.get('name') : 'Unknown')), this.props.hasPerm && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"drop-icon material-icons\",\n style: {\n left: 'auto',\n right: 22,\n bottom: -18\n }\n }, \"keyboard_arrow_down\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'statusSelect',\n ref: function ref(r) {\n return _this2.dropMenu = r;\n },\n className: \"hide\",\n style: {\n height: 25 * this.props.ticketStatuses.size + 25\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", null, this.props.ticketStatuses.map(function (s) {\n return s && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: s.get('_id'),\n className: \"ticket-status\",\n onClick: function onClick() {\n return _this2.changeStatus(s.get('uid'));\n },\n style: {\n color: 'white',\n background: s.get('htmlColor')\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, s.get('name')));\n }))));\n }\n }]);\n\n return StatusSelector;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"status\", [mobx__WEBPACK_IMPORTED_MODULE_6__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n})), _class2)) || _class;\n\nStatusSelector.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().string.isRequired),\n status: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number.isRequired),\n onStatusChange: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func),\n hasPerm: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool.isRequired),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n ticketStatuses: state.ticketsState.ticketStatuses\n };\n};\n\nStatusSelector.defaultProps = {\n hasPerm: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)(mapStateToProps, {\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.fetchTicketStatus\n})(StatusSelector));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/StatusSelector.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 54);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! serverSocket/socketEventConsts */ 48);\n/* harmony import */ var serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! actions/tickets */ 51);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/24/19 6:33 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\nvar StatusSelector = (0,mobx_react__WEBPACK_IMPORTED_MODULE_5__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(StatusSelector, _React$Component);\n\n var _super = _createSuper(StatusSelector);\n\n function StatusSelector(props) {\n var _this;\n\n _classCallCheck(this, StatusSelector);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"status\", _descriptor, _assertThisInitialized(_this));\n\n (0,mobx__WEBPACK_IMPORTED_MODULE_6__.makeObservable)(_assertThisInitialized(_this));\n _this.status = _this.props.status;\n _this.onDocumentClick = _this.onDocumentClick.bind(_assertThisInitialized(_this));\n _this.onUpdateTicketStatus = _this.onUpdateTicketStatus.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(StatusSelector, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n document.addEventListener('click', this.onDocumentClick);\n this.props.socket.on(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_STATUS_UPDATE, this.onUpdateTicketStatus);\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.status !== this.props.status) this.status = this.props.status;\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n document.removeEventListener('click', this.onDocumentClick);\n this.props.socket.off(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_UI_STATUS_UPDATE, this.onUpdateTicketStatus);\n }\n }, {\n key: \"onDocumentClick\",\n value: function onDocumentClick(e) {\n if (!this.selectorButton.contains(e.target) && this.dropMenu.classList.contains('shown')) this.forceClose();\n }\n }, {\n key: \"onUpdateTicketStatus\",\n value: function onUpdateTicketStatus(data) {\n if (this.props.ticketId === data.tid) {\n this.status = data.status;\n if (this.props.onStatusChange) this.props.onStatusChange(this.status);\n }\n }\n }, {\n key: \"toggleDropMenu\",\n value: function toggleDropMenu(e) {\n e.stopPropagation();\n if (!this.props.hasPerm) return;\n var hasHide = this.dropMenu.classList.contains('hide');\n var hasShown = this.dropMenu.classList.contains('shown');\n hasHide ? this.dropMenu.classList.remove('hide') : this.dropMenu.classList.add('hide');\n hasShown ? this.dropMenu.classList.remove('shown') : this.dropMenu.classList.add('shown');\n }\n }, {\n key: \"forceClose\",\n value: function forceClose() {\n this.dropMenu.classList.remove('shown');\n this.dropMenu.classList.add('hide');\n }\n }, {\n key: \"changeStatus\",\n value: function changeStatus(status) {\n if (!this.props.hasPerm) return;\n this.props.socket.emit(serverSocket_socketEventConsts__WEBPACK_IMPORTED_MODULE_3__.TICKETS_STATUS_SET, {\n _id: this.props.ticketId,\n value: status\n });\n this.forceClose();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var currentStatus = this.props.ticketStatuses ? this.props.ticketStatuses.find(function (s) {\n return s.get('_id') === _this2.status;\n }) : null;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"floating-ticket-status\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n title: \"Change Status\",\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"ticket-status\", this.props.hasPerm && \"cursor-pointer\"),\n style: {\n color: 'white',\n background: currentStatus != null ? currentStatus.get('htmlColor') : '#000000'\n },\n onClick: function onClick(e) {\n return _this2.toggleDropMenu(e);\n },\n ref: function ref(r) {\n return _this2.selectorButton = r;\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, currentStatus != null ? currentStatus.get('name') : 'Unknown')), this.props.hasPerm && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: \"drop-icon material-icons\",\n style: {\n left: 'auto',\n right: 22,\n bottom: -18\n }\n }, \"keyboard_arrow_down\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'statusSelect',\n ref: function ref(r) {\n return _this2.dropMenu = r;\n },\n className: \"hide\",\n style: {\n height: 25 * this.props.ticketStatuses.size + 25\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ul\", null, this.props.ticketStatuses.map(function (s) {\n return s && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"li\", {\n key: s.get('_id'),\n className: \"ticket-status\",\n onClick: function onClick() {\n return _this2.changeStatus(s.get('_id'));\n },\n style: {\n color: 'white',\n background: s.get('htmlColor')\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, s.get('name')));\n }))));\n }\n }]);\n\n return StatusSelector;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"status\", [mobx__WEBPACK_IMPORTED_MODULE_6__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return null;\n }\n})), _class2)) || _class;\n\nStatusSelector.propTypes = {\n ticketId: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().string.isRequired),\n status: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().string.isRequired),\n onStatusChange: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func),\n hasPerm: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool.isRequired),\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired)\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n ticketStatuses: state.ticketsState.ticketStatuses\n };\n};\n\nStatusSelector.defaultProps = {\n hasPerm: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)(mapStateToProps, {\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_4__.fetchTicketStatus\n})(StatusSelector));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/StatusSelector.jsx?");
/***/ }),
@@ -1610,7 +1621,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var actions_search__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/search */ 620);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var components_PageTitle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/PageTitle */ 73);\n/* harmony import */ var components_Table__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Table */ 200);\n/* harmony import */ var components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/Table/TableHeader */ 201);\n/* harmony import */ var components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/Table/TableRow */ 202);\n/* harmony import */ var components_TitlePagination__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! components/TitlePagination */ 978);\n/* harmony import */ var components_PageContent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! components/PageContent */ 90);\n/* harmony import */ var components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/Table/TableCell */ 203);\n/* harmony import */ var components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! components/PageTitleButton */ 979);\n/* harmony import */ var components_Dropdown_DropdownTrigger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! components/Dropdown/DropdownTrigger */ 304);\n/* harmony import */ var components_Dropdown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! components/Dropdown */ 305);\n/* harmony import */ var components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! components/Dropdown/DropdownItem */ 621);\n/* harmony import */ var components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! components/Dropdown/DropdownSeperator */ 980);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var animejs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! animejs */ 622);\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! moment-timezone */ 58);\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var components_SearchResults__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! components/SearchResults */ 981);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/9/19 9:44 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TicketsContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_24__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketsContainer, _React$Component);\n\n var _super = _createSuper(TicketsContainer);\n\n function TicketsContainer(props) {\n var _this;\n\n _classCallCheck(this, TicketsContainer);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"searchTerm\", _descriptor, _assertThisInitialized(_this));\n\n _this.selectedTickets = [];\n (0,mobx__WEBPACK_IMPORTED_MODULE_25__.makeObservable)(_assertThisInitialized(_this));\n _this.onTicketCreated = _this.onTicketCreated.bind(_assertThisInitialized(_this));\n _this.onTicketUpdated = _this.onTicketUpdated.bind(_assertThisInitialized(_this));\n _this.onTicketDeleted = _this.onTicketDeleted.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TicketsContainer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.props.socket.on('$trudesk:client:ticket:created', this.onTicketCreated);\n this.props.socket.on('$trudesk:client:ticket:updated', this.onTicketUpdated);\n this.props.socket.on('$trudesk:client:ticket:deleted', this.onTicketDeleted);\n this.props.fetchTickets({\n limit: 50,\n page: this.props.page,\n type: this.props.view,\n filter: this.props.filter\n });\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.timeline) {\n this.timeline.pause();\n this.timeline.seek(0);\n }\n\n animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].remove('tr.overdue td');\n this.timeline = animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].timeline({\n direction: 'alternate',\n duration: 800,\n autoPlay: false,\n easing: 'steps(1)',\n loop: true,\n backgroundColor: 'blue'\n });\n this.timeline.add({\n targets: 'tr.overdue td',\n backgroundColor: '#b71c1c',\n color: '#ffffff'\n });\n this.timeline.play();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].remove('tr.overdue td');\n this.timeline = null;\n this.props.unloadTickets();\n this.props.socket.off('$trudesk:client:ticket:created', this.onTicketCreated);\n this.props.socket.off('$trudesk:client:ticket:updated', this.onTicketUpdated);\n this.props.socket.off('$trudesk:client:ticket:deleted', this.onTicketDeleted);\n }\n }, {\n key: \"onTicketCreated\",\n value: function onTicketCreated(ticket) {\n if (this.props.page === '0') this.props.ticketEvent({\n type: 'created',\n data: ticket\n });\n }\n }, {\n key: \"onTicketUpdated\",\n value: function onTicketUpdated(data) {\n this.props.ticketUpdated(data);\n }\n }, {\n key: \"onTicketDeleted\",\n value: function onTicketDeleted(id) {\n this.props.ticketEvent({\n type: 'deleted',\n data: id\n });\n }\n }, {\n key: \"onTicketCheckChanged\",\n value: function onTicketCheckChanged(e, id) {\n if (e.target.checked) this.selectedTickets.push(id);else this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.without)(this.selectedTickets, id);\n this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.uniq)(this.selectedTickets);\n }\n }, {\n key: \"onSetStatus\",\n value: function onSetStatus(status) {\n var _this2 = this;\n\n var batch = this.selectedTickets.map(function (id) {\n return {\n id: id,\n status: status.get('uid')\n };\n });\n axios__WEBPACK_IMPORTED_MODULE_4___default().put(\"/api/v2/tickets/batch\", {\n batch: batch\n }).then(function (res) {\n if (res.data.success) {\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar({\n text: \"Ticket status set to \".concat(s.get('name'))\n });\n\n _this2._clearChecked();\n } else {\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar('An unknown error occurred.', true);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(res.data.error);\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar('An Error occurred. Please check console.', true);\n });\n }\n }, {\n key: \"onDeleteClicked\",\n value: function onDeleteClicked() {\n var _this3 = this;\n\n (0,lodash__WEBPACK_IMPORTED_MODULE_2__.each)(this.selectedTickets, function (id) {\n _this3.props.deleteTicket({\n id: id\n });\n });\n\n this._clearChecked();\n }\n }, {\n key: \"onSearchTermChanged\",\n value: function onSearchTermChanged(e) {\n this.searchTerm = e.target.value;\n\n if (this.searchTerm.length > 3) {\n components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, true);\n this.props.fetchSearchResults({\n term: this.searchTerm\n });\n } else {\n components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, false);\n }\n }\n }, {\n key: \"_onSearchFocus\",\n value: function _onSearchFocus(e) {\n if (this.searchTerm.length > 3) components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, true);\n }\n }, {\n key: \"onSearchKeypress\",\n value: function onSearchKeypress(e) {\n if (this.searchTerm.length > 3) this.props.fetchSearchResults({\n term: this.searchTerm\n }); // e.persist()\n // if (e.charCode === 13) {\n // const searchString = e.target.value\n // if (searchString.length < 1) this.props.unloadTickets().then(this.props.fetchTickets({ type: this.props.view }))\n // else this.props.unloadTickets().then(this.props.fetchTickets({ type: 'search', searchString }))\n // }\n }\n }, {\n key: \"_selectAll\",\n value: function _selectAll() {\n var _this4 = this;\n\n this.selectedTickets = [];\n var checkboxes = this.ticketsTable.querySelectorAll('td > input[type=\"checkbox\"]');\n checkboxes.forEach(function (item) {\n _this4.selectedTickets.push(item.dataset.ticket);\n\n item.checked = true;\n });\n this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.uniq)(this.selectedTickets);\n }\n }, {\n key: \"_clearChecked\",\n value: function _clearChecked() {\n this.selectedTickets = [];\n var checkboxes = this.ticketsTable.querySelectorAll('td > input[type=\"checkbox\"]');\n checkboxes.forEach(function (item) {\n item.checked = false;\n });\n this.selectAllCheckbox.checked = false;\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(e) {\n if (e.target.checked) this._selectAll();else this._clearChecked();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var loadingItems = [];\n\n for (var i = 0; i < 51; i++) {\n var cells = [];\n\n for (var k = 0; k < 10; k++) {\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n key: k,\n className: 'vam'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'loadingTextAnimation'\n })));\n }\n\n loadingItems.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n key: Math.random()\n }, cells));\n }\n\n var selectAllCheckbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginLeft: 17\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"checkbox\",\n id: 'select_all',\n style: {\n display: 'none'\n },\n className: \"svgcheckinput\",\n onChange: function onChange(e) {\n return _this5.onSelectAll(e);\n },\n ref: function ref(r) {\n return _this5.selectAllCheckbox = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: 'select_all',\n className: \"svgcheck\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"svg\", {\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 18 18\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"path\", {\n d: \"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"polyline\", {\n points: \"1 9 7 14 15 4\"\n }))));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitle__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n title: 'Tickets',\n shadow: false,\n rightComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-right'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TitlePagination__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n limit: 50,\n total: this.props.totalCount,\n type: this.props.view,\n prevEnabled: this.props.prevEnabled,\n nextEnabled: this.props.nextEnabled,\n currentPage: this.props.page,\n prevPage: this.props.prevPage,\n nextPage: this.props.nextPage,\n filter: this.props.filter\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-refresh',\n onButtonClick: function onButtonClick(e) {\n e.preventDefault();\n\n _this5.props.unloadTickets().then(_this5.props.fetchTickets({\n type: _this5.props.view,\n page: _this5.props.page\n }));\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-filter',\n onButtonClick: function onButtonClick(e) {\n e.preventDefault();\n\n _this5.props.showModal('FILTER_TICKET');\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownTrigger__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n pos: 'bottom-right',\n offset: 5,\n extraClass: 'uk-float-left'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-tasks'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n small: true,\n width: 120\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n text: 'Create',\n onClick: function onClick() {\n return _this5.props.showModal('CREATE_TICKET');\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null), this.props.ticketStatuses.map(function (s) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n key: s.get('_id'),\n text: 'Set ' + s.get('name'),\n onClick: function onClick() {\n return _this5.onSetStatus(s);\n }\n });\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().canUser('tickets:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().canUser('tickets:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n text: 'Delete',\n extraClass: 'text-danger',\n onClick: function onClick() {\n return _this5.onDeleteClicked();\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-right'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'ticket-search-box',\n className: \"search-box uk-float-left nb\",\n style: {\n marginTop: 8,\n paddingLeft: 0\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n id: \"tickets_Search\",\n placeholder: 'Search',\n className: 'ticket-top-search',\n value: this.searchTerm,\n onChange: function onChange(e) {\n return _this5.onSearchTermChanged(e);\n },\n onFocus: function onFocus(e) {\n return _this5._onSearchFocus(e);\n }\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n target: '#ticket-search-box',\n ref: function ref(r) {\n return _this5.searchContainer = r;\n }\n }))\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageContent__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n padding: 0,\n paddingBottom: 0,\n extraClass: 'uk-position-relative'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n tableRef: function tableRef(ref) {\n return _this5.ticketsTable = ref;\n },\n style: {\n margin: 0\n },\n extraClass: 'pDataTable',\n stickyHeader: true,\n striped: true,\n headers: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 0,\n width: 45,\n height: 50,\n component: selectAllCheckbox\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 1,\n width: 60,\n text: 'Status'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 2,\n width: 65,\n text: '#'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 3,\n width: '23%',\n text: 'Subject'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 4,\n width: 110,\n text: 'Created'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 5,\n width: 125,\n text: 'Requester'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 6,\n width: 175,\n text: 'Customer'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 7,\n text: 'Assignee'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 8,\n width: 110,\n text: 'Due Date'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 9,\n text: 'Updated'\n })]\n }, !this.props.loading && this.props.tickets.size < 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n clickable: false\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n colSpan: 10\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", {\n style: {\n margin: 10\n }\n }, \"No Tickets Found\"))), this.props.loading && loadingItems, !this.props.loading && this.props.tickets.map(function (ticket) {\n var status = _this5.props.ticketStatuses.find(function (s) {\n return s.get('uid') === ticket.get('status');\n });\n\n var assignee = function assignee() {\n var a = ticket.get('assignee');\n return !a ? '--' : a.get('fullname');\n };\n\n var updated = ticket.get('updated') ? lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('updated'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat()) + ', ' + lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('updated'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getTimeFormat()) : '--';\n var dueDate = ticket.get('dueDate') ? lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('dueDate'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat()) : '--';\n\n var isOverdue = function isOverdue() {\n if (!_this5.props.common.viewdata.get('showOverdue') || [2, 3].indexOf(ticket.get('status')) !== -1) return false;\n var overdueIn = ticket.getIn(['priority', 'overdueIn']);\n var now = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()();\n var updated = ticket.get('updated');\n if (updated) updated = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()(updated);else updated = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()(ticket.get('date'));\n var timeout = updated.clone().add(overdueIn, 'm');\n return now.isAfter(timeout);\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n key: ticket.get('_id'),\n className: \"ticket-\".concat(status == null ? 'unknonwn' : status.get('name'), \" \").concat(isOverdue() ? 'overdue' : ''),\n clickable: true,\n onClick: function onClick(e) {\n var td = e.target.closest('td');\n var input = td.getElementsByTagName('input');\n if (input.length > 0) return false;\n History.pushState(null, \"Ticket-\".concat(ticket.get('uid')), \"/tickets/\".concat(ticket.get('uid')));\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'ticket-priority nbb vam',\n style: {\n borderColor: ticket.getIn(['priority', 'htmlColor']),\n padding: '18px 15px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"checkbox\",\n id: \"c_\".concat(ticket.get('_id')),\n \"data-ticket\": ticket.get('_id'),\n style: {\n display: 'none'\n },\n onChange: function onChange(e) {\n return _this5.onTicketCheckChanged(e, ticket.get('_id'));\n },\n className: \"svgcheckinput\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"c_\".concat(ticket.get('_id')),\n className: \"svgcheck\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"svg\", {\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 18 18\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"path\", {\n d: \"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"polyline\", {\n points: \"1 9 7 14 15 4\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: \"ticket-status vam nbb uk-text-center\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: 'uk-display-inline-block',\n style: {\n backgroundColor: status == null ? undefined : status.get('htmlColor')\n }\n }, status == null ? 'U' : status.get('name')[0].toUpperCase())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.get('uid')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.get('subject')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('date'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.getIn(['owner', 'fullname'])), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.getIn(['group', 'name'])), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, assignee()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, dueDate), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, updated));\n }))));\n }\n }]);\n\n return TicketsContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"searchTerm\", [mobx__WEBPACK_IMPORTED_MODULE_25__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n})), _class2)) || _class;\n\nTicketsContainer.propTypes = {\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n view: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n page: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n prevPage: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().number.isRequired),\n nextPage: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().number.isRequired),\n prevEnabled: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n nextEnabled: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n tickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n totalCount: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n loading: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n fetchTickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n deleteTicket: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n ticketEvent: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n unloadTickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n ticketUpdated: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n fetchSearchResults: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n common: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n filter: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired)\n};\nTicketsContainer.defaultProps = {\n view: 'active',\n page: 0,\n prevEnabled: true,\n nextEnabled: true\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n tickets: state.ticketsState.tickets,\n totalCount: state.ticketsState.totalCount,\n prevPage: state.ticketsState.prevPage,\n nextPage: state.ticketsState.nextPage,\n loading: state.ticketsState.loading,\n common: state.common,\n socket: state.shared.socket,\n ticketStatuses: state.ticketsState.ticketStatuses,\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired)\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n fetchTickets: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.fetchTickets,\n deleteTicket: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.deleteTicket,\n ticketEvent: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.ticketEvent,\n unloadTickets: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.unloadTickets,\n ticketUpdated: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.ticketUpdated,\n fetchSearchResults: actions_search__WEBPACK_IMPORTED_MODULE_6__.fetchSearchResults,\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_7__.showModal,\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.fetchTicketStatus\n})(TicketsContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/TicketsContainer.jsx?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 37);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! prop-types */ 87);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ 38);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! mobx-react */ 1122);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! mobx */ 1123);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var actions_tickets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! actions/tickets */ 51);\n/* harmony import */ var actions_search__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! actions/search */ 620);\n/* harmony import */ var actions_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! actions/common */ 44);\n/* harmony import */ var components_PageTitle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/PageTitle */ 73);\n/* harmony import */ var components_Table__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/Table */ 200);\n/* harmony import */ var components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/Table/TableHeader */ 201);\n/* harmony import */ var components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/Table/TableRow */ 202);\n/* harmony import */ var components_TitlePagination__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! components/TitlePagination */ 978);\n/* harmony import */ var components_PageContent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! components/PageContent */ 90);\n/* harmony import */ var components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/Table/TableCell */ 203);\n/* harmony import */ var components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! components/PageTitleButton */ 979);\n/* harmony import */ var components_Dropdown_DropdownTrigger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! components/Dropdown/DropdownTrigger */ 304);\n/* harmony import */ var components_Dropdown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! components/Dropdown */ 305);\n/* harmony import */ var components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! components/Dropdown/DropdownItem */ 621);\n/* harmony import */ var components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! components/Dropdown/DropdownSeperator */ 980);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var animejs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! animejs */ 622);\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! moment-timezone */ 58);\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var components_SearchResults__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! components/SearchResults */ 981);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _class, _class2, _descriptor;\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Updated: 6/9/19 9:44 PM\r\n * Copyright (c) 2014-2019 Trudesk, Inc. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TicketsContainer = (0,mobx_react__WEBPACK_IMPORTED_MODULE_24__.observer)(_class = (_class2 = /*#__PURE__*/function (_React$Component) {\n _inherits(TicketsContainer, _React$Component);\n\n var _super = _createSuper(TicketsContainer);\n\n function TicketsContainer(props) {\n var _this;\n\n _classCallCheck(this, TicketsContainer);\n\n _this = _super.call(this, props);\n\n _initializerDefineProperty(_this, \"searchTerm\", _descriptor, _assertThisInitialized(_this));\n\n _this.selectedTickets = [];\n (0,mobx__WEBPACK_IMPORTED_MODULE_25__.makeObservable)(_assertThisInitialized(_this));\n _this.onTicketCreated = _this.onTicketCreated.bind(_assertThisInitialized(_this));\n _this.onTicketUpdated = _this.onTicketUpdated.bind(_assertThisInitialized(_this));\n _this.onTicketDeleted = _this.onTicketDeleted.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TicketsContainer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.props.socket.on('$trudesk:client:ticket:created', this.onTicketCreated);\n this.props.socket.on('$trudesk:client:ticket:updated', this.onTicketUpdated);\n this.props.socket.on('$trudesk:client:ticket:deleted', this.onTicketDeleted);\n this.props.fetchTickets({\n limit: 50,\n page: this.props.page,\n type: this.props.view,\n filter: this.props.filter\n });\n this.props.fetchTicketStatus();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.timeline) {\n this.timeline.pause();\n this.timeline.seek(0);\n }\n\n animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].remove('tr.overdue td');\n this.timeline = animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].timeline({\n direction: 'alternate',\n duration: 800,\n autoPlay: false,\n easing: 'steps(1)',\n loop: true,\n backgroundColor: 'blue'\n });\n this.timeline.add({\n targets: 'tr.overdue td',\n backgroundColor: '#b71c1c',\n color: '#ffffff'\n });\n this.timeline.play();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n animejs__WEBPACK_IMPORTED_MODULE_21__[\"default\"].remove('tr.overdue td');\n this.timeline = null;\n this.props.unloadTickets();\n this.props.socket.off('$trudesk:client:ticket:created', this.onTicketCreated);\n this.props.socket.off('$trudesk:client:ticket:updated', this.onTicketUpdated);\n this.props.socket.off('$trudesk:client:ticket:deleted', this.onTicketDeleted);\n }\n }, {\n key: \"onTicketCreated\",\n value: function onTicketCreated(ticket) {\n if (this.props.page === '0') this.props.ticketEvent({\n type: 'created',\n data: ticket\n });\n }\n }, {\n key: \"onTicketUpdated\",\n value: function onTicketUpdated(data) {\n this.props.ticketUpdated(data);\n }\n }, {\n key: \"onTicketDeleted\",\n value: function onTicketDeleted(id) {\n this.props.ticketEvent({\n type: 'deleted',\n data: id\n });\n }\n }, {\n key: \"onTicketCheckChanged\",\n value: function onTicketCheckChanged(e, id) {\n if (e.target.checked) this.selectedTickets.push(id);else this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.without)(this.selectedTickets, id);\n this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.uniq)(this.selectedTickets);\n }\n }, {\n key: \"onSetStatus\",\n value: function onSetStatus(status) {\n var _this2 = this;\n\n var batch = this.selectedTickets.map(function (id) {\n return {\n id: id,\n status: status.get('_id')\n };\n });\n axios__WEBPACK_IMPORTED_MODULE_4___default().put(\"/api/v2/tickets/batch\", {\n batch: batch\n }).then(function (res) {\n if (res.data.success) {\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar({\n text: \"Ticket status set to \".concat(status.get('name'))\n });\n\n _this2._clearChecked();\n } else {\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar('An unknown error occurred.', true);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(res.data.error);\n }\n })[\"catch\"](function (error) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().UI.showSnackbar('An Error occurred. Please check console.', true);\n });\n }\n }, {\n key: \"onDeleteClicked\",\n value: function onDeleteClicked() {\n var _this3 = this;\n\n (0,lodash__WEBPACK_IMPORTED_MODULE_2__.each)(this.selectedTickets, function (id) {\n _this3.props.deleteTicket({\n id: id\n });\n });\n\n this._clearChecked();\n }\n }, {\n key: \"onSearchTermChanged\",\n value: function onSearchTermChanged(e) {\n this.searchTerm = e.target.value;\n\n if (this.searchTerm.length > 3) {\n components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, true);\n this.props.fetchSearchResults({\n term: this.searchTerm\n });\n } else {\n components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, false);\n }\n }\n }, {\n key: \"_onSearchFocus\",\n value: function _onSearchFocus(e) {\n if (this.searchTerm.length > 3) components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"].toggleAnimation(true, true);\n }\n }, {\n key: \"onSearchKeypress\",\n value: function onSearchKeypress(e) {\n if (this.searchTerm.length > 3) this.props.fetchSearchResults({\n term: this.searchTerm\n }); // e.persist()\n // if (e.charCode === 13) {\n // const searchString = e.target.value\n // if (searchString.length < 1) this.props.unloadTickets().then(this.props.fetchTickets({ type: this.props.view }))\n // else this.props.unloadTickets().then(this.props.fetchTickets({ type: 'search', searchString }))\n // }\n }\n }, {\n key: \"_selectAll\",\n value: function _selectAll() {\n var _this4 = this;\n\n this.selectedTickets = [];\n var checkboxes = this.ticketsTable.querySelectorAll('td > input[type=\"checkbox\"]');\n checkboxes.forEach(function (item) {\n _this4.selectedTickets.push(item.dataset.ticket);\n\n item.checked = true;\n });\n this.selectedTickets = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.uniq)(this.selectedTickets);\n }\n }, {\n key: \"_clearChecked\",\n value: function _clearChecked() {\n this.selectedTickets = [];\n var checkboxes = this.ticketsTable.querySelectorAll('td > input[type=\"checkbox\"]');\n checkboxes.forEach(function (item) {\n item.checked = false;\n });\n this.selectAllCheckbox.checked = false;\n }\n }, {\n key: \"onSelectAll\",\n value: function onSelectAll(e) {\n if (e.target.checked) this._selectAll();else this._clearChecked();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var loadingItems = [];\n\n for (var i = 0; i < 51; i++) {\n var cells = [];\n\n for (var k = 0; k < 10; k++) {\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n key: k,\n className: 'vam'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'loadingTextAnimation'\n })));\n }\n\n loadingItems.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n key: Math.random()\n }, cells));\n }\n\n var selectAllCheckbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n marginLeft: 17\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"checkbox\",\n id: 'select_all',\n style: {\n display: 'none'\n },\n className: \"svgcheckinput\",\n onChange: function onChange(e) {\n return _this5.onSelectAll(e);\n },\n ref: function ref(r) {\n return _this5.selectAllCheckbox = r;\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: 'select_all',\n className: \"svgcheck\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"svg\", {\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 18 18\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"path\", {\n d: \"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"polyline\", {\n points: \"1 9 7 14 15 4\"\n }))));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitle__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n title: 'Tickets',\n shadow: false,\n rightComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-right'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_TitlePagination__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n limit: 50,\n total: this.props.totalCount,\n type: this.props.view,\n prevEnabled: this.props.prevEnabled,\n nextEnabled: this.props.nextEnabled,\n currentPage: this.props.page,\n prevPage: this.props.prevPage,\n nextPage: this.props.nextPage,\n filter: this.props.filter\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-refresh',\n onButtonClick: function onButtonClick(e) {\n e.preventDefault();\n\n _this5.props.unloadTickets().then(_this5.props.fetchTickets({\n type: _this5.props.view,\n page: _this5.props.page\n }));\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-filter',\n onButtonClick: function onButtonClick(e) {\n e.preventDefault();\n\n _this5.props.showModal('FILTER_TICKET');\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownTrigger__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n pos: 'bottom-right',\n offset: 5,\n extraClass: 'uk-float-left'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageTitleButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n fontAwesomeIcon: 'fa-tasks'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n small: true,\n width: 120\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n text: 'Create',\n onClick: function onClick() {\n return _this5.props.showModal('CREATE_TICKET');\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null), this.props.ticketStatuses.map(function (s) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n key: s.get('_id'),\n text: 'Set ' + s.get('name'),\n onClick: function onClick() {\n return _this5.onSetStatus(s);\n }\n });\n }), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().canUser('tickets:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownSeperator__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().canUser('tickets:delete', true) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Dropdown_DropdownItem__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n text: 'Delete',\n extraClass: 'text-danger',\n onClick: function onClick() {\n return _this5.onDeleteClicked();\n }\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: 'uk-float-right'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: 'ticket-search-box',\n className: \"search-box uk-float-left nb\",\n style: {\n marginTop: 8,\n paddingLeft: 0\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"text\",\n id: \"tickets_Search\",\n placeholder: 'Search',\n className: 'ticket-top-search',\n value: this.searchTerm,\n onChange: function onChange(e) {\n return _this5.onSearchTermChanged(e);\n },\n onFocus: function onFocus(e) {\n return _this5._onSearchFocus(e);\n }\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_SearchResults__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n target: '#ticket-search-box',\n ref: function ref(r) {\n return _this5.searchContainer = r;\n }\n }))\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PageContent__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n padding: 0,\n paddingBottom: 0,\n extraClass: 'uk-position-relative'\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n tableRef: function tableRef(ref) {\n return _this5.ticketsTable = ref;\n },\n style: {\n margin: 0\n },\n extraClass: 'pDataTable',\n stickyHeader: true,\n striped: true,\n headers: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 0,\n width: 45,\n height: 50,\n component: selectAllCheckbox\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 1,\n width: 60,\n text: 'Status'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 2,\n width: 65,\n text: '#'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 3,\n width: '23%',\n text: 'Subject'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 4,\n width: 110,\n text: 'Created'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 5,\n width: 125,\n text: 'Requester'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 6,\n width: 175,\n text: 'Customer'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 7,\n text: 'Assignee'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 8,\n width: 110,\n text: 'Due Date'\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableHeader__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: 9,\n text: 'Updated'\n })]\n }, !this.props.loading && this.props.tickets.size < 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n clickable: false\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n colSpan: 10\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", {\n style: {\n margin: 10\n }\n }, \"No Tickets Found\"))), this.props.loading && loadingItems, !this.props.loading && this.props.tickets.map(function (ticket) {\n var status = _this5.props.ticketStatuses.find(function (s) {\n return s.get('_id') === ticket.get('status').get('_id');\n });\n\n var assignee = function assignee() {\n var a = ticket.get('assignee');\n return !a ? '--' : a.get('fullname');\n };\n\n var updated = ticket.get('updated') ? lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('updated'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat()) + ', ' + lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('updated'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getTimeFormat()) : '--';\n var dueDate = ticket.get('dueDate') ? lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('dueDate'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat()) : '--';\n\n var isOverdue = function isOverdue() {\n if (!_this5.props.common.viewdata.get('showOverdue') || [2, 3].indexOf(ticket.get('status')) !== -1) return false;\n var overdueIn = ticket.getIn(['priority', 'overdueIn']);\n var now = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()();\n var updated = ticket.get('updated');\n if (updated) updated = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()(updated);else updated = moment_timezone__WEBPACK_IMPORTED_MODULE_22___default()(ticket.get('date'));\n var timeout = updated.clone().add(overdueIn, 'm');\n return now.isAfter(timeout);\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableRow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n key: ticket.get('_id'),\n className: \"ticket-\".concat(status == null ? 'unknonwn' : status.get('name'), \" \").concat(isOverdue() ? 'overdue' : ''),\n clickable: true,\n onClick: function onClick(e) {\n var td = e.target.closest('td');\n var input = td.getElementsByTagName('input');\n if (input.length > 0) return false;\n History.pushState(null, \"Ticket-\".concat(ticket.get('uid')), \"/tickets/\".concat(ticket.get('uid')));\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'ticket-priority nbb vam',\n style: {\n borderColor: ticket.getIn(['priority', 'htmlColor']),\n padding: '18px 15px'\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"checkbox\",\n id: \"c_\".concat(ticket.get('_id')),\n \"data-ticket\": ticket.get('_id'),\n style: {\n display: 'none'\n },\n onChange: function onChange(e) {\n return _this5.onTicketCheckChanged(e, ticket.get('_id'));\n },\n className: \"svgcheckinput\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: \"c_\".concat(ticket.get('_id')),\n className: \"svgcheck\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"svg\", {\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 18 18\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"path\", {\n d: \"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"polyline\", {\n points: \"1 9 7 14 15 4\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: \"ticket-status vam nbb uk-text-center\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n className: 'uk-display-inline-block',\n style: {\n backgroundColor: status == null ? '#000' : status.get('htmlColor')\n }\n }, status == null ? 'U' : status.get('name')[0].toUpperCase())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.get('uid')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.get('subject')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().formatDate(ticket.get('date'), lib_helpers__WEBPACK_IMPORTED_MODULE_20___default().getShortDateFormat())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.getIn(['owner', 'fullname'])), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, ticket.getIn(['group', 'name'])), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, assignee()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, dueDate), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Table_TableCell__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n className: 'vam nbb'\n }, updated));\n }))));\n }\n }]);\n\n return TicketsContainer;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"searchTerm\", [mobx__WEBPACK_IMPORTED_MODULE_25__.observable], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return '';\n }\n})), _class2)) || _class;\n\nTicketsContainer.propTypes = {\n socket: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n view: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n page: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n prevPage: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().number.isRequired),\n nextPage: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().number.isRequired),\n prevEnabled: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n nextEnabled: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n tickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n totalCount: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().string.isRequired),\n loading: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().bool.isRequired),\n fetchTickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n deleteTicket: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n ticketEvent: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n unloadTickets: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n ticketUpdated: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n showModal: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n fetchSearchResults: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired),\n common: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n filter: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n ticketStatuses: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().object.isRequired),\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired)\n};\nTicketsContainer.defaultProps = {\n view: 'active',\n page: 0,\n prevEnabled: true,\n nextEnabled: true\n};\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n tickets: state.ticketsState.tickets,\n totalCount: state.ticketsState.totalCount,\n prevPage: state.ticketsState.prevPage,\n nextPage: state.ticketsState.nextPage,\n loading: state.ticketsState.loading,\n common: state.common,\n socket: state.shared.socket,\n ticketStatuses: state.ticketsState.ticketStatuses,\n fetchTicketStatus: (prop_types__WEBPACK_IMPORTED_MODULE_26___default().func.isRequired)\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(mapStateToProps, {\n fetchTickets: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.fetchTickets,\n deleteTicket: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.deleteTicket,\n ticketEvent: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.ticketEvent,\n unloadTickets: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.unloadTickets,\n ticketUpdated: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.ticketUpdated,\n fetchSearchResults: actions_search__WEBPACK_IMPORTED_MODULE_6__.fetchSearchResults,\n showModal: actions_common__WEBPACK_IMPORTED_MODULE_7__.showModal,\n fetchTicketStatus: actions_tickets__WEBPACK_IMPORTED_MODULE_5__.fetchTicketStatus\n})(TicketsContainer));\n\n//# sourceURL=webpack://trudesk/./src/client/containers/Tickets/TicketsContainer.jsx?");
/***/ }),
@@ -1863,7 +1874,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createPriority\": () => (/* binding */ createPriority),\n/* harmony export */ \"createStatus\": () => (/* binding */ createStatus),\n/* harmony export */ \"createTag\": () => (/* binding */ createTag),\n/* harmony export */ \"createTicket\": () => (/* binding */ createTicket),\n/* harmony export */ \"createTicketType\": () => (/* binding */ createTicketType),\n/* harmony export */ \"deletePriority\": () => (/* binding */ deletePriority),\n/* harmony export */ \"deleteStatus\": () => (/* binding */ deleteStatus),\n/* harmony export */ \"deleteTicket\": () => (/* binding */ deleteTicket),\n/* harmony export */ \"deleteTicketType\": () => (/* binding */ deleteTicketType),\n/* harmony export */ \"fetchPriorities\": () => (/* binding */ fetchPriorities),\n/* harmony export */ \"fetchTicketStatus\": () => (/* binding */ fetchTicketStatus),\n/* harmony export */ \"fetchTicketTypes\": () => (/* binding */ fetchTicketTypes),\n/* harmony export */ \"fetchTickets\": () => (/* binding */ fetchTickets),\n/* harmony export */ \"getTagsWithPage\": () => (/* binding */ getTagsWithPage),\n/* harmony export */ \"renameTicketType\": () => (/* binding */ renameTicketType),\n/* harmony export */ \"tagsUpdateCurrentPage\": () => (/* binding */ tagsUpdateCurrentPage),\n/* harmony export */ \"ticketEvent\": () => (/* binding */ ticketEvent),\n/* harmony export */ \"ticketUpdated\": () => (/* binding */ ticketUpdated),\n/* harmony export */ \"transferToThirdParty\": () => (/* binding */ transferToThirdParty),\n/* harmony export */ \"unloadTickets\": () => (/* binding */ unloadTickets),\n/* harmony export */ \"updatePriority\": () => (/* binding */ updatePriority),\n/* harmony export */ \"updateStatus\": () => (/* binding */ updateStatus)\n/* harmony export */ });\n/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-actions */ 1120);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! actions/types */ 40);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 3:19 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\nconst fetchTickets = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_TICKETS.ACTION)\r\nconst createTicket = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TICKET.ACTION)\r\nconst ticketUpdated = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TICKET_UPDATED.ACTION)\r\nconst deleteTicket = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_TICKET.ACTION)\r\nconst unloadTickets = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\r\n actions_types__WEBPACK_IMPORTED_MODULE_0__.UNLOAD_TICKETS.ACTION,\r\n payload => payload,\r\n () => ({ thunk: true })\r\n)\r\nconst ticketEvent = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TICKET_EVENT.ACTION)\r\n\r\nconst createTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TICKET_TYPE.ACTION, input => ({ name: input.name }))\r\nconst renameTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.RENAME_TICKET_TYPE.ACTION, input => ({ name: input.name }))\r\nconst deleteTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_TICKET_TYPE.ACTION, (id, newTypeId) => ({ id, newTypeId }))\r\nconst fetchPriorities = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\r\n actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_PRIORITIES.ACTION,\r\n payload => payload,\r\n () => ({ thunk: true })\r\n)\r\nconst createPriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_PRIORITY.ACTION, ({ name, overdueIn, htmlColor }) => ({\r\n name,\r\n overdueIn,\r\n htmlColor\r\n}))\r\nconst updatePriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.UPDATE_PRIORITY.ACTION, ({ id, name, overdueIn, htmlColor }) => ({\r\n id,\r\n name,\r\n overdueIn,\r\n htmlColor\r\n}))\r\n\r\nconst createStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_STATUS.ACTION, ({ name, htmlColor }) => ({\r\n name,\r\n htmlColor\r\n}))\r\nconst updateStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.UPDATE_STATUS.ACTION, ({ id, name, htmlColor }) => ({\r\n id,\r\n name,\r\n htmlColor\r\n}))\r\n\r\nconst deletePriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_PRIORITY.ACTION, ({ id, newPriority }) => ({ id, newPriority }))\r\nconst deleteStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_STATUS.ACTION, (id) => ({ id }))\r\nconst getTagsWithPage = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.GET_TAGS_WITH_PAGE.ACTION, ({ limit, page }) => ({ limit, page }))\r\nconst tagsUpdateCurrentPage = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TAGS_UPDATE_CURRENT_PAGE.ACTION, currentPage => ({ currentPage }))\r\nconst createTag = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TAG.ACTION, ({ name, currentPage }) => ({ name, currentPage }))\r\nconst transferToThirdParty = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TRANSFER_TO_THIRDPARTY.ACTION, ({ uid }) => ({ uid }))\r\nconst fetchTicketTypes = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_TICKET_TYPES.ACTION)\r\nconst fetchTicketStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_STATUS.ACTION)\n\n//# sourceURL=webpack://trudesk/./src/client/actions/tickets.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createPriority\": () => (/* binding */ createPriority),\n/* harmony export */ \"createStatus\": () => (/* binding */ createStatus),\n/* harmony export */ \"createTag\": () => (/* binding */ createTag),\n/* harmony export */ \"createTicket\": () => (/* binding */ createTicket),\n/* harmony export */ \"createTicketType\": () => (/* binding */ createTicketType),\n/* harmony export */ \"deletePriority\": () => (/* binding */ deletePriority),\n/* harmony export */ \"deleteStatus\": () => (/* binding */ deleteStatus),\n/* harmony export */ \"deleteTicket\": () => (/* binding */ deleteTicket),\n/* harmony export */ \"deleteTicketType\": () => (/* binding */ deleteTicketType),\n/* harmony export */ \"fetchPriorities\": () => (/* binding */ fetchPriorities),\n/* harmony export */ \"fetchTicketStatus\": () => (/* binding */ fetchTicketStatus),\n/* harmony export */ \"fetchTicketTypes\": () => (/* binding */ fetchTicketTypes),\n/* harmony export */ \"fetchTickets\": () => (/* binding */ fetchTickets),\n/* harmony export */ \"getTagsWithPage\": () => (/* binding */ getTagsWithPage),\n/* harmony export */ \"renameTicketType\": () => (/* binding */ renameTicketType),\n/* harmony export */ \"tagsUpdateCurrentPage\": () => (/* binding */ tagsUpdateCurrentPage),\n/* harmony export */ \"ticketEvent\": () => (/* binding */ ticketEvent),\n/* harmony export */ \"ticketUpdated\": () => (/* binding */ ticketUpdated),\n/* harmony export */ \"transferToThirdParty\": () => (/* binding */ transferToThirdParty),\n/* harmony export */ \"unloadTickets\": () => (/* binding */ unloadTickets),\n/* harmony export */ \"updatePriority\": () => (/* binding */ updatePriority),\n/* harmony export */ \"updateStatus\": () => (/* binding */ updateStatus)\n/* harmony export */ });\n/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-actions */ 1120);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! actions/types */ 40);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 3:19 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\nconst fetchTickets = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_TICKETS.ACTION)\r\nconst createTicket = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TICKET.ACTION)\r\nconst ticketUpdated = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TICKET_UPDATED.ACTION)\r\nconst deleteTicket = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_TICKET.ACTION)\r\nconst unloadTickets = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\r\n actions_types__WEBPACK_IMPORTED_MODULE_0__.UNLOAD_TICKETS.ACTION,\r\n payload => payload,\r\n () => ({ thunk: true })\r\n)\r\nconst ticketEvent = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TICKET_EVENT.ACTION)\r\n\r\nconst createTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TICKET_TYPE.ACTION, input => ({ name: input.name }))\r\nconst renameTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.RENAME_TICKET_TYPE.ACTION, input => ({ name: input.name }))\r\nconst deleteTicketType = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_TICKET_TYPE.ACTION, (id, newTypeId) => ({ id, newTypeId }))\r\nconst fetchPriorities = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\r\n actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_PRIORITIES.ACTION,\r\n payload => payload,\r\n () => ({ thunk: true })\r\n)\r\nconst createPriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_PRIORITY.ACTION, ({ name, overdueIn, htmlColor }) => ({\r\n name,\r\n overdueIn,\r\n htmlColor\r\n}))\r\nconst updatePriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.UPDATE_PRIORITY.ACTION, ({ id, name, overdueIn, htmlColor }) => ({\r\n id,\r\n name,\r\n overdueIn,\r\n htmlColor\r\n}))\r\n\r\nconst createStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_STATUS.ACTION, ({ name, htmlColor }) => ({\r\n name,\r\n htmlColor\r\n}))\r\nconst updateStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.UPDATE_STATUS.ACTION, ({ id, name, htmlColor }) => ({\r\n id,\r\n name,\r\n htmlColor\r\n}))\r\n\r\nconst deletePriority = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_PRIORITY.ACTION, ({ id, newPriority }) => ({ id, newPriority }))\r\nconst deleteStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.DELETE_STATUS.ACTION, ({ id, newStatusId }) => ({ id, newStatusId }))\r\nconst getTagsWithPage = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.GET_TAGS_WITH_PAGE.ACTION, ({ limit, page }) => ({ limit, page }))\r\nconst tagsUpdateCurrentPage = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TAGS_UPDATE_CURRENT_PAGE.ACTION, currentPage => ({ currentPage }))\r\nconst createTag = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.CREATE_TAG.ACTION, ({ name, currentPage }) => ({ name, currentPage }))\r\nconst transferToThirdParty = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.TRANSFER_TO_THIRDPARTY.ACTION, ({ uid }) => ({ uid }))\r\nconst fetchTicketTypes = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_TICKET_TYPES.ACTION)\r\nconst fetchTicketStatus = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions_types__WEBPACK_IMPORTED_MODULE_0__.FETCH_STATUS.ACTION)\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/actions/tickets.js?");
/***/ }),
@@ -1885,7 +1896,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 1/20/19 4:46 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n(axios__WEBPACK_IMPORTED_MODULE_0___default().defaults.headers.post[\"Content-Type\"]) = 'application/json'\r\nconst token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\r\n;(axios__WEBPACK_IMPORTED_MODULE_0___default().defaults.headers[\"CSRF-TOKEN\"]) = token\r\n\r\nconst api = {}\r\n\r\napi.dashboard = {}\r\napi.dashboard.getData = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/stats/${timespan}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getTopGroups = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/count/topgroups/${timespan}/5`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getTopTags = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/count/tags/${timespan}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getOverdueTickets = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/overdue').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets = {}\r\napi.tickets.getWithPage = payload => {\r\n const limit = payload.limit ? payload.limit : 50\r\n const page = payload.page ? payload.page : 0\r\n const type = payload.type ? payload.type : 'all'\r\n const filter = payload.filter ? encodeURIComponent(JSON.stringify(payload.filter, null, 2)) : undefined\r\n const fullFilter = filter ? `&filter=${filter}` : undefined\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/tickets?type=${type}&page=${page}&limit=${limit}${fullFilter}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.search = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/search/?search=${payload.searchString}&limit=100`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/create', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.delete = ({ id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/tickets/${id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.renameTicketType = (id, name) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/tickets/types/' + id, { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createTicketType = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/types/create', { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.addPriorityToType = ({ typeId, priority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/type/${typeId}/addpriority`, {\r\n priority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.removePriorityFromType = ({ typeId, priority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/type/${typeId}/removepriority`, {\r\n priority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deleteTicketType = ({ id, newTypeId }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/tickets/types/${id}`, { data: { newTypeId } }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.fetchPriorities = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/priorities').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.createPriority = ({ name, overdueIn, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/priority/create', {\r\n name,\r\n overdueIn,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.updatePriority = ({ id, name, overdueIn, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/tickets/priority/${id}`, {\r\n name,\r\n overdueIn,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createStatus = ({ name, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/status/create', {\r\n name,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.updateStatus = ({ id, name, htmlColor, isResolved, slatimer }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/tickets/status/${id}`, {\r\n name,\r\n htmlColor,\r\n isResolved,\r\n slatimer\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.getStatus = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/status').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deleteStatus = ({ id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/status/${id}/delete`, {}).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deletePriority = ({ id, newPriority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/priority/${id}/delete`, {\r\n newPriority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.getTagsWithPage = ({ limit, page }) => {\r\n limit = limit ? limit : 10\r\n page = page ? page : 0\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tags/limit?limit=${limit}&page=${page}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createTag = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tags/create`, { tag: name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.transferToThirdParty = ({ uid }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v2/tickets/transfer/${uid}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.fetchTicketTypes = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/tickets/info/types').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts = {}\r\napi.accounts.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/accounts', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts.getWithPage = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 25\r\n const page = payload && payload.page ? payload.page : 0\r\n const type = payload && payload.type ? payload.type : 'all'\r\n let search = payload && payload.search ? payload.search : ''\r\n if (search) search = `&search=${search}`\r\n const showDeleted = payload && payload.showDeleted ? payload.showDeleted : false\r\n\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/accounts?type=${type}&limit=${limit}&page=${page}${search}&showDeleted=${showDeleted}`)\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.updateUser = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/accounts/${payload.username}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.deleteAccount = ({ username }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/users/${username}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.enableAccount = ({ username }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/users/${username}/enable`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts.saveProfile = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/accounts/profile`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.generateMFA = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v2/accounts/profile/mfa`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.groups = {}\r\napi.groups.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/groups', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.get = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 1000\r\n const page = payload && payload.page ? payload.page : 0\r\n const type = payload && payload.type ? `&type=${payload.type}` : ''\r\n\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/groups?limit=${limit}&page=${page}${type}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/groups/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/groups/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.teams = {}\r\napi.teams.getWithPage = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 100\r\n const page = payload && payload.page ? payload.page : 0\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/teams?limit=${limit}&page=${page}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/teams', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.updateTeam = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/teams/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.deleteTeam = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/teams/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.departments = {}\r\napi.departments.get = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/departments').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/departments', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/departments/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/departments/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.messages = {}\r\napi.messages.getConversations = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/messages/conversations').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.getSingleConversation = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/messages/conversations/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.deleteConversation = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/messages/conversation/${payload.convoId}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.send = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/messages/send', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices = {}\r\napi.notices.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/notices', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.get = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/notices').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/notices/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/notices/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.reports = {}\r\napi.reports.generate = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/reports/generate/${payload.type}`, payload)\r\n}\r\n\r\napi.search = {}\r\napi.search.search = ({ limit, term }) => {\r\n const l = limit || 25\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/es/search?limit=${l}&q=${term}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.settings = {}\r\napi.settings.update = settings => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/settings', settings).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.hasMongoDBTools = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backup/hastools').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.fetchBackups = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backups').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.backupNow = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/backup').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.getBackups = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backups').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.fetchDeletedTickets = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/deleted').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.restoreDeletedTicket = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/deleted/restore', { _id }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.permDeleteTicket = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/tickets/deleted/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.updateRoleOrder = ({ roleOrder }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/settings/updateroleorder', {\r\n roleOrder\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.updatePermissions = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/roles/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.createRole = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/roles', { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.deleteRole = ({ _id, newRoleId }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/roles/${_id}`, { data: { newRoleId } }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.buildSass = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/settings/buildsass`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.common = {}\r\napi.common.getSessionUser = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/login').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.common.fetchRoles = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/roles').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.common.fetchViewData = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/viewdata').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (api);\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/api/index.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ 46);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 1/20/19 4:46 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n(axios__WEBPACK_IMPORTED_MODULE_0___default().defaults.headers.post[\"Content-Type\"]) = 'application/json'\r\nconst token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\r\n;(axios__WEBPACK_IMPORTED_MODULE_0___default().defaults.headers[\"CSRF-TOKEN\"]) = token\r\n\r\nconst api = {}\r\n\r\napi.dashboard = {}\r\napi.dashboard.getData = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/stats/${timespan}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getTopGroups = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/count/topgroups/${timespan}/5`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getTopTags = payload => {\r\n const timespan = payload.timespan || 30\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/count/tags/${timespan}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.dashboard.getOverdueTickets = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/overdue').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets = {}\r\napi.tickets.getWithPage = payload => {\r\n const limit = payload.limit ? payload.limit : 50\r\n const page = payload.page ? payload.page : 0\r\n const type = payload.type ? payload.type : 'all'\r\n const filter = payload.filter ? encodeURIComponent(JSON.stringify(payload.filter, null, 2)) : undefined\r\n const fullFilter = filter ? `&filter=${filter}` : undefined\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/tickets?type=${type}&page=${page}&limit=${limit}${fullFilter}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.search = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tickets/search/?search=${payload.searchString}&limit=100`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/create', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.delete = ({ id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/tickets/${id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.renameTicketType = (id, name) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/tickets/types/' + id, { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createTicketType = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/types/create', { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.addPriorityToType = ({ typeId, priority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/type/${typeId}/addpriority`, {\r\n priority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.removePriorityFromType = ({ typeId, priority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/type/${typeId}/removepriority`, {\r\n priority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deleteTicketType = ({ id, newTypeId }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/tickets/types/${id}`, { data: { newTypeId } }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.fetchPriorities = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/priorities').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.createPriority = ({ name, overdueIn, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/priority/create', {\r\n name,\r\n overdueIn,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.updatePriority = ({ id, name, overdueIn, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/tickets/priority/${id}`, {\r\n name,\r\n overdueIn,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createStatus = ({ name, htmlColor }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/status/create', {\r\n name,\r\n htmlColor\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.updateStatus = ({ id, name, htmlColor, isResolved, slatimer }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/tickets/status/${id}`, {\r\n name,\r\n htmlColor,\r\n isResolved,\r\n slatimer\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.tickets.getStatus = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/status').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deleteStatus = ({ id, newStatusId }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/status/${id}/delete`, { newStatusId }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.deletePriority = ({ id, newPriority }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tickets/priority/${id}/delete`, {\r\n newPriority\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.getTagsWithPage = ({ limit, page }) => {\r\n limit = limit ? limit : 10\r\n page = page ? page : 0\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/tags/limit?limit=${limit}&page=${page}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.createTag = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/tags/create`, { tag: name }).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.transferToThirdParty = ({ uid }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v2/tickets/transfer/${uid}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.tickets.fetchTicketTypes = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/tickets/info/types').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts = {}\r\napi.accounts.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/accounts', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts.getWithPage = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 25\r\n const page = payload && payload.page ? payload.page : 0\r\n const type = payload && payload.type ? payload.type : 'all'\r\n let search = payload && payload.search ? payload.search : ''\r\n if (search) search = `&search=${search}`\r\n const showDeleted = payload && payload.showDeleted ? payload.showDeleted : false\r\n\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/accounts?type=${type}&limit=${limit}&page=${page}${search}&showDeleted=${showDeleted}`)\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.updateUser = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/accounts/${payload.username}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.deleteAccount = ({ username }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/users/${username}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.enableAccount = ({ username }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/users/${username}/enable`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.accounts.saveProfile = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/accounts/profile`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.accounts.generateMFA = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v2/accounts/profile/mfa`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.groups = {}\r\napi.groups.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/groups', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.get = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 1000\r\n const page = payload && payload.page ? payload.page : 0\r\n const type = payload && payload.type ? `&type=${payload.type}` : ''\r\n\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/groups?limit=${limit}&page=${page}${type}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/groups/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.groups.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/groups/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.teams = {}\r\napi.teams.getWithPage = payload => {\r\n const limit = payload && payload.limit ? payload.limit : 100\r\n const page = payload && payload.page ? payload.page : 0\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/teams?limit=${limit}&page=${page}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/teams', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.updateTeam = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/teams/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.teams.deleteTeam = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/teams/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.departments = {}\r\napi.departments.get = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/departments').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/departments', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/departments/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.departments.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/departments/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.messages = {}\r\napi.messages.getConversations = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/messages/conversations').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.getSingleConversation = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/messages/conversations/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.deleteConversation = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/messages/conversation/${payload.convoId}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.messages.send = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/messages/send', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices = {}\r\napi.notices.create = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v2/notices', payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.get = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/notices').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.update = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v2/notices/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.notices.delete = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/notices/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.reports = {}\r\napi.reports.generate = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post(`/api/v1/reports/generate/${payload.type}`, payload)\r\n}\r\n\r\napi.search = {}\r\napi.search.search = ({ limit, term }) => {\r\n const l = limit || 25\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v2/es/search?limit=${l}&q=${term}`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.settings = {}\r\napi.settings.update = settings => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/settings', settings).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.hasMongoDBTools = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backup/hastools').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.fetchBackups = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backups').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.backupNow = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/backup').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.getBackups = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/backups').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.fetchDeletedTickets = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/tickets/deleted').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.restoreDeletedTicket = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/tickets/deleted/restore', { _id }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.permDeleteTicket = ({ _id }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v2/tickets/deleted/${_id}`).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.updateRoleOrder = ({ roleOrder }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put('/api/v1/settings/updateroleorder', {\r\n roleOrder\r\n })\r\n .then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.updatePermissions = payload => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().put(`/api/v1/roles/${payload._id}`, payload).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.createRole = ({ name }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().post('/api/v1/roles', { name }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.deleteRole = ({ _id, newRoleId }) => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default()[\"delete\"](`/api/v1/roles/${_id}`, { data: { newRoleId } }).then(res => {\r\n return res.data\r\n })\r\n}\r\napi.settings.buildSass = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get(`/api/v1/settings/buildsass`).then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\napi.common = {}\r\napi.common.getSessionUser = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/login').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.common.fetchRoles = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v1/roles').then(res => {\r\n return res.data\r\n })\r\n}\r\napi.common.fetchViewData = () => {\r\n return axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/v2/viewdata').then(res => {\r\n return res.data\r\n })\r\n}\r\n\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (api);\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/api/index.js?");
/***/ }),
@@ -2105,7 +2116,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var immutable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immutable */ 1103);\n/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-actions */ 1104);\n/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isUndefined */ 506);\n/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! actions/types */ 40);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 4/1/19 2:02 AM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst initialState = {\r\n tickets: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n ticketStatuses: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n loadingTicketTypes: false,\r\n types: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n totalCount: '',\r\n viewType: 'active',\r\n loading: false,\r\n nextPage: 1,\r\n prevPage: 0\r\n}\r\n\r\n// Util function until custom views are finished\r\nfunction hasInView (view, status, assignee, userId, userGroupIds, groupId) {\r\n let hasView = false\r\n let hasGroup = false\r\n switch (view) {\r\n case 'filter':\r\n hasView = true\r\n break\r\n case 'all':\r\n hasView = [0, 1, 2, 3].indexOf(status) !== -1\r\n break\r\n case 'active':\r\n hasView = [0, 1, 2].indexOf(status) !== -1\r\n break\r\n case 'assigned':\r\n hasView = assignee === userId\r\n break\r\n case 'unassigned':\r\n hasView = lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(assignee)\r\n break\r\n case 'new':\r\n hasView = status === 0\r\n break\r\n case 'open':\r\n hasView = status === 1\r\n break\r\n case 'pending':\r\n hasView = status === 2\r\n break\r\n case 'closed':\r\n hasView = status === 3\r\n break\r\n default:\r\n hasView = false\r\n }\r\n\r\n if (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(userGroupIds) || lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(groupId)) hasGroup = false\r\n else hasGroup = userGroupIds.indexOf(groupId) !== -1\r\n\r\n return hasGroup && hasView\r\n}\r\n\r\nconst reducer = (0,redux_actions__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\r\n {\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.PENDING]: (state, action) => {\r\n return {\r\n ...state,\r\n viewType: action.payload.type,\r\n loading: true\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n tickets: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.tickets || []),\r\n prevPage: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.prevPage),\r\n nextPage: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.nextPage),\r\n totalCount: action.response.totalCount\r\n ? (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.totalCount.toString())\r\n : action.response.tickets.length.toString(),\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.ERROR]: state => {\r\n return {\r\n ...state,\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.CREATE_TICKET.SUCCESS]: state => {\r\n // This is handle with a socket.io event...\r\n return { ...state }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.DELETE_TICKET.SUCCESS]: (state, action) => {\r\n const idx = state.tickets.findIndex(ticket => {\r\n return ticket.get('_id').toString() === action.payload.id.toString()\r\n })\r\n\r\n if (idx === -1) return { ...state }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.TICKET_EVENT.SUCCESS]: (state, action) => {\r\n const type = action.payload.type\r\n switch (type) {\r\n case 'created': {\r\n const ticket = action.payload.data\r\n return {\r\n ...state,\r\n tickets: state.tickets.insert(0, (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n }\r\n }\r\n case 'deleted': {\r\n const id = action.payload.data\r\n const idx = state.tickets.findIndex(ticket => {\r\n return ticket.get('_id').toString() === id.toString()\r\n })\r\n if (idx === -1) return { ...state }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n }\r\n default:\r\n return {\r\n ...state\r\n }\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.TICKET_UPDATED.SUCCESS]: (state, action) => {\r\n const ticket = action.payload.ticket\r\n const userGroupIds = action.sessionUser.groups\r\n\r\n const idx = state.tickets.findIndex(t => {\r\n return t.get('_id') === ticket._id\r\n })\r\n\r\n const inView = hasInView(\r\n state.viewType,\r\n ticket.status,\r\n ticket.assignee ? ticket.assignee._id : undefined,\r\n action.sessionUser._id,\r\n userGroupIds,\r\n ticket.group._id\r\n )\r\n\r\n if (!inView && idx !== -1) {\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n }\r\n\r\n if (!inView) return { ...state }\r\n\r\n if (idx === -1) {\r\n const withTicket = state.tickets.push((0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n return {\r\n ...state,\r\n tickets: withTicket.sortBy(t => -t.get('uid'))\r\n }\r\n }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.set(idx, (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.UNLOAD_TICKETS.SUCCESS]: state => {\r\n return {\r\n ...state,\r\n tickets: state.tickets.clear(),\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKET_TYPES.PENDING]: state => {\r\n return {\r\n ...state,\r\n loadingTicketTypes: true\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKET_TYPES.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n loadingTicketTypes: false,\r\n types: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.ticketTypes),\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.priorities)\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_STATUS.PENDING]: state => {\r\n return {\r\n ...state,\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_STATUS.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n ticketStatuses: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.status),\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_PRIORITIES.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.priorities)\r\n }\r\n }\r\n },\r\n initialState\r\n)\r\n\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer);\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/reducers/ticketsReducer.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var immutable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immutable */ 1103);\n/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-actions */ 1104);\n/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isUndefined */ 506);\n/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! actions/types */ 40);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 4/1/19 2:02 AM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst initialState = {\r\n tickets: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n ticketStatuses: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n loadingTicketTypes: false,\r\n types: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.List)([]),\r\n totalCount: '',\r\n viewType: 'active',\r\n loading: false,\r\n nextPage: 1,\r\n prevPage: 0\r\n}\r\n\r\n// Util function until custom views are finished\r\nfunction hasInView (state, view, statusId, assignee, userId, userGroupIds, groupId) {\r\n let hasView = false\r\n let hasGroup = false\r\n const unresolvedStatuses = state.ticketStatuses.filter(i => i.get('isResolved') === false)\r\n const status = state.ticketStatuses.find(i => i.get('_id') === statusId)\r\n\r\n switch (view) {\r\n case 'filter':\r\n hasView = true\r\n break\r\n case 'all':\r\n hasView = state.ticketStatuses.findIndex(s => s.get('_id') === statusId) !== -1\r\n break\r\n case 'active':\r\n hasView = unresolvedStatuses.findIndex(s => s.get('_id') === statusId) !== -1\r\n break\r\n case 'assigned':\r\n hasView = assignee === userId\r\n break\r\n case 'unassigned':\r\n hasView = lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(assignee)\r\n break\r\n default:\r\n hasView = false\r\n }\r\n\r\n if (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(userGroupIds) || lodash_isUndefined__WEBPACK_IMPORTED_MODULE_0___default()(groupId)) hasGroup = false\r\n else hasGroup = userGroupIds.indexOf(groupId) !== -1\r\n\r\n return hasGroup && hasView\r\n}\r\n\r\nconst reducer = (0,redux_actions__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\r\n {\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.PENDING]: (state, action) => {\r\n return {\r\n ...state,\r\n viewType: action.payload.type,\r\n loading: true\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n tickets: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.tickets || []),\r\n prevPage: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.prevPage),\r\n nextPage: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.nextPage),\r\n totalCount: action.response.totalCount\r\n ? (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.totalCount.toString())\r\n : action.response.tickets.length.toString(),\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKETS.ERROR]: state => {\r\n return {\r\n ...state,\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.CREATE_TICKET.SUCCESS]: state => {\r\n // This is handle with a socket.io event...\r\n return { ...state }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.DELETE_TICKET.SUCCESS]: (state, action) => {\r\n const idx = state.tickets.findIndex(ticket => {\r\n return ticket.get('_id').toString() === action.payload.id.toString()\r\n })\r\n\r\n if (idx === -1) return { ...state }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.TICKET_EVENT.SUCCESS]: (state, action) => {\r\n const type = action.payload.type\r\n switch (type) {\r\n case 'created': {\r\n const ticket = action.payload.data\r\n return {\r\n ...state,\r\n tickets: state.tickets.insert(0, (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n }\r\n }\r\n case 'deleted': {\r\n const id = action.payload.data\r\n const idx = state.tickets.findIndex(ticket => {\r\n return ticket.get('_id').toString() === id.toString()\r\n })\r\n if (idx === -1) return { ...state }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n }\r\n default:\r\n return {\r\n ...state\r\n }\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.TICKET_UPDATED.SUCCESS]: (state, action) => {\r\n const ticket = action.payload.ticket\r\n const userGroupIds = action.sessionUser.groups\r\n\r\n const idx = state.tickets.findIndex(t => {\r\n return t.get('_id') === ticket._id\r\n })\r\n\r\n ticket.status = state.ticketStatuses.find(i => i.get('_id') === ticket.status)\r\n\r\n const inView = hasInView(\r\n state,\r\n state.viewType,\r\n ticket.status.get('_id'),\r\n ticket.assignee ? ticket.assignee._id : undefined,\r\n action.sessionUser._id,\r\n userGroupIds,\r\n ticket.group._id\r\n )\r\n\r\n if (!inView && idx !== -1) {\r\n return {\r\n ...state,\r\n tickets: state.tickets.delete(idx)\r\n }\r\n }\r\n\r\n if (!inView) return { ...state }\r\n\r\n if (idx === -1) {\r\n const withTicket = state.tickets.push((0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n return {\r\n ...state,\r\n tickets: withTicket.sortBy(t => -t.get('uid'))\r\n }\r\n }\r\n\r\n return {\r\n ...state,\r\n tickets: state.tickets.set(idx, (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(ticket))\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.UNLOAD_TICKETS.SUCCESS]: state => {\r\n return {\r\n ...state,\r\n tickets: state.tickets.clear(),\r\n loading: false\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKET_TYPES.PENDING]: state => {\r\n return {\r\n ...state,\r\n loadingTicketTypes: true\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_TICKET_TYPES.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n loadingTicketTypes: false,\r\n types: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.ticketTypes),\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.priorities)\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_STATUS.PENDING]: state => {\r\n return {\r\n ...state\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_STATUS.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n ticketStatuses: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.status)\r\n }\r\n },\r\n\r\n [actions_types__WEBPACK_IMPORTED_MODULE_1__.FETCH_PRIORITIES.SUCCESS]: (state, action) => {\r\n return {\r\n ...state,\r\n priorities: (0,immutable__WEBPACK_IMPORTED_MODULE_2__.fromJS)(action.response.priorities)\r\n }\r\n }\r\n },\r\n initialState\r\n)\r\n\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer);\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/reducers/ticketsReducer.js?");
/***/ }),
@@ -2248,7 +2259,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ watcher)\n/* harmony export */ });\n/* harmony import */ var redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux-saga/effects */ 57);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../api */ 52);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../actions/types */ 40);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_5__);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 11:58 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst getSessionUser = state => state.shared.sessionUser\r\n\r\nfunction * fetchTickets ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.PENDING, payload })\r\n try {\r\n let response = null\r\n if (payload.type === 'search') response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.search, payload)\r\n else response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getWithPage, payload)\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.ERROR, error })\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n }\r\n}\r\n\r\nfunction * createTicket ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.create, payload)\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.SUCCESS, response, sessionUser })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteTicket ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets[\"delete\"], payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.SUCCESS, payload, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.ERROR, error })\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n }\r\n}\r\n\r\nfunction * unloadThunk ({ payload, meta }) {\r\n try {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UNLOAD_TICKETS.SUCCESS, payload, meta })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * ticketUpdated ({ payload }) {\r\n try {\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_UPDATED.SUCCESS, payload, sessionUser })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * ticketEvent ({ payload }) {\r\n try {\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_EVENT.SUCCESS, payload, sessionUser })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * createTicketType ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createTicketType, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteTicketType ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deleteTicketType, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * getTagsWithPage ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getTagsWithPage, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.SUCCESS, response })\r\n } catch (error) {\r\n if (!error.response) return _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchPriorities ({ payload, meta }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.fetchPriorities, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.SUCCESS, response, meta })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createPriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createPriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * updatePriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.updatePriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createStatus ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * updateStatus ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.updateStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\n\r\nfunction * deletePriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deletePriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteStatus ({ payload }) {\r\n try {\r\n console.log(payload);\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deleteStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createTag ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createTag, { name: payload.name })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n if (!(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isUndefined)(payload.currentPage)) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ACTION, payload: { limit: 16, page: payload.currentPage } })\r\n }\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Tag ${payload.name} successfully created`)\r\n } catch (error) {\r\n if (!error.response) return _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * transferToThirdParty ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.transferToThirdParty, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.SUCCESS, response })\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Ticket Transferred Successfully`, false)\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchTicketTypes ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.PENDING })\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.fetchTicketTypes, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchTicketStatus ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.PENDING })\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\n\r\n\r\nfunction * watcher () {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.ACTION, fetchTickets)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.ACTION, createTicket)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.ACTION, deleteTicket)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UNLOAD_TICKETS.ACTION, unloadThunk)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_UPDATED.ACTION, ticketUpdated)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_EVENT.ACTION, ticketEvent)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.ACTION, createTicketType)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.ACTION, deleteTicketType)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.ACTION, fetchPriorities)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.ACTION, createPriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.ACTION, updatePriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.ACTION, createStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.ACTION, updateStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.ACTION, fetchTicketStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.ACTION, deletePriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ACTION, getTagsWithPage)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.ACTION, createTag)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.ACTION, transferToThirdParty)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.ACTION, fetchTicketTypes)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.ACTION, deleteStatus)\r\n}\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/sagas/tickets/index.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ watcher)\n/* harmony export */ });\n/* harmony import */ var redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux-saga/effects */ 57);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 6);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ 41);\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../api */ 52);\n/* harmony import */ var actions_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../actions/types */ 40);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lib/helpers */ 10);\n/* harmony import */ var lib_helpers__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lib_helpers__WEBPACK_IMPORTED_MODULE_5__);\n/*\r\n * . .o8 oooo\r\n * .o8 \"888 `888\r\n * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo\r\n * 888 `888\"\"8P `888 `888 d88' `888 d88' `88b d88( \"8 888 .8P'\r\n * 888 888 888 888 888 888 888ooo888 `\"Y88b. 888888.\r\n * 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b.\r\n * \"888\" d888b `V88V\"V8P' `Y8bod88P\" `Y8bod8P' 8\"\"888P' o888o o888o\r\n * ========================================================================\r\n * Author: Chris Brame\r\n * Updated: 2/3/19 11:58 PM\r\n * Copyright (c) 2014-2019. All rights reserved.\r\n */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst getSessionUser = state => state.shared.sessionUser\r\n\r\nfunction * fetchTickets ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.PENDING, payload })\r\n try {\r\n let response = null\r\n if (payload.type === 'search') response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.search, payload)\r\n else response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getWithPage, payload)\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.ERROR, error })\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n }\r\n}\r\n\r\nfunction * createTicket ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.create, payload)\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.SUCCESS, response, sessionUser })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteTicket ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets[\"delete\"], payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.SUCCESS, payload, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.ERROR, error })\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n }\r\n}\r\n\r\nfunction * unloadThunk ({ payload, meta }) {\r\n try {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UNLOAD_TICKETS.SUCCESS, payload, meta })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * ticketUpdated ({ payload }) {\r\n try {\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_UPDATED.SUCCESS, payload, sessionUser })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * ticketEvent ({ payload }) {\r\n try {\r\n const sessionUser = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.select)(getSessionUser)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_EVENT.SUCCESS, payload, sessionUser })\r\n } catch (error) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n }\r\n}\r\n\r\nfunction * createTicketType ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createTicketType, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteTicketType ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deleteTicketType, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * getTagsWithPage ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getTagsWithPage, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.SUCCESS, response })\r\n } catch (error) {\r\n if (!error.response) return _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchPriorities ({ payload, meta }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.fetchPriorities, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.SUCCESS, response, meta })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createPriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createPriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * updatePriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.updatePriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createStatus ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * updateStatus ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.updateStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deletePriority ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deletePriority, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * deleteStatus ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.deleteStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_SETTINGS.ACTION })\r\n } catch (error) {\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error.response)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * createTag ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.createTag, { name: payload.name })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.SUCCESS, response })\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.HIDE_MODAL.ACTION })\r\n if (!(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isUndefined)(payload.currentPage)) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ACTION, payload: { limit: 16, page: payload.currentPage } })\r\n }\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Tag ${payload.name} successfully created`)\r\n } catch (error) {\r\n if (!error.response) return _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(error)\r\n const errorText = error.response.data.error\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * transferToThirdParty ({ payload }) {\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.transferToThirdParty, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.SUCCESS, response })\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Ticket Transferred Successfully`, false)\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchTicketTypes ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.PENDING })\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.fetchTicketTypes, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * fetchTicketStatus ({ payload }) {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.PENDING })\r\n try {\r\n const response = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(_api__WEBPACK_IMPORTED_MODULE_3__[\"default\"].tickets.getStatus, payload)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.SUCCESS, response })\r\n } catch (error) {\r\n const errorText = error.response ? error.response.data.error : error\r\n if (error.response && error.response.status !== (401 || 0)) {\r\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(errorText, error)\r\n lib_helpers__WEBPACK_IMPORTED_MODULE_5___default().UI.showSnackbar(`Error: ${errorText}`, true)\r\n }\r\n\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.put)({ type: actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.ERROR, error })\r\n }\r\n}\r\n\r\nfunction * watcher () {\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKETS.ACTION, fetchTickets)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET.ACTION, createTicket)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET.ACTION, deleteTicket)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UNLOAD_TICKETS.ACTION, unloadThunk)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_UPDATED.ACTION, ticketUpdated)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeEvery)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TICKET_EVENT.ACTION, ticketEvent)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TICKET_TYPE.ACTION, createTicketType)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_TICKET_TYPE.ACTION, deleteTicketType)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_PRIORITIES.ACTION, fetchPriorities)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_PRIORITY.ACTION, createPriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_PRIORITY.ACTION, updatePriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_STATUS.ACTION, createStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.UPDATE_STATUS.ACTION, updateStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_STATUS.ACTION, fetchTicketStatus)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_PRIORITY.ACTION, deletePriority)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.GET_TAGS_WITH_PAGE.ACTION, getTagsWithPage)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.CREATE_TAG.ACTION, createTag)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.TRANSFER_TO_THIRDPARTY.ACTION, transferToThirdParty)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.FETCH_TICKET_TYPES.ACTION, fetchTicketTypes)\r\n yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.takeLatest)(actions_types__WEBPACK_IMPORTED_MODULE_4__.DELETE_STATUS.ACTION, deleteStatus)\r\n}\r\n\n\n//# sourceURL=webpack://trudesk/./src/client/sagas/tickets/index.js?");
/***/ }),
diff --git a/public/js/5.js.gz b/public/js/5.js.gz
index b52193f81..b50b8002a 100644
Binary files a/public/js/5.js.gz and b/public/js/5.js.gz differ
diff --git a/src/backup/backup.js b/src/backup/backup.js
index e4e265812..1d59d5433 100644
--- a/src/backup/backup.js
+++ b/src/backup/backup.js
@@ -25,9 +25,10 @@ const pkg = require('../../package.json')
global.env = process.env.NODE_ENV || 'production'
let CONNECTION_URI = null
+let FILENAME = null
function createZip (callback) {
- const filename = 'trudesk-v' + pkg.version + '-' + moment().format('MMDDYYYY_HHmm') + '.zip'
+ const filename = FILENAME
const output = fs.createWriteStream(path.join(__dirname, '../../backups/', filename))
const archive = archiver('zip', {
zlib: { level: 9 }
@@ -124,6 +125,7 @@ function runBackup (callback) {
;(function () {
CONNECTION_URI = process.env.MONGOURI
+ FILENAME = process.env.FILENAME || 'trudesk-v' + pkg.version + '-' + moment().format('MMDDYYYY_HHmm') + '.zip'
if (!CONNECTION_URI) return process.send({ error: { message: 'Invalid connection uri' } })
const options = {
@@ -151,9 +153,8 @@ function runBackup (callback) {
runBackup(function (err) {
if (err) return process.send({ success: false, error: err })
- const filename = 'trudesk-' + moment().format('MMDDYYYY_HHmm') + '.zip'
- winston.info('Backup completed successfully: ' + filename)
+ winston.info('Backup completed successfully: ' + FILENAME)
process.send({ success: true })
})
})
diff --git a/src/client/actions/tickets.js b/src/client/actions/tickets.js
index 09048c8fb..5556b72a8 100644
--- a/src/client/actions/tickets.js
+++ b/src/client/actions/tickets.js
@@ -80,10 +80,10 @@ export const updateStatus = createAction(UPDATE_STATUS.ACTION, ({ id, name, html
}))
export const deletePriority = createAction(DELETE_PRIORITY.ACTION, ({ id, newPriority }) => ({ id, newPriority }))
-export const deleteStatus = createAction(DELETE_STATUS.ACTION, (id) => ({ id }))
+export const deleteStatus = createAction(DELETE_STATUS.ACTION, ({ id, newStatusId }) => ({ id, newStatusId }))
export const getTagsWithPage = createAction(GET_TAGS_WITH_PAGE.ACTION, ({ limit, page }) => ({ limit, page }))
export const tagsUpdateCurrentPage = createAction(TAGS_UPDATE_CURRENT_PAGE.ACTION, currentPage => ({ currentPage }))
export const createTag = createAction(CREATE_TAG.ACTION, ({ name, currentPage }) => ({ name, currentPage }))
export const transferToThirdParty = createAction(TRANSFER_TO_THIRDPARTY.ACTION, ({ uid }) => ({ uid }))
export const fetchTicketTypes = createAction(FETCH_TICKET_TYPES.ACTION)
-export const fetchTicketStatus = createAction(FETCH_STATUS.ACTION)
\ No newline at end of file
+export const fetchTicketStatus = createAction(FETCH_STATUS.ACTION)
diff --git a/src/client/api/index.js b/src/client/api/index.js
index 36b031d97..34a4010a4 100644
--- a/src/client/api/index.js
+++ b/src/client/api/index.js
@@ -167,8 +167,8 @@ api.tickets.getStatus = () => {
})
}
-api.tickets.deleteStatus = ({ id }) => {
- return axios.post(`/api/v1/tickets/status/${id}/delete`, {}).then(res => {
+api.tickets.deleteStatus = ({ id, newStatusId }) => {
+ return axios.post(`/api/v1/tickets/status/${id}/delete`, { newStatusId }).then(res => {
return res.data
})
}
diff --git a/src/client/components/Nav/Sidebar/index.jsx b/src/client/components/Nav/Sidebar/index.jsx
index c64b9f1bc..2348b6929 100644
--- a/src/client/components/Nav/Sidebar/index.jsx
+++ b/src/client/components/Nav/Sidebar/index.jsx
@@ -128,31 +128,6 @@ class Sidebar extends React.Component {
href='/tickets/unassigned'
active={activeSubItem === 'tickets-unassigned'}
/>
-