Skip to content

Commit d72ec69

Browse files
authored
Merge branch 'develop' into feature-2543/review-launch-notification
2 parents 01a7e6b + 64736d8 commit d72ec69

File tree

1 file changed

+42
-77
lines changed

1 file changed

+42
-77
lines changed

web-ui/src/components/reviews/TeamReviews.jsx

Lines changed: 42 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -956,59 +956,6 @@ const TeamReviews = ({ onBack, periodId }) => {
956956
<Root className="team-reviews">
957957
<div className={classes.headerContainer}>
958958
<Typography variant="h4">{period?.name ?? ''} Team Reviews</Typography>
959-
{period && isAdmin && (
960-
<div>
961-
{canUpdate && (
962-
<Tooltip
963-
title={
964-
period.reviewStatus === ReviewStatus.OPEN
965-
? 'Archive'
966-
: 'Unarchive'
967-
}
968-
>
969-
<IconButton
970-
onClick={toggleReviewPeriod}
971-
aria-label={
972-
period.reviewStatus === ReviewStatus.OPEN
973-
? 'Archive'
974-
: 'Unarchive'
975-
}
976-
>
977-
{period.reviewStatus === ReviewStatus.OPEN ? (
978-
<Archive />
979-
) : (
980-
<Unarchive />
981-
)}
982-
</IconButton>
983-
</Tooltip>
984-
)}
985-
986-
{selectHasDeleteReviewPeriodPermission(state) && (
987-
<Tooltip title="Delete">
988-
<IconButton
989-
onClick={confirmDelete}
990-
edge="end"
991-
aria-label="Delete"
992-
>
993-
<Delete />
994-
</IconButton>
995-
</Tooltip>
996-
)}
997-
998-
{approvalMode && (
999-
<FormControlLabel
1000-
control={
1001-
<Switch
1002-
checked={showAll}
1003-
onChange={() => setShowAll(b => !b)}
1004-
/>
1005-
}
1006-
label="Show All"
1007-
sx={{ marginLeft: '0.5rem' }}
1008-
/>
1009-
)}
1010-
</div>
1011-
)}
1012959
</div>
1013960

1014961
<ReviewPeriodStepper
@@ -1060,31 +1007,49 @@ const TeamReviews = ({ onBack, periodId }) => {
10601007
)}
10611008

10621009
{approvalMode && (
1063-
<div id="approval-row">
1064-
<TextField
1065-
className="name-search-field"
1066-
label="Name"
1067-
placeholder="Search by member name"
1068-
variant="outlined"
1069-
value={nameQuery}
1070-
onChange={event => setNameQuery(event.target.value)}
1071-
InputProps={{
1072-
endAdornment: (
1073-
<InputAdornment position="end" color="gray">
1074-
<Search />
1075-
</InputAdornment>
1076-
)
1077-
}}
1078-
/>
1079-
{canUpdate && (
1080-
<div>
1081-
<Button onClick={() => setConfirmApproveAllOpen(true)}>
1082-
Approve All
1083-
</Button>
1084-
<Button onClick={unapproveAll}>Unapprove All</Button>
1010+
<div id="approval-row" style={{ display: 'flex', alignItems: 'center' }}>
1011+
{/* Wrapper div for TextField and Switch */}
1012+
<div style={{ display: 'flex', alignItems: 'center', flexGrow: 1 }}>
1013+
<TextField
1014+
className="name-search-field"
1015+
label="Name"
1016+
placeholder="Search by member name"
1017+
variant="outlined"
1018+
value={nameQuery}
1019+
onChange={event => setNameQuery(event.target.value)}
1020+
InputProps={{
1021+
endAdornment: (
1022+
<InputAdornment position="end" color="gray">
1023+
<Search />
1024+
</InputAdornment>
1025+
)
1026+
}}
1027+
style={{ flexGrow: 1, maxWidth: '400px' }}
1028+
/>
1029+
{/* Add the Switch right next to the TextField */}
1030+
{period && isAdmin && (
1031+
<FormControlLabel
1032+
control={
1033+
<Switch
1034+
checked={showAll}
1035+
onChange={() => setShowAll(b => !b)}
1036+
/>
1037+
}
1038+
label="Show All"
1039+
sx={{ marginLeft: '0.5rem' }}
1040+
/>
1041+
)}
10851042
</div>
1086-
)}
1087-
</div>
1043+
{/* Button aligned to the right */}
1044+
{canUpdate && (
1045+
<div style={{ marginLeft: 'auto' }}>
1046+
<Button onClick={() => setConfirmApproveAllOpen(true)}>
1047+
Approve All
1048+
</Button>
1049+
<Button onClick={unapproveAll}>Unapprove All</Button>
1050+
</div>
1051+
)}
1052+
</div>
10881053
)}
10891054

10901055
{canUpdate && (

0 commit comments

Comments
 (0)