From fdd2d51ed0cef61f5ebdcfac38560ecda0a29ff9 Mon Sep 17 00:00:00 2001 From: Manish Date: Wed, 12 Nov 2025 17:17:01 +0530 Subject: [PATCH] implementation of manage reporting inside employee profile --- .../employees/manage_reporting_bottom_sheet.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/view/employees/manage_reporting_bottom_sheet.dart b/lib/view/employees/manage_reporting_bottom_sheet.dart index a5fc8de..ba035c6 100644 --- a/lib/view/employees/manage_reporting_bottom_sheet.dart +++ b/lib/view/employees/manage_reporting_bottom_sheet.dart @@ -324,10 +324,20 @@ class _ManageReportingBottomSheetState type: SnackbarType.success, ); - // Optionally refresh the saved hierarchy (not necessary here) but we can call: + // ✅ Refresh both the organization hierarchy and employee details so UI shows updated managers + try { + final empId = employeeId; + final EmployeesScreenController controller = Get.find(); + await controller.fetchReportingManagers(empId); + await controller.fetchEmployeeDetails(empId); + } catch (_) { + // ignore if controller not found — not critical + } + + // Optional: re-fetch the organization hierarchy list (if needed elsewhere) await ApiService.getOrganizationHierarchyList(employeeId); - // Keep sheet open and reset reporter selections for next assignment + // Keep sheet open and reset selections _resetForm(); } else { showAppSnackbar(