Skip to content

dev - last dance#67

Merged
icrcode merged 2 commits into
mainfrom
dev-last-dance
Jun 21, 2026
Merged

dev - last dance#67
icrcode merged 2 commits into
mainfrom
dev-last-dance

Conversation

@icrcode

@icrcode icrcode commented Jun 21, 2026

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and refinements across the backend and frontend, focusing on certificate generation, environment configuration, and frontend integration. The most significant changes include passing the coordinator's name to certificates, updating certificate layout and verification URLs to use the frontend, and enhancing test coverage and environment variable handling.

Certificate Generation and Layout:

  • The coordinator's name (coordenadorNome) is now included in the certificate, with a fallback if not found. The certificate PDF layout has been improved: it now features a double border, clearer header/body sections, a centered coordinator signature, and improved placement of the QR code and verification URL. The verification URL now points to the frontend /verificar/:hash route instead of a backend API endpoint. [1] [2] [3] [4] [5] [6] [7]

Backend Logic and Environment Configuration:

  • The backend now uses a new FRONTEND_URL environment variable (with fallback to CORS_ORIGIN) to generate verification URLs and QR codes, ensuring consistency with the deployed frontend. This variable is documented and used in .env examples and Docker Compose. [1] [2] [3]

Testing Enhancements:

  • Unit tests for the document approval handler have been updated to cover the new coordinator logic, including fallback behavior when the coordinator is missing. Tests also ensure the correct use of the new verification URL and coordinator name in certificate generation. [1] [2] [3] [4] [5] [6]

Frontend Improvements:

  • The registration page (Cadastro.tsx) now correctly resets or auto-selects the "turno" (shift) field when the course or available shifts change, improving user experience and preventing stale selections.

Certificate Generation and Verification:

  • Added coordenadorNome to certificate data and PDF, with fallback if the coordinator is not found. [1] [2]
  • Redesigned certificate PDF: double border, improved header/body, centered coordinator signature, better QR code/URL placement, and frontend-based verification URL. [1] [2]
  • Verification URLs and QR codes now use FRONTEND_URL and point to /verificar/:hash on the frontend. [1] [2] [3]

Configuration and Deployment:

  • Introduced FRONTEND_URL environment variable in backend, Docker Compose, and example .env files for both environments. [1] [2] [3]

Testing:

  • Updated and expanded unit tests to verify coordinator logic, fallback behavior, and correct URL generation in certificates. [1] [2] [3] [4] [5] [6]

Frontend:

  • Improved "turno" selection logic in registration to reset or auto-select based on course and available options.

@icrcode
icrcode requested a review from icrcode-senai June 21, 2026 03:58
@icrcode icrcode self-assigned this Jun 21, 2026
@icrcode icrcode added the enhancement New feature or request label Jun 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@icrcode
icrcode merged commit 2952965 into main Jun 21, 2026
6 of 7 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Valida Ai Roadmap Jun 21, 2026
@icrcode
icrcode deleted the dev-last-dance branch June 21, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant