fix: Update text label in attendance filter bottom sheet for clarity

This commit is contained in:
Vaibhav Surve 2025-11-03 17:46:33 +05:30
parent 4d3a42e851
commit b1437db9e0
3 changed files with 58 additions and 18 deletions

View File

@ -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,11 +432,14 @@ class _AttendanceTable extends StatelessWidget {
...filteredDates.map((date) {
final key = '${role}_$date';
return DataCell(
Text(
Center(
child: Text(
NumberFormat.decimalPattern()
.format(formattedMap[key] ?? 0),
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 13),
),
),
);
}),
],

View File

@ -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(
// 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(color: _getTaskColor('Planned')),
)),
DataCell(Text(
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(color: _getTaskColor('Completed')),
)),
style: TextStyle(
fontSize: 14,
color: _getTaskColor('Completed'),
fontWeight: FontWeight.w500,
),
),
),
),
),
],
);
}).toList(),

View File

@ -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(() {