Skip to content

Commit

Permalink
Merge branch 'develop' into feature-2615/CertBadgeCorrections
Browse files Browse the repository at this point in the history
  • Loading branch information
mkimberlin authored Oct 15, 2024
2 parents 4a46b3e + 52a42d6 commit 4d2e245
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions web-ui/src/components/reviews/TeamReviews.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,17 @@ const TeamReviews = ({ onBack, periodId }) => {
};

const renderReviewer = (member, reviewer) => {
const hasReviewer = !!reviewer.name;
const backgroundColor = reviewer.approved ?
'var(--checkins-palette-action-green)' :
'var(--checkins-palette-action-yellow)';
(hasReviewer ?
'var(--checkins-palette-action-yellow)' :
'var(--checkins-palette-action-red)');
const request = getReviewRequest(member, reviewer);
const selfReviewRequest = getSelfReviewRequest(member);
const variant = 'outlined';
const statusLabel = `${reviewer.name}: ${getReviewStatus(request)}`;
const reviewerName = reviewer.name ?? "No Reviewer";
const statusLabel = `${reviewerName}: ${getReviewStatus(request)}`;
const url = getReviewerURL(request, selfReviewRequest);

return (url ?
Expand All @@ -802,9 +806,9 @@ const TeamReviews = ({ onBack, periodId }) => {
</Link> :
<Chip
key={reviewer.id}
label={openMode ? statusLabel : reviewer.name}
label={openMode ? statusLabel : reviewerName}
variant={variant}
onDelete={canUpdate && !openMode ?
onDelete={canUpdate && !openMode && hasReviewer ?
() => deleteReviewer(member, reviewer) : null}
style={{backgroundColor: backgroundColor}}
/>);
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
--checkins-palette-action-disabled: var(--action-disabled);
--checkins-palette-action-yellow: lightyellow;
--checkins-palette-action-green: lightgreen;
--checkins-palette-action-red: darkred;

&[data-mui-color-scheme='dark'] {
--primary-text: color-mix(in oklab, var(--white), var(--black) 10%);
Expand Down

0 comments on commit 4d2e245

Please sign in to comment.