16 Commits

Author SHA1 Message Date
Claude Agent
419464a62c feat: add CI/CD testing infrastructure with test.sh orchestrator
Complete testing system: pyproject.toml (pytest markers), test.sh
orchestrator with auto app start/stop and colorful summary,
pre-push hook, Gitea Actions workflow.

New QA tests: API health (7 endpoints), responsive (3 viewports),
log monitoring (ERROR/ORA-/Traceback detection), real GoMag sync,
PL/SQL package validation, smoke prod (read-only).

Converted test_app_basic.py and test_integration.py to pytest.
Added pytestmark to all existing tests (unit/e2e/oracle).
E2E conftest upgraded: console error collector, screenshot on
failure, auto-detect live app on :5003.

Usage: ./test.sh ci (30s) | ./test.sh full (2-3min)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 10:40:25 +00:00
Claude Agent
c1d8357956 gitignore 2026-03-18 15:11:09 +00:00
Claude Agent
f5ef9e0811 chore: move working scripts to scripts/work/ (gitignored)
Prevents untracked file conflicts on git pull on Windows server.
Scripts are development/analysis tools, not part of the deployed app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:34:34 +00:00
Claude Agent
a9d0cead79 chore: commit all pending changes including deploy scripts and Windows config
- deploy.ps1, iis-web.config: Windows Server deployment scripts
- api/app/routers/sync.py, dashboard.py: router updates
- api/app/services/import_service.py, sync_service.py: service updates
- api/app/static/css/style.css, js/*.js: UI updates
- api/database-scripts/08_PACK_FACTURARE.pck: Oracle package
- .gitignore: add .gittoken
- CLAUDE.md, agent configs: documentation updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 15:05:04 +00:00
Claude Agent
ac8a01eb3e chore: add .playwright-mcp to gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 21:21:17 +00:00
Claude Agent
c4fa643eca feat(sync): add order_total field to SQLite tracking
Parse order total from GoMag JSON, store in SQLite orders table,
and expose via sync run API. Enables total display in mobile flat rows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 21:20:57 +00:00
2e65855fe2 feat(sync): already_imported tracking, invoice cache, path fixes, remove vfp
- Track already_imported/new_imported counts separately in sync_runs
  and surface them in status API + dashboard last-run card
- Cache invoice data in SQLite orders table (factura_* columns);
  dashboard falls back to Oracle only for uncached imported orders
- Resolve JSON_OUTPUT_DIR and SQLITE_DB_PATH relative to known
  anchored roots in config.py, independent of CWD (fixes WSL2 start)
- Use single Oracle connection for entire validation phase (perf)
- Batch upsert web_products instead of one-by-one
- Remove stale VFP scripts (replaced by gomag-vending.prg workflow)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 00:15:37 +02:00
f52c504c2b chore: ignore SQLite auxiliary files (journal, wal, shm)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 18:02:08 +02:00
97699fa0e5 feat(dashboard): add logs page, pagination, quick mapping modal, price pre-validation
- Add /logs page with per-order sync run details, filters (Toate/Importate/Fara Mapare/Erori)
- Add price pre-validation (validate_prices + ensure_prices) to prevent ORA-20000 on direct articles
- Add find_new_orders() to detect orders not yet in Oracle COMENZI
- Extend missing_skus table with order context (order_count, order_numbers, customers)
- Add server-side pagination on /api/validate/missing-skus and /missing-skus page
- Replace confusing "Skip"/"Err" with "Fara Mapare"/"Erori" terminology
- Add inline mapping modal on dashboard (replaces navigation to /mappings)
- Add 2-row stat cards: orders (Comenzi Noi/Ready/Importate/Fara Mapare/Erori) + articles
- Add ID_POL/ID_GESTIUNE/ID_SECTIE to config.py and .env
- Update .gitignore (venv, *.db, api/api/, logs/)
- 33/33 unit tests pass, E2E verified with Playwright

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:59:08 +02:00
69841872d1 pljson 2026-03-11 12:32:25 +02:00
8e94c05901 actualizare 2026-03-10 15:23:12 +02:00
05bb0b1b01 Reorganize Oracle packages into database-scripts for unified git tracking
Move Oracle package files from docs/ to api/database-scripts/ with sequential numbering:
- PACK_COMENZI.pck → 04_pack_comenzi.pck (renamed with git)
- PACK_IMPORT_PARTENERI.pck → 05_pack_import_parteneri.pck
- PACK_IMPORT_COMENZI.pck → 06_pack_import_comenzi.pck

Remove 04_import_comenzi.sql (replaced by 06_pack_import_comenzi.pck actual version)

Update VFP integration files and project structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:32:41 +02:00
5d43509987 Update VFP integration with improved error handling and settings management
- Add output/ directory to .gitignore to exclude generated JSON files
- Fix ApplicationSetup.prg parameter handling with LPARAMETERS and proper validation
- Update gomag-adapter.prg to use global settings object and clean old JSON files
- Enhance sync-comenzi-web.prg with Oracle integration improvements
- Add Visual FoxPro project files (roawebcomenzi.PJT/.pjx)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 17:01:00 +03:00
d1858f86b6 Phase 2 implementation: VFP Integration with Oracle synchronization
Major architectural changes:
- Convert Oracle IMPORT_PARTENERI.cauta_sau_creeaza_partener from FUNCTION to PROCEDURE with OUT parameter for VFP compatibility
- Add IS_PERSOANA_JURIDICA parameter to support individual vs company detection
- Implement sync-comenzi-web.prg orchestrator for generic web order processing with 5-minute timer automation
- Create ApplicationSetup class for proper object-oriented configuration management
- Add comprehensive Oracle connection and sync settings via settings.ini configuration system
- Implement generic web order processing functions (ProcessWebOrder, ValidateWebOrder, CleanWebText, ConvertWebDate)
- Add proper VFP-Oracle integration with correct procedure call syntax using OUT parameters
- Rename gomag-vending.prg to gomag-adapter.prg for clarity and platform-specific functionality
- Move CheckIniFile function to utils.prg for better code organization
- Add settings.ini.example template and update .gitignore to exclude actual settings files
- Implement comprehensive logging system with rotation and error handling
- Add connection validation and retry logic for robust Oracle integration

Technical improvements:
- Proper JSON processing integration with existing nfjson library
- Comprehensive error handling with categorized logging (INFO, ERROR, WARN)
- Timer-based automation with configurable intervals
- Settings validation and default value creation
- Generic function naming for multi-platform support
- Class-based setup system replacing procedural approach

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:01:42 +03:00
3a234b5240 Remove FXP files from tracking and update gitignore
- Remove nfjson/nfjsonread.FXP from git tracking
- Add Python cache patterns (__pycache__/, *.py[cod], *$py.class)
- Add environment file patterns (.env, .env.local, .env.*.local)
- Reorganize project structure with VFP files moved to vfp/ directory
- Add comprehensive database scripts and documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 19:38:31 +03:00
9d3fa2bf9e Initial commit with current state 2025-08-28 00:28:20 +03:00