From e9528766776817190b1e579f58e2db056316da6a Mon Sep 17 00:00:00 2001 From: Alex Velez Date: Mon, 13 Jan 2025 16:01:01 -0500 Subject: [PATCH] Disable buttons while saving --- .../LessonSummaryPage/UpdatedResourceSelection.vue | 7 +++++++ .../subPages/ManageSelectedResources.vue | 8 +++++++- .../subPages/SelectFromBookmarks.vue | 5 +++++ .../subPages/SelectFromChannels.vue | 5 +++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/UpdatedResourceSelection.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/UpdatedResourceSelection.vue index 96ae5f451a..ecc6124bd5 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/UpdatedResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/UpdatedResourceSelection.vue @@ -85,6 +85,10 @@ type: Array, required: true, }, + disabled: { + type: Boolean, + default: false, + }, }, computed: { channelsLink() { @@ -151,6 +155,9 @@ } }, contentCheckboxDisabled(resource) { + if (this.disabled) { + return true; + } return !this.selectionRules.every(rule => rule(resource) === true); }, contentIsChecked(resource) { diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/ManageSelectedResources.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/ManageSelectedResources.vue index cd9700c10f..9a87285692 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/ManageSelectedResources.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/ManageSelectedResources.vue @@ -23,7 +23,7 @@ :style="lessonOrderListButtonBorder" >
- + @@ -70,6 +71,7 @@ icon="minus" :ariaLabel="$tr('removeResourceLabel')" :tooltip="$tr('removeResourceLabel')" + :disabled="disabled" @click="removeResource(resource)" /> @@ -165,6 +167,10 @@ type: Number, required: true, }, + disabled: { + type: Boolean, + default: false, + }, }, computed: { diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromBookmarks.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromBookmarks.vue index bc8bea2a7b..afee61615b 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromBookmarks.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromBookmarks.vue @@ -5,6 +5,7 @@ canSelectAll :contentList="contentList" :hasMore="hasMore" + :disabled="disabled" :fetchMore="fetchMore" :loadingMore="loadingMore" :selectionRules="selectionRules" @@ -79,6 +80,10 @@ type: Array, required: true, }, + disabled: { + type: Boolean, + default: false, + }, }, }; diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromChannels.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromChannels.vue index 2271dd649d..03b2c677b5 100644 --- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromChannels.vue +++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/LessonResourceSelection/subPages/SelectFromChannels.vue @@ -29,6 +29,7 @@