fix: sales analytic
This commit is contained in:
parent
2a457ea5f6
commit
648a4f5eb4
@ -32,7 +32,7 @@ class ReportPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _ReportPageState extends State<ReportPage> {
|
class _ReportPageState extends State<ReportPage> {
|
||||||
int selectedMenu = 1;
|
int selectedMenu = 1;
|
||||||
String title = 'Transaction Report';
|
String title = 'Laporan Penjualan Item';
|
||||||
DateTime fromDate = DateTime.now().subtract(const Duration(days: 30));
|
DateTime fromDate = DateTime.now().subtract(const Duration(days: 30));
|
||||||
DateTime toDate = DateTime.now();
|
DateTime toDate = DateTime.now();
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
|
|
||||||
// Daily Performance Section
|
// Daily Performance Section
|
||||||
Text(
|
Text(
|
||||||
'Daily Performance',
|
'Kinerja Harian',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
@ -124,7 +124,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Sales Analytics',
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
@ -182,9 +182,9 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: _buildMetricCard(
|
child: _buildMetricCard(
|
||||||
title: 'Total Sales',
|
title: 'Jumlah Penjualan',
|
||||||
value: summary.totalSales.currencyFormatRpV2,
|
value: summary.totalSales.currencyFormatRpV2,
|
||||||
subtitle: 'Net Sales',
|
subtitle: 'Penjualan Bersih',
|
||||||
color: const Color(0xFF3B82F6),
|
color: const Color(0xFF3B82F6),
|
||||||
backgroundColor: const Color(0xFFEFF6FF),
|
backgroundColor: const Color(0xFFEFF6FF),
|
||||||
),
|
),
|
||||||
@ -192,9 +192,9 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: _buildMetricCard(
|
child: _buildMetricCard(
|
||||||
title: 'Total Orders',
|
title: 'Jumlah Pesanan',
|
||||||
value: '${summary.totalOrders}',
|
value: '${summary.totalOrders}',
|
||||||
subtitle: '${summary.totalItems} Items',
|
subtitle: '${summary.totalItems} Item',
|
||||||
color: const Color(0xFF8B5CF6),
|
color: const Color(0xFF8B5CF6),
|
||||||
backgroundColor: const Color(0xFFF3E8FF),
|
backgroundColor: const Color(0xFFF3E8FF),
|
||||||
),
|
),
|
||||||
@ -203,9 +203,9 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
_buildFullWidthMetricCard(
|
_buildFullWidthMetricCard(
|
||||||
title: 'Average Order Value',
|
title: 'Nilai Pesanan Rata-rata',
|
||||||
value: summary.averageOrderValue.round().currencyFormatRpV2,
|
value: summary.averageOrderValue.round().currencyFormatRpV2,
|
||||||
subtitle: 'Per transaction',
|
subtitle: 'Per transaksi',
|
||||||
color: const Color(0xFFEF4444),
|
color: const Color(0xFFEF4444),
|
||||||
backgroundColor: const Color(0xFFFEF2F2),
|
backgroundColor: const Color(0xFFFEF2F2),
|
||||||
),
|
),
|
||||||
@ -245,7 +245,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
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(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
@ -445,7 +445,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Revenue',
|
'Pendapatan',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
@ -461,7 +461,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'$orders orders',
|
'$orders pesanan',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
@ -469,7 +469,7 @@ class ItemSalesReportWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'$items items',
|
'$items item',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user