feat: add match data to suggestions and chat link for accepted recordings

Backend changes:
- Modified getUserSuggestions to include match data (id, slug, status)
- Returns match info for both toBeRecorded and toRecord suggestions

Frontend changes:
- Added useNavigate hook to RecordingTab
- Capture match data from updateSuggestionStatus response
- Added MessageCircle icon and chat button to SuggestionCard
- Show "Open Chat" button for accepted suggestions with active matches
- Navigate to /matches/{matchSlug}/chat when clicked

This completes the recording stats flow by allowing users to easily
access the match chat after accepting a recording suggestion.
This commit is contained in:
Radosław Gierwiało
2025-11-30 11:03:29 +01:00
parent 3371b53fc7
commit 8c753a7148
2 changed files with 42 additions and 5 deletions

View File

@@ -511,6 +511,13 @@ async function getUserSuggestions(eventId, userId) {
city: true,
country: true,
}
},
match: {
select: {
id: true,
slug: true,
status: true,
}
}
}
});
@@ -534,6 +541,13 @@ async function getUserSuggestions(eventId, userId) {
}
}
}
},
match: {
select: {
id: true,
slug: true,
status: true,
}
}
}
});