Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cadastro de moradores #58

Merged
merged 16 commits into from
Jul 6, 2024
Merged

Cadastro de moradores #58

merged 16 commits into from
Jul 6, 2024

Conversation

lucasobx
Copy link
Contributor

@lucasobx lucasobx commented Jul 2, 2024

Introdução

Este PR cria o cadastro de um novo morador por um administrador, com nome completo, CPF, email, tipo de morador (proprietário ou inquilino), status (não confirmado ou confirmado), condomínio, torre, andar e unidade. Também envia um convite por e-mail para futura confirmação do cadastro. Ao enviar o convite, uma senha é gerada aleatoriamente e o morador recebe um link para redefinir a senha e confirmar seu cadastro.

Objetivos

  • Construir formulário de cadastro de morador
  • Padronização do CPF de moradores e administradores
  • Mostrar dinamicamente as torres, andares e unidades referentes ao condomínio selecionado no formulário
  • Construir sistema de envio de e-mail com o Action Mailer

Detalhes

Formulário de cadastro de morador:
image
Mensagem de sucesso após envio do convite para o morador:
image
Mensagem de erro após tentar enviar o formulário com campos obrigatórios em branco:
image
E-mail enviado ao morador (visualização no terminal):
image

@DaniloRibeiro07 DaniloRibeiro07 linked an issue Jul 2, 2024 that may be closed by this pull request
6 tasks
@DaniloRibeiro07 DaniloRibeiro07 self-assigned this Jul 2, 2024
Co-authored-by: Danilo Ribeiro <[email protected]>
@lucasobx lucasobx marked this pull request as ready for review July 5, 2024 01:31
Copy link
Contributor

@akaninja akaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vou deixar aprovado, mas deixei alguns comentários para vocês avaliarem. ;)

app/controllers/residents_controller.rb Outdated Show resolved Hide resolved
app/models/tower.rb Outdated Show resolved Hide resolved
app/views/residents/confirmations/new.html.erb Outdated Show resolved Hide resolved
spec/models/resident_spec.rb Outdated Show resolved Hide resolved
spec/models/tower_spec.rb Outdated Show resolved Hide resolved
spec/requests/manager_request_spec.rb Outdated Show resolved Hide resolved
spec/requests/form_request_towers_spec.rb Show resolved Hide resolved
Copy link
Contributor

@ruliancruz ruliancruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deixei alguns comentários, de alguns pontos que considero importantes de serem revisados, mas deixei aprovado.

spec/system/resident/manager_register_new_resident_spec.rb Outdated Show resolved Hide resolved
spec/requests/form_request_towers_spec.rb Outdated Show resolved Hide resolved
config/application.rb Outdated Show resolved Hide resolved
app/views/residents/shared/_links.html.erb Outdated Show resolved Hide resolved
@lucasobx lucasobx merged commit 4bd3f9e into main Jul 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cadastrar moradores
4 participants