Merge pull request 'Update AttendanceScreen layout: change tab label to 'Today’s', adjust height, and add current date display' (#27) from Vaibhav_Enhancement-#296 into main
Reviewed-on: #27
This commit is contained in:
commit
c8177f3365
@ -164,7 +164,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
||||
Permissions.regularizeAttendance);
|
||||
|
||||
final tabs = <Tab>[
|
||||
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<AttendanceScreen> with UIMixin {
|
||||
),
|
||||
MySpacing.height(16),
|
||||
SizedBox(
|
||||
height: 550,
|
||||
height: 630,
|
||||
child: TabBarView(children: views),
|
||||
),
|
||||
],
|
||||
@ -348,25 +348,42 @@ class _AttendanceScreenState extends State<AttendanceScreen> 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<AttendanceScreen> with UIMixin {
|
||||
}
|
||||
},
|
||||
child: SingleChildScrollView(
|
||||
child: MyPaginatedTable(
|
||||
columns: columns,
|
||||
rows: rows,
|
||||
child: MyPaginatedTable(
|
||||
columns: columns,
|
||||
rows: rows,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user