Podopieczni: lokalizacja silowni pod naglowkiem grupy przy grupowaniu
This commit is contained in:
@@ -260,6 +260,11 @@ export default function Trainees() {
|
||||
}, [filtered, trainerGymIds]);
|
||||
// aktywna zakładka siłowni (domyślnie pierwsza grupa; fallback gdy grupa zniknie np. po wyszukiwarce)
|
||||
const activeGroup = gymGroups.find((g) => g.id === activeGymTab) ?? gymGroups[0];
|
||||
// lokalizacja aktywnej siłowni (z członkostw trenera) — pod nagłówkiem grupy
|
||||
const activeGym =
|
||||
activeGroup && activeGroup.id !== 'other'
|
||||
? trainerGyms.find((m) => m.gymId === activeGroup.id)?.gym
|
||||
: undefined;
|
||||
|
||||
const invite = async (candidate: UserSearchResult) => {
|
||||
try {
|
||||
@@ -393,9 +398,14 @@ export default function Trainees() {
|
||||
/>
|
||||
</div>
|
||||
<section>
|
||||
<div className="mb-3 flex items-center gap-2.5">
|
||||
<H3 className="mb-0">{activeGroup.name}</H3>
|
||||
<Badge color="gray">{activeGroup.trainees.length}</Badge>
|
||||
<div className="mb-3">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<H3 className="mb-0">{activeGroup.name}</H3>
|
||||
<Badge color="gray">{activeGroup.trainees.length}</Badge>
|
||||
</div>
|
||||
{activeGym?.location && (
|
||||
<p className="mt-0.5 text-dim text-[0.8125rem]">{activeGym.location}</p>
|
||||
)}
|
||||
</div>
|
||||
<Card>
|
||||
<div className="divide-y divide-line">
|
||||
|
||||
Reference in New Issue
Block a user