fix(diary): added proccesing of future dates and fixed deleted portions

This commit is contained in:
Username1548
2025-04-08 21:28:40 +07:00
parent 245c854754
commit 823dc78490
25 changed files with 1038 additions and 371 deletions

View File

@@ -350,7 +350,8 @@ class _ChatScreenState extends State<ChatScreen> {
hintText: 'Сообщение',
hintStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, height: 1, color: Color(0xFFAEAEB2)),
filled: true,
border: OutlineInputBorder(borderRadius: BorderRadius.circular(100), borderSide: const BorderSide(color: Color(0xFFD1D1D6), width: 1)),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(100), borderSide: const BorderSide(color: Color(0xFFD1D1D6), width: 1)),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(100),
borderSide: const BorderSide(color: Color(0xFFD1D1D6), width: 1),
@@ -394,7 +395,7 @@ class _ChatScreenState extends State<ChatScreen> {
left: 16,
child: AboutOrderButton(
onTap: () {
GoRouter.of(context).push(InfoByOrderScreen.path, extra: state.chatRoom.chosenPlan);
GoRouter.of(context).push(InfoByOrderScreen.path, extra: {'planId': state.chatRoom.chosenPlan?.id});
},
)),
],

View File

@@ -1,13 +1,14 @@
import 'dart:developer';
import 'package:eatvio_app/features/order_info/presentation/info_by_order_screen.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:webview_flutter/webview_flutter.dart';
class PaymentScreen extends StatefulWidget {
static const name = 'paymentScreen';
static const path = '/payment-screen';
final String url;
const PaymentScreen({super.key, required this.url});
final int planId;
const PaymentScreen({super.key, required this.url, required this.planId});
@override
State<PaymentScreen> createState() => _PaymentScreenState();
@@ -23,13 +24,14 @@ class _PaymentScreenState extends State<PaymentScreen> {
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {},
onPageStarted: (String url) {},
onPageFinished: (String url) {},
onHttpError: (HttpResponseError error) {},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
log(request.url);
if (request.url.contains('tbank/checkout-success')) {
if (request.url.contains('Success=true')) {
GoRouter.of(context).pushReplacement(InfoByOrderScreen.path, extra: {'planId': widget.planId, 'successfulPayment': true});
} else {
GoRouter.of(context).pushReplacement(InfoByOrderScreen.path, extra: {'planId': widget.planId, 'successfulPayment': false});
}
}
return NavigationDecision.navigate;
},
),