Skip to content

Commit

Permalink
Merge pull request #42 from Salgado2004/bug-excluir-cpf
Browse files Browse the repository at this point in the history
Bug excluir cpf
  • Loading branch information
Salgado2004 authored Jun 11, 2024
2 parents d52b374 + 0482938 commit 85ef16d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/br/ufpr/views/ManterCliente.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ public void actionPerformed(ActionEvent e) {
@Override
public void actionPerformed(ActionEvent e) {
String cpf = textFieldCPF.getText();
Sistema.getClientes().removeIf(cliente -> cliente.getCpf().equalsIgnoreCase(cpf));

cpf = cpf.replaceAll("[^0-9]", "");

String finalCpf = cpf;

Sistema.getClientes().removeIf(cliente -> cliente.getCpf().equalsIgnoreCase(finalCpf));

Mensagens.sucesso(null, "CPF "+cpf+" removido\n");

Expand Down

0 comments on commit 85ef16d

Please sign in to comment.