+ {/* 모바일(md 미만)은 버튼을 입력란 아래 줄로 내린다. */}
+
onChange(e.target.value.replace(/\D/g, ''))}
className={readOnlyContrastClass}
/>
-
-
-
+
+
+
+
+
{(isDialing || isOnCall) &&
@@ -266,23 +269,25 @@ const ListContactInfoPanel = ({
if (header.listHderTy === ListHeaderConst.EMAIL) {
return (
-
+
onChange(e.target.value)}
className={readOnlyContrastClass}
/>
-
+
+
+
)
@@ -367,14 +372,17 @@ const ListContactInfoPanel = ({
return (
-
-
-
+ {/* 모바일(md 미만)은 응답 상태를 버튼 아래 줄로 내린다. */}
+
+
+
+
+
{hasSurveyResponse ? (
[{resultCodes.find((rc) => rc.resultCdTy === ResultCodeType.SURVEY && rc.resultCd === result.lastResultCd)
diff --git a/src/components/list/ListSearchTable.tsx b/src/components/list/ListSearchTable.tsx
index 5eaaa55..8270f96 100644
--- a/src/components/list/ListSearchTable.tsx
+++ b/src/components/list/ListSearchTable.tsx
@@ -2,7 +2,8 @@
import { useCallback, useEffect, useMemo, useRef, useState, type ClipboardEvent, type ReactNode } from 'react'
import type { PaginationState, SortingState } from '@tanstack/react-table'
-import { Funnel, PencilLine } from 'lucide-react'
+import { ChevronDown, Funnel, PencilLine } from 'lucide-react'
+import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover'
@@ -13,6 +14,7 @@ import KriDateRangePicker, { type KriDateRange } from '@/components/common/KriDa
import ListBatchEditDialog, { type BatchEditPayload, type BatchEditResultCodes, type BatchEditRow, type BatchEditSurveyResultCodes } from '@/components/dialog/ListBatchEditDialog'
import ListFilterDialog, { operatorLabel } from '@/components/dialog/ListFilterDialog'
import { useDialog } from '@/hooks/useDialog'
+import { cn } from '@/lib/utils'
import { useListSearchQuery, useUpdateListMutation } from '@/query/list'
import { getListColumns, LIST_IS_USE_LABEL, type ListTableRow } from '@/components/table-column/ListTableColumn'
import { useAssignTargetRows } from '@/components/assign/AssignTargetList'
@@ -72,6 +74,8 @@ export type ListSearchTableProps = {
initialSearchState?: ListSearchUiState
onSearchStateChange?: (state: ListSearchUiState) => void
focusRowId?: string
+ /** 모바일(md 미만)에서 기본 검색 필터를 1열로 쌓고 접기/펼치기 토글을 노출한다. */
+ collapsibleFiltersOnMobile?: boolean
}
const toSidSet = (value: string) =>
@@ -197,8 +201,10 @@ export function ListSearchTable({
initialSearchState,
onSearchStateChange,
focusRowId,
+ collapsibleFiltersOnMobile = false,
}: ListSearchTableProps) {
const { showDialog } = useDialog()
+ const [filtersOpen, setFiltersOpen] = useState(true)
const [searchText, setSearchText] = useState(initialSearchState?.searchText ?? '')
const [showSidHangulHint, setShowSidHangulHint] = useState(false)
const [searchContactResult, setSearchContactResult] = useState(initialSearchState?.searchContactResult ?? [])
@@ -696,88 +702,132 @@ export function ListSearchTable({
resetToFirstPage()
}, [externalAssignFilter])
+ // md 이상에서는 기존 클래스와 동일하게 렌더링되도록 모바일 전용 값만 분기한다.
+ const filterRowClassName = collapsibleFiltersOnMobile
+ ? 'flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center'
+ : 'flex items-center gap-2 flex-wrap'
+ const filterItemClassName = collapsibleFiltersOnMobile
+ ? 'w-full md:w-auto md:flex-1 md:min-w-0 md:max-w-xs'
+ : 'flex-1 min-w-0 max-w-xs'
+ const dateFilterClassName = collapsibleFiltersOnMobile
+ ? 'w-full md:w-auto md:flex-1 md:min-w-[240px] md:max-w-xs'
+ : 'flex-1 min-w-[240px] max-w-xs'
+ const surveyFilterClassName = collapsibleFiltersOnMobile
+ ? 'w-full md:w-auto md:flex-1 md:min-w-[180px] md:max-w-xs'
+ : 'flex-1 min-w-[180px] max-w-xs'
+
+ // 접힌 상태에서도 기본 검색 조건 적용 여부를 알 수 있도록 토글 버튼에 표시한다.
+ const hasActiveFilters =
+ searchText.trim().length > 0 ||
+ searchContactResult.length > 0 ||
+ Boolean(searchContactDateRange.from || searchContactDateRange.to) ||
+ (fieldInterviewEnabled && searchInterviewResult.length > 0) ||
+ Object.values(surveyResultSelections).some((values) => values.length > 0)
+
return (
-
-
-
- item.resultCdTy === ResultCodeType.CONTACT)}
- value={searchContactResult}
- onChange={handleContactResultChange}
- getValue={(item) => String(item.resultCd)}
- getLabel={(item) => item.resultCdLbl}
- placeholder="컨택 결과"
- widthClassName="w-full"
- heightClassName="h-9"
- />
-
-
{
- setSearchContactDateRange(range)
- setPagination((prev) => ({ ...prev, pageIndex: 0 }))
- }}
- placeholder="컨택 일자"
- className="flex-1 min-w-[240px] max-w-xs"
- />
- {fieldInterviewEnabled ? (
-
+ {collapsibleFiltersOnMobile ? (
+
+ ) : null}
+
+
+
+
+
item.resultCdTy === ResultCodeType.INTERVIEW)}
- value={searchInterviewResult}
- onChange={handleInterviewResultChange}
+ items={resultCodes.filter((item) => item.resultCdTy === ResultCodeType.CONTACT)}
+ value={searchContactResult}
+ onChange={handleContactResultChange}
getValue={(item) => String(item.resultCd)}
getLabel={(item) => item.resultCdLbl}
- placeholder="면접 결과"
+ placeholder="컨택 결과"
widthClassName="w-full"
heightClassName="h-9"
/>
+
{
+ setSearchContactDateRange(range)
+ setPagination((prev) => ({ ...prev, pageIndex: 0 }))
+ }}
+ placeholder="컨택 일자"
+ className={dateFilterClassName}
+ />
+ {fieldInterviewEnabled ? (
+
+ item.resultCdTy === ResultCodeType.INTERVIEW)}
+ value={searchInterviewResult}
+ onChange={handleInterviewResultChange}
+ getValue={(item) => String(item.resultCd)}
+ getLabel={(item) => item.resultCdLbl}
+ placeholder="면접 결과"
+ widthClassName="w-full"
+ heightClassName="h-9"
+ />
+
+ ) : null}
+
+
+ {surveys.length > 0 ? (
+
+ {surveys
+ .filter((survey) => survey.prjctSurveyIdx != null)
+ .map((survey) => (
+
+ handleChangeSurveyResult(survey.prjctSurveyIdx as number, value)}
+ getValue={(item) => String(item.resultCd)}
+ getLabel={(item) => item.resultCdLbl}
+ placeholder={`${survey.surveyName} 결과`}
+ widthClassName="w-full"
+ heightClassName="h-9"
+ />
+
+ ))}
+
) : null}
- {surveys.length > 0 ? (
-
- {surveys
- .filter((survey) => survey.prjctSurveyIdx != null)
- .map((survey) => (
-
- handleChangeSurveyResult(survey.prjctSurveyIdx as number, value)}
- getValue={(item) => String(item.resultCd)}
- getLabel={(item) => item.resultCdLbl}
- placeholder={`${survey.surveyName} 결과`}
- widthClassName="w-full"
- heightClassName="h-9"
- />
-
- ))}
-
- ) : null}
-