@credithub/harlan-components 1.60.3 → 1.60.4

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.
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import { formatMoney } from '../../utils/number';
38
38
  import { formatDocument } from '../../utils/string';
39
39
  import XPathUtils from '../../utils/xpath';
40
- import React, { memo, useContext, useState, useEffect } from 'react';
40
+ import React, { memo, useContext, useState, useEffect, useMemo } from 'react';
41
41
  import AddItemField from '../common/addItem';
42
42
  import Button from '../common/button';
43
43
  import { ResultContent } from '../interface/result';
@@ -103,6 +103,7 @@ export var ProtestoItem = memo(function (_a) {
103
103
  var value = XPathUtils.select("string(".concat(path, ")"), protesto);
104
104
  return formatter ? formatter(value) : value;
105
105
  };
106
+ var documento = useMemo(function () { return getField('//consulta/@documento'); }, [protesto]);
106
107
  var formatBooleanField = function (value) {
107
108
  return value === 'true' ? 'Sim' : 'Não';
108
109
  };
@@ -118,7 +119,7 @@ export var ProtestoItem = memo(function (_a) {
118
119
  _a.label = 1;
119
120
  case 1:
120
121
  _a.trys.push([1, 4, 5, 6]);
121
- return [4 /*yield*/, client.request("SELECT FROM 'PDFPROTESTO'.'AI'", { nm_chave: nm_chave })];
122
+ return [4 /*yield*/, client.request("SELECT FROM 'PDFPROTESTO'.'AI'", { nm_chave: nm_chave, documento: documento })];
122
123
  case 2: return [4 /*yield*/, (_a.sent()).json()];
123
124
  case 3:
124
125
  response = _a.sent();
@@ -218,7 +219,7 @@ export var ProtestoItem = memo(function (_a) {
218
219
  React.createElement(AddItemField, { name: "Possui Anu\u00EAncia / Protesto Pago", value: formatBooleanField(getField('./temAnuencia')) }),
219
220
  React.createElement(AddItemField, { name: "Valor Do Protesto", value: formatMoney(getField('./valor')) }),
220
221
  getField('./vl_custas') && (React.createElement(AddItemField, { name: "Custas de Cart\u00F3rio para Baixa", value: formatMoney(getField('./vl_custas')) })),
221
- React.createElement(Instrumento, { nm_chave: getField('./nm_chave'), cpfCnpj: getField('//consulta/@documento') })));
222
+ React.createElement(Instrumento, { nm_chave: getField('./nm_chave'), cpfCnpj: documento })));
222
223
  });
223
224
  export var Instrumento = function (_a) {
224
225
  var nm_chave = _a.nm_chave, cpfCnpj = _a.cpfCnpj;
@@ -236,7 +237,7 @@ export var Instrumento = function (_a) {
236
237
  _a.label = 1;
237
238
  case 1:
238
239
  _a.trys.push([1, 4, 5, 6]);
239
- return [4 /*yield*/, client.request("SELECT FROM 'IEPTB'.'PDF'", { nm_chave: nm_chave })];
240
+ return [4 /*yield*/, client.request("SELECT FROM 'IEPTB'.'PDF'", { nm_chave: nm_chave, documento: cpfCnpj })];
240
241
  case 2: return [4 /*yield*/, (_a.sent()).json()];
241
242
  case 3:
242
243
  request = _a.sent();