This commit is contained in:
Phuoc Nguyen
2025-12-09 16:57:58 +07:00
parent 597c6a0e57
commit 4cfe000172
11 changed files with 89 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import 'package:intl/intl.dart';
import 'package:worker/core/constants/ui_constants.dart';
import 'package:worker/core/router/app_router.dart';
import 'package:worker/core/theme/colors.dart';
import 'package:worker/core/services/analytics_service.dart';
/// Order Success Page
class OrderSuccessPage extends StatelessWidget {
@@ -37,6 +38,15 @@ class OrderSuccessPage extends StatelessWidget {
final now = DateTime.now();
final dateFormat = DateFormat('dd/MM/yyyy HH:mm');
// Log purchase analytics event (only for actual purchases, not negotiations)
if (!isNegotiation && total != null) {
AnalyticsService.logPurchase(
orderId: orderNumber,
value: total!,
items: [], // Items not available in this page
);
}
return Scaffold(
backgroundColor: colorScheme.surface,
body: SafeArea(