diff --git a/lib/view/dashboard/employee_screen.dart b/lib/view/dashboard/employee_screen.dart index 27f3ce4..ef6b319 100644 --- a/lib/view/dashboard/employee_screen.dart +++ b/lib/view/dashboard/employee_screen.dart @@ -41,9 +41,11 @@ class _EmployeeScreenState extends State with UIMixin { @override Widget build(BuildContext context) { return Layout( - child: Stack( - children: [ - GetBuilder( + child: Obx(() { + return LoadingComponent( + isLoading: employeesScreenController.isLoading.value, + loadingText: 'Loading Employees...', + child: GetBuilder( init: employeesScreenController, builder: (controller) { return Column( @@ -155,22 +157,8 @@ class _EmployeeScreenState extends State with UIMixin { ); }, ), - Obx(() { - return employeesScreenController.isLoading.value - ? Container( - color: Colors.black.withOpacity(0.05), - child: const Center( - child: LoadingComponent( - isLoading: true, - loadingText: 'Loading Employees...', - child: SizedBox.shrink(), - ), - ), - ) - : const SizedBox.shrink(); - }), - ], - ), + ); + }), ); } @@ -186,8 +174,6 @@ class _EmployeeScreenState extends State with UIMixin { DataColumn(label: MyText.labelLarge('Name', color: contentTheme.primary)), DataColumn( label: MyText.labelLarge('Contact', color: contentTheme.primary)), - // DataColumn( - // label: MyText.labelLarge('Actions', color: contentTheme.primary)), ]; final rows = @@ -217,26 +203,6 @@ class _EmployeeScreenState extends State with UIMixin { ], ), ), - // DataCell( - // Row( - // children: [ - // IconButton( - // icon: const Icon(Icons.visibility), - // tooltip: 'View', - // onPressed: () { - // // View employee action - // }, - // ), - // IconButton( - // icon: const Icon(Icons.edit), - // tooltip: 'Edit', - // onPressed: () { - // // Edit employee action - // }, - // ), - // ], - // ), - // ), ], ); }).toList();