%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-7e6cc9d5.d553485e.js

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7e6cc9d5"],{1799:function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"flex"},[t.selectPerPage?a("div",{staticClass:"flex items-center"},[a("span",{staticClass:"mr-2 whitespace-pre"},[t._v(t._s(t.$t("labels.per_page"))+":")]),a("div",{staticClass:"z-500 w-20"},[a("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(),a("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)},n=[],i=(a("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}}),o=i,r=a("2877"),c=Object(r["a"])(o,s,n,!1,null,"cb826a88",null);e["a"]=c.exports},"2d22":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"view-container"},[a("vue-portal",{attrs:{to:"hrsys-navbar-actions"}},[a("div",{staticClass:"flex"},[a("base-header-title",{attrs:{title:t.$t("modules.projects")}}),a("vx-tooltip",{staticClass:"ml-2",attrs:{text:t.$t("buttons.create"),position:"bottom"}},[a("base-button",{staticClass:"self-end px-3",attrs:{icon:"plus"},on:{click:function(e){return t.$router.push({name:"projectDetails",params:{id:0}})}}})],1)],1)]),a("base-loader",{attrs:{loading:t.loadingContent}},[a("base-search",{on:{search:t.search},model:{value:t.queryParams.search,callback:function(e){t.$set(t.queryParams,"search",e)},expression:"queryParams.search"}}),a("projects-table",{attrs:{deleteLoaders:t.deleting,header:t.tableHeader,projects:t.list},on:{delete:t.deleteProjectPrompt,edit:t.editProject}}),t.pagination.total?a("pagination",{attrs:{pagination:t.pagination},on:{input:t.changePage}}):t._e()],1)],1)},n=[],i=(a("99af"),a("d3b7"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("vs-table",{attrs:{data:t.projects},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.data;return t._l(s,(function(e,s){return a("vs-tr",{key:s,attrs:{data:e}},[a("vs-td",{attrs:{data:e.code}},[t._v(" "+t._s(e.code)+" ")]),a("vs-td",{attrs:{data:e.name}},[t._v(" "+t._s(e.name)+" ")]),a("vs-td",{attrs:{data:e.client.name}},[t._v(" "+t._s(e.client.name)+" ")]),a("vs-td",{staticClass:"whitespace-pre w-20 text-right",attrs:{data:e.estimation}},[t._v(" "+t._s(e.estimation)+" ")]),a("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.start_date}},[t._v(" "+t._s(t._f("date")(e.start_date,"MMM Do YYYY"))+" ")]),a("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.end_date}},[t._v(" "+t._s(t._f("date")(e.end_date,"MMM Do YYYY"))+" ")]),a("vs-td",{staticClass:"text-right"},[a("div",{staticClass:"flex justify-end"},[a("vx-tooltip",{attrs:{text:t.$t("buttons.edit"),position:"top"}},[a("base-button",{staticClass:"self-end px-3 mx-px",attrs:{icon:"pen"},on:{click:function(a){return t.$emit("edit",e.id)}}})],1),a("vx-tooltip",{attrs:{text:t.$t("buttons.delete"),position:"top"}},[a("base-button",{staticClass:"self-end px-3 mx-px",attrs:{loading:t.deleteLoaders[e.id],color:"danger",icon:"trash"},on:{click:function(a){return t.$emit("delete",e.id)}}})],1)],1)])],1)}))}}])},[a("template",{slot:"thead"},t._l(t.header,(function(e,s){return a("vs-th",{key:s,staticClass:"text-base",class:{"float-right":e===t.$t("clients.table.actions")}},[t._v(t._s(e)+" ")])})),1)],2)],1)}),o=[],r={name:"ProjectsTable",components:{},props:{header:{type:Array,required:!0},projects:{type:Array,required:!0},loading:{type:Boolean,default:!1},deleteLoaders:{type:Object,default:function(){return{}}}},methods:{startLoading:function(){this.$vs.loading({container:this.$refs.projectsTable})},stopLoading:function(){this.$vs.loading.close(this.$refs.projectsTable)}},watch:{loading:function(t){t?this.startLoading():this.stopLoading()}}},c=r,l=a("2877"),u=Object(l["a"])(c,i,o,!1,null,"3090a4f3",null),d=u.exports,p=a("1799"),h=a("1226"),f={name:"Projects",components:{ProjectsTable:d,Pagination:p["a"]},data:function(){return{list:[],pagination:{},deleting:{},queryParams:{include:"client",page:1},loadingContent:!1}},methods:{editProject:function(t){this.$router.push({name:"projectDetails",params:{id:t}})},changePage:function(t){this.queryParams.page=t,this.$router.push({query:this.queryParams}).catch((function(){})),this.getProjects()},getProjects:function(){var t=this;this.loadingContent=!0,h["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}))},deleteProjectPrompt:function(t){var e=this;this.$vs.dialog({type:"confirm",color:"danger",title:this.$t("projects.deleteTitle"),text:this.$t("projects.deleteText"),accept:function(){e.deleteProject(t)}})},deleteProject:function(t){var e=this;this.deleting[t]=!0,h["a"].delete(t).then((function(){e.$notificationService.success("".concat(e.$t("projects.project")," ").concat(e.$t("notification.successDelete"))),e.getProjects()})).catch((function(t){e.$notificationService.error(t.message)})).finally((function(){e.deleting[t]=!1}))},search:function(){this.$router.push({query:this.queryParams}).catch((function(){})),this.queryParams.page=1,this.getProjects()},getUrlParams:function(){var t=this;this.$route.query.page&&(t.queryParams=Object.assign({},t.$route.query))}},computed:{tableHeader:function(){return[this.$t("projects.table.code"),this.$t("projects.table.name"),this.$t("projects.table.client"),this.$t("projects.table.estimation"),this.$t("projects.table.start_date"),this.$t("projects.table.end_date"),this.$t("projects.table.actions")]}},mounted:function(){this.getUrlParams(),this.getProjects()}},g=f,m=Object(l["a"])(g,s,n,!1,null,"74ba0a32",null);e["default"]=m.exports}}]);
//# sourceMappingURL=chunk-7e6cc9d5.d553485e.js.map

Zerion Mini Shell 1.0