@credithub/harlan-components 1.106.0 → 1.106.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.
|
@@ -282,7 +282,7 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
282
282
|
return item.text ? (item.label === 'Potenciais Protestos Entrantes' ? (React.createElement(ClickableStatusMessage, { key: item.label, type: "error", onClick: scrollToEditais, title: "Clique para ver detalhes" }, item.text)) : (React.createElement(StatusMessage, { key: item.label, type: "error" }, item.text))) : null;
|
|
283
283
|
}),
|
|
284
284
|
((_w = data.editalData) === null || _w === void 0 ? void 0 : _w.isLoaded) &&
|
|
285
|
-
((_x = data.editalData) === null || _x === void 0 ? void 0 : _x.vencidosCount) &&
|
|
285
|
+
!!((_x = data.editalData) === null || _x === void 0 ? void 0 : _x.vencidosCount) &&
|
|
286
286
|
data.editalData.vencidosCount > 0 &&
|
|
287
287
|
hasOneOfTags(tags, ['diamante', 'diamante-new']) && (React.createElement(StatusMessage, { type: "error" },
|
|
288
288
|
React.createElement(ClickableText, { onClick: scrollToEditais, title: "Clique para ver detalhes" },
|
|
@@ -44,21 +44,23 @@ var Edital = function (_a) {
|
|
|
44
44
|
var hasAccess = useMemo(function () {
|
|
45
45
|
return hasOneOfTags(tags, ['diamante', 'diamante-new']);
|
|
46
46
|
}, [tags]);
|
|
47
|
-
var EDITAL_ERROR_SUMMARY = 'Falha ao consultar intimações
|
|
47
|
+
var EDITAL_ERROR_SUMMARY = 'Falha ao consultar intimações de protestos entrantes.';
|
|
48
48
|
// Atualiza globalData quando há erro
|
|
49
49
|
useEffect(function () {
|
|
50
|
-
if (
|
|
50
|
+
if (!ctx)
|
|
51
|
+
return;
|
|
52
|
+
if (ctx.type === RequestStatus.Error) {
|
|
51
53
|
setData(function (prevState) { return (__assign(__assign({}, prevState), { editalData: {
|
|
52
54
|
isLoaded: true,
|
|
53
55
|
error: { summary: EDITAL_ERROR_SUMMARY }
|
|
54
56
|
} })); });
|
|
55
57
|
return;
|
|
56
58
|
}
|
|
57
|
-
if (
|
|
59
|
+
if (ctx.type === RequestStatus.Empty) {
|
|
58
60
|
setData(function (prevState) { return (__assign(__assign({}, prevState), { editalData: { isLoaded: true } })); });
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
|
-
}, [ctx
|
|
63
|
+
}, [ctx, setData]);
|
|
62
64
|
// Atualiza globalData com os dados do edital
|
|
63
65
|
useEffect(function () {
|
|
64
66
|
if (dataUpdated || !ctx.document)
|
|
@@ -125,17 +127,19 @@ var Edital = function (_a) {
|
|
|
125
127
|
editaisVencidos: editaisVencidos,
|
|
126
128
|
vencidosResumo: vencidosResumo,
|
|
127
129
|
dataEditalMaisAntigo: dataEditalMaisAntigo
|
|
128
|
-
?
|
|
130
|
+
? "".concat(String(dataEditalMaisAntigo.getDate()).padStart(2, '0'), "/").concat(String(dataEditalMaisAntigo.getMonth() + 1).padStart(2, '0'), "/").concat(dataEditalMaisAntigo.getFullYear())
|
|
129
131
|
: undefined
|
|
130
132
|
} })); });
|
|
131
133
|
setDataUpdated(true);
|
|
132
134
|
}, [ctx.document, dataUpdated, setData]);
|
|
133
135
|
// Marca como carregando quando inicia requisição
|
|
134
136
|
useEffect(function () {
|
|
135
|
-
if (
|
|
137
|
+
if (!ctx)
|
|
138
|
+
return;
|
|
139
|
+
if (ctx.type === RequestStatus.Loading) {
|
|
136
140
|
setData(function (prevState) { return (__assign(__assign({}, prevState), { editalData: __assign(__assign({}, (prevState.editalData || {})), { isLoaded: false }) })); });
|
|
137
141
|
}
|
|
138
|
-
}, [ctx
|
|
142
|
+
}, [ctx, setData]);
|
|
139
143
|
var handleSuccess = function (response) {
|
|
140
144
|
var _a, _b, _c, _d;
|
|
141
145
|
var editais = (response === null || response === void 0 ? void 0 : response.editalEletronico) || [];
|