fix to prod

This commit is contained in:
2026-08-14 13:47:11 +03:00
parent f53fea576e
commit 80a95ece5b
27 changed files with 872 additions and 221 deletions

View File

@@ -1,7 +1,6 @@
import 'dart:async';
import 'package:be_happy/presentation/screens/card_binding_result_screen.dart';
import 'package:be_happy/presentation/screens/company_details.dart';
import 'package:be_happy/presentation/screens/lease_agreement_screen.dart';
import 'package:be_happy/presentation/screens/payment_rules_screen.dart';
import 'package:bot_toast/bot_toast.dart';
@@ -79,6 +78,9 @@ import '../event/subscription_details_event.dart';
import '../event/tariff_sheet_event.dart';
import '../event/top_up_event.dart';
import '../screens/add_card_screen.dart'; // ← новый импорт
import '../screens/company_details_screen.dart';
import '../screens/fine_list_screen.dart';
import '../screens/fine_payment_screen.dart';
import '../screens/license_agreement_screen.dart';
import '../screens/notifications_screen.dart';
import '../screens/order_history_screen.dart';
@@ -545,6 +547,41 @@ class AppRouter {
builder: (context, state) => const OrderHistoryScreen(),
routes: []
),
GoRoute(
path: 'fine-list',
builder: (context, state) => const FineListScreen(),
routes: []
),
GoRoute(
path: 'fine-payment/:fineId',
builder: (context, state) {
final fineId = int.parse(state.pathParameters['fineId']!);
return FinePaymentScreen(fineId: fineId);
},
routes: [
GoRoute(
path: 'result/:status',
builder: (context, state) {
final modeParam = state.pathParameters['status'];
CardBindingStatus status = CardBindingStatus.success;
String title = 'Штраф успешно\nоплачен!';
if (modeParam == 'failed') {
status = CardBindingStatus.failed;
title = 'Извините, что-то\nпошло не так';
}
return CardBindingResultScreen(
status: status,
title: title,
cardImagePath: 'assets/icons/card_result_screen.png',
redirectPath: '/home/fine-list',
);
},
),
],
),
GoRoute(
path: 'notifications',
builder: (context, state) => const NotificationsScreen(),