Commit Graph

7 Commits

Author SHA1 Message Date
google-labs-jules[bot]
113da3d5a5 feat: Implement DB-based user registration check and schema docs
This commit introduces a comprehensive database schema and implements a new user registration validation system.

1.  **New Database Documentation (`db_tasks.md`):**
    *   Creates a new `db_tasks.md` file to document the full database schema.
    *   Defines detailed tables for `users` (with vacation balance tracking), `vacations`, and `permission_requests` to serve as a robust HR management system.

2.  **User Registration Validation:**
    *   Removes the previous user validation logic that relied on Google Sheets.
    *   Adds a new `FullHRData` SQLAlchemy model that maps to the `vanessa_logs.full_HRdata` table.
    *   Implements a `check_user_registration` function in `modules/database.py` to verify if a user's `telegram_chat_id` already exists in the database.
    *   Integrates this check into the `/welcome` command in `modules/onboarding.py`. The bot now blocks already-registered users with a specific error message, as requested.
2025-12-16 19:01:40 +00:00
Marco Gallegos
3b94c2f90d feat: Add check for existing users and dynamic menu
- Add a check to see if a user's Telegram chat ID already exists in a Google Sheet.
- If the user is already registered, the 'welcome' option is hidden from the main menu.
- Added gspread and google-auth-oauthlib to requirements.txt.
- Modified database.py to support Google Service Account credentials from environment variables.
- Updated .env.example with the new environment variables.
2025-12-15 19:19:37 -06:00
Marco Gallegos
ae8436b01e feat: Integrate Google Sheets for duplicate chat ID verification and update main actions keyboard logic 2025-12-15 19:11:09 -06:00
Marco Gallegos
cbfcee557a feat: Add database health checks and host configuration, enhance the start command with a quick reply keyboard, and improve general text cleaning. 2025-12-14 15:33:47 -06:00
Marco Gallegos
220b78886d feat: Enhance database connection robustness, update onboarding command to /welcome, and remove /socia_finder functionality. 2025-12-14 11:53:45 -06:00
Marco Gallegos
c0793db73c feat: Implement AI-powered permit reason classification and add comprehensive project documentation. 2025-12-14 11:42:05 -06:00
google-labs-jules[bot]
fec578bd7c feat: Dockerize application and add MySQL logging
This commit introduces Docker and Docker Compose to containerize the application and orchestrate it with a MySQL database.

Key changes include:
- Added a `Dockerfile` to create a container for the Python bot.
- Created a `docker-compose.yml` file to manage the bot and MySQL services.
- Added a `modules/database.py` module to handle database connections and logging with SQLAlchemy.
- Integrated request logging into all command handlers.
- Updated `requirements.txt` with necessary dependencies for MySQL.
- Updated `.env` and `.gitignore` to manage database credentials securely.
- Updated `Readme.md` with instructions on how to run the application using Docker Compose.
2025-12-14 03:28:56 +00:00