implementation of manage reporting inside employee profile

This commit is contained in:
Manish 2025-11-12 17:17:01 +05:30 committed by Vaibhav Surve
parent cddc2990fb
commit fdd2d51ed0

View File

@ -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(