Update AttendanceScreen layout: change tab label to 'Today’s', adjust height, and add current date display
This commit is contained in:
parent
f076b7b52a
commit
284e67b433
@ -164,7 +164,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
|||||||
Permissions.regularizeAttendance);
|
Permissions.regularizeAttendance);
|
||||||
|
|
||||||
final tabs = <Tab>[
|
final tabs = <Tab>[
|
||||||
const Tab(text: 'Employee List'),
|
const Tab(text: 'Today`s'),
|
||||||
const Tab(text: 'Logs'),
|
const Tab(text: 'Logs'),
|
||||||
if (hasRegularizationPermission)
|
if (hasRegularizationPermission)
|
||||||
const Tab(text: 'Regularization'),
|
const Tab(text: 'Regularization'),
|
||||||
@ -199,7 +199,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
|||||||
),
|
),
|
||||||
MySpacing.height(16),
|
MySpacing.height(16),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 550,
|
height: 630,
|
||||||
child: TabBarView(children: views),
|
child: TabBarView(children: views),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -348,25 +348,42 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
|||||||
}).toList();
|
}).toList();
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: MyRefreshableContent(
|
child: Column(
|
||||||
onRefresh: () async {
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
if (attendanceController.selectedProjectId != null) {
|
children: [
|
||||||
await attendanceController.fetchEmployeesByProject(
|
Row(
|
||||||
attendanceController.selectedProjectId!);
|
children: [
|
||||||
await attendanceController
|
const Spacer(),
|
||||||
.fetchProjectData(attendanceController.selectedProjectId!);
|
MyText.bodySmall(
|
||||||
attendanceController.update();
|
'${DateFormat('dd-MM-yyyy').format(DateTime.now())}',
|
||||||
} else {
|
fontWeight: 600,
|
||||||
await attendanceController.fetchProjects();
|
color: Colors.grey[700],
|
||||||
}
|
),
|
||||||
},
|
const SizedBox(width: 16),
|
||||||
child: MyPaginatedTable(
|
],
|
||||||
columns: columns,
|
),
|
||||||
rows: rows,
|
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: SingleChildScrollView(
|
||||||
child: MyPaginatedTable(
|
child: MyPaginatedTable(
|
||||||
columns: columns,
|
columns: columns,
|
||||||
rows: rows,
|
rows: rows,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user