%PDF- %PDF-
Direktori : /var/www/html/hr/web/js/ |
Current File : /var/www/html/hr/web/js/chunk-6834d534.877e7aa3.js.map |
{"version":3,"sources":["webpack:///./src/views/maintenancePayments/MaintenancePayments.vue?141f","webpack:///./src/components/maintenancePayments/MaintenancePaymentsTable.vue?ae32","webpack:///src/components/maintenancePayments/MaintenancePaymentsTable.vue","webpack:///./src/components/maintenancePayments/MaintenancePaymentsTable.vue?ebda","webpack:///./src/components/maintenancePayments/MaintenancePaymentsTable.vue","webpack:///src/views/maintenancePayments/MaintenancePayments.vue","webpack:///./src/views/maintenancePayments/MaintenancePayments.vue?b614","webpack:///./src/views/maintenancePayments/MaintenancePayments.vue","webpack:///./src/components/Pagination.vue?fb44","webpack:///src/components/Pagination.vue","webpack:///./src/components/Pagination.vue?b5ee","webpack:///./src/components/Pagination.vue","webpack:///./src/services/MaintenancePayments.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","$t","on","$event","$router","push","name","params","id","loadingContent","search","model","value","queryParams","callback","$$v","$set","expression","tableHeader","payments","getPaymentInfo","edit","pagination","changePage","_e","staticRenderFns","scopedSlots","_u","key","fn","ref","data","_l","tr","indexTr","client","_v","_s","amount","class","isExpense","type","_f","currency","start_date","next_payment_date","is_due","is_due_soon","canceled_at","can_receive_payments","$emit","confirmPayment","is_cancelable","deletePayment","slot","title","i","component","per_page","paginationOptions","max","total_pages","pageChange","list","Promise","resolve","reject","ApiFactory","get","serialize","then","success","error","catch","e","details","create","payload","post","update","put","cancel","delete","confirm","getTransactions","response"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,aAAa,CAACE,MAAM,CAAC,GAAK,yBAAyB,CAACF,EAAG,MAAM,CAACG,YAAY,QAAQ,CAACH,EAAG,aAAa,CAACG,YAAY,OAAOD,MAAM,CAAC,KAAON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KAAKA,SACpC,SAACyC,GAAD,OAAWN,EAAOM","file":"js/chunk-6834d534.877e7aa3.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('vue-portal',{attrs:{\"to\":\"hrsys-navbar-actions\"}},[_c('div',{staticClass:\"flex\"},[_c('vx-tooltip',{staticClass:\"ml-2\",attrs:{\"text\":_vm.$t('buttons.create'),\"position\":\"bottom\"}},[_c('base-button',{staticClass:\"self-end px-3\",attrs:{\"icon\":\"plus\",\"type\":\"border\"},on:{\"click\":function($event){return _vm.$router.push({ name: 'maintenancePaymentDetails', params: { id: 0 } })}}})],1)],1)]),_c('div',{staticClass:\"view-container\"},[_c('base-loader',{attrs:{\"loading\":_vm.loadingContent}},[_c('base-search',{on:{\"search\":_vm.search},model:{value:(_vm.queryParams.search),callback:function ($$v) {_vm.$set(_vm.queryParams, \"search\", $$v)},expression:\"queryParams.search\"}}),_c('payments-table',{attrs:{\"header\":_vm.tableHeader,\"payments\":_vm.payments,\"show-project-info\":true},on:{\"refresh\":_vm.getPaymentInfo,\"edit\":_vm.edit}}),(_vm.pagination.total)?_c('pagination',{attrs:{\"pagination\":_vm.pagination},on:{\"input\":_vm.changePage}}):_vm._e()],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('vs-table',{attrs:{\"data\":_vm.payments},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar data = ref.data;\nreturn _vm._l((data),function(tr,indexTr){return _c('vs-tr',{key:indexTr,attrs:{\"data\":tr}},[_c('vs-td',{attrs:{\"data\":tr.client.name}},[_vm._v(\" \"+_vm._s(tr.client.name)+\" \")]),_c('vs-td',{attrs:{\"data\":tr.name}},[_vm._v(\" \"+_vm._s(tr.name)+\" \")]),_c('vs-td',{attrs:{\"data\":tr.amount}},[_c('span',{class:_vm.isExpense(tr.type) ? 'text-danger' : 'text-success'},[_vm._v(\" \"+_vm._s(tr.amount)+_vm._s(_vm._f(\"currency\")(tr.currency))+\" \")])]),_c('vs-td',{staticClass:\"whitespace-pre\",attrs:{\"data\":tr.start_date}},[_vm._v(\" \"+_vm._s(_vm._f(\"fromShortDate\")(tr.start_date))+\" \")]),_c('vs-td',{staticClass:\"whitespace-pre\",attrs:{\"data\":tr.next_payment_date}},[_c('span',{class:{'text-danger': tr.is_due, 'text-warning': !tr.is_due&& tr.is_due_soon}},[_vm._v(_vm._s(_vm._f(\"fromShortDate\")(tr.next_payment_date)))])]),_c('vs-td',{staticClass:\"whitespace-pre\",attrs:{\"data\":tr.canceled_at}},[_c('span',[_vm._v(_vm._s(_vm._f(\"fromShortDate\")(tr.canceled_at)))])]),_c('vs-td',{staticClass:\"whitespace-pre\",attrs:{\"data\":tr.type}},[_c('span',[_vm._v(_vm._s(_vm._f(\"maintenanceType\")(tr.type)))])]),_c('vs-td',{staticClass:\"text-right\"},[_c('div',{staticClass:\"flex justify-end\"},[_c('vx-tooltip',{attrs:{\"text\":_vm.$t('buttons.edit'),\"position\":\"top\"}},[_c('base-button',{staticClass:\"self-end px-3 mx-px\",attrs:{\"disabled\":!tr.can_receive_payments,\"icon\":\"pen\"},on:{\"click\":function($event){return _vm.$emit('edit', tr.id)}}})],1),_c('vx-tooltip',{attrs:{\"text\":_vm.$t('maintenancePayments.paymentReceived'),\"position\":\"top\"}},[_c('base-button',{staticClass:\"self-end px-3 mx-px\",attrs:{\"disabled\":!tr.can_receive_payments,\"icon\":\"check\"},on:{\"click\":function($event){return _vm.confirmPayment(tr.id)}}})],1),_c('vx-tooltip',{attrs:{\"text\":_vm.$t('buttons.cancel'),\"position\":\"top\"}},[_c('base-button',{staticClass:\"self-end px-3 mx-px\",attrs:{\"disabled\":!tr.is_cancelable,\"color\":\"danger\",\"icon\":\"trash\"},on:{\"click\":function($event){return _vm.deletePayment(tr.id)}}})],1)],1)])],1)})}}])},[_c('template',{slot:\"thead\"},_vm._l((_vm.header),function(title,i){return _c('vs-th',{key:i,staticClass:\"text-base\",class:{'float-right': title === _vm.$t('maintenancePayments.table.actions')}},[_vm._v(_vm._s(title)+\" \")])}),1)],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div>\n <vs-table :data=\"payments\">\n\n <template slot=\"thead\">\n <vs-th :class=\"{'float-right': title === $t('maintenancePayments.table.actions')}\" :key=\"i\"\n class=\"text-base\"\n v-for=\"(title, i) in header\">{{ title }}\n </vs-th>\n </template>\n\n <template slot-scope=\"{data}\">\n <vs-tr :data=\"tr\" :key=\"indexTr\" v-for=\"(tr, indexTr) in data\">\n <vs-td :data=\"tr.client.name\">\n {{ tr.client.name }}\n </vs-td>\n <vs-td :data=\"tr.name\">\n {{ tr.name }}\n </vs-td>\n <vs-td :data=\"tr.amount\">\n <span :class=\"isExpense(tr.type) ? 'text-danger' : 'text-success'\">\n {{ tr.amount }}{{ tr.currency | currency}}\n </span>\n </vs-td>\n <vs-td :data=\"tr.start_date\" class=\"whitespace-pre\">\n {{ tr.start_date | fromShortDate }}\n </vs-td>\n <vs-td :data=\"tr.next_payment_date\" class=\"whitespace-pre\">\n <span :class=\"{'text-danger': tr.is_due, 'text-warning': !tr.is_due&& tr.is_due_soon}\">{{ tr.next_payment_date | fromShortDate }}</span>\n </vs-td>\n <vs-td :data=\"tr.canceled_at\" class=\"whitespace-pre\">\n <span>{{ tr.canceled_at | fromShortDate }}</span>\n </vs-td>\n <vs-td :data=\"tr.type\" class=\"whitespace-pre\">\n <span>{{ tr.type | maintenanceType }}</span>\n </vs-td>\n <vs-td class=\"text-right\">\n <div class=\"flex justify-end\">\n <vx-tooltip :text=\"$t('buttons.edit')\" position=\"top\">\n <base-button :disabled=\"!tr.can_receive_payments\" @click=\"$emit('edit', tr.id)\"\n class=\"self-end px-3 mx-px\" icon=\"pen\"/>\n </vx-tooltip>\n <vx-tooltip :text=\"$t('maintenancePayments.paymentReceived')\" position=\"top\">\n <base-button :disabled=\"!tr.can_receive_payments\" @click=\"confirmPayment(tr.id)\"\n class=\"self-end px-3 mx-px\"\n icon=\"check\"/>\n </vx-tooltip>\n <vx-tooltip :text=\"$t('buttons.cancel')\" position=\"top\">\n <base-button :disabled=\"!tr.is_cancelable\" @click=\"deletePayment(tr.id)\" class=\"self-end px-3 mx-px\"\n color=\"danger\" icon=\"trash\"/>\n </vx-tooltip>\n </div>\n </vs-td>\n </vs-tr>\n </template>\n </vs-table>\n </div>\n</template>\n\n<script>\n import MaintenancePayments from '../../services/MaintenancePayments';\n\n export default {\n name: 'MaintenancePaymentsTable',\n components: {},\n props: {\n header: {\n type: Array,\n required: true\n },\n payments: {\n type: Array,\n required: true\n },\n loading: {\n type: Boolean,\n default: false\n },\n showProjectInfo: {\n type: Boolean,\n default: false\n }\n },\n methods: {\n isExpense(type) {\n return type.toLowerCase() === 'expense';\n },\n deletePayment (id) {\n this.$vs.dialog({\n type: 'confirm',\n color: 'danger',\n title: this.$t('maintenancePayments.deleteTitle'),\n text: this.$t('maintenancePayments.deleteText'),\n accept: () => {\n MaintenancePayments.cancel(id).then(() => {\n this.$emit('refresh');\n }, (error) => {\n this.$notificationService.error(error.message);\n });\n }\n });\n },\n confirmPayment (id) {\n this.$vs.dialog({\n type: 'confirm',\n color: 'primary',\n title: this.$t('maintenancePayments.confirmTitle'),\n text: this.$t('maintenancePayments.confirmText'),\n accept: () => {\n MaintenancePayments.confirm(id).then(() => {\n this.$emit('refresh');\n }, (error) => {\n this.$notificationService.error(error.message);\n });\n }\n });\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MaintenancePaymentsTable.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MaintenancePaymentsTable.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MaintenancePaymentsTable.vue?vue&type=template&id=43ead49d&scoped=true&\"\nimport script from \"./MaintenancePaymentsTable.vue?vue&type=script&lang=js&\"\nexport * from \"./MaintenancePaymentsTable.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"43ead49d\",\n null\n \n)\n\nexport default component.exports","<template>\n <div>\n <vue-portal to=\"hrsys-navbar-actions\">\n <div class=\"flex\">\n <vx-tooltip :text=\"$t('buttons.create')\" class=\"ml-2\" position=\"bottom\">\n <base-button @click=\"$router.push({ name: 'maintenancePaymentDetails', params: { id: 0 } })\"\n class=\"self-end px-3\" icon=\"plus\" type=\"border\"/>\n </vx-tooltip>\n </div>\n </vue-portal>\n\n <div class=\"view-container\">\n <base-loader :loading=\"loadingContent\">\n <base-search @search=\"search\" v-model=\"queryParams.search\"/>\n\n <payments-table :header=\"tableHeader\"\n :payments=\"payments\"\n :show-project-info=\"true\"\n @refresh=\"getPaymentInfo\"\n @edit=\"edit\"\n />\n\n <pagination :pagination=\"pagination\" @input=\"changePage\" v-if=\"pagination.total\"/>\n </base-loader>\n </div>\n </div>\n</template>\n\n<script>\n import PaymentsTable from \"../../components/maintenancePayments/MaintenancePaymentsTable\";\n import MaintenancePayments from \"../../services/MaintenancePayments\";\n import Pagination from '../../components/Pagination';\n\n export default {\n name: 'MaintenancePayment',\n components: {\n PaymentsTable,\n Pagination,\n },\n data () {\n return {\n pagination: {},\n queryParams: {\n page: 1,\n search: '',\n include: 'client'\n },\n payments: [],\n projectId: null,\n loadingContent: false\n }\n },\n computed: {\n tableHeader () {\n return ([\n this.$t('maintenancePayments.table.client'),\n this.$t('maintenancePayments.table.name'),\n this.$t('maintenancePayments.table.amount'),\n this.$t('maintenancePayments.table.start_date'),\n this.$t('maintenancePayments.table.next_payment_date'),\n this.$t('maintenancePayments.table.canceled_at'),\n this.$t('maintenancePayments.table.type'),\n this.$t('maintenancePayments.table.actions'),\n ])\n },\n },\n methods: {\n edit (id) {\n this.$router.push({name: 'maintenancePaymentDetails', params: {id}})\n },\n getPaymentInfo () {\n this.loadingContent = true;\n MaintenancePayments.list(this.queryParams).then((response) => {\n this.payments = response.data;\n this.pagination = response.meta.pagination\n }).finally(() => {\n this.loadingContent = false;\n });\n },\n search () {\n this.$router.push({query: this.queryParams}).catch(() => {\n });\n this.queryParams.page = 1;\n this.getPaymentInfo();\n },\n changePage (newPage) {\n this.queryParams.page = newPage;\n this.$router.push({query: this.queryParams}).catch(() => {\n });\n this.getPaymentInfo();\n },\n },\n mounted () {\n this.projectId = parseInt(this.$route.params.id);\n this.getPaymentInfo();\n }\n }\n</script>\n\n<style scoped>\n\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MaintenancePayments.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MaintenancePayments.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MaintenancePayments.vue?vue&type=template&id=2f92711c&scoped=true&\"\nimport script from \"./MaintenancePayments.vue?vue&type=script&lang=js&\"\nexport * from \"./MaintenancePayments.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2f92711c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex\"},[(_vm.selectPerPage)?_c('div',{staticClass:\"flex items-center\"},[_c('span',{staticClass:\"mr-2 whitespace-pre\"},[_vm._v(_vm._s(_vm.$t('labels.per_page'))+\":\")]),_c('div',{staticClass:\"z-500 w-20\"},[_c('base-multiselect',{staticClass:\"-mt-4\",attrs:{\"value\":_vm.pagination.per_page,\"options\":_vm.paginationOptions,\"selectedLabel\":\"\",\"selectLabel\":\"\",\"deselectLabel\":\"\",\"allow-empty\":false},on:{\"input\":function($event){return _vm.$emit('selectedPerPage', $event)}}})],1)]):_vm._e(),_c('vs-pagination',{staticClass:\"mt-2\",attrs:{\"max\":_vm.max,\"total\":_vm.pagination.total_pages},on:{\"input\":_vm.pageChange},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"flex\">\n <div v-if=\"selectPerPage\" class=\"flex items-center\">\n <span class=\"mr-2 whitespace-pre\">{{ $t('labels.per_page') }}:</span>\n <div class=\"z-500 w-20\">\n <base-multiselect\n :value=\"pagination.per_page\"\n :options=\"paginationOptions\"\n @input=\"$emit('selectedPerPage', $event)\"\n selectedLabel=\"\"\n selectLabel=\"\"\n deselectLabel=\"\"\n class=\"-mt-4\"\n :allow-empty=\"false\"/>\n </div>\n </div>\n <vs-pagination :max=\"max\" :total=\"pagination.total_pages\" @input=\"pageChange\" class=\"mt-2\"\n v-model=\"value\"></vs-pagination>\n </div>\n</template>\n\n<script>\n export default {\n name:'Pagination',\n props:{\n pagination:{\n type:Object,\n required:true\n },\n max:{\n type:Number,\n default:7\n },\n selectPerPage: {\n type:Boolean,\n default:false\n }\n },\n data:() => ({\n paginationOptions:[5, 10, 15, 20, 30, 50, 100],\n value:null\n }),\n methods:{\n pageChange(val) {\n this.$emit('input', val)\n }\n },\n created() {\n this.value = this.pagination.current_page\n }\n }\n</script>\n\n<style scoped>\n\n</style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Pagination.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Pagination.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Pagination.vue?vue&type=template&id=cb826a88&scoped=true&\"\nimport script from \"./Pagination.vue?vue&type=script&lang=js&\"\nexport * from \"./Pagination.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"cb826a88\",\n null\n \n)\n\nexport default component.exports","import ApiFactory from '../factories/ApiFactory'\nimport {serialize} from '../utilities/querySerialize'\n\nexport default {\n list (params) {\n return new Promise((resolve, reject) => {\n ApiFactory.get(`v1/maintenancePayments?${serialize(params)}`)\n .then(\n (success) => resolve(success.data),\n (error) => reject(error)\n ).catch(e => reject(e))\n })\n },\n details (id) {\n return new Promise((resolve, reject) => {\n ApiFactory.get(`v1/maintenancePayments/${id}`)\n .then(\n (success) => resolve(success.data),\n (error) => reject(error)\n ).catch(e => reject(e))\n })\n },\n create (payload) {\n return new Promise((resolve, reject) => {\n ApiFactory.post('v1/maintenancePayments', payload).then(\n (success) => resolve(success.data),\n (error) => reject(error)\n )\n })\n },\n update (payload) {\n return new Promise((resolve, reject) => {\n ApiFactory.put(`v1/maintenancePayments/${payload.id}`, payload).then(\n (success) => resolve(success.data),\n (error) => reject(error)\n )\n })\n },\n cancel (id) {\n return new Promise((resolve, reject) => {\n ApiFactory.delete(`v1/maintenancePayments/${id}/actions/cancel`).then(\n () => resolve(),\n (error) => reject(error)\n )\n })\n },\n confirm (id) {\n return new Promise((resolve, reject) => {\n ApiFactory.post(`v1/maintenancePayments/${id}/actions/paymentReceived`).then(\n () => resolve(),\n (error) => reject(error)\n )\n })\n },\n getTransactions (id) {\n return new Promise((resolve, reject) => {\n ApiFactory.get(`v1/maintenancePayments/${id}/actions/getTransactions`).then(\n (response) => resolve(response.data.data),\n (error) => reject(error)\n )\n })\n }\n}\n"],"sourceRoot":""}