{"version":3,"sources":["webpack:///./src/screens/private-template-content/list-relationship-tree/index.vue","webpack:///./src/screens/private-template-content/list-relationship-tree/scripts.js","webpack:///./src/screens/private-template-content/list-relationship-tree/scripts.js?a076","webpack:///./src/screens/private-template-content/list-relationship-tree/index.vue?d9ae"],"names":["render","_vm","this","_c","_self","_setupProxy","staticClass","class","showMoreInfo","isMobile","attrs","_t","staticStyle","on","$event","redirectToNewRelationshipTree","slot","_v","_e","model","value","datePickerValues","callback","$$v","expression","preventDefault","isValidCpfOrCnpj","cpfOrCnpj","name","disabled","isLoading","cleanFilters","loading","Object","keys","length","getAllRelationshipTree","isDesktop","filterGetterAllRelationshipTrees","headersList","getterAllRelationshipTrees","totalResults","sizePerPage","paramFilter","page","onClickItemDatatable","staticRenderFns","components","AvatarInformationsDrawer","CustomDatePicker","InputField","CustomTable","DataNotFound","data","text","alignHeader","alignData","clientType","ClientType","computed","mapGetters","results","watch","val","mounted","methods","mapActions","mapMutations","item","SET_SELECTED_RELATIONSHIP_TREE","$router","push","params","id","splitDateToFormat","date","indicator","result","day","month","year","values","startDate","Date","setDate","getDate","moment","format","startDateFormated","split","endDate","endDateFormated","document","removeSpecialCharacters","size","idClient","getterAccount","client","actionGetAllRelationshipTrees","then","catch","sendToast","type","setToDefault","setTimeout","component"],"mappings":"yJAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAOF,EAAG,UAAU,CAACG,YAAY,eAAeC,MAAM,CAAE,aAAgBN,EAAIO,cAAgBP,EAAIQ,UAAWC,MAAM,CAAC,GAAK,qCAAqC,CAACT,EAAIU,GAAG,WAAWR,EAAG,6BAA6B,CAACO,MAAM,CAAC,YAAc,KAAK,CAACP,EAAG,SAAS,CAACG,YAAY,+BAA+BM,YAAY,CAAC,MAAQ,SAASF,MAAM,CAAC,KAAO,sBAAsBG,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOb,EAAIc,kCAA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BxB,KAAKM,aAAeN,KAAK4B,UAAY5B,KAAKM,cAAe,EACjFN,KAAKmB,iBAAmB,OC1JkR,I,YCO5SoF,EAAY,eACd,EACAzG,EACA8C,GACA,EACA,KACA,KACA,MAIa,aAAA2D,E","file":"js/chunk-2d20744e.ec379918.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('section',{staticClass:\"listing-page\",class:{ 'infoIsOpened': _vm.showMoreInfo && _vm.isMobile },attrs:{\"id\":\"container-list-relationship-tree\"}},[_vm._t(\"default\"),_c('avatar-informations-drawer',{attrs:{\"minimizable\":\"\"}},[_c('button',{staticClass:\"generic-button primary-green\",staticStyle:{\"color\":\"black\"},attrs:{\"slot\":\"action-main-button\"},on:{\"click\":function($event){return _vm.redirectToNewRelationshipTree()}},slot:\"action-main-button\"},[_vm._v(\"\\n Adicionar árvore\\n \")]),_c('section',{staticClass:\"wrapper-content-avatar-informations-drawer\",attrs:{\"slot\":\"content\"},slot:\"content\"},[(_vm.isMobile)?_c('div',{staticClass:\"container-main-title-drawer\"},[_c('h2',[_vm._v(\"Acompanhe \"),_c('br'),_vm._v(\" suas árvores de relacionametos.\")]),_c('p',[_vm._v(\"\\n Análise seu histórico, veja o status das suas árvores de relacionametos e baixe seu dossiê!\\n \")])]):_vm._e(),_c('p',{staticClass:\"title-filtro\"},[_vm._v(\"Filtro de histórico de árvores\")]),_c('section',[(_vm.isMobile)?_c('button',{staticClass:\"btn-collapse\",on:{\"click\":function($event){_vm.showMoreInfo = !_vm.showMoreInfo}}}):_vm._e()]),_c('section',{staticClass:\"container-drawer-fields\"},[_c('custom-date-picker',{staticStyle:{\"background\":\"rgb(236 234 234 / 35%) 20px center no-repeat\",\"border-radius\":\"6px\"},attrs:{\"mode\":\"range\",\"exec-on-mounted\":\"\",\"light\":\"\"},model:{value:(_vm.datePickerValues),callback:function ($$v) {_vm.datePickerValues=$$v},expression:\"datePickerValues\"}}),_c('form',{staticClass:\"generic-form\",attrs:{\"novalidate\":\"\"},on:{\"submit\":function($event){$event.preventDefault();}}},[_c('input-field',{staticStyle:{\"background\":\"rgb(236 234 234 / 35%) 20px center no-repeat\",\"border-radius\":\"6px\"},attrs:{\"light\":\"\",\"type\":\"cpfOrCnpj\",\"title\":\"CPF/CNPJ\"},on:{\"valid\":(value) => _vm.isValidCpfOrCnpj = value},model:{value:(_vm.cpfOrCnpj),callback:function ($$v) {_vm.cpfOrCnpj=$$v},expression:\"cpfOrCnpj\"}}),_c('input-field',{staticStyle:{\"background\":\"rgb(236 234 234 / 35%) 20px center no-repeat\",\"border-radius\":\"6px\"},attrs:{\"light\":\"\",\"title\":\"Nome da árvore\"},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:\"name\"}}),_c('div',{staticClass:\"action-buttons\"},[_c('button',{staticClass:\"generic-button secondary-border-white bg-trans\",class:{ disabled: _vm.isLoading },staticStyle:{\"margin-top\":\"4rem\"},attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.cleanFilters()}}},[_vm._v(\"\\n Limpar filtros\\n \")]),_c('button',{staticClass:\"generic-button primary-green\",class:{ loading: _vm.isLoading, disabled: Object.keys(_vm.datePickerValues).length === 0 || (_vm.cpfOrCnpj !== '' && !_vm.isValidCpfOrCnpj) },staticStyle:{\"margin-top\":\"4rem\"},attrs:{\"type\":\"submit\"},on:{\"click\":function($event){return _vm.getAllRelationshipTree()}}},[_vm._v(\"\\n Filtrar\\n \")])])],1)],1)])]),_c('div',{staticClass:\"container-content-page\"},[(_vm.isDesktop)?_c('header',{staticClass:\"private-main-title\"},[_c('h1',[_vm._v(\"Minhas Árvores\")])]):_vm._e(),_c('section',{staticClass:\"wrapper-content-listing-page\"},[(_vm.filterGetterAllRelationshipTrees.length>0)?_c('custom-table',{attrs:{\"data\":_vm.filterGetterAllRelationshipTrees,\"headers\":_vm.headersList,\"is-loading\":_vm.isLoading,\"qtde-rows-found\":_vm.getterAllRelationshipTrees.totalResults || 0,\"size-per-page\":_vm.sizePerPage,\"values-filter\":_vm.paramFilter,\"set-selected-page\":(value) => _vm.getAllRelationshipTree({ page: value }),\"action-item\":_vm.onClickItemDatatable}}):_c('data-not-found',{attrs:{\"on-click-clear\":_vm.cleanFilters,\"on-click-action\":_vm.redirectToNewRelationshipTree,\"label-btn\":'Adicionar árvore'}})],1)])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { mapActions, mapGetters, mapMutations } from 'vuex'\nimport ClientType from '@/helper/ClientType'\nimport DataNotFound from '@/components/data-not-found/index.vue'\n\nimport {\n AvatarInformationsDrawer,\n CustomDatePicker,\n InputField,\n CustomTable\n} from '@/components'\nimport moment from 'moment'\n\nexport default {\n components: {\n AvatarInformationsDrawer,\n CustomDatePicker,\n InputField,\n CustomTable,\n DataNotFound\n },\n data () {\n return {\n datePickerValues: {},\n cpfOrCnpj: '',\n name: '',\n isValidCpfOrCnpj: false,\n paramFilter: {},\n headersList: [\n {\n text: 'Data Criação', value: 'createdAt', alignHeader: 'left', alignData: 'left'\n },\n {\n text: 'Última Alteração', value: 'updatedAt', alignHeader: 'left', alignData: 'left'\n },\n {\n text: 'Nome da Árvore', value: 'name', alignHeader: 'left', alignData: 'left'\n },\n {\n text: 'CPF/CNPJ', value: 'rootDocument', alignHeader: 'left', alignData: 'left'\n },\n {\n text: 'Qtde. Explosões', value: 'explosions', alignHeader: 'left', alignData: 'center'\n }\n ],\n sizePerPage: 25,\n isLoading: false,\n showMoreInfo: false,\n clientType: ClientType\n }\n },\n computed: {\n ...mapGetters([\n 'getterAccount',\n 'getterAllRelationshipTrees'\n ]),\n filterGetterAllRelationshipTrees () {\n return this.getterAllRelationshipTrees && this.getterAllRelationshipTrees.results ? this.getterAllRelationshipTrees.results : []\n }\n },\n watch: {\n cpfOrCnpj (val) {\n if (val === '') {\n this.getAllRelationshipTree()\n }\n }\n },\n mounted () {\n this.getAllRelationshipTree()\n },\n methods: {\n ...mapActions([\n 'actionGetAllRelationshipTrees'\n ]),\n ...mapMutations([\n 'SET_SELECTED_RELATIONSHIP_TREE'\n ]),\n onClickItemDatatable (item) {\n this.SET_SELECTED_RELATIONSHIP_TREE(item)\n\n this.$router.push({ name: 'DetailedRelationshipTree', params: { id: item.id } })\n },\n splitDateToFormat (date, indicator) {\n let result = ''\n\n if (date[0] && date[1] && date[2]) {\n const day = date[0]\n const month = date[1]\n const year = date[2]\n\n if (indicator === 'startDate') {\n result = `${year}-${month}-${day}T00:00:00`\n } else if (indicator === 'endDate') {\n result = `${year}-${month}-${day}T23:59:59`\n } else {\n result = `${year}-${month}-${day}`\n }\n }\n\n return result\n },\n getAllRelationshipTree (values) {\n let startDate = new Date()\n startDate.setDate(startDate.getDate() - 7)\n startDate = moment(startDate).format('DD/MM/YYYY')\n const startDateFormated = this.splitDateToFormat(startDate.split('/'), 'startDate')\n\n let endDate = new Date()\n endDate = moment(endDate).format('DD/MM/YYYY')\n const endDateFormated = this.splitDateToFormat(endDate.split('/'), 'endDate')\n\n let params = {}\n\n params = {\n document: this.removeSpecialCharacters(this.cpfOrCnpj) || null,\n page: (values && values.page) ? values.page : 1,\n size: this.sizePerPage,\n startDate: this.datePickerValues.startDate ? this.datePickerValues.startDate : startDateFormated,\n endDate: this.datePickerValues.endDate ? this.datePickerValues.endDate : endDateFormated,\n idClient: this.getterAccount.client.idClient || null,\n name: this.name || null\n }\n this.paramFilter = params\n this.isLoading = true\n\n if (this.isMobile) {\n this.showMoreInfo = false\n }\n\n this.actionGetAllRelationshipTrees(params)\n .then(() => {\n this.isLoading = false\n })\n .catch(() => {\n this.sendToast({\n text: 'Ocorreu um erro ao buscar as suas árvores de relacionameto, tente novamente mais tarde!',\n type: 'danger'\n })\n\n this.isLoading = false\n })\n },\n cleanFilters () {\n this.setToDefault()\n\n setTimeout(() => {\n this.getAllRelationshipTree()\n })\n },\n redirectToNewRelationshipTree () {\n this.$router.push({ name: 'DetailedRelationshipTree', params: { id: 'new' } })\n },\n setToDefault () {\n this.cpfOrCnpj = this.name = ''\n this.isValidCpfOrCnpj = this.showMoreInfo = this.isLoading = this.showMoreInfo = false\n this.datePickerValues = {}\n }\n }\n}\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/eslint-loader/index.js??ref--13-0!./scripts.js?vue&type=script&lang=js&external\"; 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/eslint-loader/index.js??ref--13-0!./scripts.js?vue&type=script&lang=js&external\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=024318ab&lang=html\"\nimport script from \"./scripts.js?vue&type=script&lang=js&external\"\nexport * from \"./scripts.js?vue&type=script&lang=js&external\"\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 null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}