feat(app): экраны импорта отчётов, целей, доходов, ребалансировки, налогов и бенчмарков

Импорт (/imports, /instruments/pending) и фаза 4 (/goals, /income,
/rebalance, /tax, аналитика-хаб с benchmarks_card) — по
docs/ai/import-contract.md и docs/ai/phase4-contract.md. file_picker для
загрузки отчёта.
This commit is contained in:
Dmitry
2026-09-19 10:44:38 +03:00
parent 15f5812ea4
commit b69bb4a0c9
52 changed files with 7404 additions and 13 deletions
+14
View File
@@ -0,0 +1,14 @@
import '../portfolio/labels.dart' show assetClassLabels;
/// Bucket labels keyed by the **wire** dimension string.
///
/// `features/portfolio/labels.dart` already has `bucketLabel`, but it takes the generated
/// `AllocationDimension` enum, and the rebalance routes are not in the spec yet — this
/// layer only has the plain string. Once `just gen-client` produces the enum, this helper
/// should give way to the existing one.
String bucketLabelForKey(String dimension, String bucket) {
if (bucket == 'cash') return 'Денежные средства';
if (bucket == 'unknown') return 'Не указано';
if (bucket.isEmpty) return '';
return dimension == 'asset_class' ? (assetClassLabels[bucket] ?? bucket) : bucket;
}