reports page
This commit is contained in:
43
frontend/pweb/lib/pages/report/cards/column.dart
Normal file
43
frontend/pweb/lib/pages/report/cards/column.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pshared/models/payment/operation.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
import 'package:pweb/pages/report/cards/items.dart';
|
||||
|
||||
|
||||
class OperationsCardsColumn extends StatelessWidget {
|
||||
final List<OperationItem> operations;
|
||||
final ValueChanged<OperationItem>? onTap;
|
||||
|
||||
const OperationsCardsColumn({
|
||||
super.key,
|
||||
required this.operations,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
final theme = Theme.of(context);
|
||||
final items = buildOperationCardItems(
|
||||
context,
|
||||
operations,
|
||||
onTap: onTap,
|
||||
);
|
||||
|
||||
if (operations.isEmpty) {
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
loc.reportPaymentsEmpty,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: items,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user