fix: sales analytic

This commit is contained in:
efrilm 2025-08-06 12:10:56 +07:00
parent 2a457ea5f6
commit 648a4f5eb4
2 changed files with 13 additions and 13 deletions

View File

@ -32,7 +32,7 @@ class ReportPage extends StatefulWidget {
class _ReportPageState extends State<ReportPage> {
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();

View File

@ -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,