feat: lang
This commit is contained in:
@@ -97,7 +97,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
floating: false,
|
||||
pinned: true,
|
||||
backgroundColor: AppColor.primary,
|
||||
flexibleSpace: CustomAppBar(title: 'Penjualan'),
|
||||
flexibleSpace: CustomAppBar(title: context.lang.sales),
|
||||
),
|
||||
|
||||
// Date Range Header
|
||||
@@ -138,7 +138,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Summary',
|
||||
context.lang.summary,
|
||||
style: AppStyle.xxl.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.textPrimary,
|
||||
@@ -177,7 +177,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 16),
|
||||
child: Text(
|
||||
'Daily Breakdown',
|
||||
context.lang.daily_breakdown,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -412,7 +412,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildSummaryCard(
|
||||
'Total Sales',
|
||||
context.lang.total_sales,
|
||||
state.sales.summary.totalSales.currencyFormatRp,
|
||||
Icons.trending_up,
|
||||
AppColor.success,
|
||||
@@ -422,7 +422,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
SpaceWidth(12),
|
||||
Expanded(
|
||||
child: _buildSummaryCard(
|
||||
'Total Orders',
|
||||
context.lang.total_orders,
|
||||
state.sales.summary.totalOrders.toString(),
|
||||
Icons.shopping_cart,
|
||||
AppColor.info,
|
||||
@@ -446,7 +446,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildSummaryCard(
|
||||
'Avg Order Value',
|
||||
context.lang.average_price,
|
||||
state.sales.summary.averageOrderValue
|
||||
.round()
|
||||
.currencyFormatRp,
|
||||
@@ -458,7 +458,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
SpaceWidth(12),
|
||||
Expanded(
|
||||
child: _buildSummaryCard(
|
||||
'Total Items',
|
||||
context.lang.total_items,
|
||||
state.sales.summary.totalItems.toString(),
|
||||
Icons.inventory,
|
||||
AppColor.primary,
|
||||
@@ -530,7 +530,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Net Sales',
|
||||
context.lang.net_sales,
|
||||
style: TextStyle(
|
||||
color: AppColor.textWhite.withOpacity(0.9),
|
||||
fontSize: 14,
|
||||
@@ -668,7 +668,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(
|
||||
'${dailySale.orders} orders',
|
||||
'${dailySale.orders} ${context.lang.orders}',
|
||||
style: TextStyle(
|
||||
color: AppColor.info,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -683,21 +683,21 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildDetailItem(
|
||||
'Items',
|
||||
context.lang.items,
|
||||
'${dailySale.items}',
|
||||
Icons.inventory_2,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: _buildDetailItem(
|
||||
'Tax',
|
||||
context.lang.tax,
|
||||
dailySale.tax.currencyFormatRp,
|
||||
Icons.receipt,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: _buildDetailItem(
|
||||
'Discount',
|
||||
context.lang.discount,
|
||||
dailySale.discount.currencyFormatRp,
|
||||
Icons.local_offer,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user