-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EQM: Notify not enough resources to replace questions #12219
EQM: Notify not enough resources to replace questions #12219
Conversation
Build Artifacts
|
d9ff9d8
to
7bb7603
Compare
@@ -117,19 +117,17 @@ export default function useQuizCreation() { | |||
}, | |||
[] | |||
); | |||
if (removedResourceQuestionIds.length === 0) { | |||
// If no resources were removed, we don't need to update the questions | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return here has making the whole function to return, and the updates werent applied when we had resource_pool updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one blocking issue noted, otherwise, things look good to me and worked well in testing!
v-if="showNoEnoughResources" | ||
:selectedQuestions="selectedActiveQuestions" | ||
:availableResources="replacementQuestionPool" | ||
@close="showNoEnoughResources = false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also "go back" in the router and close the side panel.
Thank you @nucleogenesis! I have updated the close handler! |
Hi @AlexVelezLl I confirm that this is implemented as specified in #12094 but while testing I noticed the following:
2024-05-31_11-34-39.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<NotEnoughResourcesModal | ||
v-if="showNoEnoughResources" | ||
:selectedQuestions="selectedActiveQuestions" | ||
:availableResources="replacementQuestionPool" | ||
@close="closeNoEnoughResourcesModal" | ||
@addResources="redirectToSelectResources" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To @pcenov 's comment about the side panel showing under the modal, I think maybe moving this to the CreateQuizSection component would help. Show the modal before navigating there and should be good to go
Summary
Adds a modal to notify the user when there are no enough resources to replace the current selected questions
Compartir.pantalla.-.2024-05-28.16_43_28.mp4
References
Closes #12094
Reviewer guidance
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)