Commit Graph

5 Commits

Author SHA1 Message Date
Samer Salameh 4066151033 Refinery (المصفاة): port trips, wage claims, commission claims, wallets, variables and cards from AqabaTCS
New API slice under /api/v1/refinery (Dapper on the NAFITHTCS REFINERY_* tables), web screens under features/refinery,
Dinarak and Jopetrol gateways (off by default, secrets from env), remaining-balance recalculation after the ton price
correction, Excel reports (trips, operator, exchange, diesel, cards, bank). Access only through permission keys:
db/refinery-permissions.sql gives the 6 screens and all action keys to PTADM (SU always allowed).
Docs: docs/refinery-agent-brief.md, docs/refinery-db-objects.txt (legacy views and diesel functions), ENVIRONMENTS.md.
The REFINERY_OIL import job and the daily totals email job are not ported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 16:41:19 +03:00
Samer Salameh e03179917f Port mobile notifications: push via legacy SOAP service, SMS for owners without the app, per-environment settings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 10:24:26 +03:00
Samer Salameh 025fbe9af8 Scheduled jobs: SU screen to start, stop and time the three legacy jobs
- Jobs: activate-company-destinations, close-old-permits (new port of GRAINS_Close_Old_Permits.cfm), fill-company-shares
- Interval (minutes/hours) or daily fixed times, run now, run history; database-row lock; tables from db/grains-jobs.sql
- Scheduler loop (off in Development), SU-only JobsController, web page /jobs
- Fix ORA-01745: no reserved words (BY, ROWS) as bind names; stale RUNNING marks heal themselves

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 17:15:24 +03:00
Samer Salameh 83cf3c9b03 GTO reports, voice call action, SYSTEM_ERRORS logging, report fixes, collapsed menu logo
- Grant GTO the tender-order and distribution-summary reports (db/gto-reports.sql)
- Companies/owners turn: translated values, centered counters; default order date today; tender-order left-to-right, no status filter
- Voice call button on permits list (grains.permits.voiceCall), IVR config in production
- Save unexpected server errors into SYSTEM_ERRORS
- Collapsed sidebar shows the brand mark
- Production attachment paths set to /mnt/NTPFiles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 11:28:14 +03:00
Samer Salameh 0c0b64239c Initial commit: NTP V2 (.NET 10 API + React web) with Dev, QA and Production environments
Rebuild of the legacy ColdFusion NTP Grains module: Orders, Permits, Registry and Reports on a Dapper/Oracle API with a
metadata-driven React front end (Arabic RTL default, English LTR, light and dark).

Environments
- API: appsettings.{Development,QA,Production}.json carry only non-secret settings. Connection strings, Jwt__Key, CORS origin and
  super users come from the server environment. Production and QA CORS origins fail closed until set. launchSettings gets a QA profile.
- Web: Vite modes qa and production (web/.env.qa, web/.env.production), configurable VITE_API_BASE, scripts build:qa and build:prod.
- docs/ENVIRONMENTS.md documents the three environments, required settings and a new-environment checklist.

Security and access
- Backend-driven permissions (GET /auth/permissions, [RequirePermission]) from GRAINS_SCREEN_PERMISSIONS; SU always allowed.
  SQL in db/ (grains-screen-permissions.sql, registry-create-permissions.sql).
- OracleCredentialGuard stops retrying an account after ORA-01017 so a misconfigured copy cannot lock the database account.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:56:48 +03:00