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),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -349,13 +349,28 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: MyRefreshableContent(
|
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 {
|
onRefresh: () async {
|
||||||
if (attendanceController.selectedProjectId != null) {
|
if (attendanceController.selectedProjectId != null) {
|
||||||
await attendanceController.fetchEmployeesByProject(
|
await attendanceController.fetchEmployeesByProject(
|
||||||
attendanceController.selectedProjectId!);
|
attendanceController.selectedProjectId!);
|
||||||
await attendanceController
|
await attendanceController.fetchProjectData(
|
||||||
.fetchProjectData(attendanceController.selectedProjectId!);
|
attendanceController.selectedProjectId!);
|
||||||
attendanceController.update();
|
attendanceController.update();
|
||||||
} else {
|
} else {
|
||||||
await attendanceController.fetchProjects();
|
await attendanceController.fetchProjects();
|
||||||
@ -366,7 +381,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
|
|||||||
rows: rows,
|
rows: rows,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user