fix: restore org name dropdown + no-match message; member name field full width

This commit is contained in:
James 2026-03-12 01:04:46 -04:00
parent 0bb8033ed7
commit 14b35c95da
2 changed files with 22 additions and 21 deletions

BIN
dealspace

Binary file not shown.

View File

@ -915,19 +915,18 @@
return (d.name || '').toLowerCase().includes(q.toLowerCase());
});
if (!matches.length) {
// No match — just hide, the typed name will be used as-is on submit
dd.classList.add('hidden');
return;
dd.innerHTML = `<div class="px-4 py-3 text-sm text-[#94a3b8]">No match — <strong class="text-white">${escHtml(q)}</strong> will be created as a new org</div>`;
} else {
dd.innerHTML = matches.map(o => {
const d = parseData(o.data_text);
const name = d.name || 'Unnamed';
return `<div onclick="selectOrg('${o.entry_id}','${name.replace(/'/g,"\'")}','${d.role||''}')"
class="px-4 py-3 text-sm text-white hover:bg-white/[0.06] cursor-pointer flex items-center gap-3">
<span class="font-medium">${escHtml(name)}</span>
<span class="text-xs text-[#475569] capitalize">${d.role || ''}</span>
</div>`;
}).join('');
}
dd.innerHTML = matches.map(o => {
const d = parseData(o.data_text);
const name = d.name || 'Unnamed';
return `<div onclick="selectOrg('${o.entry_id}','${name.replace(/'/g,"\'")}','${d.role||''}')"
class="px-4 py-3 text-sm text-white hover:bg-white/[0.06] cursor-pointer flex items-center gap-3">
<span class="font-medium">${escHtml(name)}</span>
<span class="text-xs text-[#475569] capitalize">${d.role || ''}</span>
</div>`;
}).join('');
dd.classList.remove('hidden');
}, 200);
}
@ -972,19 +971,21 @@
container.innerHTML = `
<div class="flex flex-wrap gap-2 mb-2">${bubbles}</div>
<div class="grid grid-cols-[1fr_1fr_1fr_auto] gap-2 items-center" id="member-input-row">
<div class="space-y-2" id="member-input-row">
<div class="relative">
<input type="text" id="new-mname" placeholder="Name" autocomplete="off"
<input type="text" id="new-mname" placeholder="Full name" autocomplete="off"
oninput="memberNameSearch(this.value)"
class="w-full px-3 py-2 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-xs focus:outline-none focus:border-[#c9a84c]">
class="w-full px-3 py-2.5 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-sm focus:outline-none focus:border-[#c9a84c]">
<div id="memberNameDropdown" class="hidden absolute left-0 right-0 top-full mt-1 bg-[#0d1f3c] border border-white/[0.12] rounded-lg z-20 max-h-32 overflow-y-auto shadow-xl"></div>
</div>
<input type="email" id="new-memail" placeholder="Email"
class="px-3 py-2 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-xs focus:outline-none focus:border-[#c9a84c]">
<input type="text" id="new-mtitle" placeholder="Title"
onkeydown="if(event.key==='Enter'){event.preventDefault();commitMember();}"
class="px-3 py-2 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-xs focus:outline-none focus:border-[#c9a84c]">
<button onclick="commitMember()" class="w-7 h-7 rounded-full bg-[#c9a84c] hover:bg-[#b8973f] text-[#0a1628] text-lg font-bold flex items-center justify-center leading-none transition">+</button>
<div class="grid grid-cols-[1fr_1fr_auto] gap-2">
<input type="email" id="new-memail" placeholder="Email"
class="px-3 py-2.5 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-sm focus:outline-none focus:border-[#c9a84c]">
<input type="text" id="new-mtitle" placeholder="Title / Role"
onkeydown="if(event.key==='Enter'){event.preventDefault();commitMember();}"
class="px-3 py-2.5 bg-[#0a1628] border border-white/[0.08] rounded-lg text-white placeholder-[#475569] text-sm focus:outline-none focus:border-[#c9a84c]">
<button onclick="commitMember()" class="px-3 py-2.5 rounded-lg bg-[#c9a84c] hover:bg-[#b8973f] text-[#0a1628] text-sm font-bold transition">Add</button>
</div>
</div>`;
}