Feature_Report_Action #48

Merged
vaibhav.surve merged 19 commits from Feature_Report_Action into main 2025-06-23 07:32:30 +00:00
Showing only changes of commit 97c873167f - Show all commits

View File

@ -76,9 +76,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
elevation: 0.5, elevation: 0.5,
foregroundColor: Colors.black, foregroundColor: Colors.black,
titleSpacing: 0, titleSpacing: 0,
centerTitle: false, centerTitle: false,
leading: Padding( leading: Padding(
padding: const EdgeInsets.only(top: 15.0), padding: const EdgeInsets.only(top: 15.0),
child: IconButton( child: IconButton(
icon: const Icon(Icons.arrow_back_ios_new, icon: const Icon(Icons.arrow_back_ios_new,
color: Colors.black, size: 20), color: Colors.black, size: 20),
@ -88,7 +88,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
), ),
), ),
title: Padding( title: Padding(
padding: const EdgeInsets.only(top: 15.0), padding: const EdgeInsets.only(top: 15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -304,10 +304,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
), ),
), ),
if (isLoading) if (isLoading)
const SizedBox( employeeListSkeletonLoader()
height: 120,
child: Center(child: CircularProgressIndicator()),
)
else if (employees.isEmpty) else if (employees.isEmpty)
SizedBox( SizedBox(
height: 120, height: 120,
@ -453,6 +450,80 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
}); });
} }
Widget employeeListSkeletonLoader() {
return MyCard.bordered(
borderRadiusAll: 4,
paddingAll: 8,
child: Column(
children: List.generate(4, (index) {
return Column(
children: [
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Row(
children: [
// Avatar placeholder
Container(
width: 31,
height: 31,
decoration: BoxDecoration(
color: Colors.grey.shade300,
shape: BoxShape.circle,
),
),
MySpacing.width(16),
// Employee name/designation & buttons
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 12,
width: 100,
color: Colors.grey.shade300,
),
MySpacing.height(8),
Container(
height: 10,
width: 80,
color: Colors.grey.shade300,
),
MySpacing.height(12),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
height: 28,
width: 60,
color: Colors.grey.shade300,
),
MySpacing.width(8),
Container(
height: 28,
width: 60,
color: Colors.grey.shade300,
),
],
),
],
),
),
],
),
),
if (index != 3)
Divider(
color: Colors.grey.withOpacity(0.3),
thickness: 1,
height: 1,
),
],
);
}),
),
);
}
Widget employeeLog() { Widget employeeLog() {
return Obx(() { return Obx(() {
final logs = List.of(attendanceController.attendanceLogs); final logs = List.of(attendanceController.attendanceLogs);
@ -503,10 +574,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
), ),
), ),
if (attendanceController.isLoadingAttendanceLogs.value) if (attendanceController.isLoadingAttendanceLogs.value)
const SizedBox( employeeListSkeletonLoader()
height: 120,
child: Center(child: CircularProgressIndicator()),
)
else if (logs.isEmpty) else if (logs.isEmpty)
SizedBox( SizedBox(
height: 120, height: 120,
@ -691,10 +759,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
Obx(() { Obx(() {
final employees = attendanceController.regularizationLogs; final employees = attendanceController.regularizationLogs;
if (attendanceController.isLoadingRegularizationLogs.value) { if (attendanceController.isLoadingRegularizationLogs.value) {
return SizedBox( return employeeListSkeletonLoader();
height: 120,
child: const Center(child: CircularProgressIndicator()),
);
} }
if (employees.isEmpty) { if (employees.isEmpty) {