feat(vocab): add lesson and completed lesson vocab pool endpoints
All checks were successful
Deploy to production / deploy (push) Successful in 3m5s
All checks were successful
Deploy to production / deploy (push) Successful in 3m5s
- Implemented new endpoints in VocabController for retrieving vocab pools based on lessons and completed lessons. - Updated vocabRouter to include routes for accessing lesson vocab pools and completed lesson vocab pools. - Enhanced VocabService with methods to extract vocab from exercises and lesson didactics, improving vocabulary retrieval for users. - Modified VocabPracticeDialog and VocabCourseView components to support new vocab pool functionalities, enhancing user experience in vocabulary practice.
This commit is contained in:
@@ -88,6 +88,13 @@
|
||||
>
|
||||
{{ getLessonProgress(lesson.id)?.completed ? $t('socialnetwork.vocab.courses.review') : $t('socialnetwork.vocab.courses.start') }}
|
||||
</button>
|
||||
<button
|
||||
v-if="getLessonProgress(lesson.id)?.completed"
|
||||
@click="openLessonPractice(lesson)"
|
||||
class="btn-edit"
|
||||
>
|
||||
Im Trainer üben
|
||||
</button>
|
||||
<button v-if="isOwner" @click="editLesson(lesson.id)" class="btn-edit">{{ $t('socialnetwork.vocab.courses.edit') }}</button>
|
||||
<button v-if="isOwner" @click="deleteLesson(lesson.id)" class="btn-delete">{{ $t('general.delete') }}</button>
|
||||
</div>
|
||||
@@ -99,6 +106,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<VocabPracticeDialog ref="practiceDialog" />
|
||||
|
||||
<!-- Add Lesson Dialog -->
|
||||
<div v-if="showAddLessonDialog" class="dialog-overlay" @click="showAddLessonDialog = false">
|
||||
<div class="dialog" @click.stop>
|
||||
@@ -138,9 +147,11 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import apiClient from '@/utils/axios.js';
|
||||
import { confirmAction, showApiError, showInfo, showSuccess } from '@/utils/feedback.js';
|
||||
import VocabPracticeDialog from '@/dialogues/socialnetwork/VocabPracticeDialog.vue';
|
||||
|
||||
export default {
|
||||
name: 'VocabCourseView',
|
||||
components: { VocabPracticeDialog },
|
||||
props: {
|
||||
courseId: {
|
||||
type: String,
|
||||
@@ -325,6 +336,12 @@ export default {
|
||||
openLesson(lessonId) {
|
||||
this.$router.push(`/socialnetwork/vocab/courses/${this.courseId}/lessons/${lessonId}`);
|
||||
},
|
||||
openLessonPractice(lesson) {
|
||||
this.$refs.practiceDialog?.open?.({
|
||||
courseId: this.courseId,
|
||||
lessonId: lesson.id
|
||||
});
|
||||
},
|
||||
openLessonAssistant(lessonId) {
|
||||
this.$router.push(`/socialnetwork/vocab/courses/${this.courseId}/lessons/${lessonId}?assistant=1`);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user