@credithub/harlan-components 1.51.2 → 1.51.3
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.
|
@@ -20,17 +20,13 @@ var ProtestosSP = function () {
|
|
|
20
20
|
ctxLiminar.document) {
|
|
21
21
|
var doc = ctxLiminar.document;
|
|
22
22
|
var possuiProtestos = doc.totalProtestos === 'CONSTAM PROTESTOS';
|
|
23
|
-
var message = possuiProtestos ? 'Encontrado' : 'Não encontrado';
|
|
24
|
-
/*setData((prevState: GlobalState) => ({
|
|
25
|
-
...prevState,
|
|
26
|
-
liminar: { totalProtestos: doc.totalProtestos },
|
|
27
|
-
message: message
|
|
28
|
-
}));*/
|
|
29
|
-
//setDataUpdated(true);
|
|
30
23
|
if (!possuiProtestos) {
|
|
31
24
|
setHideSection(true);
|
|
32
25
|
}
|
|
33
26
|
}
|
|
27
|
+
if (ctxLiminar.type === RequestStatus.Error) {
|
|
28
|
+
setHideSection(true);
|
|
29
|
+
}
|
|
34
30
|
prevCtxTypeRef.current = ctxLiminar.type;
|
|
35
31
|
}, [ctxLiminar.type, ctxLiminar.document, dataUpdated, setData]);
|
|
36
32
|
var possuiProtestosSp = useMemo(function () {
|
|
@@ -39,6 +35,8 @@ var ProtestosSP = function () {
|
|
|
39
35
|
return ['NADA CONSTA', 'CONSTAM PROTESTOS'].includes(((_a = ctxLiminar === null || ctxLiminar === void 0 ? void 0 : ctxLiminar.document) === null || _a === void 0 ? void 0 : _a.totalProtestos) || '');
|
|
40
36
|
return false;
|
|
41
37
|
}, [ctxLiminar === null || ctxLiminar === void 0 ? void 0 : ctxLiminar.type]);
|
|
38
|
+
if (hideSection)
|
|
39
|
+
return null;
|
|
42
40
|
return (React.createElement(Section, { ctx: ctxLiminar, title: "Protestos SP", subtitle: "Consulta de protestos nos cart\u00F3rios de SP", icon: ProtestosIcon, onSuccess: function (_a) {
|
|
43
41
|
var data = _a.data, totalProtestos = _a.totalProtestos;
|
|
44
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)) ||
|