From 284e67b43309b55922c37fa3f930c26500f73087 Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Sat, 17 May 2025 17:54:49 +0530 Subject: [PATCH] =?UTF-8?q?Update=20AttendanceScreen=20layout:=20change=20?= =?UTF-8?q?tab=20label=20to=20'Today=E2=80=99s',=20adjust=20height,=20and?= =?UTF-8?q?=20add=20current=20date=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/view/dashboard/attendanceScreen.dart | 63 +++++++++++++++--------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/lib/view/dashboard/attendanceScreen.dart b/lib/view/dashboard/attendanceScreen.dart index fc8b2d6..171a2f7 100644 --- a/lib/view/dashboard/attendanceScreen.dart +++ b/lib/view/dashboard/attendanceScreen.dart @@ -164,7 +164,7 @@ class _AttendanceScreenState extends State with UIMixin { Permissions.regularizeAttendance); final tabs = [ - const Tab(text: 'Employee List'), + const Tab(text: 'Today`s'), const Tab(text: 'Logs'), if (hasRegularizationPermission) const Tab(text: 'Regularization'), @@ -199,7 +199,7 @@ class _AttendanceScreenState extends State with UIMixin { ), MySpacing.height(16), SizedBox( - height: 550, + height: 630, child: TabBarView(children: views), ), ], @@ -348,25 +348,42 @@ class _AttendanceScreenState extends State with UIMixin { }).toList(); return Padding( padding: const EdgeInsets.all(0.0), - child: SingleChildScrollView( - child: MyRefreshableContent( - onRefresh: () async { - if (attendanceController.selectedProjectId != null) { - await attendanceController.fetchEmployeesByProject( - attendanceController.selectedProjectId!); - await attendanceController - .fetchProjectData(attendanceController.selectedProjectId!); - attendanceController.update(); - } else { - await attendanceController.fetchProjects(); - } - }, - child: MyPaginatedTable( - columns: columns, - rows: rows, - ), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + const Spacer(), + MyText.bodySmall( + '${DateFormat('dd-MM-yyyy').format(DateTime.now())}', + fontWeight: 600, + color: Colors.grey[700], + ), + const SizedBox(width: 16), + ], + ), + const SizedBox(height: 8), + MyRefreshableContent( + onRefresh: () async { + if (attendanceController.selectedProjectId != null) { + await attendanceController.fetchEmployeesByProject( + attendanceController.selectedProjectId!); + await attendanceController.fetchProjectData( + attendanceController.selectedProjectId!); + attendanceController.update(); + } else { + await attendanceController.fetchProjects(); + } + }, + child: MyPaginatedTable( + columns: columns, + rows: rows, + ), + ), + ], ), - ), + ) ); } @@ -874,9 +891,9 @@ class _AttendanceScreenState extends State with UIMixin { } }, child: SingleChildScrollView( - child: MyPaginatedTable( - columns: columns, - rows: rows, + child: MyPaginatedTable( + columns: columns, + rows: rows, ), ), )