From 9188e6ab7976cf414e93999f4551d76b3d693f6b Mon Sep 17 00:00:00 2001 From: Radina Matic Date: Fri, 29 Sep 2023 12:42:37 -0700 Subject: [PATCH] Imrproved naming for readability --- .../src/views/plan/LessonsRootPage/index.vue | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue index e8bf41b0045..72e80b42cfd 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue @@ -89,19 +89,7 @@ -

- - {{ coreString('noResultsLabel') }} -

- -

- +

{{ coreString('noResultsLabel') }}

@@ -250,14 +238,21 @@ return { name: LessonsPageNames.LESSON_CREATION_ROOT }; }, hasVisibleLessons() { - return !( - !this.activeLessonCounts.true && this.filterSelection.value === 'filterLessonVisible' - ); + return this.activeLessonCounts.true; + }, + hasNonVisibleLessons() { + return this.activeLessonCounts.false; }, - hasNotVisibleLessons() { - return !( - !this.activeLessonCounts.false && this.filterSelection.value === 'filterLessonNotVisible' - ); + showNoResultsLabel() { + if (!this.lessons.length) { + return false; + } else if (this.filterSelection.value === 'filterLessonVisible') { + return !this.hasVisibleLessons; + } else if (this.filterSelection.value === 'filterLessonNotVisible') { + return !this.hasNonVisibleLessons; + } else { + return false; + } }, calcTotalSizeOfVisibleLessons() { if (this.lessons && this.lessons.length) {