feat: default Send Message recipient to team lead

When opening Send Message dialog without a specific recipient,
auto-select the lead member instead of showing empty "Select member".
This commit is contained in:
iliya 2026-03-21 13:04:22 +02:00
parent e837eb7db8
commit e2ca78d1b2

View file

@ -160,7 +160,8 @@ export const SendMessageDialog = ({
// Reset form on open transition (avoid setState in render)
useEffect(() => {
if (open && !prevOpenRef.current) {
setMember(defaultRecipient ?? '');
const leadName = members.find((m) => isLeadMember(m))?.name;
setMember(defaultRecipient ?? leadName ?? '');
setQuote(quotedMessage);
setQuoteExpanded(false);
prevResultRef.current = lastResult;