fix: Update text label in attendance filter bottom sheet for clarity
This commit is contained in:
parent
4d3a42e851
commit
b1437db9e0
@ -421,7 +421,8 @@ class _AttendanceTable extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.bold, color: Colors.black87),
|
fontWeight: FontWeight.bold, color: Colors.black87),
|
||||||
columns: [
|
columns: [
|
||||||
const DataColumn(label: Text('Role')),
|
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) {
|
rows: filteredRoles.map((role) {
|
||||||
return DataRow(
|
return DataRow(
|
||||||
@ -431,10 +432,13 @@ class _AttendanceTable extends StatelessWidget {
|
|||||||
...filteredDates.map((date) {
|
...filteredDates.map((date) {
|
||||||
final key = '${role}_$date';
|
final key = '${role}_$date';
|
||||||
return DataCell(
|
return DataCell(
|
||||||
Text(
|
Center(
|
||||||
NumberFormat.decimalPattern()
|
child: Text(
|
||||||
.format(formattedMap[key] ?? 0),
|
NumberFormat.decimalPattern()
|
||||||
style: const TextStyle(fontSize: 13),
|
.format(formattedMap[key] ?? 0),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(fontSize: 13),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -281,11 +281,11 @@ class ProjectProgressChart extends StatelessWidget {
|
|||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: containerHeight,
|
height: containerHeight,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 4),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.grey.shade300),
|
border: Border.all(color: Colors.grey.shade300),
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
color: Colors.transparent,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Scrollbar(
|
child: Scrollbar(
|
||||||
thumbVisibility: true,
|
thumbVisibility: true,
|
||||||
@ -297,8 +297,9 @@ class ProjectProgressChart extends StatelessWidget {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
child: DataTable(
|
child: DataTable(
|
||||||
columnSpacing: screenWidth < 600 ? 16 : 36,
|
|
||||||
headingRowHeight: 44,
|
headingRowHeight: 44,
|
||||||
|
dataRowHeight: 40,
|
||||||
|
columnSpacing: screenWidth < 600 ? 16 : 36,
|
||||||
headingRowColor: MaterialStateProperty.all(
|
headingRowColor: MaterialStateProperty.all(
|
||||||
Colors.blueAccent.withOpacity(0.08)),
|
Colors.blueAccent.withOpacity(0.08)),
|
||||||
headingTextStyle: const TextStyle(
|
headingTextStyle: const TextStyle(
|
||||||
@ -311,15 +312,50 @@ class ProjectProgressChart extends StatelessWidget {
|
|||||||
rows: nonZeroData.map((task) {
|
rows: nonZeroData.map((task) {
|
||||||
return DataRow(
|
return DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(Text(DateFormat('d MMM').format(task.date))),
|
// Date aligned left
|
||||||
DataCell(Text(
|
DataCell(
|
||||||
Utils.formatCurrency(task.planned),
|
Align(
|
||||||
style: TextStyle(color: _getTaskColor('Planned')),
|
alignment: Alignment.centerLeft,
|
||||||
)),
|
child: Text(
|
||||||
DataCell(Text(
|
DateFormat('d MMM').format(task.date),
|
||||||
Utils.formatCurrency(task.completed),
|
style: const TextStyle(fontSize: 14),
|
||||||
style: TextStyle(color: _getTaskColor('Completed')),
|
),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
|
// 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(),
|
}).toList(),
|
||||||
|
|||||||
@ -155,7 +155,7 @@ class _AttendanceFilterBottomSheetState
|
|||||||
padding: const EdgeInsets.only(top: 12, bottom: 12),
|
padding: const EdgeInsets.only(top: 12, bottom: 12),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: MyText.titleSmall("Choose Organization", fontWeight: 600),
|
child: MyText.titleSmall("Change Organization", fontWeight: 600),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user