@credithub/harlan-components 1.70.0 → 1.70.1
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.
|
@@ -53,13 +53,13 @@ import React, { useState } from 'react';
|
|
|
53
53
|
import { LoadingDots } from '../generativeAi/styles';
|
|
54
54
|
import { getAtividadesEconomicasSecundarias, getField, getFieldRfb, getProductsPrices } from './utils';
|
|
55
55
|
var useCardsAndProducts = function (_a) {
|
|
56
|
-
var _b, _c, _d, _e, _f;
|
|
56
|
+
var _b, _c, _d, _e, _f, _g;
|
|
57
57
|
var finderResponse = _a.finderResponse;
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
58
|
+
var _h = useConsultaRfb(), rfbResponse = _h.rfbResponse, rfbIsLoading = _h.isLoading;
|
|
59
|
+
var _j = useState(false), isModalOpen = _j[0], setModalOpen = _j[1];
|
|
60
|
+
var _k = useConsultasComplementares(), consultasComplementares = _k.consultasComplementares, setConsultasComplementares = _k.setConsultasComplementares, hasCredits = _k.hasCredits;
|
|
61
|
+
var _l = useState(false), isScrModalOpen = _l[0], setScrModalOpen = _l[1];
|
|
62
|
+
var _m = useState({}), loadingButtons = _m[0], setLoadingButtons = _m[1];
|
|
63
63
|
var handleModalClick = function () { return setModalOpen(true); };
|
|
64
64
|
var closeModal = function () { return setModalOpen(false); };
|
|
65
65
|
var isPF = !!getField('cpf', finderResponse);
|
|
@@ -106,7 +106,7 @@ var useCardsAndProducts = function (_a) {
|
|
|
106
106
|
});
|
|
107
107
|
}); };
|
|
108
108
|
};
|
|
109
|
-
var
|
|
109
|
+
var _o = {
|
|
110
110
|
cards: [
|
|
111
111
|
{
|
|
112
112
|
title: getField('sexo', finderResponse, function (value) {
|
|
@@ -276,11 +276,18 @@ var useCardsAndProducts = function (_a) {
|
|
|
276
276
|
hide: (_e = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.scoreBoaVista) === null || _e === void 0 ? void 0 : _e.consultaRealizada,
|
|
277
277
|
isLoading: loadingButtons['scoreBoaVista']
|
|
278
278
|
},
|
|
279
|
+
{
|
|
280
|
+
title: 'Consultar Score Serasa',
|
|
281
|
+
price: productsPrices === null || productsPrices === void 0 ? void 0 : productsPrices.scoreSerasa,
|
|
282
|
+
onClick: handleOnClick('scoreSerasa'),
|
|
283
|
+
hide: (_f = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.scoreSerasa) === null || _f === void 0 ? void 0 : _f.consultaRealizada,
|
|
284
|
+
isLoading: loadingButtons['scoreSerasa']
|
|
285
|
+
},
|
|
279
286
|
{
|
|
280
287
|
title: 'Consultar Pefin/Refin Serasa',
|
|
281
288
|
price: productsPrices === null || productsPrices === void 0 ? void 0 : productsPrices.refinSerasa,
|
|
282
289
|
onClick: handleOnClick('refinSerasa'),
|
|
283
|
-
hide: (
|
|
290
|
+
hide: (_g = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.refinSerasa) === null || _g === void 0 ? void 0 : _g.consultaRealizada,
|
|
284
291
|
isLoading: loadingButtons['refinSerasa']
|
|
285
292
|
} /*,
|
|
286
293
|
{
|
|
@@ -291,7 +298,7 @@ var useCardsAndProducts = function (_a) {
|
|
|
291
298
|
isLoading: loadingButtons['imoveis']
|
|
292
299
|
}*/
|
|
293
300
|
]
|
|
294
|
-
}, cards =
|
|
301
|
+
}, cards = _o.cards, products = _o.products;
|
|
295
302
|
return {
|
|
296
303
|
cards: cards,
|
|
297
304
|
products: products,
|
|
@@ -42,6 +42,7 @@ export var getAtividadesEconomicasSecundarias = function (response) {
|
|
|
42
42
|
export var getProductsPrices = function (isPF) { return ({
|
|
43
43
|
refinBoaVista: isPF ? 1.2 : 2.7,
|
|
44
44
|
scoreBoaVista: isPF ? 3 : 6,
|
|
45
|
+
scoreSerasa: 5,
|
|
45
46
|
refinSerasa: 4.2,
|
|
46
47
|
veiculos: 10,
|
|
47
48
|
scr: 7,
|