Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

140
Visualizações
Table display according to list from backend

There is a list from the backend. The incoming list is the invoices list. I show these invoices in 2 different tabs as paid and unpaid. "status 3" of paid invoices. "status 6" of paid invoices. Sometimes there are no outstanding invoices. In this case, I want to remove the unpaid invoices table and replace it with a notification message.

payment-info.js

Here you can see two different tabs

<TabPanel value={value} index={0} >
  <PaymentTable variant="edit" paymentList={paymentInfoData} value={value} collectionMethod={collectionMethod} />
  <div className={hiddenControlButtonClass}>
    <AS.Button variant="outlined" onClick={handlePayment}>
      Continue
    </AS.Button>
  </div>
</TabPanel>
<TabPanel value={value} index={1}>
  <PaymentTable variant="read" paymentList={paymentInfoData} value={value} />
</TabPanel>

payment-table.js

props.paymentList.policyInstallmentDtoList = item

if (props.value === 0 && item.status !== '3') { ... //unpaid bills
}

if (props.value === 0 && !props.paymentInfoData?.policyInstallmentDtoList?.some((e) => e['status'] === '6')) {
  return (
   <div>You do not have any outstanding invoices</div>
  );
} // I tried to print a message if there is no unpaid invoice by navigating the incoming list here.

if (props.value === 1 && item.status === '3') { ... //paid invoice 
}

Since there are too many lines in if blocks, I wrote it abbreviated

How do I print the message if there is no unpaid invoice?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda