From 50377cd9eeded3aa781394f94cb2a4da649b7361 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 27 Apr 2020 03:01:00 -0400 Subject: [PATCH] [+] Add message for first rating --- .../overall-course/course-head/course-head.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/overall/overall-course/course-head/course-head.vue b/src/pages/overall/overall-course/course-head/course-head.vue index 350e7af..f006ef6 100644 --- a/src/pages/overall/overall-course/course-head/course-head.vue +++ b/src/pages/overall/overall-course/course-head/course-head.vue @@ -146,6 +146,17 @@ this.course.rated = true; this.ratingDialog = false; this.$message.success('Rating successfully posted, thank you!'); + + // First rating + if (App.instance.courses.map(c => c.rated).reduce((a, b) => a + (b?1:0), 0) == 1) + { + this.$alert('You just submitted your first course rating! You can view other courses\'' + + ' ratings in the Course Selection tab, or review yours by clicking' + + ' the green box that says "Rating Entered." There are also option to turn off the rating buttons ' + + ' by clicking on your avatar on the top right corner.', + 'Thank you for submitting your fist rating!', {confirmButtonText: 'OK'} + ); + } } else {