Shared Components: - Add CompanySelector.vue and PeriodSelector.vue components - Add AppHeader.vue and SlideMenu.vue layout components - Add shared stores factories (companies.js, accountingPeriod.js) - Add shared routes factories (companies.py, calendar.py) - Add shared models (company.py, calendar.py) - Add shared layout styles (header.css, navigation.css) Data Entry App: - Update CLAUDE.md with prod/test server documentation - Improve nomenclature sync service with better error handling - Update receipts router and CRUD operations - Add company/period stores using shared factories - Update App.vue layout with shared components - Fix OCRUploadZone file handling Reports App: - Refactor stores to use shared factories - Update App.vue to use shared layout components Infrastructure: - Replace start-data-entry.sh with separate dev/test scripts - Add .claude/rules for authentication, backend patterns, etc. - Add implementation plan for OCR receipt improvements - Clean up old documentation files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
815 B
Markdown
20 lines
815 B
Markdown
# Company & Period Selection Rules
|
|
|
|
## Store Factories (MANDATORY)
|
|
- Companies: Use `createCompaniesStore()` from `shared/frontend/stores/companies.js`
|
|
- Periods: Use `createAccountingPeriodStore()` from `shared/frontend/stores/accountingPeriod.js`
|
|
- Never implement custom company/period stores
|
|
|
|
## Components
|
|
- Use `CompanySelector.vue` from `shared/frontend/components/`
|
|
- Use `PeriodSelector.vue` from `shared/frontend/components/`
|
|
- Use `AppHeader.vue` layout from `shared/frontend/components/layout/`
|
|
|
|
## Backend Endpoints
|
|
- Use `create_companies_router()` factory from `shared/routes/companies.py`
|
|
- Use `create_calendar_router()` factory from `shared/routes/calendar.py`
|
|
|
|
## Company Access Validation (2-step)
|
|
1. Check `current_user.companies` (fast, from JWT)
|
|
2. Validate against Oracle DB (authoritative)
|