@credithub/harlan-components 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +48432 -66
- package/package.json +5 -2
- package/lib/cjs/assets/btn/btnWrapper.d.ts +0 -2
- package/lib/cjs/assets/btn/btnWrapper.js +0 -14
- package/lib/cjs/assets/btn/chevronDown.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronDown.js +0 -34
- package/lib/cjs/assets/btn/chevronLeft.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronLeft.js +0 -35
- package/lib/cjs/assets/btn/chevronRight.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronRight.js +0 -35
- package/lib/cjs/assets/btn/chevronUp.d.ts +0 -3
- package/lib/cjs/assets/btn/chevronUp.js +0 -35
- package/lib/cjs/assets/btn/closeIcon.d.ts +0 -3
- package/lib/cjs/assets/btn/closeIcon.js +0 -34
- package/lib/cjs/assets/btn/thumbDown.d.ts +0 -7
- package/lib/cjs/assets/btn/thumbDown.js +0 -16
- package/lib/cjs/assets/btn/thumbUp.d.ts +0 -7
- package/lib/cjs/assets/btn/thumbUp.js +0 -16
- package/lib/cjs/assets/icones/chequesSemFundo.d.ts +0 -4
- package/lib/cjs/assets/icones/chequesSemFundo.js +0 -17
- package/lib/cjs/assets/icones/consultaSimples.d.ts +0 -4
- package/lib/cjs/assets/icones/consultaSimples.js +0 -17
- package/lib/cjs/assets/icones/contasBancarias.d.ts +0 -4
- package/lib/cjs/assets/icones/contasBancarias.js +0 -17
- package/lib/cjs/assets/icones/contato.d.ts +0 -4
- package/lib/cjs/assets/icones/contato.js +0 -17
- package/lib/cjs/assets/icones/dividasVencidasSerasa.d.ts +0 -4
- package/lib/cjs/assets/icones/dividasVencidasSerasa.js +0 -14
- package/lib/cjs/assets/icones/dominios.d.ts +0 -4
- package/lib/cjs/assets/icones/dominios.js +0 -14
- package/lib/cjs/assets/icones/endereco.d.ts +0 -4
- package/lib/cjs/assets/icones/endereco.js +0 -17
- package/lib/cjs/assets/icones/iconeEmpresa.d.ts +0 -8
- package/lib/cjs/assets/icones/iconeEmpresa.js +0 -17
- package/lib/cjs/assets/icones/iconePessoa.d.ts +0 -9
- package/lib/cjs/assets/icones/iconePessoa.js +0 -17
- package/lib/cjs/assets/icones/imoveis.d.ts +0 -4
- package/lib/cjs/assets/icones/imoveis.js +0 -14
- package/lib/cjs/assets/icones/pefinRefinBoaVista.d.ts +0 -4
- package/lib/cjs/assets/icones/pefinRefinBoaVista.js +0 -14
- package/lib/cjs/assets/icones/pefinRefinSerasa.d.ts +0 -4
- package/lib/cjs/assets/icones/pefinRefinSerasa.js +0 -16
- package/lib/cjs/assets/icones/processosJuridicos.d.ts +0 -4
- package/lib/cjs/assets/icones/processosJuridicos.js +0 -17
- package/lib/cjs/assets/icones/protestos.d.ts +0 -4
- package/lib/cjs/assets/icones/protestos.js +0 -17
- package/lib/cjs/assets/icones/protestosCredito.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosCredito.js +0 -17
- package/lib/cjs/assets/icones/protestosGerais.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosGerais.js +0 -17
- package/lib/cjs/assets/icones/protestosImpostos.d.ts +0 -4
- package/lib/cjs/assets/icones/protestosImpostos.js +0 -17
- package/lib/cjs/assets/icones/quadroSocietario.d.ts +0 -4
- package/lib/cjs/assets/icones/quadroSocietario.js +0 -17
- package/lib/cjs/assets/icones/resumoNegativacoes.d.ts +0 -4
- package/lib/cjs/assets/icones/resumoNegativacoes.js +0 -16
- package/lib/cjs/assets/icones/scoreBoaVista.d.ts +0 -4
- package/lib/cjs/assets/icones/scoreBoaVista.js +0 -14
- package/lib/cjs/assets/icones/scr.d.ts +0 -4
- package/lib/cjs/assets/icones/scr.js +0 -14
- package/lib/cjs/assets/icones/ultimaMovimentacao.d.ts +0 -4
- package/lib/cjs/assets/icones/ultimaMovimentacao.js +0 -17
- package/lib/cjs/assets/icones/veiculos.d.ts +0 -4
- package/lib/cjs/assets/icones/veiculos.js +0 -14
- package/lib/cjs/components/adresses/addresses.d.ts +0 -19
- package/lib/cjs/components/adresses/addresses.js +0 -74
- package/lib/cjs/components/adresses/getGeocode.d.ts +0 -6
- package/lib/cjs/components/adresses/getGeocode.js +0 -73
- package/lib/cjs/components/adresses/map.d.ts +0 -11
- package/lib/cjs/components/adresses/map.js +0 -50
- package/lib/cjs/components/bank-accounts/bank-accounts.d.ts +0 -3
- package/lib/cjs/components/bank-accounts/bank-accounts.js +0 -33
- package/lib/cjs/components/ccf/ccf.d.ts +0 -3
- package/lib/cjs/components/ccf/ccf.js +0 -65
- package/lib/cjs/components/ccf/ccfList.d.ts +0 -12
- package/lib/cjs/components/ccf/ccfList.js +0 -52
- package/lib/cjs/components/chart/chartContent.d.ts +0 -6
- package/lib/cjs/components/chart/chartContent.js +0 -55
- package/lib/cjs/components/chart/chartSystem.d.ts +0 -6
- package/lib/cjs/components/chart/chartSystem.js +0 -50
- package/lib/cjs/components/chart/components/MixedChart.d.ts +0 -7
- package/lib/cjs/components/chart/components/MixedChart.js +0 -55
- package/lib/cjs/components/chart/components/PieChart.d.ts +0 -7
- package/lib/cjs/components/chart/components/PieChart.js +0 -14
- package/lib/cjs/components/chart/components/categoryProtestos.d.ts +0 -7
- package/lib/cjs/components/chart/components/categoryProtestos.js +0 -22
- package/lib/cjs/components/chart/hooks/useCategoryProtestos.d.ts +0 -6
- package/lib/cjs/components/chart/hooks/useCategoryProtestos.js +0 -75
- package/lib/cjs/components/chart/hooks/useChartData.d.ts +0 -8
- package/lib/cjs/components/chart/hooks/useChartData.js +0 -61
- package/lib/cjs/components/chart/hooks/useMixedChartData.d.ts +0 -10
- package/lib/cjs/components/chart/hooks/useMixedChartData.js +0 -47
- package/lib/cjs/components/chart/hooks/usePieChartData.d.ts +0 -6
- package/lib/cjs/components/chart/hooks/usePieChartData.js +0 -93
- package/lib/cjs/components/chart/quantityResult.d.ts +0 -17
- package/lib/cjs/components/chart/quantityResult.js +0 -46
- package/lib/cjs/components/chart/types/iChart.d.ts +0 -58
- package/lib/cjs/components/chart/types/iChart.js +0 -2
- package/lib/cjs/components/chart/utils/chartCustomization.d.ts +0 -7
- package/lib/cjs/components/chart/utils/chartCustomization.js +0 -159
- package/lib/cjs/components/chart/utils/chartUtils.d.ts +0 -11
- package/lib/cjs/components/chart/utils/chartUtils.js +0 -46
- package/lib/cjs/components/chart/utils/dataManipulation.d.ts +0 -10
- package/lib/cjs/components/chart/utils/dataManipulation.js +0 -106
- package/lib/cjs/components/chart/utils/dataProcessing.d.ts +0 -3
- package/lib/cjs/components/chart/utils/dataProcessing.js +0 -94
- package/lib/cjs/components/common/addItem.d.ts +0 -11
- package/lib/cjs/components/common/addItem.js +0 -49
- package/lib/cjs/components/common/button.d.ts +0 -5
- package/lib/cjs/components/common/button.js +0 -46
- package/lib/cjs/components/common/carousel.d.ts +0 -4
- package/lib/cjs/components/common/carousel.js +0 -24
- package/lib/cjs/components/consultaRfb.d.ts +0 -16
- package/lib/cjs/components/consultaRfb.js +0 -48
- package/lib/cjs/components/consultaSimplesSection/consultaSimplesSection.d.ts +0 -6
- package/lib/cjs/components/consultaSimplesSection/consultaSimplesSection.js +0 -110
- package/lib/cjs/components/consultasComplementares.d.ts +0 -29
- package/lib/cjs/components/consultasComplementares.js +0 -59
- package/lib/cjs/components/contacts/contactLikeDislikeSection.d.ts +0 -8
- package/lib/cjs/components/contacts/contactLikeDislikeSection.js +0 -96
- package/lib/cjs/components/contacts/contacts.d.ts +0 -18
- package/lib/cjs/components/contacts/contacts.js +0 -75
- package/lib/cjs/components/contacts/contactsLikeDislike.d.ts +0 -9
- package/lib/cjs/components/contacts/contactsLikeDislike.js +0 -12
- package/lib/cjs/components/contacts/thumbsButton.d.ts +0 -9
- package/lib/cjs/components/contacts/thumbsButton.js +0 -46
- package/lib/cjs/components/dividasPublicas/dividasPublicas.d.ts +0 -3
- package/lib/cjs/components/dividasPublicas/dividasPublicas.js +0 -89
- package/lib/cjs/components/dominios/dominios.d.ts +0 -3
- package/lib/cjs/components/dominios/dominios.js +0 -53
- package/lib/cjs/components/dossie/carrousel/carrousel.d.ts +0 -8
- package/lib/cjs/components/dossie/carrousel/carrousel.js +0 -22
- package/lib/cjs/components/dossie/companyLogo/companyLogo.d.ts +0 -7
- package/lib/cjs/components/dossie/companyLogo/companyLogo.js +0 -31
- package/lib/cjs/components/dossie/dossie.d.ts +0 -8
- package/lib/cjs/components/dossie/dossie.js +0 -74
- package/lib/cjs/components/dossie/summary/cardsAndProducts.d.ts +0 -29
- package/lib/cjs/components/dossie/summary/cardsAndProducts.js +0 -212
- package/lib/cjs/components/dossie/summary/summary.d.ts +0 -18
- package/lib/cjs/components/dossie/summary/summary.js +0 -35
- package/lib/cjs/components/dossie/summary/utils.d.ts +0 -10
- package/lib/cjs/components/dossie/summary/utils.js +0 -38
- package/lib/cjs/components/dossie/transactionTable/transactionTable.d.ts +0 -6
- package/lib/cjs/components/dossie/transactionTable/transactionTable.js +0 -40
- package/lib/cjs/components/imoveis/imoveisService.d.ts +0 -6
- package/lib/cjs/components/imoveis/imoveisService.js +0 -79
- package/lib/cjs/components/imoveis/types.d.ts +0 -24
- package/lib/cjs/components/imoveis/types.js +0 -2
- package/lib/cjs/components/interface/globalStyle.d.ts +0 -2
- package/lib/cjs/components/interface/globalStyle.js +0 -11
- package/lib/cjs/components/interface/header.d.ts +0 -23
- package/lib/cjs/components/interface/header.js +0 -77
- package/lib/cjs/components/interface/loading.d.ts +0 -2
- package/lib/cjs/components/interface/loading.js +0 -14
- package/lib/cjs/components/interface/loadingBar.d.ts +0 -5
- package/lib/cjs/components/interface/loadingBar.js +0 -46
- package/lib/cjs/components/interface/responsiveGrid.d.ts +0 -8
- package/lib/cjs/components/interface/responsiveGrid.js +0 -13
- package/lib/cjs/components/interface/result.d.ts +0 -9
- package/lib/cjs/components/interface/result.js +0 -22
- package/lib/cjs/components/interface/resultWithoutInformation.d.ts +0 -4
- package/lib/cjs/components/interface/resultWithoutInformation.js +0 -37
- package/lib/cjs/components/interface/section.d.ts +0 -10
- package/lib/cjs/components/interface/section.js +0 -36
- package/lib/cjs/components/interface/statusMessage.d.ts +0 -7
- package/lib/cjs/components/interface/statusMessage.js +0 -30
- package/lib/cjs/components/interface/theme.d.ts +0 -73
- package/lib/cjs/components/interface/theme.js +0 -75
- package/lib/cjs/components/liminar/liminar.d.ts +0 -3
- package/lib/cjs/components/liminar/liminar.js +0 -46
- package/lib/cjs/components/liminar/types.d.ts +0 -3
- package/lib/cjs/components/liminar/types.js +0 -2
- package/lib/cjs/components/partners/partner-dividas-publicas.d.ts +0 -5
- package/lib/cjs/components/partners/partner-dividas-publicas.js +0 -15
- package/lib/cjs/components/partners/partner-protestos.d.ts +0 -5
- package/lib/cjs/components/partners/partner-protestos.js +0 -15
- package/lib/cjs/components/partners/partner-rfb-status.d.ts +0 -5
- package/lib/cjs/components/partners/partner-rfb-status.js +0 -15
- package/lib/cjs/components/partners/partnerField.d.ts +0 -9
- package/lib/cjs/components/partners/partnerField.js +0 -14
- package/lib/cjs/components/partners/partnerList.d.ts +0 -16
- package/lib/cjs/components/partners/partnerList.js +0 -44
- package/lib/cjs/components/partners/partners.d.ts +0 -3
- package/lib/cjs/components/partners/partners.js +0 -77
- package/lib/cjs/components/pep/pep.d.ts +0 -3
- package/lib/cjs/components/pep/pep.js +0 -66
- package/lib/cjs/components/processos-juridicos/envolvidosList.d.ts +0 -10
- package/lib/cjs/components/processos-juridicos/envolvidosList.js +0 -27
- package/lib/cjs/components/processos-juridicos/processosJuridicos.d.ts +0 -5
- package/lib/cjs/components/processos-juridicos/processosJuridicos.js +0 -51
- package/lib/cjs/components/processos-juridicos/processosJuridicosList.d.ts +0 -7
- package/lib/cjs/components/processos-juridicos/processosJuridicosList.js +0 -90
- package/lib/cjs/components/processos-juridicos/types.d.ts +0 -27
- package/lib/cjs/components/processos-juridicos/types.js +0 -2
- package/lib/cjs/components/protestos/getTotalProtestos.d.ts +0 -1
- package/lib/cjs/components/protestos/getTotalProtestos.js +0 -10
- package/lib/cjs/components/protestos/protestos.d.ts +0 -3
- package/lib/cjs/components/protestos/protestos.js +0 -94
- package/lib/cjs/components/protestos/protestosCategory.d.ts +0 -7
- package/lib/cjs/components/protestos/protestosCategory.js +0 -55
- package/lib/cjs/components/protestos/protestosList.d.ts +0 -33
- package/lib/cjs/components/protestos/protestosList.js +0 -73
- package/lib/cjs/components/reclameAqui/reclameAquiCarousel.d.ts +0 -5
- package/lib/cjs/components/reclameAqui/reclameAquiCarousel.js +0 -129
- package/lib/cjs/components/reclameAqui/types.d.ts +0 -31
- package/lib/cjs/components/reclameAqui/types.js +0 -2
- package/lib/cjs/components/refinBoaVista/refinBoaVista.d.ts +0 -22
- package/lib/cjs/components/refinBoaVista/refinBoaVista.js +0 -86
- package/lib/cjs/components/refinBoaVista/types.d.ts +0 -48
- package/lib/cjs/components/refinBoaVista/types.js +0 -7
- package/lib/cjs/components/refinSerasa/refinSerasa.d.ts +0 -22
- package/lib/cjs/components/refinSerasa/refinSerasa.js +0 -129
- package/lib/cjs/components/refinSerasa/types.d.ts +0 -48
- package/lib/cjs/components/refinSerasa/types.js +0 -2
- package/lib/cjs/components/refinSerasa/usePendencias.d.ts +0 -0
- package/lib/cjs/components/refinSerasa/usePendencias.js +0 -0
- package/lib/cjs/components/resultadoDaPesquisa/resultado-da-pesquisa.d.ts +0 -5
- package/lib/cjs/components/resultadoDaPesquisa/resultado-da-pesquisa.js +0 -31
- package/lib/cjs/components/score/scoreService.d.ts +0 -6
- package/lib/cjs/components/score/scoreService.js +0 -71
- package/lib/cjs/components/score/types.d.ts +0 -12
- package/lib/cjs/components/score/types.js +0 -2
- package/lib/cjs/components/scr/getResumoDeCreditos.d.ts +0 -6
- package/lib/cjs/components/scr/getResumoDeCreditos.js +0 -93
- package/lib/cjs/components/scr/getResumoDeModalidades.d.ts +0 -8
- package/lib/cjs/components/scr/getResumoDeModalidades.js +0 -95
- package/lib/cjs/components/scr/scr.d.ts +0 -5
- package/lib/cjs/components/scr/scr.js +0 -140
- package/lib/cjs/components/scr/types.d.ts +0 -86
- package/lib/cjs/components/scr/types.js +0 -2
- package/lib/cjs/components/veiculos/types.d.ts +0 -0
- package/lib/cjs/components/veiculos/types.js +0 -0
- package/lib/cjs/components/veiculos/veiculos.d.ts +0 -22
- package/lib/cjs/components/veiculos/veiculos.js +0 -89
- package/lib/cjs/components/webservice.d.ts +0 -140
- package/lib/cjs/components/webservice.js +0 -262
- package/lib/cjs/constants/regex.d.ts +0 -2
- package/lib/cjs/constants/regex.js +0 -5
- package/lib/cjs/consultaSimples.d.ts +0 -11
- package/lib/cjs/consultaSimples.js +0 -61
- package/lib/cjs/hooks/useConsultaRfb.d.ts +0 -6
- package/lib/cjs/hooks/useConsultaRfb.js +0 -13
- package/lib/cjs/hooks/useConsultasComplementares.d.ts +0 -1
- package/lib/cjs/hooks/useConsultasComplementares.js +0 -13
- package/lib/cjs/hooks/useToggle.d.ts +0 -10
- package/lib/cjs/hooks/useToggle.js +0 -26
- package/lib/cjs/hooks/useWindowSize.d.ts +0 -4
- package/lib/cjs/hooks/useWindowSize.js +0 -23
- package/lib/cjs/index.d.ts +0 -23
- package/lib/cjs/utils/calculation.d.ts +0 -9
- package/lib/cjs/utils/calculation.js +0 -23
- package/lib/cjs/utils/date.d.ts +0 -1
- package/lib/cjs/utils/date.js +0 -10
- package/lib/cjs/utils/fillMissingData.d.ts +0 -6
- package/lib/cjs/utils/fillMissingData.js +0 -16
- package/lib/cjs/utils/formatter.d.ts +0 -2
- package/lib/cjs/utils/formatter.js +0 -7
- package/lib/cjs/utils/getUniqueDates.d.ts +0 -5
- package/lib/cjs/utils/getUniqueDates.js +0 -13
- package/lib/cjs/utils/number.d.ts +0 -4
- package/lib/cjs/utils/number.js +0 -27
- package/lib/cjs/utils/string.d.ts +0 -10
- package/lib/cjs/utils/string.js +0 -73
- package/lib/cjs/utils/xpath.d.ts +0 -6
- package/lib/cjs/utils/xpath.js +0 -23
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
var underscore_1 = require("underscore");
|
|
13
|
-
var number_1 = require("../../utils/number");
|
|
14
|
-
var agruparPorCategoriaDeVencimento = function (detalhamento) {
|
|
15
|
-
var _a = (0, underscore_1.groupBy)(detalhamento.map(function (item) { return item.vencimentos; }, []).flat(), function (_a) {
|
|
16
|
-
var categoria = _a.categoria;
|
|
17
|
-
return categoria;
|
|
18
|
-
}), _b = _a.avencer, avencer = _b === void 0 ? [] : _b, _c = _a.vencido, vencido = _c === void 0 ? [] : _c;
|
|
19
|
-
return { avencer: avencer, vencido: vencido };
|
|
20
|
-
};
|
|
21
|
-
var agruparPorDescricao = function (_a) {
|
|
22
|
-
var avencer = _a.avencer, vencido = _a.vencido;
|
|
23
|
-
return ({
|
|
24
|
-
avencer: (0, underscore_1.groupBy)(avencer, function (_a) {
|
|
25
|
-
var descricao = _a.descricao;
|
|
26
|
-
return descricao;
|
|
27
|
-
}),
|
|
28
|
-
vencido: (0, underscore_1.groupBy)(vencido, function (_a) {
|
|
29
|
-
var descricao = _a.descricao;
|
|
30
|
-
return descricao;
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var adicionarCreditosADescricao = function (description, valor) {
|
|
35
|
-
var isAvencerVencido = /(A Vencer|Vencido)$/i.test(description.trim());
|
|
36
|
-
return [
|
|
37
|
-
!isAvencerVencido
|
|
38
|
-
? "Cr\u00E9ditos ".concat(description.toLowerCase())
|
|
39
|
-
: description,
|
|
40
|
-
valor ? (0, number_1.formatMoney)(valor) : ''
|
|
41
|
-
];
|
|
42
|
-
};
|
|
43
|
-
var somarDadosAgrupadosPorDescricao = function (_a) {
|
|
44
|
-
var avencer = _a.avencer, vencido = _a.vencido;
|
|
45
|
-
return ({
|
|
46
|
-
avencer: Object.entries(avencer).map(function (_a) {
|
|
47
|
-
var descricao = _a[0], values = _a[1];
|
|
48
|
-
return ({
|
|
49
|
-
descricao: descricao,
|
|
50
|
-
valor: values.reduce(function (a, b) { return a + Number(b.valor); }, 0)
|
|
51
|
-
});
|
|
52
|
-
}).filter(function (_a) {
|
|
53
|
-
var descricao = _a.descricao;
|
|
54
|
-
return !/Limite/.test(descricao.trim());
|
|
55
|
-
})
|
|
56
|
-
.map(function (_a) {
|
|
57
|
-
var descricao = _a.descricao, valor = _a.valor;
|
|
58
|
-
return adicionarCreditosADescricao(descricao, valor);
|
|
59
|
-
}),
|
|
60
|
-
vencido: Object.entries(vencido).map(function (_a) {
|
|
61
|
-
var descricao = _a[0], values = _a[1];
|
|
62
|
-
return ({
|
|
63
|
-
descricao: descricao,
|
|
64
|
-
valor: values.reduce(function (a, b) { return a + Number(b.valor); }, 0)
|
|
65
|
-
});
|
|
66
|
-
}).filter(function (_a) {
|
|
67
|
-
var descricao = _a.descricao;
|
|
68
|
-
return !/Limite/.test(descricao.trim());
|
|
69
|
-
})
|
|
70
|
-
.map(function (_a) {
|
|
71
|
-
var descricao = _a.descricao, valor = _a.valor;
|
|
72
|
-
return adicionarCreditosADescricao(descricao, valor);
|
|
73
|
-
}),
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
var getVencidosEAvencer = underscore_1.compose.apply(void 0, [
|
|
77
|
-
agruparPorCategoriaDeVencimento,
|
|
78
|
-
agruparPorDescricao,
|
|
79
|
-
somarDadosAgrupadosPorDescricao
|
|
80
|
-
].reverse());
|
|
81
|
-
var getResumoDeCreditos = function (scr) {
|
|
82
|
-
var _a, _b, _c, _d, _e;
|
|
83
|
-
var _f = getVencidosEAvencer((_a = scr === null || scr === void 0 ? void 0 : scr.analise) === null || _a === void 0 ? void 0 : _a.detalhamento), avencer = _f.avencer, vencido = _f.vencido;
|
|
84
|
-
return __spreadArray(__spreadArray(__spreadArray([
|
|
85
|
-
['A Vencer', (0, number_1.formatMoney)(((_c = (_b = scr === null || scr === void 0 ? void 0 : scr.analise) === null || _b === void 0 ? void 0 : _b.total) === null || _c === void 0 ? void 0 : _c.aVencer) || 0)]
|
|
86
|
-
], avencer, true), [
|
|
87
|
-
['Vencido', (0, number_1.formatMoney)(((_e = (_d = scr === null || scr === void 0 ? void 0 : scr.analise) === null || _d === void 0 ? void 0 : _d.total) === null || _e === void 0 ? void 0 : _e.vencido) || 0)]
|
|
88
|
-
], false), vencido, true).map(function (_a) {
|
|
89
|
-
var descricao = _a[0], valor = _a[1];
|
|
90
|
-
return ({ descricao: descricao, valor: valor });
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
exports.default = getResumoDeCreditos;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
var underscore_1 = require("underscore");
|
|
13
|
-
var number_1 = require("../../utils/number");
|
|
14
|
-
function getResumoDeModalidades(scr) {
|
|
15
|
-
var _a;
|
|
16
|
-
var agruparPorTitulo = function (detalhamento) { return (0, underscore_1.groupBy)(detalhamento, function (_a) {
|
|
17
|
-
var modalidade = _a.modalidade;
|
|
18
|
-
return modalidade.titulo;
|
|
19
|
-
}); };
|
|
20
|
-
var agruparPorTituloESubtitulo = function (detalhamento) { return Object.fromEntries(Object.entries(detalhamento).map(function (_a) {
|
|
21
|
-
var key = _a[0], values = _a[1];
|
|
22
|
-
return [
|
|
23
|
-
key,
|
|
24
|
-
Object.entries((0, underscore_1.groupBy)(values, function (_a) {
|
|
25
|
-
var modalidade = _a.modalidade;
|
|
26
|
-
return modalidade.subtitulo;
|
|
27
|
-
})).map(function (_a) {
|
|
28
|
-
var _b;
|
|
29
|
-
var subtitulo = _a[0], detalhes = _a[1];
|
|
30
|
-
return ({
|
|
31
|
-
subtitulo: subtitulo,
|
|
32
|
-
variacaoCambial: (_b = detalhes.find(function (e) { return e.variacaoCambial; })) === null || _b === void 0 ? void 0 : _b.variacaoCambial,
|
|
33
|
-
valor: detalhes.map(function (detalhe) { return detalhe.vencimentos; }).flat().reduce(function (a, b) { return a + Number(b.valor); }, 0),
|
|
34
|
-
vencimentos: detalhes.map(function (detalhe) { return detalhe.vencimentos; }).flat()
|
|
35
|
-
});
|
|
36
|
-
})
|
|
37
|
-
];
|
|
38
|
-
})); };
|
|
39
|
-
var getModalidades = underscore_1.compose.apply(void 0, [agruparPorTitulo, agruparPorTituloESubtitulo].reverse());
|
|
40
|
-
var modalidades = getModalidades(scr.analise.detalhamento);
|
|
41
|
-
var resumoDeOperacoes = (_a = (scr.listaDeResumoDasOperacoes || [])) === null || _a === void 0 ? void 0 : _a.filter(function (_a) {
|
|
42
|
-
var modalidade = _a.modalidade;
|
|
43
|
-
return /^(19)/.test(modalidade);
|
|
44
|
-
});
|
|
45
|
-
var COD_LIMIT = {
|
|
46
|
-
1901: 'Limite global',
|
|
47
|
-
1902: 'Cheque especial',
|
|
48
|
-
1903: 'Conta garantida',
|
|
49
|
-
1904: 'Cartão de Crédito',
|
|
50
|
-
1905: 'Capital de giro',
|
|
51
|
-
1906: 'Crédito pessoal',
|
|
52
|
-
1907: 'Vendor',
|
|
53
|
-
1908: 'Compror',
|
|
54
|
-
1909: 'Descontos',
|
|
55
|
-
1910: 'Aquisição de bens',
|
|
56
|
-
1999: 'Outros',
|
|
57
|
-
};
|
|
58
|
-
var limite = resumoDeOperacoes.map(function (item) {
|
|
59
|
-
var modalidade = item.modalidade, listaDeVencimentos = item.listaDeVencimentos, variacaoCambial = item.variacaoCambial;
|
|
60
|
-
var sumSalaries = (0, number_1.sum)(listaDeVencimentos.map(function (e) { return Number(e.valorVencimento); }));
|
|
61
|
-
return modalidades.Limite.filter(function (r) { return sumSalaries === r.valor; })
|
|
62
|
-
.map(function (r) {
|
|
63
|
-
var _a;
|
|
64
|
-
return ({
|
|
65
|
-
subtitulo: r.subtitulo ? r.subtitulo : COD_LIMIT[modalidade] || '',
|
|
66
|
-
vencimentos: r.vencimentos,
|
|
67
|
-
variacaoCambial: (_a = r.variacaoCambial) !== null && _a !== void 0 ? _a : variacaoCambial,
|
|
68
|
-
valor: r.valor,
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}).flat();
|
|
72
|
-
modalidades.Limite = limite;
|
|
73
|
-
var sumVencimentos = function (vencimentos, tipo) { return (0, number_1.sum)(vencimentos.filter(function (e) { return tipo ? e.categoria === tipo : e.categoria; })
|
|
74
|
-
.map(function (e) { return Number(e.valor); })); };
|
|
75
|
-
return Object.entries(modalidades).map(function (_a) {
|
|
76
|
-
var _b;
|
|
77
|
-
var modalidade = _a[0], subcategorias = _a[1];
|
|
78
|
-
return __spreadArray([{
|
|
79
|
-
modalidade: "".concat(modalidade, " (Cambial: ").concat(((_b = subcategorias[0]) === null || _b === void 0 ? void 0 : _b.variacaoCambial) || 'Não', ")"),
|
|
80
|
-
vencido: sumVencimentos(subcategorias.map(function (subcategoria) { return subcategoria.vencimentos; }).flat(), 'vencido'),
|
|
81
|
-
aVencer: sumVencimentos(subcategorias.map(function (subcategoria) { return subcategoria.vencimentos; }).flat(), 'avencer'),
|
|
82
|
-
valor: (0, number_1.sum)(subcategorias.map(function (e) { return e.valor; }))
|
|
83
|
-
}], subcategorias.map(function (subcategoria) { return __spreadArray([{
|
|
84
|
-
modalidade: subcategoria.subtitulo,
|
|
85
|
-
valor: subcategoria.valor,
|
|
86
|
-
}], subcategoria.vencimentos.map(function (vencimento) {
|
|
87
|
-
var _a;
|
|
88
|
-
return ({
|
|
89
|
-
modalidade: !/^Limite/.test(modalidade) ? "Cr\u00E9ditos ".concat((_a = vencimento.descricao) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) : vencimento.descricao,
|
|
90
|
-
valor: vencimento.valor
|
|
91
|
-
});
|
|
92
|
-
}), true); }).flat(), true);
|
|
93
|
-
}).flat();
|
|
94
|
-
}
|
|
95
|
-
exports.default = getResumoDeModalidades;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
-
var t = {};
|
|
38
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
-
t[p] = s[p];
|
|
40
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
-
t[p[i]] = s[p[i]];
|
|
44
|
-
}
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
52
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
53
|
-
var react_1 = __importStar(require("react"));
|
|
54
|
-
var header_1 = __importDefault(require("../interface/header"));
|
|
55
|
-
var addItem_1 = __importDefault(require("../common/addItem"));
|
|
56
|
-
var result_1 = require("../interface/result");
|
|
57
|
-
var consultasComplementares_1 = require("../consultasComplementares");
|
|
58
|
-
var webservice_1 = require("../webservice");
|
|
59
|
-
var getResumoDeCreditos_1 = __importDefault(require("./getResumoDeCreditos"));
|
|
60
|
-
var getResumoDeModalidades_1 = __importDefault(require("./getResumoDeModalidades"));
|
|
61
|
-
var number_1 = require("../../utils/number");
|
|
62
|
-
var statusMessage_1 = __importDefault(require("../interface/statusMessage"));
|
|
63
|
-
var scr_1 = __importDefault(require("../../assets/icones/scr"));
|
|
64
|
-
function ConsultaSCR(_a) {
|
|
65
|
-
var _b, _c, _d, _e;
|
|
66
|
-
var documento = _a.documento;
|
|
67
|
-
var consultasComplementaresContext = (0, react_1.useContext)(consultasComplementares_1.ConsultasComplementaresContext);
|
|
68
|
-
var _f = consultasComplementaresContext !== null && consultasComplementaresContext !== void 0 ? consultasComplementaresContext : {}, consultasComplementares = _f.consultasComplementares, setConsultasComplementares = _f.setConsultasComplementares;
|
|
69
|
-
var _g = (0, webservice_1.useQuery)("SELECT FROM 'SCR'.'CONSULTA'", { documento: documento }, !!((_b = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.scr) === null || _b === void 0 ? void 0 : _b.consultaRealizada)), response = _g.response, isLoading = _g.isLoading, error = _g.error;
|
|
70
|
-
var scr = (_d = (_c = response === null || response === void 0 ? void 0 : response.document) === null || _c === void 0 ? void 0 : _c.ns2getResumoDoClienteResponse) === null || _d === void 0 ? void 0 : _d.return;
|
|
71
|
-
var scrRef = (0, react_1.useRef)(null);
|
|
72
|
-
var consultaSCRRealizada = (0, react_1.useMemo)(function () { var _a; return (_a = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.scr) === null || _a === void 0 ? void 0 : _a.consultaRealizada; }, [(_e = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.scr) === null || _e === void 0 ? void 0 : _e.consultaRealizada]);
|
|
73
|
-
var resumoDeCreditos = (scr && (0, getResumoDeCreditos_1.default)(scr)) || [];
|
|
74
|
-
(0, react_1.useEffect)(function () {
|
|
75
|
-
var _a;
|
|
76
|
-
(_a = scrRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
77
|
-
}, [consultaSCRRealizada]);
|
|
78
|
-
(0, react_1.useEffect)(function () {
|
|
79
|
-
response && setConsultasComplementares && setConsultasComplementares(function (prev) { return (__assign(__assign({}, prev), { scr: __assign(__assign({}, prev.scr), { data: response }) })); });
|
|
80
|
-
}, [response]);
|
|
81
|
-
return consultaSCRRealizada ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
82
|
-
react_1.default.createElement(ResumoDoCliente, { scrRef: scrRef, isLoading: isLoading, scr: scr, error: error }),
|
|
83
|
-
!error ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
84
|
-
react_1.default.createElement(FluxosDeVencimentosConsolidados, { isLoading: isLoading, scr: scr, error: error }),
|
|
85
|
-
react_1.default.createElement(ResumoList, { title: "SCR", subtitle: "Crédito", resumos: resumoDeCreditos, isLoading: isLoading, error: error }),
|
|
86
|
-
react_1.default.createElement(ResumoModalidades, { isLoading: isLoading, scr: scr, error: error }))) : null)) : null;
|
|
87
|
-
}
|
|
88
|
-
var ResumoDoCliente = function (_a) {
|
|
89
|
-
var scr = _a.scr, scrRef = _a.scrRef, isLoading = _a.isLoading, error = _a.error;
|
|
90
|
-
return (react_1.default.createElement("div", null,
|
|
91
|
-
react_1.default.createElement(header_1.default, { innerRef: scrRef, title: 'SCR', variant: isLoading ? 'loading' : error ? 'error' : 'default', subtitle: 'Resumo do Cliente', description: error ? react_1.default.createElement(statusMessage_1.default, { type: "error" }, error.message) : null, icon: scr_1.default }),
|
|
92
|
-
scr && !isLoading && (react_1.default.createElement(result_1.Result, null,
|
|
93
|
-
react_1.default.createElement(result_1.ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
94
|
-
react_1.default.createElement(addItem_1.default, { name: "CNPJ da IF Solicitante", value: scr === null || scr === void 0 ? void 0 : scr.cnpjDaIFSolicitante }),
|
|
95
|
-
react_1.default.createElement(addItem_1.default, { name: "C\u00F3digo do Cliente", value: scr === null || scr === void 0 ? void 0 : scr.codigoDoCliente }),
|
|
96
|
-
react_1.default.createElement(addItem_1.default, { name: "Coobriga\u00E7\u00E3o Assumida", value: scr === null || scr === void 0 ? void 0 : scr.coobrigacaoAssumida }),
|
|
97
|
-
react_1.default.createElement(addItem_1.default, { name: "Coobriga\u00E7\u00E3o Recebida", value: scr === null || scr === void 0 ? void 0 : scr.coobrigacaoRecebida }))))));
|
|
98
|
-
};
|
|
99
|
-
var FluxosDeVencimentosConsolidados = function (_a) {
|
|
100
|
-
var _b;
|
|
101
|
-
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
102
|
-
return (react_1.default.createElement("div", null,
|
|
103
|
-
react_1.default.createElement(header_1.default, { title: 'SCR', subtitle: 'Fluxo De Vencimentos Consolidados', variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: scr_1.default }),
|
|
104
|
-
scr && !isLoading && (react_1.default.createElement(result_1.Result, null,
|
|
105
|
-
react_1.default.createElement(result_1.ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
106
|
-
react_1.default.createElement(addItem_1.default, { name: "Data-base", value: scr.dataBaseConsultada }),
|
|
107
|
-
react_1.default.createElement(addItem_1.default, { name: "Situa\u00E7\u00E3o de processamento IF's", value: scr.percentualDocumentosProcessados }),
|
|
108
|
-
react_1.default.createElement(addItem_1.default, { name: "Situa\u00E7\u00E3o de processamento Valor", value: scr.percentualVolumeProcessado }),
|
|
109
|
-
react_1.default.createElement(addItem_1.default, { name: "Quantidade de Opera\u00E7\u00F5es", value: scr.quantidadeDeOperacoes }),
|
|
110
|
-
react_1.default.createElement(addItem_1.default, { name: "Quantidade de Institui\u00E7\u00F5es ", value: scr.quantidadeDeInstituicoes }),
|
|
111
|
-
react_1.default.createElement(addItem_1.default, { name: "Quantidade de opera\u00E7\u00F5es amparadas por sub-judice", value: scr.quantidadeOperacoesSubJudice }),
|
|
112
|
-
react_1.default.createElement(addItem_1.default, { name: "Quantidade de opera\u00E7\u00F5es com manifesta\u00E7\u00E3o por discord\u00E2ncia", value: scr.quantidadeOperacoesDiscordancia }),
|
|
113
|
-
react_1.default.createElement(addItem_1.default, { name: "Opera\u00E7\u00F5es com manifesta\u00E7\u00E3o de discord\u00E2ncia", value: scr.responsabilidadeTotalDiscordancia }),
|
|
114
|
-
react_1.default.createElement(addItem_1.default, { name: "Opera\u00E7\u00F5es amparadas por sub-judice", value: scr.responsabilidadeTotalSubJudice }),
|
|
115
|
-
react_1.default.createElement(addItem_1.default, { name: "Risco indireto fornecedor", value: scr.riscoIndiretoVendor }),
|
|
116
|
-
react_1.default.createElement(addItem_1.default, { name: "Data de in\u00EDcio do relacionamento com a IF", value: scr.dataInicioRelacionamento && ((_b = new Date(scr.dataInicioRelacionamento)) === null || _b === void 0 ? void 0 : _b.toLocaleDateString()) }),
|
|
117
|
-
react_1.default.createElement(addItem_1.default, { name: "Tipo cliente", value: scr.tipoDoCliente }))))));
|
|
118
|
-
};
|
|
119
|
-
var ResumoList = function (_a) {
|
|
120
|
-
var isLoading = _a.isLoading, className = _a.className, error = _a.error, resumos = _a.resumos, props = __rest(_a, ["isLoading", "className", "error", "resumos"]);
|
|
121
|
-
return (react_1.default.createElement("div", null,
|
|
122
|
-
react_1.default.createElement(header_1.default, __assign({}, props, { variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: scr_1.default })),
|
|
123
|
-
!isLoading && (react_1.default.createElement(result_1.Result, null,
|
|
124
|
-
react_1.default.createElement(result_1.ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" }, resumos.map(function (_a, key) {
|
|
125
|
-
var descricao = _a.descricao, valor = _a.valor;
|
|
126
|
-
return react_1.default.createElement(addItem_1.default, { key: key, name: descricao, value: valor });
|
|
127
|
-
}))))));
|
|
128
|
-
};
|
|
129
|
-
var ResumoModalidades = function (_a) {
|
|
130
|
-
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
131
|
-
var resumoModalidades = scr && (0, getResumoDeModalidades_1.default)(scr) || [];
|
|
132
|
-
return (react_1.default.createElement("div", null,
|
|
133
|
-
react_1.default.createElement(header_1.default, { title: "SCR", subtitle: "Modalidade x Data Base", variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: scr_1.default }),
|
|
134
|
-
!isLoading && (react_1.default.createElement(result_1.Result, null, resumoModalidades.map(function (resumo, key) { return (react_1.default.createElement(result_1.ResultContent, { key: key, desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
135
|
-
react_1.default.createElement(addItem_1.default, { name: "Modalidade", value: resumo.modalidade }),
|
|
136
|
-
react_1.default.createElement(addItem_1.default, { name: "Vencido", value: resumo.vencido && (0, number_1.formatMoney)(resumo.vencido) }),
|
|
137
|
-
react_1.default.createElement(addItem_1.default, { name: "A Vencer", value: resumo.aVencer && (0, number_1.formatMoney)(resumo.aVencer) }),
|
|
138
|
-
react_1.default.createElement(addItem_1.default, { name: "Valor", value: (0, number_1.formatMoney)(resumo.valor) }))); })))));
|
|
139
|
-
};
|
|
140
|
-
exports.default = ConsultaSCR;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HeaderProps } from "../interface/header";
|
|
3
|
-
export interface SCRResponse {
|
|
4
|
-
ns2getResumoDoClienteResponse: Ns2getResumoDoClienteResponse;
|
|
5
|
-
}
|
|
6
|
-
export interface Ns2getResumoDoClienteResponse {
|
|
7
|
-
return: SCRQuery;
|
|
8
|
-
}
|
|
9
|
-
export interface SCRQuery {
|
|
10
|
-
cnpjDaIFSolicitante: string;
|
|
11
|
-
codigoDoCliente: string;
|
|
12
|
-
coobrigacaoAssumida: string;
|
|
13
|
-
coobrigacaoRecebida: string;
|
|
14
|
-
dataBaseConsultada: string;
|
|
15
|
-
dataInicioRelacionamento: string;
|
|
16
|
-
listaDeResumoDasOperacoes: ListaDeResumoDasOperacoes[];
|
|
17
|
-
percentualDocumentosProcessados: string;
|
|
18
|
-
percentualVolumeProcessado: string;
|
|
19
|
-
quantidadeDeInstituicoes: string;
|
|
20
|
-
quantidadeDeOperacoes: string;
|
|
21
|
-
quantidadeOperacoesDiscordancia: string;
|
|
22
|
-
quantidadeOperacoesSubJudice: string;
|
|
23
|
-
responsabilidadeTotalDiscordancia: string;
|
|
24
|
-
responsabilidadeTotalSubJudice: string;
|
|
25
|
-
riscoIndiretoVendor: string;
|
|
26
|
-
tipoDoCliente: string;
|
|
27
|
-
analise: Analise;
|
|
28
|
-
}
|
|
29
|
-
export interface ListaDeResumoDasOperacoes {
|
|
30
|
-
listaDeVencimentos: ListaDeVencimento[];
|
|
31
|
-
modalidade: string;
|
|
32
|
-
variacaoCambial: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ListaDeVencimento {
|
|
35
|
-
codigoVencimento: string;
|
|
36
|
-
valorVencimento: string;
|
|
37
|
-
}
|
|
38
|
-
export interface Analise {
|
|
39
|
-
limiteDeCreditoEmDias: LimiteDeCreditoEmDias;
|
|
40
|
-
creditoALiberarEmDias: CreditoAliberarEmDias;
|
|
41
|
-
total: Total;
|
|
42
|
-
prejuizoEmMeses: PrejuizoEmMeses;
|
|
43
|
-
detalhamento: Detalhamento[];
|
|
44
|
-
}
|
|
45
|
-
export interface LimiteDeCreditoEmDias {
|
|
46
|
-
ate360: number;
|
|
47
|
-
acimaDe360: number;
|
|
48
|
-
}
|
|
49
|
-
export interface CreditoAliberarEmDias {
|
|
50
|
-
ate360: number;
|
|
51
|
-
acimaDe360: number;
|
|
52
|
-
}
|
|
53
|
-
export interface Total {
|
|
54
|
-
aVencer: number;
|
|
55
|
-
vencido: number;
|
|
56
|
-
}
|
|
57
|
-
export interface PrejuizoEmMeses {
|
|
58
|
-
ate12: number;
|
|
59
|
-
acimaDe12Ate48: number;
|
|
60
|
-
acimaDe48: number;
|
|
61
|
-
}
|
|
62
|
-
export interface Detalhamento {
|
|
63
|
-
modalidade: Modalidade;
|
|
64
|
-
valor: number;
|
|
65
|
-
variacaoCambial: string;
|
|
66
|
-
vencimentos: Vencimento[];
|
|
67
|
-
}
|
|
68
|
-
export interface Modalidade {
|
|
69
|
-
titulo: string;
|
|
70
|
-
subtitulo: string;
|
|
71
|
-
}
|
|
72
|
-
export interface Vencimento {
|
|
73
|
-
categoria: 'avencer' | 'vencido';
|
|
74
|
-
descricao: string;
|
|
75
|
-
valor: string;
|
|
76
|
-
}
|
|
77
|
-
export type SCRListProps = {
|
|
78
|
-
scrRef?: React.LegacyRef<HTMLDivElement>;
|
|
79
|
-
scr?: SCRQuery;
|
|
80
|
-
isLoading: boolean;
|
|
81
|
-
error: Error | null;
|
|
82
|
-
};
|
|
83
|
-
export type GrupoDeVencimentos = Record<'avencer' | 'vencido', Record<string, Vencimento[]>>;
|
|
84
|
-
export type ResumoListProps = Omit<SCRListProps, 'scr'> & HeaderProps & {
|
|
85
|
-
resumos: Record<'descricao' | 'valor', string | number>[];
|
|
86
|
-
};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare function Veiculos({ documento }: {
|
|
3
|
-
documento: string;
|
|
4
|
-
}): React.JSX.Element | null;
|
|
5
|
-
export type PendenciaBoaVista = {
|
|
6
|
-
ocorrencia: string;
|
|
7
|
-
credor: string;
|
|
8
|
-
entrada: string;
|
|
9
|
-
vencimento: string;
|
|
10
|
-
valor: string;
|
|
11
|
-
informante: string;
|
|
12
|
-
contrato: string;
|
|
13
|
-
avalista: string;
|
|
14
|
-
cidade: string;
|
|
15
|
-
uf: string;
|
|
16
|
-
situacao: string;
|
|
17
|
-
orgaoemissor: string;
|
|
18
|
-
totalpendencias: string;
|
|
19
|
-
totalvalor: string;
|
|
20
|
-
categoria: string;
|
|
21
|
-
};
|
|
22
|
-
export default Veiculos;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
41
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
42
|
-
var react_1 = __importStar(require("react"));
|
|
43
|
-
var header_1 = __importDefault(require("../interface/header"));
|
|
44
|
-
var addItem_1 = __importDefault(require("../common/addItem"));
|
|
45
|
-
var result_1 = require("../interface/result");
|
|
46
|
-
var consultasComplementares_1 = require("../consultasComplementares");
|
|
47
|
-
var webservice_1 = require("../webservice");
|
|
48
|
-
var string_1 = require("../../utils/string");
|
|
49
|
-
var xpath_1 = __importDefault(require("../../utils/xpath"));
|
|
50
|
-
var statusMessage_1 = __importDefault(require("../interface/statusMessage"));
|
|
51
|
-
var veiculos_1 = __importDefault(require("../../assets/icones/veiculos"));
|
|
52
|
-
function Veiculos(_a) {
|
|
53
|
-
var _b, _c, _d;
|
|
54
|
-
var documento = _a.documento;
|
|
55
|
-
var consultasComplementaresContext = (0, react_1.useContext)(consultasComplementares_1.ConsultasComplementaresContext);
|
|
56
|
-
var _e = consultasComplementaresContext !== null && consultasComplementaresContext !== void 0 ? consultasComplementaresContext : {}, consultasComplementares = _e.consultasComplementares, setConsultasComplementares = _e.setConsultasComplementares;
|
|
57
|
-
var _f = (0, webservice_1.useQuery)("SELECT FROM 'VEICULOS'.'CONSULTA'", { documento: documento }, !!((_b = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.veiculos) === null || _b === void 0 ? void 0 : _b.consultaRealizada)), response = _f.response, isLoading = _f.isLoading, error = _f.error;
|
|
58
|
-
var registros = (0, react_1.useMemo)(function () { return ((response === null || response === void 0 ? void 0 : response.document) && xpath_1.default.selectArray('//veiculos/registro', response === null || response === void 0 ? void 0 : response.document) || []).map(string_1.addNoValueContent); }, [response]);
|
|
59
|
-
var veiculosRef = (0, react_1.useRef)(null);
|
|
60
|
-
var consultaVeiculosRealizada = (0, react_1.useMemo)(function () { var _a; return (_a = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.veiculos) === null || _a === void 0 ? void 0 : _a.consultaRealizada; }, [(_c = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.veiculos) === null || _c === void 0 ? void 0 : _c.consultaRealizada
|
|
61
|
-
]);
|
|
62
|
-
(0, react_1.useEffect)(function () {
|
|
63
|
-
var _a;
|
|
64
|
-
(_a = veiculosRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
65
|
-
}, [consultaVeiculosRealizada]);
|
|
66
|
-
(0, react_1.useEffect)(function () {
|
|
67
|
-
response && setConsultasComplementares && setConsultasComplementares(function (prev) { return (__assign(__assign({}, prev), { veiculos: __assign(__assign({}, prev.veiculos), { data: response }) })); });
|
|
68
|
-
}, [response]);
|
|
69
|
-
if (!((_d = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.veiculos) === null || _d === void 0 ? void 0 : _d.consultaRealizada))
|
|
70
|
-
return null;
|
|
71
|
-
var description = registros.length ? registros.length > 1 ? "Foram encontrados ".concat(registros.length, " ve\u00EDculos registrados no CPF/CNPJ") : 'Foi encontrato 1 veículo registrado no CPF/CNPJ' : 'Nenhum veículo encontrado';
|
|
72
|
-
return (react_1.default.createElement("div", null,
|
|
73
|
-
react_1.default.createElement(header_1.default, { innerRef: veiculosRef, title: 'Ve\u00EDculos Registrados no CPF/CNPJ', subtitle: 'Informa\u00E7\u00F5es de Ve\u00EDculos Registrados no CPF/CNPJ', variant: isLoading ? 'loading' : error ? 'error' : 'default', description: react_1.default.createElement(statusMessage_1.default, { type: error ? 'error' : registros.length ? 'success' : 'default' }, (error === null || error === void 0 ? void 0 : error.message) || description), icon: veiculos_1.default }),
|
|
74
|
-
react_1.default.createElement(result_1.Result, null, registros.map(function (registro, i) { return (react_1.default.createElement(result_1.ResultContent, { key: i, desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
75
|
-
react_1.default.createElement(addItem_1.default, { name: 'Placa', value: xpath_1.default.getField('placa', registro) }),
|
|
76
|
-
react_1.default.createElement(addItem_1.default, { name: 'Munic\u00EDpio', value: xpath_1.default.getField('municipio', registro) }),
|
|
77
|
-
react_1.default.createElement(addItem_1.default, { name: 'Estado', value: xpath_1.default.getField('uf', registro) }),
|
|
78
|
-
react_1.default.createElement(addItem_1.default, { name: 'Renavam', value: xpath_1.default.getField('renavam', registro) }),
|
|
79
|
-
react_1.default.createElement(addItem_1.default, { name: 'Chassi', value: xpath_1.default.getField('chassi', registro) }),
|
|
80
|
-
react_1.default.createElement(addItem_1.default, { name: 'Motor', value: xpath_1.default.getField('motor', registro) }),
|
|
81
|
-
react_1.default.createElement(addItem_1.default, { name: 'Ano de Fabrica\u00E7\u00E3o', value: xpath_1.default.getField('ano_fabricacao', registro) }),
|
|
82
|
-
react_1.default.createElement(addItem_1.default, { name: 'Ano do Modelo', value: xpath_1.default.getField('ano_modelo', registro) }),
|
|
83
|
-
react_1.default.createElement(addItem_1.default, { name: 'Marca / Modelo', value: xpath_1.default.getField('marca_modelo', registro) }),
|
|
84
|
-
react_1.default.createElement(addItem_1.default, { name: 'Proced\u00EAncia', value: xpath_1.default.getField('procedencia', registro) }),
|
|
85
|
-
react_1.default.createElement(addItem_1.default, { name: 'Esp\u00E9cie', value: xpath_1.default.getField('especie', registro) }),
|
|
86
|
-
react_1.default.createElement(addItem_1.default, { name: 'Combust\u00EDvel', value: xpath_1.default.getField('combustivel', registro) }),
|
|
87
|
-
react_1.default.createElement(addItem_1.default, { name: 'Cor', value: xpath_1.default.getField('cor', registro) }))); }))));
|
|
88
|
-
}
|
|
89
|
-
exports.default = Veiculos;
|