- 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>
20 lines
542 B
Python
20 lines
542 B
Python
"""
|
|
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
|