implementation of manage reporting inside employee profile
This commit is contained in:
parent
cddc2990fb
commit
fdd2d51ed0
@ -324,10 +324,20 @@ class _ManageReportingBottomSheetState
|
|||||||
type: SnackbarType.success,
|
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);
|
await ApiService.getOrganizationHierarchyList(employeeId);
|
||||||
|
|
||||||
// Keep sheet open and reset reporter selections for next assignment
|
// Keep sheet open and reset selections
|
||||||
_resetForm();
|
_resetForm();
|
||||||
} else {
|
} else {
|
||||||
showAppSnackbar(
|
showAppSnackbar(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user