(window.webpackJsonp=window.webpackJsonp||[]).push([[179],{328:function(t,s,a){"use strict";a.r(s);var i={created:function(){this.roleList()},data:function(){return{roles:{},loading:!0,basePath:"storage/",pageAcccess:!0}},methods:{roleList:function(){var t=this;axios.get("/api/roles/").then((function(s){0==t.$can("View Role")&&(t.pageAcccess=!1),0==t.$can("View Role")&&(t.viewPermisson=!1),s.data&&(t.roles=s.data,t.loading=!1)})).catch((function(t){console.log(t)}))}}},e=a(3),o=Object(e.a)(i,(function(){var t=this,s=t._self._c;return s("div",[s("admin-main"),t._v(" "),s("div",{staticClass:"content-wrapper"},[s("section",{staticClass:"content-header"},[s("h1",[s("router-link",{staticClass:"btn btn-primary",attrs:{to:{name:"roleAdd"}}},[s("i",{staticClass:"fa fa-plus"}),t._v(" "),s("span",{staticClass:"title_added_back"},[t._v("Add Role")])])],1),t._v(" "),t._m(0)]),t._v(" "),s("section",{staticClass:"content"},[s("div",{staticClass:"row justify-content-center"},[s("div",{staticClass:"col-12"},[s("div",{staticClass:"box box-primary"},[t._m(1),t._v(" "),s("div",{staticClass:"box-body"},[s("div",{staticClass:"tables_section"},[s("table",{staticClass:"all_tables_style"},[t._m(2),t._v(" "),s("tbody",[t.loading?s("h1",{staticClass:"text-center"},[s("i",{staticClass:"fa fa-spin fa-spinner"})]):t._e(),t._v(" "),t._l(t.roles,(function(a,i){return s("tr",{key:i},[s("td",{attrs:{scope:"row"}},[t._v(t._s(i+1))]),t._v(" "),s("td",[t._v(t._s(a.name))]),t._v(" "),s("td",[s("router-link",{staticClass:"btn btn-success btn-sm",attrs:{to:{name:"editAdmin",params:{adminId:a.id}}}},[t._v("Edit")]),t._v(" "),s("router-link",{staticClass:"btn btn-primary btn-sm",attrs:{to:{name:"EditPermissions",params:{id:a.id}}}},[t._v("Permissions ")])],1)])}))],2)])])]),t._v(" "),s("div",{staticClass:"box-footer"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-6"}),t._v(" "),s("div",{staticClass:"col-lg-6 mt-1",staticStyle:{"margin-top":"25px","text-align":"right"}},[s("p",[t._v("Showing "),s("strong",[t._v(t._s(t.roles.from))]),t._v(" to\n                                            "),s("strong",[t._v(t._s(t.roles.to))]),t._v(" of total\n                                            "),s("strong",[t._v(t._s(t.roles.total))]),t._v(" entries\n                                        ")])])])])])])])])])],1)}),[function(){var t=this._self._c;return t("ol",{staticClass:"breadcrumb"},[t("li",[t("a",{attrs:{href:"#"}},[t("i",{staticClass:"fa fa-dashboard"}),this._v("Dashboard")])]),this._v(" "),t("li",{staticClass:"active"},[this._v("Role")])])},function(){var t=this._self._c;return t("div",{staticClass:"box-header with-border"},[t("h3",{staticClass:"box-title"},[this._v("Role table")])])},function(){var t=this._self._c;return t("thead",[t("tr",[t("th",{attrs:{scope:"col"}},[this._v("#")]),this._v(" "),t("th",{attrs:{scope:"col"}},[this._v("Name")]),this._v(" "),t("th",{attrs:{scope:"col"}},[this._v("Action")])])])}],!1,null,null,null);s.default=o.exports}}]);