text: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[45],{
  
  /***/ "./resources/js/Back-Office/Role/index.js":
  /*!************************************************!*\
    !*** ./resources/js/Back-Office/Role/index.js ***!
    \************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
  /* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-bootstrap */ "./node_modules/react-bootstrap/esm/index.js");
  /* harmony import */ var _hoc_Aux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hoc/_Aux */ "./resources/js/hoc/_Aux/index.js");
  /* harmony import */ var pnotify_dist_es_PNotify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! pnotify/dist/es/PNotify */ "./node_modules/pnotify/dist/es/PNotify.js");
  /* harmony import */ var _HttpFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../HttpFunctions */ "./resources/js/HttpFunctions.js");
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_6__);
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _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); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  function _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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  
  function _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); }; }
  
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  
  function _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; } }
  
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  
  
  
  
  
  
  
  window.jQuery = jquery__WEBPACK_IMPORTED_MODULE_6___default.a;
  window.$ = jquery__WEBPACK_IMPORTED_MODULE_6___default.a;
  global.jQuery = jquery__WEBPACK_IMPORTED_MODULE_6___default.a;
  jquery__WEBPACK_IMPORTED_MODULE_6___default.a.DataTable = __webpack_require__(/*! datatables.net-bs */ "./node_modules/datatables.net-bs/js/dataTables.bootstrap.js");
  
  __webpack_require__(/*! jszip */ "./node_modules/jszip/dist/jszip.min.js"); //require('pdfmake/build/pdfmake.js');
  //require('pdfmake/build/vfs_fonts.js');
  
  
  __webpack_require__(/*! datatables.net-autofill */ "./node_modules/datatables.net-autofill/js/dataTables.autoFill.js");
  
  __webpack_require__(/*! datatables.net-buttons-bs */ "./node_modules/datatables.net-buttons-bs/js/buttons.bootstrap.js");
  
  __webpack_require__(/*! datatables.net-buttons/js/buttons.colVis.js */ "./node_modules/datatables.net-buttons/js/buttons.colVis.js");
  
  __webpack_require__(/*! datatables.net-buttons/js/buttons.flash.js */ "./node_modules/datatables.net-buttons/js/buttons.flash.js");
  
  __webpack_require__(/*! datatables.net-buttons/js/buttons.html5.js */ "./node_modules/datatables.net-buttons/js/buttons.html5.js");
  
  __webpack_require__(/*! datatables.net-buttons/js/buttons.print.js */ "./node_modules/datatables.net-buttons/js/buttons.print.js");
  
  __webpack_require__(/*! datatables.net-colreorder */ "./node_modules/datatables.net-colreorder/js/dataTables.colReorder.js");
  
  __webpack_require__(/*! datatables.net-keytable */ "./node_modules/datatables.net-keytable/js/dataTables.keyTable.js");
  
  __webpack_require__(/*! datatables.net-responsive-bs */ "./node_modules/datatables.net-responsive-bs/js/responsive.bootstrap.js");
  
  __webpack_require__(/*! datatables.net-rowgroup */ "./node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.js");
  
  __webpack_require__(/*! datatables.net-rowreorder */ "./node_modules/datatables.net-rowreorder/js/dataTables.rowReorder.js");
  
  __webpack_require__(/*! datatables.net-scroller */ "./node_modules/datatables.net-scroller/js/dataTables.scroller.js");
  
  __webpack_require__(/*! datatables.net-select */ "./node_modules/datatables.net-select/js/dataTables.select.js");
  
  __webpack_require__(/*! datatables.net-fixedcolumns */ "./node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.js");
  
  __webpack_require__(/*! datatables.net-fixedheader */ "./node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.js");
  
  var _ref = localStorage.getItem('userData') ? JSON.parse(localStorage.getItem('userData')).user : 'Null',
      id = _ref.id,
      auth_token = _ref.auth_token;
  
  var oTable = "";
  
  function atable() {
    var _$$DataTable;
  
    var tableResponsive = '#data-table-responsive';
    oTable = jquery__WEBPACK_IMPORTED_MODULE_6___default()(tableResponsive).DataTable((_$$DataTable = {
      "bStateSave": true,
      "processing": true,
      "bPaginate": true,
      "serverSide": true,
      "bProcessing": true,
      "iDisplayLength": 10,
      "bServerSide": true,
      "sAjaxSource": window.location.origin + '/api/role/'
    }, _defineProperty(_$$DataTable, "bPaginate", true), _defineProperty(_$$DataTable, "fnServerParams", function fnServerParams(aoData) {
      var acolumns = this.fnSettings().aoColumns,
          columns = [];
      jquery__WEBPACK_IMPORTED_MODULE_6___default.a.each(acolumns, function (i, item) {
        columns.push(item.data);
      });
      aoData.push({
        name: 'columns',
        value: columns
      });
  
      if (jquery__WEBPACK_IMPORTED_MODULE_6___default()('input[name="role_name"]').val() != '') {
        aoData.push({
          name: 'role_name',
          value: jquery__WEBPACK_IMPORTED_MODULE_6___default()('input[name="role_name"]').val()
        });
      }
      /*  if($('#status').val()!='') {
            aoData.push({name: 'is_active', value: $('#status').val()});
        }
      */
  
    }), _defineProperty(_$$DataTable, "columns", [{
      "data": "name"
    }, {
      "data": "id"
    }]), _defineProperty(_$$DataTable, "responsive", {
      responsive: {
        details: {
          display: jquery__WEBPACK_IMPORTED_MODULE_6___default.a.fn.dataTable.Responsive.display.childRowImmediate,
          type: ''
        }
      }
    }), _defineProperty(_$$DataTable, "order", [[0, "desc"]]), _defineProperty(_$$DataTable, "lengthMenu", [[10, 25, 50, 100], [10, 25, 50, 100]]), _defineProperty(_$$DataTable, "oLanguage", {
      "sLengthMenu": "_MENU_",
      "oPaginate": {
        "sNext": '<span aria-hidden="true">»</span>',
        "sPrevious": '<span aria-hidden="true">«</span>'
      } // sProcessing: "<img width='33px' src='"+BASE_URL+"assets/layouts/layout/img/ajax-loading.gif'>"
  
    }), _defineProperty(_$$DataTable, "fnInitComplete", function fnInitComplete() {//oTable.fnAdjustColumnSizing();
    }), _defineProperty(_$$DataTable, 'fnServerData', function fnServerData(sSource, aoData, fnCallback) {
      jquery__WEBPACK_IMPORTED_MODULE_6___default.a.ajax({
        'dataType': 'json',
        'type': 'GET',
        'url': sSource,
        'data': aoData,
        'headers': {
          Authorization: "Bearer " + auth_token
        },
        'success': fnCallback
      });
    }), _defineProperty(_$$DataTable, "fnDrawCallback", function fnDrawCallback() {
      jquery__WEBPACK_IMPORTED_MODULE_6___default()('body').css('min-height', jquery__WEBPACK_IMPORTED_MODULE_6___default()('#data-table-responsive tr').length * 50 + 200);
      jquery__WEBPACK_IMPORTED_MODULE_6___default()(window).trigger('resize');
    }), _defineProperty(_$$DataTable, "columnDefs", [{
      "render": function render(data, type, row) {
        var str_buttons = '<button type="button" class="edit btn btn-info btn-sm" data-id="' + row.id + '" ><i style="margin:0px !important;" class="feather icon-edit"></i></button>';
        return [str_buttons].join('');
      },
      "targets": jquery__WEBPACK_IMPORTED_MODULE_6___default()('#data-table-responsive th#action').index(),
      "orderable": false,
      "searchable": false
    }, {
      "targets": 0,
      "orderable": false
    }]), _$$DataTable));
  }
  
  var Role = /*#__PURE__*/function (_React$Component) {
    _inherits(Role, _React$Component);
  
    var _super = _createSuper(Role);
  
    function Role(props) {
      var _this;
  
      _classCallCheck(this, Role);
  
      _this = _super.call(this, props);
      _this.state = {};
      return _this;
    }
  
    _createClass(Role, [{
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this$props = this.props,
            match = _this$props.match,
            location = _this$props.location,
            history = _this$props.history;
        Object(_HttpFunctions__WEBPACK_IMPORTED_MODULE_5__["CheckPermission"])('role', 'show', history);
        atable();
        jquery__WEBPACK_IMPORTED_MODULE_6___default()('#data-table-responsive tbody').on('click', '.edit', function () {
          var id = jquery__WEBPACK_IMPORTED_MODULE_6___default()(this).attr('data-id');
          history.push('/role/edit/' + id);
        });
      }
    }, {
      key: "render",
      value: function render() {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_hoc_Aux__WEBPACK_IMPORTED_MODULE_3__["default"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Row"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Col"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Card"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Card"].Header, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Card"].Title, {
          as: "h5"
        }, "Role"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Button"], {
          style: {
            'float': 'right'
          },
          as: react_router_dom__WEBPACK_IMPORTED_MODULE_1__["Link"],
          to: "/role/add"
        }, "+ Add")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Card"].Body, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Table"], {
          ref: "tbl",
          striped: true,
          hover: true,
          responsive: true,
          className: "table table-condensed",
          id: "data-table-responsive"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
          id: "name"
        }, "Name"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
          id: "action"
        }, "Action"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tfoot", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
          id: "name"
        }, "Name"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
          id: "action"
        }, "Action")))))))));
      }
    }]);
  
    return Role;
  }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);
  
  /* harmony default export */ __webpack_exports__["default"] = (Role);
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  
  /***/ }),
  
  /***/ "./resources/js/HttpFunctions.js":
  /*!***************************************!*\
    !*** ./resources/js/HttpFunctions.js ***!
    \***************************************/
  /*! exports provided: baseurl, CheckPermission, Login, Pemissionlist, RoleAdd */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "baseurl", function() { return baseurl; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckPermission", function() { return CheckPermission; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Login", function() { return Login; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pemissionlist", function() { return Pemissionlist; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoleAdd", function() { return RoleAdd; });
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config */ "./resources/js/config.js");
  /* harmony import */ var pnotify_dist_es_PNotify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! pnotify/dist/es/PNotify */ "./node_modules/pnotify/dist/es/PNotify.js");
  
  
  
  /**
   *  baseurl  get baseurl
   */
  
  var baseurl = window.location.origin;
  /**
   * Login api request
   * @param {*} user for send Credentials
   */
  
  var CheckPermission = function CheckPermission(page, page_name, history) {
    var redirect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
  
    var _ref = localStorage.getItem('userData') ? JSON.parse(localStorage.getItem('userData')).user : 'Null',
        id = _ref.id,
        parmissions = _ref.parmissions;
  
    var pages = parmissions.filter(function (vl, idx) {
      if (Object.keys(vl)[0] == page) {
        return vl;
      }
    });
  
    if (pages.length > 0) {
      var Ischeck = pages[0][page].filter(function (v, i) {
        if (v['page_name'] == page_name) {
          if (v['Ischeck']) {
            return v;
          }
        }
      });
  
      if (Ischeck.length == 0) {
        if (redirect) {
          history.goBack();
        }
  
        pnotify_dist_es_PNotify__WEBPACK_IMPORTED_MODULE_2__["default"].error({
          title: "Permission Error",
          text: _config__WEBPACK_IMPORTED_MODULE_1__["default"].AccessDeniedMessage
        });
        return 1;
      }
    } else {
      history.goBack();
    }
  };
  var Login = function Login(user) {
    return axios__WEBPACK_IMPORTED_MODULE_0___default.a.post(baseurl + '/api/user/login', {
      email: user.email,
      password: user.password,
      remember_me: user.remember
    }, {
      headers: {
        'Content-Type': 'application/json'
      }
    });
  };
  var Pemissionlist = function Pemissionlist(parameter) {
    var _ref2 = localStorage.getItem('userData') ? JSON.parse(localStorage.getItem('userData')).user : 'Null',
        id = _ref2.id,
        auth_token = _ref2.auth_token;
  
    return axios__WEBPACK_IMPORTED_MODULE_0___default.a.post(baseurl + '/api/parmission/list', {
      'id': id
    }, {
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer ' + auth_token
      }
    });
  };
  var RoleAdd = function RoleAdd(role) {
    return axios__WEBPACK_IMPORTED_MODULE_0___default.a.post(baseurl + '/api/role', {
      email: role.email,
      password: role.password,
      remember_me: role.remember
    }, {
      headers: {
        'Content-Type': 'application/json'
      }
    });
  };
  
  /***/ })
  
  }]);