feat: add editable functionality for current quarter OKRs, allowing participants and team admins to modify objectives and key results, enhancing user interaction and collaboration
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m26s

This commit is contained in:
Julien Froidefond
2026-02-18 08:31:32 +01:00
parent ee13f8ba99
commit 35228441e3
2 changed files with 215 additions and 23 deletions

View File

@@ -87,9 +87,25 @@ export default async function WeeklyCheckInSessionPage({ params }: WeeklyCheckIn
</div>
</div>
{/* Current Quarter OKRs */}
{/* Current Quarter OKRs - editable by participant or team admin */}
{currentQuarterOKRs.length > 0 && (
<CurrentQuarterOKRs okrs={currentQuarterOKRs} period={currentQuarterPeriod} />
<CurrentQuarterOKRs
okrs={currentQuarterOKRs}
period={currentQuarterPeriod}
canEdit={
(!!resolvedParticipant.matchedUser &&
authSession.user.id === resolvedParticipant.matchedUser.id) ||
(() => {
const participantTeamIds = new Set(
currentQuarterOKRs.map((okr) => okr.team?.id).filter(Boolean) as string[]
);
const adminTeamIds = userTeams
.filter((t) => t.userRole === 'ADMIN')
.map((t) => t.id);
return adminTeamIds.some((tid) => participantTeamIds.has(tid));
})()
}
/>
)}
{/* Live Wrapper + Board */}