diff --git a/lib/helpers/widgets/dashbaord/expense_breakdown_chart.dart b/lib/helpers/widgets/dashbaord/expense_breakdown_chart.dart index fda9928..9dc6efc 100644 --- a/lib/helpers/widgets/dashbaord/expense_breakdown_chart.dart +++ b/lib/helpers/widgets/dashbaord/expense_breakdown_chart.dart @@ -129,57 +129,24 @@ class _ChartHeader extends StatelessWidget { @override Widget build(BuildContext context) { - return Obx(() { - final data = controller.expenseTypeReportData.value; - // Calculate total from totalApprovedAmount only - final total = data?.report.fold( - 0, - (sum, e) => sum + e.totalApprovedAmount, - ) ?? - 0; - - return Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - MyText.bodyMedium('Project Expense Analytics', fontWeight: 700), - const SizedBox(height: 2), - MyText.bodySmall('Approved expenses by project', - color: Colors.grey), - ], - ), + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyText.bodyMedium('Project Expense Analytics', fontWeight: 700), + SizedBox(height: 2), + MyText.bodySmall( + 'Approved expenses by project', + color: Colors.grey, + ), + ], ), - if (total > 0) - Container( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), - decoration: BoxDecoration( - color: Colors.blueAccent.withOpacity(0.15), - borderRadius: BorderRadius.circular(5), - border: Border.all(color: Colors.blueAccent, width: 1), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - MyText.bodySmall( - 'Total Approved', - color: Colors.blueAccent, - fontSize: 10, - ), - MyText.bodyMedium( - Utils.formatCurrency(total), - color: Colors.blueAccent, - fontWeight: 700, - fontSize: 14, - ), - ], - ), - ), - ], - ); - }); + ), + ], + ); } } diff --git a/lib/helpers/widgets/dashbaord/expense_by_status_widget.dart b/lib/helpers/widgets/dashbaord/expense_by_status_widget.dart index 1e66fe6..9d10826 100644 --- a/lib/helpers/widgets/dashbaord/expense_by_status_widget.dart +++ b/lib/helpers/widgets/dashbaord/expense_by_status_widget.dart @@ -40,8 +40,8 @@ class ExpenseByStatusWidget extends StatelessWidget { children: [ MyText.bodyMedium(title, fontWeight: 600), const SizedBox(height: 2), - MyText.titleMedium(amount, - color: Colors.blue, fontWeight: 700), + MyText.bodySmall(amount, + color: Colors.indigo, fontWeight: 600), ], ), ), @@ -157,7 +157,7 @@ class ExpenseByStatusWidget extends StatelessWidget { // ✅ Status tiles _buildStatusTile( icon: Icons.currency_rupee, - color: Colors.blue, + color: Colors.indigo, title: "Pending Payment", amount: Utils.formatCurrency(data.processPending.totalAmount), count: data.processPending.count.toString(), @@ -223,7 +223,7 @@ class ExpenseByStatusWidget extends StatelessWidget { MyText.titleLarge( Utils.formatCurrency(data.totalAmount), color: Colors.blue, - fontWeight: 700, + fontWeight: 600, ), const SizedBox(width: 6), const Icon(Icons.chevron_right, diff --git a/lib/helpers/widgets/expense/expense_main_components.dart b/lib/helpers/widgets/expense/expense_main_components.dart index 31ffe4d..5218943 100644 --- a/lib/helpers/widgets/expense/expense_main_components.dart +++ b/lib/helpers/widgets/expense/expense_main_components.dart @@ -40,7 +40,7 @@ class ExpenseAppBar extends StatelessWidget implements PreferredSizeWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - MyText.titleLarge('Expenses', fontWeight: 700), + MyText.titleLarge('Expense & Reimbursement', fontWeight: 700), MySpacing.height(2), GetBuilder( builder: (_) { diff --git a/lib/view/finance/finance_screen.dart b/lib/view/finance/finance_screen.dart index 825e9a2..c60bc64 100644 --- a/lib/view/finance/finance_screen.dart +++ b/lib/view/finance/finance_screen.dart @@ -128,7 +128,7 @@ class _FinanceScreenState extends State } // ✅ Only allow finance cards if "Expense" menu is allowed - final isExpenseAllowed = menuController.isMenuAllowed("Expense"); + final isExpenseAllowed = menuController.isMenuAllowed("Expense & Reimbursement"); if (!isExpenseAllowed) { return const Center( @@ -161,7 +161,7 @@ class _FinanceScreenState extends State // --- Finance Modules (Compact Dashboard-style) --- Widget _buildFinanceModulesCompact() { final stats = [ - _FinanceStatItem(LucideIcons.badge_dollar_sign, "Expense", + _FinanceStatItem(LucideIcons.badge_dollar_sign, "Expense & Reimbursement", contentTheme.info, "/dashboard/expense-main-page"), _FinanceStatItem(LucideIcons.receipt_text, "Payment Request", contentTheme.primary, "/dashboard/payment-request"),