@credithub/harlan-components 1.19.0 → 1.19.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.
- package/lib/cjs/index.js +62 -65
- package/lib/esm/components/chart/chartSystem.js +3 -5
- package/lib/esm/components/dossie/summary/cardsAndProducts.js +0 -6
- package/lib/esm/components/processos-juridicos/envolvidosList.js +4 -2
- package/lib/esm/components/processos-juridicos/processosJuridicos.js +9 -8
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -21919,12 +21919,6 @@ var useCardsAndProducts = function (_a) {
|
|
|
21919
21919
|
};
|
|
21920
21920
|
var _h = {
|
|
21921
21921
|
cards: [
|
|
21922
|
-
{
|
|
21923
|
-
title: isPF &&
|
|
21924
|
-
(getField('nome', finderResponse) ||
|
|
21925
|
-
getFieldRfb('nome', rfbResponse)),
|
|
21926
|
-
header: 'Nome'
|
|
21927
|
-
},
|
|
21928
21922
|
{
|
|
21929
21923
|
title: getField('sexo', finderResponse, function (value) { return (isPF && (value == 'M' ? 'Masculino' : 'Feminino')) || ''; }),
|
|
21930
21924
|
header: 'Sexo'
|
|
@@ -28290,10 +28284,12 @@ var __makeTemplateObject$c = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
28290
28284
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
28291
28285
|
return cooked;
|
|
28292
28286
|
};
|
|
28293
|
-
var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$c(["\n gap: 8px;\n color: ", ";\n width: 100%;\n
|
|
28287
|
+
var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$c(["\n gap: 8px;\n color: ", ";\n width: 100%;\n .field > .value,\n .name {\n color: ", ";\n }\n"], ["\n gap: 8px;\n color: ", ";\n width: 100%;\n .field > .value,\n .name {\n color: ", ";\n }\n"])), theme.colors.prata, theme.colors.prata);
|
|
28294
28288
|
var EnvolvidosUltimaMovimentacaoTitle = styled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$c(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), theme.typography.headline16.fontWeight);
|
|
28295
28289
|
var EnvolvidosList = function (_a) {
|
|
28296
|
-
var
|
|
28290
|
+
var _b = _a.envolvidos, envolvidos = _b === void 0 ? [] : _b;
|
|
28291
|
+
if (!envolvidos.length)
|
|
28292
|
+
return null;
|
|
28297
28293
|
return (React.createElement(EnvolvidosListWrapper, { desktop: "1fr 3fr", tablet: "1fr" },
|
|
28298
28294
|
React.createElement(EnvolvidosUltimaMovimentacaoTitle, { className: "envolvidos-list-button" }, "Envolvidos na \u00DAltima Movimenta\u00E7\u00E3o"),
|
|
28299
28295
|
React.createElement("div", null, envolvidos.map(function (envolvido, i) { return (React.createElement(ResponsiveGrid, { desktop: "1fr 1fr", tablet: "1fr 1fr", mobile: "1fr 1fr", key: i, className: "content" },
|
|
@@ -28359,35 +28355,6 @@ var ProcessosJuridicosList = function (_a) {
|
|
|
28359
28355
|
};
|
|
28360
28356
|
var templateObject_1$b, templateObject_2$3, templateObject_3, templateObject_4;
|
|
28361
28357
|
|
|
28362
|
-
var __assign$8 = (undefined && undefined.__assign) || function () {
|
|
28363
|
-
__assign$8 = Object.assign || function(t) {
|
|
28364
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
28365
|
-
s = arguments[i];
|
|
28366
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
28367
|
-
t[p] = s[p];
|
|
28368
|
-
}
|
|
28369
|
-
return t;
|
|
28370
|
-
};
|
|
28371
|
-
return __assign$8.apply(this, arguments);
|
|
28372
|
-
};
|
|
28373
|
-
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
28374
|
-
var t = {};
|
|
28375
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28376
|
-
t[p] = s[p];
|
|
28377
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
28378
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
28379
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28380
|
-
t[p[i]] = s[p[i]];
|
|
28381
|
-
}
|
|
28382
|
-
return t;
|
|
28383
|
-
};
|
|
28384
|
-
var ResultWithoutInformation = function (_a) {
|
|
28385
|
-
var _b = _a.name, name = _b === void 0 ? 'Informação' : _b, _c = _a.value, value = _c === void 0 ? 'Não foram encontradas informações para o documento pesquisado.' : _c, props = __rest$3(_a, ["name", "value"]);
|
|
28386
|
-
return (React.createElement(Result, null,
|
|
28387
|
-
React.createElement(Result, null,
|
|
28388
|
-
React.createElement(AddItemField, __assign$8({ name: name, value: value }, props)))));
|
|
28389
|
-
};
|
|
28390
|
-
|
|
28391
28358
|
var ProcessosJuridicosIcon = function (_a) {
|
|
28392
28359
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 30 : _c, _d = _a.circleFill, circleFill = _d === void 0 ? theme.colors.azulCredithub : _d;
|
|
28393
28360
|
return (React.createElement("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className },
|
|
@@ -28403,16 +28370,18 @@ var ProcessosJuridicos = function (_a) {
|
|
|
28403
28370
|
var ctx = React.useContext(Queries.ProcessosJuridicos);
|
|
28404
28371
|
var Section = ctx.Section;
|
|
28405
28372
|
return (React.createElement(Section, { ctx: ctx, title: "Processos Jur\u00EDdicos", subtitle: "Veja os processos jur\u00EDdicos para este documento.", icon: ProcessosJuridicosIcon, onSuccess: function (data) {
|
|
28406
|
-
var _a, _b
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
var children = ((_b = data === null || data === void 0 ? void 0 : data.empresa) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(ProcessosJuridicosList, { processos: data === null || data === void 0 ? void 0 : data.empresa, onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })) : null;
|
|
28373
|
+
var _a, _b;
|
|
28374
|
+
var qtyProcessos = (_a = data === null || data === void 0 ? void 0 : data.empresa) === null || _a === void 0 ? void 0 : _a.length;
|
|
28375
|
+
var children = qtyProcessos ? (React.createElement(ProcessosJuridicosList, { processos: data === null || data === void 0 ? void 0 : data.empresa, onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })) : null;
|
|
28410
28376
|
return {
|
|
28411
28377
|
children: children,
|
|
28412
|
-
description: (React.createElement(StatusMessage, { type:
|
|
28413
|
-
? 'Pesquisa concluída'
|
|
28378
|
+
description: (React.createElement(StatusMessage, { type: qtyProcessos ? 'error' : 'default' }, qtyProcessos
|
|
28379
|
+
? 'Pesquisa concluída, ' +
|
|
28380
|
+
(qtyProcessos > 1
|
|
28381
|
+
? "foram encontrados ".concat(qtyProcessos, " processos")
|
|
28382
|
+
: 'foi encontrato 1 processo')
|
|
28414
28383
|
: 'Não foram econtrados processos jurídicos para o documento pesquisado')),
|
|
28415
|
-
variant: ((
|
|
28384
|
+
variant: ((_b = data === null || data === void 0 ? void 0 : data.empresa) === null || _b === void 0 ? void 0 : _b.length) ? 'error' : 'default'
|
|
28416
28385
|
};
|
|
28417
28386
|
} }));
|
|
28418
28387
|
};
|
|
@@ -63009,8 +62978,8 @@ adapters._date.override({
|
|
|
63009
62978
|
}
|
|
63010
62979
|
});
|
|
63011
62980
|
|
|
63012
|
-
var __assign$
|
|
63013
|
-
__assign$
|
|
62981
|
+
var __assign$8 = (undefined && undefined.__assign) || function () {
|
|
62982
|
+
__assign$8 = Object.assign || function(t) {
|
|
63014
62983
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
63015
62984
|
s = arguments[i];
|
|
63016
62985
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -63018,7 +62987,7 @@ var __assign$7 = (undefined && undefined.__assign) || function () {
|
|
|
63018
62987
|
}
|
|
63019
62988
|
return t;
|
|
63020
62989
|
};
|
|
63021
|
-
return __assign$
|
|
62990
|
+
return __assign$8.apply(this, arguments);
|
|
63022
62991
|
};
|
|
63023
62992
|
var __spreadArray$4 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
63024
62993
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
@@ -63036,7 +63005,7 @@ var addMissingDateEntries = function (data, startDate, endDate) {
|
|
|
63036
63005
|
}).map(function (date) { return format(date, 'yyyy-MM-dd'); });
|
|
63037
63006
|
var lastKnownQuantidade;
|
|
63038
63007
|
var lastKnownValorTotal;
|
|
63039
|
-
var formattedData = data.map(function (entry) { return (__assign$
|
|
63008
|
+
var formattedData = data.map(function (entry) { return (__assign$8(__assign$8({}, entry), { data: format(typeof entry.data === 'string' ? parseISO(entry.data) : entry.data, 'yyyy-MM-dd'), quantidade: entry.quantidade !== null ? entry.quantidade : lastKnownQuantidade, valorTotal: entry.valorTotal !== null ? entry.valorTotal : lastKnownValorTotal })); });
|
|
63040
63009
|
var dataMap = new Map(formattedData.map(function (entry) { return [entry.data, entry]; }));
|
|
63041
63010
|
return datesInRange.map(function (dateStr) {
|
|
63042
63011
|
var existingEntry = dataMap.get(dateStr);
|
|
@@ -63105,8 +63074,8 @@ var getBarSettings = function (timeFilter) {
|
|
|
63105
63074
|
}
|
|
63106
63075
|
};
|
|
63107
63076
|
|
|
63108
|
-
var __assign$
|
|
63109
|
-
__assign$
|
|
63077
|
+
var __assign$7 = (undefined && undefined.__assign) || function () {
|
|
63078
|
+
__assign$7 = Object.assign || function(t) {
|
|
63110
63079
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
63111
63080
|
s = arguments[i];
|
|
63112
63081
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -63114,7 +63083,7 @@ var __assign$6 = (undefined && undefined.__assign) || function () {
|
|
|
63114
63083
|
}
|
|
63115
63084
|
return t;
|
|
63116
63085
|
};
|
|
63117
|
-
return __assign$
|
|
63086
|
+
return __assign$7.apply(this, arguments);
|
|
63118
63087
|
};
|
|
63119
63088
|
function createDatasets(data, uniqueDates, timeFilter) {
|
|
63120
63089
|
var _a = getBarSettings(timeFilter), categoryPercentage = _a.categoryPercentage, barPercentage = _a.barPercentage;
|
|
@@ -63131,7 +63100,7 @@ function createDatasets(data, uniqueDates, timeFilter) {
|
|
|
63131
63100
|
var value = (_a = dateValues.get(date)) !== null && _a !== void 0 ? _a : null;
|
|
63132
63101
|
return { x: date, y: value };
|
|
63133
63102
|
});
|
|
63134
|
-
var datasetConfiguration = __assign$
|
|
63103
|
+
var datasetConfiguration = __assign$7({ type: chartType, label: label, data: datasetData, borderColor: borderColor, backgroundColor: chartType === 'bar' ? borderColor + '60' : undefined, tension: chartType === 'line' ? 0.4 : undefined, spanGaps: true, showLine: chartType === 'line', pointRadius: 2, yAxisID: yAxisID }, (chartType === 'bar' && {
|
|
63135
63104
|
categoryPercentage: categoryPercentage,
|
|
63136
63105
|
barPercentage: barPercentage
|
|
63137
63106
|
}));
|
|
@@ -64713,8 +64682,8 @@ var ChartContent = function (_a) {
|
|
|
64713
64682
|
};
|
|
64714
64683
|
var templateObject_1$7, templateObject_2$1;
|
|
64715
64684
|
|
|
64716
|
-
var __assign$
|
|
64717
|
-
__assign$
|
|
64685
|
+
var __assign$6 = (undefined && undefined.__assign) || function () {
|
|
64686
|
+
__assign$6 = Object.assign || function(t) {
|
|
64718
64687
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
64719
64688
|
s = arguments[i];
|
|
64720
64689
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -64722,7 +64691,7 @@ var __assign$5 = (undefined && undefined.__assign) || function () {
|
|
|
64722
64691
|
}
|
|
64723
64692
|
return t;
|
|
64724
64693
|
};
|
|
64725
|
-
return __assign$
|
|
64694
|
+
return __assign$6.apply(this, arguments);
|
|
64726
64695
|
};
|
|
64727
64696
|
var processData = function (data, quantidadeProcessosJuridicos) {
|
|
64728
64697
|
var removeZeros = function (current, index, arr) {
|
|
@@ -64747,27 +64716,27 @@ var processData = function (data, quantidadeProcessosJuridicos) {
|
|
|
64747
64716
|
data.protestos = sortBy(uniq(data.protestos, function (x) { return x.data; })
|
|
64748
64717
|
.filter(removeZeros)
|
|
64749
64718
|
.filter(removeSameAsNext)
|
|
64750
|
-
.map(function (info) { return (__assign$
|
|
64719
|
+
.map(function (info) { return (__assign$6(__assign$6({}, info), { data: formatDatePtBrToDate(info.data) })); }), function (info) { return info.data; });
|
|
64751
64720
|
data.ccfs = sortBy(uniq(data.ccfs, function (x) { return x.data; })
|
|
64752
64721
|
.filter(removeZeros)
|
|
64753
64722
|
.filter(removeSameAsNext)
|
|
64754
|
-
.map(function (info) { return (__assign$
|
|
64723
|
+
.map(function (info) { return (__assign$6(__assign$6({}, info), { data: formatDatePtBrToDate(info.data) })); }), function (info) { return info.data; });
|
|
64755
64724
|
data.boaVista = data.boaVista
|
|
64756
64725
|
.map(function (entry) {
|
|
64757
64726
|
var formattedDate = formatDatePtBrToDate(entry.creation);
|
|
64758
|
-
return __assign$
|
|
64727
|
+
return __assign$6(__assign$6({}, entry), { data: formattedDate, creation: undefined });
|
|
64759
64728
|
})
|
|
64760
64729
|
.filter(function (entry) { return entry.data; });
|
|
64761
64730
|
data.serasa = data.serasa
|
|
64762
64731
|
.map(function (entry) {
|
|
64763
64732
|
var formattedDate = formatDatePtBrToDate(entry.creation);
|
|
64764
|
-
return __assign$
|
|
64733
|
+
return __assign$6(__assign$6({}, entry), { data: formattedDate, creation: undefined });
|
|
64765
64734
|
})
|
|
64766
64735
|
.filter(function (entry) { return entry.data; });
|
|
64767
64736
|
data.dividasPublicasGrafico = data.dividasPublicasGrafico
|
|
64768
|
-
.map(function (info) { return (__assign$
|
|
64737
|
+
.map(function (info) { return (__assign$6(__assign$6({}, info), { data: formatDatePtBrToDate(info.data), valorTotal: info.total, total: undefined })); })
|
|
64769
64738
|
.filter(function (info) { return info.data; });
|
|
64770
|
-
return __assign$
|
|
64739
|
+
return __assign$6(__assign$6({}, data), { protestos: data.protestos, ccfs: data.ccfs, boaVista: data.boaVista, serasa: data.serasa, dividasPublicasGrafico: data.dividasPublicasGrafico, pieChartTotalConfig: __assign$6(__assign$6({}, data.pieChartTotalConfig), { processosJuridicos: quantidadeProcessosJuridicos }) });
|
|
64771
64740
|
};
|
|
64772
64741
|
function processProtestData(document) {
|
|
64773
64742
|
var _a, _b;
|
|
@@ -64897,10 +64866,9 @@ var ChartSystem = function (_a) {
|
|
|
64897
64866
|
}, [consultaPefinBoaVista, consultaPefinSerasa]);
|
|
64898
64867
|
return (React.createElement(React.Fragment, null,
|
|
64899
64868
|
React.createElement(Header$1, { title: "Resumo de Negativa\u00E7\u00F5es", subtitle: "Veja a quantidade de ocorr\u00EAncias conforme o documento foi consultado ao longo do tempo", description: errorMessage && (React.createElement(StatusMessage, { type: "error" }, errorMessage)), variant: isLoading ? 'loading' : 'default', icon: ResumoDeNegativacoesIcon, actions: React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
64900
|
-
React.createElement(
|
|
64901
|
-
React.createElement(
|
|
64902
|
-
|
|
64903
|
-
!isLoading && (React.createElement(QuantidadeResultados, { data: data, quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_k = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _k === void 0 ? void 0 : _k.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos }))))));
|
|
64869
|
+
React.createElement(Content$1, { isOpen: isOpen },
|
|
64870
|
+
data && React.createElement(ChartContent, { dataInput: data }),
|
|
64871
|
+
!isLoading && (React.createElement(QuantidadeResultados, { data: data, quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_k = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _k === void 0 ? void 0 : _k.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos })))));
|
|
64904
64872
|
};
|
|
64905
64873
|
var templateObject_1$6;
|
|
64906
64874
|
|
|
@@ -64937,6 +64905,35 @@ var BankAccounts = function () {
|
|
|
64937
64905
|
} }));
|
|
64938
64906
|
};
|
|
64939
64907
|
|
|
64908
|
+
var __assign$5 = (undefined && undefined.__assign) || function () {
|
|
64909
|
+
__assign$5 = Object.assign || function(t) {
|
|
64910
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
64911
|
+
s = arguments[i];
|
|
64912
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
64913
|
+
t[p] = s[p];
|
|
64914
|
+
}
|
|
64915
|
+
return t;
|
|
64916
|
+
};
|
|
64917
|
+
return __assign$5.apply(this, arguments);
|
|
64918
|
+
};
|
|
64919
|
+
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
64920
|
+
var t = {};
|
|
64921
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
64922
|
+
t[p] = s[p];
|
|
64923
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
64924
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
64925
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
64926
|
+
t[p[i]] = s[p[i]];
|
|
64927
|
+
}
|
|
64928
|
+
return t;
|
|
64929
|
+
};
|
|
64930
|
+
var ResultWithoutInformation = function (_a) {
|
|
64931
|
+
var _b = _a.name, name = _b === void 0 ? 'Informação' : _b, _c = _a.value, value = _c === void 0 ? 'Não foram encontradas informações para o documento pesquisado.' : _c, props = __rest$3(_a, ["name", "value"]);
|
|
64932
|
+
return (React.createElement(Result, null,
|
|
64933
|
+
React.createElement(Result, null,
|
|
64934
|
+
React.createElement(AddItemField, __assign$5({ name: name, value: value }, props)))));
|
|
64935
|
+
};
|
|
64936
|
+
|
|
64940
64937
|
var __spreadArray$2 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
64941
64938
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
64942
64939
|
if (ar || !(i in from)) {
|
|
@@ -14,7 +14,6 @@ import BtnWrapper from '../../assets/btn/btnWrapper';
|
|
|
14
14
|
import ChevronUp from '../../assets/btn/chevronUp';
|
|
15
15
|
import ChevronDown from '../../assets/btn/chevronDown';
|
|
16
16
|
import useChartData from './hooks/useChartData';
|
|
17
|
-
import { Result } from '../interface/result';
|
|
18
17
|
import ResumoDeNegativacoesIcon from '../../assets/icones/resumoNegativacoes';
|
|
19
18
|
import { ConsultasComplementaresContext } from '../consultasComplementares';
|
|
20
19
|
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n"], ["\n display: ", ";\n"])), function (props) { return (props.isOpen ? 'block' : 'none'); });
|
|
@@ -44,10 +43,9 @@ var ChartSystem = function (_a) {
|
|
|
44
43
|
}, [consultaPefinBoaVista, consultaPefinSerasa]);
|
|
45
44
|
return (React.createElement(React.Fragment, null,
|
|
46
45
|
React.createElement(Header, { title: "Resumo de Negativa\u00E7\u00F5es", subtitle: "Veja a quantidade de ocorr\u00EAncias conforme o documento foi consultado ao longo do tempo", description: errorMessage && (React.createElement(StatusMessage, { type: "error" }, errorMessage)), variant: isLoading ? 'loading' : 'default', icon: ResumoDeNegativacoesIcon, actions: React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
47
|
-
React.createElement(
|
|
48
|
-
React.createElement(
|
|
49
|
-
|
|
50
|
-
!isLoading && (React.createElement(QuantidadeResultados, { data: data, quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_k = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _k === void 0 ? void 0 : _k.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos }))))));
|
|
46
|
+
React.createElement(Content, { isOpen: isOpen },
|
|
47
|
+
data && React.createElement(ChartContent, { dataInput: data }),
|
|
48
|
+
!isLoading && (React.createElement(QuantidadeResultados, { data: data, quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_k = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _k === void 0 ? void 0 : _k.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos })))));
|
|
51
49
|
};
|
|
52
50
|
export default ChartSystem;
|
|
53
51
|
var templateObject_1;
|
|
@@ -35,12 +35,6 @@ var useCardsAndProducts = function (_a) {
|
|
|
35
35
|
};
|
|
36
36
|
var _h = {
|
|
37
37
|
cards: [
|
|
38
|
-
{
|
|
39
|
-
title: isPF &&
|
|
40
|
-
(getField('nome', finderResponse) ||
|
|
41
|
-
getFieldRfb('nome', rfbResponse)),
|
|
42
|
-
header: 'Nome'
|
|
43
|
-
},
|
|
44
38
|
{
|
|
45
39
|
title: getField('sexo', finderResponse, function (value) { return (isPF && (value == 'M' ? 'Masculino' : 'Feminino')) || ''; }),
|
|
46
40
|
header: 'Sexo'
|
|
@@ -8,10 +8,12 @@ import styled from 'styled-components';
|
|
|
8
8
|
import ResponsiveGrid from '../interface/responsiveGrid';
|
|
9
9
|
import theme from '../interface/theme';
|
|
10
10
|
import { ResultContent } from '../interface/result';
|
|
11
|
-
var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n gap: 8px;\n color: ", ";\n width: 100%;\n
|
|
11
|
+
var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n gap: 8px;\n color: ", ";\n width: 100%;\n .field > .value,\n .name {\n color: ", ";\n }\n"], ["\n gap: 8px;\n color: ", ";\n width: 100%;\n .field > .value,\n .name {\n color: ", ";\n }\n"])), theme.colors.prata, theme.colors.prata);
|
|
12
12
|
var EnvolvidosUltimaMovimentacaoTitle = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), theme.typography.headline16.fontWeight);
|
|
13
13
|
var EnvolvidosList = function (_a) {
|
|
14
|
-
var
|
|
14
|
+
var _b = _a.envolvidos, envolvidos = _b === void 0 ? [] : _b;
|
|
15
|
+
if (!envolvidos.length)
|
|
16
|
+
return null;
|
|
15
17
|
return (React.createElement(EnvolvidosListWrapper, { desktop: "1fr 3fr", tablet: "1fr" },
|
|
16
18
|
React.createElement(EnvolvidosUltimaMovimentacaoTitle, { className: "envolvidos-list-button" }, "Envolvidos na \u00DAltima Movimenta\u00E7\u00E3o"),
|
|
17
19
|
React.createElement("div", null, envolvidos.map(function (envolvido, i) { return (React.createElement(ResponsiveGrid, { desktop: "1fr 1fr", tablet: "1fr 1fr", mobile: "1fr 1fr", key: i, className: "content" },
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import ProcessosJuridicosList from './processosJuridicosList';
|
|
3
3
|
import { Queries } from '../webservice';
|
|
4
|
-
import ResultWithoutInformation from '../interface/resultWithoutInformation';
|
|
5
4
|
import ProcessosJuridicosIcon from '../../assets/icones/processosJuridicos';
|
|
6
5
|
import StatusMessage from '../interface/statusMessage';
|
|
7
6
|
var ProcessosJuridicos = function (_a) {
|
|
@@ -9,16 +8,18 @@ var ProcessosJuridicos = function (_a) {
|
|
|
9
8
|
var ctx = useContext(Queries.ProcessosJuridicos);
|
|
10
9
|
var Section = ctx.Section;
|
|
11
10
|
return (React.createElement(Section, { ctx: ctx, title: "Processos Jur\u00EDdicos", subtitle: "Veja os processos jur\u00EDdicos para este documento.", icon: ProcessosJuridicosIcon, onSuccess: function (data) {
|
|
12
|
-
var _a, _b
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var children = ((_b = data === null || data === void 0 ? void 0 : data.empresa) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(ProcessosJuridicosList, { processos: data === null || data === void 0 ? void 0 : data.empresa, onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })) : null;
|
|
11
|
+
var _a, _b;
|
|
12
|
+
var qtyProcessos = (_a = data === null || data === void 0 ? void 0 : data.empresa) === null || _a === void 0 ? void 0 : _a.length;
|
|
13
|
+
var children = qtyProcessos ? (React.createElement(ProcessosJuridicosList, { processos: data === null || data === void 0 ? void 0 : data.empresa, onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })) : null;
|
|
16
14
|
return {
|
|
17
15
|
children: children,
|
|
18
|
-
description: (React.createElement(StatusMessage, { type:
|
|
19
|
-
? 'Pesquisa concluída'
|
|
16
|
+
description: (React.createElement(StatusMessage, { type: qtyProcessos ? 'error' : 'default' }, qtyProcessos
|
|
17
|
+
? 'Pesquisa concluída, ' +
|
|
18
|
+
(qtyProcessos > 1
|
|
19
|
+
? "foram encontrados ".concat(qtyProcessos, " processos")
|
|
20
|
+
: 'foi encontrato 1 processo')
|
|
20
21
|
: 'Não foram econtrados processos jurídicos para o documento pesquisado')),
|
|
21
|
-
variant: ((
|
|
22
|
+
variant: ((_b = data === null || data === void 0 ? void 0 : data.empresa) === null || _b === void 0 ? void 0 : _b.length) ? 'error' : 'default'
|
|
22
23
|
};
|
|
23
24
|
} }));
|
|
24
25
|
};
|