Skip to content

Commit

Permalink
Merge pull request #159 from AkshataKatwal16/admin
Browse files Browse the repository at this point in the history
Issue feat: Pass block code in update user payload after reassign block to team leader
  • Loading branch information
itsvick authored Aug 26, 2024
2 parents ab2d384 + 541bcfe commit 18c526d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/ReassignCenterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ReassignCenterModal: React.FC<ReassignCohortModalProps> = ({
blocks,
blockName
}) => {
console.log(blockName)
console.log(blocks)
const { t } = useTranslation();
const theme = useTheme<any>();

Expand Down Expand Up @@ -196,9 +196,15 @@ const ReassignCenterModal: React.FC<ReassignCohortModalProps> = ({
const filteredCohorts = cohorts?.filter((cohort) =>
cohort.name.toLowerCase().includes(searchInput)
);
// const filteredCBlocks = blocks?.filter((cohort: any) =>
// cohort.label.toLowerCase().includes(searchInput)
// );
const filteredCBlocks = blocks?.filter((cohort: any) =>
cohort.label.toLowerCase().includes(searchInput)
);
cohort.label.toLowerCase().includes(searchInput)
).map((cohort: any) => ({
label: cohort.label,
value: cohort.value,
}));
const handleToggle2 = (centerName: string) => {
// If the selected center is already checked, uncheck it
if (checkedCenters.includes(centerName)) {
Expand Down Expand Up @@ -269,8 +275,8 @@ const ReassignCenterModal: React.FC<ReassignCohortModalProps> = ({
>
<span style={{ color: "black" }}>{center.label}</span>
<Checkbox
checked={checkedCenters.includes(center.label)}
onChange={() => handleToggle2(center.label)}
checked={checkedCenters.includes(center.value)}
onChange={() => handleToggle2(center.value)}
sx={{
color: theme.palette.text.primary,
"&.Mui-checked": {
Expand Down

0 comments on commit 18c526d

Please sign in to comment.