{"version":3,"sources":["webpack:///../../../src/components/VFileInput/VFileInput.ts","webpack:///../../../src/components/VTextField/index.ts","webpack:///./src/admin/views/cobrancas/importar/importar-list.scss?477a","webpack:///./src/admin/views/cobrancas/importar/importar-list.vue?abbd","webpack:///./src/admin/views/cobrancas/importar/importar-list.ts","webpack:///./src/admin/views/cobrancas/importar/importar-list.ts?5d58","webpack:///./src/admin/views/cobrancas/importar/importar-list.vue"],"names":["name","model","prop","event","props","chips","clearable","type","default","counterSizeString","counterString","placeholder","prependIcon","readonly","showSize","Boolean","validator","v","includes","smallChips","truncateLength","Number","value","val","computed","classes","computedCounterValue","fileCount","this","isMultiple","lazyValue","$vuetify","lang","t","bytes","internalArrayValue","reduce","size","base","internalValue","get","set","isDirty","length","isLabelActive","$attrs","hasOwnProperty","text","map","file","truncatedText","hasChips","watch","handler","immediate","$refs","input","methods","clearableCallback","genChips","small","on","genInput","genPrependSlot","icon","genIcon","genSlot","genSelectionText","genSelections","children","$scopedSlots","index","$createElement","staticClass","class","selection","genTextFieldSlot","node","click","onInput","files","e","onKeyDown","truncateText","str","charsKeepOneSide","Math","render","_vm","_h","_c","_self","attrs","_v","callback","$$v","arquivo","expression","$event","validar","importarCobrancas","cobrancas","importar","_e","headers","loading","staticRenderFns","refs","options","search","dialog","formTitle","errors","isEdit","selectAll","GuidEmpty","empty","items","content","File","formData","FormData","pagedListOfCobrancaListDto","totalCount","append","rs4Service","postFile","then","response","post","qtde","registros","fire","position","title","showConfirmButton","timer","date","format","components","Datepicker","component","VCard","VCol","VDataTable","VFileInput","VIcon","VRow"],"mappings":"2zDAgBe,qBAAkB,CAC/BA,KAD+B,eAG/BC,MAAO,CACLC,KADK,QAELC,MAAO,UAGTC,MAAO,CACLC,MADK,QAELC,UAAW,CACTC,KADS,QAETC,SAAS,GAEXC,kBAAmB,CACjBF,KADiB,OAEjBC,QAAS,kCAEXE,cAAe,CACbH,KADa,OAEbC,QAAS,8BAEXG,YAdK,OAeLC,YAAa,CACXL,KADW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,YAAazB,MAAO,aAC5B,CAAEyB,KAAM,OAAQzB,MAAO,QACvB,CAAEyB,KAAM,MAAOzB,MAAO,OACtB,CAAEyB,KAAM,QAASzB,MAAO,SACxB,CAAEyB,KAAM,QAASzB,MAAO,kBACxB,CAAEyB,KAAM,WAAYzB,MAAO,YAC3B,CAAEyB,KAAM,aAAczB,MAAO,uBA1BzC,GAAmD,QAA9B,EAAqB,gBALzC,eAAU,CACNqH,WAAY,CACPC,WAAA,WAGW,WCbiW,I,qHCQlXC,EAAY,eACd,EACAtD,EACAmB,GACA,EACA,KACA,WACA,MAIa,aAAAmC,EAAiB,QAUhC,IAAkBA,EAAW,CAACC,QAAA,KAAMC,OAAA,KAAKC,aAAA,KAAWC,aAAA,KAAWC,QAAA,KAAMC,OAAA","file":"js/chunk-26664eac.846a08ad.js","sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Extensions\nimport VTextField from '../VTextField'\n\n// Components\nimport { VChip } from '../VChip'\n\n// Types\nimport { PropValidator } from 'vue/types/options'\n\n// Utilities\nimport { deepEqual, humanReadableFileSize, wrapInArray } from '../../util/helpers'\nimport { consoleError } from '../../util/console'\n\nexport default VTextField.extend({\n name: 'v-file-input',\n\n model: {\n prop: 'value',\n event: 'change',\n },\n\n props: {\n chips: Boolean,\n clearable: {\n type: Boolean,\n default: true,\n },\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n placeholder: String,\n prependIcon: {\n type: String,\n default: '$file',\n },\n readonly: {\n type: Boolean,\n default: false,\n },\n showSize: {\n type: [Boolean, Number],\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(v)\n )\n },\n } as PropValidator,\n smallChips: Boolean,\n truncateLength: {\n type: [Number, String],\n default: 22,\n },\n type: {\n type: String,\n default: 'file',\n },\n value: {\n default: undefined,\n validator: val => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n } as PropValidator,\n },\n\n computed: {\n classes (): object {\n return {\n ...VTextField.options.computed.classes.call(this),\n 'v-file-input': true,\n }\n },\n computedCounterValue (): string {\n const fileCount = (this.isMultiple && this.lazyValue)\n ? this.lazyValue.length\n : (this.lazyValue instanceof File) ? 1 : 0\n\n if (!this.showSize) return this.$vuetify.lang.t(this.counterString, fileCount)\n\n const bytes = this.internalArrayValue.reduce((bytes: number, { size = 0 }: File) => {\n return bytes + size\n }, 0)\n\n return this.$vuetify.lang.t(\n this.counterSizeString,\n fileCount,\n humanReadableFileSize(bytes, this.base === 1024)\n )\n },\n internalArrayValue (): File[] {\n return wrapInArray(this.internalValue)\n },\n internalValue: {\n get (): File[] {\n return this.lazyValue\n },\n set (val: File | File[]) {\n this.lazyValue = val\n this.$emit('change', this.lazyValue)\n },\n },\n isDirty (): boolean {\n return this.internalArrayValue.length > 0\n },\n isLabelActive (): boolean {\n return this.isDirty\n },\n isMultiple (): boolean {\n return this.$attrs.hasOwnProperty('multiple')\n },\n text (): string[] {\n if (!this.isDirty) return [this.placeholder]\n\n return this.internalArrayValue.map((file: File) => {\n const {\n name = '',\n size = 0,\n } = file\n\n const truncatedText = this.truncateText(name)\n\n return !this.showSize\n ? truncatedText\n : `${truncatedText} (${humanReadableFileSize(size, this.base === 1024)})`\n })\n },\n base (): 1000 | 1024 | undefined {\n return typeof this.showSize !== 'boolean' ? this.showSize : undefined\n },\n hasChips (): boolean {\n return this.chips || this.smallChips\n },\n },\n\n watch: {\n readonly: {\n handler (v) {\n if (v === true) consoleError('readonly is not supported on ', this)\n },\n immediate: true,\n },\n value (v) {\n const value = this.isMultiple ? v : v ? [v] : []\n if (!deepEqual(value, this.$refs.input.files)) {\n // When the input value is changed programatically, clear the\n // internal input's value so that the `onInput` handler\n // can be triggered again if the user re-selects the exact\n // same file(s). Ideally, `input.files` should be\n // manipulated directly but that property is readonly.\n this.$refs.input.value = ''\n }\n },\n },\n\n methods: {\n clearableCallback () {\n this.internalValue = this.isMultiple ? [] : undefined\n this.$refs.input.value = ''\n },\n genChips () {\n if (!this.isDirty) return []\n\n return this.text.map((text, index) => this.$createElement(VChip, {\n props: { small: this.smallChips },\n on: {\n 'click:close': () => {\n const internalValue = this.internalValue\n internalValue.splice(index, 1)\n this.internalValue = internalValue // Trigger the watcher\n },\n },\n }, [text]))\n },\n genInput () {\n const input = VTextField.options.methods.genInput.call(this)\n\n // We should not be setting value\n // programmatically on the input\n // when it is using type=\"file\"\n delete input.data!.domProps!.value\n\n // This solves an issue in Safari where\n // nothing happens when adding a file\n // do to the input event not firing\n // https://github.com/vuetifyjs/vuetify/issues/7941\n delete input.data!.on!.input\n input.data!.on!.change = this.onInput\n\n return [this.genSelections(), input]\n },\n genPrependSlot () {\n if (!this.prependIcon) return null\n\n const icon = this.genIcon('prepend', () => {\n this.$refs.input.click()\n })\n\n return this.genSlot('prepend', 'outer', [icon])\n },\n genSelectionText (): string[] {\n const length = this.text.length\n\n if (length < 2) return this.text\n if (this.showSize && !this.counter) return [this.computedCounterValue]\n return [this.$vuetify.lang.t(this.counterString, length)]\n },\n genSelections () {\n const children = []\n\n if (this.isDirty && this.$scopedSlots.selection) {\n this.internalArrayValue.forEach((file: File, index: number) => {\n if (!this.$scopedSlots.selection) return\n\n children.push(\n this.$scopedSlots.selection({\n text: this.text[index],\n file,\n index,\n })\n )\n })\n } else {\n children.push(this.hasChips && this.isDirty ? this.genChips() : this.genSelectionText())\n }\n\n return this.$createElement('div', {\n staticClass: 'v-file-input__text',\n class: {\n 'v-file-input__text--placeholder': this.placeholder && !this.isDirty,\n 'v-file-input__text--chips': this.hasChips && !this.$scopedSlots.selection,\n },\n }, children)\n },\n genTextFieldSlot () {\n const node = VTextField.options.methods.genTextFieldSlot.call(this)\n\n node.data!.on = {\n ...(node.data!.on || {}),\n click: () => this.$refs.input.click(),\n }\n\n return node\n },\n onInput (e: Event) {\n const files = [...(e.target as HTMLInputElement).files || []]\n\n this.internalValue = this.isMultiple ? files : files[0]\n\n // Set initialValue here otherwise isFocused\n // watcher in VTextField will emit a change\n // event whenever the component is blurred\n this.initialValue = this.internalValue\n },\n onKeyDown (e: KeyboardEvent) {\n this.$emit('keydown', e)\n },\n truncateText (str: string) {\n if (str.length < Number(this.truncateLength)) return str\n const charsKeepOneSide = Math.floor((Number(this.truncateLength) - 1) / 2)\n return `${str.slice(0, charsKeepOneSide)}…${str.slice(str.length - charsKeepOneSide)}`\n },\n },\n})\n","import VTextField from './VTextField'\n\nexport { VTextField }\nexport default VTextField\n","import mod from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./importar-list.scss?vue&type=style&index=0&id=e71e7460&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./importar-list.scss?vue&type=style&index=0&id=e71e7460&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('form',{attrs:{\"enctype\":\"multipart/form-data\"}},[_c('CCard',{staticClass:\"mb-0\"},[_c('CCardBody',{staticClass:\"pa-0\"},[_c('v-row',{staticClass:\"pb-0\"},[_c('v-col',{staticClass:\"pb-0 pl-10 pt-5\",attrs:{\"cols\":\"3\"}},[_c('h2',{staticClass:\"pt-2\"},[_vm._v(\"Importar Cobranças\")])])],1)],1)],1),_c('v-card',[_c('CCardBody',{staticClass:\"pt-0\"},[_c('v-row',{staticClass:\"pa-0\"},[_c('CCol',{staticClass:\"pb-0\",attrs:{\"col\":\"5\"}},[_c('v-file-input',{attrs:{\"label\":\"Selecione um arquivo\",\"accept\":\".csv\",\"id\":\"formFile\",\"type\":\"file\",\"labe\":\"Selecione um arquivo\"},model:{value:(_vm.arquivo),callback:function ($$v) {_vm.arquivo=$$v},expression:\"arquivo\"}})],1),_c('CCol',{staticClass:\"pt-5\",attrs:{\"col\":\"2\"}},[_c('CButton',{attrs:{\"color\":\"success\",\"variant\":\"outline\"},on:{\"click\":function($event){return _vm.validar()}}},[_c('v-icon',[_vm._v(\"fas fa-folder-open\")]),_vm._v(\" Carregar \")],1)],1),_c('CCol',{staticClass:\"pt-5 right\",attrs:{\"col\":\"2\"}},[(_vm.importarCobrancas.cobrancas.length > 0)?_c('CButton',{attrs:{\"color\":\"success\",\"variant\":\"outline\"},on:{\"click\":function($event){return _vm.importar()}}},[_c('v-icon',[_vm._v(\"fas fa-file-upload\")]),_vm._v(\" Importar \")],1):_vm._e()],1)],1),_c('v-data-table',{staticClass:\"elevation-1\",attrs:{\"headers\":_vm.headers,\"items\":_vm.importarCobrancas.cobrancas,\"loading\":_vm.loading}})],1)],1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Rs4ComponentBase from '@/shared/application/rs4-component-base';\r\nimport Component from \"vue-class-component\";\r\nimport { Watch } from \"vue-property-decorator\";\r\nimport Guid from '@/shared/helpers/guid-helper';\r\nimport Datepicker from 'vuejs-datepicker';\r\nimport moment from 'moment';\r\nimport Swal from 'sweetalert2';\r\n\r\n@Component({\r\n components: {\r\n Datepicker\r\n }\r\n})\r\nexport default class CobrancaListComponent extends Rs4ComponentBase {\r\n refs = this.$refs as any;\r\n loading = false;\r\n options = {};\r\n search = '';\r\n dialog = false;\r\n formTitle = '';\r\n errors: INameValueDto[] = [];\r\n isEdit = false;\r\n selectAll = false;\r\n GuidEmpty = Guid.empty;\r\n\r\n items = [];\r\n content = '';\r\n\r\n arquivo: File = new File([], \"\");\r\n formData: FormData = new FormData();\r\n\r\n get headers() {\r\n return [\r\n { text: 'Matrícula', value: 'matricula' },\r\n { text: 'Nome', value: 'nome' },\r\n { text: 'CPF', value: 'cpf' },\r\n { text: 'Email', value: 'email' }, \r\n { text: 'Valor', value: 'valorDocumento' },\r\n { text: 'Endereço', value: 'endereco' }, \r\n { text: 'Vencimento', value: 'dataVencimento' }, \r\n ];\r\n }\r\n\r\n pagedListOfCobrancaListDto: IPagedList = {\r\n totalCount: 0,\r\n items: []\r\n };\r\n\r\n importarCobrancas: IImportarCobrancaInput = {\r\n cobrancas: []\r\n }\r\n\r\n \r\n mounted() {\r\n this.importarCobrancas.cobrancas = [];\r\n }\r\n\r\n validar(){\r\n debugger; \r\n this.formData = new FormData();\r\n this.formData.append(\"formFile\", this.arquivo)\r\n\r\n this.rs4Service.postFile('/api/cobranca/validar-planilha', this.formData)\r\n .then((response) => {\r\n debugger;\r\n //this.pagedListOfCobrancaListDto = response.content as IPagedList;\r\n //this.items = response.content;\r\n this.importarCobrancas.cobrancas = response.content;\r\n });\r\n }\r\n\r\n importar(){\r\n debugger;\r\n this.rs4Service.post('/api/cobranca/importar-planilha', \r\n this.importarCobrancas)\r\n .then((response) => {\r\n let qtde = response.content.registros;\r\n\r\n if (qtde > 0)\r\n {\r\n Swal.fire({\r\n position: \"center\",\r\n icon: \"success\",\r\n title: `Realizado a importação de ${qtde} cobranças!`,\r\n showConfirmButton: false,\r\n timer: 2000\r\n });\r\n this.importarCobrancas.cobrancas = [];\r\n this.arquivo = new File([], \"\");\r\n } \r\n else\r\n {\r\n Swal.fire({\r\n position: \"center\",\r\n icon: \"error\",\r\n title: `Nenhuma cobrança importada`,\r\n showConfirmButton: false,\r\n timer: 2000\r\n }) \r\n } \r\n \r\n });\r\n } \r\n formatDate (date: string) {\r\n if (date)\r\n return moment(date).format(\"DD/MM/YYYY\")\r\n else\r\n return \"\"\r\n }\r\n \r\n\r\n}\r\n\r\n\r\n\r\n\r\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--13-0!../../../../../node_modules/ts-loader/index.js??ref--13-3!./importar-list.ts?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--13-0!../../../../../node_modules/ts-loader/index.js??ref--13-3!./importar-list.ts?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./importar-list.vue?vue&type=template&id=e71e7460&scoped=true&\"\nimport script from \"./importar-list.ts?vue&type=script&lang=js&\"\nexport * from \"./importar-list.ts?vue&type=script&lang=js&\"\nimport style0 from \"./importar-list.scss?vue&type=style&index=0&id=e71e7460&lang=scss&scoped=true&\"\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 \"e71e7460\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VFileInput } from 'vuetify/lib/components/VFileInput';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VCard,VCol,VDataTable,VFileInput,VIcon,VRow})\n"],"sourceRoot":""}