{"version":3,"sources":["webpack:///./src/views/modules/general/MyReport.vue?b023","webpack:///src/views/modules/general/MyReport.vue","webpack:///./src/views/modules/general/MyReport.vue?ce56","webpack:///./src/views/modules/general/MyReport.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","reports","length","_v","_e","reportsFields","scopedSlots","_u","key","fn","ref","item","_s","_f","logControl","createdDate","deadline","statusReportByPart","staticClass","on","$event","confirmDeleteMyReport","reportByPartId","errorDescription","directives","name","rawName","value","expression","path","fileName","staticRenderFns","mixins","pageDefaultMixin","data","generalResource","genKey","routeName","fieldKey","pageTitle","error","methods","mountedPrepare","$route","ui","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACA,EAAG,cAAc,CAACE,MAAM,CAAC,KAAO,GAAG,QAAU,OAAO,MAAQ,8BAA8B,CAAyB,IAAvBN,EAAIO,QAAQC,OAAcJ,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,CAACN,EAAIS,GAAG,sFAAsFT,EAAIU,KAAMV,EAAIO,QAAQC,OAAS,EAAGJ,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQN,EAAIO,QAAQ,OAASP,EAAIW,eAAeC,YAAYZ,EAAIa,GAAG,CAAC,CAACC,IAAI,2BAA2BC,GAAG,SAASC,GACvgB,IAAIC,EAAOD,EAAIC,KACf,MAAO,CAACjB,EAAIS,GAAG,IAAIT,EAAIkB,GAAGlB,EAAImB,GAAG,WAAPnB,CAAmBiB,EAAKG,WAAWC,cAAc,QAAQ,CAACP,IAAI,iBAAiBC,GAAG,SAASC,GACrH,IAAIC,EAAOD,EAAIC,KACf,MAAO,CAACjB,EAAIS,GAAG,IAAIT,EAAIkB,GAAGlB,EAAImB,GAAG,OAAPnB,CAAeiB,EAAKK,WAAW,QAAQ,CAACR,IAAI,2BAA2BC,GAAG,S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AKM,mBAA0BW,WAAW,mCAAmC,CAAC9B,EAAG,MAAM,CAACoB,YAAY,mBAAmB,CAA8B,IAA5BP,EAAKM,oBAAwD,IAA5BN,EAAKM,oBAAwD,IAA5BN,EAAKM,mBAA0BnB,EAAG,YAAY,CAACoB,YAAY,OAAOlB,MAAM,CAAC,MAAQ,MAAMN,EAAIU,KAAKN,EAAG,OAAO,CAACJ,EAAIS,GAAGT,EAAIkB,GAAGD,EAAKmB,cAAc,SAAS,MAAK,EAAM,cAAcpC,EAAIU,MAAM,IAAI,IACxqB2B,EAAkB,G,kFC4EtB,GACEC,OAAQ,CAACC,EAAX,MACER,KAAM,WACNS,KAHF,WAII,MAAO,CACLL,KAAM,mCACNM,iBAAiB,EACjBC,QAAQ,EACRC,UAAW,GACXC,SAAU,GACVC,UAAW,4BACXtC,QAAS,GACTI,cAAe,CACrB,CACQ,IAAR,oBACQ,MAAR,aAEA,CACQ,IAAR,WACQ,MAAR,WAEA,CACQ,IAAR,qBACQ,MAAR,iBAEA,CACQ,IAAR,WACQ,MAAR,eAEA,CACQ,IAAR,qBACQ,MAAR,WAIMmC,MAAO,CACLf,KAAM,MASZgB,QAAS,CAEPC,eAFJ,WAGM/C,KAAK0C,UAAY1C,KAAKgD,OAAOlB,MAE/B,iBALJ,WAKA,wKAEA,eAFA,OAIA,uBAJA,8CAUI,WAfJ,WAeA,wKAEA,sCACA,YAEA,6BACA,iKACA,eADA,2CAEA,QAIA,8DAZA,8CAgBIJ,sBA/BJ,SA+BA,cAEMuB,EAAN,2PAEA,mLACA,eADA,4CAEA,8DAJA,2CAMA,aAME,QA1FF,WA0FA,+JAEA,mBAFA,SAIA,qBAJA,+CC/KgX,I,YCO5WC,EAAY,eACd,EACApD,EACAsC,GACA,EACA,KACA,KACA,MAIa,aAAAc,E","file":"js/chunk-2d0e2374.20ca4a20.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('t-page',[_c('t-page-form',{attrs:{\"card\":\"\",\"command\":\"view\",\"title\":'Meus Relatórios Avançados'}},[(_vm.reports.length === 0)?_c('t-msg',{attrs:{\"info\":\"\"}},[_vm._v(\"Nesta página você encontrará seus relatórios avançados que não estão expirados. \")]):_vm._e(),(_vm.reports.length > 0)?_c('b-table',{attrs:{\"items\":_vm.reports,\"fields\":_vm.reportsFields},scopedSlots:_vm._u([{key:\"cell(processedStartDate)\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm._f(\"datetime\")(item.logControl.createdDate))+\" \")]}},{key:\"cell(deadline)\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm._f(\"date\")(item.deadline))+\" \")]}},{key:\"cell(statusReportByPart)\",fn:function(ref){\nvar item = ref.item;\nreturn [(item.statusReportByPart === 4)?_c('div',[_c('b-badge',{attrs:{\"variant\":\"success\"}},[_vm._v(\" Processado \")]),_c('t-button',{staticClass:\"ml-2\",attrs:{\"small\":\"\",\"outline-danger\":\"\"},on:{\"click\":function($event){return _vm.confirmDeleteMyReport(item.reportByPartId)}}},[_c('i',{staticClass:\"nav-link-icon lnr-trash\"})])],1):(item.statusReportByPart === 90)?_c('b-badge',{attrs:{\"variant\":\"danger\"}},[_vm._v(\"Erro: \"+_vm._s(item.errorDescription)+\" \")]):(item.statusReportByPart === 91)?_c('b-badge',{attrs:{\"variant\":\"danger\"}},[_vm._v(\"Bloqueado várias tentativas incorretas \")]):(item.statusReportByPart === 3)?_c('b-badge',{attrs:{\"variant\":\"warning\"}},[_vm._v(\"Em processamento \")]):(item.statusReportByPart === 1 || item.statusReportByPart === 2)?_c('b-badge',{attrs:{\"variant\":\"light\"}},[_vm._v(\"Pendente \")]):_vm._e()]}},{key:\"cell(fileName)\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('b-link',{directives:[{name:\"show\",rawName:\"v-show\",value:(item.statusReportByPart === 4),expression:\"item.statusReportByPart === 4\"}],attrs:{\"to\":{path:'/general/my-report/'+item.reportByPartId}}},[_vm._v(\" \"+_vm._s(item.fileName)+\" \")]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(item.statusReportByPart !== 4),expression:\"item.statusReportByPart !== 4\"}]},[_c('div',{staticClass:\"d-flex d-inline\"},[(item.statusReportByPart === 1 || item.statusReportByPart === 2 || item.statusReportByPart === 3)?_c('t-loading',{staticClass:\"mr-4\",attrs:{\"small\":\"\"}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.fileName))])],1)])]}}],null,false,2084550227)}):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\n  <t-page>\n\n    <t-page-form card command=\"view\"\n                 :title=\"'Meus Relatórios Avançados'\">\n\n      <t-msg info v-if=\"reports.length === 0\">Nesta página você encontrará seus relatórios avançados que não estão\n        expirados.\n      </t-msg>\n\n      <b-table v-if=\"reports.length > 0\" :items=\"reports\" :fields=\"reportsFields\">\n\n        <template #cell(processedStartDate)=\"{item}\">\n          {{ item.logControl.createdDate | datetime }}\n        </template>\n\n        <template #cell(deadline)=\"{item}\">\n          {{ item.deadline | date }}\n        </template>\n\n        <template #cell(statusReportByPart)=\"{item}\">\n\n          <div v-if=\"item.statusReportByPart === 4\">\n\n            <b-badge variant=\"success\">\n              Processado\n            </b-badge>\n\n            <t-button small outline-danger class=\"ml-2\"\n                      @click=\"confirmDeleteMyReport(item.reportByPartId)\">\n              <i class=\"nav-link-icon lnr-trash\"/>\n            </t-button>\n\n          </div>\n\n          <b-badge v-else-if=\"item.statusReportByPart === 90\"\n                   variant=\"danger\">Erro: {{ item.errorDescription }}\n          </b-badge>\n          <b-badge v-else-if=\"item.statusReportByPart === 91\"\n                   variant=\"danger\">Bloqueado várias tentativas incorretas\n          </b-badge>\n          <b-badge v-else-if=\"item.statusReportByPart === 3\"\n                   variant=\"warning\">Em processamento\n          </b-badge>\n          <b-badge v-else-if=\"item.statusReportByPart === 1 || item.statusReportByPart === 2\"\n                   variant=\"light\">Pendente\n          </b-badge>\n\n\n        </template>\n\n        <template #cell(fileName)=\"{item}\">\n\n          <b-link v-show=\"item.statusReportByPart === 4\" :to=\"{path:'/general/my-report/'+item.reportByPartId}\">\n            {{ item.fileName }}\n          </b-link>\n\n          <div v-show=\"item.statusReportByPart !== 4\">\n            <div class=\"d-flex d-inline\">\n              <t-loading class=\"mr-4\" small\n                         v-if=\"item.statusReportByPart === 1 || item.statusReportByPart === 2 || item.statusReportByPart === 3\"/>\n              <span>{{ item.fileName }}</span>\n            </div>\n          </div>\n\n        </template>\n\n\n      </b-table>\n\n    </t-page-form>\n\n\n  </t-page>\n\n</template>\n\n<script>\n\nimport pageDefaultMixin from \"@/mixins/page/pageDefaultMixin\"\nimport {crudGeneral} from \"@/services/resource/GeneralCRUD.service\";\nimport ui from \"@/assets/scripts/ui\";\nimport http from \"@/services/config/http-common\";\n\nexport default {\n  mixins: [pageDefaultMixin],\n  name: 'MyReport',\n  data() {\n    return {\n      path: \"general/report/my-report-by-part\", //Utilizar somente quando fora do padrão\n      generalResource: true, //Página de recurso geral\n      genKey: false, //Utilizar quando desejar gerar chave temporária\n      routeName: \"\",\n      fieldKey: \"\",\n      pageTitle: \"Meus Relatórios Avançados\",\n      reports: [],\n      reportsFields: [\n        {\n          key: \"descriptionPublic\",\n          label: \"Descrição\"\n        },\n        {\n          key: \"fileName\",\n          label: \"Arquivo\"\n        },\n        {\n          key: \"processedStartDate\",\n          label: \"Data Cadastro\"\n        },\n        {\n          key: \"deadline\",\n          label: \"Data Limite\"\n        },\n        {\n          key: \"statusReportByPart\",\n          label: \"Status\"\n        },\n\n      ],\n      error: {//Campos que podem receber retorno de erro do backend\n        name: \"\",\n      },\n      //--------------------------------------------------------------------------------------\n      //Início de campos personalizados desta tela\n\n\n      //--------------------------------------------------------------------------------------\n    }\n  },\n  methods: {\n\n    mountedPrepare() {\n      this.routeName = this.$route.name\n    },\n    async mountedContinued() {\n\n      await this.getReports()\n\n      this.setIsLoadingPage(false)\n\n    },\n    //--------------------------------------------------------------------------------------\n    //Início de métodos personalizados desta tela\n\n    async getReports() {\n\n      await crudGeneral.list(this.path).then((items) => {\n        this.reports = items\n\n        if (this.$route.name === this.routeName) {\n          setTimeout(async () => {\n            await this.getReports()\n          }, 5000)\n        }\n\n\n      }).catch(error => ui.generalResponseError(this,error))\n\n    },\n\n    confirmDeleteMyReport(reportById) {\n\n      ui.msgConfirm(this, '', 'Deseja excluir este relatório processado antes do término do prazo normal?', async () => {\n\n        await http.remove(this.path, reportById).then(async () => {\n          await this.getReports()\n        }).catch(error => ui.generalResponseError(this,error));\n\n      }, 'Excluir')\n    },\n\n    //--------------------------------------------------------------------------------------\n\n  },\n  async mounted() {\n\n    this.mountedPrepare()\n\n    await this.mountedContinued()\n\n  },\n\n}\n</script>\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!./MyReport.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!./MyReport.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MyReport.vue?vue&type=template&id=12fe6b09&\"\nimport script from \"./MyReport.vue?vue&type=script&lang=js&\"\nexport * from \"./MyReport.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  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}