1/*! For license information please see 7251.js.LICENSE.txt */ 2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7251],{90634(t,e,r){r.d(e,{A:()=>i});var n=r(76798),a=r.n(n)()(function(t){return t[1]});a.push([t.id,".profile_wrap[data-v-3210f404]{align-items:center;display:flex}.profile_wrap img[data-v-3210f404]{border-radius:100%;height:40px;margin-right:10px;width:40px}.table td[data-v-3210f404],.table th[data-v-3210f404]{vertical-align:middle}",""]);const i=a},49741(t,e,r){r.d(e,{A:()=>c});function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const s={name:"SettingsSidebar",data:function(){return{developer:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},(0,r(95353).L8)("auth",["user"])),created:function(){this.developer=this.user.roles.includes("developer")},methods:{}},o=s;const c=(0,r(14486).A)(o,function(){var t=this,e=t._self._c;return e("div",{staticClass:"card settings-card no-print"},[e("div",{staticClass:"card-header"},[t._v(t._s(t.$t("Settings")))]),t._v(" "),e("div",{staticClass:"card-body"},[e("ul",{staticClass:"nav flex-column nav-pills m-1"},[t.$can("general-settings")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"setup.general"}}},[e("i",{staticClass:"fas fa-cog"}),t._v("\n "+t._s(t.$t("General Settings"))+"\n ")])],1):t._e(),t._v(" "),t.$can("general-settings")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"setup.mailConfiguration"}}},[e("i",{staticClass:"fas fa-envelope"}),t._v("\n "+t._s(t.$t("Mail Configurations"))+"\n ")])],1):t._e(),t._v(" "),t.$can("general-settings")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"setup.smsConfiguration"}}},[e("i",{staticClass:"fas fa-sms"}),t._v("\n "+t._s(t.$t("SMS Configurations"))+"\n ")])],1):t._e(),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"setup.centralCurrency.index"}}},[e("i",{staticClass:"fas fa-money-check-alt"}),t._v("\n "+t._s(t.$t("Currency Settings"))+"\n ")])],1),t._v(" "),t.$can("payment-settings")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"advanced-settings"}}},[e("i",{staticClass:"fas fa-wallet"}),t._v("\n "+t._s(t.$t("Payment Settings"))+"\n ")])],1):t._e(),t._v(" "),t.$can("user-role")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"roles.index"}}},[e("i",{staticClass:"fas fa-user-lock"}),t._v("\n "+t._s(t.$t("Role & Permissions"))+"\n ")])],1):t._e(),t._v(" "),t.$can("user-management")?e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link thumb",attrs:{to:{name:"user.index"}}},[e("i",{staticClass:"fas fa-user-cog"}),t._v("\n "+t._s(t.$t("User Management"))+"\n ")])],1):t._e()])])])},[],!1,null,null,null).exports},87251(t,e,r){r.r(e),r.d(e,{default:()=>_});var n=r(95353),a=r(72505),i=r.n(a);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function o(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function i(r,n,a,i){var o=n&&n.prototype instanceof l?n:l,u=Object.create(o.prototype);return c(u,"_invoke",function(r,n,a){var i,o,c,l=0,u=a||[],f=!1,p={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return i=e,o=0,c=t,p.n=r,s}};function v(r,n){for(o=r,c=n,e=0;!f&&l&&!a&&e<u.length;e++){var a,i=u[e],v=p.p,d=i[2];r>3?(a=d===n)&&(c=i[(o=i[4])?5:(o=3,3)],i[4]=i[5]=t):i[0]<=v&&((a=r<2&&v<i[1])?(o=0,p.v=n,p.n=i[1]):v<d&&(a=r<3||i[0]>n||n>d)&&(i[4]=r,i[5]=n,p.n=d,o=0))}if(a||r>1)return s;throw f=!0,n}return function(a,u,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===u&&v(u,d),o=u,c=d;(e=o<2?t:c)||!f;){i||(o?o<3?(o>1&&(p.n=-1),v(o,c)):p.n=c:p.v=c);try{if(l=2,i){if(o||(a="next"),e=i[a]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");
2if(!e.done)return e;c=e.value,o<2&&(o=0)}else 1===o&&(e=i.return)&&e.call(i),o<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),o=1);i=t}else if((e=(f=p.n<0)?c:r.call(n,p))!==s)break}catch(e){i=t,o=1,c=e}finally{l=1}}return{value:e,done:f}}}(r,a,i),!0),u}var s={};function l(){}function u(){}function f(){}e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),v=f.prototype=l.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t}return u.prototype=f,c(v,"constructor",f),c(f,"constructor",u),u.displayName="GeneratorFunction",c(f,a,"GeneratorFunction"),c(v),c(v,a,"Generator"),c(v,n,function(){return this}),c(v,"toString",function(){return"[object Generator]"}),(o=function(){return{w:i,m:d}})()}function c(t,e,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}c=function(t,e,r,n){function i(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?a?a(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},c(t,e,r,n)}function l(t,e,r,n,a,i,s){try{var o=t[i](s),c=o.value}catch(t){return void r(t)}o.done?e(c):Promise.resolve(c).then(n,a)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function s(t){l(i,n,a,s,o,"next",t)}function o(t){l(i,n,a,s,o,"throw",t)}s(void 0)})}}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const v={layout:"central",middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("Users")}},components:{SettingsSidebar:r(49741).A},data:function(){return{breadcrumbsCurrent:"Users",breadcrumbs:[{name:"Dashboard",url:"home"},{name:"Setup",url:"setup.index"},{name:"Users",url:""}],activeUser:"",query:"",perPage:10,developer:!1,isDemoMode:window.config.isDemoMode}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){p(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},(0,n.L8)("operations",["items","loading","pagination"])),watch:{query:function(t){""===t?this.getData():this.searchData()}},created:function(){var t=this;this.getData(),this.getActiveUser(),Fire.$on("AfterDelete",function(){t.getData()})},methods:{getData:function(){var t=this;return u(o().m(function e(){var r;return o().w(function(e){for(;;
2)switch(e.n){case 0:return t.$store.state.operations.loading=!0,r=t.pagination?t.pagination.current_page:1,e.n=1,t.$store.dispatch("operations/fetchData",{path:"/api/users?page=",currentPage:r+"&perPage="+t.perPage});case 1:return e.a(2)}},e)}))()},getActiveUser:function(){var t=this;return u(o().m(function e(){var r,n;return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i().get(window.location.origin+"/api/user");case 1:r=e.v,n=r.data,t.activeUser=n.data;case 2:return e.a(2)}},e)}))()},searchData:function(){var t=this;return u(o().m(function e(){var r;return o().w(function(e){for(;;)switch(e.n){case 0:return t.$store.state.operations.loading=!0,r=t.pagination?t.pagination.current_page:1,e.n=1,t.$store.dispatch("operations/searchData",{term:t.query,path:"/api/user/search/",currentPage:r+"&perPage="+t.perPage});case 1:return e.a(2)}},e)}))()},paginate:function(){var t=this;return u(o().m(function e(){return o().w(function(e){for(;;)switch(e.n){case 0:""===t.query?t.getData():t.searchData();case 1:return e.a(2)}},e)}))()},resetPagination:function(){var t=this;return u(o().m(function e(){return o().w(function(e){for(;;)switch(e.n){case 0:t.pagination.current_page=1;case 1:return e.a(2)}},e)}))()},reload:function(){var t=this;return u(o().m(function e(){return o().w(function(e){for(;;)switch(e.n){case 0:t.query="";case 1:return e.a(2)}},e)}))()},updatePerPager:function(){this.pagination.current_page=1,""===this.query?this.getData():this.searchData()},print:function(){var t=this;return u(o().m(function e(){return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t.$htmlToPaper("printMe");case 1:return e.a(2)}},e)}))()},deleteData:function(t){var e=this;return u(o().m(function r(){return o().w(function(r){for(;;)switch(r.n){case 0:if(!e.isDemoMode){r.n=1;break}return r.a(2,toast.fire({type:"warning",title:e.$t("You are not allowed to do this in demo version.")}));case 1:Swal.fire({title:e.$t("Are you sure?"),text:e.$t("You will not be able to return to this!"),type:"warning",showCancelButton:!0,confirmButtonText:e.$t("Confirm")}).then(function(r){r.value&&e.$store.dispatch("operations/deleteData",{path:"/api/user/",slug:t}).then(function(t){!0===t?(Swal.fire(e.$t("Deleted!"),e.$t("Deleted successfully."),"success"),Fire.$emit("AfterDelete")):Swal.fire(e.$t("Failed!"),e.$t("There was something wrong."),"warning")})});case 2:return r.a(2)}},r)}))()}}},d=v;var m=r(85072),g=r.n(m),h=r(90634),b={insert:"head",singleton:!1};g()(h.A,b);h.A.locals;const _=(0,r(14486).A)(d,function(){var t=this,e=t._self._c;return e("div",[e("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-xl-3"},[e("SettingsSidebar")],1),t._v(" "),e("div",{staticClass:"col-12 col-xl-9"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-header setings-header"},[e("div",{staticClass:"col-xl-4 col-4"},[e("h3",{staticClass:"card-title"},[t._v("\n "+t._s(t.$t("Users"))+"\n ")])]),t._v(" "),e("div",{staticClass:"col-xl-8 col-8 float-right text-right"},[e("div",{staticClass:"btn-group"},[e("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Print Table"),expression:"$t('Print Table')"}],staticClass:"btn btn-info",on:{click:t.print}},[e("i",{staticClass:"fas fa-print"})]),t._v(" "),e("router-link",{staticClass:"btn btn-primary",attrs:{to:{name:"user.create"}}},[t._v("\n "+t._s(t.$t("Create"))+"\n "),e("i",{staticClass:"fas fa-plus-circle d-none d-sm-inline-block"})])],1)])]),t._v(" "),e("div",{staticClass:"card-body"},[e("table-loading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),t._v(" "),e("div",{staticClass:"table-responsive table-custom mt-3",attrs:{id:"printMe"}},[e("table",{staticClass:"table"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.$t("#")))]),t._v(" "),e("th",[t._v(t._s(t.$t("Name")))]),t._v(" "),e("th",[t._v(t._s(t.$t("Email")))]),t._v(" "),e("th",[t._v(t._s(t.$t("Role")))]),t._v(" "),e("th",{staticClass:"text-right no-print"},[t._v("\n "+t._s(t.$t("Action"))+"\n ")])])]),t._v(" "),e("tbody",[t._l(t.items,function(r,n){return e("tr",{directives:[{name:"show",rawName:"v-show",value:t.items.length,expression:"items.length"}],key:n},[e("td",[t.pagination.current_page>1?e("span",[t._v("\n "+t._s(t.pagination.per_page*(t.pagination.current_page-1)+(n+1))+"\n ")]):e("span",[t._v(t._s(n+1))])]),t._v(" "),e("td",[e("div",{staticClass:"profile_wrap"},[e("img",{attrs:{src:r.photo_url,alt:r.name}}),t._v("\n "+t._s(r.name)+"\n ")])]),t._v(" "),e("td",[e("a",{attrs:{href:"mailto:".concat(r.email)}},[t._v(t._s(r.email))])]),t._v(" "),r.roles?e("td",[t._v("\n "+t._s(r.roles[0])+"\n ")]):t._e(),t._v(" "),e("td",{staticClass:"text-right no-print"},[t.developer||"developer"!=r.slug&&"super-admin"!=r.roles?e("div",{staticClass:"btn-group"},[r&&r.slug?e("router-link",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Edit"),expression:"\n $t('Edit')\n "}],staticClass:"btn btn-info btn-sm",attrs:{to:{name:"user.edit",params:{slug:r.slug}}}},[e("i",{staticClass:"fas fa-edit"})]):t._e(),t._v(" "),r.roles[0]!=t.activeUser.roles[0]?e("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Delete"),expression:"\n $t('Delete')\n "}],staticClass:"btn btn-danger btn-sm",attrs:{href:"#"},on:{click:function(e){return t.deleteData(r.slug)}}}
2,[e("i",{staticClass:"fas fa-trash"})]):t._e()],1):t._e()])])}),t._v(" "),e("tr",{directives:[{name:"show",rawName:"v-show",value:!t.loading&&!t.items.length,expression:"!loading && !items.length"}]},[e("td",{attrs:{colspan:"8"}},[e("EmptyTable")],1)])],2)])])],1),t._v(" "),e("div",{staticClass:"card-footer"},[e("div",{staticClass:"dtable-footer"},[e("div",{staticClass:"form-group row display-per-page"},[e("label",[t._v(t._s(t.$t("per_page"))+" ")]),t._v(" "),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.perPage,expression:"perPage"}],staticClass:"form-control form-control-sm ml-1",on:{change:[function(e){var r=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.perPage=e.target.multiple?r:r[0]},t.updatePerPager]}},[e("option",{attrs:{value:"10"}},[t._v("10")]),t._v(" "),e("option",{attrs:{value:"25"}},[t._v("25")]),t._v(" "),e("option",{attrs:{value:"50"}},[t._v("50")]),t._v(" "),e("option",{attrs:{value:"100"}},[t._v("100")])])])]),t._v(" "),t.pagination&&t.pagination.last_page>1?e("pagination",{staticClass:"justify-flex-end",attrs:{pagination:t.pagination,offset:5},on:{paginate:t.paginate}}):t._e()],1)])])])])],1)},[],!1,null,"3210f404",null).exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.