سامانه صدور فاکتور و حسابداری

docs: reconcile admin provisioning with current main and deployed Edge v1 contract

davoodmehraban89 committed Oct 11, 2026 at 20:30 UTC 9466cd099212ba223daf74831dd540e94c4fdf4b
1 file changed +6
PROJECT_STATE.md
+6
@@ -225,3 +225,9 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
225 - Implemented delegated click capture for dynamically rendered `.modal-backdrop.active` closing buttons «بستن»، «✕ بستن» and «انصراف» plus backdrop clicking. This prevents broken inline handlers from trapping the user and never changes stored state. Implemented keyboard-operable cards for assets, cash/bank, receivables and payables; journal-derived asset/cash account drilldown, source voucher/line navigation and the five newest journal rows. Uses scoped getters + existing P6Reports; **read-only**. Dashboard cash KPI currently uses one primary cash account; the expanded ledger explicitly distinguishes related bank/cash/petty accounts rather than silently changing the amount.
226 - Remote `DESKTOP-71SJ63M` live Chromium against locally served repo: `npx playwright test scripts/phase0-modal-dashboard.spec.js --reporter=line --workers=1 --timeout=20000` **PASS 2/2 (9.9 s)**. `node scripts/syntax-check.mjs` PASS (54 JS/50 MJS). Tests cover close/dynamic/overlay and dashboard asset→account→voucher, cash Enter, recent voucher navigation. Added suite to GitHub Quality; PR CI and production release pending at time of writing.
227 - Real owner desktop visual recheck is still required. Outstanding admin direct provisioning and draft/post/final document manager remain separately gated; no permissions, credentials, auth, schema or posted financial data changed.
228 +
229 +
230 +## 2026-10-11 owner central admin creation — rebased onto shipped UI
231 +- Original PR #77 `feat/admin-secure-user-provisioning-20261011` conflicted with separately merged modal/dashboard PR #76. Rebased isolated authorized implementation onto exact released main `a429aa36e67782345c70432c194f066c00b64787` in `feat/admin-user-provisioning-merged-20261011` to avoid loss of close-button, dashboard, test or asset cache changes. Follow-up PR supersedes #77 after gated validation; no runtime behavior has been published from this branch.
232 +- Verified Supabase `auth.users` trigger calls `public.handle_new_user()`, auto-creates ordinary user profile, organization and trial license; live `admin-user-management` Edge function **v1 ACTIVE, JWT required**, currently expects `password`. New frontend calls `temporary_password` and requires hardened **v2 deployment before releasing browser UI**. Do not merge the UI alone while v1 remains. Require verified admin-only server authorization; no account should be created for an unnamed person.
233 +- Browser admin creation UI with mocked server (including nonadmin prevention and invalid input) PASS 2/2 in remote Windows Chromium. Edge static security contract PASS. Actual active Edge v2 and authorized backend creation remain unverified; no real user records or credentials have been changed.