cadrumo.entrypoints.tui.declarations.controller module¶
Pure controller and common shell for the Declarations workspace.
- declarations_copy(key, **values)[source]¶
Resolve authored display copy through the canonical catalogue.
- timestamp_label(value)[source]¶
Render a deterministic minute-bearing UTC timestamp without locale ambiguity.
- work_state_label(value)[source]¶
Render a local declaration state.
- Return type:
- Parameters:
value (WorkUnitState)
- revision_state_label(value)[source]¶
Render a calculation-revision state.
- Return type:
- Parameters:
value (CalculationRevisionState)
- filing_state_label(value)[source]¶
Render local filing-record currency.
- Return type:
- Parameters:
value (ModeloRecordStatus)
- evidence_label(value)[source]¶
Render separately observed AEAT evidence metadata.
- Return type:
- Parameters:
value (ExternalEvidenceKind | None)
- class DeclarationsWorkspaceController(context, projection, *, work_action, revisions_action, filing_action, modelo_workspace_factory=None, revision_handoff=None, filing_handoff=None, calendar_projection=None, calendar_entry_handoff=None, calendar_recovery_handoff=None)[source]¶
Bases:
objectCustody of an injected safe projection and admitted read references.
- Parameters:
context (TuiScreenContextV1)
projection (DeclarationsWorkspaceProjectionV1)
work_action (ActionReference)
revisions_action (ActionReference)
filing_action (ActionReference)
modelo_workspace_factory (ModeloWorkspaceScreenFactoryV1 | None)
revision_handoff (RevisionHandoffV1 | None)
filing_handoff (FilingHandoffV1 | None)
calendar_projection (DeclarationsCalendarProjectionV1 | None)
calendar_entry_handoff (CalendarEntryHandoffV1 | None)
calendar_recovery_handoff (CalendarRecoveryHandoffV1 | None)
- zone_state(zone)[source]¶
Return one closed zone state.
- Return type:
- Parameters:
zone (DeclarationsWorkspaceZone)
- target(destination)[source]¶
Construct a typed target from the closed route map.
- Return type:
- Parameters:
destination (DeclarationsDestinationIdV1)
- destination_availability(destination)[source]¶
Return truthful availability for one route authority.
- Return type:
- Parameters:
destination (DeclarationsDestinationIdV1)
- class DeclarationsWorkspaceScreen(controller, *, id)[source]¶
Bases:
AccountChromeScreenOne-scroll host-neutral shell with semantic internal navigation.
- Parameters:
controller (DeclarationsWorkspaceController)
id (str)
- BINDINGS: ClassVar¶
A list of key bindings.
- IS_WORKSPACE_OVERVIEW: ClassVar[bool]¶
Whether Back from this body leaves the workspace rather than returning to its overview.
- CSS: ClassVar[str]¶
Inline CSS, useful for quick scripts. Rules here take priority over CSS_PATH.
Note
This CSS applies to the whole app.
Populate every closed internal destination exactly once.
- Return type:
Handle a navigation selection without reading application state.
- Return type:
- Parameters:
event (RowSelected)
- show_empty()[source]¶
Say that a table has nothing in it, on the muted line, not the warning one.
- Return type:
- action_back()[source]¶
Return an area to the Declarations overview; leave the workspace only from the overview.
- Return type:
- on_declarations_route_requested(event)[source]¶
Resolve the requested internal body here and hand it to the host.
- Return type:
- Parameters:
event (DeclarationsRouteRequested)
- can_focus: bool¶
Widget may receive focus.
- can_focus_children: bool¶
Widget’s children may receive focus.
- class DeclarationsRouteRequested(target)[source]¶
Bases:
MessageRequest that the owning host replace the current internal body.
- Parameters:
target (DeclarationsRouteTargetV1)
- time¶
- class DeclarationsCalendarController(context, projection, *, entry_handoff=None, recovery_handoff=None)[source]¶
Bases:
objectPure custody and filtering for one injected safe calendar projection.
- Parameters:
context (TuiScreenContextV1)
projection (DeclarationsCalendarProjectionV1)
entry_handoff (CalendarEntryHandoffV1 | None)
recovery_handoff (CalendarRecoveryHandoffV1 | None)
- source(source)[source]¶
Return one explicit source state.
- Return type:
- Parameters:
source (DeclarationsCalendarSource)
- replace_projection(projection)[source]¶
Accept a fresh injected snapshot without performing a read.
- Return type:
- Parameters:
projection (DeclarationsCalendarProjectionV1)
- visible_entries(scope, query)[source]¶
Apply closed scope semantics and Unicode AND search to safe fields only.
- Return type:
- Parameters:
scope (DeclarationsCalendarScopeV1)
query (str)
- calendar_focus_key(row)[source]¶
Return a NamespacedId-compatible public natural calendar focus key.
- Return type:
- Parameters:
- calendar_address_focus_key(modelo, year, period)[source]¶
Return the calendar focus key for a Modelo, filing year and period.
Separate from
calendar_focus_key()so a caller holding only the natural address – a Home agenda row – lands on the same calendar row.
- calendar_legal_label(value)[source]¶
Render legal deadline status.
- Return type:
- Parameters:
value (ObligationStatus)
- calendar_user_label(value)[source]¶
Render the safe derived user-facing schedule state.
- Return type:
- Parameters:
value (OverviewPeriodState)
- calendar_local_label(value)[source]¶
Render local filing state without implying AEAT acceptance.
- Return type:
- Parameters:
value (OverviewLocalFilingState | None)
- calendar_aeat_label(value)[source]¶
Render observed AEAT evidence state without inference.
- Return type:
- Parameters:
value (OverviewAeatSubmissionState | None)