@credithub/harlan-components 1.19.1 → 1.19.2
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
|
@@ -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
|
|
65689
|
-
return (__assign$2(__assign$2({}, pendencia), { valor: formatMoney((
|
|
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) {
|
|
@@ -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
|
|
48
|
-
return (__assign(__assign({}, pendencia), { valor: formatMoney((
|
|
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) {
|