%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hrsys/web/js/
Upload File :
Create Path :
Current File : /var/www/html/hrsys/web/js/chunk-6834d534.877e7aa3.js

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6834d534"],{"039a":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",[n("vue-portal",{attrs:{to:"hrsys-navbar-actions"}},[n("div",{staticClass:"flex"},[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",type:"border"},on:{click:function(e){return t.$router.push({name:"maintenancePaymentDetails",params:{id:0}})}}})],1)],1)]),n("div",{staticClass:"view-container"},[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("payments-table",{attrs:{header:t.tableHeader,payments:t.payments,"show-project-info":!0},on:{refresh:t.getPaymentInfo,edit:t.edit}}),t.pagination.total?n("pagination",{attrs:{pagination:t.pagination},on:{input:t.changePage}}):t._e()],1)],1)],1)},s=[],i=(n("d3b7"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("vs-table",{attrs:{data:t.payments},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.client.name}},[t._v(" "+t._s(e.client.name)+" ")]),n("vs-td",{attrs:{data:e.name}},[t._v(" "+t._s(e.name)+" ")]),n("vs-td",{attrs:{data:e.amount}},[n("span",{class:t.isExpense(e.type)?"text-danger":"text-success"},[t._v(" "+t._s(e.amount)+t._s(t._f("currency")(e.currency))+" ")])]),n("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.start_date}},[t._v(" "+t._s(t._f("fromShortDate")(e.start_date))+" ")]),n("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.next_payment_date}},[n("span",{class:{"text-danger":e.is_due,"text-warning":!e.is_due&&e.is_due_soon}},[t._v(t._s(t._f("fromShortDate")(e.next_payment_date)))])]),n("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.canceled_at}},[n("span",[t._v(t._s(t._f("fromShortDate")(e.canceled_at)))])]),n("vs-td",{staticClass:"whitespace-pre",attrs:{data:e.type}},[n("span",[t._v(t._s(t._f("maintenanceType")(e.type)))])]),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:{disabled:!e.can_receive_payments,icon:"pen"},on:{click:function(n){return t.$emit("edit",e.id)}}})],1),n("vx-tooltip",{attrs:{text:t.$t("maintenancePayments.paymentReceived"),position:"top"}},[n("base-button",{staticClass:"self-end px-3 mx-px",attrs:{disabled:!e.can_receive_payments,icon:"check"},on:{click:function(n){return t.confirmPayment(e.id)}}})],1),n("vx-tooltip",{attrs:{text:t.$t("buttons.cancel"),position:"top"}},[n("base-button",{staticClass:"self-end px-3 mx-px",attrs:{disabled:!e.is_cancelable,color:"danger",icon:"trash"},on:{click:function(n){return t.deletePayment(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("maintenancePayments.table.actions")}},[t._v(t._s(e)+" ")])})),1)],2)],1)}),c=[],r=n("a226"),o={name:"MaintenancePaymentsTable",components:{},props:{header:{type:Array,required:!0},payments:{type:Array,required:!0},loading:{type:Boolean,default:!1},showProjectInfo:{type:Boolean,default:!1}},methods:{isExpense:function(t){return"expense"===t.toLowerCase()},deletePayment:function(t){var e=this;this.$vs.dialog({type:"confirm",color:"danger",title:this.$t("maintenancePayments.deleteTitle"),text:this.$t("maintenancePayments.deleteText"),accept:function(){r["a"].cancel(t).then((function(){e.$emit("refresh")}),(function(t){e.$notificationService.error(t.message)}))}})},confirmPayment:function(t){var e=this;this.$vs.dialog({type:"confirm",color:"primary",title:this.$t("maintenancePayments.confirmTitle"),text:this.$t("maintenancePayments.confirmText"),accept:function(){r["a"].confirm(t).then((function(){e.$emit("refresh")}),(function(t){e.$notificationService.error(t.message)}))}})}}},u=o,l=n("2877"),m=Object(l["a"])(u,i,c,!1,null,"43ead49d",null),p=m.exports,d=n("1799"),f={name:"MaintenancePayment",components:{PaymentsTable:p,Pagination:d["a"]},data:function(){return{pagination:{},queryParams:{page:1,search:"",include:"client"},payments:[],projectId:null,loadingContent:!1}},computed:{tableHeader:function(){return[this.$t("maintenancePayments.table.client"),this.$t("maintenancePayments.table.name"),this.$t("maintenancePayments.table.amount"),this.$t("maintenancePayments.table.start_date"),this.$t("maintenancePayments.table.next_payment_date"),this.$t("maintenancePayments.table.canceled_at"),this.$t("maintenancePayments.table.type"),this.$t("maintenancePayments.table.actions")]}},methods:{edit:function(t){this.$router.push({name:"maintenancePaymentDetails",params:{id:t}})},getPaymentInfo:function(){var t=this;this.loadingContent=!0,r["a"].list(this.queryParams).then((function(e){t.payments=e.data,t.pagination=e.meta.pagination})).finally((function(){t.loadingContent=!1}))},search:function(){this.$router.push({query:this.queryParams}).catch((function(){})),this.queryParams.page=1,this.getPaymentInfo()},changePage:function(t){this.queryParams.page=t,this.$router.push({query:this.queryParams}).catch((function(){})),this.getPaymentInfo()}},mounted:function(){this.projectId=parseInt(this.$route.params.id),this.getPaymentInfo()}},h=f,y=Object(l["a"])(h,a,s,!1,null,"2f92711c",null);e["default"]=y.exports},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)},s=[],i=(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}}),c=i,r=n("2877"),o=Object(r["a"])(c,a,s,!1,null,"cb826a88",null);e["a"]=o.exports},a226:function(t,e,n){"use strict";n("d3b7");var a=n("1829"),s=n("18c2");e["a"]={list:function(t){return new Promise((function(e,n){a["a"].get("v1/maintenancePayments?".concat(Object(s["a"])(t))).then((function(t){return e(t.data)}),(function(t){return n(t)})).catch((function(t){return n(t)}))}))},details:function(t){return new Promise((function(e,n){a["a"].get("v1/maintenancePayments/".concat(t)).then((function(t){return e(t.data)}),(function(t){return n(t)})).catch((function(t){return n(t)}))}))},create:function(t){return new Promise((function(e,n){a["a"].post("v1/maintenancePayments",t).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},update:function(t){return new Promise((function(e,n){a["a"].put("v1/maintenancePayments/".concat(t.id),t).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))},cancel:function(t){return new Promise((function(e,n){a["a"].delete("v1/maintenancePayments/".concat(t,"/actions/cancel")).then((function(){return e()}),(function(t){return n(t)}))}))},confirm:function(t){return new Promise((function(e,n){a["a"].post("v1/maintenancePayments/".concat(t,"/actions/paymentReceived")).then((function(){return e()}),(function(t){return n(t)}))}))},getTransactions:function(t){return new Promise((function(e,n){a["a"].get("v1/maintenancePayments/".concat(t,"/actions/getTransactions")).then((function(t){return e(t.data.data)}),(function(t){return n(t)}))}))}}}}]);
//# sourceMappingURL=chunk-6834d534.877e7aa3.js.map

Zerion Mini Shell 1.0