Skip to content

Commit

Permalink
fix: manager strength and weaknesses output (#435)
Browse files Browse the repository at this point in the history
Co-authored-by: m.deljavan <[email protected]>
  • Loading branch information
mdeljavan and m.deljavan authored Aug 20, 2022
1 parent dbf298d commit e4d6204
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,29 @@ export function StrengthsWeaknessesOutput(props: Props) {
type="self"
anonymous={anonymous}
>
{selfReviewType.map((review, index) => (
<Box key={index} marginBottom={1}>
<MultilineOutput value={review} />
</Box>
)) ?? <MultilineOutput value={null} />}
{selfReviewType.length ? (
selfReviewType.map((review, index) => (
<Box key={index} marginBottom={1}>
<NumberedMultilineOutput index={index} value={review} />
</Box>
))
) : (
<MultilineOutput value={null} />
)}
</ReviewItemInfo>
)}
{showMangerPersonReview && manager && managerPersonReview && (
<Box marginTop={2}>
<ReviewItemInfo name={getUserLabel(manager) ?? undefined} src={manager.avatarUrl ?? undefined} type="manager">
{managerPersonReview[type]?.map((review, index) => (
<ReviewItemInfo name={getUserLabel(manager) ?? undefined} src={manager.avatarUrl ?? undefined} type="manager">
{managerPersonReview[type]?.length ? (
managerPersonReview[type]?.map((review, index) => (
<Box key={index} marginBottom={1}>
<NumberedMultilineOutput enableTruncating index={index} value={review} />
<NumberedMultilineOutput index={index} value={review} />
</Box>
)) ?? <MultilineOutput value={null} />}
</ReviewItemInfo>
</Box>
))
) : (
<MultilineOutput value={null} />
)}
</ReviewItemInfo>
)}
{peerReviews?.map((review, index) => (
<ReviewItemInfo
Expand Down

0 comments on commit e4d6204

Please sign in to comment.