@credithub/harlan-components 1.19.1 → 1.19.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.
package/lib/cjs/index.js CHANGED
@@ -21838,7 +21838,7 @@ var getFieldRfb = function (path, response, formatter) {
21838
21838
  return formatter ? formatter(value) : value;
21839
21839
  };
21840
21840
  var getProductsPrices = function (isPF) { return ({
21841
- refinBoaVista: isPF ? 2.7 : 3.5,
21841
+ refinBoaVista: isPF ? 1.2 : 2.7,
21842
21842
  scoreBoaVista: isPF ? 3 : 6,
21843
21843
  refinSerasa: 4.2,
21844
21844
  veiculos: 10,
@@ -65680,13 +65680,14 @@ var RefinSerasa = function (_a) {
65680
65680
  var consultasComplementaresContext = React.useContext(ConsultasComplementaresContext);
65681
65681
  var _f = consultasComplementaresContext !== null && consultasComplementaresContext !== void 0 ? consultasComplementaresContext : {}, consultasComplementares = _f.consultasComplementares, setConsultasComplementares = _f.setConsultasComplementares;
65682
65682
  var _g = useQuery("SELECT FROM 'PROTESTOS'.'SERASA'", { documento: documento }, !!((_b = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.refinSerasa) === null || _b === void 0 ? void 0 : _b.consultaRealizada)), response = _g.response, isLoading = _g.isLoading, error = _g.error;
65683
+ var clearValue = function (value) { var _a; return (_a = value === null || value === void 0 ? void 0 : value.replace('.', '')) === null || _a === void 0 ? void 0 : _a.replace(',', '.'); };
65683
65684
  var pendenciasData = React.useMemo(function () {
65684
65685
  var _a, _b, _c;
65685
65686
  return ((response && ((_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.document) === null || _a === void 0 ? void 0 : _a.informacoes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.bello)) || [])
65686
65687
  .map(addNoValueContent)
65687
65688
  .map(function (pendencia) {
65688
- var _a, _b;
65689
- return (__assign$2(__assign$2({}, pendencia), { valor: formatMoney((_a = pendencia.valor) === null || _a === void 0 ? void 0 : _a.replace(',', '.')), totalvalor: formatMoney((_b = pendencia.totalvalor) === null || _b === void 0 ? void 0 : _b.replace(',', '.')), vencimento: pendencia.vencimento.slice(0, 10) }));
65689
+ var _a;
65690
+ return (__assign$2(__assign$2({}, pendencia), { valor: formatMoney(clearValue(pendencia.valor)), totalvalor: formatMoney(clearValue(pendencia.totalvalor)), vencimento: (_a = pendencia === null || pendencia === void 0 ? void 0 : pendencia.vencimento) === null || _a === void 0 ? void 0 : _a.slice(0, 10) }));
65690
65691
  });
65691
65692
  }, [response]);
65692
65693
  var pendencias = pendenciasData.filter(function (_a) {
@@ -20,7 +20,7 @@ export var getFieldRfb = function (path, response, formatter) {
20
20
  return formatter ? formatter(value) : value;
21
21
  };
22
22
  export var getProductsPrices = function (isPF) { return ({
23
- refinBoaVista: isPF ? 2.7 : 3.5,
23
+ refinBoaVista: isPF ? 1.2 : 2.7,
24
24
  scoreBoaVista: isPF ? 3 : 6,
25
25
  refinSerasa: 4.2,
26
26
  veiculos: 10,
@@ -39,13 +39,14 @@ var RefinSerasa = function (_a) {
39
39
  var consultasComplementaresContext = useContext(ConsultasComplementaresContext);
40
40
  var _f = consultasComplementaresContext !== null && consultasComplementaresContext !== void 0 ? consultasComplementaresContext : {}, consultasComplementares = _f.consultasComplementares, setConsultasComplementares = _f.setConsultasComplementares;
41
41
  var _g = useQuery("SELECT FROM 'PROTESTOS'.'SERASA'", { documento: documento }, !!((_b = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.refinSerasa) === null || _b === void 0 ? void 0 : _b.consultaRealizada)), response = _g.response, isLoading = _g.isLoading, error = _g.error;
42
+ var clearValue = function (value) { var _a; return (_a = value === null || value === void 0 ? void 0 : value.replace('.', '')) === null || _a === void 0 ? void 0 : _a.replace(',', '.'); };
42
43
  var pendenciasData = useMemo(function () {
43
44
  var _a, _b, _c;
44
45
  return ((response && ((_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.document) === null || _a === void 0 ? void 0 : _a.informacoes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.bello)) || [])
45
46
  .map(addNoValueContent)
46
47
  .map(function (pendencia) {
47
- var _a, _b;
48
- return (__assign(__assign({}, pendencia), { valor: formatMoney((_a = pendencia.valor) === null || _a === void 0 ? void 0 : _a.replace(',', '.')), totalvalor: formatMoney((_b = pendencia.totalvalor) === null || _b === void 0 ? void 0 : _b.replace(',', '.')), vencimento: pendencia.vencimento.slice(0, 10) }));
48
+ var _a;
49
+ return (__assign(__assign({}, pendencia), { valor: formatMoney(clearValue(pendencia.valor)), totalvalor: formatMoney(clearValue(pendencia.totalvalor)), vencimento: (_a = pendencia === null || pendencia === void 0 ? void 0 : pendencia.vencimento) === null || _a === void 0 ? void 0 : _a.slice(0, 10) }));
49
50
  });
50
51
  }, [response]);
51
52
  var pendencias = pendenciasData.filter(function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credithub/harlan-components",
3
- "version": "1.19.1",
3
+ "version": "1.19.3",
4
4
  "description": "Provide a set of web components to be used in Harlan and other projects",
5
5
  "keywords": [
6
6
  "harlan",