diff --git a/src/api/services/training.js b/src/api/services/training.js index 23e980018897546cf051dcac4181a3a74c14452c..7c3bc9ec0e9cd3a9f4fb92165e50fcb645efba3f 100644 --- a/src/api/services/training.js +++ b/src/api/services/training.js @@ -50,10 +50,14 @@ export default { await this.addStudent(courseId, { userId: student.id }); } }, + async addStudentsToCourses(courses, students) { + for (const { id: courseId } of courses) { + await this.addStudents(courseId, students); + } + }, async exportCourses() { window.open("/api/courses/export"); }, - async getCourseRegistrationsById(courseId, params) { return await HTTP.get(`/courses/${courseId}/registrations`, { params, diff --git a/src/components/CourseSelect.vue b/src/components/CourseSelect.vue new file mode 100644 index 0000000000000000000000000000000000000000..30e1f07f84e28dccbcdc104fb50192cf466f7e72 --- /dev/null +++ b/src/components/CourseSelect.vue @@ -0,0 +1,191 @@ + + + + diff --git a/src/views/Team.vue b/src/views/Team.vue index 4478231f25a5988808ed616b0d80c65bb670e857..1db421bb31bfb29dda64379be0faceb7b4111e3f 100644 --- a/src/views/Team.vue +++ b/src/views/Team.vue @@ -103,6 +103,68 @@ + + + + + Add selected users to the following selected courses + + + + + + + + + + Cancel + + + {{ + isCourseSelected + ? "Add To Course" + + (areMultipleCoursesSelected ? "s" : "") + : "No Course Selected" + }} + + + + + + + + + @@ -251,7 +325,9 @@