Skip to content

Commit

Permalink
Merge pull request #1654 from lumi-tip/development-lumi-7772
Browse files Browse the repository at this point in the history
🐛 fix when selecting another code review
  • Loading branch information
alesanchezr authored Oct 22, 2024
2 parents 65250e1 + 9733593 commit 4eb3712
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/common/components/ReviewModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
return prevState;
});
};

const rejectOrApprove = (status) => {
reportDatalayer({
dataLayer: {
Expand Down Expand Up @@ -394,7 +395,7 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
return t('code-review.rigobot-code-review');
};

const getAssetData = async ({ callback = () => {} } = {}) => {
const getAssetData = async ({ callback = () => { } } = {}) => {
const assetResp = await bc.lesson().getAsset(currentTask.associated_slug);
if (assetResp.status < 400) {
setLoaders((prevState) => ({
Expand Down Expand Up @@ -462,6 +463,7 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
onClose();
setContextData({});
setStage(stages.initial);
handleResetFlow();
}}
title={getTitle()}
closeOnOverlayClick={false}
Expand Down Expand Up @@ -493,6 +495,7 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
left={5}
onClick={() => {
setStage('', 'back');
handleResetFlow();
}}
aria-label={t('common:go-back')}
>
Expand Down Expand Up @@ -528,9 +531,9 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
{t('code-review.student-name', { name: fullName })}
</Text>
{taskStatus === 'DONE' && hasNotBeenReviewed && (
<Box textTransform="uppercase" fontSize="13px" background="yellow.light" color="yellow.default" borderRadius="27px" padding="2px 6px" fontWeight={700} border="2px solid" borderColor="yellow.default">
{t('code-review.waiting-for-review')}
</Box>
<Box textTransform="uppercase" fontSize="13px" background="yellow.light" color="yellow.default" borderRadius="27px" padding="2px 6px" fontWeight={700} border="2px solid" borderColor="yellow.default">
{t('code-review.waiting-for-review')}
</Box>
)}
</Flex>
) : (
Expand Down Expand Up @@ -805,13 +808,13 @@ ReviewModal.propTypes = {
};
ReviewModal.defaultProps = {
isOpen: false,
onClose: () => {},
onClose: () => { },
currentTask: {},
projectLink: '',
defaultStage: stages.initial,
externalData: null,
isStudent: false,
changeStatusAssignment: () => {},
changeStatusAssignment: () => { },
fixedStage: false,
disableRate: false,
disableLiking: false,
Expand Down

0 comments on commit 4eb3712

Please sign in to comment.