diff --git a/lib/view/employees/manage_reporting_bottom_sheet.dart b/lib/view/employees/manage_reporting_bottom_sheet.dart index 3136d5e..4816d2d 100644 --- a/lib/view/employees/manage_reporting_bottom_sheet.dart +++ b/lib/view/employees/manage_reporting_bottom_sheet.dart @@ -396,7 +396,6 @@ class _ManageReportingBottomSheetState ], ); - // 🔥 WRAP EVERYTHING IN SAFEAREA + SCROLL + BOTTOM PADDING final safeWrappedContent = SafeArea( child: SingleChildScrollView( padding: EdgeInsets.only( @@ -474,7 +473,7 @@ class _ManageReportingBottomSheetState _searchBar( controller: controller, - focusNode: focusNode, + focusNode: focusNode, hint: "Type to search employees...", ), @@ -641,35 +640,35 @@ class _ManageReportingBottomSheetState required FocusNode focusNode, required String hint, }) { - return GestureDetector( - onTap: () => focusNode.requestFocus(), - child: Container( - height: 44, - padding: const EdgeInsets.symmetric(horizontal: 12), - decoration: BoxDecoration( + return TextField( + controller: controller, + focusNode: focusNode, + decoration: InputDecoration( + hintText: hint, + hintStyle: const TextStyle(fontSize: 13, color: Colors.grey), + filled: true, + fillColor: Colors.grey.shade100, + prefixIcon: const Icon(Icons.search, size: 18, color: Colors.grey), + border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), - border: Border.all(color: Colors.grey.shade300), - color: Colors.white, + borderSide: BorderSide(color: Colors.grey.shade300), ), - child: Row( - children: [ - const Icon(Icons.search, size: 18, color: Colors.grey), - const SizedBox(width: 8), - Expanded( - child: TextField( - controller: controller, - focusNode: focusNode, - decoration: InputDecoration( - hintText: hint, - border: InputBorder.none, - isDense: true, - ), - style: const TextStyle(fontSize: 13), - ), - ), - ], + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: BorderSide(color: Colors.grey.shade300), ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.blueAccent, + width: 1.5, + ), + ), + contentPadding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 14), + isDense: true, ), + style: const TextStyle(fontSize: 13), ); } } diff --git a/lib/view/infraProject/assign_employee_infra_bottom_sheet.dart b/lib/view/infraProject/assign_employee_infra_bottom_sheet.dart index fac4332..7bdbce1 100644 --- a/lib/view/infraProject/assign_employee_infra_bottom_sheet.dart +++ b/lib/view/infraProject/assign_employee_infra_bottom_sheet.dart @@ -15,7 +15,6 @@ import 'package:on_field_work/helpers/services/api_service.dart'; import 'package:on_field_work/helpers/utils/base_bottom_sheet.dart'; import 'package:on_field_work/model/infra_project/assign_project_allocation_request.dart'; - class JobRole { final String id; final String name; @@ -138,12 +137,18 @@ class _AssignEmployeeBottomSheetState extends State { ); if (res?.success == true) { - Navigator.of(context).pop(true); // 🔥 triggers refresh + Navigator.of(context).pop(true); } else { Get.snackbar('Error', res?.message ?? 'Assignment failed'); } } + BoxDecoration _boxDecoration() => BoxDecoration( + color: Colors.grey.shade100, + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.grey.shade300), + ); + @override Widget build(BuildContext context) { return BaseBottomSheet( @@ -156,34 +161,36 @@ class _AssignEmployeeBottomSheetState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - //ORGANIZATION - MyText.bodySmall( + /// ORGANIZATION + MyText.labelMedium( 'Organization', fontWeight: 600, - color: Colors.grey.shade700, ), - MySpacing.height(6), + MySpacing.height(8), - OrganizationSelector( - controller: _organizationController, - height: 44, - onSelectionChanged: (Organization? org) async { - _selectedOrganization = org; - _selectedEmployees.clear(); - _selectedRole = null; - _serviceController.clearSelection(); - }, + Container( + height: 48, + decoration: _boxDecoration(), + child: OrganizationSelector( + controller: _organizationController, + height: 48, + onSelectionChanged: (Organization? org) async { + _selectedOrganization = org; + _selectedEmployees.clear(); + _selectedRole = null; + _serviceController.clearSelection(); + }, + ), ), MySpacing.height(20), - ///EMPLOYEES (SEARCH) - MyText.bodySmall( + /// EMPLOYEES + MyText.labelMedium( 'Employees', fontWeight: 600, - color: Colors.grey.shade700, ), - MySpacing.height(6), + MySpacing.height(8), Obx( () => InkWell( @@ -199,31 +206,33 @@ class _AssignEmployeeBottomSheetState extends State { MySpacing.height(20), - ///SERVICE - MyText.bodySmall( + /// SERVICE + MyText.labelMedium( 'Service', fontWeight: 600, - color: Colors.grey.shade700, ), - MySpacing.height(6), + MySpacing.height(8), - ServiceSelector( - controller: _serviceController, - height: 44, - onSelectionChanged: (Service? service) async { - _selectedRole = null; - }, + Container( + height: 48, + decoration: _boxDecoration(), + child: ServiceSelector( + controller: _serviceController, + height: 48, + onSelectionChanged: (Service? service) async { + _selectedRole = null; + }, + ), ), MySpacing.height(20), /// JOB ROLE - MyText.bodySmall( + MyText.labelMedium( 'Job Role', fontWeight: 600, - color: Colors.grey.shade700, ), - MySpacing.height(6), + MySpacing.height(8), Obx(() { if (_isLoadingRoles.value) { @@ -231,6 +240,7 @@ class _AssignEmployeeBottomSheetState extends State { } return PopupMenuButton( + offset: const Offset(0, 48), onSelected: (role) { _selectedRole = role; setState(() {}); @@ -265,12 +275,9 @@ class _AssignEmployeeBottomSheetState extends State { Widget _dropdownBox(String text, {IconData icon = Icons.arrow_drop_down}) { return Container( - height: 44, - padding: const EdgeInsets.symmetric(horizontal: 12), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - border: Border.all(color: Colors.grey.shade300), - ), + height: 48, + padding: const EdgeInsets.symmetric(horizontal: 16), + decoration: _boxDecoration(), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -278,7 +285,7 @@ class _AssignEmployeeBottomSheetState extends State { child: Text( text, overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 13), + style: const TextStyle(fontSize: 14), ), ), Icon(icon, color: Colors.grey), @@ -289,7 +296,7 @@ class _AssignEmployeeBottomSheetState extends State { Widget _skeleton() { return Container( - height: 44, + height: 48, decoration: BoxDecoration( color: Colors.grey.shade300, borderRadius: BorderRadius.circular(12),