feat: Add accounting period selector for all views

- Add PeriodSelectorMini component for global period selection
- Add accountingPeriod store for shared period state
- Add calendar service/router/model for available periods API
- Update Dashboard, Invoices, Trial Balance, Bank/Cash Register views
  to respect selected period
- Fix Trial Balance navigation sync bug (period now syncs on mount)
- Update backend services to accept luna/an parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-09 12:14:35 +02:00
parent 3c0ab51f87
commit c75e896a84
22 changed files with 1162 additions and 425 deletions

View File

@@ -0,0 +1,19 @@
"""
Calendar period models for accounting period selector
"""
from pydantic import BaseModel
from typing import List, Optional
class CalendarPeriod(BaseModel):
"""Model for an accounting period"""
an: int # Year
luna: int # Month (1-12)
display_name: str # Format: "Decembrie 2025"
class CalendarPeriodsResponse(BaseModel):
"""Response model for calendar periods list"""
periods: List[CalendarPeriod]
current_period: Optional[CalendarPeriod] = None # Most recent period
total_count: int