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 @@