diff --git a/lib/helpers/widgets/dashbaord/attendance_overview_chart.dart b/lib/helpers/widgets/dashbaord/attendance_overview_chart.dart index 3435b20..e0f1fad 100644 --- a/lib/helpers/widgets/dashbaord/attendance_overview_chart.dart +++ b/lib/helpers/widgets/dashbaord/attendance_overview_chart.dart @@ -421,7 +421,8 @@ class _AttendanceTable extends StatelessWidget { fontWeight: FontWeight.bold, color: Colors.black87), columns: [ const DataColumn(label: Text('Role')), - ...filteredDates.map((d) => DataColumn(label: Text(d))), + ...filteredDates + .map((d) => DataColumn(label: Center(child: Text(d)))), ], rows: filteredRoles.map((role) { return DataRow( @@ -431,10 +432,13 @@ class _AttendanceTable extends StatelessWidget { ...filteredDates.map((date) { final key = '${role}_$date'; return DataCell( - Text( - NumberFormat.decimalPattern() - .format(formattedMap[key] ?? 0), - style: const TextStyle(fontSize: 13), + Center( + child: Text( + NumberFormat.decimalPattern() + .format(formattedMap[key] ?? 0), + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 13), + ), ), ); }), diff --git a/lib/helpers/widgets/dashbaord/project_progress_chart.dart b/lib/helpers/widgets/dashbaord/project_progress_chart.dart index 9ada6ef..ed2acb5 100644 --- a/lib/helpers/widgets/dashbaord/project_progress_chart.dart +++ b/lib/helpers/widgets/dashbaord/project_progress_chart.dart @@ -281,11 +281,11 @@ class ProjectProgressChart extends StatelessWidget { return Container( height: containerHeight, - padding: const EdgeInsets.symmetric(vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 4), decoration: BoxDecoration( border: Border.all(color: Colors.grey.shade300), borderRadius: BorderRadius.circular(5), - color: Colors.transparent, + color: Colors.white, ), child: Scrollbar( thumbVisibility: true, @@ -297,8 +297,9 @@ class ProjectProgressChart extends StatelessWidget { child: SingleChildScrollView( scrollDirection: Axis.vertical, child: DataTable( - columnSpacing: screenWidth < 600 ? 16 : 36, headingRowHeight: 44, + dataRowHeight: 40, + columnSpacing: screenWidth < 600 ? 16 : 36, headingRowColor: MaterialStateProperty.all( Colors.blueAccent.withOpacity(0.08)), headingTextStyle: const TextStyle( @@ -311,15 +312,50 @@ class ProjectProgressChart extends StatelessWidget { rows: nonZeroData.map((task) { return DataRow( cells: [ - DataCell(Text(DateFormat('d MMM').format(task.date))), - DataCell(Text( - Utils.formatCurrency(task.planned), - style: TextStyle(color: _getTaskColor('Planned')), - )), - DataCell(Text( - Utils.formatCurrency(task.completed), - style: TextStyle(color: _getTaskColor('Completed')), - )), + // Date aligned left + DataCell( + Align( + alignment: Alignment.centerLeft, + child: Text( + DateFormat('d MMM').format(task.date), + style: const TextStyle(fontSize: 14), + ), + ), + ), + // Planned centered + DataCell( + SizedBox( + width: 60, // ensures proper centering + child: Align( + alignment: Alignment.center, + child: Text( + Utils.formatCurrency(task.planned), + style: TextStyle( + fontSize: 14, + color: _getTaskColor('Planned'), + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ), + // Completed centered + DataCell( + SizedBox( + width: 60, // ensures proper centering + child: Align( + alignment: Alignment.center, + child: Text( + Utils.formatCurrency(task.completed), + style: TextStyle( + fontSize: 14, + color: _getTaskColor('Completed'), + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ), ], ); }).toList(), diff --git a/lib/model/attendance/attendence_filter_sheet.dart b/lib/model/attendance/attendence_filter_sheet.dart index cc5517e..84f66ff 100644 --- a/lib/model/attendance/attendence_filter_sheet.dart +++ b/lib/model/attendance/attendence_filter_sheet.dart @@ -155,7 +155,7 @@ class _AttendanceFilterBottomSheetState padding: const EdgeInsets.only(top: 12, bottom: 12), child: Align( alignment: Alignment.centerLeft, - child: MyText.titleSmall("Choose Organization", fontWeight: 600), + child: MyText.titleSmall("Change Organization", fontWeight: 600), ), ), Obx(() {