diff --git a/src/pages/Dashboard/ChapterInfo.vue b/src/pages/Dashboard/ChapterInfo.vue index 01546c2..0dbe5d9 100644 --- a/src/pages/Dashboard/ChapterInfo.vue +++ b/src/pages/Dashboard/ChapterInfo.vue @@ -47,17 +47,30 @@ - - - + + + + + chevron_left + {{chapterNames[indexSelectedChapter - 1]}} + + + + {{chapterNames[indexSelectedChapter + 1]}} chevron_right - - + + @@ -109,10 +122,17 @@ export default { }; }, methods: { - showSelectedChapter() { - this.indexSelectedChapter += 1; - this.selectedChapterId = this.chapterIds[this.indexSelectedChapter]; - this.getParticularChapterDetail(); + showSelectedChapter(newChapter) { + if (newChapter == "forward") { + this.indexSelectedChapter += 1; + this.selectedChapterId = this.chapterIds[this.indexSelectedChapter]; + this.getParticularChapterDetail(); + } + if (newChapter == "back") { + this.indexSelectedChapter -= 1; + this.selectedChapterId = this.chapterIds[this.indexSelectedChapter]; + this.getParticularChapterDetail(); + } }, getParticularChapterDetail() { http()