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
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m26s
This commit is contained in:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user