{"version":3,"sources":["webpack:///./src/mixins/modal.mixin.ts","webpack:///./src/mixins/table.mixin.ts","webpack:///./src/pages/accounting/balance-payment-report/balance-payment-report.shell.vue?d641","webpack:///./src/pages/accounting/balance-payment-report/update-payment.modal.vue?69a5","webpack:///./src/pages/accounting/balance-payment-report/update-payment.modal.vue","webpack:///./src/pages/accounting/balance-payment-report/update-payment.modal.vue?ca27","webpack:///./src/pages/accounting/balance-payment-report/update-payment.modal.vue?be28","webpack:///./src/pages/accounting/balance-payment-report/balance-payment-report.shell.vue","webpack:///./src/pages/accounting/balance-payment-report/balance-payment-report.shell.vue?057f","webpack:///./src/pages/accounting/balance-payment-report/balance-payment-report.shell.vue?148f","webpack:///./src/pages/accounting/balance-payment-report/balance-payment-report.shell.vue?2b86"],"names":["ModalMixin","_Vue","_inherits","_super","_createSuper","_this","_classCallCheck","loading","_createClass","key","value","form","fields","Promise","resolve","data","_this$form","_this2","this","mode","getForm","then","_ref","$emit","setFields","finally","reset","_onSubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","params","options","_this3","wrap","_context","prev","next","preSubmit","submit","lang","res","openSync","stop","onSubmit","_x","_x2","apply","arguments","get","id","Vue","__decorate","PropSync","Prop","type","String","Watch","immediate","Component","TableMixin","modal","open","length","undefined","$refs","table","refresh","render","_vm","_h","$createElement","_c","_self","attrs","on","$event","$set","onUpdateData","ref","staticClass","filters","columns","query","scopedSlots","_u","fn","props","_v","_s","cleanFilters","proxy","staticStyle","openModal","row","redirectToPayment","staticRenderFns","balancePaymentId","slot","$t","Date","setHours","model","callback","$$v","expression","_n","_e","UpdatePaymentModal","_Mixins","isOpen","compass","do","$crsForm","paymentDate","amount","currency","order","note","Mixins","component","BalancePaymentShell","filter","populate","path","select","i18n","locale","label","$i18n","t","fieldName","start","end","optionName","user","concat","name","surname","clearable","optionValue","namespace","action","sortable","field","_row$order","orderNumber","_row$order2","_row$order2$customer","_row$order3","_row$order3$customer","customer","_row$agent","_row$agent2","agent","$formatDate","book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Q,SAAA0C,OAAQ1C,EAAIqB,OAAO0C,QAAQ,IAAM,EAAC,KAAArB,OAAI1C,EAAIsB,UAAY,MAUxE,CACEY,MAAO,cACPS,KAAM,MACNM,UAAU,GAGZ,CACEf,MAAO,kBACPS,KAAM,UACNM,UAAU,IAEZ3I,EA4BD,OACFG,EAAAkH,EAAA,EAAAjH,IAAA,oBAAAC,MAAA,SA3BmBqF,GAChB7E,KAAK6I,QAAQC,KAAK,CAChBtB,KAAM,wBACN1G,OAAQ,CAAEkE,iBAAkBH,EAAI5C,GAAcA,GAAK4C,EAAIuB,MAAcnE,QAExE,CAAA1C,IAAA,eAAAC,MAAA,WAGCQ,KAAKgE,QAAUhE,KAAKgE,QAAQ+E,KAAI,SAACC,GAC/B,OAAQA,EAAE1G,MACR,IAAK,SAEH,OADA0G,EAAExJ,MAAQ,KACHwJ,EACT,IAAK,SAEH,OADAA,EAAExJ,MAAQ,GACHwJ,EACT,IAAK,aAEH,OADAA,EAAExJ,MAAQ,CAAE2H,MAAO,GAAIC,IAAK,IACrB4B,EACT,IAAK,OAEH,OADAA,EAAExJ,MAAQ,CAAE2H,MAAO,GAAIC,IAAK,IACrB4B,EACT,QACE,OAAOA,UAGdxC,EAtIqC,CAASF,eAAO3D,SAAnC6D,EAAmBrE,eAAA,CALvCO,eAAU,CACTuG,WAAY,CACVC,YAGiB1C,WCpDsqB,ICQvrB,G,UAAY,eACd,EACArD,EACA4B,GACA,EACA,KACA,KACA,OAIa,e,sECnBf","file":"js/chunk-01502059.c5e2b64f.js","sourcesContent":["import { CrsAction, CrsForm } from '@resclick/crs-ui';\nimport { API } from '@resclick/compass';\nimport Vue from 'vue';\nimport { Component, Prop, PropSync, Watch } from 'vue-property-decorator';\n\n@Component\nexport default class ModalMixin extends Vue {\n @PropSync('open') openSync!: boolean;\n @Prop({ type: String }) id!: string;\n loading = false;\n form!: CrsForm;\n\n get mode(): unknown {\n return this.id ? 'update' : 'create';\n }\n\n data() {\n return {\n form: { fields: {} },\n };\n }\n\n getForm(): Promise<{ data: any }> {\n return new Promise((resolve) => resolve({ data: {} }));\n }\n\n @Watch('open', { immediate: true })\n onOpen(value: boolean) {\n if (value && this.mode === 'update' && typeof this.getForm === 'function') {\n this.loading = true;\n this.getForm()\n .then(({ data }: { data: any }) => {\n this.$emit('beforeFormPopulation', data);\n this.form.setFields(data);\n this.$emit('afterFormPopulation', data);\n })\n .finally(() => {\n this.loading = false;\n });\n } else {\n this.form?.reset && this.form.reset();\n }\n }\n\n async onSubmit(\n params?: CrsAction extends { params: any }\n ? { [K in CrsAction['params'][number]]: unknown }\n : undefined,\n options?: { lang?: string /* currency?: string*/ },\n ) {\n if ((this as any).preSubmit) {\n await (this as any).preSubmit();\n }\n this.loading = true;\n this.form\n .submit({ params, lang: options?.lang /* currency: options?.currency */ })\n .then((res: any) => {\n this.$emit('update-data', res.data);\n this.openSync = false;\n })\n .finally(() => (this.loading = false));\n }\n}\n","import Vue from 'vue';\nimport { Component } from 'vue-property-decorator';\n\n@Component\nexport default class TableMixin extends Vue {\n $refs!: {\n table: Vue & {\n refresh: () => void;\n };\n };\n\n modal = {\n open: false,\n id: '',\n };\n\n openModal(id = '') {\n this.modal.id = id;\n this.modal.open = true;\n }\n\n onUpdateData() {\n this.modal.open = false;\n this.$refs.table.refresh();\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('layout',{attrs:{\"name\":\"default\"}},[_c('modal',{attrs:{\"id\":_vm.modal.id,\"open\":_vm.modal.open},on:{\"update:open\":function($event){return _vm.$set(_vm.modal, \"open\", $event)},\"update-data\":function($event){return _vm.onUpdateData()}}}),_c('toolbar'),_c('q-data-table',{ref:\"table\",staticClass:\"q-px-md\",attrs:{\"filters\":_vm.filters,\"columns\":_vm.columns,\"query\":_vm.query,\"action\":\"findBalancePayment\",\"namespace\":\"payments\"},scopedSlots:_vm._u([{key:\"body-cell\",fn:function(props){return [_c('q-td',{attrs:{\"auto-width\":true,\"props\":props}},[_vm._v(\" \"+_vm._s(props.value)+\" \")])]}},{key:\"top-right\",fn:function(){return [_c('q-btn',{attrs:{\"color\":\"blue\",\"icon\":\"mdi-cancel\",\"label\":\"Clean Filters\",\"flat\":\"\",\"no-caps\":\"\"},on:{\"click\":_vm.cleanFilters}})]},proxy:true},{key:\"body-cell-actions\",fn:function(props){return [_c('q-td',{staticStyle:{\"text-align\":\"center\"},attrs:{\"auto-width\":true,\"props\":props}},[_c('q-btn',{attrs:{\"color\":\"primary\",\"dense\":\"\",\"no-caps\":\"\",\"flat\":\"\",\"icon\":\"mdi-pencil\"},on:{\"click\":function($event){return _vm.openModal(props.row.id)}}})],1)]}},{key:\"body-cell-pay\",fn:function(props){return [_c('q-td',{staticStyle:{\"text-align\":\"center\"},attrs:{\"auto-width\":true,\"props\":props}},[_c('q-btn',{attrs:{\"color\":\"positive\",\"icon\":\"mdi-cash-plus\",\"dense\":\"\",\"no-caps\":\"\",\"flat\":\"\"},on:{\"click\":function($event){return _vm.redirectToPayment(props.row)}}})],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('entity-modal',{attrs:{\"loading\":_vm.loading,\"open\":_vm.openSync,\"content-style\":\"max-width: 1200px\"},on:{\"update:open\":function($event){_vm.openSync=$event},\"submit\":function($event){return _vm.onSubmit({ balancePaymentId: _vm.id })},\"open:update\":function($event){_vm.openSync = $event}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(_vm._s(_vm.$t('GENERAL.CONVERT_PAYMENT')))]),(_vm.form.fields)?_c('q-form',{attrs:{\"autocapitalize\":\"off\",\"autocomplete\":\"off\",\"autocorrect\":\"off\",\"spellcheck\":\"false\"}},[_c('div',{staticClass:\"row q-col-gutter-sm\"},[_c('div',{staticClass:\"col-12\"},[_c('q-date-input',{attrs:{\"label\":_vm.$t('GENERAL.PAYMENT_DATE'),\"min\":new Date().setHours(0, 0, 0, 0),\"dense\":\"\"},model:{value:(_vm.form.fields.paymentDate),callback:function ($$v) {_vm.$set(_vm.form.fields, \"paymentDate\", $$v)},expression:\"form.fields.paymentDate\"}})],1),_c('div',{staticClass:\"col-6\"},[_c('q-select-dynamic',{attrs:{\"label\":_vm.$t('GENERAL.CURRENCY'),\"action\":\"find\",\"dense\":\"\",\"emit-value\":\"\",\"map-options\":\"\",\"namespace\":\"currencies\",\"option-label\":\"name\",\"option-value\":\"code\"},model:{value:(_vm.form.fields.currency),callback:function ($$v) {_vm.$set(_vm.form.fields, \"currency\", $$v)},expression:\"form.fields.currency\"}})],1),_c('div',{staticClass:\"col-6\"},[_c('q-input',{attrs:{\"min\":0.1,\"label\":_vm.$t('GENERAL.AMOUNT'),\"dense\":\"\"},model:{value:(_vm.form.fields.amount),callback:function ($$v) {_vm.$set(_vm.form.fields, \"amount\", _vm._n($$v))},expression:\"form.fields.amount\"}})],1),_c('div',{staticClass:\"col-12\"},[_c('q-input',{attrs:{\"label\":_vm.$t('GENERAL.NOTE'),\"dense\":\"\"},model:{value:(_vm.form.fields.note),callback:function ($$v) {_vm.$set(_vm.form.fields, \"note\", $$v)},expression:\"form.fields.note\"}})],1)])]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport ModalMixin from '@/mixins/modal.mixin';\nimport { CrsForm } from '@resclick/crs-ui';\nimport { compass } from '@resclick/compass';\nimport { Component, Mixins, Watch } from 'vue-property-decorator';\n\n@Component({})\nexport default class UpdatePaymentModal extends Mixins(ModalMixin) {\n form!: CrsForm<'payments', 'updateBalancePayment'>;\n\n @Watch('open')\n onInit(isOpen: boolean) {\n if (isOpen) {\n compass\n .do('payments', 'findOneBalancePayment', {\n // TODO: ...\n params: { balancePaymentId: this.id },\n })\n .then((res) => {\n this.form = this.$crsForm('payments', 'updateBalancePayment', res.data);\n });\n } else {\n this.form = this.$crsForm('payments', 'updateBalancePayment', {\n paymentDate: new Date(),\n amount: 0,\n currency: 'TRY',\n order: '',\n note: '',\n });\n }\n }\n}\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-3!../../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./update-payment.modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-3!../../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./update-payment.modal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./update-payment.modal.vue?vue&type=template&id=2aca392e&\"\nimport script from \"./update-payment.modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./update-payment.modal.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Mixins } from 'vue-property-decorator';\nimport TableMixin from '@/mixins/table.mixin';\nimport Modal from './update-payment.modal.vue';\nimport { IPaymentBalance } from '@resclick/data-access';\nimport { i18n } from '@/i18n';\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class BalancePaymentShell extends Mixins(TableMixin) {\n query = {\n filter: {},\n populate: [\n {\n path: 'order',\n select: ['orderNumber', 'customer'],\n populate: [{ path: 'customer', select: ['name', 'surname'] }],\n },\n { path: 'agent', select: ['name', 'surname'] },\n ],\n currency: i18n.locale,\n };\n\n filters = [\n { label: this.$i18n.t('GENERAL.VOUCHER'), type: 'number', fieldName: 'orderNumber' },\n {\n label: this.$i18n.t('GENERAL.PAYMENT_DATE'),\n type: 'date-range',\n value: { start: new Date(), end: new Date() },\n fieldName: 'paymentDate',\n },\n {\n label: this.$i18n.t('GENERAL.CHECK_IN'),\n type: 'date-range',\n value: { start: null, end: null },\n fieldName: 'products.checkInDate',\n },\n {\n label: this.$i18n.t('GENERAL.CHECK_OUT'),\n type: 'date-range',\n value: { start: null, end: null },\n fieldName: 'products.checkOutDate',\n },\n {\n label: this.$i18n.t('GENERAL.AGENT'),\n type: 'selectDynamic',\n value: null,\n optionName: (user: any) => {\n return `${user.name} ${user.surname}`;\n },\n clearable: true,\n query: { select: ['name', 'surname'] },\n optionValue: 'id',\n fieldName: 'agent',\n namespace: 'users',\n action: 'find',\n },\n ];\n\n columns = [\n {\n label: 'GENERAL.ORDER',\n name: 'orderNumber',\n sortable: true,\n field: (row: any) => row.order?.orderNumber,\n },\n {\n label: 'GENERAL.CUSTOMER',\n name: 'customer',\n sortable: true,\n field: (row: any) => `${row.order?.customer?.name || ''} ${row.order?.customer?.surname || ''}`,\n },\n {\n label: 'GENERAL.AGENT',\n name: 'agent',\n sortable: true,\n field: (row: any) => `${row.agent?.name || ''} ${row.agent?.surname || ''}`,\n },\n {\n label: 'GENERAL.BOOKING_DATE',\n name: 'bookingDate',\n sortable: true,\n field: (row: any) => row.order && this.$formatDate(row.order.bookingDate),\n },\n {\n label: 'GENERAL.PAYMENT_DATE',\n name: 'paymentDate',\n sortable: true,\n field: (row: any) => row.paymentDate && this.$formatDate(row.paymentDate),\n },\n {\n label: 'GENERAL.AMOUNT',\n name: 'amount',\n sortable: true,\n field: (row: any) => `${row.amount.toFixed(2) || 0} ${row.currency || ''}`,\n },\n /*\n {\n label: 'GENERAL.DEDUCTION_AMOUNT',\n name: 'amount',\n sortable: true,\n field: (row: any) => `${row.deductionAmount || 0} ${row.currency || ''}`,\n },\n */\n {\n label: 'GENERAL.PAY',\n name: 'pay',\n sortable: true,\n },\n\n {\n label: 'GENERAL.ACTIONS',\n name: 'actions',\n sortable: true,\n },\n ];\n\n redirectToPayment(row: IPaymentBalance & { order: string }) {\n this.$router.push({\n name: 'payments-with-balance',\n params: { balancePaymentId: row.id as string, id: (row.order as any).id },\n });\n }\n\n cleanFilters() {\n this.filters = this.filters.map((f: any) => {\n switch (f.type) {\n case 'number':\n f.value = null;\n return f;\n case 'string':\n f.value = '';\n return f;\n case 'date-range':\n f.value = { start: '', end: '' };\n return f;\n case 'date':\n f.value = { start: '', end: '' };\n return f;\n default:\n return f;\n }\n });\n }\n}\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-3!../../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./balance-payment-report.shell.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/babel-loader/lib/index.js!../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-3!../../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./balance-payment-report.shell.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./balance-payment-report.shell.vue?vue&type=template&id=9b1bfda2&\"\nimport script from \"./balance-payment-report.shell.vue?vue&type=script&lang=ts&\"\nexport * from \"./balance-payment-report.shell.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./balance-payment-report.shell.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./balance-payment-report.shell.vue?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}