@credithub/harlan-components 1.81.1 → 1.81.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.
@@ -34,10 +34,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
35
  }
36
36
  };
37
- import { Client } from "@credithub/webservice";
38
- import { useCallback, useContext } from "react";
39
- import { WebService } from "../webservice";
40
- import XPathUtils from "../../utils/xpath";
37
+ import XPathUtils from '../../utils/xpath';
38
+ import { Client } from '@credithub/webservice';
39
+ import { useCallback, useContext } from 'react';
40
+ import { WebService } from '../webservice';
41
41
  var useLiminarProtestosDoPassado = function (_a) {
42
42
  var documento = _a.documento;
43
43
  var client = useContext(WebService);
@@ -52,7 +52,10 @@ var useLiminarProtestosDoPassado = function (_a) {
52
52
  switch (_b.label) {
53
53
  case 0:
54
54
  _b.trys.push([0, 3, , 4]);
55
- return [4 /*yield*/, client.request("SELECT FROM 'PDFPROTESTO'.'PDF'", { nm_chave: numeroChave })];
55
+ return [4 /*yield*/, client.request("SELECT FROM 'PDFPROTESTO'.'PDF'", {
56
+ nm_chave: numeroChave,
57
+ documento: documento
58
+ })];
56
59
  case 1:
57
60
  response = _b.sent();
58
61
  return [4 /*yield*/, response.json()];
@@ -93,7 +96,7 @@ var useLiminarProtestosDoPassado = function (_a) {
93
96
  data = _a.sent();
94
97
  return [4 /*yield*/, Client.WebService.parse(data)];
95
98
  case 2:
96
- parsed = _a.sent();
99
+ parsed = (_a.sent());
97
100
  nodes = XPathUtils.selectArray('//protesto/nm_chave', parsed);
98
101
  numerosChave = Array.from(new Set(nodes.map(function (node) { return node.textContent || ''; })));
99
102
  return [4 /*yield*/, getAlgumInstrumentoPossuiPDF(numerosChave)];
@@ -66,11 +66,11 @@ var ConsultaScoreSerasa = function (_a) {
66
66
  Section: Section,
67
67
  progress: loadingProgress
68
68
  }, title: "Score Serasa", subtitle: "Consulta de Score", icon: ScoreBoaVistaIcon, description: !error && (React.createElement(StatusMessage, { type: scoreData ? 'success' : 'default' }, description)), onSuccess: function () {
69
- var _a, _b, _c;
69
+ var _a, _b, _c, _d;
70
70
  return (React.createElement(Result, null, scoreData && (React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
71
71
  React.createElement(AddItemField, { name: "Score", value: String((_a = scoreData.score) === null || _a === void 0 ? void 0 : _a.pontuacao) }),
72
72
  React.createElement(AddItemField, { name: "Probabilidade de Inadimpl\u00EAncia", value: "".concat((_b = scoreData.score) === null || _b === void 0 ? void 0 : _b.probabilidade_inadimplencia, "%") }),
73
- React.createElement(AddItemField, { name: "An\u00E1lise", value: "DE CADA 100 ".concat(isDocumentoPF(documento) ? 'PESSOAS' : 'EMPRESAS', " CLASSIFICADAS NESTA CLASSE DE SCORE, \u00C9 PROV\u00C1VEL QUE ").concat(Math.floor(Number((_c = scoreData.score) === null || _c === void 0 ? void 0 : _c.probabilidade_inadimplencia)), " APRESENTEM D\u00C9BITOS NO MERCADO NOS PR\u00D3XIMOS 6 MESES.") })))));
73
+ React.createElement(AddItemField, { name: "An\u00E1lise", value: "\n DE CADA 100 ".concat(isDocumentoPF(documento) ? 'PESSOAS' : 'EMPRESAS', " \n CLASSIFICADAS NESTA CLASSE DE SCORE, \u00C9 PROV\u00C1VEL QUE \n ").concat(Math.floor(Number((_d = (_c = scoreData.score) === null || _c === void 0 ? void 0 : _c.probabilidade_inadimplencia) === null || _d === void 0 ? void 0 : _d.replace(',', '.'))), " APRESENTEM D\u00C9BITOS NO MERCADO NOS PR\u00D3XIMOS 6 MESES.") })))));
74
74
  }, isError: function (err) { return ({
75
75
  children: React.createElement(React.Fragment, null),
76
76
  description: (React.createElement(StatusMessage, { type: "error" },