%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/web/js/
Upload File :
Create Path :
Current File : /var/www/html/hr/web/js/chunk-37e92270.ca814193.js

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-37e92270"],{1799:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"flex"},[t.selectPerPage?n("div",{staticClass:"flex items-center"},[n("span",{staticClass:"mr-2 whitespace-pre"},[t._v(t._s(t.$t("labels.per_page"))+":")]),n("div",{staticClass:"z-500 w-20"},[n("base-multiselect",{staticClass:"-mt-4",attrs:{value:t.pagination.per_page,options:t.paginationOptions,selectedLabel:"",selectLabel:"",deselectLabel:"","allow-empty":!1},on:{input:function(e){return t.$emit("selectedPerPage",e)}}})],1)]):t._e(),n("vs-pagination",{staticClass:"mt-2",attrs:{max:t.max,total:t.pagination.total_pages},on:{input:t.pageChange},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},i=[],s=(n("a9e3"),{name:"Pagination",props:{pagination:{type:Object,required:!0},max:{type:Number,default:7},selectPerPage:{type:Boolean,default:!1}},data:function(){return{paginationOptions:[5,10,15,20,30,50,100],value:null}},methods:{pageChange:function(t){this.$emit("input",t)}},created:function(){this.value=this.pagination.current_page}}),r=s,o=n("2877"),l=Object(o["a"])(r,a,i,!1,null,"cb826a88",null);e["a"]=l.exports},"73e8":function(t,e,n){"use strict";n("d3b7");var a=n("1829"),i=n("18c2");e["a"]={list:function(t){return new Promise((function(e,n){a["a"].get("v1/clients?".concat(Object(i["a"])(t))).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},details:function(t){return new Promise((function(e,n){a["a"].get("v1/clients/".concat(t)).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},create:function(t){return new Promise((function(e,n){a["a"].post("v1/clients",t).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},update:function(t){return new Promise((function(e,n){var i=t.id;a["a"].put("v1/clients/".concat(i),t).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},delete:function(t){return new Promise((function(e,n){a["a"].delete("v1/clients/".concat(t)).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))}}},"9da9":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"view-container"},[n("vue-portal",{attrs:{to:"hrsys-navbar-actions"}},[n("div",{staticClass:"flex"},[n("base-header-title",{attrs:{title:t.$t("modules.clients")}}),n("vx-tooltip",{staticClass:"ml-2",attrs:{text:t.$t("buttons.create"),position:"bottom"}},[n("base-button",{staticClass:"self-end px-3",attrs:{icon:"plus"},on:{click:function(e){return t.$router.push({name:"clientDetails",params:{id:0}})}}})],1)],1)]),n("base-loader",{attrs:{loading:t.loadingContent}},[n("base-search",{on:{search:t.search},model:{value:t.queryParams.search,callback:function(e){t.$set(t.queryParams,"search",e)},expression:"queryParams.search"}}),n("clients-table",{attrs:{clients:t.list,header:t.tableHeader},on:{delete:t.deleteClientPrompt,edit:t.editClient}}),t.pagination.total?n("pagination",{attrs:{pagination:t.pagination},on:{input:t.changePage}}):t._e()],1)],1)},i=[],s=(n("99af"),n("d3b7"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("vs-table",{attrs:{data:t.clients},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.data;return t._l(a,(function(e,a){return n("vs-tr",{key:a,attrs:{data:e}},[n("vs-td",{attrs:{data:e.name}},[t._v(" "+t._s(e.name)+" ")]),n("vs-td",{attrs:{data:e.email}},[n("a",{attrs:{href:"mailto:"+e.email}},[t._v(" "+t._s(e.email)+" ")])]),n("vs-td",{attrs:{data:e.phone}},[n("a",{attrs:{href:"tel:"+e.phone}},[t._v(" "+t._s(e.phone)+" ")])]),n("vs-td",{staticClass:"text-right"},[n("div",{staticClass:"flex justify-end"},[n("vx-tooltip",{attrs:{text:t.$t("buttons.edit"),position:"top"}},[n("base-button",{staticClass:"self-end px-3 mx-px",attrs:{icon:"pen"},on:{click:function(n){return t.$emit("edit",e.id)}}})],1),n("vx-tooltip",{attrs:{text:t.$t("buttons.delete"),position:"top"}},[n("base-button",{staticClass:"self-end px-3 mx-px",attrs:{color:"danger",icon:"trash"},on:{click:function(n){return t.$emit("delete",e.id)}}})],1)],1)])],1)}))}}])},[n("template",{slot:"thead"},t._l(t.header,(function(e,a){return n("vs-th",{key:a,staticClass:"text-base",class:{"float-right":e===t.$t("clients.table.actions")}},[t._v(t._s(e)+" ")])})),1)],2)],1)}),r=[],o={name:"UsersTable",components:{},props:{header:{type:Array,required:!0},clients:{type:Array,required:!0},loading:{type:Boolean,default:!1}}},l=o,c=n("2877"),u=Object(c["a"])(l,s,r,!1,null,"385df343",null),d=u.exports,p=n("1799"),f=n("73e8"),h={name:"Clients",components:{ClientsTable:d,Pagination:p["a"]},data:function(){return{list:[],pagination:{},queryParams:{page:1},loadingContent:!1}},methods:{editClient:function(t){this.$router.push({name:"clientDetails",params:{id:t}})},changePage:function(t){this.queryParams.page=t,this.$router.push({query:this.queryParams}).catch((function(){})),this.getClients()},getClients:function(){var t=this;this.loadingContent=!0,f["a"].list(this.queryParams).then((function(e){t.$router.push({query:t.queryParams}).catch((function(){})),t.list=e.data,t.pagination=e.meta.pagination})).finally((function(){return t.loadingContent=!1}))},deleteClientPrompt:function(t){var e=this;this.$vs.dialog({type:"confirm",color:"danger",title:this.$t("clients.deleteTitle"),text:this.$t("clients.deleteText"),accept:function(){e.deleteClient(t)}})},deleteClient:function(t){var e=this;this.loadingContent=!0,f["a"].delete(t).then((function(){e.$notificationService.success("".concat(e.$t("clients.client")," ").concat(e.$t("notification.successDelete"))),e.getClients()})).catch((function(t){e.$notificationService.error(t.message)})).finally((function(){e.loadingContent=!1}))},search:function(){this.$router.push({query:this.queryParams}).catch((function(){})),this.queryParams.page=1,this.getClients()},getUrlParams:function(){var t=this;this.$route.query.page&&(t.queryParams=Object.assign({},t.$route.query))}},computed:{tableHeader:function(){return[this.$t("clients.table.name"),this.$t("clients.table.email"),this.$t("clients.table.phone"),this.$t("clients.table.actions")]}},mounted:function(){this.getUrlParams(),this.getClients()}},m=h,g=Object(c["a"])(m,a,i,!1,null,"1979a02a",null);e["default"]=g.exports}}]);
//# sourceMappingURL=chunk-37e92270.ca814193.js.map

Zerion Mini Shell 1.0