Salvar informacoes essenciais do usuario#3
Merged
Conversation
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>
…f receive "botpcd" and who send message.
refact: The entity now gets the Attendant Class instead of the User Class.
… a monitor or a committee member
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
…s-essenciais-do-usuario # Conflicts: # src/main/kotlin/ufrpe/sbpc/botpcd/entity/CommitteeMember.kt # src/main/kotlin/ufrpe/sbpc/botpcd/service/AttendanceService.kt # src/main/resources/application.properties
Co-authored-by: Emmanuel N. C. Brito <code@yet1dev.com>
Co-authored-by: Emmanuel N. C. Brito <code@yet1dev.com>
There was a problem hiding this comment.
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.