ali_mohaghegh
3cd76d335f
fix(auth): Casdoor JWT verification and 401 semantics; add /auth/login password-grant endpoint
...
- verify kid from the JWT header (pyjwt decode() returns claims, not the
header — the old lookup was always None and rejected every token)
- convert JWK entries to crypto keys explicitly (pyjwt 2.13 dropped dict
keys) and fetch the JWKS from /.well-known/jwks
- 401 for missing/invalid/expired/wrong-issuer/wrong-audience tokens
(was 403/400); 403 stays for valid-but-roleless users; 503 when Casdoor
is unreachable; new CASDOOR_ISSUER setting separates the in-network
endpoint from the browser-facing issuer
- dev-header fallback in inventory/pm scopes now requires an explicit
X-User-Role header (no auth info at all -> 401)
- new POST /api/v1/auth/login: password grant against Casdoor, local JWT
verification, auto-provisioning, returns token + profile with the role
resolved from the app users table
2026-08-29 14:43:49 +03:30
ali_mohaghegh
06a9a654a5
docs: update README layout and login/access notes
2026-08-27 15:04:25 +03:30
ali_mohaghegh
6a91d32cd5
fix(dashboard): show price unit (toman) inside the amount-in-letters bracket
2026-08-27 15:04:25 +03:30
ali_mohaghegh
068c51909c
fix(db): fill item_receipts.confirmed_by in office paths; resilient per-statement v2.6 upgrade (root cause of 500 on receipt)
2026-08-27 15:04:25 +03:30
ali_mohaghegh
eb2a50eee1
feat(inventory): role-aware header navigation - PM top nav without hamburger, admin top nav plus compact account menu
2026-08-27 15:04:25 +03:30
ali_mohaghegh
5e690a7fc8
feat(inventory): daily control - admin project filter and calendar navigation layout
2026-08-27 15:04:25 +03:30
ali_mohaghegh
0774f08823
fix(inventory): adjustment form - transfer rows, safe date handling, Shamsi date picker, drop new-item category field
2026-08-27 15:04:25 +03:30
ali_mohaghegh
a191147eca
feat(arrivals): in-transit goods dashboard - quote cards, per-item receive and warehouse allocation, days elapsed, admin access, received<=ordered limit
2026-08-27 15:04:25 +03:30
ali_mohaghegh
f48f3752af
feat(org): user and PM management - list/define users, roles, project assignment (API + organization panel)
2026-08-27 15:04:24 +03:30
ali_mohaghegh
034c05c713
feat(auth): dev login offers only the two business roles (procurement/project manager)
2026-08-27 15:04:24 +03:30
ali_mohaghegh
f30c98adc0
chore: remove legacy HTML inventory-dash prototype (superseded by React port)
2026-08-27 15:04:24 +03:30
ali_mohaghegh
debb193b90
chore: add .gitattributes — normalize line endings to LF
2026-08-25 19:08:26 +03:30
ali_mohaghegh
76151c9df4
chore(legacy): add shipped HTML inventory-dash prototype as reference
2026-08-25 19:08:15 +03:30
ali_mohaghegh
4e105c5cd5
feat(frontend): add React UI — procurement office, wizard, suppliers, inventory panel (dash port), role-based login
2026-08-25 19:08:15 +03:30
ali_mohaghegh
170aed66ea
feat(backend): add FastAPI backend — procurement, inventory domain, Casdoor auth, PM arrival endpoints
2026-08-25 19:08:14 +03:30
ali_mohaghegh
c8a9b66395
feat(db): add v2.6 schema migration — global materials, supplier categories, inventory ledger, PM arrival flow, triggers
2026-08-25 19:08:13 +03:30
ali_mohaghegh
aca56dc1a5
docs: add ERD diagrams (v2.4/v2.5/v2.6) and material-supplier-category migration plan
2026-08-25 19:08:13 +03:30
ali_mohaghegh
5b27647a0a
chore: add repo scaffolding (compose, scripts, gitignore, env example)
2026-08-25 19:08:02 +03:30