{"version":3,"sources":["webpack:///./src/services/nfse/perfil.acesso.usuario.service.js","webpack:///./src/assets/css/acessoEmpresa.css?9ac0","webpack:///./src/services/acesso/usuario.service.js","webpack:///./src/Utils/util.js","webpack:///./src/views/AcessoEmpresa.vue?e420","webpack:///./src/models/acesso/UsuarioCadastro.js","webpack:///src/views/AcessoEmpresa.vue","webpack:///./src/views/AcessoEmpresa.vue?4633","webpack:///./src/views/AcessoEmpresa.vue"],"names":["API_URL","PerfilAcessoUsuarioService","LoginService","currentUser","subscribe","data","headers","token","idCliente","idUsuario","idContribuinte","axios","get","this","perfisAcesso","post","JSON","stringify","UsuarioService","cpf","idConta","then","response","usuarioCadastro","console","log","usuarioAcessoId","delete","idUsuarioContribuinte","master","Util","email","re","test","cpfCnpj","replace","validado","length","validarCNPJ","validarCPF","cnpj","tamanho","numeros","substring","digitos","soma","pos","i","charAt","resultado","strCPF","Soma","Resto","parseInt","render","_vm","_h","$createElement","_c","_self","staticClass","_v","_s","usuario","nome","attrs","_m","usuarioAcessoList","scopedSlots","_u","key","fn","staticStyle","proxy","slotProps","on","$event","confirmRemove","showPermissoes","_e","saveUsuarioMaster","idContribuinteVinculo","loading","novoUsuario","showCadastroNovoUsuario","hideNovoUsuario","erros","filtroTipos","model","value","callback","$$v","filtroTipo","expression","blockDadosPessoa","searchUsuarioPorCpf","$set","editarEmail","blockDadosUsuario","senhaConfirmacao","salvarNovoUsuario","style","width","displayRemove","remove","close","showPerm","overflow","_l","erro","perfilList","salvarContr","alterarContr","excluirContr","imprimirContr","salvarPerm","hidePerm","staticRenderFns","UsuarioCadastro","idAmbiente","idUsuarioPrincipal","idPessoa","documento","solicitarEmail","login","senha","name","search","filtro","admin","cadastroContador","created","processando","pesquisar","methods","isEmailValid","show","$root","$emit","validar","validarDocumento","push","contribuinte","idUsuarioDoContribuinte","tipo","pesquisarPerms","computed","configuracao","idBolEditarEmailUsuarioRes","component"],"mappings":"+KAGMA,EAAyC,4BAEzCC,E,WACF,aAAc,kCAC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WAEQ,MAAR,gEACUY,QAAQC,IAAI,kCAAmCZ,KAAKV,YAAYgJ,aAAaC,6BACtE,IAEP5H,QAAQC,IAAI,kCAAmCZ,KAAKV,YAAYgJ,aAAaC,4BAC7E5H,QAAQC,IAAI,kBAAmBZ,KAAKU,gBAAgBoG,iBAC5C9G,KAAKU,gBAAgBoG,oBC1gBgT,I,wBCQnV0B,EAAY,eACd,EACA/F,EACA+D,GACA,EACA,KACA,KACA,MAIa,aAAAgC,E","file":"js/acesso.empresa.60698656.js","sourcesContent":["import axios from 'axios';\r\nimport LoginService from '../acesso/login.service'\r\n\r\nconst API_URL = process.env.VUE_APP_BASE_URL + '/api/perfilacessousuario/';\r\n\r\nclass PerfilAcessoUsuarioService {\r\n    constructor() {\r\n        LoginService.currentUser.subscribe(data => {\r\n            this.headers = {\r\n                'Content-Type':'application/json',\r\n                'authorization':'Bearer ' + (data ? data.token:'')\r\n            };\r\n        });\r\n    }\r\n\r\n    findAllByUsuarioContr(idCliente, idUsuario, idContribuinte) {\r\n        return axios.get(API_URL + 'all?idCliente='+idCliente+'&idUsuario='+idUsuario+'&idContribuinte='+idContribuinte, {headers: this.headers});\r\n    }\r\n\r\n    findAllByUsuarioFisc(idCliente, idUsuario) {\r\n        return axios.get(API_URL + 'allFiscal?idCliente='+idCliente+'&idUsuario='+idUsuario, {headers: this.headers});\r\n    }\r\n    \r\n    save(idUsuario, idContribuinte, perfisAcesso) {\r\n        return axios.post(API_URL+'?idUsuario='+idUsuario+'&idContribuinte='+idContribuinte, JSON.stringify(perfisAcesso),\r\n        {headers: this.headers});\r\n    }\r\n\r\n    saveFiscal(idUsuario, perfisAcesso) {\r\n        return axios.post(API_URL+'saveFiscal?idUsuario='+idUsuario, JSON.stringify(perfisAcesso),\r\n        {headers: this.headers});\r\n    }\r\n\r\n\r\n}\r\n\r\nexport default new PerfilAcessoUsuarioService();","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./acessoEmpresa.css?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./acessoEmpresa.css?vue&type=style&index=0&lang=css&\"","import axios from 'axios';\r\nimport LoginService from '../acesso/login.service'\r\n\r\nconst API_URL = process.env.VUE_APP_BASE_URL + '/api/usuarioCadastro/';\r\n\r\nclass UsuarioService {\r\n    constructor() {\r\n        LoginService.currentUser.subscribe(data => {\r\n            this.headers = {\r\n                'Content-Type': 'application/json',\r\n                'authorization': 'Bearer ' + (data ? data.token : '')\r\n            };\r\n        });\r\n    }\r\n\r\n    getUsuarioByCpf(cpf, idCliente, idConta) {\r\n        return axios.get(API_URL + 'searchByCpf?cpf=' + cpf + '&idCliente=' + idCliente + '&idConta=' + idConta, { headers: this.headers }).then(response => (this.data = response.data));\r\n    }\r\n\r\n    save(usuarioCadastro) {\r\n        console.log(JSON.stringify(usuarioCadastro));\r\n        return axios.post(API_URL, JSON.stringify(usuarioCadastro),\r\n            { headers: this.headers });\r\n    }\r\n\r\n    remove(idCliente, usuarioAcessoId, idContribuinte) {\r\n        return axios.delete(API_URL + 'delete?idCliente=' + idCliente + '&usuarioAcessoId=' + usuarioAcessoId + '&idContribuinte=' + idContribuinte, { headers: this.headers });\r\n    }\r\n\r\n    removeUsuarioContribuinte(idCliente, usuarioAcessoId, idUsuarioContribuinte, idContribuinte) {\r\n        return axios.delete(API_URL + 'deleteUsuarioContribuinte?idCliente=' + idCliente + '&usuarioAcessoId=' + usuarioAcessoId + '&idUsuarioContribuinte=' + idUsuarioContribuinte + '&idContribuinte=' + idContribuinte, { headers: this.headers });\r\n    }\r\n\r\n    salvarUsuarioMaster(idUsuario, master) {\r\n        return axios.post(API_URL + 'saveUsuarioMaster?idUsuario=' + idUsuario + '&master=' + master, null, { headers: this.headers });\r\n    }\r\n\r\n    salvarUsuarioMasterFiscal(idUsuario, master) {\r\n        return axios.post(API_URL + 'saveUsuarioMasterFiscal?idUsuario=' + idUsuario + '&master=' + master, null, { headers: this.headers });\r\n    }\r\n\r\n}\r\n\r\nexport default new UsuarioService();","class Util {\r\n  constructor() {}\r\n\r\n  //Validar se um email é válido\r\n  validarEmail (email) {\r\n    // eslint-disable-next-line\r\n    var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n    return re.test(email);\r\n  }\r\n\r\n  // validar CPF ou CNPJ\r\n  validarCPFCNPJ(cpfCnpj) {\r\n    if (!cpfCnpj) return false;\r\n    cpfCnpj = cpfCnpj.replace(/[^\\d]+/g, \"\");\r\n    var validado = false;\r\n\r\n    if (cpfCnpj.length == 14) {\r\n      validado = this.validarCNPJ(cpfCnpj);\r\n    }\r\n    else if (cpfCnpj.length == 11) {\r\n      validado = this.validarCPF(cpfCnpj);\r\n    }\r\n\r\n    return validado;\r\n  }\r\n\r\n  // Validação de CNPJ\r\n  validarCNPJ(cnpj) {\r\n    if (!cnpj) return false;\r\n    cnpj = cnpj.replace(/[^\\d]+/g, \"\");\r\n    \r\n    if (cnpj == \"\") return false;\r\n\r\n    if (cnpj.length != 14) return false;\r\n\r\n    // Elimina CNPJs invalidos conhecidos\r\n    if (\r\n      cnpj == \"00000000000000\" ||\r\n      cnpj == \"11111111111111\" ||\r\n      cnpj == \"22222222222222\" ||\r\n      cnpj == \"33333333333333\" ||\r\n      cnpj == \"44444444444444\" ||\r\n      cnpj == \"55555555555555\" ||\r\n      cnpj == \"66666666666666\" ||\r\n      cnpj == \"77777777777777\" ||\r\n      cnpj == \"88888888888888\" ||\r\n      cnpj == \"99999999999999\"\r\n    )\r\n      return false;\r\n\r\n    // Valida DVs\r\n    var tamanho = cnpj.length - 2;\r\n    var numeros = cnpj.substring(0, tamanho);\r\n    var digitos = cnpj.substring(tamanho);\r\n    var soma = 0;\r\n    var pos = tamanho - 7;\r\n    for (var i = tamanho; i >= 1; i--) {\r\n      soma += numeros.charAt(tamanho - i) * pos--;\r\n      if (pos < 2) pos = 9;\r\n    }\r\n    var resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);\r\n    if (resultado != digitos.charAt(0)) return false;\r\n\r\n    tamanho = tamanho + 1;\r\n    numeros = cnpj.substring(0, tamanho);\r\n    soma = 0;\r\n    pos = tamanho - 7;\r\n    for (i = tamanho; i >= 1; i--) {\r\n      soma += numeros.charAt(tamanho - i) * pos--;\r\n      if (pos < 2) pos = 9;\r\n    }\r\n    resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);\r\n    if (resultado != digitos.charAt(1)) return false;\r\n\r\n    return true;\r\n  }\r\n\r\n  // Validar CPF\r\n  validarCPF(strCPF) {\r\n    if (!strCPF) return false;\r\n    var Soma;\r\n    var Resto;\r\n    Soma = 0;\r\n    if (strCPF == \"00000000000\") return false;\r\n\r\n    for (var i = 1; i <= 9; i++)\r\n      Soma = Soma + parseInt(strCPF.substring(i - 1, i)) * (11 - i);\r\n    Resto = (Soma * 10) % 11;\r\n\r\n    if (Resto == 10 || Resto == 11) Resto = 0;\r\n    if (Resto != parseInt(strCPF.substring(9, 10))) return false;\r\n\r\n    Soma = 0;\r\n    for (i = 1; i <= 10; i++)\r\n      Soma = Soma + parseInt(strCPF.substring(i - 1, i)) * (12 - i);\r\n    Resto = (Soma * 10) % 11;\r\n\r\n    if (Resto == 10 || Resto == 11) Resto = 0;\r\n    if (Resto != parseInt(strCPF.substring(10, 11))) return false;\r\n    return true;\r\n  }\r\n\r\n}\r\n\r\nexport default new Util();\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container-fluid\"},[_c('div',[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-header\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col col-xs-2\"},[_c('h5',{staticClass:\"panel-title\"},[_c('span',{staticClass:\"title\"},[_vm._v(\"Bem Vindo(a) \"+_vm._s(this.currentUser.usuario.nome))])])])])]),_c('div',{staticClass:\"card-body\",attrs:{\"id\":\"topo\"}},[_vm._m(0),_c('div',{staticClass:\"row\"},[_c('DataTable',{attrs:{\"value\":_vm.usuarioAcessoList,\"paginator\":true,\"rows\":10,\"autoLayout\":true},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_c('div',{staticClass:\"p-clearfix\",staticStyle:{\"line-height\":\"1.87em\"}},[_vm._v(\"Lista de Usuários com acesso.\")])]},proxy:true}])},[_c('Column',{attrs:{\"headerStyle\":\"width: 8em\",\"bodyStyle\":\"text-align: center\",\"header\":\"Remover?\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Button',{attrs:{\"type\":\"button\",\"icon\":\"pi pi-trash\"},on:{\"click\":function($event){return _vm.confirmRemove(slotProps.data.idUsuario, slotProps.data.idContribuinte)}}})]}}])}),_c('Column',{attrs:{\"headerStyle\":\"width: 8em\",\"bodyStyle\":\"text-align: center\",\"header\":\"Permissões\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Button',{attrs:{\"type\":\"button\",\"icon\":\"pi pi-cog\"},on:{\"click\":function($event){return _vm.showPermissoes(slotProps.data.idUsuario, slotProps.data.idContribuinte)}}})]}}])}),(this.currentUser.usuario.idBolAdmin)?_c('Column',{attrs:{\"headerStyle\":\"width: 18em\",\"bodyStyle\":\"text-align: center\",\"header\":\"Master\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [(!slotProps.data.master)?_c('Button',{attrs:{\"type\":\"button\",\"icon\":\"pi pi-check\",\"label\":\"Definir como Usuário Master\"},on:{\"click\":function($event){return _vm.saveUsuarioMaster(slotProps.data.idUsuario, 'S')}}}):_vm._e(),(slotProps.data.master)?_c('Button',{attrs:{\"type\":\"button\",\"icon\":\"pi pi-remove\",\"label\":\"Retirar Permissão Master\"},on:{\"click\":function($event){return _vm.saveUsuarioMaster(slotProps.data.idUsuario, 'N')}}}):_vm._e()]}}],null,false,808510628)}):_vm._e(),_c('Column',{attrs:{\"field\":\"usuario.pessoa.numeroDocumentoJuridico\",\"header\":\"CPF\"}}),_c('Column',{attrs:{\"field\":\"usuario.loginFormatado\",\"header\":\"Login\"}}),_c('Column',{attrs:{\"field\":\"usuario.pessoa.nomeGeral\",\"header\":\"Nome\"}}),(this.cadastroContador)?_c('Column',{attrs:{\"headerStyle\":\"width: 18em\",\"bodyStyle\":\"text-align: center\",\"header\":\"Tipo\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('span',[_vm._v(_vm._s(slotProps.data.idContribuinteVinculo ? 'Contador' : 'Usuário'))])]}}],null,false,416904655)}):_vm._e()],1)],1),_c('hr'),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-2 mb-2\"},[_c('span',{staticClass:\"p-fluid\"},[_c('Button',{attrs:{\"label\":\"Novo\",\"icon\":\"pi pi-plus\",\"disabled\":_vm.loading},on:{\"click\":function($event){return _vm.novoUsuario()}}})],1)])])])])]),_c('Dialog',{attrs:{\"visible\":_vm.showCadastroNovoUsuario,\"modal\":true,\"closable\":false},on:{\"update:visible\":function($event){_vm.showCadastroNovoUsuario=$event}}},[_c('div',{staticClass:\"header-container-modal-interno\"},[_c('h1',{staticClass:\"titulo-header\"},[_vm._v(\"\\n        Novo Usuário\\n        \"),_c('Button',{staticClass:\"p-button-rounded p-button-text\",attrs:{\"id\":\"icon-close-modals\",\"icon\":\"pi pi-times\"},on:{\"click\":function($event){return _vm.hideNovoUsuario()}}})],1),_c('div',{staticClass:\"scrolable-dialog\"},[_c('error-list',{attrs:{\"erros\":_vm.erros}}),(_vm.cadastroContador)?_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3 mb-2\"},[_c('label',[_vm._v(\"Tipo:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('Dropdown',{attrs:{\"id\":\"tipo\",\"options\":_vm.filtroTipos,\"optionLabel\":\"name\",\"placeholder\":\"Selecione um Tipo\"},model:{value:(_vm.filtroTipo),callback:function ($$v) {_vm.filtroTipo=$$v},expression:\"filtroTipo\"}})],1)])]):_vm._e(),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3 mb-2\"},[_c('label',[_vm._v(\"CPF:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputMask',{attrs:{\"id\":\"cpfUsuario\",\"mask\":\"999.999.999-99\",\"disabled\":_vm.blockDadosPessoa},on:{\"blur\":function($event){return _vm.searchUsuarioPorCpf()}},model:{value:(_vm.usuarioCadastro.documento),callback:function ($$v) {_vm.$set(_vm.usuarioCadastro, \"documento\", $$v)},expression:\"usuarioCadastro.documento\"}})],1)]),_c('div',{staticClass:\"col-md-8 mb-2\"},[_c('label',[_vm._v(\"Nome:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputText',{attrs:{\"type\":\"text\",\"disabled\":_vm.blockDadosPessoa},model:{value:(_vm.usuarioCadastro.nome),callback:function ($$v) {_vm.$set(_vm.usuarioCadastro, \"nome\", $$v)},expression:\"usuarioCadastro.nome\"}})],1)])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-11 mb-2\"},[_c('label',[_vm._v(\"E-mail:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputText',{attrs:{\"type\":\"text\",\"disabled\":_vm.editarEmail},model:{value:(_vm.usuarioCadastro.email),callback:function ($$v) {_vm.$set(_vm.usuarioCadastro, \"email\", $$v)},expression:\"usuarioCadastro.email\"}})],1)])]),(!_vm.blockDadosUsuario)?_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3 mb-2\"},[_c('label',[_vm._v(\"Login:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputText',{attrs:{\"type\":\"text\",\"disabled\":\"true\"},model:{value:(_vm.usuarioCadastro.login),callback:function ($$v) {_vm.$set(_vm.usuarioCadastro, \"login\", $$v)},expression:\"usuarioCadastro.login\"}})],1)]),_c('div',{staticClass:\"col-md-3 mb-2\"},[_c('label',[_vm._v(\"Senha:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputText',{attrs:{\"type\":\"password\",\"autocomplete\":\"new-password\"},model:{value:(_vm.usuarioCadastro.senha),callback:function ($$v) {_vm.$set(_vm.usuarioCadastro, \"senha\", $$v)},expression:\"usuarioCadastro.senha\"}})],1)]),_c('div',{staticClass:\"col-md-3 mb-2\"},[_c('label',[_vm._v(\"Confirme a Senha:\")]),_c('span',{staticClass:\"p-fluid\"},[_c('InputText',{attrs:{\"type\":\"password\",\"autocomplete\":\"new-password\"},model:{value:(_vm.senhaConfirmacao),callback:function ($$v) {_vm.senhaConfirmacao=$$v},expression:\"senhaConfirmacao\"}})],1)])]):_vm._e()],1),_c('div',{staticClass:\"botoes-avancar-voltar\",staticStyle:{\"margin-top\":\"20px\"}},[_c('Button',{staticClass:\"p-button-primary mr-2\",attrs:{\"label\":\"Salvar\",\"icon\":\"pi pi-check\",\"disabled\":_vm.loading},on:{\"click\":function($event){return _vm.salvarNovoUsuario()}}}),_c('Button',{staticClass:\"p-button-primary mr-2 p-button-danger\",attrs:{\"type\":\"button\",\"label\":\"Fechar\",\"icon\":\"pi pi-times\"},on:{\"click\":function($event){return _vm.hideNovoUsuario()}}})],1)])]),_c('Dialog',{style:({ width: '30vw' }),attrs:{\"header\":\"Aviso\",\"visible\":_vm.displayRemove,\"modal\":true},on:{\"update:visible\":function($event){_vm.displayRemove=$event}},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('Button',{attrs:{\"label\":\"Sim\",\"icon\":\"pi pi-check\"},on:{\"click\":_vm.remove}}),_c('Button',{staticClass:\"p-button-secondary\",attrs:{\"label\":\"Não\",\"icon\":\"pi pi-times\"},on:{\"click\":_vm.close}})]},proxy:true}])},[_vm._v(\"\\n    Confirma a remoção do Registro?\\n    \")]),_c('Dialog',{staticClass:\"test-box\",attrs:{\"header\":\"Permissões\",\"visible\":_vm.showPerm,\"modal\":true,\"closable\":false,\"contentStyle\":{ overflow: 'visible' }},on:{\"update:visible\":function($event){_vm.showPerm=$event}}},[_c('div',{staticClass:\"scrolable-dialog\"},[_c('div',{staticClass:\"error-list\"},[(_vm.erros.length)?_c('Message',{attrs:{\"closable\":false,\"severity\":\"error\"}},[_c('ul',{staticClass:\"mt-3\"},_vm._l((_vm.erros),function(erro){return _c('li',{key:erro},[_vm._v(_vm._s(erro))])}),0)]):_vm._e()],1),_c('div',{staticClass:\"row\"},[_c('DataTable',{attrs:{\"value\":_vm.perfilList,\"paginator\":true,\"rows\":10,\"autoLayout\":true}},[_c('Column',{attrs:{\"field\":\"idPagina.menuCompleto\",\"header\":\"Menu\"}}),_c('Column',{attrs:{\"field\":\"habilitarBol\",\"header\":\"Habilitar\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Checkbox',{attrs:{\"binary\":true},model:{value:(slotProps.data.habilitarBol),callback:function ($$v) {_vm.$set(slotProps.data, \"habilitarBol\", $$v)},expression:\"slotProps.data.habilitarBol\"}})]}}])}),_c('Column',{attrs:{\"field\":\"salvarBol\",\"header\":\"Salvar\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Checkbox',{attrs:{\"binary\":true,\"disabled\":!slotProps.data.salvarContr},model:{value:(slotProps.data.salvarBol),callback:function ($$v) {_vm.$set(slotProps.data, \"salvarBol\", $$v)},expression:\"slotProps.data.salvarBol\"}})]}}])}),_c('Column',{attrs:{\"field\":\"alterarBol\",\"header\":\"Alterar\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Checkbox',{attrs:{\"binary\":true,\"disabled\":!slotProps.data.alterarContr},model:{value:(slotProps.data.alterarBol),callback:function ($$v) {_vm.$set(slotProps.data, \"alterarBol\", $$v)},expression:\"slotProps.data.alterarBol\"}})]}}])}),_c('Column',{attrs:{\"field\":\"excluirBol\",\"header\":\"Excluir\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Checkbox',{attrs:{\"binary\":true,\"disabled\":!slotProps.data.excluirContr},model:{value:(slotProps.data.excluirBol),callback:function ($$v) {_vm.$set(slotProps.data, \"excluirBol\", $$v)},expression:\"slotProps.data.excluirBol\"}})]}}])}),_c('Column',{attrs:{\"field\":\"imprimirBol\",\"header\":\"Imprimir\"},scopedSlots:_vm._u([{key:\"body\",fn:function(slotProps){return [_c('Checkbox',{attrs:{\"binary\":true,\"disabled\":!slotProps.data.imprimirContr},model:{value:(slotProps.data.imprimirBol),callback:function ($$v) {_vm.$set(slotProps.data, \"imprimirBol\", $$v)},expression:\"slotProps.data.imprimirBol\"}})]}}])})],1)],1)]),_c('hr'),_c('div',{staticClass:\"container\"},[_c('div',{staticClass:\"row\"},[_c('div',[_c('Button',{staticClass:\"p-button-primary mr-2\",attrs:{\"label\":\"Salvar\",\"icon\":\"pi pi-check\",\"disabled\":_vm.loading},on:{\"click\":function($event){return _vm.salvarPerm()}}}),_c('Button',{staticClass:\"p-button-primary mr-2 p-button-danger\",attrs:{\"type\":\"button\",\"label\":\"Fechar\",\"icon\":\"pi pi-times\"},on:{\"click\":function($event){return _vm.hidePerm()}}})],1)])])])],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h5',{staticClass:\"panel-title\"},[_c('span',{staticClass:\"title\"},[_vm._v(\"Conceda acesso aos seus respectivos responsáveis.\")])])}]\n\nexport { render, staticRenderFns }","class UsuarioCadastro{\r\n    constructor(){\r\n        this.idConta = null;\r\n        this.idAmbiente = null;\r\n        this.idContribuinte = null;\r\n        this.idUsuarioPrincipal = null;\r\n        this.idUsuario = null;\r\n        this.idPessoa = null;\r\n        this.documento = null;\r\n        this.nome = null;\r\n        this.email = null;\r\n        this.solicitarEmail = true; \r\n        this.login = null;\r\n        this.senha = null;\r\n    }\r\n}\r\nexport default UsuarioCadastro;","<template>\r\n  <div class=\"container-fluid\">\r\n    <div>\r\n      <div class=\"card\">\r\n        <div class=\"card-header\">\r\n          <div class=\"row\">\r\n            <div class=\"col col-xs-2\">\r\n              <h5 class=\"panel-title\">\r\n                <span class=\"title\">Bem Vindo(a) {{ this.currentUser.usuario.nome }}</span>\r\n              </h5>\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div id=\"topo\" class=\"card-body\">\r\n          <h5 class=\"panel-title\">\r\n            <span class=\"title\">Conceda acesso aos seus respectivos responsáveis.</span>\r\n          </h5>\r\n          <div class=\"row\">\r\n            <DataTable :value=\"usuarioAcessoList\" :paginator=\"true\" :rows=\"10\" :autoLayout=\"true\">\r\n              <template #header>\r\n                <div style=\"line-height:1.87em\" class=\"p-clearfix\">Lista de Usuários com acesso.</div>\r\n              </template>\r\n              <Column headerStyle=\"width: 8em\" bodyStyle=\"text-align: center\" header=\"Remover?\">\r\n                <template #body=\"slotProps\">\r\n                  <Button type=\"button\" icon=\"pi pi-trash\"\r\n                    @click=\"confirmRemove(slotProps.data.idUsuario, slotProps.data.idContribuinte)\"></Button>\r\n                </template>\r\n              </Column>\r\n              <Column headerStyle=\"width: 8em\" bodyStyle=\"text-align: center\" header=\"Permissões\">\r\n                <template #body=\"slotProps\">\r\n                  <Button type=\"button\" icon=\"pi pi-cog\"\r\n                    @click=\"showPermissoes(slotProps.data.idUsuario, slotProps.data.idContribuinte)\"></Button>\r\n                </template>\r\n              </Column>\r\n              <Column headerStyle=\"width: 18em\" bodyStyle=\"text-align: center\" header=\"Master\"\r\n                v-if=\"this.currentUser.usuario.idBolAdmin\">\r\n                <template #body=\"slotProps\">\r\n                  <Button type=\"button\" icon=\"pi pi-check\" label=\"Definir como Usuário Master\"\r\n                    v-if=\"!slotProps.data.master\" @click=\"saveUsuarioMaster(slotProps.data.idUsuario, 'S')\"></Button>\r\n                  <Button type=\"button\" icon=\"pi pi-remove\" label=\"Retirar Permissão Master\"\r\n                    v-if=\"slotProps.data.master\" @click=\"saveUsuarioMaster(slotProps.data.idUsuario, 'N')\"></Button>\r\n                </template>\r\n              </Column>\r\n              <Column field=\"usuario.pessoa.numeroDocumentoJuridico\" header=\"CPF\"></Column>\r\n              <Column field=\"usuario.loginFormatado\" header=\"Login\"></Column>\r\n              <Column field=\"usuario.pessoa.nomeGeral\" header=\"Nome\"></Column>\r\n              <Column headerStyle=\"width: 18em\" bodyStyle=\"text-align: center\" header=\"Tipo\"\r\n                v-if=\"this.cadastroContador\">\r\n                <template #body=\"slotProps\">\r\n                  <span>{{ slotProps.data.idContribuinteVinculo ? 'Contador' : 'Usuário' }}</span>\r\n                </template>\r\n              </Column>\r\n            </DataTable>\r\n          </div>\r\n          <hr />\r\n          <div class=\"row\">\r\n            <div class=\"col-md-2 mb-2\">\r\n              <span class=\"p-fluid\">\r\n                <Button label=\"Novo\" @click=\"novoUsuario()\" icon=\"pi pi-plus\" :disabled=\"loading\"/>\r\n              </span>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n\r\n    <Dialog :visible.sync=\"showCadastroNovoUsuario\" :modal=\"true\" :closable=\"false\">\r\n      <!-- Cabeçalho do modal com título e botão de fechar -->\r\n      <div class=\"header-container-modal-interno\">\r\n        <!-- Título do modal -->\r\n        <h1 class=\"titulo-header\">\r\n          Novo Usuário\r\n          <Button id=\"icon-close-modals\" icon=\"pi pi-times\" class=\"p-button-rounded p-button-text\"\r\n            @click=\"hideNovoUsuario()\" />\r\n        </h1>\r\n        <div class=\"scrolable-dialog\">\r\n          <error-list :erros=\"erros\" />\r\n          <div class=\"row\" v-if=\"cadastroContador\">\r\n            <div class=\"col-md-3 mb-2\">\r\n              <label>Tipo:</label>\r\n              <span class=\"p-fluid\">\r\n                <Dropdown id=\"tipo\" v-model=\"filtroTipo\" :options=\"filtroTipos\" optionLabel=\"name\"\r\n                  placeholder=\"Selecione um Tipo\" />\r\n              </span>\r\n            </div>\r\n          </div>\r\n          <div class=\"row\">\r\n            <div class=\"col-md-3 mb-2\">\r\n              <label>CPF:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputMask @blur=\"searchUsuarioPorCpf()\" v-model=\"usuarioCadastro.documento\" id=\"cpfUsuario\"\r\n                  mask=\"999.999.999-99\" :disabled=\"blockDadosPessoa\" />\r\n              </span>\r\n            </div>\r\n            <div class=\"col-md-8 mb-2\">\r\n              <label>Nome:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputText v-model=\"usuarioCadastro.nome\" type=\"text\" :disabled=\"blockDadosPessoa\" />\r\n              </span>\r\n            </div>\r\n          </div>\r\n          <div class=\"row\">\r\n            <div class=\"col-md-11 mb-2\">\r\n              <label>E-mail:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputText v-model=\"usuarioCadastro.email\" type=\"text\" :disabled=\"editarEmail\" />\r\n              </span>\r\n            </div>\r\n          </div>\r\n\r\n          <div class=\"row\" v-if=\"!blockDadosUsuario\">\r\n            <div class=\"col-md-3 mb-2\">\r\n              <label>Login:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputText v-model=\"usuarioCadastro.login\" type=\"text\" disabled=\"true\" />\r\n              </span>\r\n            </div>\r\n            <div class=\"col-md-3 mb-2\">\r\n              <label>Senha:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputText v-model=\"usuarioCadastro.senha\" type=\"password\" autocomplete=\"new-password\" />\r\n              </span>\r\n            </div>\r\n            <div class=\"col-md-3 mb-2\">\r\n              <label>Confirme a Senha:</label>\r\n              <span class=\"p-fluid\">\r\n                <InputText v-model=\"senhaConfirmacao\" type=\"password\" autocomplete=\"new-password\" />\r\n              </span>\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div class=\"botoes-avancar-voltar\" style=\"margin-top: 20px;\">\r\n          <Button @click=\"salvarNovoUsuario()\" label=\"Salvar\" class=\"p-button-primary mr-2\" icon=\"pi pi-check\"\r\n            :disabled=\"loading\" />\r\n          <Button @click=\"hideNovoUsuario()\" type=\"button\" label=\"Fechar\" class=\"p-button-primary mr-2 p-button-danger\"\r\n            icon=\"pi pi-times\" />\r\n        </div>\r\n      </div>\r\n    </Dialog>\r\n\r\n    <Dialog header=\"Aviso\" :visible.sync=\"displayRemove\" :style=\"{ width: '30vw' }\" :modal=\"true\">\r\n      Confirma a remoção do Registro?\r\n      <template #footer>\r\n        <Button label=\"Sim\" icon=\"pi pi-check\" @click=\"remove\" />\r\n        <Button label=\"Não\" icon=\"pi pi-times\" @click=\"close\" class=\"p-button-secondary\" />\r\n      </template>\r\n    </Dialog>\r\n    <Dialog header=\"Permissões\" :visible.sync=\"showPerm\" :modal=\"true\" :closable=\"false\" class=\"test-box\"\r\n      :contentStyle=\"{ overflow: 'visible' }\">\r\n      <div class=\"scrolable-dialog\">\r\n        <div class=\"error-list\">\r\n          <Message :closable=\"false\" severity=\"error\" v-if=\"erros.length\">\r\n            <ul class=\"mt-3\">\r\n              <li :key=\"erro\" v-for=\"erro in erros\">{{ erro }}</li>\r\n            </ul>\r\n          </Message>\r\n        </div>\r\n        <div class=\"row\">\r\n          <DataTable :value=\"perfilList\" :paginator=\"true\" :rows=\"10\" :autoLayout=\"true\">\r\n            <Column field=\"idPagina.menuCompleto\" header=\"Menu\"></Column>\r\n            <Column field=\"habilitarBol\" header=\"Habilitar\">\r\n              <template #body=\"slotProps\">\r\n                <Checkbox v-model=\"slotProps.data.habilitarBol\" :binary=\"true\" />\r\n              </template>\r\n            </Column>\r\n            <Column field=\"salvarBol\" header=\"Salvar\">\r\n              <template #body=\"slotProps\">\r\n                <Checkbox v-model=\"slotProps.data.salvarBol\" :binary=\"true\" :disabled=\"!slotProps.data.salvarContr\" />\r\n              </template>\r\n            </Column>\r\n            <Column field=\"alterarBol\" header=\"Alterar\">\r\n              <template #body=\"slotProps\">\r\n                <Checkbox v-model=\"slotProps.data.alterarBol\" :binary=\"true\" :disabled=\"!slotProps.data.alterarContr\" />\r\n              </template>\r\n            </Column>\r\n            <Column field=\"excluirBol\" header=\"Excluir\">\r\n              <template #body=\"slotProps\">\r\n                <Checkbox v-model=\"slotProps.data.excluirBol\" :binary=\"true\" :disabled=\"!slotProps.data.excluirContr\" />\r\n              </template>\r\n            </Column>\r\n            <Column field=\"imprimirBol\" header=\"Imprimir\">\r\n              <template #body=\"slotProps\">\r\n                <Checkbox v-model=\"slotProps.data.imprimirBol\" :binary=\"true\"\r\n                  :disabled=\"!slotProps.data.imprimirContr\" />\r\n              </template>\r\n            </Column>\r\n          </DataTable>\r\n        </div>\r\n      </div>\r\n      <hr />\r\n      <div class=\"container\">\r\n        <div class=\"row\">\r\n          <div>\r\n            <Button @click=\"salvarPerm()\" label=\"Salvar\" class=\"p-button-primary mr-2\" icon=\"pi pi-check\"\r\n              :disabled=\"loading\" />\r\n            <Button @click=\"hidePerm()\" type=\"button\" label=\"Fechar\" class=\"p-button-primary mr-2 p-button-danger\"\r\n              icon=\"pi pi-times\" />\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </Dialog>\r\n  </div>\r\n</template>\r\n<script>\r\nimport PerfilAcessoUsuarioService from \"../services/nfse/perfil.acesso.usuario.service\";\r\nimport UsuarioAcessoService from \"../services/nfse/usuario.acesso.service\";\r\nimport LoginService from \"../services/acesso/login.service\";\r\nimport UsuarioService from \"../services/acesso/usuario.service\";\r\nimport UsuarioCadastro from \"../models/acesso/UsuarioCadastro\";\r\nimport Util from \"../Utils/util\";\r\n\r\nexport default {\r\n  name: \"acessoEmpresa\",\r\n  data() {\r\n    return {\r\n      showPerm: false,\r\n      displayRemove: false,\r\n      loading: false,\r\n      erros: [],\r\n      currentUser: null,\r\n      usuarioCadastro: new UsuarioCadastro(),\r\n      search: false,\r\n      filtro: \"\",\r\n      usuarioAcessoList: [],\r\n      usuarioAcessoId: null,\r\n      idContribuinte: null,\r\n      showCadastroNovoUsuario: false,\r\n      blockDadosPessoa: false,\r\n      blockDadosUsuario: false,\r\n      perfilList: [],\r\n      admin: false,\r\n      senhaConfirmacao: null,\r\n      cadastroContador: false,\r\n      filtroTipo: null,\r\n      filtroTipos: [\r\n        { name: \"Usuário\", key: \"U\" },\r\n        { name: \"Contador\", key: \"C\" }\r\n      ],\r\n    };\r\n  },\r\n  created() {\r\n    this.processando(true);\r\n    this.currentUser = LoginService.currentUserValue;\r\n    this.filtroTipo = this.filtroTipos[0];\r\n    this.cadastroContador = (this.currentUser.configuracao.idBolCadastroContador && this.currentUser.configuracao.idBolCadastroContador === 'S');\r\n    this.pesquisar();\r\n    this.processando(false);\r\n  },\r\n  methods: {\r\n    isEmailValid: function (email) {\r\n      // eslint-disable-next-line\r\n      var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n      return re.test(email);\r\n    },\r\n    pesquisar() {\r\n      this.search = true;\r\n      this.processando(true);\r\n      UsuarioAcessoService.findAllByContribuinte(\r\n        this.currentUser.usuario.idCliente,\r\n        this.currentUser.contribuinte.idContribuinte\r\n      ).then((ua) => {\r\n        this.usuarioAcessoList = ua.data;\r\n      })\r\n        .then(() => {\r\n          this.search = false;\r\n          this.processando(false);\r\n        });\r\n\r\n\r\n    },\r\n    confirmRemove(usuarioAcessoId, idContribuinte) {\r\n      this.usuarioAcessoId = usuarioAcessoId;\r\n      this.idContribuinte = idContribuinte;\r\n      this.displayRemove = true;\r\n    },\r\n    close() {\r\n      this.usuarioAcessoId = null;\r\n      this.displayRemove = false;\r\n    },\r\n    remove() {\r\n      UsuarioService.removeUsuarioContribuinte(\r\n        this.currentUser.usuario.idCliente,\r\n        this.usuarioAcessoId,\r\n        this.currentUser.contribuinte.idUsuario,\r\n        this.idContribuinte\r\n      ).then(\r\n        (data) => {\r\n          console.log(data);\r\n          this.$toast.add({\r\n            severity: \"success\",\r\n            summary: \"Registro removido com sucesso\",\r\n          });\r\n          setTimeout(async () => {\r\n            await this.pesquisar();\r\n            this.displayRemove = false;\r\n          }, 250);\r\n        },\r\n        (error) => {\r\n          console.log(error);\r\n          this.$root.$emit(\r\n            \"alert:error\",\r\n            \"Houve um problema ao remover o Registro!\"\r\n          );\r\n        }\r\n      );\r\n    },\r\n    saveUsuarioMaster(idUsuario, master) {\r\n      UsuarioService.salvarUsuarioMaster(\r\n        idUsuario,\r\n        master\r\n      ).then(\r\n        (data) => {\r\n          console.log(data);\r\n          this.$toast.add({\r\n            severity: \"success\",\r\n            summary: \"Permissão efetuada!\",\r\n          });\r\n          setTimeout(async () => {\r\n            await this.pesquisar();\r\n          }, 250);\r\n        },\r\n        (error) => {\r\n          console.log(error);\r\n          this.$root.$emit(\r\n            \"alert:error\",\r\n            \"Houve um problema ao informar Permissão Master para o Registro!\"\r\n          );\r\n        }\r\n      );\r\n    },\r\n    processando(show) {\r\n      if (show) {\r\n        this.loading = true;\r\n        this.$root.$emit(\"loading:show\");\r\n      } else {\r\n        this.loading = false;\r\n        this.$root.$emit(\"loading:hide\");\r\n      }\r\n    },\r\n    novoUsuario() {\r\n      this.usuarioCadastro = new UsuarioCadastro();\r\n      this.senhaConfirmacao = null;\r\n      this.admin = false;\r\n      this.showCadastroNovoUsuario = true;\r\n      this.blockDadosPessoa = false;\r\n      this.blockDadosUsuario = false;\r\n\r\n      this.erros = [];\r\n    },\r\n    hideNovoUsuario() {\r\n      this.showCadastroNovoUsuario = false;\r\n    },\r\n    validar() {\r\n      this.erros = [];\r\n      if (!this.usuarioCadastro.documento || !this.validarDocumento()) {\r\n        this.erros.push(\"Informe um Documento válido!\");\r\n      }\r\n      if (!this.usuarioCadastro.nome) {\r\n        this.erros.push(\"Informe o Nome!\");\r\n      }\r\n      if (!this.usuarioCadastro.email) {\r\n        this.erros.push(\"Informe o E-Mail!\");\r\n      } else if (\r\n        this.usuarioCadastro.email &&\r\n        !this.isEmailValid(this.usuarioCadastro.email)\r\n      ) {\r\n        this.erros.push(\"Informe um E-Mail válido!\");\r\n      }\r\n      if (!this.usuarioCadastro.senha && !this.blockDadosUsuario) {\r\n        this.erros.push(\"Informe a Senha!\");\r\n      } else if (!this.blockDadosUsuario && this.usuarioCadastro.senha != this.senhaConfirmacao) {\r\n        this.erros.push(\"Senha de Confirmação não confere com a Senha!\");\r\n      }\r\n\r\n    },\r\n    salvarNovoUsuario() {\r\n      this.processando(true);\r\n      this.validar();\r\n      if (!this.erros.length) {\r\n        this.usuarioCadastro.idConta = this.currentUser.usuario.idConta;\r\n        this.usuarioCadastro.idCliente = this.currentUser.usuario.idCliente;\r\n        this.usuarioCadastro.idAmbiente = this.currentUser.usuario.idAmbiente;\r\n        this.usuarioCadastro.idContribuinte = this.currentUser.contribuinte.idContribuinte;\r\n        this.usuarioCadastro.idUsuarioDoContribuinte = this.currentUser.contribuinte.idUsuario;\r\n        this.usuarioCadastro.idUsuarioPrincipal = this.currentUser.usuario.idUsuario;\r\n        this.usuarioCadastro.master = false;\r\n        this.usuarioCadastro.tipo = (this.filtroTipo && this.filtroTipo.key ? this.filtroTipo.key : null);\r\n\r\n        UsuarioService.save(this.usuarioCadastro).then(\r\n          (data) => {\r\n            console.log(data);\r\n            this.$toast.add({\r\n              severity: \"success\",\r\n              summary: \"Registro salvo com sucesso\",\r\n            });\r\n            this.pesquisar();\r\n            this.showCadastroNovoUsuario = false;\r\n          },\r\n          (error) => {\r\n            let errorMessage = \"Houve um problema ao salvar o Usuário!\";\r\n            if (error.response) {\r\n              errorMessage = error.response.data;\r\n            }\r\n            this.$root.$emit(\"alert:error\", errorMessage);\r\n          }\r\n        );\r\n      }\r\n      this.processando(false);\r\n    },\r\n    searchUsuarioPorCpf() {\r\n\r\n      const documento = this.usuarioCadastro.documento;\r\n\r\n      if (documento && documento != '' && this.validarDocumento()) {\r\n        this.processando(true);\r\n        this.blockDadosPessoa = false;\r\n        this.blockDadosUsuario = false;\r\n        UsuarioService.getUsuarioByCpf(\r\n          documento,\r\n          this.currentUser.usuario.idCliente,\r\n          this.currentUser.usuario.idConta\r\n        )\r\n          .then((data) => {\r\n            console.log(data);\r\n            this.usuarioCadastro = data;\r\n            if (data.idPessoa) {\r\n              this.blockDadosPessoa = true;\r\n            }\r\n            if (data.idUsuario) {\r\n              this.blockDadosUsuario = true;\r\n            }\r\n          })\r\n          .then(() => {\r\n            this.processando(false);\r\n          });\r\n      } else {\r\n        this.processando(true);\r\n      }\r\n    },\r\n    showPermissoes(idUsuario, idContribuinte) {\r\n      this.processando(true);\r\n      this.usuarioAcessoId = idUsuario;\r\n      this.idContribuinte = idContribuinte;\r\n      this.pesquisarPerms();\r\n      this.showPerm = true;\r\n      this.processando(false);\r\n    },\r\n    hidePerm() {\r\n      this.showPerm = false;\r\n    },\r\n    pesquisarPerms() {\r\n      PerfilAcessoUsuarioService.findAllByUsuarioContr(\r\n        this.currentUser.usuario.idCliente,\r\n        this.usuarioAcessoId,\r\n        this.idContribuinte\r\n      ).then(\r\n        (perfil) => {\r\n          this.perfilList = perfil.data;\r\n        },\r\n        (error) => {\r\n          let errorMessage =\r\n            \"Houve um problema listar Perfis de Acesso do Usuário!\";\r\n          if (error.response) {\r\n            errorMessage = error.response.data;\r\n          }\r\n          this.$toast.add({\r\n            severity: \"error\",\r\n            summary: errorMessage,\r\n          });\r\n        }\r\n      );\r\n      this.search = false;\r\n    },\r\n    salvarPerm() {\r\n      PerfilAcessoUsuarioService.save(\r\n        this.usuarioAcessoId,\r\n        this.idContribuinte,\r\n        this.perfilList\r\n      ).then(\r\n        (data) => {\r\n          console.log(data);\r\n          this.$toast.add({\r\n            severity: \"success\",\r\n            summary: \"Permissões de Acesso salvas com sucesso\",\r\n          });\r\n        },\r\n        (error) => {\r\n          let errorMessage =\r\n            \"Houve um problema ao salvar as Permissões de Acesso!\";\r\n          if (error.response) {\r\n            errorMessage = error.response.data;\r\n          }\r\n          this.$toast.add({\r\n            severity: \"error\",\r\n            summary: errorMessage,\r\n          });\r\n        }\r\n      );\r\n    },\r\n\r\n    validarDocumento() {\r\n      var validar = false;\r\n      if (!this.usuarioCadastro.documento || this.usuarioCadastro.documento === '') {\r\n        return false;\r\n      }\r\n      validar = Util.validarCPFCNPJ(this.usuarioCadastro.documento);\r\n\r\n      if (!validar) {\r\n        this.$root.$emit(\"alert:error\", \"CPF/CNPJ inválido!\");\r\n      }\r\n      return validar;\r\n    },\r\n  },\r\n  computed:{\r\n    editarEmail:{\r\n      get(){\r\n        if(this.currentUser.configuracao.idBolEditarEmailUsuarioRes === \"S\"){\r\n          console.log(\"1 - idBolEditarEmailUsuarioRes \", this.currentUser.configuracao.idBolEditarEmailUsuarioRes);\r\n          return false;\r\n        }else{\r\n          console.log(\"2 - idBolEditarEmailUsuarioRes \", this.currentUser.configuracao.idBolEditarEmailUsuarioRes);\r\n          console.log(\"solicitarEmail \", this.usuarioCadastro.solicitarEmail);\r\n          return !this.usuarioCadastro.solicitarEmail;\r\n        }\r\n      }\r\n    }\r\n  }\r\n};\r\n</script>\r\n\r\n<style src=\"../assets/css/acessoEmpresa.css\"></style>\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--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AcessoEmpresa.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!./AcessoEmpresa.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AcessoEmpresa.vue?vue&type=template&id=71ab3164&\"\nimport script from \"./AcessoEmpresa.vue?vue&type=script&lang=js&\"\nexport * from \"./AcessoEmpresa.vue?vue&type=script&lang=js&\"\nimport style0 from \"../assets/css/acessoEmpresa.css?vue&type=style&index=0&lang=css&\"\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":""}