TorbatYar/frontend/shared/forms/README.md
Mortezakoohjani 6f4a484051 Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture.
Move business logic out of App Router into module packages, add boundary validation scripts, and keep all routes as thin re-exports without changing URLs or API behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 22:28:27 +03:30

32 lines
865 B
Markdown

# `shared/forms/`
## Purpose
Form field wrappers, validators, and react-hook-form integration helpers shared across modules.
## Legacy source (not moved)
- `components/ds/FormControls.tsx` — FormField, Select, Checkbox, MoneyInput, Tabs
- RHF + Zod patterns in accounting and beauty `(owner)/` pages
## Planned contents
- `FormField`, `FormSection`, `FormActions`
- RHF adapters for MoneyInput, DatePicker, entity comboboxes
- Shared Zod schema fragments (phone, money, tenant ID)
## Allowed dependencies
- `shared/ui/`
- `shared/calendar/` (date fields)
- `shared/utils/` (parseMoneyInput, formatMoney)
- External: `react-hook-form`, `@hookform/resolvers`, `zod`
## Forbidden dependencies
- Module-specific entity pickers (stay in module until abstracted)
## Status
📁 Scaffold only — no files migrated in Phase 1.