@credithub/harlan-components 1.28.2 → 1.29.0

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.
@@ -30,8 +30,9 @@ import Section from '../interface/section';
30
30
  import StatusMessage from '../interface/statusMessage';
31
31
  import { Queries, RequestStatus } from '../webservice';
32
32
  var getPossuiPendenciaText = function (_a) {
33
- var ccf = _a.ccf, ultimoRegistroCCF = _a.ultimoRegistroCCF, dividasPublicas = _a.dividasPublicas, protestos = _a.protestos, processosJuridicos = _a.processosJuridicos;
33
+ var ccf = _a.ccf, ultimoRegistroCCF = _a.ultimoRegistroCCF, dividasPublicas = _a.dividasPublicas, protestos = _a.protestos, processosJuridicos = _a.processosJuridicos, receitaStatus = _a.receitaStatus;
34
34
  return [
35
+ receitaStatus ? "".concat(receitaStatus) : '',
35
36
  dividasPublicas
36
37
  ? "".concat(formatMoney(dividasPublicas), " em D\u00EDvidas P\u00FAblicas")
37
38
  : '',
@@ -51,14 +52,20 @@ var getPossuiPendenciaText = function (_a) {
51
52
  ].filter(function (x) { return !!x; });
52
53
  };
53
54
  var ConsultaSimplesSection = function (_a) {
55
+ var _b, _c;
54
56
  var documento = _a.documento, children = _a.children, onClose = _a.onClose, rest = __rest(_a, ["documento", "children", "onClose"]);
55
57
  var ctx = useContext(Queries.Finder);
56
58
  var data = useGlobalData().data;
59
+ var receitaStatus = ((_c = (_b = data.dossie) === null || _b === void 0 ? void 0 : _b.summary) === null || _c === void 0 ? void 0 : _c.receitaStatus) &&
60
+ data.dossie.summary.receitaStatus !== 'ATIVA'
61
+ ? data.dossie.summary.receitaStatus
62
+ : null;
57
63
  var possuiPendencias = data.ccf ||
58
64
  data.protestos ||
59
65
  data.dividasPublicas ||
60
- data.processosJuridicos;
61
- var possuiPendenciaText = getPossuiPendenciaText(data);
66
+ data.processosJuridicos ||
67
+ receitaStatus;
68
+ var possuiPendenciaText = getPossuiPendenciaText(__assign(__assign({}, data), { receitaStatus: receitaStatus }));
62
69
  var isError = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Error;
63
70
  var isLoading = (ctx === null || ctx === void 0 ? void 0 : ctx.type) === RequestStatus.Loading;
64
71
  var statusType = isError