From 648a4f5eb47513e0de9e0826a53460235f886f8a Mon Sep 17 00:00:00 2001 From: efrilm Date: Wed, 6 Aug 2025 12:10:56 +0700 Subject: [PATCH] fix: sales analytic --- .../report/pages/report_page.dart | 2 +- .../widgets/item_sales_report_widget.dart | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/presentation/report/pages/report_page.dart b/lib/presentation/report/pages/report_page.dart index c13de1f..58c3065 100644 --- a/lib/presentation/report/pages/report_page.dart +++ b/lib/presentation/report/pages/report_page.dart @@ -32,7 +32,7 @@ class ReportPage extends StatefulWidget { class _ReportPageState extends State { int selectedMenu = 1; - String title = 'Transaction Report'; + String title = 'Laporan Penjualan Item'; DateTime fromDate = DateTime.now().subtract(const Duration(days: 30)); DateTime toDate = DateTime.now(); diff --git a/lib/presentation/report/widgets/item_sales_report_widget.dart b/lib/presentation/report/widgets/item_sales_report_widget.dart index b3e239d..e77c7a7 100644 --- a/lib/presentation/report/widgets/item_sales_report_widget.dart +++ b/lib/presentation/report/widgets/item_sales_report_widget.dart @@ -48,7 +48,7 @@ class ItemSalesReportWidget extends StatelessWidget { // Daily Performance Section Text( - 'Daily Performance', + 'Kinerja Harian', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, @@ -124,7 +124,7 @@ class ItemSalesReportWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Sales Analytics', + title, style: TextStyle( fontSize: 20, fontWeight: FontWeight.w700, @@ -182,9 +182,9 @@ class ItemSalesReportWidget extends StatelessWidget { children: [ Expanded( child: _buildMetricCard( - title: 'Total Sales', + title: 'Jumlah Penjualan', value: summary.totalSales.currencyFormatRpV2, - subtitle: 'Net Sales', + subtitle: 'Penjualan Bersih', color: const Color(0xFF3B82F6), backgroundColor: const Color(0xFFEFF6FF), ), @@ -192,9 +192,9 @@ class ItemSalesReportWidget extends StatelessWidget { const SizedBox(width: 16), Expanded( child: _buildMetricCard( - title: 'Total Orders', + title: 'Jumlah Pesanan', value: '${summary.totalOrders}', - subtitle: '${summary.totalItems} Items', + subtitle: '${summary.totalItems} Item', color: const Color(0xFF8B5CF6), backgroundColor: const Color(0xFFF3E8FF), ), @@ -203,9 +203,9 @@ class ItemSalesReportWidget extends StatelessWidget { ), const SizedBox(height: 16), _buildFullWidthMetricCard( - title: 'Average Order Value', + title: 'Nilai Pesanan Rata-rata', value: summary.averageOrderValue.round().currencyFormatRpV2, - subtitle: 'Per transaction', + subtitle: 'Per transaksi', color: const Color(0xFFEF4444), backgroundColor: const Color(0xFFFEF2F2), ), @@ -245,7 +245,7 @@ class ItemSalesReportWidget extends StatelessWidget { const SizedBox(width: 12), Expanded( child: Text( - 'Peak performance on $formattedDate with ${_formatCurrency(highestDay.sales)} revenue (${highestDay.orders} orders)', + 'Kinerja puncak pada $formattedDate dengan pendapatan ${_formatCurrency(highestDay.sales)} (pesanan ${highestDay.orders})', style: TextStyle( fontSize: 13, fontWeight: FontWeight.w500, @@ -445,7 +445,7 @@ class ItemSalesReportWidget extends StatelessWidget { ), ), Text( - 'Revenue', + 'Pendapatan', style: TextStyle( fontSize: 11, fontWeight: FontWeight.w400, @@ -461,7 +461,7 @@ class ItemSalesReportWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - '$orders orders', + '$orders pesanan', style: TextStyle( fontSize: 13, fontWeight: FontWeight.w500, @@ -469,7 +469,7 @@ class ItemSalesReportWidget extends StatelessWidget { ), ), Text( - '$items items', + '$items item', style: TextStyle( fontSize: 11, fontWeight: FontWeight.w400,