fix:영업파트너 모달 높이 고정+스크롤 적용, salesPartner 레코드 보유자만 검색

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-14 10:55:05 +09:00
parent 92c78b353e
commit 72ce6980a7
2 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ public function searchPartners(Request $request): JsonResponse
$q = trim($request->input('q', ''));
$query = User::where('is_active', true)
->whereIn('role', ['sales', 'manager'])
->whereHas('salesPartner')
->with('salesPartner');
if ($q !== '') {

View File

@@ -308,18 +308,18 @@ className={`flex items-center gap-1.5 ${i + 1 < currentStep ? 'cursor-pointer' :
return (
<div className="fixed inset-0 z-50 flex items-center justify-center" onClick={onClose}>
<div className="absolute inset-0 bg-black/40" />
<div className="relative bg-white rounded-xl shadow-2xl w-full max-w-lg mx-4" onClick={e => e.stopPropagation()}>
<div className="flex items-center justify-between px-5 py-3 border-b">
<div className="relative bg-white rounded-xl shadow-2xl w-full max-w-lg mx-4 flex flex-col" style={{ maxHeight: 'min(480px, 80vh)' }} onClick={e => e.stopPropagation()}>
<div className="flex items-center justify-between px-5 py-3 border-b flex-shrink-0">
<h3 className="text-sm font-semibold text-gray-900">영업파트너 검색</h3>
<button onClick={onClose} className="text-gray-400 hover:text-gray-600 text-lg">&times;</button>
</div>
<div className="px-5 py-3">
<div className="px-5 py-3 flex-shrink-0">
<input ref={inputRef} type="text" value={query}
onChange={e => handleInput(e.target.value)} onKeyDown={handleKeyDown}
placeholder="이름, 이메일 또는 전화번호로 검색..."
className="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none" />
</div>
<div className="px-5 pb-4 max-h-[320px] overflow-y-auto">
<div className="px-5 pb-4 overflow-y-auto flex-1 min-h-0">
{loading && <p className="text-xs text-gray-400 py-3 text-center">검색 ...</p>}
{!loading && results.length === 0 && <p className="text-xs text-gray-400 py-3 text-center">검색 결과가 없습니다.</p>}
{!loading && results.map((p, i) => (