@credithub/harlan-components 1.117.0 → 1.117.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.
|
@@ -66,7 +66,7 @@ var useLiminarProtestosDoPassado = function (_a) {
|
|
|
66
66
|
var posthog = useContext(PostHogContext).posthog;
|
|
67
67
|
var _c = useGlobalData(), globalData = _c.data, setData = _c.setData;
|
|
68
68
|
var fetch = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
-
var data, parsedData, _a, _b, numerosChave, protestosDoPassado, ocultos;
|
|
69
|
+
var data, parsedData, _a, _b, normalizedData, numerosChave, protestosDoPassado, ocultos;
|
|
70
70
|
return __generator(this, function (_c) {
|
|
71
71
|
switch (_c.label) {
|
|
72
72
|
case 0: return [4 /*yield*/, client.request("SELECT FROM 'Protestos'.'History'", {
|
|
@@ -78,10 +78,14 @@ var useLiminarProtestosDoPassado = function (_a) {
|
|
|
78
78
|
return [4 /*yield*/, Client.WebService.parse(data)];
|
|
79
79
|
case 2:
|
|
80
80
|
parsedData = _b.apply(_a, [(_c.sent())]).flat();
|
|
81
|
-
|
|
81
|
+
normalizedData = parsedData.map(function (item) {
|
|
82
|
+
var _a;
|
|
83
|
+
return (__assign(__assign({}, item), { cpfCnpj: (_a = item.cpfCnpj) !== null && _a !== void 0 ? _a : documento }));
|
|
84
|
+
});
|
|
85
|
+
numerosChave = normalizedData
|
|
82
86
|
.filter(function (item) { return item.missingAt; })
|
|
83
87
|
.map(function (item) { return item.chave; });
|
|
84
|
-
protestosDoPassado =
|
|
88
|
+
protestosDoPassado = normalizedData.filter(function (item) { return item.missingAt; });
|
|
85
89
|
ocultos = protestosDoPassado.map(function (item) { return item.chave; });
|
|
86
90
|
setData(function (prev) { return (__assign(__assign({}, prev), { protestosPagosBaixados: {
|
|
87
91
|
isLoaded: true,
|