Skip to content

Salvar informacoes essenciais do usuario#3

Merged
victorYghor merged 64 commits into
developfrom
salvar-informacoes-essenciais-do-usuario
Jun 5, 2025
Merged

Salvar informacoes essenciais do usuario#3
victorYghor merged 64 commits into
developfrom
salvar-informacoes-essenciais-do-usuario

Conversation

@victorYghor
Copy link
Copy Markdown
Contributor

No description provided.

ronaldo-ribeirof and others added 30 commits May 13, 2025 16:06
Enum para controlar disponibilidade dos usuários (AVAILABLE, BUSY, UNAVAILABLE)
Interface básica JPA para operações CRUD de atendimentos
Endpoints para iniciar, finalizar e listar atendimentos
Implementa operações para alterar e consultar status de monitores e membros da comissão
Permite que monitores e membros alterem seu status via API REST
Permite controlar disponibilidade dos membros da comissão
Permite controlar disponibilidade do monitor para novos atendimentos
Permite filtrar membros da comissão disponíveis para atendimentos
Permite filtrar monitores disponíveis para alocação em atendimentos
Implementa início e fim de atendimentos com atualização automática de status, mas sem nada elaborado, apenas básico para usar o enum de UserStatus.
Co-Authored-By: Victor Yghor Simões dos Santos <124019555+victoryghor@users.noreply.github.com>
Co-Authored-By: Victor Yghor Simões dos Santos <124019555+victoryghor@users.noreply.github.com>
Documentamos um pouco melhor o enum de UserStatus

Co-Authored-By: Emmanuel N. C. Brito <code@yet1dev.com>
Fiz com que ao iniciar ou encerrar um atendimento, o status do membro da comissão também possa ser mudado
O monitor quando iniciar o atendimento ele, vai falar o bot pcd e isso vai mostrar quais as opções ele tem (disponível, indisponível e ocupado)

O Monitor vai digitar qual opção ele vai querer vai ter a opção de números ou botão

-

Caso 1 (ele está indisponível):

Ficar Disponível 1

-

Caso 2 (ele está ocupado):

Encerrar atendimento 1 (vai internamente mudar o status dele pra disponível)

Ficar indisponível 2 (ele para de ser chamado para atendimentos)

-

Caso 3 (ele está disponível):

Ficar indisponível 1

Co-Authored-By: Emmanuel N. C. Brito <code@yet1dev.com>
refact: The entity now gets the Attendant Class instead of the User Class.
refact: The entity now gets the Attendant Class instead of the User Class.
refact: Added parameters in the enum.
refact: Modified the logic of the beginAttendance function to instant change the status of the Attendant to BUSY and implemented the getAttendant to get either a Monitor or a Committee Member.
Co-Authored-By: victor-yghor <170154820+victor-yghor@users.noreply.github.com>
Co-Authored-By: victor-yghor <170154820+victor-yghor@users.noreply.github.com>
refact: Changed the name of the service.
Co-Authored-By: victor-yghor <170154820+victor-yghor@users.noreply.github.com>
Co-Authored-By: victor-yghor <170154820+victor-yghor@users.noreply.github.com>
# Conflicts:
#	src/main/kotlin/ufrpe/sbpc/botpcd/entity/CommitteeMember.kt
#	src/main/resources/application.properties
@victorYghor victorYghor requested a review from Copilot June 5, 2025 00:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR focuses on saving essential user information by updating entity relationships and enhancing service and repository functionality. Key changes include:

  • Introduction of AttendanceService to handle service messaging.
  • Updates to several repositories with new query methods and enhancements.
  • Refactoring of entity classes (PWD, Monitor, CommitteeMember, Attendant) to improve inheritance and data mapping.

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
AttendanceService.kt Added service to send messages based on user disability information.
PWDRepository.kt Introduced method to fetch PWD with disabilities eagerly.
MonitorRepository.kt Added method to find monitors by user status.
MessageExchangeRepository.kt Added method to fetch the last message exchange; uses a JPQL query with a LIMIT clause.
CommitteeMemberRepository.kt Added method to filter committee members by status.
AttendanceRepository.kt Created repository for Attendance entity.
User.kt Removed unused phoneNumberId field.
ServiceType.kt Extended sealed class with a description field and updated service definitions.
PWDDisability.kt Added entity for storing PWD disabilities.
PWD.kt Changed disability field to a collection of disabilities.
Monitor.kt, CommitteeMember.kt, Attendant.kt Updated inheritance to use the new Attendant class and include status.
Attendance.kt Switched from monitor to attendant mapping and added attendant type.
WhatsappWebhookController.kt Enhanced controller logic to check for message presence and updated logger declaration.
GlobalExceptionHandler.kt Added global error handler with logging.
WhatsappApiConfig.kt Applied profile-based configuration for non-test environments.
Comments suppressed due to low confidence (1)

src/main/kotlin/ufrpe/sbpc/botpcd/controller/GlobalExceptionHandler.kt:12

  • The logger in GlobalExceptionHandler should reference GlobalExceptionHandler::class.java to ensure the correct logging context.
val logger: Logger = LoggerFactory.getLogger(WhatsappWebhookController::class.java)

@victorYghor victorYghor merged commit 8682c94 into develop Jun 5, 2025
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.

4 participants