diff --git a/src/app/(pages)/(main)/page.tsx b/src/app/(pages)/(main)/page.tsx index 8818fe8..82ea20f 100644 --- a/src/app/(pages)/(main)/page.tsx +++ b/src/app/(pages)/(main)/page.tsx @@ -1,7 +1,10 @@ 'use client' import {useMemo, useState} from "react"; +import {ChevronDown} from "lucide-react"; import AppPageTitle from "@/components/app-shell/AppPageTitle"; +import {Badge} from "@/components/ui/badge"; import {Button} from "@/components/ui/button"; +import {cn} from "@/lib/utils"; import {DataTable} from "@/components/data-table/DataTable"; import {getProjectColumns} from "@/components/table-column/ProjectTableColumn"; import { @@ -100,6 +103,9 @@ const MainPage = () => { const [searchStatus, setSearchStatus] = useState([]); const [searchDept, setSearchDept] = useState([]); const [searchFw, setSearchFw] = useState([]); + // 모바일(md 미만)에서만 필터 영역을 접고 펼친다. md 이상에서는 항상 노출된다. + const [filtersOpen, setFiltersOpen] = useState(false); + const hasActiveFilters = searchStatus.length > 0 || searchDept.length > 0 || searchFw.length > 0; const userId = auth.user?.userId ?? ""; const userRole = auth.user?.userRole; @@ -155,53 +161,84 @@ const MainPage = () => {
-
-
- setSearchText(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") { - handleSearchClick(); - } - }} - /> - { - isManager(userRole) && - item.value} - getLabel={(item) => item.label} - placeholder="진행 상태" - widthClassName="w-60" - heightClassName="h-9" - /> - } - item.value} - getLabel={(item) => item.label} - placeholder="담당 그룹" - widthClassName="w-60" - heightClassName="h-9" - /> - item.value} - getLabel={(item) => item.label} - placeholder="담당 실사" - widthClassName="w-60" - heightClassName="h-9" - /> +
+
+
+ setSearchText(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") { + handleSearchClick(); + } + }} + /> + +
+
+ { + isManager(userRole) && + item.value} + getLabel={(item) => item.label} + placeholder="진행 상태" + widthClassName="w-full md:w-60" + heightClassName="h-9" + /> + } + item.value} + getLabel={(item) => item.label} + placeholder="담당 그룹" + widthClassName="w-full md:w-60" + heightClassName="h-9" + /> + item.value} + getLabel={(item) => item.label} + placeholder="담당 실사" + widthClassName="w-full md:w-60" + heightClassName="h-9" + /> +
+
{isInternal && ( - {fontSize}px -
- @@ -108,10 +117,30 @@ export function AppHeader({ ) : null} - + {/* 모바일(sm 미만)은 헤더 폭이 좁아 이름과 로그아웃을 사용자 메뉴로 묶는다. CTI는 모바일에서 사용하지 않아 표시하지 않는다. */} + + + + + + {userInfo?.userName ? ( + <> + {`${userInfo.userName} 님`} + + + ) : null} + onNavigate("/logout")}> + + 로그아웃 + + + } /> diff --git a/src/components/app-shell/AppMainLayout.tsx b/src/components/app-shell/AppMainLayout.tsx index 0c7263b..32aa52d 100644 --- a/src/components/app-shell/AppMainLayout.tsx +++ b/src/components/app-shell/AppMainLayout.tsx @@ -200,7 +200,7 @@ export default function AppMainLayout({ children, initialFontSize }: AppMainLayo bodyClassName={cn(!isMain && isContactPage && "min-h-0")} mainClassName={cn("p-4", "min-h-0")} mainStyle={{ fontSize: `var(--content-font-size, ${initialFontSize}px)` }} - sidebarOpen={!isMain && isContactPage && menuOpen} + sidebarOpen={!isMain && !isContactPage && menuOpen} onSidebarOpenChange={setMenuOpen} header={