Skip to content

Acessar servicos de assitencia#5

Merged
victorYghor merged 26 commits into
developfrom
acessar-servicos-de-assitencia
Jun 24, 2025
Merged

Acessar servicos de assitencia#5
victorYghor merged 26 commits into
developfrom
acessar-servicos-de-assitencia

Conversation

@victorYghor
Copy link
Copy Markdown
Contributor

No description provided.

victorYghor and others added 25 commits June 14, 2025 18:19
Co-authored-by: Emmanuel N. C. Brito <code@yet1dev.com>
@victorYghor victorYghor requested review from Copilot and yet1dev and removed request for yet1dev June 24, 2025 22:45
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 adds the “acessar serviços de assistência” flows by introducing a new feature file, extending step definitions, and updating services to handle wait-listing, service listing, and redirection based on PCD disability type.

  • Introduces acessarServicos.feature with scenarios for listing services, directing to attendants, and handling queues.
  • Extends StepDefinitions.kt with new Cucumber steps to support service access, queue behavior, and cleanup.
  • Updates WhatsappService, QueueService, and AttendanceService to support 24h message windows, first-in-first-out queue pop, and wait-list messaging.

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/resources/.../registerPCD.feature Updated step wording for service options
src/test/resources/.../acessarServicos.feature New feature file for accessing assistance services
src/test/kotlin/.../StepDefinitions.kt Added step defs for new scenarios and queue behavior
src/main/kotlin/.../WhatsappService.kt Enhanced sendMessage with 24h check, logging, imports
src/main/kotlin/.../QueueService.kt Added @Transactional to pop method
src/main/kotlin/.../ServiceType.kt Added sorting and lookup helpers
src/main/kotlin/.../AttendanceService.kt Merged status service, wait-list messaging
data/myDB.trace.db Accidental database trace log checked in
Comments suppressed due to low confidence (1)

src/main/kotlin/ufrpe/sbpc/botpcd/entity/ServiceType.kt:85

  • The getAlphabeticOrder implementation uses reduce to combine Char and Int, which will not compile. You need an accumulator of type Int and use fold(0) { acc, c -> acc + c.code } instead.
fun String.getAlphabeticOrder() = this.replace("[^a-zA-Z]".toRegex(), "").slice(0..9).reduce {prev, curr -> prev + curr.code}

Comment thread src/test/kotlin/ufrpe/sbpc/botpcd/WhatsappServiceTest.kt
Comment thread src/test/kotlin/ufrpe/sbpc/botpcd/StepDefinitions.kt
Comment thread src/main/kotlin/ufrpe/sbpc/botpcd/service/WhatsappService.kt
Comment thread src/test/resources/ufrpe/sbpc/botpcd/registerPCD.feature Outdated
Comment thread data/myDB.trace.db
@@ -0,0 +1,38 @@
2025-05-20 12:36:33.423212Z jdbc[3]: exception
Copy link

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

A database trace log file was checked in; consider removing it from source control or adding it to .gitignore.

Copilot uses AI. Check for mistakes.
@victorYghor victorYghor merged commit 0e7d5e1 into develop Jun 24, 2025
1 check 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.

3 participants