Skip to content

Commit

Permalink
Imrproved naming for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
radinamatic committed Sep 29, 2023
1 parent 601fcd0 commit 9188e6a
Showing 1 changed file with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,7 @@
</template>
</CoreTable>

<p
v-if="!hasVisibleLessons &&
lessons.length"
>

{{ coreString('noResultsLabel') }}
</p>

<p
v-if="!hasNotVisibleLessons &&
lessons.length"
>

<p v-if="showNoResultsLabel">
{{ coreString('noResultsLabel') }}
</p>

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 9188e6a

Please sign in to comment.