docs+data: refresh demo dumps (clean seeded state) + restore/seeder docs

- backups/procurement.dump regenerated from the clean seeded state (was the
  junk test data); README documents both the app seeder and the restore path
- docs/casdoor-auth.md: later-batch changelog (fulfillment split, demo
  seeder, API-driven topics, hub-and-spoke, count modal, FOUND ceiling,
  semantic colors)
This commit is contained in:
ali_mohaghegh
2026-09-02 18:15:57 +03:30
parent ac76af2ffe
commit acb9958059
3 changed files with 53 additions and 10 deletions
+33
View File
@@ -235,6 +235,39 @@ After that, log in as the admin and use the Organization panel
query params are dropped (previously `project_id=undefined` → 400 → empty
dropdowns).
### Later batch (ledger fulfillment, demo data, hub-and-spoke)
- **Ledger fulfillment split** («رسید جزیی»): the quotation card shows a
counter badge («رسید: X از Y قلم» / «تکمیل شد» / «در راه»); each line item
visually splits into its received part (رسید شده ✓ + date + warehouse from
the receipt allocations) and the in-transit remainder — quantities always
sum to the original line (totals unchanged). Display-only split, agreed to
keep the receipt/decision chain intact.
- **Demo data seeder** (`backend/tools/seed.py`): wipes the app tables and
seeds a clean realistic dataset (3 projects × 2 warehouses, 4 suppliers,
12 materials across the 8 categories, 4 quotes in offered / in-transit /
partial / completed states with matching stock and receipts). Roles are
bound to the Casdoor users by username (run `seed_casdoor.py` first).
`backups/*.dump` are refreshed after seeding — teammates restore with
`backups/restore.ps1`.
- **Topics are API-driven**: the 8-topic grids (suppliers, wizard, units)
now come from `/material-categories` via the store instead of a hardcoded
list (which had a mismatched label «ابزار و تجهیزات ساخت»).
- **Hub-and-spoke navigation**: the tab strip lives only on «داشبورد انبار»;
sub-views (تغییر موجودی، کنترل روزانه، انبارها، کالاهای در راه، سازماندهی)
hide it and return via «بازگشت به داشبورد». «افزایش موجود» became the
«تغییر موجودی» entry button.
- **Stock count**: submission goes through a confirmation modal showing
current vs counted vs variance (کسری/مازاد) before the STOCK_COUNT
transaction is posted.
- **Found-items ceiling**: `found_qty ≤ missing balance` enforced client-side
(red input + inline warning, submit disabled) and server-side (422 with the
remaining balance); fully recovered losses drop off the pending list.
- **Semantic colors**: emerald = inflow (خرید/برگشت/پیدا شده), rose =
outflow (برداشت/ضایعات/اتلاف/مفقودی), blue = neutral (انتقال/شمارش
موجودی) across the warehouse module; quantities are shown as absolute
values with color-coded badges instead of ± signs.
## 9. Managing Casdoor yourself
- **Console:** http://localhost:8080 — log in as **admin / 123**. From there