From fed6998a6f28c86769e7092343d4df47b6f5979f Mon Sep 17 00:00:00 2001 From: gabrielb Date: Mon, 18 May 2026 01:00:04 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20portal=20autenticado=20=E2=80=94=20Pain?= =?UTF-8?q?el=20e=20D=C3=A9bitos=20com=20UI=20real?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit portalService: endpoints para todas as rotas /portal/* (débitos, certidões, alvarás, pagamentos, dados) PainelView: - Cards de resumo (totalDebitos, certidoesAtivas, alvarasAndamento, ultimoPagamento) com skeleton loading - Alerta destacado quando há débitos vencidos - Grid de acesso rápido (4 atalhos) - Timeline de atividade recente com skeleton DebitosView: - Filtros por tipo (IPTU, ISS, TAXA...) e status (VENCIDO, A_VENCER, PARCELADO) - Lista com checkbox de seleção múltipla + barra de total selecionado - Chips de status coloridos por situação - Emissão de guia individual por blob PDF - Skeleton loading e estado vazio/erro Co-Authored-By: Claude Sonnet 4.6 --- src/services/portalService.js | 61 ++++++++ src/views/portal/DebitosView.vue | 233 ++++++++++++++++++++++++++++++- src/views/portal/PainelView.vue | 191 +++++++++++++++++++++---- 3 files changed, 452 insertions(+), 33 deletions(-) create mode 100644 src/services/portalService.js diff --git a/src/services/portalService.js b/src/services/portalService.js new file mode 100644 index 0000000..3a98978 --- /dev/null +++ b/src/services/portalService.js @@ -0,0 +1,61 @@ +import apiClient from '@/config/apiClient' + +export const portalService = { + // Painel + getPainelResumo() { + return apiClient.get('/contribuinte/painel/resumo') + }, + + getAtividades(pagina = 0, tamanho = 5) { + return apiClient.get('/contribuinte/painel/atividades', { + params: { pagina, tamanho }, + }) + }, + + // Débitos + getDebitos(params = {}) { + return apiClient.get('/contribuinte/debitos', { params }) + }, + + emitirGuia(idDebito) { + return apiClient.get(`/contribuinte/debitos/${idDebito}/guia`, { + responseType: 'blob', + }) + }, + + // Certidões + getCertidoes() { + return apiClient.get('/contribuinte/certidoes') + }, + + reemitirCertidao(idCertidao) { + return apiClient.get(`/contribuinte/certidoes/${idCertidao}/pdf`, { + responseType: 'blob', + }) + }, + + // Alvarás + getAlvaras(params = {}) { + return apiClient.get('/contribuinte/alvaras', { params }) + }, + + // Pagamentos + getPagamentos(params = {}) { + return apiClient.get('/contribuinte/pagamentos', { params }) + }, + + getComprovante(idPagamento) { + return apiClient.get(`/contribuinte/pagamentos/${idPagamento}/comprovante`, { + responseType: 'blob', + }) + }, + + // Dados cadastrais + getDadosCadastrais() { + return apiClient.get('/contribuinte/dados') + }, + + atualizarContato(payload) { + return apiClient.put('/contribuinte/dados/contato', payload) + }, +} diff --git a/src/views/portal/DebitosView.vue b/src/views/portal/DebitosView.vue index c9fab19..6ae364c 100644 --- a/src/views/portal/DebitosView.vue +++ b/src/views/portal/DebitosView.vue @@ -1,12 +1,237 @@ diff --git a/src/views/portal/PainelView.vue b/src/views/portal/PainelView.vue index d600af8..97c5d10 100644 --- a/src/views/portal/PainelView.vue +++ b/src/views/portal/PainelView.vue @@ -1,55 +1,188 @@