Commit Graph

13 Commits

Author SHA1 Message Date
32f2686f14 se supone que volvio
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 1s
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 15s
2025-05-30 23:51:22 -06:00
6fd6750d8d quitados node_modules
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 1s
build-and-deploy / build (push) Failing after 8s
build-and-deploy / deploy (push) Has been skipped
2025-05-30 17:54:40 -06:00
google-labs-jules[bot]
242dc66983 Refactor: Centralize Prisma schema and restrict DB access
This commit refactors the project to use a shared Prisma schema and restricts direct database access to the API service.

Key changes:

- Created a new shared package `core/prisma` containing the Prisma schema, generated client, and types.
- Configured the monorepo to use NPM workspaces, including `core/prisma` and all services.
- Updated all services (`api`, `ui`, `mcp`, `agent`, and the background processing service) to depend on `@empresa/prisma-schema`.
- The API service now imports `PrismaClient` from `@empresa/prisma-schema/client`.
- Other services import only types from `@empresa/prisma-schema`.
- Removed redundant Prisma configurations from `api` and the background processing service.
- Updated the background processing service's `sync-empleados.js` to fetch data via an API call instead of direct database access.
- Updated TypeScript configurations (`tsconfig.base.json` and service-specific ones) to support the new structure and path aliases.
- Updated `README.md` to reflect the new architecture and added convenience scripts for Prisma operations.

This change promotes a single source of truth for data models, reduces code duplication, and improves the overall architecture by centralizing database operations within the API service.
2025-05-30 23:40:00 +00:00
b6d7759b30 sincronizar cambios
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 2s
build-and-deploy / build (push) Failing after 27s
build-and-deploy / deploy (push) Has been skipped
2025-05-30 02:13:01 -06:00
google-labs-jules[bot]
3fdba1fe89 feat: Add daily employee data synchronization
I've added a new capability to synchronize employee data from the local database to an external database on a daily basis.

Key changes:

-   **`worker/sync-empleados.js`**: This new script:
    -   Connects to the local Prisma database to fetch `Cliente` records where `empleado` is true.
    -   Provides clear placeholders and guidance for connecting to an external database (you must configure details like host, credentials, DB type, and table name, and implement specific DB client logic).
    -   Outlines a conceptual "upsert" logic (update existing, insert new) for the external database.
    -   Includes extensive comments on configuration, operation, and testing considerations.

-   **`worker/cron-worker.js`**:
    -   I modified this to import and schedule the `syncEmpleadosToExternalDB` function from the new script.
    -   The synchronization is scheduled to run daily at midnight.
    -   The existing example 5-second cron job has been commented as an example.

-   **Documentation**:
    -   I added in-code comments to both modified/new files to explain functionality.
    -   `sync-empleados.js` includes sections on external DB configuration and detailed testing considerations (manual and automated).

You will need to provide the actual connection details and logic for your specific external database system.
2025-05-30 06:48:19 +00:00
b4c1653d90 el deploy es un poco complicado
All checks were successful
build-and-push / build (push) Successful in 27s
build-and-push / deploy (push) Successful in 14s
2025-05-14 18:58:37 -06:00
a59521aafd worker sigue fallando
Some checks failed
build-and-push / build (push) Failing after 28s
build-and-push / deploy (push) Has been skipped
2025-05-14 18:54:47 -06:00
3595d4c76b seguimos fixeando a esos
Some checks failed
build-and-push / build (push) Failing after 18s
build-and-push / deploy (push) Has been skipped
2025-05-14 18:51:18 -06:00
21dbb4f960 fix cronworker y conexion prisma api
All checks were successful
build-and-push / build (push) Successful in 13s
build-and-push / deploy (push) Successful in 14s
2025-05-14 18:43:30 -06:00
6a1379137f fixeando
All checks were successful
build-and-push / build (push) Successful in 20s
build-and-push / deploy (push) Successful in 15s
2025-05-14 18:25:15 -06:00
04a19dab46 preparando worker y api test endpoint
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s
2025-05-14 16:32:59 -06:00
0c170bfa1a worker mejorado
Some checks failed
build-and-push / build (push) Successful in 1m36s
build-and-push / deploy (push) Failing after 14s
2025-05-14 16:23:36 -06:00
745168cf51 sistema creado v0.5.0
Some checks failed
build-and-push / deploy (push) Has been skipped
build-and-push / build (push) Failing after 6s
2025-05-14 16:10:41 -06:00