Add date formatting function and display current date in employee list tab

This commit is contained in:
Vaibhav Surve 2025-05-28 18:14:46 +05:30
parent 34100a4d9e
commit 915471f4c0

View File

@ -201,6 +201,10 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
);
}
String _formatDate(DateTime date) {
return "${date.day}/${date.month}/${date.year}";
}
Widget employeeListTab() {
return Obx(() {
final isLoading = attendanceController.isLoadingEmployees.value;
@ -219,6 +223,12 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
fontWeight: 600,
),
),
MyText.bodySmall(
_formatDate(DateTime.now()),
fontWeight: 600,
color: Colors.grey[700],
overflow: TextOverflow.ellipsis,
),
],
),
),