Skip to content

Commit 229d057

Browse files
Merged 'develop' into 'develop-G7'.
2 parents 8182ead + 036e089 commit 229d057

8 files changed

Lines changed: 29 additions & 68 deletions

File tree

back-end/src/base/groups/groups.service.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export class GroupsService {
3333

3434
//TODO: Waiting for the trello part
3535
const retro = createRetroGroup(course, user);
36-
course.groups.forEach(async (groups, index) => {
36+
await this.deleteCourseRetro(courseId);
37+
await this.emptyCourseProjects(courseId);
38+
for (const groups of course.groups) {
39+
const index = course.groups.indexOf(groups);
3740
const projectDocument: CanvasRoom = {
3841
owner: userId,
3942
meta: {
@@ -57,12 +60,24 @@ export class GroupsService {
5760
{ _id: new ObjectId(courseId) },
5861
{ $push: { projects: canvas.insertedId } },
5962
);
60-
});
63+
}
6164

6265
const newRetro = await this.retrospectiveRepository.createRetrospective(retro);
6366
await this.coursesRepository.updateOneCourse(
6467
{ _id: new ObjectId(courseId) },
6568
{ $set: { retro: newRetro.insertedId, isLocked: true } },
6669
);
6770
}
71+
async emptyCourseProjects(courseId: string) {
72+
await this.coursesRepository.updateOneCourse(
73+
{ _id: new ObjectId(courseId) },
74+
{ $set: { projects: [] } },
75+
);
76+
}
77+
async deleteCourseRetro(courseId: string) {
78+
await this.coursesRepository.updateOneCourse(
79+
{ _id: new ObjectId(courseId) },
80+
{ $set: { retro: null } },
81+
);
82+
}
6883
}

front-end/src/components/RollCallComponents/GroupsComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="grid grid-cols-3 gap-8 mx-auto w-3/4 max-w-2x h-100">
2+
<div class="grid grid-cols-3 gap-8 mx-auto w-3/4 max-w-2x mb-4 h-100">
33
<div
44
v-for="(group, index) in groups"
55
:key="group.id"

front-end/src/components/RollCallComponents/MakeGroupsComponent.vue

Lines changed: 0 additions & 39 deletions
This file was deleted.

front-end/src/components/RollCallComponents/ReturnButtonComponent.vue

Lines changed: 0 additions & 18 deletions
This file was deleted.

front-end/src/components/RollCallComponents/StudentListComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
v-if="studentList && courseId"
4-
class="w-7/12 flex mx-auto md:w-6/12 mt-2.5 align-left justify-start"
4+
class="w-7/12 flex mx-auto md:w-6/12 mt-2.5 mb-4 align-left justify-start"
55
>
66
<table class="text-center w-full">
77
<caption hidden>

front-end/src/layout/app/DrawerLayout.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,15 @@
6868
<SvgQrCode
6969
:class="{
7070
'fill-selected-icon dark:fill-selected-icon':
71-
route.path.startsWith('/app/rollcall'),
71+
route.path.endsWith('/app/rollcall'),
72+
}"
73+
/>
74+
</DrawerRouterOption>
75+
<DrawerRouterOption to="/app/rollcall/groups" name="Groups" :fold="!active">
76+
<SvgGroup
77+
:class="{
78+
'fill-selected-icon dark:fill-selected-icon':
79+
route.path.endsWith('/app/rollcall/groups'),
7280
}"
7381
/>
7482
</DrawerRouterOption>
@@ -136,6 +144,7 @@ import SvgInventory from '@/components/common/svg/Inventory.vue';
136144
import SvgBlog from '@/components/common/svg/Blog.vue';
137145
import SvgResource from '@/components/common/svg/Resource.vue';
138146
import SvgQrCode from '@/components/common/svg/QrCode.vue';
147+
import SvgGroup from '@/components/common/svg/Group.vue';
139148
import SvgNote from '@/components/common/svg/Note.vue';
140149
import SvgDark from '@/components/common/svg/Dark.vue';
141150
import SvgLight from '@/components/common/svg/Light.vue';

front-end/src/views/calls/GroupsView.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
import StudentListComponent from '@/components/RollCallComponents/StudentListComponent.vue';
33
import GroupsComponent from '@/components/RollCallComponents/GroupsComponent.vue';
44
import Chat from '@/components/RollCallComponents/Chat.vue';
5-
import ReturnButtonComponent from "@/components/RollCallComponents/ReturnButtonComponent.vue";
65
76
export default {
87
components: {
9-
ReturnButtonComponent,
108
Chat,
119
StudentListComponent,
1210
GroupsComponent,
@@ -21,7 +19,6 @@ export default {
2119
// and pass it to the QrCode component
2220
</script>
2321
<template>
24-
<ReturnButtonComponent />
2522
<StudentListComponent />
2623
<GroupsComponent />
2724
<Chat room-id="1" />

front-end/src/views/calls/RollCallView.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<script lang="ts">
22
import CallsComponent from '@/components/RollCallComponents/CallsComponent.vue';
33
import StudentListComponent from '@/components/RollCallComponents/StudentListComponent.vue';
4-
import MakeGroupsComponent from '@/components/RollCallComponents/MakeGroupsComponent.vue';
54
import Chat from '@/components/RollCallComponents/Chat.vue';
65
export default {
76
components: {
87
CallsComponent,
98
StudentListComponent,
10-
MakeGroupsComponent,
119
Chat,
1210
},
1311
data() {
@@ -22,6 +20,5 @@ export default {
2220
<template>
2321
<CallsComponent />
2422
<StudentListComponent />
25-
<MakeGroupsComponent />
2623
<Chat room-id="1" />
2724
</template>

0 commit comments

Comments
 (0)