Added Localizations and ran small fixes

This commit is contained in:
Arseni
2025-11-25 08:20:09 +03:00
parent 72d8da1fe8
commit fcb5ab4f2c
41 changed files with 444 additions and 233 deletions

View File

@@ -8,6 +8,8 @@ import 'package:pweb/pages/report/table/filters.dart';
import 'package:pweb/pages/report/table/widget.dart';
import 'package:pweb/providers/operatioins.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class OperationHistoryPage extends StatefulWidget {
const OperationHistoryPage({super.key});
@@ -48,6 +50,7 @@ class _OperationHistoryPageState extends State<OperationHistoryPage> {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context)!;
return Consumer<OperationProvider>(
builder: (context, provider, child) {
if (provider.isLoading) {
@@ -59,10 +62,10 @@ class _OperationHistoryPageState extends State<OperationHistoryPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('Error: ${provider.error}'),
Text(loc.notificationError(provider.error ?? loc.noErrorInformation)),
ElevatedButton(
onPressed: () => provider.loadOperations(),
child: const Text('Retry'),
child: Text(loc.retry),
),
],
),
@@ -108,4 +111,4 @@ class _OperationHistoryPageState extends State<OperationHistoryPage> {
},
);
}
}
}