Skip to content

Commit

Permalink
Always show clear selection notice on choose questions manually checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVelezLl committed Feb 28, 2025
1 parent 4f4f2cd commit ef1f322
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<KCheckbox
:checked="workingIsChoosingManually"
:label="chooseQuestionsManuallyLabel$()"
:description="clearSelectionNotice"
:description="clearSelectionNotice$()"
@change="$event => (workingIsChoosingManually = $event)"
/>
<KButton
Expand Down Expand Up @@ -178,12 +178,6 @@
const isSaveSettingsDisabled = computed(() => {
return workingIsChoosingManually.value === props.settings?.isChoosingManually;
});
const clearSelectionNotice = computed(() => {
if (!props.selectedResources.length && !props.selectedQuestions.length) {
return null;
}
return clearSelectionNotice$();
});
onMounted(() => {
if (!props.contentId) {
Expand All @@ -205,7 +199,7 @@
exerciseQuestions,
workingIsChoosingManually,
isSaveSettingsDisabled,
clearSelectionNotice,
clearSelectionNotice$,
saveSettings,
saveSettingsAction$,
selectFromChannels$,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<KCheckbox
:checked="isChoosingManually"
:label="chooseQuestionsManuallyLabel$()"
:description="clearSelectionNotice"
:description="clearSelectionNotice$()"
@change="$event => (isChoosingManually = $event)"
/>
</div>
Expand Down Expand Up @@ -145,19 +145,13 @@
});
const questionCountIsEditable = computed(() => !workingIsChoosingManually.value);
const clearSelectionNotice = computed(() => {
if (!props.selectedResources.length && !props.selectedQuestions.length) {
return null;
}
return clearSelectionNotice$();
});
return {
// eslint-disable-next-line vue/no-unused-properties
prevRoute,
questionCount: workingQuestionCount,
isChoosingManually: workingIsChoosingManually,
clearSelectionNotice,
clearSelectionNotice$,
questionCountIsEditable,
maxQuestions: computed(() => props.settings.maxQuestions),
maxNumberOfQuestions$,
Expand Down Expand Up @@ -187,14 +181,6 @@
type: Boolean,
default: false,
},
selectedQuestions: {
type: Array,
required: true,
},
selectedResources: {
type: Array,
required: true,
},
},
beforeRouteEnter(to, from, next) {
next(vm => {
Expand Down

0 comments on commit ef1f322

Please sign in to comment.