diff --git a/fe-user/src/pages/hrm/EmployeesListPage.tsx b/fe-user/src/pages/hrm/EmployeesListPage.tsx
index 3138aef..a821a7f 100644
--- a/fe-user/src/pages/hrm/EmployeesListPage.tsx
+++ b/fe-user/src/pages/hrm/EmployeesListPage.tsx
@@ -78,6 +78,7 @@ export function EmployeesListPage() {
const [localSearch, setLocalSearch] = useState(search)
const [treeOpenMobile, setTreeOpenMobile] = useState(false)
+ const [companyOpen, setCompanyOpen] = useState(true) // gốc công ty mở mặc định
// Org tree (consume /departments/tree). Class-level [Authorize] only → any
// authenticated user. Counts come pre-rolled-up from BE (TotalEmployeeCount).
@@ -175,30 +176,54 @@ export function EmployeesListPage() {
-
-
{tree.isLoading ? (
Đang tải cây tổ chức…
- ) : !tree.data || tree.data.length === 0 ? (
-
Chưa có phòng ban.
) : (
- {tree.data.map(n => (
-
- ))}
+ {/* Gốc công ty — bấm = tất cả NV; các phòng ban toả xuống dưới (cha→con) */}
+ -
+
+
+
+
+ {companyOpen &&
+ (!tree.data || tree.data.length === 0 ? (
+ Chưa có phòng ban.
+ ) : (
+
+ {tree.data.map(n => (
+
+ ))}
+
+ ))}
+
)}