@credithub/harlan-components 1.75.3 → 1.75.5
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/dist/assets/btn/btnSend.d.ts +1 -1
- package/dist/assets/btn/btnSend.js +8 -2
- package/dist/assets/btn/buttonAtualizarDadosRfb.d.ts +2 -1
- package/dist/assets/btn/buttonAtualizarDadosRfb.js +3 -3
- package/dist/assets/btn/chevronDown.d.ts +1 -1
- package/dist/assets/btn/chevronDown.js +3 -2
- package/dist/assets/btn/chevronLeft.d.ts +1 -1
- package/dist/assets/btn/chevronLeft.js +3 -2
- package/dist/assets/btn/chevronRight.d.ts +1 -1
- package/dist/assets/btn/chevronRight.js +3 -2
- package/dist/assets/btn/chevronUp.d.ts +1 -1
- package/dist/assets/btn/chevronUp.js +3 -2
- package/dist/assets/btn/closeIcon.d.ts +1 -1
- package/dist/assets/btn/closeIcon.js +3 -2
- package/dist/assets/btn/printIcon.d.ts +1 -1
- package/dist/assets/btn/printIcon.js +3 -2
- package/dist/assets/btn/stopBtn.d.ts +1 -1
- package/dist/assets/btn/stopBtn.js +4 -2
- package/dist/assets/btn/thumbDown.js +6 -2
- package/dist/assets/btn/thumbUp.js +6 -2
- package/dist/assets/icones/chequesSemFundo.js +7 -2
- package/dist/assets/icones/consultaSimples.js +7 -2
- package/dist/assets/icones/contasBancarias.js +7 -2
- package/dist/assets/icones/contato.js +7 -2
- package/dist/assets/icones/credithub.js +10 -2
- package/dist/assets/icones/dividasVencidasSerasa.js +4 -2
- package/dist/assets/icones/dominios.js +4 -2
- package/dist/assets/icones/endereco.d.ts +2 -1
- package/dist/assets/icones/endereco.js +7 -2
- package/dist/assets/icones/iconeEmpresa.js +7 -2
- package/dist/assets/icones/iconePessoa.js +7 -2
- package/dist/assets/icones/imoveis.js +4 -2
- package/dist/assets/icones/pefinRefinBoaVista.js +4 -2
- package/dist/assets/icones/pefinRefinSerasa.js +6 -2
- package/dist/assets/icones/person.js +7 -2
- package/dist/assets/icones/processosJuridicos.js +7 -2
- package/dist/assets/icones/protestos.js +7 -2
- package/dist/assets/icones/protestosCredito.js +7 -2
- package/dist/assets/icones/protestosGerais.js +7 -2
- package/dist/assets/icones/protestosImpostos.js +7 -2
- package/dist/assets/icones/quadroSocietario.js +7 -2
- package/dist/assets/icones/resumoNegativacoes.js +6 -2
- package/dist/assets/icones/scoreBoaVista.js +4 -2
- package/dist/assets/icones/scr.js +4 -2
- package/dist/assets/icones/ultimaMovimentacao.js +7 -2
- package/dist/assets/icones/veiculos.js +4 -2
- package/dist/components/adresses/addresses.js +10 -4
- package/dist/components/bank-accounts/bank-accounts.d.ts +2 -1
- package/dist/components/bank-accounts/bank-accounts.js +7 -5
- package/dist/components/ccf/ccf.d.ts +1 -1
- package/dist/components/ccf/ccf.js +7 -8
- package/dist/components/ccf/ccfList.js +8 -4
- package/dist/components/chart/chartContent.js +10 -2
- package/dist/components/chart/chartSystem.js +32 -27
- package/dist/components/chart/components/MixedChart.js +10 -9
- package/dist/components/chart/components/PieChart.js +2 -2
- package/dist/components/chart/components/categoryProtestos.js +3 -2
- package/dist/components/chart/quantityResult.js +27 -3
- package/dist/components/common/addItem.d.ts +1 -1
- package/dist/components/common/addItem.js +5 -2
- package/dist/components/common/button.js +4 -2
- package/dist/components/common/carousel.d.ts +4 -0
- package/dist/components/common/carousel.js +19 -0
- package/dist/components/common/gauge.js +3 -3
- package/dist/components/common/modal.js +7 -3
- package/dist/components/common/modalMaintenance.js +6 -3
- package/dist/components/common/printSectionWrapper.js +2 -2
- package/dist/components/consultaRfb.js +3 -4
- package/dist/components/consultaSimplesSection/consultaSimplesSection.js +18 -11
- package/dist/components/consultasComplementares.js +3 -4
- package/dist/components/contacts/contactLikeDislikeSection.js +5 -4
- package/dist/components/contacts/contacts.js +13 -11
- package/dist/components/contacts/contactsLikeDislike.js +2 -2
- package/dist/components/contacts/thumbsButton.js +11 -2
- package/dist/components/dividasPublicas/dividasPublicas.js +8 -8
- package/dist/components/dividasPublicas/dividasPublicasList.js +14 -3
- package/dist/components/dominios/dominios.js +9 -9
- package/dist/components/dossie/carrousel/carrousel.d.ts +8 -0
- package/dist/components/dossie/carrousel/carrousel.js +15 -0
- package/dist/components/dossie/companyLogo/companyLogo.d.ts +7 -0
- package/dist/components/dossie/companyLogo/companyLogo.js +53 -0
- package/dist/components/dossie/dossie.js +10 -4
- package/dist/components/dossie/generativeAi/generativeAi.js +40 -7
- package/dist/components/dossie/sliderCompanyName/companyLogo/companyLogo.js +7 -2
- package/dist/components/dossie/sliderCompanyName/reclameAqui/carousel.js +10 -4
- package/dist/components/dossie/sliderCompanyName/reclameAqui/reclameAquiCarousel.js +28 -8
- package/dist/components/dossie/sliderCompanyName/sliderCompanyName.js +3 -2
- package/dist/components/dossie/summary/cardsAndProducts.d.ts +1 -1
- package/dist/components/dossie/summary/cardsAndProducts.js +2 -3
- package/dist/components/dossie/summary/summary.js +14 -5
- package/dist/components/dossie/transactionTable/transactionTable.js +10 -2
- package/dist/components/imoveis/imoveisService.js +24 -11
- package/dist/components/interface/header.js +14 -4
- package/dist/components/interface/loading.d.ts +2 -1
- package/dist/components/interface/loading.js +6 -2
- package/dist/components/interface/loadingBar.js +3 -2
- package/dist/components/interface/resultWithoutInformation.js +4 -2
- package/dist/components/interface/section.js +10 -2
- package/dist/components/liminar/liminar.js +46 -33
- package/dist/components/partners/partner-dividas-publicas.d.ts +2 -1
- package/dist/components/partners/partner-dividas-publicas.js +2 -2
- package/dist/components/partners/partner-protestos.d.ts +2 -1
- package/dist/components/partners/partner-protestos.js +2 -2
- package/dist/components/partners/partner-rfb-status.d.ts +2 -1
- package/dist/components/partners/partner-rfb-status.js +2 -2
- package/dist/components/partners/partnerField.js +2 -2
- package/dist/components/partners/partnerList.d.ts +1 -1
- package/dist/components/partners/partnerList.js +11 -6
- package/dist/components/partners/partners.d.ts +2 -1
- package/dist/components/partners/partners.js +11 -11
- package/dist/components/pep/pep.js +6 -5
- package/dist/components/processos-juridicos/envolvidosList.js +6 -2
- package/dist/components/processos-juridicos/processosJuridicos.js +9 -10
- package/dist/components/processos-juridicos/processosJuridicosList.js +19 -7
- package/dist/components/protestos/protestos.js +13 -14
- package/dist/components/protestos/protestosCategory.js +11 -7
- package/dist/components/protestos/protestosList.d.ts +2 -2
- package/dist/components/protestos/protestosList.js +27 -12
- package/dist/components/protestos/protestosSp.js +14 -12
- package/dist/components/reclameAqui/reclameAquiCarousel.d.ts +17 -0
- package/dist/components/reclameAqui/reclameAquiCarousel.js +64 -0
- package/dist/components/reclameAqui/styles.d.ts +14 -0
- package/dist/components/reclameAqui/styles.js +31 -0
- package/dist/components/refinBoaVista/refinBoaVista.d.ts +2 -1
- package/dist/components/refinBoaVista/refinBoaVista.js +19 -8
- package/dist/components/refinSerasa/refinSerasa.js +24 -9
- package/dist/components/resultadoDaPesquisa/resultado-da-pesquisa.js +8 -2
- package/dist/components/score/scoreService.js +15 -6
- package/dist/components/scoreSerasa/scoreSerasa.js +11 -7
- package/dist/components/scr/scr.d.ts +2 -1
- package/dist/components/scr/scr.js +38 -30
- package/dist/components/scr/scrDataBaseModal.js +8 -3
- package/dist/components/section.d.ts +2 -2
- package/dist/components/section.js +31 -38
- package/dist/components/veiculos/veiculos.js +20 -6
- package/dist/components/webservice.js +3 -4
- package/dist/consultaSimples.js +37 -4
- package/dist/contexts/createDataContext.js +2 -3
- package/lib/cjs/index.js +7880 -3148
- package/lib/esm/index.js +11240 -8506
- package/package.json +2 -1
|
@@ -13,7 +13,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
};
|
|
14
14
|
return __assign.apply(this, arguments);
|
|
15
15
|
};
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
16
|
import ProtestosIcon from '../../assets/icones/protestos';
|
|
18
17
|
import ProtestosCreditoIcon from '../../assets/icones/protestosCredito';
|
|
19
18
|
import ProtestosGeraisIcon from '../../assets/icones/protestosGerais';
|
|
@@ -121,33 +120,33 @@ var Protestos = function () {
|
|
|
121
120
|
var elements = [
|
|
122
121
|
{
|
|
123
122
|
total: protestosDeCredito.length,
|
|
124
|
-
element: (
|
|
123
|
+
element: (React.createElement(ProtestosCategory, { title: "Protestos de Cr\u00E9dito", subtitle: "Protestos de cr\u00E9dito em geral.", registros: protestosDeCredito.length, icon: ProtestosCreditoIcon }, protestosDeCredito.map(function (protesto, i) { return (React.createElement(ProtestoItem, { protesto: protesto, key: i })); })))
|
|
125
124
|
},
|
|
126
125
|
{
|
|
127
126
|
total: protestosDeImposto.length,
|
|
128
|
-
element: (
|
|
127
|
+
element: (React.createElement(ProtestosCategory, { title: "Protestos de Imposto", subtitle: "Protestos de impostos federais, estaduais e municipais.", registros: protestosDeImposto.length, icon: ProtestosImpostosIcon }, protestosDeImposto.map(function (protesto, i) { return (React.createElement(ProtestoItem, { protesto: protesto, key: i })); })))
|
|
129
128
|
},
|
|
130
129
|
{
|
|
131
130
|
total: protestosGerais.length,
|
|
132
|
-
element: (
|
|
131
|
+
element: (React.createElement(ProtestosCategory, { title: "Protestos Gerais", subtitle: "Protestos de outros tipos.", registros: protestosGerais.length, icon: ProtestosGeraisIcon }, protestosGerais.map(function (protesto, i) { return (React.createElement(ProtestoItem, { protesto: protesto, key: i })); })))
|
|
133
132
|
}
|
|
134
133
|
].sort(function (a, b) { return b.total - a.total; });
|
|
135
|
-
var children = registros ? (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
var children = registros ? (React.createElement(ResultProtestos, null, elements.map(function (_a, i) {
|
|
135
|
+
var element = _a.element;
|
|
136
|
+
return (React.createElement(React.Fragment, { key: i }, element));
|
|
137
|
+
}))) : null;
|
|
139
138
|
var variant = registros ? 'error' : 'default';
|
|
140
139
|
return {
|
|
141
140
|
children: children,
|
|
142
141
|
variant: variant,
|
|
143
|
-
description: (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
description: (React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, registros
|
|
143
|
+
? registros === 1
|
|
144
|
+
? 'Encontrado um protesto'
|
|
145
|
+
: "Encontrados ".concat(registros, " protestos")
|
|
146
|
+
: 'Não há ocorrência de protesto'))
|
|
148
147
|
};
|
|
149
148
|
}, [total, iaOverrides]);
|
|
150
|
-
return (
|
|
149
|
+
return (React.createElement(Section, { ctx: ctx, title: "Apontamentos na Central de Protestos (CENPROT)", subtitle: "Consulta de protestos de cr\u00E9dito, imposto e gerais.", icon: ProtestosIcon, onSuccess: handleSuccess }));
|
|
151
150
|
};
|
|
152
151
|
export default React.memo(Protestos);
|
|
153
152
|
var templateObject_1;
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import
|
|
23
|
+
import React from 'react';
|
|
24
24
|
import Header from '../interface/header';
|
|
25
25
|
import { Result } from '../interface/result';
|
|
26
26
|
import StatusMessage from '../interface/statusMessage';
|
|
@@ -32,11 +32,15 @@ import Content from '../common/content';
|
|
|
32
32
|
var ProtestosCategory = function (_a) {
|
|
33
33
|
var registros = _a.registros, title = _a.title, subtitle = _a.subtitle, children = _a.children, rest = __rest(_a, ["registros", "title", "subtitle", "children"]);
|
|
34
34
|
var _b = useToggle(), isOpen = _b[0], toggleOpen = _b[1];
|
|
35
|
-
var defaultHeaderActions = (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
var defaultHeaderActions = (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))));
|
|
37
|
+
return (React.createElement("div", null,
|
|
38
|
+
React.createElement(Header, __assign({ title: title, subtitle: subtitle, description: React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, !registros
|
|
39
|
+
? 'Não foram encontradas ocorrências'
|
|
40
|
+
: registros === 1
|
|
41
|
+
? 'Foi encontrado um protesto'
|
|
42
|
+
: "Foram encontrados ".concat(registros, " protestos")), variant: registros ? 'error' : 'default', actions: registros ? defaultHeaderActions : null }, rest)),
|
|
43
|
+
React.createElement(Content, { isOpen: isOpen },
|
|
44
|
+
React.createElement(Result, null, children))));
|
|
41
45
|
};
|
|
42
46
|
export default ProtestosCategory;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const ProtestoItem: React.MemoExoticComponent<({ protesto }: {
|
|
3
3
|
protesto: Node;
|
|
4
|
-
}) =>
|
|
4
|
+
}) => React.JSX.Element>;
|
|
5
5
|
export declare const Instrumento: ({ nm_chave, cpfCnpj }: {
|
|
6
6
|
nm_chave?: string;
|
|
7
7
|
cpfCnpj?: string;
|
|
8
|
-
}) =>
|
|
8
|
+
}) => React.JSX.Element | null;
|
|
9
9
|
export declare const ProtestosList: React.FC<{
|
|
10
10
|
protestos: Node[];
|
|
11
11
|
}>;
|
|
@@ -45,13 +45,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
49
48
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
50
49
|
import { formatMoney } from '../../utils/number';
|
|
51
50
|
import { openFormThenRedirect } from '../../utils/protestosp';
|
|
52
51
|
import { formatDocument } from '../../utils/string';
|
|
53
52
|
import XPathUtils from '../../utils/xpath';
|
|
54
|
-
import { memo, useContext, useEffect, useMemo, useState } from 'react';
|
|
53
|
+
import React, { memo, useContext, useEffect, useMemo, useState } from 'react';
|
|
55
54
|
import AddItemField from '../common/addItem';
|
|
56
55
|
import Button from '../common/button';
|
|
57
56
|
import { ResultContent } from '../interface/result';
|
|
@@ -92,15 +91,19 @@ var ThreeDotsLoader = function () {
|
|
|
92
91
|
}); };
|
|
93
92
|
// CSS animation keyframes defined as a style block
|
|
94
93
|
var keyframes = "\n @keyframes blink {\n 0% { opacity: 0.2; }\n 20% { opacity: 0.8; }\n 100% { opacity: 0.2; }\n }\n ";
|
|
95
|
-
return (
|
|
94
|
+
return (React.createElement("span", { style: loaderStyle },
|
|
95
|
+
React.createElement("style", null, keyframes),
|
|
96
|
+
React.createElement("span", { style: dotStyle(0) }),
|
|
97
|
+
React.createElement("span", { style: dotStyle(0.2) }),
|
|
98
|
+
React.createElement("span", { style: dotStyle(0.4) })));
|
|
96
99
|
};
|
|
97
100
|
// AI Indicator component with tooltip
|
|
98
|
-
var AIIndicator = function () { return (
|
|
101
|
+
var AIIndicator = function () { return (React.createElement("span", { title: "Informa\u00E7\u00E3o obtida utilizando IA", style: {
|
|
99
102
|
color: '#0066cc',
|
|
100
103
|
marginLeft: '3px',
|
|
101
104
|
fontSize: '0.8em',
|
|
102
105
|
cursor: 'help'
|
|
103
|
-
},
|
|
106
|
+
} }, "*")); };
|
|
104
107
|
export var ProtestoItem = memo(function (_a) {
|
|
105
108
|
var _b;
|
|
106
109
|
var protesto = _a.protesto;
|
|
@@ -202,17 +205,29 @@ export var ProtestoItem = memo(function (_a) {
|
|
|
202
205
|
var original = getField('./nomeCedente');
|
|
203
206
|
var override = iaOverrides[nm_chave];
|
|
204
207
|
if (override && override.trim() !== '') {
|
|
205
|
-
return (
|
|
208
|
+
return (React.createElement(React.Fragment, null,
|
|
209
|
+
override,
|
|
210
|
+
React.createElement(AIIndicator, null)));
|
|
206
211
|
}
|
|
207
212
|
if (original && original.trim() !== '')
|
|
208
213
|
return original;
|
|
209
214
|
if (isAIData && quemApresentou)
|
|
210
|
-
return (
|
|
215
|
+
return (React.createElement(React.Fragment, null,
|
|
216
|
+
quemApresentou,
|
|
217
|
+
React.createElement(AIIndicator, null)));
|
|
211
218
|
if ((loading || queued) && !quemApresentou)
|
|
212
|
-
return
|
|
219
|
+
return React.createElement(ThreeDotsLoader, null);
|
|
213
220
|
return quemApresentou || '';
|
|
214
221
|
};
|
|
215
|
-
return (
|
|
222
|
+
return (React.createElement(ResultContent, { print: "repeat(7, 1fr)", desktop: "repeat(8, 1fr)", tablet: "repeat(4, 1fr)", mobile: "repeat(2, 1fr)" },
|
|
223
|
+
React.createElement(AddItemField, { name: "Quem Protestou", value: getQuemProtestouDisplay() }),
|
|
224
|
+
React.createElement(AddItemField, { name: "Atrav\u00E9s De", value: getField('./nomeApresentante') }),
|
|
225
|
+
React.createElement(AddItemField, { name: "CPF/CNPJ Protestado", value: formatDocument(getField('./cpfCnpj')) }),
|
|
226
|
+
React.createElement(AddItemField, { name: "Data Do Protesto", value: getField('./dataProtesto') }),
|
|
227
|
+
React.createElement(AddItemField, { name: "Possui Anu\u00EAncia / Protesto Pago", value: formatBooleanField(getField('./temAnuencia')) }),
|
|
228
|
+
React.createElement(AddItemField, { name: "Valor Do Protesto", value: formatMoney(getField('./valor')) }),
|
|
229
|
+
getField('./vl_custas') && (React.createElement(AddItemField, { name: "Custas de Cart\u00F3rio para Baixa", value: formatMoney(getField('./vl_custas')) })),
|
|
230
|
+
React.createElement(Instrumento, { nm_chave: nm_chave, cpfCnpj: documento })));
|
|
216
231
|
});
|
|
217
232
|
export var Instrumento = function (_a) {
|
|
218
233
|
var nm_chave = _a.nm_chave, cpfCnpj = _a.cpfCnpj;
|
|
@@ -221,7 +236,7 @@ export var Instrumento = function (_a) {
|
|
|
221
236
|
var _c = useState(false), isLoading = _c[0], setIsLoading = _c[1];
|
|
222
237
|
if (!nm_chave)
|
|
223
238
|
return null;
|
|
224
|
-
return (
|
|
239
|
+
return (React.createElement(Button, { onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
225
240
|
var request, pdfWindow, e_1;
|
|
226
241
|
return __generator(this, function (_a) {
|
|
227
242
|
switch (_a.label) {
|
|
@@ -257,9 +272,9 @@ export var Instrumento = function (_a) {
|
|
|
257
272
|
case 6: return [2 /*return*/];
|
|
258
273
|
}
|
|
259
274
|
});
|
|
260
|
-
}); }, disabled: isLoading,
|
|
275
|
+
}); }, disabled: isLoading }, error ? 'Instrumento não Localizado' : 'Instrumento'));
|
|
261
276
|
};
|
|
262
277
|
export var ProtestosList = function (_a) {
|
|
263
278
|
var protestos = _a.protestos;
|
|
264
|
-
return (
|
|
279
|
+
return (React.createElement(ResultContent, null, (protestos === null || protestos === void 0 ? void 0 : protestos.length) ? (protestos.map(function (protesto, i) { return (React.createElement(ProtestoItem, { key: i, protesto: protesto })); })) : (React.createElement(AddItemField, { name: "Informa\u00E7\u00E3o", value: "N\u00E3o h\u00E1 registros de protestos." }))));
|
|
265
280
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import ProtestosIcon from '../../assets/icones/protestos';
|
|
3
2
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
4
3
|
import { formatMoney } from '../../utils/number';
|
|
5
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
5
|
import AddItemField from '../common/addItem';
|
|
7
6
|
import { ResultContent } from '../interface/result';
|
|
8
7
|
import StatusMessage from '../interface/statusMessage';
|
|
@@ -38,27 +37,30 @@ var ProtestosSP = function () {
|
|
|
38
37
|
}, [ctxLiminar === null || ctxLiminar === void 0 ? void 0 : ctxLiminar.type]);
|
|
39
38
|
if (hideSection)
|
|
40
39
|
return null;
|
|
41
|
-
return (
|
|
40
|
+
return (React.createElement(Section, { ctx: ctxLiminar, title: "Protestos SP", subtitle: "Consulta de protestos nos cart\u00F3rios de SP", icon: ProtestosIcon, onSuccess: function (_a) {
|
|
42
41
|
var data = _a.data, totalProtestos = _a.totalProtestos;
|
|
43
42
|
var registros = (data === null || data === void 0 ? void 0 : data.reduce(function (carry, cartorio) { return Number(cartorio === null || cartorio === void 0 ? void 0 : cartorio[9]) + carry; }, 0)) ||
|
|
44
43
|
0;
|
|
45
44
|
return {
|
|
46
45
|
children: data === null || data === void 0 ? void 0 : data.map(function (e) {
|
|
47
46
|
var _a, _b, _c, _d, _e;
|
|
48
|
-
return (
|
|
47
|
+
return (React.createElement(ResultContent, { print: "repeat(7, 1fr)", desktop: "repeat(8, 1fr)", tablet: "repeat(4, 1fr)", mobile: "repeat(2, 1fr)" },
|
|
48
|
+
React.createElement(AddItemField, { name: "Cartorio", value: e === null || e === void 0 ? void 0 : e[2] }),
|
|
49
|
+
React.createElement(AddItemField, { name: "Quantidade", value: (_a = e === null || e === void 0 ? void 0 : e[10]) !== null && _a !== void 0 ? _a : e === null || e === void 0 ? void 0 : e[9] }),
|
|
50
|
+
React.createElement(AddItemField, { name: "Valor Total", value: formatMoney((_e = (_d = (_c = (_b = e === null || e === void 0 ? void 0 : e[7]) === null || _b === void 0 ? void 0 : _b.match(/[\d,.]+/g)) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.replace('.', '')) === null || _e === void 0 ? void 0 : _e.replace(',', '.')) })));
|
|
49
51
|
}),
|
|
50
52
|
variant: registros || (possuiProtestosSp && !registros)
|
|
51
53
|
? 'error'
|
|
52
54
|
: 'default',
|
|
53
|
-
description: (
|
|
55
|
+
description: (React.createElement(StatusMessage, { type: registros || (possuiProtestosSp && !registros)
|
|
54
56
|
? 'error'
|
|
55
|
-
: 'default',
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
: 'default' }, possuiProtestosSp && !registros
|
|
58
|
+
? 'Existem protestos'
|
|
59
|
+
: registros
|
|
60
|
+
? registros === 1
|
|
61
|
+
? 'Encontrado um protesto'
|
|
62
|
+
: "Encontrados ".concat(registros, " protestos")
|
|
63
|
+
: 'Não há ocorrência de protesto'))
|
|
62
64
|
};
|
|
63
65
|
} }));
|
|
64
66
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StatusMapType } from '@/@types/domain/reclameAquiTypes';
|
|
3
|
+
export interface ReclameAquiCompany {
|
|
4
|
+
nome: string;
|
|
5
|
+
cnpj: string;
|
|
6
|
+
score: string;
|
|
7
|
+
status: string | StatusMapType;
|
|
8
|
+
shortname: string;
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
quantidadeProblemasResolvidos: string;
|
|
11
|
+
percentualProblemasResolvidos: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ReclameAquiCarousel: React.FC<{
|
|
14
|
+
documento: string;
|
|
15
|
+
nome: string;
|
|
16
|
+
companies?: ReclameAquiCompany[];
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
13
|
+
import React, { memo } from 'react';
|
|
14
|
+
import Carousel from '../common/carousel';
|
|
15
|
+
import ChevronLeft from '../../assets/btn/chevronLeft';
|
|
16
|
+
import ChevronRight from '../../assets/btn/chevronRight';
|
|
17
|
+
import { formatValue } from '../../utils/number';
|
|
18
|
+
import { statusMap } from '../../constants/reclameAqui';
|
|
19
|
+
import Carrousel from '../dossie/carrousel/carrousel';
|
|
20
|
+
import { CarrouselBtn, CompanyName, ContainerSummary, DocumentContainer, DocumentPrefix, LogoContainer, ProblemsSolved, ReclameAquiStatsContainer, StatsImage, StyledImage } from './styles';
|
|
21
|
+
var translateStatus = function (status) {
|
|
22
|
+
return statusMap[status] || '--';
|
|
23
|
+
};
|
|
24
|
+
var ProblemasResolvidos = function (_a) {
|
|
25
|
+
var value = _a.value;
|
|
26
|
+
return (React.createElement(LogoContainer, null,
|
|
27
|
+
React.createElement(CompanyName, null,
|
|
28
|
+
"Problemas Resolvidos ",
|
|
29
|
+
value)));
|
|
30
|
+
};
|
|
31
|
+
var ReclameAquiStats = function (_a) {
|
|
32
|
+
var nome = _a.nome, cnpj = _a.cnpj, status = _a.status, shortname = _a.shortname, imageUrl = _a.imageUrl, quantidadeProblemasResolvidos = _a.quantidadeProblemasResolvidos, score = _a.score, percentualProblemasResolvidos = _a.percentualProblemasResolvidos;
|
|
33
|
+
return (React.createElement(ReclameAquiStatsContainer, null,
|
|
34
|
+
React.createElement(LogoContainer, null,
|
|
35
|
+
React.createElement(StyledImage, { src: imageUrl, alt: "Logo da Empresa" }),
|
|
36
|
+
React.createElement(CompanyName, { className: "bold" }, nome),
|
|
37
|
+
React.createElement(DocumentContainer, null,
|
|
38
|
+
React.createElement(DocumentPrefix, null,
|
|
39
|
+
"CNPJ: ",
|
|
40
|
+
cnpj))),
|
|
41
|
+
React.createElement(ProblemsSolved, null,
|
|
42
|
+
React.createElement(ProblemasResolvidos, { value: formatValue(Number(quantidadeProblemasResolvidos)) }),
|
|
43
|
+
React.createElement(StatsImage, { src: "https://painel.credithub.com.br/images/RA-small.png" }),
|
|
44
|
+
React.createElement("a", { href: "https://www.reclameaqui.com.br/empresa/".concat(shortname), rel: "noreferrer", target: "_blank" },
|
|
45
|
+
React.createElement(CompanyName, null,
|
|
46
|
+
translateStatus(status),
|
|
47
|
+
" ",
|
|
48
|
+
score,
|
|
49
|
+
"/10")),
|
|
50
|
+
React.createElement(ProblemasResolvidos, { value: percentualProblemasResolvidos + '%' }))));
|
|
51
|
+
};
|
|
52
|
+
// Convert this to a pure presentational component
|
|
53
|
+
export var ReclameAquiCarousel = memo(function (_a) {
|
|
54
|
+
var nome = _a.nome, documento = _a.documento, companies = _a.companies;
|
|
55
|
+
// If no companies data is provided, fallback to regular carousel
|
|
56
|
+
if (!companies || companies.length === 0) {
|
|
57
|
+
return React.createElement(Carrousel, { name: nome, document: documento });
|
|
58
|
+
}
|
|
59
|
+
return (React.createElement(ContainerSummary, null,
|
|
60
|
+
React.createElement(Carousel, { pagination: false, isRTL: false, showArrows: companies.length > 1, renderArrow: function (_a) {
|
|
61
|
+
var type = _a.type, onClick = _a.onClick;
|
|
62
|
+
return (React.createElement(CarrouselBtn, null, type === 'PREV' ? (React.createElement(ChevronLeft, { onClick: onClick })) : (React.createElement(ChevronRight, { onClick: onClick }))));
|
|
63
|
+
} }, companies.map(function (empresa, index) { return (React.createElement(ReclameAquiStats, __assign({ key: "reclameaqui-".concat(index) }, empresa))); }))));
|
|
64
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface StatsImageProps {
|
|
2
|
+
src: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const ContainerSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const ReclameAquiStatsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const LogoContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StyledImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const StatsImage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StatsImageProps, never>;
|
|
9
|
+
export declare const CompanyName: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const DocumentContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const DocumentPrefix: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const ProblemsSolved: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const CarrouselBtn: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
export var ContainerSummary = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"], ["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"])));
|
|
7
|
+
export var ReclameAquiStatsContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
8
|
+
export var LogoContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"])));
|
|
9
|
+
export var StyledImage = styled.img(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid ", ";\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"], ["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid ", ";\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"])), function (_a) {
|
|
10
|
+
var theme = _a.theme;
|
|
11
|
+
return theme.colors.white;
|
|
12
|
+
});
|
|
13
|
+
export var StatsImage = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid ", ";\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid ", ";\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.colors.white;
|
|
16
|
+
}, function (props) { return props.src; });
|
|
17
|
+
export var CompanyName = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"])), function (_a) {
|
|
18
|
+
var theme = _a.theme;
|
|
19
|
+
return theme.colors.cinzaEscuro;
|
|
20
|
+
});
|
|
21
|
+
export var DocumentContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return theme.colors.cinzaEscuro;
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var theme = _a.theme;
|
|
26
|
+
return theme.colors.cinzaClaro;
|
|
27
|
+
});
|
|
28
|
+
export var DocumentPrefix = styled.span(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
29
|
+
export var ProblemsSolved = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"])));
|
|
30
|
+
export var CarrouselBtn = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n cursor: pointer;\n height: fit-content;\n"], ["\n cursor: pointer;\n height: fit-content;\n"])));
|
|
31
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Spc } from '../../@types/domain';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare function useRefinBoaVista(documento: string): {
|
|
3
4
|
isLoading: boolean;
|
|
4
5
|
error: Error | null;
|
|
@@ -8,5 +9,5 @@ export declare function useRefinBoaVista(documento: string): {
|
|
|
8
9
|
};
|
|
9
10
|
declare function RefinBoaVista({ documento }: {
|
|
10
11
|
documento: string;
|
|
11
|
-
}):
|
|
12
|
+
}): React.JSX.Element | null;
|
|
12
13
|
export default RefinBoaVista;
|
|
@@ -9,12 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
12
|
import PefinRefinBoaVistaIcon from '../../assets/icones/pefinRefinBoaVista';
|
|
14
13
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
15
14
|
import { formatMoney } from '../../utils/number';
|
|
16
15
|
import { addNoValueContent } from '../../utils/string';
|
|
17
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
18
17
|
import AddItemField from '../common/addItem';
|
|
19
18
|
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
20
19
|
import { Result, ResultContent } from '../interface/result';
|
|
@@ -83,7 +82,7 @@ function RefinBoaVista(_a) {
|
|
|
83
82
|
: 'Não há ocorrência de Pefin/Refin Boa Vista';
|
|
84
83
|
if (!consultaRealizada)
|
|
85
84
|
return null;
|
|
86
|
-
return (
|
|
85
|
+
return (React.createElement(Section, { ref: refinBoaVistaRef, ctx: {
|
|
87
86
|
type: isLoading
|
|
88
87
|
? RequestStatus.Loading
|
|
89
88
|
: error
|
|
@@ -95,11 +94,23 @@ function RefinBoaVista(_a) {
|
|
|
95
94
|
refetch: function () { },
|
|
96
95
|
Section: Section,
|
|
97
96
|
progress: loadingProgress
|
|
98
|
-
}, title: "Restri\u00E7\u00F5es Pefin/Refin Boa Vista", subtitle: "Apontamentos e Restri\u00E7\u00F5es Financeiras e Comerciais", icon: PefinRefinBoaVistaIcon, description: !error && (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
}, title: "Restri\u00E7\u00F5es Pefin/Refin Boa Vista", subtitle: "Apontamentos e Restri\u00E7\u00F5es Financeiras e Comerciais", icon: PefinRefinBoaVistaIcon, description: !error && (React.createElement(StatusMessage, { type: pendencias.length === 0 ? 'default' : 'error' }, description)), variant: pendencias.length === 0 ? 'default' : 'error', onSuccess: function () { return (React.createElement(Result, null, pendencias.map(function (pendencia, i) { return (React.createElement(ResultContent, { key: i, desktop: "repeat(5, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
98
|
+
React.createElement(AddItemField, { name: "Associado", value: pendencia.NomeAssociado }),
|
|
99
|
+
React.createElement(AddItemField, { name: "Valor", value: pendencia.Valor && !isNaN(parseFloat(pendencia.Valor))
|
|
100
|
+
? "".concat(formatMoney(parseFloat(pendencia.Valor)))
|
|
101
|
+
: 'Sem Valor' }),
|
|
102
|
+
React.createElement(AddItemField, { name: "Data da Inclus\u00E3o", value: pendencia.DataDeInclusao }),
|
|
103
|
+
React.createElement(AddItemField, { name: "Data do Vencimento", value: pendencia.DataDoVencimento }),
|
|
104
|
+
React.createElement(AddItemField, { name: "Entidade", value: pendencia.Entidade }),
|
|
105
|
+
React.createElement(AddItemField, { name: "N\u00FAmero do Contrato", value: pendencia.NumeroContrato }),
|
|
106
|
+
React.createElement(AddItemField, { name: "Comprador, Fiador ou Avalista", value: pendencia.CompradorFiadorAvalista }),
|
|
107
|
+
React.createElement(AddItemField, { name: "Telefone Associado", value: pendencia.TelefoneAssociado }),
|
|
108
|
+
React.createElement(AddItemField, { name: "Cidade Associado", value: pendencia.CidadeAssociado }),
|
|
109
|
+
React.createElement(AddItemField, { name: "UF Associado", value: pendencia.UfAssociado }))); }))); }, isError: function (err) { return ({
|
|
110
|
+
children: React.createElement(React.Fragment, null),
|
|
111
|
+
description: (React.createElement(StatusMessage, { type: "error" },
|
|
112
|
+
"Erro ao realizar a consulta: ",
|
|
113
|
+
err.message)),
|
|
103
114
|
variant: 'error'
|
|
104
115
|
}); } }));
|
|
105
116
|
}
|
|
@@ -18,12 +18,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
18
18
|
}
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
21
|
import PefinRefinSerasaIcon from '../../assets/icones/pefinRefinSerasa';
|
|
23
22
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
24
23
|
import { formatMoney } from '../../utils/number';
|
|
25
24
|
import { addNoValueContent } from '../../utils/string';
|
|
26
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
25
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
27
26
|
import AddItemField from '../common/addItem';
|
|
28
27
|
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
29
28
|
import { Result, ResultContent } from '../interface/result';
|
|
@@ -122,7 +121,7 @@ var RefinSerasa = function (_a) {
|
|
|
122
121
|
: totalPendencias === 1
|
|
123
122
|
? "Foi encontrada 1 ocorr\u00EAncia no valor de ".concat(formatMoney(valorTotalPendencias))
|
|
124
123
|
: "Foram encontradas ".concat(totalPendencias, " ocorr\u00EAncias no valor total de ").concat(formatMoney(valorTotalPendencias));
|
|
125
|
-
return consultaRealizada ? (
|
|
124
|
+
return consultaRealizada ? (React.createElement(Section, { ref: refinSerasaRef, ctx: {
|
|
126
125
|
type: isLoading
|
|
127
126
|
? RequestStatus.Loading
|
|
128
127
|
: error
|
|
@@ -134,12 +133,28 @@ var RefinSerasa = function (_a) {
|
|
|
134
133
|
refetch: function () { },
|
|
135
134
|
Section: Section,
|
|
136
135
|
progress: loadingProgress
|
|
137
|
-
}, title: "Pefin/Refin e Contratos Vencidos Serasa", subtitle: "Confira as Pend\u00EAncias Financeiras deste documento", icon: PefinRefinSerasaIcon, description: !error && (
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
}, title: "Pefin/Refin e Contratos Vencidos Serasa", subtitle: "Confira as Pend\u00EAncias Financeiras deste documento", icon: PefinRefinSerasaIcon, description: !error && (React.createElement(StatusMessage, { type: totalPendencias === 0 ? 'default' : 'error' }, description)), variant: totalPendencias === 0 ? 'default' : 'error', onSuccess: function () { return (React.createElement(Result, null, pendencias.map(function (pendencia, i) {
|
|
137
|
+
var _a;
|
|
138
|
+
return (React.createElement(ResultContent, { key: i, desktop: "repeat(5, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
139
|
+
React.createElement(AddItemField, { name: "Tipo de Ocorr\u00EAncia", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.titulo_ocorrencia }),
|
|
140
|
+
React.createElement(AddItemField, { name: "Credor", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.origem }),
|
|
141
|
+
React.createElement(AddItemField, { name: "Data de Entrada", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.data_ocorrencia }),
|
|
142
|
+
React.createElement(AddItemField, { name: "Valor", value: formatMoney(pendencia === null || pendencia === void 0 ? void 0 : pendencia.valor) }),
|
|
143
|
+
React.createElement(AddItemField, { name: "N\u00FAmero de Contrato", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.contrato }),
|
|
144
|
+
React.createElement(AddItemField, { name: "Avalista", value: (pendencia === null || pendencia === void 0 ? void 0 : pendencia.avalista) ? 'Sim' : 'Não' }),
|
|
145
|
+
React.createElement(AddItemField, { name: "Comprador", value: (pendencia === null || pendencia === void 0 ? void 0 : pendencia.comprador) ? 'Sim' : 'Não' }),
|
|
146
|
+
React.createElement(AddItemField, { name: "Fiador", value: (pendencia === null || pendencia === void 0 ? void 0 : pendencia.fiador) ? 'Sim' : 'Não' }),
|
|
147
|
+
React.createElement(AddItemField, { name: "Cidade", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.cidade }),
|
|
148
|
+
React.createElement(AddItemField, { name: "UF", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.uf }),
|
|
149
|
+
React.createElement(AddItemField, { name: "Org\u00E3o Emissor", value: ((_a = pendencia === null || pendencia === void 0 ? void 0 : pendencia.base_origem) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'base ii' ? 'Serasa' : 'SPC' }),
|
|
150
|
+
React.createElement(AddItemField, { name: "Total de Pend\u00EAncias", value: "1" }),
|
|
151
|
+
React.createElement(AddItemField, { name: "Valor Total", value: formatMoney(pendencia === null || pendencia === void 0 ? void 0 : pendencia.totalvalor) }),
|
|
152
|
+
React.createElement(AddItemField, { name: "Categoria", value: pendencia === null || pendencia === void 0 ? void 0 : pendencia.categoria })));
|
|
153
|
+
}))); }, isError: function (err) { return ({
|
|
154
|
+
children: React.createElement(React.Fragment, null),
|
|
155
|
+
description: (React.createElement(StatusMessage, { type: "error" },
|
|
156
|
+
"Erro ao realizar a consulta: ",
|
|
157
|
+
err.message)),
|
|
143
158
|
variant: 'error'
|
|
144
159
|
}); } })) : null;
|
|
145
160
|
};
|
|
@@ -2,8 +2,8 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
2
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { formatCnpj, formatCpf } from '../../utils/string';
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5em;\n margin-top: 1em;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5em;\n margin-top: 1em;\n"])));
|
|
9
9
|
var Title = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"], ["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (_a) {
|
|
@@ -28,7 +28,13 @@ var ResultadoDaPesquisa = function (_a) {
|
|
|
28
28
|
var documento = _a.documento;
|
|
29
29
|
var isCpf = (documento === null || documento === void 0 ? void 0 : documento.length) === 11;
|
|
30
30
|
var format = isCpf ? formatCpf : formatCnpj;
|
|
31
|
-
return (
|
|
31
|
+
return (React.createElement(Wrapper, null,
|
|
32
|
+
React.createElement(Title, null, "Resultado da Pesquisa"),
|
|
33
|
+
React.createElement(DocumentContainer, null,
|
|
34
|
+
React.createElement(DocumentPrefix, null,
|
|
35
|
+
isCpf ? 'CPF' : 'CNPJ',
|
|
36
|
+
": ",
|
|
37
|
+
format(documento)))));
|
|
32
38
|
};
|
|
33
39
|
export default ResultadoDaPesquisa;
|
|
34
40
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -9,10 +9,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
import ScoreBoaVistaIcon from '../../assets/icones/scoreBoaVista';
|
|
14
13
|
import { useGlobalData } from '../../contexts/globalDataContext';
|
|
15
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
15
|
import AddItemField from '../common/addItem';
|
|
17
16
|
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
18
17
|
import { Result, ResultContent } from '../interface/result';
|
|
@@ -52,7 +51,7 @@ var ConsultaScore = function (_a) {
|
|
|
52
51
|
setDataUpdated(true);
|
|
53
52
|
}
|
|
54
53
|
}, [response, consultaRealizada, dataUpdated, setData]);
|
|
55
|
-
return consultaRealizada ? (
|
|
54
|
+
return consultaRealizada ? (React.createElement(Section, { ref: scoreRef, ctx: {
|
|
56
55
|
type: isLoading
|
|
57
56
|
? RequestStatus.Loading
|
|
58
57
|
: error
|
|
@@ -64,9 +63,19 @@ var ConsultaScore = function (_a) {
|
|
|
64
63
|
refetch: function () { },
|
|
65
64
|
Section: Section,
|
|
66
65
|
progress: loadingProgress
|
|
67
|
-
}, title: "Score Boa Vista", subtitle: "Consulta de Score", icon: ScoreBoaVistaIcon, description: !error && (
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
}, title: "Score Boa Vista", subtitle: "Consulta de Score", icon: ScoreBoaVistaIcon, description: !error && (React.createElement(StatusMessage, { type: scoreData ? 'success' : 'default' }, description)), onSuccess: function () { return (React.createElement(Result, null, scoreData && (React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
67
|
+
React.createElement(AddItemField, { name: "Score", value: String(scoreData.score) }),
|
|
68
|
+
React.createElement(AddItemField, { name: "Probabilidade de Inadimpl\u00EAncia", value: scoreData.provavel }),
|
|
69
|
+
React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o", value: scoreData.classificacao }),
|
|
70
|
+
React.createElement(AddItemField, { name: "An\u00E1lise", value: scoreData.texto }),
|
|
71
|
+
React.createElement(AddItemField, { name: "Status", value: scoreData.status }),
|
|
72
|
+
documento.length > 11 && (React.createElement(React.Fragment, null,
|
|
73
|
+
React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o Num\u00E9rica", value: scoreData.classificacao_numerica }),
|
|
74
|
+
React.createElement(AddItemField, { name: "Classifica\u00E7\u00E3o Alfab\u00E9tica", value: scoreData.classificacao_alfabetica }))))))); }, isError: function (err) { return ({
|
|
75
|
+
children: React.createElement(React.Fragment, null),
|
|
76
|
+
description: (React.createElement(StatusMessage, { type: "error" },
|
|
77
|
+
"Erro ao realizar a consulta: ",
|
|
78
|
+
err.message)),
|
|
70
79
|
variant: 'error'
|
|
71
80
|
}); } })) : null;
|
|
72
81
|
};
|